Wikipedia:Reference desk/Archives/Computing/2007 October 5

From Wikipedia, the free encyclopedia
Computing desk
< October 4 << Sep | October | Nov >> October 6 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


October 5[edit]

Stepmania[edit]

I was looking through Stepmania, and I was wondering, which one is the version that has the same steps as DDR? --JDitto 01:40, 5 October 2007 (UTC)[reply]

how do you install a copy of msn/wlm on a thumb drive?[edit]

so you can keep your emoticons and settings wherever you go? —Preceding unsigned comment added by 166.121.36.10 (talk) 02:19, 5 October 2007 (UTC)[reply]

U3? --frotht 03:33, 5 October 2007 (UTC)[reply]

i have a u3 thumb drive but how do i install a copy of msn/wlm on it? —Preceding unsigned comment added by 166.121.36.10 (talk) 06:28, 5 October 2007 (UTC)[reply]

Or you can dump the bloatware and do this. -Wooty [Woot?] [Spam! Spam! Wonderful spam!] 09:32, 5 October 2007 (UTC)[reply]

but i cant save my own emoticons in pidgin. —Preceding unsigned comment added by 166.121.36.10 (talk) 05:27, 9 October 2007 (UTC)[reply]

registry[edit]

What are HKCU, HKLM, HKCR, etc called? I think I recall them having a specific name like registry domains or something but not that --frotht 03:32, 5 October 2007 (UTC)[reply]

