Wikipedia:Reference desk/Archives/Computing/2009 November 10

From Wikipedia, the free encyclopedia
Computing desk
< November 9 << Oct | November | Dec >> November 11 >
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.


November 10[edit]

Where is DOM Storage Located?[edit]

Hi. I've been looking all over the Internet but can't find an answer. Where is DOM storage stored on the hard drive (by either Firefox or Internet Explorer)? Thanks.--Drknkn (talk) 02:46, 10 November 2009 (UTC)[reply]

Firefox's Gecko (layout engine) keeps the DOM in memory, not on the hard drive (unless there is not enough RAM, and memory paging occurs by the operating system). Technical details are described on the Gecko Developer DOM FAQ and the more detailed sourcecode documentation linked from there. This older documentation shows a diagram schematically illustrating the relationship between Gecko's DOM and its painting engine.I was unaware that "DOM Storage" refers to a specific technology - not "storage of the DOM in general". If you feel like getting your hands dirty, here is the C++ source code which implements the Gecko DOMStorage and some elements of the rendering engine for recent versions of Firefox (you'll have to browse through many related files to find exactly whichever feature you are looking for). It looks like a C++ class called a DOMStorageEntry is instantiated and placed in a nsTHashTable (an implementation of a hashtable, which appears to be in-memory - on the stack, no less). Its entries (DOM entries) are on the heap. Internet Explorer probably uses a similar methodology, but because it is not an open-source project, exact answers may be more difficult to come by. Nimur (talk) 07:08, 10 November 2009 (UTC)[reply]
Well, now I'm confused, because further reading indicates that DOM storage allows persistent storage of large quantities of data - suggesting that it must be written to disk at some point. The distinction may be between "session" and "local" DOM storage; this persistent storage is a new feature I am not familiar with. It seems that I should read up on DOM Storage before I attempt to answer any further. Nimur (talk) 07:31, 10 November 2009 (UTC)[reply]
Okay, here's the answer: in your profile folder, in a SQLITE file called webappsstore.sqllite - which is a binary, SQLite formatted data file. Nimur (talk) 07:52, 10 November 2009 (UTC)[reply]
Thanks for doing all of that research. I think I found where IE stores it, too. I used Process Explorer while reloading a test page (http://www.advantage-computer.biz/test.htm) and found that it was writing to the following file: C:\Documents and Settings\[my user name]\Local Settings\Application Data\Microsoft\Internet Explorer\DOMStore\K706A34J\www.advantage-computer[1].xml. It is inside a hidden folder. When I refresh the page in Firefox, it writes 5 KB to the disk. But, when I browse for cookies inside Firefox's Options dialog, nothing from that site is shown. Likewise, the Cookies folder used by IE does not contain the DOM storage object. This lack of control presents some privacy issues, IMO. Thanks again.--Drknkn (talk) 08:24, 10 November 2009 (UTC)[reply]
I was surprised to see that the webappsstore.sqlite file that Firefox 3.5 uses for persistent storage is not cleared or deleted when "clear private data" is performed. This may be a feature, but I think it warrants a bug-report to the Mozilla developers. Nimur (talk) 13:57, 10 November 2009 (UTC)[reply]

Volatile vs Synchronize[edit]

Hi...
What is the difference between volatile and synchronization in JAVA....


This link from IBM might help: Java theory and practice - Managing volatility. "Volatile variables share the visibility features of synchronized, but none of the atomicity features." These are Java's standard ways to guarantee that there is no RAW-hazard (volatile) or WAW-hazard (synchronized). If you need some help with this technojargon, you might want to read about parallel computing - specifically, data hazards. We also have articles on atomicity and synchronization. And as always, I really recommend the official Java Tutorial on Concurrency from Sun Microsystems. Nimur (talk) 14:01, 10 November 2009 (UTC)[reply]

Deleting[edit]

When you delete a program or a file on a computer, on the electrical level, how does this occur?Accdude92 (talk to me!) (sign) 14:31, 10 November 2009 (UTC)[reply]

See File deletion. What happens is something like this. The disk consists of a large number of places where data can be writtem. The file is wriiten into some and the name and index to the place where the file starts and its size is written into a special file called a directory which the operating system can find. When the file is deleted the entry in the directory is removed by marking it as not in use. A pointer to the space that was taken up by the file is placed instead in a free space 'directory' which is bit like a normal directory but doesn't give names for the bits of space. The space will be allocated to another file if needed from thew free list. So normally the contents of the file are left on the disk for a while after deletion except if special action is taken to overwrite the space. Dmcq (talk) 14:51, 10 November 2009 (UTC)[reply]
Since you're asking about the "electrical level", you might want to read about different kinds of persistent storage hardware: Hard disk drive is most common for personal computers and servers, though solid-state drives are also becoming common. Magnetic tape is electrically similar to hard-disk drives but the mechanical layout is different (... it is in tape form, instead of circular-disc form). Other types of nonvolatile storage include NVRAM, optical discs, and you can see many more at Category:Computer storage media. As Dmcq has pointed out, the software will decide what file system changes represent a "file delete" operation; and then it will commit those changes to the hardware (by writing the correct control words to the firmware and the correct data-words to the I/O path). From the purely electrical perspective, there is no difference between a "delete" and a "write" - that distinction is a higher level interpretation of the meaning of many pieces of data that form a file-system. The actual device only knows that it is committing a change to the persistent storage. In most storage forms (specifically HDDs), the control commands will first activate mechanical changes (like a hard-disk motor spinning up and moving its disk head to the correct location; then, they will control the electrical signals that commit the change to the storage medium. (In the case of magnetic disk, this means that symbols will be sent as sequences of electrical currents that are timed to coincide with when the disk head is near the correct location on disk; those currents induce magnetic fields to re-align the magnetic elements on the disc). Each bit can be as simple as a "present" or "not present" (or opposite-direction) electrical current (corresponding to a stored polarity on the magnetic disk); or it may be a symbol-code to reduce the likelihood of incorrect interpretation of the analog data later on. Nimur (talk) 15:42, 10 November 2009 (UTC)[reply]
It is important to note that simply deleting a file will only remove its directory entry, and mark the space the file occupied as freely usable space. The actual contents of the file will stay there, until another file is written in their place. What is really important is, as I've heard, not even this is enough - the digital bits making up the software-land contents of the file are actually physically manifested as analogical electricity charges, with enough of a charge one way meaning "0" and enough of a charge the other way meaning "1". (So sue me, I'm lousy at electronics. But this is the general idea.) Now, in the real, physical analogical world, electricity charges don't switch 100% completely on or off, but usually switch only part of the way, but enough to make the computer realise they're now supposed to be "0" or "1". What this means is, when a bit is overwritten, a trace of the original bit actually stays there, and with some highly technical equipment, it's possible to figure out what the original bit was. Because of this, heavy-duty industry- or military-scale file wiping operations overwrite the file's contents multiple times, each time with different data, to make sure the charges change randomly enough for these traces of bits to become impossible (or at least impractical) to detect. JIP | Talk 18:39, 10 November 2009 (UTC)[reply]
It's actually somewhat controversial as to whether it takes more than one wipe to securely wipe a harddrive—so says this article, anyway. It appears that writing over more than once is just paranoid overkill (which, considering how low the "cost" is, isn't necessarily a bad thing if you REALLY want something deleted). Anyway, just an aside! --Mr.98 (talk) 19:43, 10 November 2009 (UTC)[reply]
There is a (mostly theoretical, I think) possibility that the hard drives' head positioning mechanism doesn't perfectly follow the same circular path each time you reposition it over one of the data tracks on the hard drive. Sometimes it'll be a little bit off to the left - other times a bit off to the right of the idealised centerline. So if you write magnetic data when the head happens to be a bit over to the left - and erase it by writing over it when the head is a bit over to the right - then while maybe 95% of the width of the track will represent the new data - there would be a thin strip that's just 5% of the width that wouldn't have been overwritten - and which would still contain the old data. Clearly, when you read back the data, even if the head is way over to the left again - the head is mostly picking up the new data - and because it's a digital system, the slight variation in magnetic levels due to that thin strip of old data will get ignired when the signal is force to be a 0 or a 1. The theory is that someone with really special equipment could use a really narrow disk head - positioned really carefully over that 5% of old data and read it back...even after you erased it. However, this seems to be more of a theoretical possibility than something people do on a regular basis. It turns out that when people have investigated this, that a lot of people in the disk recovery business believes it can be done - but none of them can actually DO it. So - can some secretive government spy agency do it? Maybe...just maybe. Can anyone else do it? No. It's probably just an urban legend. Certainly there is no routine mechanism to recover data that's actually been physically deleted - you'd have to dismantle the hard drive in a clean-room environment, use multimillion-dollar custom equipment - take days or weeks fiddling with the adjustments. If it's possible at all, it would be a nightmare of a job. So theoretically - you might need to erase the data many times - probably by writing random numbers all over it - to ensure that the disk head has covered the entire width of the track. SteveBaker (talk) 04:30, 11 November 2009 (UTC)[reply]
When you are deciding how to protect your data it is very important to decide who you are protecting it from. If you just want to avoid the next person to use this computer at the public library from stumbling across it, then deleting the pointer is plenty. If you want to avoid opportunistic criminals that buy 2nd hand computers in the hope of finding people's bank details by running off-the-shelf recovery software over the hard-drive, one overwrite is probably wise (personally, I keep computers too long for it to be worth selling them so when I throw them out I just open the hard-drive case and hit the platters a few times with a hammer). If you a criminal trying to avoid the authorities from finding the evidence of your crimes, it is probably worth doing several overwrites just in case they do have clever recovery devices. --Tango (talk) 04:53, 11 November 2009 (UTC)[reply]
PS The same principle applies to encryption. In the first case, just password protecting the file is enough. In the second, you might want to encrypt it using a 64-bit key (or whatever is medium security for the type of cipher you are using) or something. In the final case, you can go the whole hog at use 512-bit encryption just in case they decide to throw a military supercomputer at the problem. If the person you think might want to read your files doesn't have access to a military supercomputer, then long keys are completely unnecessary. --Tango (talk) 04:56, 11 November 2009 (UTC)[reply]

