Jump to content

Wikipedia:Reference desk/Archives/Computing/2008 July 1

From Wikipedia, the free encyclopedia
Computing desk
< June 30 << Jun | July | Aug >> July 2 >
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.


July 1

[edit]

Hard Disk Miracle Challenge

[edit]

Well, I'm able to get the broken hard drive on a laptop working for a limited time when lucky, but it is making lots of unahppy noises and is doomed to break beyond recovery (with exceptions for expensive people) very soon.. My goal is to recover various things on it, primarily as much as possible from the "My Documents" folder. Bearing in mind that I'm not planning to spend any money on it, I would like a set of instructions on how to recover data from a particular directory to another machine as quickly as possible (i.e. faster implies more time with HD actually working) using the following limitted supplies:

  • Ubuntu CD (8.04 Desktop), useable for booting (as booting off the HD tends to result in crashes).
  • Windows Laptop (Win XP) with failing hard drive.
  • Working Macintosh Laptop (OSX 10.4.11)
  • Ethernet cable (can be used as a crossover cable with the mac)
  • Wireless Internet Router
  • Wireless in both machines

Keep in mind that trying to actually install things on the broken machine is generally a bad idea. My plan for a first step, unless told otherwise, is to use a WinXP CD to boot and then run chkdsk to catch more bad sectors. I figure a good set of instructions will allow me to start faster than if I tried myself, got stuck halfway through, and spent valuable time trying to figure out what was wrong while the HD degraded further. Expect time of access to be around 20 minutes, though it might be much more or much less if I'm unlucky :( And yes, I've heard of the HD freezer trick). Thanks. 71.184.223.246 (talk) 01:40, 1 July 2008 (UTC)[reply]

