Wikipedia:Reference desk/Archives/Computing/2008 October 28
Computing desk | ||
---|---|---|
< October 27 | << Sep | October | Nov >> | October 29 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
October 28
editHow to do this in the command line...? (Ubuntu)
editI would like add programs to system startup, but with the command line, what I want is to do the same thing that can be done by going to:
System -> Preferences -> Sessions -> Add
PS: I'm working on Ubuntu 8.10 (RC) and the program I want to add is padevchooser (the GUI for PulseAudio).
SF007 (talk) 00:21, 28 October 2008 (UTC)
Ubuntu is probably adding the commands into one of the myriad ".rc" files down under /etc/. What I would do is this: Use the pointsy-clicksy System->Preferences->Sessions->Add tool to add a command with a really distinctive name - or a really distinctive filename as a parameter - then do a "grep -R reallyDistinctiveName /etc" (you may need to be 'root') - and you should be able to find what file it got added into. Now you can edit that file manually to see what the Ubuntu gizmo added - and where. From that point on - writing a little shell script to add and remove commands to that exact file is (as they say) "left as an exercise for the reader"...but it should probably involve perl and/or sed - and will probably almost certainly need to be run as a 'sudo'. SteveBaker (talk) 19:30, 28 October 2008 (UTC)
- The tool SF007 is talking about relates to GNOME sessions, rather than UNIX System Services (although Unix services may be better - see Upstart for information on those). --h2g2bob (talk) 12:41, 29 October 2008 (UTC)
- I finally got it, I just have to place a .desktop file at ~/.config/autostart! SF007 (talk) 23:01, 2 November 2008 (UTC)
Dumb question re: MacBook hard drives
editI was thinking today it might be convenient to get a bigger hard drive for my MacBook. My 80GB one, which seemed so large only a year or two ago, now seems way too small—even with an external disk for my really big things, I'm still always struggling to keep about 10GB free, and that can get eaten up pretty easily with some of the stuff I work on.
I have some sort of Toshiba drive in there now. (TOSHIBA MK8034GSX) Is there any requirement about the type of drive I can get? Or can I just get any generic "laptop drive" and expect it to work once it is formatted, installed upon, etc.? Obviously I don't really just want any generic one—I'll spend time finding one that looks good and reliable and right—but I just mean, do I have to worry about the specific settings or type of drive or whatever? I'm assuming not but thought I would ask since some hardware obviously has to be matched very carefully to the motherboard requirements (like RAM) and things like that. --98.217.8.46 (talk) 01:06, 28 October 2008 (UTC)
I just noticed the SATA/ATA difference. I suspect that is rather important... --98.217.8.46 (talk) 01:10, 28 October 2008 (UTC)
- My brother had this same question a couple months ago. The Mac genius guy told him (paraphrased) "he had to have a special Mac drive because the Macbook case provided no cushioning for the drive. Therefore, the Mac drives have cushioning inside the drive. If you try to use a normal laptop drive (which expects cushioning in the case), you can easily damage the drive just by moving the laptop around." I disagree with the Mac genius. I've taken many laptops apart and I've never seen "cushioning" around the drive. So, in my opinion, you can use any drive - and yes, you will need SATA if it is a SATA port that it plugs into. -- kainaw™ 02:27, 28 October 2008 (UTC)
- How strange. I know that Mac HDs have their own plastic housing but I didn't think it was unique to Macs (though I've only taken apart Mac laptops). In any case it is removable (could take the housing off of the existing drive and replace it). --98.217.8.46 (talk) 12:02, 28 October 2008 (UTC)
- Make sure that the drive is only 9.5mm high not the larger 12mm --Trieste (talk) 15:14, 29 October 2008 (UTC)
- Did you know that you do not need to have 10 GB free space? If you already have an external storage device, I'd suggest you don't worry about it too much. Kushal (talk) 22:00, 29 October 2008 (UTC)
- This is MacOS X. I'd be very uncomfortable with less than 10 GB free, because in my experience, it's not uncommon for the system to use 5+ GB of that for swap files. --Carnildo (talk) 23:17, 29 October 2008 (UTC)
- Hmm ... I guess I have seen the "almost full" warning too many times to make me completely insensitive to it ... Kushal (talk) 21:35, 3 November 2008 (UTC)
In the std.algorithm
package in Phobos, functions are passed as strings. How does this work? eval()
-oids? Or is it all compile-time? Thanks, *Max* (talk) 03:07, 28 October 2008 (UTC).
- Quote from std.algorithm webpage:
Many functions in this module are parameterized with a function or a predicate . The predicate may be passed either as a function name, a delegate name, a functor name, or a compile-time string.
- It's compiled. --wj32 t/c 05:35, 28 October 2008 (UTC)
- Thanks, I don't know how I missed that. *Max* (talk) 00:21, 29 October 2008 (UTC).
Stopping Excel from minimizing sheets
editI’ve Googled and run around the tech blogs, but no one seems to come close to a sensible answer to this one. When I copy-and-paste a column of numbers from a website spreadsheet (e.g., http://research.stlouisfed.org/fred2/series/CPIAUCNS/downloaddata?cid=9), and paste it into my own Excel spreadsheet, two things happen. First, I am instantly jerked back to the source web page (not such a big deal). Second, and this drives me crazy, the Excel page (e.g., “Sheet 1”) pops out of maximized size (the sheet, not the program, shrinks). This makes the scroll bars disappear and causes a host of other problems.
Stats: XP Professional SP2; Office 2003
Is there a simple way to tell Excel to knock it off? DOR (HK) (talk) 05:39, 28 October 2008 (UTC)
- I don't have that version of Excel or that OS, but have you tried the Paste Special options? Try just pasting the "Values" and see if that works. Excel (and most Office products) go totally wonky when you try to paste from web browsers because they try to adapt the formatting. If you tell it to only paste the "values" it usually ignores formatting and works better. --98.217.8.46 (talk) 00:22, 29 October 2008 (UTC)
- Been there, done that. I "special paste" to avoid any formulae.DOR (HK) (talk) 06:03, 29 October 2008 (UTC)
Roaring Fan on Dell XPS
editI have a Dell XPS. After reformatting, the fan began to roar sporadically. It is important to note that the reformatting was the trigger that began the issue, and so dust or bearings being the issue is unlikely.
Additionally, the monitor mounted speakers will not function if plugged into the back port - where the soundcard is. The speakers, however, work perfectly if plugged into the front. Other speakers work when plugged into the back. It is a mystery.
I don't have to look far to find similar problems with XPS systems, but solutions are far more rare. Does anyone happen to know what could cause these symptoms after a reformat? --24.241.228.210 (talk) 10:12, 28 October 2008 (UTC)
- Does it only do it once in a while? Is there any correlation between you plugging in the computer after a long time and the roaring sound coming? Please let us know. Thank you. Kushal (talk) 21:57, 29 October 2008 (UTC)
- The computer does not get unplugged, unless I'm going to open it up, so no. It seems to be somehow tied to audio or the sound card, which makes sense considering that my speakers won't work if plugged directly into the sound card any more. As soon as I play an .mp3, for example, the fan will sometimes stop roaring. It is repeatable, but it does not always work. Especially if it's louder roaring. Then I have to restart. I know very little about hardware, and this seems to be a hardware issue. I can speculate all day, but I know nothing. (For instance, since this started after a reformat, perhaps I need drivers for the sound card or something.) If it helps, my sound card is an SB Audigy 2. Thanks. --24.183.100.152 (talk) 00:13, 31 October 2008 (UTC)
- I asked that because on one of the earlier computers I had, the fan would kick in at a very high sound (and probably speed) when we turned the computer on after we had power cut off for a long duration. I thought it was normal and did not care about it at all as it pretty much always happened when I was booting up and would subside within about 10 minutes at the most. Kushal (talk) 21:39, 3 November 2008 (UTC)
- A malfunctioning fan is often the result of bad power-management drivers - the fan may be operating at 100% speed at all times. Prior to your reformat, the default drivers may have provided fan speed control based on measured temperature, CPU usage, or something else. Check the Dell website for motherboard drivers or power management drivers. Nimur (talk) 17:28, 3 November 2008 (UTC)
trapping a generic keydown event in C#
editIn c++ I simply used the syntax
switch (msg) { case WM_KEYDOWN:
but in c# the test on the event can be only associated to a control like a textbox, AFAIK. Am I wrong?
Thank In Advance.
--Ulisse0 (talk) 14:29, 28 October 2008 (UTC)
- You are correct, but that is not as limiting as it sounds. Just about every visible element in a dotNet windows application is a descendant of Control, including the Form class itself. To demonstrate, create a new C# windows application (using the template), display the properties page for the the main form (right click > properties), set KeyPreview to true, click on the events icon at the top of the properties page, and double clicked the KeyDown event. This created the function below to which I added one line.
private void Form1_KeyDown(object sender, KeyEventArgs e) { Form1.ActiveForm.BackColor = Color.Red; }
- Now, run the application, press any key, and the form turns red. -- Tcncv (talk) 00:23, 29 October 2008 (UTC)
CAD and 3D softwares
editIt may be a dumb question, but what is the difference between a 3D computer graphics software and a CAD software? Is the RD software a genre of CAD? Thanks. 85.112.95.14 (talk) 14:32, 28 October 2008 (UTC)
- Well, CAD might be only 2D - but 2D is just a subset of 3D - so let's assume you're talking about 3D CAD. Firstly - CAD is "Computer Aided Design" - it's a lot more than just graphics. However, the graphics part of CAD is essentially just a tiny subset of 3D computer graphics - although the latter term has come to mean stuff like video games, computer-rendered movies and stuff like that. In general, CAD users are much more interested in the precise geometry than they are about flashy surface rendering. They care a lot whether two parts accurately fit together - where (in a computer game, for example) - it may be perfectly acceptable to let them overlap each other if it makes things go faster without looking too terrible. Most non-CAD 3D users are very concerned with realism - so lighting and shadowing and surface textures and such are really important - where CAD users quite often only use 'wireframe' rendering so they can see things clearly without confusing surface clutter. So the practical disciplines of 3D graphics do provide the underpinnings of much of CAD - but it's only an area of overlap - probably only 1% of modern 3D graphics algorithms would be found in a typical CAD program - but then perhaps only 10% of a CAD program would involve graphics.
- I'm not sure I can explain that any better - but if you have more specific questions - I'd be glad to answer them. I've been doing 3D computer graphics since the early 1980's. SteveBaker (talk) 19:20, 28 October 2008 (UTC)
- It may be an oversimplification, but CAD is used to design something that you can measure, analyze, and build. Here you are more interested in materials, dimensions, tolerances, connections, and manufacturing details. 3D graphics applications are used to design something to look at maybe play with (such as in video games). Often the emphasis is more on appearance and rendering speed, than on function and precision. Uses range from pure art, to architectural conceptual representations, project planning, advertising, animation, and of course gaming. As you can guess, there is much overlap. 3D graphics are used to display CAD models, and many CAD techniques are used to construct objects for 3D graphics applications. -- Tcncv (talk) 23:41, 28 October 2008 (UTC)
- I found your answers excellent. I just got what I wanted. Thanks again. 212.98.136.42 (talk) 13:13, 29 October 2008 (UTC)
- It may be an oversimplification, but CAD is used to design something that you can measure, analyze, and build. Here you are more interested in materials, dimensions, tolerances, connections, and manufacturing details. 3D graphics applications are used to design something to look at maybe play with (such as in video games). Often the emphasis is more on appearance and rendering speed, than on function and precision. Uses range from pure art, to architectural conceptual representations, project planning, advertising, animation, and of course gaming. As you can guess, there is much overlap. 3D graphics are used to display CAD models, and many CAD techniques are used to construct objects for 3D graphics applications. -- Tcncv (talk) 23:41, 28 October 2008 (UTC)
Team Communication
editHi there, I was told that Wikipedia has the ability for online team communication and/or task management types of software. Is this correct? If so can you provide details? D —Preceding unsigned comment added by DarleneRE (talk • contribs) 18:47, 28 October 2008 (UTC)
- I'm not sure what you're asking. We have a list of project management software if that's what you're after. If you want to use a wiki for team communication, MediaWiki (which Wikipedia runs on) is free and open-source. — Matt Eason (Talk • Contribs) 18:58, 28 October 2008 (UTC)
- Well - we have 'talk:' pages - those are a kind of online team communication. But I'm not aware of any task management features. Are you sure you're thinking of "Wikipedia" and not Wiki's in general? Wikipedia is just a big database built with a software package called "MediaWiki". There are many other pieces of software that call themselves "Wiki" and provide features somewhat like MediaWiki - both with and without other stuff rolled in. For example - there is a commercial software package called "ClearSpace" (from Jive Software) - which integrates all sorts of features into a Wiki. In some respects, it's a lot more powerful than MediaWiki because it rolls in these other features. However, it's one of the most awful Wiki's you'll ever see - so I wouldn't give it a second glance. There is a fairly complete list of Wiki software packages in List of wiki software and we also have a Comparison of wiki software - although it doesn't have much to say about task management and such. SteveBaker (talk) 19:04, 28 October 2008 (UTC)
TI-89 Assembly-Language Programming
editI have written a program in C that I wish to transfer from my computer to my TI-89 Titanium, but the file is listed as "Incompatible type" in the transfer window (even after changing the extension to .89z). What should I do? (The program can be found on my userpage) Lucas Brown (talk) 19:00, 28 October 2008 (UTC)
- Have you successfully compiled your C program into Ti89 assembler and linked it with whatever library code you might need? You have to do that on your PC using either TI Flash Studio, or TIGCC. (Sorry if this is obvious - we have to start with the basics and work up!) SteveBaker (talk) 19:10, 28 October 2008 (UTC)
BlackBerry SIM cards (solved)
editHi all,
a friend of me recently acquired a BlackBerry 8830 (Verizon branded, US) from some friend, but he can not insert a standard German SIM card in it. What is the difference and can he clone the sim card onto a smaller one?
HardDisk (talk) 20:39, 28 October 2008 (UTC)
- Verizon does not operate on GSM, thus their version of the 8830 does not have a removable SIM card. This article, while dated, seems to cover the details. --LarryMac | Talk 20:45, 28 October 2008 (UTC)
- If you look at the picture at the bottom of this cnet article, there is some slot on the left for a sim card, and according to the article it is multi-mode (GSM and CDMA compat). Yet a SIM card fits only half in the slot :( HardDisk (talk) 21:01, 28 October 2008 (UTC)
- After quick scanning through its menus, one is able to switch it from Global to GSM. That's quite cute, I can do emergency calls. This means the GSM part works. But why can't I insert a standard SIM card? Do I need some uber-small one? I mean, there are couple of SIM card related options in the menus of it, so the slot MUST be SIM, but it is not :( HardDisk (talk) 21:29, 28 October 2008 (UTC)
- After all, there was a tiny piece of the inside cover distorted, which prevented full insertion of the SIM card... fixed it, now it works. HardDisk (talk) 22:19, 28 October 2008 (UTC)
Linux keyboard logger
editI recently changed qwerty to dvorak. Most of my writing is (sadly) something Englishey, but I also type Finnish and wouldn't mind getting background for relocating the ä and ö keys. Is there any program that could collect some more sophisticated stats of my typing? I seem to have too much spare time. --194.197.235.221 (talk) 23:04, 28 October 2008 (UTC)
- Well, there seem to be some free keylogging programs about (search for freeware keylogger) and of course there's the things that plug between a USB keyboard and the computer (search for USB keylogger) - but how sophisticated they'd be I don't know. I'd guess they'd count keystrokes but not the gaps between them ("where's the blasted ä?") and possibly not the sequences of letters. AJHW (talk) 12:16, 30 October 2008 (UTC)
- Do you really need to know the time between keystrokes in order to optimise your key layout? I don't think so. That being the case, can't you just look at some large body of text that you've typed (such as your email "Sent" folder) and analyse that? Come to think of it - why do you even need it to be your own typing? Any large body of text in Finnish could be analysed to predict where your fingers are most likely to be just before typing each of those two characters - and then to ensure that these two keys are placed close to one of the fingers that hasn't moved in producing the previous keystroke...preferably on the other hand to the finger that just recently moved. That's only a function of the spelling of words and the prevelance of punctuation - which is independent of the user. SteveBaker (talk) 01:33, 31 October 2008 (UTC)
Mutation in computer viruses
editDo any known computer viruses make random functional changes to their payloads when they replicate (rather than simply changing their signatures to make them harder to detect)? NeonMerlin 23:49, 28 October 2008 (UTC)
- Not that I know of but they can have quite sophisticated behaviours. You might find Core war and Digital organism interesting. Dmcq (talk) 08:32, 29 October 2008 (UTC)