Wikipedia:Reference desk/Archives/Computing/2007 February 25

From Wikipedia, the free encyclopedia
Computing desk
< February 24 << Jan | February | Mar >> February 26 >
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.


February 25[edit]

md5[edit]

Is it possible to reconstruct the original file from an md5 hash? I don't really completely understand how md5 works, only that it gives a unique id to every file and can be used to verify files. Is it a two way process? Thanks!--Ryan 00:00, 25 February 2007 (UTC)[reply]

No, it is not a 2 way process. It is mainly for that very reason that it is used for hashing (generating unique values for a file or sequence of bytes). It's extremely difficult (to the point of being worthless to attempt) to go backwards. The situation is slightly different for passwords. A lot of websites and security systems in general use md5 as a way of storing passwords so that even if the hashed or encrypted password is found out, it is difficult to establish the real password from it. However, due to the fact that many people don't use strong, secure passwords, databases of md5 hash versions of common passwords exist, so by 'brute force' it is possible to find the unencrypted form of a hash fairly rapidly. Johnnykimble 00:28, 25 February 2007 (UTC)[reply]
What you describe is a rainbow table attack, but yeah brute forcing md5 is pretty easy. Use SHA for your secure hashing --frothT 02:09, 25 February 2007 (UTC)[reply]
I think rainbow tables are used to reduce compute time when cracking hashes like NTLM. You can make memory / time tradeoffs. *nix often uses salts, so that two *identical* passwords don't map to the same hash. With linux, you often have a choice of different algorithms to use. I use the default, since my firewall blocks most everything anyway. If someone got onto my machine, they probably have a priv escalation exploit, and don't need to crack passes. The passes are in /etc/shadow not /etc/ passwd, and that file requires admin to look at.172.146.58.73 09:55, 26 February 2007 (UTC)[reply]
Definitively not! The very definition of a one-way hash is that it's, well, one-way. To prove this to yourself, consider that while the 128-bit MD5 hash can only take on 2128 different values, you can compute the MD5 hash for at least 2128 + 1 different input files, so at least one of those hashes must be the same for 2 different inputs. So there's no way of knowing which input file to reconstruct. See pigeonhole principle. It's worse than I've stated here, since you can of course compute the hash for an infinite number of input files, while the number of hashed outputs holds steady at 2128. --TotoBaggins 00:32, 25 February 2007 (UTC)
If a hash is truly one way, then brute force is the only way to attack it. With block and PK ciphers (and likely hashes), there are sometimes alternative routes to brute force. For instance, 3DES2 (2 key triple DES) and 3DES3 (3 key triple DES) both have effective key lengths of 112 bits. This is because one of the variants has an MITM attack. With ciphers like RSA / ECC / knapsack, there are mathematical routes (e.g. factorization) that should be faster than brute force, since 90 bits and up takes a lot of compute power. Some attacks are mostly theoretically, you hear about ones that requires 2^40 chosen plaintext, which seems unlikely to happen in the real world.172.146.58.73 09:55, 26 February 2007 (UTC)[reply]
If you need something that can reconstruct files, try parchive, which is seen on Usenet all the time for multi-file archives. --Wirbelwindヴィルヴェルヴィント (talk) 05:38, 25 February 2007 (UTC)[reply]
The original file can almost never be reconstructed from a shorter file like a hash. The hash length is a few hundred bits, while the file length is potentially gigabytes. This is Information Theory 101, and it's the same reason there are fundamental limits on compression. For instance, you could map the input value 01 to the output value 1. But you run into trouble if you try to map 00, 01, 10, and 11 to *unique* one bit values. A cryptographic hash is used for security, although a side benefit is general file integrity. Checksums work fine for integrity (e.g. parity bits), but MD5 style hashes are one way, meaning it's hard for an attacker to generate a trojanized executable (e.g. Windows PE format) that has the same hash as the legitimate executable. You can think of MD5 as being loosely related to ciphers like DES, because both use trapdoor functions which are easy to compute in one direction, and intractable in the other direction. So people make a big deal out of hash collisions, but i've yet to see someone construct a trojan utility that has the same hash as its legit counterpart.

