Wikipedia:Reference desk/Archives/Computing/2008 December 16

= December 16 =

Windows XP driver for caching index of removable drives
Does a driver exist for Windows XP that would save the last seen directory structure of removable drives, so that the folders and file names could be browsed even when the drive isn't connected? This would be very useful with various USB memory sticks and external hard drives. Search frameworks like Google Desktop might be able to give a sort of a snapshot, but I'm looking for an ordinary view in Windows Explorer. —Preceding unsigned comment added by 93.97.228.7 (talk) 13:13, 16 December 2008 (UTC)

Conway's Game of Life
< moved from Village pump Julia Rossi (talk) 10:03, 16 December 2008 (UTC) > < moved again from Entertainment desk TenOfAllTrades(talk) 13:57, 16 December 2008 (UTC)>

A question for those who know Conway's Game: are there any P60 backrakes under the rule B3/S23? If so, please draw it out below or on my userpage. As an example, here is how a glider would be drawn:

**0** ***0* *000* ***** Lucas Brown (talk) 04:18, 16 December 2008 (UTC)


 * That's a question for the Reference Desk -- Derek Ross | Talk 04:35, 16 December 2008 (UTC)


 * For reference, he's talking about Conway's Game of Life. TenOfAllTrades(talk) 13:57, 16 December 2008 (UTC)

Suggestions for a good printer...
Does any one of you know of a good, reliable and inexpensive printer to replace that crappy Epson Stylus C90 my family uses at home? I get pissed off at this piece of crap every time it jams a piece of paper or warns me of low ink. Whenever one of the colour tanks runs dry, it locks up and forces me to buy another tank in order for me to continue printing. And that one ran low again after a few sheets. Sorry for venting out my disappointment over the company here, but what do you think? Blake Gripling (talk) 14:33, 16 December 2008 (UTC)


 * I love my HP PhotoSmart C6280 All-In-One printer. --Andreas Rejbrand (talk) 16:13, 16 December 2008 (UTC)


 * The HP printers I've used have the ability to continue printing when one of the ink cartridges runs dry, although with lower quality, as would be expected. However, I've never seen any printer that wasn't subject to constant paper jams.  I've resorted to feeding in one sheet of paper at a time, which seems to stop this. StuRat (talk) 17:02, 16 December 2008 (UTC)


 * I would recommend any printer that has built-in duplexing. You can print on both sides of the sheet and therefore save paper. (Personally, I like the HP D5360 -- it's the only one at that price that has built-in duplexing). --70.167.58.6 (talk) 18:20, 16 December 2008 (UTC)
 * Though duplexing is a sure-fire thing for paper jams after awhile. --98.217.8.46 (talk) 04:17, 17 December 2008 (UTC)


 * Unless you need to print colour, go for a mono laser printer - a single toner cartridge will print thousands of pages. Exxolon (talk) 23:20, 16 December 2008 (UTC)


 * I have a laser printer and a free color printer that came with some computer I bought. 90% of the time the laser is all I need. Eeeevery once in awhile I need something in color, and pull out the color one. If you don't need the color, just grab a cheap laser, and keep the color printer as occasional backup. Easy solution. --98.217.8.46 (talk) 04:18, 17 December 2008 (UTC)


 * My Epson C86 printer never jams paper. The problem may be the paper not the printer. Also mind the Laser Printer Health Hazards. If you like it loud, slow, ugly and cheap: There are still some Dot matrix printers around ;) --94.79.143.154 (talk) 23:59, 19 December 2008 (UTC)

Game programming
Hello/HALO,

