Wikipedia:Reference desk/Archives/Computing/2010 April 2

= April 2 =

ripping from cd
Hi I'm a musician and I want to distribute my music to fans using cd. This is my first album and I am giving it for free for promotional purpose. I want to make it so people can rip from the cd, and put the music onto their ipods/mp3 players. But the problem is that when they rip it to a mp3 file, the tags won't show up. It will just say "Track 01" and "Track 02" etc. The album art won't come up either. I understand there's a online database where users can find tags, but since I am not popular, I am not listed in the database. How should I solve the problem? Should I just burn mp3 files onto the cd's? (but then it might not play in some cd players)--75.185.120.28 (talk) 01:17, 2 April 2010 (UTC)
 * CD-Text should help with the metadata issue (if not the album art). Paul (Stansifer) 02:23, 2 April 2010 (UTC)


 * I believe you can submit a track listing to freedb/CDDB which some CD rippers use to get track listings into the MP3 tags. The ripper I use permits the user to upload manually entered track listings to freedb; if you did that first, your fans rippers would then be able to get the same listing when they rip your CD.
 * I also know in Windows Media Player users can simply drop an image into the appropriate place to attach album art to an album, but I've no idea how that works automatically (when WMP gets the art automatically). Astronaut (talk) 17:02, 2 April 2010 (UTC)