Google Answers?[edit]

What are some other websites like Google Answers? Also, do any researchers have their own service?

There's yahoo! answers, though you have to take a lot of the answers with a grain of salt. Corvus cornix 03:15, 25 February 2007 (UTC)[reply]
You might also want to look through howstuffworks. Corvus cornix 03:17, 25 February 2007 (UTC)[reply]
I read in the news recently that the Charleston County Public Library reference department takes questions through IM. I'm sure that it will be temporary because they will quickly be overrun by too many stupid questions. --Kainaw (talk) 03:23, 25 February 2007 (UTC)[reply]
The Wikipedia Reference Desk, or Experts Exchange. Splintercellguy 04:14, 25 February 2007 (UTC)[reply]
Google Answers#Alternatives to Google Answers. --Teratornis 06:30, 26 February 2007 (UTC)[reply]


I saw quite a few bad answers on Google answers. Yahoo has some misinformation too, but at least you aren't paying $5 a question. If you are willing to pay (say $20 an hour), you might try a site that hooks you up with a consultant / freelancer. Sometimes a specialized site is best. If you want to mod a Commodore 128, the vintage computer forums / newsgroups are much better than a general computing site.172.146.58.73 10:13, 26 February 2007 (UTC)[reply]

USB Flash Drive - Cannot Access Files[edit]

I use a flash drive to store files from Quick Books. The last time I updated my files I was able to save to the flash drive without any problems. When I try to access my files today, I am getting this error "Quickbooks was unable to create the image file. The disk could be full or you may not have sufficient rights to the data directory.".

I am able to use a different flash drive that has other QuickBooks files on the same computer without any problems. I also tried using the corrupted flash drive on a different computer and I receive the same error. So, I have to think it is a problem with the flash drive itself, and not the computer.

Is my flash drive corrupt? Is there something I can do to fix it without losing the data stored on the drive?

Thanks!

Try opening the flash drive from the "My Computer" option from the "start" button (usually on the lower left). If it won't open, it is a corrupt flash drive. If it does open, then it is more likely that the drive is full. Quickbooks makes a temp file when you open a Quickbooks file. If the flash drive is full, there's no room for the temp file. --Kainaw (talk) 03:21, 25 February 2007 (UTC)[reply]

Not sure if this is the problem in your case, but the weight of a pen drive can cause it to "sag" and lose connection. This usually shows up as no flash drive listed as attached. You can test for this by supporting it's weight with your hand (holding it completely horizontal). If this fixes the problem, then the permanent solution is to get a short USB connection cable which will allow the flash drive to rest on the table without putting strain on the connection. StuRat 05:42, 28 February 2007 (UTC)[reply]

How do I deal with halftone artifacts?[edit]

I scanned a painting (reproduced at a pretty small scale) from a book at 400 DPI, and it's come out with this repeating halftone pattern on it. Is there any way to deal with that? Using a "despeckle" filter gets rid of the detail and makes it look mushy. I have a lot of paintings to scan from this book, so any sort of specialty tool would be much appreciated. grendel|khan 03:30, 25 February 2007 (UTC)[reply]

Do you mean moiré pattern? I think Photoshop can correct it. Splintercellguy 04:14, 25 February 2007 (UTC)[reply]
Ah, I was looking for a descreening filter, but I think scanning any printed matter at 400 DPI is a fool's errand. I reduced it by half, which still gave me 200 DPI, and it looks quite acceptable now. (See Image:Opitz-Dedication of a Synagogue in Alsace-1820.jpg.) grendel|khan 05:06, 25 February 2007 (UTC)[reply]

Google[edit]