I was starting game programming and studing basics but came across a problem in which environment I should programme.Is XNA or DirectX or OpenGl or any another.I just want to know which is best(may not easy) and other which is easy(may not best). -- 122.163.15.188 (talk) 15:27, 16 December 2008 (UTC)Harshagg


 * I think OpenGL is easier to work with than DirectX, but perhaps it is only a matter of taste (and I am not an experienced game developer). --Andreas Rejbrand (talk) 16:10, 16 December 2008 (UTC)
 * If you want to develop 3D games for the Microsoft Windows platform, then probably DirectX is the better choice, though. --Andreas Rejbrand (talk) 16:12, 16 December 2008 (UTC)
 * Performance depends on driver, Microsoft provided slow OpenGL driver to support its own DirectX 3D. Id Software successfully uses OpenGL. MTM (talk) 17:35, 16 December 2008 (UTC)


 * DirectX does a lot of the work for you and is easier to develop for. OpenGL is far more flexible, but requires more brains. Compare Unreal Engine 3 (DirectX) vs. ID Tech 5 (OpenGL) --70.167.58.6 (talk) 18:24, 16 December 2008 (UTC)


 * Hi! I'm an actual game programmer!  Graphics is my speciality.


 * Most Windows/XBOX games are written in DirectX - this is not an easy ride for many reasons - but that's how it is. XNA is pretty much ignored (and a good thing too!).  OpenGL is the only portable graphics API and it's also the only game in town for Linux, MacOSX, iPhone, Google Android phone - and it's the graphics API for things like Nintendo DS and Playstation are more closely modelled on OpenGL than on DirectX.   DirectX has some severe problems because it's a Microsoft-controlled standard and they can make life arbitarily difficult for you...hence, for example, if you want to use such nice features as Geometry shaders or Texture arrays, you have to have DirectX 10.  DirectX 9 won't do.  Unfortunately, in a typically Microsoftian move - they refuse to publish DirectX 10 for Windows XP - you need Vista.  But far more games players are running Windows XP than Vista - so most games writers are 'stuck' on DirectX 9.  In the OpenGL world, there are nice extension mechanisms that allow individual hardware vendors to add features to the API without help from the OS vendor.  Hence, OpenGL under Windows XP has both geometry shaders and texture arrays if your graphics card is "DirectX 10 capable".   That's a bloody ridiculous situation.  So with all of that information at hand - you'd think it'd be a slam-dunk and we'd all be using OpenGL.  But not so.  Sadly, DirectX has enough momentum behind it on two of the most dominant games platforms that people tend to stick to DirectX - despite all of it's many faults.


 * IMHO - it doesn't much matter which you learn initially - you're going to need to know both of them if you want to be a low-level graphics engine programmer.  However, if you're going to work with (say) the Unreal Engine - you'll probably quite rarely go near that low level.  Unreal provides it's own 'portability layer' over the top of DirectX, raw Xbox, bare-to-the-metal Playstation, etc.  You program mostly using the portability layer and you don't give a damn whether it's DirectX or OpenGL or raw register access commands.  On the very rare occasion you delve that deep - consult the DirectX/OpenGL manual!


 * The huge complexity of all of these API's is also way overstated and I strongly disagree that there is any complexity difference between them. These days you load textures, load shaders and DMA triangle meshes at the hardware as fast as possible.  This is probably 10% of the respective API's - most of the other 90% is stuff that's obsoleted by shader technology and may safely be ignored and looked up in the manual in the unlikely case you'll ever actually need it.  Shader technology has superceded a lot of old junk like "how do I draw a dotted line?" - well, you certainly don't rummage deep into the DirectX/OpenGL manual...you draw a regular line and write a shader to make it dotted.


 * In addition to the graphics API's - you need to get REALLY familiar with the shader languages - HLSL, Cg and GLSL. They are very similar to one-another but the small differences can kill you - so pay attention to those tiny differences!


 * SteveBaker (talk) 04:19, 17 December 2008 (UTC)
 * That comment was really insightful. Thank you steve. -- penubag  (talk) 09:08, 18 December 2008 (UTC)