Saving files in Firefox
Is there an add-on or something that would allow me to save a file downloaded from firefox to a folder of my choosing, as opposed to just the default folder? —Preceding unsigned comment added by 86.177.125.64 (talk) 02:03, 2 April 2010 (UTC)


 * Go to Tools->Options->General, and select the option to "Always ask me where to save files". &mdash;ShadowRanger (talk 02:19, 2 April 2010 (UTC)

Are these download sites legit?
http://rapidlibrary.com/ http://download-gate.com/ http://filestreasury.com/

I've never signed up to be a member of any of these kinds of sites before. They require a one-time payment after which you can download many of their files. So they ask for your master/credit card info during registration. But are they legit? Can they be trusted? If one turns out to be a scam, then is it possible for them to steal your money from your account (because you provided your master/credit card info? —Preceding unsigned comment added by 70.68.120.162 (talk) 04:32, 2 April 2010 (UTC)
 * The first one is just an index of files on RapidShare. The other ones not sure. --169.232.246.143 (talk) 05:47, 2 April 2010 (UTC)

According to WOT, the first one's okay, but the other two are the ones you should stay the hell away from. 24.189.90.68 (talk) 07:13, 2 April 2010 (UTC)


 * Of course, by "okay" and "legit", I assume you people are joking. They are software piracy sites, and you don't at all know whether what you're downloading is infected with malware or not.  And of course it's illegal.  Comet Tuttle (talk) 14:10, 2 April 2010 (UTC)
 * First, we are not able to give legal advice. Second, hosting files, and especially hosting links to metadata about files is not necessarily illegal.  Copyright infringement is illegal (in most places); when hosting a file is part of the act of copyright infringement, then hosting the file may be a separate illegal act in addition to the copyright infringement charge; but when you equate file-sharing and copyright-infringement, you are falling prey to a wide-spread half-truth.  Nimur (talk) 15:05, 2 April 2010 (UTC)


 * I haven't heard of download-gate or filestreasury but I have heard of rapidlibrary. Like 169.232 says, rapidlibrary is simply an index of files on RapidShare, but I've never seen a need (or even a sign-up page) to become a member of rapidlibrary.  Rapidshare does allow free downloads (limited in speed and bandwidth usage, and with annoying ads for their paid service and waits to download, but not so much for me to tell them my credit-card number).  File sharing sites like this will probably claim they exist simply to let people share their stuff, and they might even have a "no copyright infringement" policy, but it appears not to be actively policed (ie. they promise to take down content if someone makes a complaint but they don't search out and delete stuff that might infringe copyrights).  That said, most of the stuff I've seen there has been copied from somewhere.  So, it depends what you download, but it is probably safe to assume it will be infringing somebody's copyright.  Is it safe to give them your credit card? - I wouldn't.  Is the service legal? - I think it's dubious at best.  Is the data you download legal? - I would assume it isn't.  Is the data free of malware and viruses? - I would assume not until virus scanned (and even then be cautious).  Astronaut (talk) 16:52, 2 April 2010 (UTC)


 * My experience with these kinds of sites is that they 1. index other download sites like Rapidshare, 2. index torrent results, and 3. often pretend to have files that they don't in order to get you to sign up. Usually if you can find something on these sites, you can find it elsewhere on Google for free. (This does not constitute legal advice!) The sites are usually rip-offs of one degree or another (really rip-offs layered on rip-offs in a way—they prey on people looking to pirate but who don't know how to use torrents or newsgroups or rapidshare). --Mr.98 (talk) 00:46, 3 April 2010 (UTC)

Using the Statistical Test Suite from NIST
Hello, I am trying to use the statistical test suite developed by NIST to check a given binary sequence for randomness. My questions is that how to adopt the package to Windows. I am running Windows XP with SP2 and I would like to use the tiny c compiler (TCC) to build this whole suite and then run in on some files that I have. The instructions say that inside the suite there is a file called "makefile" where the first few lines are

CC = /usr/bin/gcc

GCCFLAGS = -c -Wall

ROOTDIR =.

SRCDIR = $(ROOTDIR)/src

OBJDIR = $(ROOTDIR)/obj

VPATH = src:obj:include

and I have to change the first line and the third line. My question is that I want to use TCC, then what would I write on the first line? This gcc command is obviously for Linux. How/what do I change here to make it work? Is there another compiler which would work better here? If yes, then which one? And also do I just leave that period on the third line or is there an actual directory that needs to be there? Thanks! -Looking for Wisdom and Insight! (talk) 06:13, 2 April 2010 (UTC)


 * If you install cygwin you'll get windows versions of both gcc and make. Then compilation should be just a matter of running make in the source directory. gcc is a lot better compiler than tcc if compilation time doesn't matter (it shouldn't). --91.145.72.188 (talk) 10:08, 2 April 2010 (UTC)


 * If you do insist on using TCC, you should carefully read the TCC Compiler Reference to check for compatibility issues; especially take a look at the TCC support for Gnu C extensions, as well as ISO and ANSI-C compatibility. Often, switching compilers wreaks havoc with source-code, libraries, and linkers; sometimes just swapping the Makefile compiler binary is not sufficient to build the entire project.  Nimur (talk) 15:09, 2 April 2010 (UTC)


 * MinGW is another option if you want to run the GNU compilers under Windows but don't want all the other baggage which comes with cygwin.  Zoonoses (talk) 04:35, 4 April 2010 (UTC)

Free Flash Clone
Hello. I know there exists a 'clone' for Adobe Photo shop (Gimp), which is freeware and has most of the functions of commercial Photo shop. I was wondering if anyone knew a similar 'clone' for Adobe Flash? Any suggestions would be welcome, no matter how primitive the software. Cheers. Cuban Cigar (talk) 07:19, 2 April 2010 (UTC)


 * Are you referring to Adobe Flash Professional? There is a very powerful flash-authoring tool called SWiSH: . It is only $150 for the full version, which is significantly cheaper than Flash Professional ($699). It has some features not found in the Flash authoring tool from Adobe. There is a cheaper version too (mini-max) which only costs $70. (I have not tried the $70 version.) If you would rather have something free, there is MotionTwin: . It compiles raw ActionScript code into SWF files. Unless you know (or are willing to learn) ActionScript, the last option may not be ideal.--Chmod 777 (talk) 08:28, 2 April 2010 (UTC)


 * FlashDevelop is a free and open-source software development environment. It allows you to design and draw Flash animations, write and compile ActionScript code, and deploy .swf files.  As I understand it, FlashDevelop is only available for Windows computers.  If you only want a Flash player, and not a development studio, see Gnash, which is one among many available free and open-source Flash Player surrogates.  I have unfortunately had a lot of compatibility trouble using Gnash on Ubuntu, so I typically use the official Adobe player for playing flash movies and content.  Nimur (talk) 15:13, 2 April 2010 (UTC)


 * There's also a free Adobe Flex SDK consisting of several Java™ programs. On the IDE end, I think Synfig is probably the frontrunner. ¦ Reisio (talk) 15:35, 2 April 2010 (UTC)

Some of these [the free ones =)] look promising. I will give them a look. Thanks for everyone who helped.Cuban Cigar (talk) 00:39, 4 April 2010 (UTC)

Another php question
I'm trying to make a very simple php script where you can type something in a text box, press submit and it'll write the text to file. I suck at php and this is the best I could come up with but it doesn't work.

<? $logfile= 'log.html'; $fp = fopen($logfile, "a"); fwrite($fp, $x); fwrite($fp, " "); fclose($fp); ?>  

Could anyone give me advice on what I've done wrong? Thank you :) —Preceding unsigned comment added by 82.44.54.207 (talk) 10:29, 2 April 2010 (UTC)


 * The problem is that you don't have the control flow right. Imagine how this page loads up. First it opens the log file and writes to it. Then it gives you a text box for information. It will do it in exactly that order — top to bottom — so it will never get the text box data.
 * Here's a slight rewrite. What I've done here is make the script first check if we have POST data to write, and only write then. If the user has input data, it won't ask you for the text box again.

<? if($_POST["x"]) { $x = $_POST["x"]; $logfile= 'log.html'; $fp = fopen($logfile, "a"); fwrite($fp, $x); fwrite($fp, " "); fclose($fp); echo "Thanks for the data!"; exit; } ?>  
 * See if that works better. Note that we are having the same form POST data to itself, and we have just made it so that it can detect if it should be handling data or not. This is a quite common control structure in PHP. If you are having trouble writing to the file, make sure its permissions are set correctly. The other potential issue is whether you moved the POST data into a variable or not (that's my line with the $x=$_POST on it). In much older versions of PHP it used to be that POST variables could move directly into the regular variable space automatically (if you $_POST["x"], then that's what $x is), but that has been stopped by default for a long time because it is a HUGE security problem to let potential users indiscriminately fill variables. So if you are looking at other code as a reference, that might be where it is slightly incompatible. Retrieving the variable from $_POST is easy and a better alternative. --Mr.98 (talk) 12:26, 2 April 2010 (UTC)
 * Thank you so much! :D

Computer language for text documents
Has anyone designed a language for processing text documents? I do not mean a word processor, nor do I mean a search and replace thing. For example if you wanted to copy the fourth paragraph from document file X, followed by the second paragraph from document file Y, and then put these in a new file Z. And many other things. Thanks 78.146.86.6 (talk) 15:38, 2 April 2010 (UTC)


 * Yes, but the definition of "text document" is somewhat different. Perl was originally oriented towards processing text files (though it of course can be used to do many other things): for example, substituting text based on a regular expression line-by-line is a one-line program in Perl.  It came out of the Unix tradition, where managing a systems meant (and still means) manipulating text files.


 * I'm not certain that there's a use for something similar for natural language text files, though. Paragraphs are very loose and informal things: I can't see the task you describe producing a coherent result without a great deal of effort from the document authors.  (For that matter, "fourth paragraph" is ill-defined.  Do salutations count as paragraphs?  How about lines of dialog?  What if there's a diagram breaking up a paragraph -- where does its paragraph sort?) Paul (Stansifer) 16:04, 2 April 2010 (UTC)


 * You might also be interested in RUNOFF, an old word processing program. It allowed formatting, like the centering of text.  However, unlike modern word processing programs, which show the text centered and hide the commands to do so, under RUNOFF you edited a file containing both the text and formatting commands, then executed a program to put it in it's final formatted form. StuRat (talk) 16:12, 2 April 2010 (UTC)


 * emacs lisp? --91.145.72.188 (talk) 16:57, 2 April 2010 (UTC)


 * It really depends on what the format is of the files you are copying from. If a paragraph is defined by a sentence followed by two sets of line carriage, then that's easy enough to code for. If it's a hard return followed by a tab indent, that's easy enough to code for. If a paragraph is specified as text between two   tags, then that's easy enough to code for. But if you don't know the standards of the input format, then it won't work, for the reasons outlined above. If you use a consistent input format, then any scripting language can do this trivially. It's hard for me honestly to imagine the applications of what you're describing though—ripping paragraphs out of documents and combining them into other documents with other paragraphs doesn't sound to me like the sort of thing you'd want to do with coding, unless you are trying to make some kind of dadaist assemblage. --Mr.98 (talk) 00:43, 3 April 2010 (UTC)