The Registry Editor help file calls them registry subtrees and predefined keys. --jh51681 10:07, 5 October 2007 (UTC)[reply]
Our article calls them hives (Windows_Registry#Hives). 11:02, 5 October 2007 (UTC) —Preceding unsigned comment added by Jeltz (talkcontribs)

Must have "www."[edit]

Hello, I have a website but for some reason it can only be accessed with the www. at the front of the address (eg. www.example.com). If I try to access it without the www. (like just example.com), I get a "Could not locate remote server" error. Is there any way to fix this so the website can be accessed even if the www. isn't typed (say, through the .htaccess file or something), like any other normal site? thankyou —Preceding unsigned comment added by 203.208.110.207 (talk) 07:11, 5 October 2007 (UTC)[reply]

If you do an nslookup on the name "whatever.com" (without the www.), does it look up to anything? If not, you need to add an entry for it to the domain name server (DNS). Usually this is not handled by you; and you need to tell whoever is running your DNS to fix it. --Spoon! 08:43, 5 October 2007 (UTC)[reply]
You have to modify your host file, instead of looking for www.example.com, remove the www. part and just leave it to example.com. --antilivedT | C | G 10:34, 5 October 2007 (UTC)[reply]
Like Spoon! said, you need a DNS entry for example.com, otherwise there will be no way for anyone's web browser to contact your web server. Once you have that, there are a couple methods you could try that redirect browsers to www.example.com, if that is your preferred domain. I use Apache's mod_rewrite for this. -- JSBillings 10:40, 5 October 2007 (UTC)[reply]

After doing a nslookup I can see that something is wrong with the DNS - I'll have to contact the company who manage my domain. Thanks for your help. —Preceding unsigned comment added by 203.208.110.207 (talk) 11:45, 5 October 2007 (UTC)[reply]

Your web server itself will also have the know the list of names it can be called by. Friday (talk) 15:35, 5 October 2007 (UTC)[reply]
I don't get this. I thought that the site was, say, example.org and www.example.org is just one of the local servers (just like there could also be an ftp server and what have you). So shouldn't this be a local problem? Unless someone told the dns folk to be more specific than they normally are, or something. DirkvdM 06:13, 6 October 2007 (UTC)[reply]
example.com is just another DNS name, like www.example.com and really.long.name.example.com. If you don't configure an A record or CNAME record for that name, it won't resolve as the hostname in a URL. In this case, no one created an A record for example.com (you don't want example.com to be a cname, for a variety of reasons not worth mentioning here.) Some people and hosting sites don't automatically create them, either by preference or policy. -- JSBillings 14:56, 6 October 2007 (UTC)[reply]

Image upload site[edit]

What is a very user friendly site to upload images and create a gallery? Thanks 81.241.103.75 08:56, 5 October 2007 (UTC)[reply]

[1]--Mostargue 11:10, 5 October 2007 (UTC)[reply]

http://flickr.com. Lanfear's Bane 12:38, 5 October 2007 (UTC)[reply]
imageshack.us 68.231.151.161 17:33, 5 October 2007 (UTC)[reply]

Java vs. C++[edit]

I read about Java and C++ programming languages and I can't really find any big differences.

What ia the different between Java and C++? —Preceding unsigned comment added by 87.54.33.250 (talk) 12:50, 5 October 2007 (UTC)[reply]

Generalized pointers, present in C++ but absent in Java are an obvious difference.
Atlant 13:19, 5 October 2007 (UTC)[reply]
Oh come on, that's what you come up with? How about the obvious difference that Java is interpreted and C++ is compiled? --frotht 15:15, 5 October 2007 (UTC)[reply]
Java is not interpreted. Java is usually compiled into Java bytecode (which is usually JIT-compiled into native machine code at runtime), but can also be compiled directly into native machine code. --Spoon! 18:03, 5 October 2007 (UTC)[reply]
But it is interpreted. Human-readable Java source code is compiled into Java byte code, which the processor can't make heads or tails of. The JVM interprets the Java byte code. In a sense, Java is both compiled and interpreted. The .NET CLR does the same in MicrosoftWorld. In a sense, every language is interpreted. In machine code, the interpreter is the processor itself. I have myself written two interpreters, and have found them to be much easier to write than compilers, which I have very little expertise on. JIP | Talk 20:14, 5 October 2007 (UTC)[reply]
One of the most important differences is that in C++, you have to memory manage each and every object yourself, while in Java and C#, the runtime environment does it for you. JIP | Talk 20:16, 5 October 2007 (UTC)[reply]
As interpreter says, "Any language can be implemented via an interpreter or compiler; there is no such thing as an "interpreted language" or "compiled language", only interpreted and compiled implementations of a language.". --Sean 20:25, 5 October 2007 (UTC)[reply]
It's a very broad question, and you haven't told us what perspective you're viewing it from. Do you want differences that matter to someone who studies the intricacies of programming languages? Do you want differences a CIO should care about? These are vastly different questions. Taking a fairly "big picture" view, Java is almost certainly the language where more active improvement is being made. Java has made vast inroads in enterprise application development in a way that C++ almost certainly never will. Java is more than a programming language- it's a platform. Friday (talk) 15:23, 5 October 2007 (UTC)[reply]
@ [87.54] And just to round out this thread of replies ... if you are asking from the perspective of someone who doesn't know anything about programming languages, and simply wonder why someone bothered to "invent" Java when C++ already existed and seemed to be doing a decent job on its own ... there are thousands of programming languages and programming language designers love "improving" things. There's more than one way to invent the wheel.
For some good background on programming language design in general, read a few essays by Paul Graham (Here are two good ones [2] [3] that talk about lisp, but have general application). dr.ef.tymac 20:27, 5 October 2007 (UTC)[reply]
Follow-up: oh, by the way, in case you aren't enthralled by techie-types debating the nuances of "compiled vs interpreted" and the other kinds of perennial squabbles that are likely to show up in in response to your question, you might want to take a look at Comparison of Java and C++, on Wikipedia. dr.ef.tymac 20:44, 5 October 2007 (UTC)[reply]
As others have said, a huge difference is that in Java, all objects live on the heap and are garbage collected. The programmer controls when objects are allocated, but the run-time system deallocates them behind the scenes when it can prove that they will never again be used. In C++, the programmer controls the full life cycle of every object (creation and destruction). This has major consequences for certain styles of programming; the idea that "resource allocation is initialization" is ubiquitous in C++ and nonexistent in Java. In C++ it's generally considered good programming style to use automatic (stack) allocation for most objects and avoid new and delete, whereas in Java new is everywhere. Explicit memory management also means that objects can disappear while references to them remain, which is a famous source of bugs.
In C++ when you write Foo x, it means that x is a Foo (automatic). In Java, Foo x means that x is a reference to a Foo; the actual object lives elsewhere (on the heap). In C++, if you assign to x, you're asking the object x to overwrite itself with whatever's to right of the = sign. In Java, you're changing the reference; no objects are involved. The closest thing to Java references in C++ is pointers; they're syntactically different but semantically very similar. C++ also has something called references, which are syntactically more similar but semantically rather different. Pointers in C++ are more general than Java references, because you can have a pointer to anything that can be assigned to, not just objects. In particular, you can have pointers to a particular element of an array, and pointers to pointers, both of which are useful in practice.
Another big difference is that Java comes with a huge standard library, while C++'s standard library is minuscule (at least by comparison). You can find C++ libraries for practically anything, but they have to be installed and configured separately.
C++ is normally compiled to native code while Java is normally compiled to the JVM, but that has essentially nothing to do with the languages themselves. I really don't understand why there aren't more C++ interpreters or native-code Java compilers. (They do exist.) Also, there's no reason there couldn't be a bounds-checked implementation of C++ (those exist) or an unchecked implementation of Java (well, the Java spec forbids this, but there's nothing deep in the design that precludes it).
I don't recommend Paul Graham's writings in general since he's painfully biased toward the Lisp way of doing things. I haven't followed these links, but everything he writes is like that; even when he's not talking about Lisp, he's talking about Lisp. You'll get a very twisted view of the world from reading his stuff. I love Lisp, but I don't exclusively love Lisp. Learn lots of languages -- most of them have at least a few neat ideas you won't have seen before. (Though Java's pretty boring, actually. C# is more interesting.) -- BenRG 21:38, 5 October 2007 (UTC)[reply]
Ah - language wars. Gotta love it. Empassioned user of the two languages at each others throats. The deal is that both languages have their place. You certainly don't write high performance video games in Java - it's vastly too slow (not just because it's typically interpreted - some language features are just inherently slow). You don't write web applications in C++ - with pointers and programmed memory cleanup, it's not secure enough - and being designed to be compiled and having no standards for what a 'char' or an 'int' is, it's not portable enough. C++ definitely isn't for beginners because it allows you to create insanely hard to track down bugs. Experienced programmers hate that Java places you in a straight-jacket and cuts you off from the most efficient programming techniques (the very things you need to avoid teaching to newbies because they are error-prone). You can't program "to the bare metal" in Java. C++ lacks some of the nicely thought out libraries and middleware that Java has. Both languages will be around for a long time to come - each dominating in their own fields of expertise. There are areas of overlap where either language is perfectly adequate - and in those cases the preferences and experience of those doing the programming typically ends up being the deciding factor. There are other situations where neither Java nor C++ can cut it. Shader programming in graphics hardware for example - we use HLSL, Cg or GLSL for that. For generating host-side web pages we use PHP (that's what Wikipedia is written in). There are all sorts of programming languages out there - and they are generally not interchangeable for extremely good reasons! SteveBaker 14:08, 7 October 2007 (UTC)[reply]

Microsoft Publisher and Word Processing Sofware[edit]

Can anyone tell me if Microsoft Publisher can be considered as a Word Processing software? —Preceding unsigned comment added by Shelaghmccormick (talkcontribs) 17:31, 5 October 2007 (UTC)[reply]

Device Presenter[edit]

Somewhere that present me the suitable devices of my given requirements and characteristics for PC?Flakture 18:06, 5 October 2007 (UTC)[reply]

How do I create a scraper?[edit]

I want to retrieve some data from a variety of websites for a personal project, and it looks like I need to create a scraper.

This is just a one-off requirement and it's simply to save me several weeks of manually inputting data into the websites and getting the results.

I don't have any web scripting skills (HTML is the most I have), but I do have programming skills in other environments (Oracle PL/SQL and VBA) so could probably learn if I have some good, clear examples to follow. I don't want to spend more than 25 quid on this (it's all coming out of my own pocket), so will probably have to do it myself.

How might I make a start?

(I won't say what the websites are or what the project is - it's a secret!) 81.151.177.230 18:25, 5 October 2007 (UTC)[reply]

Perl? Perl + Lynx?
Atlant 19:05, 5 October 2007 (UTC)[reply]
Thanks but...
I need to understand the missing links. Really, I need to know how to knit the bits of technology together. Do I have to get some web space that can host and execute Perl? Or can I embed the script in an HTML page? Thanks.--81.151.177.230 19:30, 5 October 2007 (UTC)[reply]
You can always get ActivePerl on your windows system, and use the native Perl modules for scraping web sites. There are also Python (programming language) packages too, if you'd prefer Python, as well as other packages. You could probably also write it in Visual Basic, but I'm unfamiliar with that language. -- JSBillings 20:04, 5 October 2007 (UTC)[reply]
If you have Microsoft excel, go to Data --> Import external data --> New web query --> then enter the URL you wish to scrape and it will load the data. --Open2universe 20:16, 5 October 2007 (UTC)[reply]
To answer your questions: 1) no, you don't have to; and 2) sure, you could, if you are familiar with the relevant HTML scripting language, but that would be an unconventional way to do it.
There is a multitude of ways you can go about it. The best way is to check the terms of use of the "target" web site(s) and ask the person in charge if they make the information available "pre-scraped" for you to download, or whether they have a Web API, or whether there is a third-party site somewhere that aggregates the content in XML or some other format. I remember seeing a website that did that XML idea with Wikipedia.
You could just directly save the text of the HTML pages to whatever machine you are browsing the internet from and then extract the information you want with a custom-made beanshell or perl or ruby or javascript, provided your machine has the relevant language interpreter or compiler installed on it. You could use a pre-made module such as some of the ones linked below.
You could probably pay someone 25 quid to teach you how to do this on your own, or write some scripts for you, although I'm not sure how ethical that would be if you didn't expressly state what you are planning to do first, and how you plan to use it.
Random ideas in no particular order: WWW::Mechanize Hpricot Mashup (web application hybrid) Web spider Aggregator Scroogle ... here is a site on a specific software package with a nice tutorial and pretty diagrams. If you need someone to spell things out for you step-by-step, you might have a better chance if you can show you've researched the above links (or related) and you've investigated the various options ... or you could just get a computer whiz to fall in love with you or something. dr.ef.tymac 20:15, 5 October 2007 (UTC)[reply]
MANY THANKS...to everyone who replied with suggestions. It looks a lot less daunting now, and I've just done a proof of concept with Open2universe's Excel solution. Not pretty (yet), but I've done some VBA that can grab pages and then pick out the data I'm after. (It's actually simply one number buried in each page that results from running searching with various parameters, but there are just over 1000 combinations.) And thanks to dr.ef.tymac for his interesting, thought-provoking suggestions. scRUBYt sounds especially interesting, and is making me think about extending the scope of my project (which isn't illegal or improper, I assure you). Thanks again, --81.151.177.230 17:51, 8 October 2007 (UTC)[reply]

Finding a font[edit]

Where can I get a font for my Mac (OS X) so that I can see this diff correctly? Right now the ml link is just a series of identical and strange boxes. Dismas|(talk) 19:53, 5 October 2007 (UTC)[reply]

  • My method was to look at the language code (ml), go to its article ([[ml]]), see that it's for the Malayalam language, search for "font" on that page, follow this link, and end up with this font. --Sean 20:39, 5 October 2007 (UTC)[reply]
    • Hey, cool! Thanks, I learned something from that! In the future I'll try to be less of a n00b about finding things. Dismas|(talk) 23:13, 5 October 2007 (UTC)[reply]

Easy alternatives to DOS window?[edit]

I'm a mac user and very amateur C programmer... I've written a simple program that interacts with the user via the standard streams, which works great in the unix terminal. I'd like it to run on Windows machines, too, but the DOS window only has 80 columns and can't scroll. Do I have any other options besides learning what the Windows API is all about? Can this Win32 console thing help me? (In case it matters, I'm using Windows 98 and Open Watcom.) Thanks! --Allen 20:40, 5 October 2007 (UTC)[reply]

Have you tried Cygwin? dr.ef.tymac 20:48, 5 October 2007 (UTC)[reply]
No... I'll read up on it. Thank you! --Allen 21:16, 5 October 2007 (UTC)[reply]
As far as I can remember, you can click on the system menu and select "Properties" and set the number of rows and columns to whatever you want. If you set the row count to something large like 2000, you effectively have a scrollback buffer. You can also do this programmatically with the Win32 console API. -- BenRG 21:53, 5 October 2007 (UTC)[reply]
Hm? Vista (and I thought XP too..) has an actual option for how many lines you want it to buffer. --frotht 22:21, 5 October 2007 (UTC)[reply]
One sucky feature of the command prompt window is that the "screen buffer size" is fixed (you can change it in the window's properties, but it doesn't change dynamically when you resize the window - Windows just puts up scrollbars if you make the window smaller than the SBS, and prevents you from dragging the window bigger than the SBS). I guess the reason is that Windows really doesn't have a proper mechanism whereby the terminal can tell a program running inside it that the window has changed. Unix, by contrast, can sent client programs a SIGWINCH message - which lets smart terminal-aware programs like vi and less and emacs know that someone has resized the terminal - so they can cleverly resize their own displays to match. If you do use cygwin you can start a whole x-windows session and use a full x terminal (like xterm) and you get the SIGWINCH mechanism thrown in. Also (last time I checked) there is a cygwin port of rxvt that doesn't use X (it just uses windows calls, and this looks very like a regular command window) - but it does support SIGWINCH. It's a nice thing to have if you want real resizability but don't want the whole X system running on windows just to get that. -- 217.42.190.82 00:11, 6 October 2007 (UTC)[reply]
Froth, I think you're talking about the same thing that I am. IP address, Windows does have a mechanism to tell applications when the window size changes: ReadConsoleInput(). The big problem with the Windows console system is that the metadata (cursor movement and window size change and so on) doesn't have an encoding as byte sequences, and hence can't be sent through a pipe. Console handles are not real NT handles, they're special values which are intercepted by the user-mode Win32 subsystem and routed via a private side channel (LPC) to the Win32 process that manages the console window. This is why the Unix world has lots of terminal emulators but the Windows world has only Microsoft's. I think they've now specified a way for third parties to hook into this system, or at least I seem to remember hearing that they were planning to do so. -- BenRG 22:03, 7 October 2007 (UTC)[reply]
Cygwin is the right answer - it gives you a UNIX-like environment under Windows - once you've opened a Cygwin shell window, you'll be right at home with all of the tools you know and love. It comes with gcc, make and all of the other things you need. (And it's free!) SteveBaker 20:48, 6 October 2007 (UTC)[reply]
Thanks, everyone; I appreciate the help. --Allen 23:55, 7 October 2007 (UTC)[reply]

SUPER[edit]

I was lazing around the computing reference desk when I saw a solution to my problem: SUPER! I was trying to actually use the VideoDownloader add-on for Firefox...anyways, I downloaded the SUPER installation files (I think), but all I got was a box saying "Invalid Database. The installation will be cancelled." What exactly am I doing wrong?--The Ninth Bright Shiner 21:50, 5 October 2007 (UTC)[reply]

Using SUPER in the first place for one. It's just a frontend to mencoder and ffmpeg- use those instead --frotht 22:19, 5 October 2007 (UTC)[reply]
Oh, okay. I'm still in the dark here, so could you tell me a little about mencoder and ffmpeg? Thanks.--The Ninth Bright Shiner 15:17, 6 October 2007 (UTC)[reply]
There's an MEncoder and FFmpeg article. -- JSBillings 16:04, 6 October 2007 (UTC)[reply]
Alright! I downloaded it, downloaded a video, and viewed it successfully! What I don't know how to do, though, is to convert videos from one format to another...--The Ninth Bright Shiner 20:52, 7 October 2007 (UTC)[reply]

installing xp on laptop with no cd or floppy[edit]

i have a laptop with xp pro sp2 already installed, as i just got it from a friend i want to do a clean install of windows to get rid of the junk, but the floppy drive/cd drives are external (floppy usb, cd rom uses some sort of smart card drive?) i've tried installing it but i realised that the computer cant recongise the cd drive as it would need a driver but the driver wouldn't be loaded at the point where windows installs itself. anyway round this?--Colsmeghead 21:51, 5 October 2007 (UTC)[reply]

Most fairly new (certainly the last few years) BIOSes will allow you to boot of a USB disk (which should include a USB optical drive). So look in your BIOS - I think the BIOS will be able to make the optical drive appear as if it was IDE (as far as the bootloady bits of XP are concerned), so no driver would be required. -- 217.42.190.82 23:38, 5 October 2007 (UTC)[reply]
so just copy win cd to the usb drive?--Colsmeghead 09:51, 6 October 2007 (UTC)[reply]
theres no boot from usb option possibly because it doesnt have any usbv drives, you have to put it in a dock thing for it to have any kind of ports--Colsmeghead 11:09, 6 October 2007 (UTC)[reply]

HOW much does it cost?![edit]

Due to processes I really rather wouldn't go into detail about, I can no longer install my Office Professional 2007 disc, because it's an upgrade. So, my only alternative seems to buy the cheapest available regular Office disc. What disc would that be? Standard is a frightening $400, which I certainly wasn't expecting. Doesn't Home & Student cost less? Is it even able to be upgraded? Thanks.--The Ninth Bright Shiner 21:55, 5 October 2007 (UTC)[reply]

Look for the OEM install of Office Basic at online retailers. Office basic only comes with Excel and Word, which is most that almost everyone really needs (I run a couple of dozen machines at the office, and all but a few only have basic - occasionally people complain that they don't have powerpoint, but not enough to actually get up and walk over to one of the machines that do have it). The OEM disk (which is intended for system installers, but can quite legally be used by anyone) just comes in a little sleeve with the disk and the licence - no blurb, no docs, no box, no handholding. But really, before you spend money, do try OpenOffice.org - it opens every Word document I've ever had to throw at it, does everything I know how to get Word to do just as well. For 99% of people I'm convinced it's just fine; only people who do some pretty scary macro stuff find significant differences between Office and OO. And with OO you get all the suite for free. -- 217.42.190.82 23:36, 5 October 2007 (UTC)[reply]
Hm...I found it at $180. Is that too high, or is that what it normally costs? Thanks again for the help.--The Ninth Bright Shiner 15:15, 6 October 2007 (UTC)[reply]
Are you a college student? Microsoft likes to feel philanthropist and sell it at fair prices to college students. Check through your school's website- "Microsoft Office Enterprise 2007 Suite (Student Option)" costs just $14.40 + S&H for me. Vista Ultimate Upgrade (never buy the full, just upgrade twice for a clean installation) is $18.45. If your school doesn't have a fair deal with microsoft, you can still get software if you can prove your student status. This january when Vista came out, I ordered home premium upgrade from journey for $90, and all I had to do was get the registrar's office at my school to send proof of enrollment to the provided address. This is considerably more expensive than buying from the school however- That $14.40 office 2007 ultimate becomes $249.75 at gradware.com --frotht 17:29, 6 October 2007 (UTC)[reply]
Whoa. Now that's something. I'm in 10th grade right now, so would I be eligible for these discounts to end all discounts?--The Ninth Bright Shiner 20:55, 7 October 2007 (UTC)[reply]
You might also concider Open Office. For most things, it is a suitable replacement for Microsoft Office, and the price is certainly right. --Mdwyer 01:04, 9 October 2007 (UTC)[reply]
Those versions that are priced that cheaply are (usually) feature incomplete. Regular retail "Student and Teacher" editions of Office are (again, usually) the "Standard" edition with something like a 25% cheaper MSRP and a VLK (Volume License Key) good for 3 installations. — User:ACupOfCoffee@ 02:44, 9 October 2007 (UTC)[reply]