Google Chrome as Default Browser
Is there a way to make Google Chrome the system's default web browser? The button "Make Google Chrome my default browser" under "Settings" does not work. --Andreas Rejbrand (talk) 16:08, 16 December 2008 (UTC)


 * The button did work when I executed Chrome as administrator. --Andreas Rejbrand (talk) 19:15, 16 December 2008 (UTC)


 * ...because to modify "system" settings you need to have administrator rights. --grawity 20:19, 16 December 2008 (UTC)
 * Yeah, but it is really bad designing (of Google), not to make the "Administrator Rights" dialog box appear when clicking the button. It appears just as if the button didn't do anyting. --Andreas Rejbrand (talk) 22:24, 16 December 2008 (UTC)
 * That's MS' fault, not Google's. Awful web browser mind. :L &mdash; neuro(talk) 23:28, 16 December 2008 (UTC)
 * Actually, that would be Google's fault. I'll give an analogy. MS is a fruit basket, and your default browser settings are an apple inside of the basket. Google is your mother. Your mother can tell you about the apple, or not. If she doesn't tell you about it, you don't know about the apple. But this doesn't involve MS at all - they just supplied the apple. flaminglawyerc 01:24, 17 December 2008 (UTC)
 * Or..... to put it in another way, when you try changing the default browser and fail because you don't have the right to do it, there should be a dialog box that pops up and (helpfully) says "You have to be logged in as an administrator to do that". At least then you know why it's not working. Belisarius (talk) 01:29, 17 December 2008 (UTC)
 * Except with an apple, and my mother. --98.217.8.46 (talk) 01:51, 17 December 2008 (UTC)

back to the question at hand: If Chrome won't change the settings I am guessing that you are running Vista and the UAC (User Account Control) won't allow you/Chrome to change it. Right Click on the "Default Programs" (should be on your start menu, but you can also find it in the Control Panel) and pick the run as administrator option. Hope this helps. Ched Davis (talk) 10:21, 18 December 2008 (UTC)

Thumbs
My main Music folder is subdivided into folders by artists, for music I got off CDs, plus a folder for downloaded music, which is further subdivided by artist. In each of these artist folders, in the downloaded music folder only, there is a little gear icon labeled Thumbs. I don't know how these Thumbs got there or what they do or if they mean anything at all. My music has been transferred through two other computers, an mp3 player, and an iPod, before finally ending up on this computer, and these Thumbs seem to have popped up somewhere along the journey. Are they actually anything, do they serve a purpose, or can I just delete them? Cherry Red Toenails (talk) 16:56, 16 December 2008 (UTC)


 * Assuming you are using Windows (any version), then this file is the thumbnail cache. To delete the file, go to Tools>Folder Options, then the View tab, then check the "Do not cache thumbnails" box.  The file should disappear.  If it does not, you can delete it manually, as it's from your other computer.   Buffered Input Output 17:08, 16 December 2008 (UTC)
 * Or you can do the same as above but instead select "hide protected operating system files" or uncheck "show hidden files and folders". Both of these won't delete the files but will just hide them. All the thumbs.db files do is store thumbnails of images in a folder so they can be viewed quickly when the folder is opened. SN0WKITT3N  17:56, 16 December 2008 (UTC)
 * Thanks. So if I delete them, nothing bad will happen? Cherry Red Toenails (talk) 00:46, 17 December 2008 (UTC)
 * No, but if you don't do as mentioned above, they will be recreated the next time you reopen the folder. &mdash; neuro(talk) 00:48, 17 December 2008 (UTC)