I would find such a language very useful when I want to, for example, generate letters to different people with various variations in the text, and as a side-issue place an entry in a diary to follow it up in n days time. Lawyers would find this useful to assemble contracts. Scriptwriters could use something like this to format scripts into screenplay format from the likely unformatted file they wrote it in. The paragraph issue could easily be solved by being able to define the paragraph as you wished. I infer that computer programmers never do any office administration, which is what I spend a lot of time doing. 78.149.194.146 (talk) 12:51, 3 April 2010 (UTC)


 * templates are the solution for the most of that. Your favorite text editor is likely to support them, through an extension at least. --91.145.72.188 (talk) 15:20, 3 April 2010 (UTC)


 * Yes, and one difference is that, if a failure to perform a replacement occurs, you end up with something like " " versus the name of the previous person, firm, etc. (Of course, when sending a form letter professing your undying love, that could be just a insulting as the name of last week's undying love.) :-) StuRat (talk) 15:31, 3 April 2010 (UTC)

The generation of letters is usually more complicated than a word-processor can cope with, and requires logic rules. It would be a different letter to several different adressees, combining both elements that were common to all letters and elements that were unique to one or a few of the letters. When I worked in an office long ago, before word processors, you used to be able to dictate letters by simply listing stock paragraphs (eg paragraph A1, paragraph B14) and the typist would compile it into a finished letter. I've never found any software that can do that, except a single commercial one. 78.149.194.146 (talk) 17:06, 3 April 2010 (UTC)

How do i type the infinity symbol? It's not num lock, hold alt 236 on my computer
I'm trying to type an infinity symbol. The only answer I can find is to put the num lock on, hold Alt and hit 236, but this results in a y with an accent, ý, see? What's going on and how can I get the infinity symbol? prefix:Wikipedia:Reference desk/Archives —Preceding unsigned comment added by Youngbuckin (talk • contribs) 17:07, 2 April 2010 (UTC)


 * If this is using M$ Word, you can type 221E and then hit Alt-X. If you do this a lot, you could make an autocorrect entry.  --Phil Holmes (talk) 17:21, 2 April 2010 (UTC)


 * In the Wikipedia edit window, you can enter the infinity symbol using the insert-symbol "thingy" below the save button. Since I don't know the real name of the "thingy", see this screenshot for guidance.  Astronaut (talk) 17:24, 2 April 2010 (UTC)


 * It is also available through the character map application in Windows: Make sure "advanced view" is ticked, then enter "221E" in the "Go to unicode" box. Astronaut (talk) 17:31, 2 April 2010 (UTC)


 * Just make sure you are using a decent Unicode font, such as Arial Unicode MS or Lucida Sans Unicode. --Andreas Rejbrand (talk) 23:26, 2 April 2010 (UTC)


 * And here it is to cut and paste: ∞. StuRat (talk) 17:35, 2 April 2010 (UTC)

Holding ALT and then hitting the '2', then hitting the '3', then hitting the '6', then releasing ALT should work in Microsoft Windows, with or without numlock. ¦ Reisio (talk) 01:38, 4 April 2010 (UTC)


 * Doing that on my PC gives me a character 'y' with an accent - ý - just like the OP.  --Phil Holmes (talk) 11:46, 4 April 2010 (UTC)

What version of Windows? Does it do that for any text input program (notepad?)? ¦ Reisio (talk) 19:49, 5 April 2010 (UTC)

moving video taken with Ipod mini from ipod to computer
I have a newest generation ipod mini which has a video camera. I've tried and I've searched pretty hard, but I can't figure out how I'm supposed to get the video files from my ipod to my computer. In itunes, I have selected the setting to have it sync videos, and maybe it is doing that, but I jest can't figure out where it is putting them. They don't show up anywhere in the itunes library, as far as I can see, either. Help! ike9898 (talk) 19:47, 2 April 2010 (UTC)

Scanning old B&W photographs
I have some B/W prints of professionally taken photos taken around the 1930s with a plate camera (probably). I wish to scan these into my computer using an HP4400c scanner. What is the best scanning resolution to use if I want to lose the least amount of detail for subsequent enlargement. HP Precision scan Pro scanner software Auto choice comes up with about 150 dpi, which i dont think is enough. The highest res on the software is 2400dpi. Is there any benefit in going this high?--79.76.175.65 (talk) 19:52, 2 April 2010 (UTC)


 * Yes, there is a benefit, but also a cost. It will take up a huge amount of memory at that res, before it's compressed, which will also make each scan take a very long time with lots of memory paging.  If the settings allow for gray-scale instead of color, that should reduce the memory reqs somewhat, without lowering the res.  StuRat (talk) 20:09, 2 April 2010 (UTC)


 * You didn't specifically ask this, but in case you were unaware: Don't save the scans as JPEG files if you want the highest possible fidelity; save them as TIFF, PNG, or sometimes BMP files.  JPEG is a lossy compression format that will save you a ton of disc space, but at a price of introducing some visual artifacts into the scans.  Comet Tuttle (talk) 20:32, 2 April 2010 (UTC)


 * The question is what you want to do with the files. 300 dpi basically means you can reprint them at the exact same size as the originals with basically the same quality on a photo printer (no blockiness). Every multiple of 300 dpi basically means you can increase the print size/quality proportionally (so at 600 dpi you can print it out 200% larger, with no blockiness; you could also print it out at the exact same size of the originals with better quality on a very good printer). If you want to have them as "backups", basically, you don't want to go lower than 300 dpi. If you are just going to put them on the web, 150 dpi is probably fine. If you want to blow them up as big prints, that's what the 2400 dpi is there for (the files will be huge, but you can reproduce them at 8x the original size without any blockiness). If you were saving them, say, for an historical archive, then you want to scan them at the maximum resolution (because you don't know what someone in the future will want to do with them, and you'd want to keep their options open.) Remember that you can always down-sample your photos (you can go from 300 -> 150 very easily, or 600 -> 300 and so forth), but you can never up-sample them without creating horrible artifacts (you can't go from 150 -> 300 without making things look awful). You could always scan them at 2400dpi (takes forever, big files), and then save copies at 300 or 150 dpi for everyday use (and just burn the 2400 dpi versions onto a CD-R or something for safekeeping). And yeah, save them as TIFFs or PNGs, not JPEGs. --Mr.98 (talk) 21:07, 2 April 2010 (UTC)
 * Note also that depending on the quality of the originals, you might not be getting a lot more detail in your scan by boosting the resolution up higher (you might just be getting larger versions of blurriness). However if they are professionally done and printed on good photo paper, they probably will reproduce well at higher resolutions, which might make it worthwhile. I have seen some gorgeous 2400 dpi scans of black and white photos from the 1940s that really made me appreciate the value of the extra DPI. --Mr.98 (talk) 22:26, 2 April 2010 (UTC)
 * I want to enlarge the photos by about 400% (linear) for restoration before getting some new prints from the photo print shop. I eventually want 8" x 6" prints (say), so from what you say, I should be ok scanning in at 1200 dpi, which is what I have done as an initial trial.--79.76.175.65 (talk) 22:41, 2 April 2010 (UTC)


 * I recently scanned a whole lot of old family photos dating from perhaps the 1890's onwards. I got good results at 600dpi and saved the results as TIFF files.  At 1200dpi, the poorer lens quality of the era and grain in the original photographs became apparent.  Yes, the files are large, but I've got plenty of storage capacity.  I reasoned that I could blow up these images if I wished, and if I needed something smaller I could always make a smaller cropped copy with an image editor.  The biggest problem I had was widely varying contrast and brightness in some oiginals - several were very dark, others were very light - and I found myself making several adjustments to the scanning process and a few trial runs on the more difficult photos.  The other thing to note is that it can take a long time to go through a big pile of photos - a little over 250 photos took me several 4-hour sessions to scan.  Astronaut (talk) 00:14, 3 April 2010 (UTC)


 * Yes, 1200 dpi would mean a 400% enlargement possibility. Again, as Astronaut says, you might be beyond the resolution of the photo technology (e.g. you will be able to see that the photo is made up of lots of little dots and is not continuous), but see for yourself. I think it should be fine. You can always down-sample if you want to. --Mr.98 (talk) 00:26, 3 April 2010 (UTC)

Uploading PDF/Word Files With HTTPUnit
I using httpunit to upload a file into a webform and then submit the form to the server. I get this strange error and I don't know how to get rid of it.

This is the line where the uploaded file is entered into the form:

forms[0].setParameter("uploadFileName",new File("C:\\test.pdf"));

The uploaded file is never uploaded but the other fields get sent/recorded correctly by the server.

Exception in thread "main" java.io.IOException: Read error at java.io.FileInputStream.readBytes(Native Method) at java.io.FileInputStream.read(FileInputStream.java:199) at com.meterware.httpunit.protocol.MimeEncodedMessageBody$MimeEncoding.addFile(MimeEncodedMessageBody.java:137) at com.meterware.httpunit.FileSubmitFormControl.addValues(FormControl.java:981) at com.meterware.httpunit.WebForm.recordParameters(WebForm.java:604) at com.meterware.httpunit.protocol.MimeEncodedMessageBody.writeTo(MimeEncodedMessageBody.java:51) at com.meterware.httpunit.MessageBodyWebRequest.writeMessageBody(MessageBodyWebRequest.java:107) at com.meterware.httpunit.MessageBodyWebRequest.completeRequest(MessageBodyWebRequest.java:120) at com.meterware.httpunit.WebConversation.newResponse(WebConversation.java:82) at com.meterware.httpunit.WebClient.createResponse(WebClient.java:647) at com.meterware.httpunit.WebWindow.getResource(WebWindow.java:220) at com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:181) at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:158) at com.meterware.httpunit.WebWindow.sendRequest(WebWindow.java:134) at com.meterware.httpunit.WebRequestSource.submitRequest(WebRequestSource.java:297) at com.meterware.httpunit.WebRequestSource.submitRequest(WebRequestSource.java:253) at com.meterware.httpunit.WebForm.submitRequest(WebForm.java:127) at com.meterware.httpunit.WebForm.doFormSubmit(WebForm.java:143) at com.meterware.httpunit.WebForm.submit(WebForm.java:108) at com.meterware.httpunit.WebForm.submit(WebForm.java:93) at Main.main(Main.java:167)