If you can get the ethernet cable to work as a crossover cable, it'll be faster than the wireless for transferring data. The only issue is that you'll have to assign a static IP address on both computers. Also, if you use a boot CD (the ubuntu cd, for instance), it won't actually spin up the hard drive at all until you're on the desktop, and even then it won't access it unless you tell it to. From experience, I'd suggest trying to minimize browsing around in folders: sometimes a bad read will make the OS freak out and unmount the drive. For actually copying the files, it'd probably be easiest to use Windows File Sharing (SMB). If you don't already have it set up on the Mac, here's instructions: [1]. You'll need to share a folder with write access. I would boot with a liveCD (ubuntu), browse to the Mac (open a folder, ctrl-L, smb://your-mac's-ip-address), make sure you can write to it, open the dying hard drive partition (it should be on the desktop), find your My Docs folder, and copy it over. You can also find a ton of other ways to do it if you search. Indeterminate (talk) 02:27, 1 July 2008 (UTC)[reply]
I *thought* using the Ubuntu CD as a boot cd would not involve hard disk spinning, but this was not true. It decided that knowing about my HD was important during boot up, even though I was booting from CD. As for SMB, the boot didn't come with it and installing it is not ideal. —Preceding unsigned comment added by 71.184.223.246 (talk) 06:13, 1 July 2008 (UTC)[reply]
There's nothing wrong with installing Samba in LiveCD as it still won't touch your harddrive. Or if your laptop has a FireWire port you can boot your Mac into Target Disk Mode and use it like an ordinary removable harddrive. --antilivedT | C | G 09:39, 1 July 2008 (UTC)[reply]
This strikes me as a pretty complicated setup for doing something fairly simple. Since you're dealing with a failing hard drive, it can very well just give up the ghost any second now, so speed is of the essence. As you said, wasting time setting up things and installing software that may or may not work and is likely to further strain the already broken drive is a bad idea; just turning the computer on puts more strain on it, since it'll start up the drive as well. I know you said that you don't want to spend any money on this, but let me say this anyway: seriously, these days you can get fairly good-sized USB flash drives for, what, about ten bucks or so -- a little more, depending on the brand and the size. If the data on the drive is at all important to you, wouldn't it just be so much easier to get one of those, copy the files you want on the USB flash drive and be done with it? (If you have a lot of it, you may need to empty the stick somewhere and do a couple of passes, but it really strikes me as a lot easier and quicker way of going about it when time is of the essence.) Of course, this kind of necessitates that you have a USB 2.0 compatible port on the computer, as old USB connections had slow transfer rates, but still. How much data do you have in there, approximately? Are we talking hundreds of megs, several gigs, or what? -- Captain Disdain (talk) 11:25, 1 July 2008 (UTC)[reply]
I'll second the recommendation for using a USB flash drive. I just did almost this exact same thing to recover my mom's home directory by booting from a Fedora rescue disk, running fsck on the hard drive, mounting a USB flash drive, and copying over the whole home directory. Now the problem I'm working with appears to be with the filesystem or a few bad blocks, not a completely failing drive, but it really is a painless way to get data off an old device. --Prestidigitator (talk) 18:11, 1 July 2008 (UTC)[reply]
USB flash drive would be reasonable but the laptop uses USB 1.1, which is *slow*. —Preceding unsigned comment added by 71.184.223.246 (talk) 23:14, 1 July 2008 (UTC)[reply]
True. However, it sounded like you were (understandably) more concerned about the number of hard drive accesses than the amount of wall clock time that went past. A transmission speed bottleneck does not necessarily mean more hard drive activity. Incidentally, it seems I was wrong about the severity of the problem I'm dealing with myself, so I'm very, very glad I was able to use the USB drive to backup the home directory in question before the drive failed completely (which happened a few minutes ago; now it isn't even recognized as a physical drive--arg!). --Prestidigitator (talk) 05:02, 2 July 2008 (UTC)[reply]

Can you open your laptop and unplug the broken hard drive? It may be far quicker and easier to then install it in an external USB hard drive bracket, which you could plug into the Mac AFTER OS X has booted up. From there you could copy files off as soon as you've plugged in the drive. Zunaid©® 11:37, 1 July 2008 (UTC)[reply]

websites

[edit]

I am just learning how to use computers. I would like to the proper way of creating a website and web pages, —Preceding unsigned comment added by Stowolf1 (talkcontribs) 02:56, 1 July 2008 (UTC)[reply]

Websites are usually made with a combination of programming languages designed for use on websites. The most basic is HTML but some that are also used can include: Java, CSS, JavaScript, XML and others. There are plenty of websites where you can learn basic HTML and plenty of books if you want to learn a bit more. One piece of advice is when you find a webpage that interests you (from a design standpoint), take a look at its code by clicking View->Page Source (Firefox) or View->Source (Internet Explorer). Tinker around with the code to see how they designed the parts you like (although not all webpages make it easy to see their source).--droptone (talk) 12:09, 1 July 2008 (UTC)[reply]
Start by learning HTML, then CSS, then JavaScript. That will get you pretty far. To do much beyond that, you'll need server-side knowledge, but that will require a server. Take a look at Apache Web Server, and install it on a suitable computer, along with PHP and MySQL. Then, learn PHP scripting and how to interface with MySQL, and you'll have enough knowledge to make something like the mediawiki software, or PhpBB. I'd recommend using w3schools to learn this stuff. JeremyMcCracken (talk) (contribs) 21:52, 2 July 2008 (UTC)[reply]

FILEZILLA

[edit]

SECURE SETTING OF FILEZILLA —Preceding unsigned comment added by Wikifrommld (talkcontribs) 03:20, 1 July 2008 (UTC)[reply]

What is your question? And please stop shouting. --grawity 14:09, 1 July 2008 (UTC)[reply]

Mouse

[edit]

Why is the mouse so-called? 208.76.245.162 (talk) 03:21, 1 July 2008 (UTC)[reply]

As the article that you link to says: "The name mouse, originated at the Stanford Research Institute, derives from the resemblance of early models (which had a cord attached to the rear part of the device, suggesting the idea of a tail) to the common mouse." AndrewWTaylor (talk) 08:28, 1 July 2008 (UTC)[reply]

iPod artwork

[edit]

My iPod has been messed up in terms of showing the right music artwork. Lyhnyrd skynyrd shows as the beetles, metallia shows as they might be giants (LOL). Any idea how to fix this?--Randoman412 (talk) 03:39, 1 July 2008 (UTC)[reply]

lol indeed. —Preceding unsigned comment added by 203.153.231.50 (talk) 08:50, 1 July 2008 (UTC)[reply]

Oh, that helps with my problem.--Randoman412 (talk) 12:57, 1 July 2008 (UTC)[reply]
Check with iTunes, make sure that the correct album artwork corresponds to the correct album. If it's correct on iTunes but not on your iPod, try to restart your iPod, or worst case scenario wipe it. Mastrchf (t/c) 16:13, 1 July 2008 (UTC)[reply]

How many articles/revisions are added to the whole Wikipedia project per day (not only the English Wikipedia)

[edit]

Subject says it all, An average of articles/revisions for the last few months would be sufficient. --Ævar Arnfjörð Bjarmason 08:32, 1 July 2008 (UTC)[reply]

Special:Statistics in each of the projects should help. If you need a rough estimate, just add up the top three or five most active projects. hth, Kushal (talk) 22:34, 1 July 2008 (UTC)[reply]

Compiling code

[edit]

When some code is compiled obviously the resultant executable is specific to a certain type of processor but what about the OS? Is the executable then specific to a certain OS and, if so, why? --212.120.247.132 (talk) 08:48, 1 July 2008 (UTC)[reply]

Yes, ELF and PE will both run on the x86 architecture, but ELF is for Linux and PE is for Windows. --Kjoonlee 08:54, 1 July 2008 (UTC)[reply]
So every OS needs its own format? How is that done? --212.120.247.132 (talk) 09:13, 1 July 2008 (UTC)[reply]
I'm not an expert, but FreeBSD can run ELF, if you do some tweaking to the kernel/modules/etc, and PE is actually a modified COFF (which was originally for Unix), so some OSes share executable formats. --Kjoonlee 09:49, 1 July 2008 (UTC)[reply]
If the code does not interact with the O/S (e.g., via system calls or dynamic linking) and you can manage to get it to load and run, then it should be O/S-neutral. For example, if you implemented sqrt() in C with no library calls and compiled it on Windows and stored that compiled code in an object file, you could load it into memory on Linux/x86 and call that function (with the correct calling convention, which is likely to differ) and it should work. You may have to twiddle with the NX bit and some other niggles, but it's certainly doable. See WINE. --Sean 13:31, 1 July 2008 (UTC)[reply]
It's a long time since I saw a computer but don't some OS's use machine code interrupts built into the instruction set for specific purposes.. (Plus the file format will actually contain other information as well as the actual 'bytecode' that gives OS specific info.) 87.102.86.73 (talk) 15:16, 1 July 2008 (UTC)[reply]
Yes. PDP-11 operating systems from Digital Equipment Corporation are one example; MS/DOS is another.
Atlant (talk) 15:47, 1 July 2008 (UTC)[reply]

Not all compilers produce machine-specific code. Java produces bytecode which is machine and O/S independent.

Atlant (talk) 15:47, 1 July 2008 (UTC)[reply]

That is not strictly correct. Strictly speaking, Java bytecode is not machine-independent, not even close. Java compilers produce bytecode for a very specific machine: the Java Virtual Machine. You simply can't run Java bytecode directly on top of the architecture. Well, most of them... unless your architecture have a Java processor.--Juliano (T) 21:45, 1 July 2008 (UTC)[reply]
Think you slightly misread that.. (or 'Atlant' slight mis-explained it . more likely)87.102.86.73 (talk) 22:53, 1 July 2008 (UTC)[reply]
The original questioner specifically mentioned "type of processor" and that is the context in which I used the term "machine". Generally speaking, Java bytecode is completely independent of the type of processor.
Atlant (talk) 22:51, 2 July 2008 (UTC)[reply]

Let's see if i understand correctly: the operating system code can be considered as being designed to run on the processor but then application code would be different from what you might expect because it doesn't run directly on the hardware. Correct? --212.120.246.239 (talk) 16:27, 1 July 2008 (UTC)[reply]

sort of or maybe no.. the OS can interfere directly with the hardware by means of interrupts which can mean that the same machine code could run differently on the same hardware running different OS's

Software interrupts are usually implemented as instructions in the instruction set, which cause a context switch to an interrupt handler similar to a hardware interrupt. Interrupts are a commonly used technique for computer multitasking, especially in real-time computing. Such a system is said to be interrupt-driven.

from interrupts (it's one step away from the OS being able to directly program the CPU to behave differently)
In general simple machine code such as a subroutine to calculate the sine of an input should look exactly the same independent of OS.
Any machine code does run directly on the hardware, but the OS will have already taken control over the hardware (for a few specific instructions) that may alter the behaviour.
But that machine code may be 'packaged' differently on different OS's: as an example consider the use of different containers Container format (digital) which might contain identical data stored using the same codec - is that parallel helpful?87.102.86.73 (talk) —Preceding comment was added at 17:24, 1 July 2008 (UTC)[reply]
The article that should be mentioned here is Application binary interface. An ABI defines how machine code must be packaged to be recognized as an executable file, and how to request services from the OS. The SysV ABI (which includes ELF as its executable format) is a famous one, theoretically allowing portability of executables between different unix implementations. FreeBSD, Linux, and all their relatives each have an ABI, all based on SysV with their own additions. And there are compatibility modules, for example FreeBSD can run Linux executables, which is sometimes called "emulation" but it's really an implementation of the Linux ABI. And then there's WINE (Wine Is Not an Emulator) which is a similar thing. --tcsetattr (talk / contribs) 21:57, 1 July 2008 (UTC)[reply]

Ive got a related another question: what is the relationship between system calls and library functions. For example, UNIX systems have an open system call while the C programming language also has an open function. Are they the same thing or related in any way? --212.120.246.239 (talk) 06:43, 3 July 2008 (UTC)[reply]

System calls are requests for the kernel to do something. They're special because they cross a privilege boundary. The kernel has full access to the hardware, whereas userspace (non-kernel) code usually has no direct hardware access, so it must do all its interaction with the outside world via system calls. The library function open() and others like it exist to provide a way for C programmers to make system calls without knowing the processor-specific details of how requests are made to the kernel. They're sometimes called syscall wrappers because they don't do much work on their own; they just reorganize the parameters a little bit and then trigger the kernel's syscall entry point. --tcsetattr (talk / contribs) 07:11, 3 July 2008 (UTC)[reply]
Thanks I definitely understand a lot more than I did but there's still something that's bugging me but it's one of those thing's thats a pain to explain. Let's take as an example the first UNIX OS created (im choosing this OS because i have a feeling it may be different for OSes based on others which may utilise the same standards etc and as such the same syscalls). When it was programmed using the C language, was the sys calls used in the OS from the C library or were they made from scratch for the OS and then functions added to a C library for use by programmer? ...or something like that? --212.120.246.239 (talk) 07:22, 3 July 2008 (UTC)[reply]
Tough question. The first version of UNIX was all assembly. C was invented later. Which was the first part to be converted to C? I dunno, maybe you should look at some Ancient UNIX code. That might not go back far enough though; some of the really old stuff is lost. Might have to ask Dennis... --tcsetattr (talk / contribs) 07:49, 3 July 2008 (UTC)[reply]
Haha, Assembly UNIX, back when it was called Unics and meant for playing games. All the parts that became C (Some of it had to stay in assembly), were all converted in bulk before release, so i doubt any intermediate revisions exist anywhere. Fortunately the Method of handling System Calls in both is close enough that it makes difference. When a User Land C Library function such as open is called, it does eventually call the kernel open system call. Depending upon the Version of the operating system, a device driver, or in the case of Early UNIX with a very minor Hardware Set, some built in storage access code, is called by the system call stub program. The code that eventually does that actual work is also (in UNIX/Linux/Windows at least) the code called by the Kernel and other Kernel-Mode components to do the same work. - Jimmi Hugh (talk) 08:12, 3 July 2008 (UTC)[reply]

Help with electronics

[edit]

I have just begun building a guitar pedal, but no have no electronics expereience, but a good deal of knowledge (theoretical knowledge) of the subject.

I have become stuck where the schematic tells me to connect to ground.

I am soldering to a sheet of stripboard, and it has a thin copper track running down both sides of the board, but with no holes in them; Is this where i should connect grounded connections to? And do i connect all grounded connections to the one place, or should i cut the track so as to separate them from one another?

Any help would be much appreciated.

Thank you!! —Preceding unsigned comment added by 212.46.129.226 (talk) 09:33, 1 July 2008 (UTC)[reply]

Because this is an analogue electronics question I have redirected to:

Wikipedia:Reference desk/Science#Help with electronics

Where there should be a quicker answer. Good luck.
Please post answers on the science desk.87.102.86.73 (talk) 12:32, 1 July 2008 (UTC)[reply]

most maths in x86 instruction

[edit]

Just out of curiosity (mostly): what single x86 instruction does the most computation - I know the MMX instructions can calculate the equivalent of a dot product (ab+cd+de).. are there any instructions that do more than this (in a single opcode)??87.102.86.73 (talk) 10:17, 1 July 2008 (UTC)[reply]

Define "most computation". Does computing a square root (several table lookups, followed by interpolation) count as one computation, or many? --Carnildo (talk) 21:34, 1 July 2008 (UTC)[reply]
If it's one opcode then yes.
Though I was thinking of 'most registers involved' in a mathematical operation.87.102.86.73 (talk) 22:50, 1 July 2008 (UTC)[reply]
Depends heavily upon the Model. Even slightly different Models in the same Class, Family, and sharing features can be optimized differently. Intel spends most time Optimizing heavily used Operations, including MMX, SSE etc, so it is likely to be one of the more demanding but under used opcodes. Of course, it's impossible to give you a general answer for any processor as the details of Optimization, Microcode and even Cycles per Instruction are not available. I believe Clock cycles are sometimes released by AMD, however they don't accurately represent the data you are seeking. - Jimmi Hugh (talk) 14:31, 2 July 2008 (UTC)[reply]
actually that wasn't what I was asking (but thanks anyway) - it's not the extent of optimisation, or number of clocks I'm asking, but the number or arithmetic istructions per single opcode
ie an add or mul or div would have 1 per opcode
but the sse/mmx might have more..
I ask because X86_instruction_listings has descriptions only up to 80486..
It was just a curiousity question, so isn't important, unless you know off by heart - in which case..87.102.86.73 (talk) 21:20, 2 July 2008 (UTC)[reply]
Those are the details which are optimized... it is the size of Microcode that is important to the number of mathematical operations and registers involved. However, i'm afraid i don't know them off by heart, though i also wouldn't mind knowing. The response below this line seems a pretty good candidate. - Jimmi Hugh (talk) 21:52, 2 July 2008 (UTC)[reply]
It's been a long time since I've done any assembly programming, but I believe the string-copy (REPNZ MOVSW) instruction does the most: for a copy of 32,767 words (the largest value you can place in the CX register), you'll get 32,767 decrement operations and 65,564 comparisons against zero. It uses six registers (CX, DS:SI, ES:DI, and FLAGS), the most of any operation. --Carnildo (talk) 21:46, 2 July 2008 (UTC)[reply]
Thanks again, but (again) not quite what I was asking, not that I disagree with your count of included arithmetic operations. Let me be a little more specific - any arithmetical operations would have to change the value of a memory location, or a usable register..87.102.86.73 (talk) 22:18, 2 July 2008 (UTC)[reply]

Turning my TV on and off

[edit]

Should I turn off my TV if I'm going to watch it again in an hour? Two hours? I've had a few TVs in my family that's blown its fuse or whatever when we turn it on. Do the display tubes fail often? Imagine Reason (talk) 20:14, 1 July 2008 (UTC)[reply]

No. After repairing a few hundred tube-based televisions, I can say that power problems are almost always the power supply. Display problems are almost always the flyback transformer. I never once had an actual tube go bad. As for turning it off - I seriously doubt you have a television old enough to require charge time when turning it on. The television is fully charged and ready to go when you turn it on. Also, it is mostly "on" when turned off anyway. You are just saving the electricity required to throw electrons from the back of the tube to the the front (and beyond). What you should do is put the television on a power strip and turn off the power strip when not in use. You'll hear horror stories that this will kill your television in a week. Ignore that garbage. They are basing that off a few anecdotes and failing to realize that the plural of anecdote is not data. Data demonstrates that completely powering down a television and powering it up for each use will shorten the life of the television by a small amount, but will not shorten the life to a matter of days. -- kainaw 20:26, 1 July 2008 (UTC)[reply]
Maybe it's because I buy only cheap TVs now, but the two I have take forever for the picture to come on...As for the power supply/flyback transformer, turning the set on and off would place stress on the two, right? Imagine Reason (talk) 17:08, 2 July 2008 (UTC)[reply]
Yes - but no more stress than turning a light bulb on and off. Also, having your television on a power strip with voltage regulation will protect it from the stress of power spikes. This "stress" is due to the components heating up and expanding while on and then cooling and shrinking when cold. If you want to experiment with how bad this stress actually is, go get a metal coat hanger. Bend it a tiny bit then bend it back. By a tiny bit, I mean bend it just enough that you can tell it is bent. Do this over and over. Eventually, the wire will break. You will likely cheat and start bending it at a 90 degree angle before it breaks - but it will break after a few months of doing that nonstop. Each of those bends is equivalent to letting the television get hot and then cold and then hot and then cold. So, you can see that the stress is not a valid concern when compared to the money you will save by turning off all power to the television. As for your television taking forever to turn on, it must be a VERY cheap television or one manufactured back in the early 70s. Even the cheapest ones I've seen (for under $50) come on in about 5 seconds - compared to the one I had as a kid that would take about 5 minutes. -- kainaw 00:52, 3 July 2008 (UTC)[reply]
Also, turn it off sooner in the summer than the winter, as the wasted energy in the summer creates unwanted heat that must be fought by the A/C, while that excess heat may actually be welcomed in the winter: "Happiness is sitting in front of a warm, roaring TV". StuRat (talk) 14:55, 2 July 2008 (UTC)[reply]

lost ability to save JPEG from IE6

[edit]

Hi, for the last few weeks I cannot save any pics from IE6 in XP. I cannot remember what changed to take this away. If I right-click and "save as", it defaults to bmp (with nothing else in the save-as type) and when I check properties the type is not available. Anyone know where to check the setting, or how to fix this? Sandman30s (talk) 21:06, 1 July 2008 (UTC)[reply]

I found a couple of postings suggesting that this may be caused by the Temporary Internet files folder being full. Try clearing it with Tools/Options/General/Delete. AndrewWTaylor (talk) 21:21, 1 July 2008 (UTC)[reply]
My goodness that worked! Unbelievable! Thanks! Sandman30s (talk) 22:02, 1 July 2008 (UTC)[reply]

Listening to radio

[edit]

I am using FF3 on Mac OS X 10.4.11. I am trying to listen to the daily 30 minute broadcast of http://bbcnepali.com but for some reason I will get the same program every time. I have tried doing a command shift r but to no avail. I don't want to install real player. The link http://www.bbc.co.uk/nepali/meta/tx/nb/nepali_1500_au_nb.asx will not open in VLC player. please help. Kushal (talk) 22:30, 1 July 2008 (UTC)[reply]

Have you checked your cache settings for how often Firefox is updating a page? It seems odd though that a complete reload doesn't solve the problem. Have you tried clearing your cache? Imagine Reason (talk) 17:10, 2 July 2008 (UTC)[reply]
yes, I have done the cmd + shift + R thing. Kushal (talk) 23:58, 2 July 2008 (UTC)[reply]