Difference between a "method" and "function" (in context of C#)?
I am new to C#. I read somewhere a method is void whereas a function is a special kind of method which returns a value. I always thought they were synonymous!! On googling I got all kind of answers without proper explanation. Please provide an answer with valid references if possible!! :P --Sanguine learner (talk) 17:02, 16 December 2008 (UTC)


 * It doesn't matter which term you use. Anyone who gets confused isn't worth worrying about.  They probably spend all their time worrying about other important things like arguing that if you put a RAID card in a JBOD, your JBOD is no longer a JBOD. --  k a i n a w &trade; 17:31, 16 December 2008 (UTC)


 * Come on! There has to be something more to it. --Sanguine learner (talk) 17:50, 16 December 2008 (UTC)


 * In the object paradigm for programming, objects have methods. In languages that have their roots in a procedural language like C++ and C# (which are based on C), methods are implemented exactly as one would implement a function.  As Kainaw says, those who concern themselves about magical rules to differentiate between certain terms are way too pedantic.  -- LarryMac  | Talk  18:21, 16 December 2008 (UTC)


 * Lets clear up some of the terminology (this is very brief and very general):
 * A subroutine is some portion of code that is generally separate from the main program, that performs some specific, often repetitive, task. Procedures, methods or functions are slightly different kinds of of subroutines.
 * A function is a subroutine that takes some amount of input and produces some output. This is very much like the concept of a function in mathematics. A good and simple example is the square root function, sqrt. It takes a number as input and produces output that is the square root of the number (so if you use the call "sqrt(25)", it returns "5").
 * A procedure, a term used in procedural programming, is simply some code that have been stuffed in another place so you don't have to repeat it all the time. And if you need to alter it, you only need to do so in one place. Say you have a computer program that's controlling an elevator, then you might have a procedure called "goToFloor", which makes the elevator go to a specific floor (call "goToFloor(5)", and it goes to the fifth floor). There are several different reasons an elevator might go to a specific floor (someone might have pushed a button in the elevator, someone might have pushed the call-button on the fifth floor, someone might be controlling it remotely, or maybe the elevator is set to go the first floor whenever it's not in use, as that is where people are most likely to enter). The code for this procedure may be very long and complicated (as it has to control many different motors and electronics and lights and things), so it's very handy not to have to type it out four different times, for five different parts of the code. It cuts down on the error-rate (since you only have to get it right in one place), and if it ever needs to be updated (like if new hardware has been installed) you only have to do it in one place.
 * A method is closely related to the procedure (the terms are sometimes used synonymously), but the word tends to be used in object-oriented programming. In OOP, you use objects, and a method acts directly on a specific object. Say you are making a racing game with several different in-game cars. Each car is represented as an object (the definition, or blueprint, for an object is called a "class"). So say you have an object called "car1", and you want it to accelerate. Then you'd type (different languages use different notation, not sure what C# uses) "car1.accelerate(25)". That would accelerate "car1" to 25 km/h. Now, if you typed "car2.accelerate(25)" it would accelerate "car2" to 25 km/h, but it wouldn't do anything to "car1". The method specifically belongs to an object, not necessarily to the the whole program.
 * As I said, this is a very brief and general overview of what the different kinds of subroutines do, and many times the line is very blurry. Say for instance that the elevator function, goToFloor, returns a value, maybe how many seconds it will take to arrive on the floor or whether or not the move to the floor is successful. Is it a procedure or a function? Well, it's kinda both. It's a function, because it returns a value. But it's also a procedure, because it actually does something, not just fidgets with the input and returns a value. Or what if you have a procedure that acts on a specific object, like a method, but only by using the object as an input (like "accelerate(car1, 25)"). And what if it returns some value? Is it then a method, a procedure or a function?
 * While it is good to have the lingo down, it is much more important that you understand what is actually going on. Whether you call something a "subroutine", "function", "procedure" or a "method" (and we haven't even broached the elusive co-routine!) doesn't necessarily matter. Just understand what a subroutine does, what its purpose is, and how to write them. If you do that well, the specific name of what type of subroutine isn't all that important. Belisarius (talk) 23:29, 16 December 2008 (UTC)


 * I think this may be a confusion between C# and Visual Basic. The documentation (I only have 2003, but I don't suppose it's changed that much) in the Visual Basic Language Concepts section Procedures Overview defines amongst others the following:
 * Sub procedures perform actions but do not return a value to the calling code.
 * Function procedures return a value to the calling code.
 * Property procedures return and assign values of properties on objects or modules
 * The C# documentation says:
 * C# makes no distinction between functions and procedures, as Visual Basic does. A method either returns a value or returns void. The syntax for declaring a C# public method is:
 * // C#
 * public int ConvertMatterToEnergy(int matter)
 * // Conversion code goes here.
 * }
 * (Visual Basic and Visual C# Concepts: Method Implementation in Custom Controls).
 * Therefore in Visual Basic, there is a distinction between functions which return a value but sub procedures which do not; but in C# there is no such distinction. C# methods (which are equivalent to functions and procedures in Visual Basic) can return a value or not return a value.  Read the above Wikipedia links for more details on what a function, method, etc actually is. --Maltelauridsbrigge (talk) 16:07, 17 December 2008 (UTC)
 * Therefore in Visual Basic, there is a distinction between functions which return a value but sub procedures which do not; but in C# there is no such distinction. C# methods (which are equivalent to functions and procedures in Visual Basic) can return a value or not return a value.  Read the above Wikipedia links for more details on what a function, method, etc actually is. --Maltelauridsbrigge (talk) 16:07, 17 December 2008 (UTC)


 * Knowing the difference between function and method is knowing the difference between procedural and object-oriented programming, and I think it's great that Sanguine learner wants to understand the difference. Anyway, if you're doing OO, you can safely use them interchangably since method is a subset of function.  That is, a method is a type (oops! don't want to use that word) kind of function that is a member of an object.  I'll also (incorrectly) use class and object interchangably even though they are not the same thing.  In formal and semi-formal writing, I try to be more precise in my terminalogy. 216.239.234.196 (talk) 20:43, 17 December 2008 (UTC)


 * The simple answer: A method is a kind of function that, unlike a normal function, has an implicit context upon which it operates.
 * Examples:
 * C library functions, such as fread, have no implicit context.
 * Here, everything needs to be explicitly passed to the functions.
 * Compare the fstream:read method
 * Here 'read' is a method of class 'fstream' in which the implicit context (upon which methods of the class operate) is the class instance (i.e. the object 'f').
 * Here 'read' doesn't have to be passed 'f' because 'f' is the context within which 'read' operates. Inside the code for the 'read' method, the 'this' operator automagically refers to 'f'.
 * Explicit versus implicit:
 * If you disassemble the code calling the C function, you will see 'read' being called with 'f' as the first argument because that's how you explicitly used it.
 * If you disassemble the code calling the C++/C# code, you will see 'read' being called with 'f' as the first argument, even though you didn't explicitly do that.
 * Get it? -- Fullstop (talk) 21:38, 17 December 2008 (UTC)
 * Explicit versus implicit:
 * If you disassemble the code calling the C function, you will see 'read' being called with 'f' as the first argument because that's how you explicitly used it.
 * If you disassemble the code calling the C++/C# code, you will see 'read' being called with 'f' as the first argument, even though you didn't explicitly do that.
 * Get it? -- Fullstop (talk) 21:38, 17 December 2008 (UTC)


 * BTW, I do not believe that Fullstop's answer from above is technically correct. A static method is still a method and it doesn't have a this parameter in C#. 216.239.234.196 (talk) 20:07, 23 December 2008 (UTC)


 * Wow thanks everyone. Well I guess I am getting it but its still quite blurry. I got the book again and here is the definition it gives (not very clear).

So I guess I conclude they are similar but the meaning depends on the context? Frankly speaking still confused... :( -- Sanguine learner talk  17:20, 18 December 2008 (UTC)
 * Method is a set of one or more program statements which can be executed by referring to the method name.
 * Function is a set of statements that perform a specific task in response to a message.


 * No offense to Fullstop, but I would ignore his answer. While it's technically correct, it's only going to confuse a beginner.  The simplest definition I can give you is that a function is what you call a subroutine in procedural programming and a method is what you call a subroutine in object oriented programming.  That's it.  Function = procedural programming.  Method = object oriented programming. 216.239.234.196 (talk) 23:18, 18 December 2008 (UTC)

x86 assembly programming
I have a few questions about this: Thanks, *Max* (talk) 17:12, 16 December 2008 (UTC).
 * Are functions such as MOV AH, 09h INT 21h part of DOS or part of the BIOS?
 * Is it true that 0B800h:0 is the memory mapped location of the colour video?
 * How would I access 0B800h:0?


 * handler is provided by DOS. Ralf Brown's Interrupt List is useful for such things.  is the location of character mode memory of CGA-compatible graphics cards (for graphical mode   is used), it can be accessed with   in segment register, assuming real mode addressing. MTM (talk) 17:41, 16 December 2008 (UTC)

Thanks for your help. A few more questions: *Max* (talk) 02:07, 17 December 2008 (UTC)
 * How much/which parts of the real mode address space is memory mapped?
 * Which mode do most programs use to access memory beyond the first meg?
 * How does the BIOS find interrupt handlers?


 * The real mode address space does not have one standard layout, IBM reserved some memory mapped areas in Upper Memory Area. A part of memory beyond the first megabyte can be accessed in real mode -- High Memory Area.  A much more popular way is using protected (or long with AMD64) mode.  Interrupt handlers are described in detail in the INT (x86 instruction) article. MTM (talk) 14:31, 17 December 2008 (UTC)


 * Here is a memory map. Icek (talk) 05:39, 23 December 2008 (UTC)

data storage
Where are all the emails and account information literally stored for yahoomail,hotmail,friendsters or similar websites.? —Preceding unsigned comment added by Crackhead1331 (talk • contribs) 18:02, 16 December 2008 (UTC)


 * On enterprise data storage devices (big rack-mounted arrays of RAID disks) in their respective data centers. Some of these are located in big metropolitan areas like Silicon Valley and London's Docklands (Telehouse), but increasingly they're being built in places where land (and labour) is cheaper and power is plentiful - see this article for example. A large internet outfit like those you list will have several, geographically distinct, data centres, often in different countries. 87.114.128.88 (talk) 19:03, 16 December 2008 (UTC)

How do I clear a Yahoo toolbar?
I have just updated Java and the update seems to have installed a tacky and definitely unwanted tool-bar. I did not ask for this pesky, damned thing to be installed but for the life of me I can't find a way to uninstall it. I use Firefox. Can anyone advise me how I can get rid of this thing? Please. Richard Avery (talk) 19:51, 16 December 2008 (UTC)
 * Assuming you're on Windows or Linux: Right-click the bar at the top that has File - Edit - View - History, etc. A thingy will come up that has a list of toolbars in it with checks/unchecks beside them. Just click the Yahoo! toolbar and it should disappear. And to uninstall it, go to Tools → Add-ons and it should be under the Extensions tab. flaminglawyerc neverforget 21:26, 16 December 2008 (UTC)
 * It just happened to me in Firefox 3, and I got rid of it by clicking  (unchecking it). Den dodge  Talk Contribs 21:29, 16 December 2008 (UTC)


 * Damn, that's it!! So simple, how embarrassing is that. Like some doctor or other once said, "Diagnosing a patient is easy - it's thinking of the diagnosis in the first place that is difficult". Thanks Flaming lawyer and Dendodge. Richard Avery (talk) 22:59, 16 December 2008 (UTC)

Windows games
Are there any downloads for the original (pre-Vista) versions of Hearts, Solitaire, Minesweeper, Freecell, and Spider Solitaire? 58.165.14.208 (talk) 19:58, 16 December 2008 (UTC)
 * Not legally, at least, since they are copyrighted by Microsoft. &mdash; neuro(talk) 23:27, 16 December 2008 (UTC)
 * But if you wait until the copyright(s) expire, you can get them free of charge. (Note that the copyrights will not expire for another 50 years or longer, depending on where you live.) flaminglawyerc neverforget 23:44, 16 December 2008 (UTC)
 * Way to be a pedant... --98.217.8.46 (talk) 01:42, 17 December 2008 (UTC)
 * There are many clones. I have the same games, just with a different name, on my computer - all downloaded from the Fedora repository. --  k a i n a w &trade; 23:43, 16 December 2008 (UTC)


 * I'm not sure this would work... If you have the disks for the older version of Windows, try to unpack the hearts.exe, solitaire.exe etc. from the relevant .cab file on the CD. In Vista, you can run programs in "compatibility mode" (one of the tabs on the program properties).  However, I suspect you might have to pull some .dll's over as well.  Astronaut (talk) 18:05, 17 December 2008 (UTC)

Wrong Disc Inserted error after patching SWBattlefront 2
once i install the update, the game comes up with this error:

'''Wrong disc inserted. Please insert the original Star Wars Battlefront 2 CD/DVD.'''

I know its a SecuRom error message, and i've already disabled my Virtual CloneDrive. I got the game at a Scholastic book fair. I want to update the game, because the mod tools dont work with v1.0 can someone help me? Buffered Input Output 22:51, 16 December 2008 (UTC)