Copying a user's settings[edit]

Due to a very stubborn infection of malware which resisted many attempts at removal, I was recently forced to reinstall Windows XP Professional on my sister's family PC. It was a significant hassle (several hours work) to backup all the documents, photos, music, email; then reinstall everything and configure the 6 users required by the large family. One thing that could have save quite a while, would be to configure one user then copy that one to the 5 others. Unfortunately, the user settings are not in one place but are spread over several folders and many places in the registry. Is there a program (preferably free - as in free beer) that will copy one Windows user's complete settings to another? Astronaut (talk) 16:50, 10 November 2009 (UTC)[reply]

This isn't what you're asking for, but one tip: Once you've got it set up, use Norton Ghost or Clonezilla or a similar program to make an image file of the hard disk. Next time they download and install malware, it'll be a lot faster for you to hit the reset button, so to speak. Comet Tuttle (talk) 17:54, 10 November 2009 (UTC)[reply]
Thanks, but I've already done that - only after I set up all six users. Astronaut (talk) 14:58, 11 November 2009 (UTC)[reply]

Madriva XP dual boot and compatibility question[edit]

On my WinXP Pro machine I would like to install Mandriva additionally. The machine is rather old with SDRAM and IDE HDD. I have downloaded mandriva-linux-one-2009.1-KDE4-europe1-americas-cdrom-i586.iso. I don't know how to go about with the installation. Can I boot from CD ROM (ISO burnt on a CD ROM) and install and then add a bootloader? --Wanttolook (talk) 18:20, 10 November 2009 (UTC)[reply]