72.188.46.69 (talk) 22:36, 2 April 2010 (UTC)WebDev

Need Windows API opinion
My days of reading API manuals just for the heckuvit are well behind me, so I solicit the opinion of those still in the know and/or those with access to such documents. Subject area is "date conversion", on a Windows PC.

Background: just finished my taxes using a software product installed on my PC (i.e., not on the web). In one section, I need to enter a number of dates for certain transactions, which are recorded on paper. When I enter a date in the form 7/12 (this is the US, so that's the 12th of July), this software insists on converting it to July 1st 1912; that 5/22 is May 1st 1922 rather than May 22nd, etc.

In my opinion, since I'm filling out my taxes for 2009 and every applicable date occurred in 2009, the product's assumption (1912 or 1933) is nothing short of stupid -- possibly with a good dose of lazy thrown in. BUT, I spent many years as a software developer, and am willing to admit that the program vendor MAY be constrained by the APIs available to it -- i.e., there may NOT be a way to program, "when given only two subfields of a date, assume that the missing field is 'year=2009' ".

So I ask any current developers out there: is there a user interface / date conversion API that would treat 5/22 as May 22nd and they're just too dumb or too lazy to use it, or is the conversion being done out of their reach (by the OS, say) and they really don't have any control over it?

More details available if needed.

TIA, DaHorsesMouth (talk) 22:51, 2 April 2010 (UTC)


 * It's 100% laziness and sloth. Date conversion is simple and no coder needs an API with a library in order to decipher what a user means to write when he writes "5/29".  Comet Tuttle (talk) 23:21, 2 April 2010 (UTC)
 * I think the same thing used to happen in Excel - though I just checked and it doesn't do that in Excel 2007. So, what happens if you enter "7/12/09" or "7/12/2009"?  Astronaut (talk) 23:58, 2 April 2010 (UTC)
 * It doesn't happen in Excel 2000 either (the software assumes the current year, i.e. 3/4 is interpreted as April 3rd 2010 in the UK), so at some stage last century, Microsoft must have fixed it. I suggest that you contact the writers of your software to suggest the obvious improvement to their coding.  They will probably reply that it might be risky for them to assume the year in important documents such as tax returns.    D b f i r s   08:35, 3 April 2010 (UTC)