I heard the Google will professionally search for a keyword that you choose, but, it costs money. Does anyone know the name of the service? 68.193.147.179 03:49, 25 February 2007 (UTC)[reply]

It was called Google Answers, and it's inactive now. There are some alternatives that might prove useful to you. grendel|khan 04:28, 25 February 2007 (UTC)[reply]
Does ChaCha fit in that list? Pomte 12:05, 25 February 2007 (UTC)[reply]

PDF problem[edit]

I'm trying to compile a TeX file to PDF. Every time I open the PDF, at some point in the file it give me an error message "Too few operands in path", and shows a blank page. How could I solve this problem? deeptrivia (talk) 04:55, 25 February 2007 (UTC)[reply]

When asking technical questions it's important to include details like what software you're using. A minimal example exhibiting the problem would be helpful, too. In your case, a small TeX input that causes the problem, and the names of the TeX -> PDF converter and the PDF viewer you're using would give someone a chance to help you. --TotoBaggins 05:13, 25 February 2007 (UTC)
This is a general pdf problem and happens with Adobe acrobat reader. I doubt it has anything to do with the TeX compiler. Hopefully someone has experience on how to deal with this. deeptrivia (talk) 06:33, 25 February 2007 (UTC)[reply]
Have you tried it in a different PDF viewer, like Xpdf or KPDF? --h2g2bob 19:06, 25 February 2007 (UTC)[reply]

Updating a JTable with new information (Java)[edit]

I am rather stuck on a part of my program; I am trying to add another row within a JTable, however I can't get the component to update. I have already traced through the debugger (I am using Eclipse), and I am positive that the book is successfully added to the ArrayList, and I am positive the method that adds the data to the two dimensional array used for the data works (it displays initially). I have tried everything that comes to mind, but nothing works. The code that I am trying to use to update the JTable is as follows:

public static void redrawDataTable() {
		//jtblData = null;
		jtblData = new JTable(setJTableData(),colNames);
		JScrollPane jscrpane = new JScrollPane(jtblData);
		disp.add(jscrpane);
		//jtblData.updateUI();
		jtblData.repaint();
		jtblData.setVisible(true);
		disp.setVisible(true);
	}

Since I don't think I (or anyone, for that matter) could debug code without seeing everything in context, I went ahead and put the classes from the Java program on the web here. Any assistance on this confusing conundrum would be greatly appreciated. Kyra~(talk) 05:14, 25 February 2007 (UTC)[reply]

It seems a bit odd that you'd be creating a new JTable every time you redraw the object. The usual way to add a row is to perform some action on the backing TableModel. I'll have a look at your code. grendel|khan 05:58, 25 February 2007 (UTC)[reply]
Okay, I see that you're filling the JTable with a new String[][] every time you want to update it. If you want some other method in the HoldingDisplay class (or elsewhere) to be able to add new rows to the JTable, you're going to have to create a backing TableModel. For what you're doing, you may want to use a simple DefaultTableModel, which supports adding and deleting rows via the addRow and removeRow methods. And lucky for you, DefaultTableModel has a constructor that takes an Object[][] for the data and an Object[] for the column names, which is pretty much what you're starting with. So then, to update the table, you're just going to update its model, instead of recreating the whole table. The Java Tutorial touches on that here. Does that make sense? grendel|khan 06:07, 25 February 2007 (UTC)[reply]
The irony is that given this explanation I can explain the problem without seeing the other code after all. When you add a new component to a Container, it is by default added at the bottom of the Z-order. So all your later additions are behind the first one you put in! Of course, the real solution (as grendelkhan provided) is unrelated to this point, but I think the diagnosis is also interesting. --Tardis 03:46, 26 February 2007 (UTC)[reply]

.wmv and .mpg files play with no sound[edit]