I don't know about Mandriva, but in principle, yes, that is the process. Probably a bit easier if you use a Live CD (such as Ubuntu) as a base, in which case you can try out the system (and make sure it works with your particular hardware) before committing. Your Mandriva image might well be a live CD, I don't know. I believe most modern Linux distros are fairly clever at realising that there's Windows co-existing on the system and help with the necessary setup to make it dual-boot. It's been five years since I've done this the last time.195.128.251.41 (talk) 23:24, 10 November 2009 (UTC)[reply]

Does Microsoft have a record for every Windows computer on earth?[edit]

This is implied by each MS operating system instalation having a unique product key. How much memory would this require? 89.243.191.11 (talk) 19:53, 10 November 2009 (UTC)[reply]

well, the Microsoft product keys are (at least they were for XP), five clusters of five characters each. Using A-Z, 0-9, that gives you quite a lot of possible keys. But a database that contained keys that had been already registered (that is, did not contain all possible keys), would only have to be as large as the total number of registered computers, not all possible keys. (You enforce the product key by checking if another is already registered with that key.) For a physical card file, this would be a daunting task. For a computer database, it is not very tough. How many copies of Windows are there out in the world? My guess for all versions is between 200-400 million, but that is just a guess. --Mr.98 (talk) 20:29, 10 November 2009 (UTC)[reply]
Actually, the number is much larger (at least 1.5112 x 1025). The number of possible keys can be obtained like this using permutations:
26 letters + 10 numbers = 36 characters
25 characters in a serial number
25P36 = 25 x 24 x 23 x 22 ... 1
Which equals 15,511,210,043,331,000,000,000,000. Since each character is a byte, this equates to billions of terabytes.--Drknkn (talk) 20:59, 10 November 2009 (UTC)[reply]
Actually, it would be 3625 because each character can be used multiple times, so that would be 80,828,127,746,476,406,064,313,960,045,654,000,000 --omnipotence407 (talk) 22:26, 10 November 2009 (UTC)[reply]
That's if the imaginary database contained all possible keys. The number we need to find is how many units of Windows OS that Microsoft has sold, and multiply that by the memory that an individual key uses. Tan | 39 21:09, 10 November 2009 (UTC)[reply]
And the total number of acceptable keys is probably much smaller than the total possibility anyway—they are probably generated using some sort of algorithm that can be easily re-run for verification before it ever tries to contact the Microsoft servers about any given key. --Mr.98 (talk) 22:28, 10 November 2009 (UTC)[reply]
Indeed I was about to make the same point. Those aren't even all possible keys. Trying entering a random key into Windows when installing. It almost definitely won't work... Windows has an internal algorithm for validating a key, as does every single application I know of that accepts some sort of serial number (that's one of the points). Key generators often exist which generate valid keys which will be accepted by the application usually made I presume either by cracking the applications internal algorithm or more likely I think by disassembling it and working out how it works. (These may not of course every possible valid key but simply a subset.) Sometimes it may even be documented by someone interested in such things so you don't need to go to such lengths yourself to work out the real number of possible keys. However even this list contains many more keys then would be necessary. For example, it isn't uncommon that companies will change their internal algorithm so that keys that were formerly accepted will no longer be but all valid old keys will be (I'm not talking about a blacklist of certain keys although it's possible if the key generator didn't generate all possible keys but a subset the blacklist may be against all keys generated with this method.) In fact, IIRC this happened with Windows XP. Bear in mind we're talking entirely of things which happen at the application leve here without any reliance on an external server Nil Einne (talk) 06:59, 14 November 2009 (UTC)[reply]
No. —Preceding unsigned comment added by 82.43.89.85 (talk) 20:31, 10 November 2009 (UTC)[reply]
Then what's your answer? Are you just trolling? Tan | 39 20:35, 10 November 2009 (UTC)[reply]
Learn the definition of trolling for starters. As for an answer, "no" is correct. Microsoft does not have a record for every Windows computer on earth. If I have a windows install disk, I could install it on any number of computers without microsoft knowing (espcally older versions or computers without net access). Now add to that piracy (lets say I downloaded my install disk from the net). It is impossible that microsoft would have a record of EVERY windows computer unless they literally scanned every square inch of the earth with some windows detector. Does that satisfy you? —Preceding unsigned comment added by 82.43.89.85 (talk) 22:18, 10 November 2009 (UTC)[reply]
What's your problem? If you want to give helpful answers, then do that. If you don't, just go somewhere else. Nobody's forcing you to participate. In any case, my understanding is that on OSes from XP onwards at the very least, Microsoft uses all sorts of software "phone homing" whenever you need to update the OS and other things of that nature which require a valid key. There were, last time I checked, ways to circumvent that. But it doesn't negate that Microsoft does have a very substantial key database. --Mr.98 (talk) 22:28, 10 November 2009 (UTC)[reply]
What are you talking about? How is my answer not helpful? OP asked "Does Microsoft have a record for every Windows computer on earth?"[1] and I answered "no"[2] to which I was accused of trolling[3], and in response I rebuked the accusation of trolling and expanded upon my answer[4]. In addition to the question, the OP clearly states "every Windows computer on earth", which in my mind includes everything from Windows 1.0 to the present day. —Preceding unsigned comment added by 82.43.89.85 (talk) 22:35, 10 November 2009 (UTC)[reply]
"No" is not an answer when there are at least two questions, and it is not helpful, especially when you are determined to take the OP's question to mean something rather impractical. Then getting snippy when other people ask you why you are bothering to post it doesn't help much either. Anyway, if you want to contribute, please do. But don't be difficult just for its own sake. It doesn't help and you're wasting your own time as much as anyone else's. --Mr.98 (talk) 01:22, 11 November 2009 (UTC)[reply]
I took the OPs question at face value, the way it was asked. I'm not going to guess at what the OP might have meant, I simply answered the question which was asked, however impractical the question might have been. How is that time wasting? As for "getting snippy", I think I've got the right to be a bit put out by someone calling my correct answer "trolling". Anyway, none of this meta discussion is actually helpful to the OP, so can we please stop it now?
This is the Reference Desk. You are supposed to supply references. One-word answers with no further information for the OP do not belong on the Reference Desk. Answers that seem logical to you but have no references are only slightly better. Comet Tuttle (talk) 01:25, 11 November 2009 (UTC)[reply]
References are only really needed for controversial claims, which mine wasn't.
I think a dose of Wikipedia:Assume good faith would help here... Mitch Ames (talk) 10:08, 11 November 2009 (UTC)[reply]
"No." --Mr.98 (talk) 14:29, 11 November 2009 (UTC)[reply]
I'm afraid that each Windows installation doesn't necessarily have a unique key though. Businesses with a Volume license key have a single product key for potentially thousands of desktop machines (and that's not including any pirate copies that will have the product key from another machine). ZX81 talk 22:31, 10 November 2009 (UTC)[reply]
That's true, and reduces the total database size even more. --Mr.98 (talk) 01:22, 11 November 2009 (UTC)[reply]
The previous answer ("No") isn't very useful - but it's obviously correct. It's simply impossible for Microsoft to have caught every single Windows-based computer's serial number - for not one single one to have slipped through the cracks in 25 years! Not least because in the days of Windows 1,2 and 3 - there was no Internet access for the overwhelming proportion of PC's. The amount of memory is rather trivial though. Let's get silly and suppose that every person on Earth has had 10 Windows-based PC's each. That's 60 billion machines. If it took a thousand bytes to store each record - with no compression or anything, that's 60Tbyte. You could store that quite easily on a single computer with a decent RAID array of a dozen 1Tbyte hard drives. That's just nothing to a company like Microsoft. SteveBaker (talk) 04:05, 11 November 2009 (UTC)[reply]
How do you store 60TB of data on a dozen 1TB drives? --Tango (talk) 04:17, 11 November 2009 (UTC)[reply]
Hmmm... are we missing an article Programmer's dozen here? Jørgen (talk) 11:00, 11 November 2009 (UTC)[reply]

I was last interested in Microsoftware about six years ago. Back then, its CDs came with very elaborate keys that you had to type in to get the software to install. Sometimes I'd remember to take the CD with me but forget the key. I'd then look around on the web and download the same very short PDF file that had a small number of keys for each fairly recent MS product; more often than not, the first of these keys would work. Things could be different now though. -- Hoary (talk) 14:45, 11 November 2009 (UTC)[reply]

Star Trek TOS, film quality, and HD re-release[edit]

I'd like to know if rereleasing the original series in HD would actually be any better quality than the DVD versions already out there. Is the condition of the original film reels good enough to support HD? Or are we essentially getting an HD-sized copy of the DVD image quality? Thank you! 61.189.63.142 (talk) 22:31, 10 November 2009 (UTC)[reply]

It is possible digitally to enhance the image quality, and save the result as a HD movie. --Andreas Rejbrand (talk) 22:36, 10 November 2009 (UTC)[reply]
But if the original resolution is low, it won't really be HD, and it wouldn't look nearly as good as actual HD. --Mr.98 (talk) 01:04, 11 November 2009 (UTC)[reply]
I thought TOS was shot on film, in which case an HD version would look far better, if the film was ever located and cleaned up. And, of course, if they used that as the source material for the Blu-Ray version. Comet Tuttle (talk) 01:22, 11 November 2009 (UTC)[reply]
As you can see here - StarTrek TOS was filmed on excellent quality 35mm EASTMAN stock - they were filming on tripods in studio lighting - so we may assume the quality was pretty good. This site says you can expect to get between 12 and 20 megapixels out of a frame of decently shot 35mm film. 1080p HDTV is 1920×1080 pixels - 2 megapixels. So even without processing, the original 35mm film has plenty of resolution to make crisp HDTV images. The film stock from even the earliest shows dates from maybe 1964 - it's only 45 years old - that's not ancient by cine film standards.
None of this guarantees that the quality of the HD version will be better than the regular DVD's because sometimes companies don't do a good job. But there is no fundamental technological barrier to them being vastly better if the company who did the conversion did a diligent job. SteveBaker (talk) 03:41, 11 November 2009 (UTC)[reply]
I have the first season of TOS on Blu-Ray, and I can tell you it looks far better than any previous release of the series I've seen, including on TV. They did an amazing job cleaning up the series. I highly recommend it if you are considering it (or even if you aren't). ···日本穣? · 投稿 · Talk to Nihonjoe 05:40, 11 November 2009 (UTC)[reply]
I agree with 日本穣—they did a fine job on the Blu-rays, and Steve's technical explanation is correct. After buying Season 1, I also bought Season 2 and pre-ordered Season 3. The picture is much sharper than, for example, DS9 on DVD. Bear in mind that you're getting a very good picture of a show from the 1960s, with less technology and a smaller budget than modern series. That means that the picture is sharp enough to see the cheapness of the sets, the seam in Spock's ears, etc. You will see that they weren't always precise with the camera focus or didn't always have enough depth of field, and the style at the time was to shoot women in soft focus. Occasionally you can tell that the film has deteriorated more than usual, or the exposure was off when shot. But as long as you understand these limitations, you'll find that the Blu-rays look much better than the series ever has before. (BTW, I'm also impressed with the Blu-ray release of The Prisoner.) -- Coneslayer (talk) 15:53, 12 November 2009 (UTC)[reply]