Recently, I downloaded some AVI files from the site www.thisisthusfl.com. Windows Media Player said I didn't have the codec for the files, so I downloaded some codec package from some website (forgot which). With the codecs installed, the AVI players would play, but some of my WMV and MPG started playing without sound. I uninstalled the codec package, but the files still played without sound. I tried upgrading to Media Player 11, but that did not help. Strangely, one of the files plays with sound in RealPlayer but not with Windows Media Player, while some files play with sound in neither and some with sound in both. Any idea what is going on? -- Mwalcoff 08:04, 25 February 2007 (UTC)[reply]

Get VLC Player. --antilivedT | C | G 08:05, 25 February 2007 (UTC)[reply]
Which codec pack? Most of them are counter-productive in the sense that it messes up what used to work, at least from experience. Combined Community Codec Pack doesn't though, if you want to give that a try and let that decode everything. --Wirbelwindヴィルヴェルヴィント (talk) 08:56, 25 February 2007 (UTC)[reply]
I checked this clip (cached link so you won't overload the server). VLC says the codecs are "cvid" (Cinepack video) and "araw", which is WAVE audio. WAVE is the most basic audio ever made, and should be supported by everything. It plays fine in VLC (but then everything always does :-). By the way, don't download codecs from random websites - codecs can contain viruses and other malware. In fact, there is a trick where videos say they need a special codec and point you to a website where you download the codec with malware in it. This doesn't apply here, but just to warn y'all. --h2g2bob 19:01, 25 February 2007 (UTC)[reply]
Yes, I realize I made a very stupid mistake by downloading a codec from a random website. Unfortunately, I didn't write down the site or name of the codec. I will try the VLC player. Thanks -- Mwalcoff 21:32, 25 February 2007 (UTC)[reply]
The Combined Community Codec Pack is pretty good. It uses ffdshow show for most things, which is what VLC uses, though it apparently has somewhat better compatibility in some cases. Other codec packs tend to be iffy, unchecked, closed-source, and with many illegally distributed components. -- Consumed Crustacean (talk) 17:42, 26 February 2007 (UTC)[reply]
VLC uses libavcodec, which is also used by ffdshow. ffdshow is just a directshow splitter, it doesn't actually do any processing --frothT 21:12, 26 February 2007 (UTC)[reply]
Agh, d'oh. I keep messing up ffdshow, FFmpeg, and all that. ffdshow is good on its own as well, though the CCCP includes extra codecs where it/libavcodec fail. -- Consumed Crustacean (talk) 23:14, 26 February 2007 (UTC)[reply]

ATI Radeon X1600[edit]

How powerful is this graphics card? Specifically, I would like to know technical specifications like core clock speed, support or Pixel Shader 3, and so on. Thanks a lot!--Ryan 20:03, 25 February 2007 (UTC)[reply]

Did you try the ATI site? --Wirbelwindヴィルヴェルヴィント (talk) 20:44, 25 February 2007 (UTC)[reply]
Yes. They give good info, but i'm looking for an unbiased review (not marketing!).
Try our own article: ATI Radeon X1600. --cesarb 01:57, 26 February 2007 (UTC)[reply]

Computer System[edit]

I am looking to buy a really good computer system, any suggestions? 68.193.147.179 23:19, 25 February 2007 (UTC)[reply]

I'm kind of a Mac fanboy, but the iMac is a great computer. Fast, and runs Mac os X. Great for anyone from a beginner (easy to use) to a power user(Unix Core).
It all depends what you want it for. See my comparison of OSs. --h2g2bob 00:40, 26 February 2007 (UTC)[reply]
"Good" is subjective. Do you want to use it for gaming? Build it yourself or find someone who can't rip you off like a major OEM will. Do you want to use it for word processing? Buy a $100 computer from a second hand store and use it for that. Using it for multimedia but not gaming? You may want to buy from Dell or another OEM. There is no "good computer system", just as asking "I want to buy a good car" is a meaningless question without any context. -Wooty Woot? contribs 01:29, 26 February 2007 (UTC)[reply]
There are no computers today which anyone will likely think are "really good" ten years from now, thanks to Moore's Law. Not even three years from now. Since I tend to look ahead to the future computers that will make all present computers a joke, it's hard for me to think of any present computers as "really good." --Teratornis 05:58, 26 February 2007 (UTC)[reply]
As Wooty states, a computer is a tool. A really good tool is one which gets the job done. So, what's the job? For my job, Windows and Macs are both terrible. For my job, I need Unix/Linux machines with tons and tons and tons of RAM and more processing power than is possible to cram into a desktop box. But, I have absolutely no use for 3D graphics, surround sound, DVD players, CD burners, tons of USB ports, special blue lighting around the case... --Kainaw (talk) 06:06, 26 February 2007 (UTC)[reply]
I looked on wikiHow for maybe some actually useful advice, but How to Buy a New Computer is too short, and kind of unimpressive. At least it's free. --Teratornis 06:25, 26 February 2007 (UTC)[reply]

This Article lists some really good computers. -Arch dude 21:33, 27 February 2007 (UTC)[reply]

If it is cost no object, I'd get a custom built machine or maxed out Voodoo/Alienware/whatever. I'd have several external drives, a hard drive selector for SATA and PATA, an external patchbay, and about 100 operating systems. I guess my point is that you need to decide what you want to do with the machine, then purchase hardware made for that. If you are cracking ciphers, you need a fast CPU. If you are collecting porn movies, you need a big hard drive.172.146.58.73 09:21, 26 February 2007 (UTC)[reply]
A maxed out "high-end PC" like that often has a big premium over simply building it yourself, among problems. I'd never suggest purchasing a high end computer from a manufacturer. Low or lower-mid, fine, but nothing else. The obvious exceptions are laptops, businesses and other bulk purchases, etc. -- Consumed Crustacean (talk) 17:59, 26 February 2007 (UTC)[reply]
Build an uber pc similar to what 172 is suggesting, but don't get any kind of botique product like alienware. Get a couple of nVidia SLI cards, of of them fancy PhysX cards, a few terabytes of RAID01 mirrored 3 or 4 times. Get yourself an array of 5 or 6 monitors. Ooh and grab a couple of Montecitos and a ton of memory --frothT 18:41, 26 February 2007 (UTC)[reply]

You can usually customize a high-end PC for a lot cheaper through smaller companies; my favorite has been CyberPower PC; my last 2 computers were through them, I'll be getting another one later this year from them, and a couple friends have also bought repeatedly from them. They offer more choices for customization than any other site I've seen. I'm trying to customize a high-end video editing system (Q6600 quad-core processor, 2GB PC6400 DDR2/800 RAM, ATI X1950, WD740ADFD boot drive plus a large storage drive), and it comes out to about $2600 through them, while it's nearly $4000 through Dell and almost $5000 through Alienware. — BRIAN0918 • 2007-02-26 18:54Z

A lot of computer stores will do this. Try to locate one if your own city; it makes it far easier to return things should they go screwy. I'd still suggest buying components and installing them individually; it gets you the things immediately, and can save you ~$100-200 labour as well as the savings you get from being able to shop around for the individual parts. I've seen how some of computer technicians in the shops around here work (lazily, too quickly), and it doesn't give me great confidence. -- Consumed Crustacean (talk) 19:05, 26 February 2007 (UTC)[reply]

How to make a template?[edit]

I was wondering how to make a verticle template that appears on the righthand side of the article like {{Disneyparkinfo}}. I know how to make a horizontal template that appears across the bottom like {{Epcot attractions}}. Can you help me? WDWbuff 23:24, 25 February 2007 (UTC)[reply]

Just take a look at a few and copy the code. Go to the Template:Disneyparkinfo and Template:Epcot attractions for example. See Help:Template for full details. --h2g2bob 00:37, 26 February 2007 (UTC)[reply]