Wikipedia:Reference desk/Archives/Computing/2009 February 13

= February 13 =

Bizzare SQL
In Persondata, the example given passes  as the first parameter to. Why is there a  keyword here? Why not just pass ? - SigmaEpsilon → Σ Ε 00:05, 13 February 2009 (UTC)


 * Well, the page doesn't explain what DBMS this example was coded for, but a bit of Googling suggests that the  actually belongs to the , and is actually the standard SQL style  , as listed in the documentation for MySQL.
 * Fully indenting the code to see the nesting more clearly gives:

{{Hidden|titlestyle = background-color: #ccccff;|Current code, indented| SUBSTRING(	SUBSTRING( pages.cur_text FROM INSTR(			pages.cur_text,			'{{Persondata'		) ),	1,	INSTR( SUBSTRING(			pages.cur_text			FROM			INSTR( pages.cur_text, '{{Persondata' )		),		'}}'	) + 1 ) AS 'Persondata' }}
 * Assuming this is MySQL, the s could be replaced with commas, and indeed the outermost   does use commas, rather than.
 * Looking at it, I'm pretty sure the first nested  is unnecessary, and this would have the same effect:

{{Hidden|titlestyle = background-color: #ccccff;|Simplified version, using same functions| SUBSTRING(	pages.cur_text,	INSTR( pages.cur_text, '{{Persondata' ),	INSTR( SUBSTRING(			pages.cur_text,			INSTR( pages.cur_text, '{{Persondata' )		),		'}}'	) + 1 ) AS 'Persondata' }}
 * Assuming this is MySQL, I think you could also use the 3-argument form of  instead of the second nested  ; replacing the  s with   for consistency gives you the following (note that I haven't actually tested any of these):

{{Hidden|titlestyle=background-color:ccccff;|Even simpler version, using MySQL LOCATE function| SUBSTRING(	pages.cur_text,	LOCATE( '{{Persondata', pages.cur_text ),	LOCATE( '}}',		pages.cur_text, LOCATE(			'{{Persondata',			pages.cur_text		), ) + 1 ) AS 'Persondata' }}
 * - IMSoP (talk) 20:39, 14 February 2009 (UTC)

good PCI GPU
What is a really good PCI graphics card? If I get one, would it interfere with my Intel G33/31 integrated graphics card? Thanks in advance. --AtTheAbyss (talk) 00:10, 13 February 2009 (UTC)


 * There's no such thing as a "really good" PCI graphics card: all the good cards are either AGP or PCIe. If you do get a PCI graphics card, the most likely effect will be that the Intel graphics will be disabled; it might be possible to run both at the same time, each one driving a different monitor. --Carnildo (talk) 00:56, 13 February 2009 (UTC)
 * That would really depend on what you want to do. – Elliott (Talk|Cont)   02:46, 13 February 2009 (UTC)


 * For most motherboards, you will be able to select which device (PCI card or the integrated chip) to use. Unless you have a dual-monitor setup, it is more than likely that the integrated chip will be disabled when you use the PCI card. As far as I know, adding a PCI card (installed correctly) will not harm your existing integrated chip. Kushal (talk) 02:47, 13 February 2009 (UTC)


 * Does anyone know if the Intel(R) G33/G31 Express Chipset Family is PCI or PCI-E? Now I'm not even sure. --AtTheAbyss (talk) 04:57, 13 February 2009 (UTC)


 * PCI-E. 87.112.81.29 (talk) 10:25, 13 February 2009 (UTC)


 * Thanks alot anon editor. I appreciate it. Thanks for the advice and info all.--198.30.180.254 (talk) 00:47, 14 February 2009 (UTC)

Keyboard shortcut to switch tabs in Firefox?
I remember knowing how to do it before, but now I can't remember. All I know that ctrl-W closes tabs, so it'd be unusual to have a keyboard function to close tabs but not switch them. 67.169.118.40 (talk) 00:58, 13 February 2009 (UTC)
 * ctrl-tab and shift-ctrl-tab. Algebraist 00:59, 13 February 2009 (UTC)
 * Thanks! 67.169.118.40 (talk) 01:02, 13 February 2009 (UTC)
 * But these move tabs in the order from left to right. Is there any keyboard shortcut to toggle between two tabs, something ctrl+tab in Opera? Jay (talk) 11:03, 13 February 2009 (UTC)
 * Hmm... I've never realized that one. I always use Ctrl-PgUp or Ctrl-PgDown (maybe because they are still available while my left hand is busy writing.) Freedomlinux (talk) 01:55, 13 February 2009 (UTC)
 * Also, you can use Ctrl+(number here) to switch to a specific tab. For example, I want to switch to the 4th tab...Ctrl+4. Here's an assistance addon for FF: -- penubag  (talk) 03:00, 13 February 2009 (UTC)
 * Or if you have FireGestures installed, you can assign a certain right-click-drag to it. Or left-click while holding down right-click. flaminglawyer 06:03, 13 February 2009 (UTC)
 * This isn't exactly what you're looking for, but another handy way to scroll through tabs is with the mousewheel- hold the cursor over the tab bar and you can scroll through them quickly. --Alinnisawest,Dalek Empress ( extermination requests here ) 15:06, 13 February 2009 (UTC)

CDMA card in ubuntu
I have a CDMA card runing on m y dell laptop (d610). It is running perfectly. It needed no configuration to set up, i simply pluged it in and ubuntu loaded up the drivers and connected. Infact i am writing this as i drive home on I-80. But i do have a queastion: How do i figure out the phone number of the card that i am useing from within ubuntu? (of course i could simply wait till i get home and plug it in to a windows laptop) I have already tried using Verizon's access manager (under wine). Thank you. – Elliott (Talk|Cont)   01:18, 13 February 2009 (UTC)
 * Edit, jsut got home, as it turns out all my windows laptops are out at the moment. – Elliott (Talk|Cont)   02:08, 13 February 2009 (UTC)

How to make battery last?
I just got a zune and I'm wondering if it's better for the battery if I charge it as often as possible or if I should wait until it's all drained before I recharge. Is it better to recharge battery often? —Preceding unsigned comment added by 75.187.113.105 (talk) 01:20, 13 February 2009 (UTC)
 * The battery generally lasts longer if you wait till it's dead. I don't know why this is, but I do know that it is. flaminglawyer 01:27, 13 February 2009 (UTC)
 * Sorry, but I have to disagree with that. Your advice is good for older Nickel based batteries, but the Zune uses a Lithium-ion battery and Li-ion batteries prefer to be charged more frequently than to be completely discharged. There's more information on the Wikipedia article here ZX81  talk  01:57, 13 February 2009 (UTC)
 * Sorry, I'm still stuck in the past... flaminglawyer 05:53, 13 February 1998 (UTC)
 * The memory effect on NiMH batteries is minimal anyway. Nil Einne (talk) 13:13, 15 February 2009 (UTC)

3D Support in xp running as a guest
I am running VirtualBox on Ubuntu, I have Windows XP as a guest OS. This guest OS does not have DirectX 3D acceleration. I would like to enable/install 3D acceleration support. Thank you– Elliott (Talk|Cont)   02:56, 13 February 2009 (UTC)


 * I'm pretty sure you can't. This bug was closed in December with "Direct3D support will be added later as well as OpenGL for Linux and Solaris guests".  This forum post explains why doing this is hard. 87.112.81.29 (talk) 15:25, 13 February 2009 (UTC)


 * While not answering your question, I believe VMware has Direct3D support although I'm not sure if it works in a Linux host Nil Einne (talk) 16:17, 13 February 2009 (UTC)

Tractive effort curve
I wonder if someone would be kind enough to generate for me a "tractive effort curve" for the article tractive effort which I am intending to improve. (and upload it to wikipedia under the relevent license).

An example of such a curve is found here (first diagram) http://www.twoof.freeserve.co.uk/motion1.htm

For the purposes of the article the graph does not need to be numerically labelled.

Assuming the y axis goes from 0 to 10, and the x axis from 0 to 20. I would like:


 * Y axis labelled "Tractive effort (Force)"
 * X axis labelled "velocity"


 * A maximum tractive at y=7, going from x=0 to x=4 ie a line from (7,0) to (7,4)
 * A continuous tractive effort curve starting at (7,4) with equation y=7/4x up to x=18


 * The y axis labelled "Tmax" at y=7
 * The 'knee' at (7,4) should be labelled - perhaps with a letter such as 'X'
 * The x axis should have a label "Vmax" at x=18


 * Additionally a dotted line descending from (7,4) to the x axis with the point at which it meets the x axis labelled "Vmpar would also be useful but is not vital.


 * Using different colours for the lines and axis (or other method of distinquishing) would be helpful

It would be very heplful if someone can do that. Thank you.87.102.43.12 (talk) 03:04, 13 February 2009 (UTC)


 * You can use an OpenOffice spreadsheet (it's free!) to create a graph meeting your requirements (well, after you fix the formula "y=7x/4" above). Just create a list of x and y values then click the "chart" button and select a line chart. Play with the options until you have something you're happy with, then post the image on Wikipedia. –  7 4   06:39, 13 February 2009 (UTC)
 * (corrected 7x/4 to 7/4x thanks) - was trying to avoid having to download and learning to use software for 1 graph - hence the polite and fawning tone..
 * I'm still open to offers.

OK I used a spreadsheet to create a file



I'm concerned it doesn't display well. Any suggestions as to how to improve it?


 * You beat me to it . (I had an awful time getting Excel to let me insert arbitrary text.) Anyway, I think your plot does a good job displaying the concept; my only concern would be that it's too big (since shrinking it down to fit in an article causes the text to become very difficult to read). –  7 4   20:05, 13 February 2009 (UTC)


 * (I had to add much of the text in a paint program..)
 * I think I should have used a bigger font - but shrinking the image also 'dissapears' the lines - suppose it needs thicker lines or something - but I don't know how to do that.
 * I'll mark this questionas resolved as the image will be good enough I think.
 * I believe the image needs to be vector image svg format to render better at small sizes. If anyone does come up with a better image please post a link on the talk page of tractive effort Thanks very much.

FengRail (talk) 20:13, 13 February 2009 (UTC)

I am trying to learn assembly and I am LOST
(I am using NASM on Windows x86) I have been getting so many mixed signals. For example, do I need to use the main:, code:, data:, etc. labels? Also, I have no idea why the following program won't work. I am meaning for it to print 2 on the screen. Why will this not work? "ah" is the register of the 21h interrupt. "dl" is the register the output "subprogram" uses, and "2h" is the output subprogram.

Another thing: when writing things in assembly for Windows, is the assembler output a function .exe or does it need to be linked. Thanks much in anticipation, Ζρς ι'β' ¡hábleme! 03:30, 13 February 2009 (UTC)

Update: I got the golink linker and MASM. I haven't tried the above source with MASM, but I got a demo .asm and it assembled it. I, however, don't know how to use the golink program. It errors everytime I try to link. Ζρς ι'β' ¡hábleme! 04:01, 13 February 2009 (UTC)


 * Why are you using DOS interrupts in Windows? To output text, you must use the Windows API. Or, if you still want to do low-level things, you can use the Native API through . I don't think your code would work in DOS anyway!   should be set to the character you want to output. You've set it to 2, which is STX ASCII control code. If you want to output the character '2', use this:  .--123.243.7.17 (talk) 05:53, 13 February 2009 (UTC)


 * Ok, well how do I implement Windows API in assembly. I have used it before for GUI C++ programming, but I don't know how to implement it in assembly.  Also, do I need to link the .obj to anything or is it just an executable (I don't it is, but I don't know what to link it to.)?


 * Actually, forget the Windows API. Use libc's printf. If you haven't learned how to call functions C-style:

push ... push arg3 push arg2 push arg1 call function_name add esp, 4*the_number_of_arguments_you_pushed


 * --123.243.7.17 (talk) 23:06, 13 February 2009 (UTC)

These days, you almost never write entire programs in machine code. Generally, you write the whole thing in C++ or something - and then analyse it to find out which code sections are taking the most time - and perhaps rewrite those in machine code. Since I/O is S-L-O-W, it's rarely going to be inside the innermost high-performance loops - so learning to write Windows API in machine code is really a waste of time. SteveBaker (talk) 01:34, 14 February 2009 (UTC)


 * Agreed. The best way to learn assembly is to use it inline with C. --wj32 t/c 04:50, 14 February 2009 (UTC)
 * I don't know about the Visual Studio compiler - but the GNU GCC compiler family have a '-S' command-line option that causes it to compile C or C++ into human-readable assembly code - examining that is a great way to learn what to do when you are integrating assembly code into C programs. On the vanishingly few occasions when I still resort to machine code - I write the code in C - let the compiler generate assembly code - then rewrite that code to make it run faster.  C compilers are so good these days that it's pretty tough to do better than they do.   The other benefit of my approach is that you can stick the original C code into a comment in the assembler.  This approach is also a HUGE help when you have to port mixed C/assembler applications onto different CPU's. SteveBaker (talk) 04:22, 15 February 2009 (UTC)

possible to construct 'binary' joke with the word neither?
So there is the old joke there are 10 kinds of people in the world: those who understand binary and those who don't. Is there a way to construct a version where the kicker is the word "neither"? Like, there are 10 kinds of people in the world, and neither of them laugh at binary jokes. Unfortunately this version is not funny. Would it be possible to construct a funny version of this same joke? Thank you. —Preceding unsigned comment added by 82.120.236.246 (talk) 05:16, 13 February 2009 (UTC)


 * "There are 10 kinds of people in the world, and neither of them expected me to use binary in this joke." It's still not funny, but it's progress :\ flaminglawyer 06:17, 13 February 2009 (UTC)


 * "There are 10 ways to construct a binary joke, neither of which is funny." (Good thing it's not funny, otherwise it'd be a self-contradiction.) –  7 4   06:46, 13 February 2009 (UTC)


 * there are 10 kinds of people in the world, and neither of them laugh at binary jokes is funny. No question about it, well done. actually made me laugh.FengRail (talk) 15:32, 13 February 2009 (UTC)


 * Mk 3 there are 10 kinds of people in the world, and neither of them find this joke funny —Preceding unsigned comment added by FengRail (talk • contribs) 16:03, 13 February 2009 (UTC)


 * 74.137.108.115's and FengRail first one are both good (needs plural for "laugh" though). 74*'s has better punch after the comma, and substituting "make" for "construct" would make it even tighter.

Mk 3 is no good; its missing the crucial "binary", but adding it ruins its flow. -- Fullstop (talk) 17:32, 13 February 2009 (UTC)


 * Thanks so much guys!! What teamwork!!  With FullStop's addition, I am now settling on the version there are only 10 ways to make a binary joke, and neither of them is funny.  Good job guys.  —Preceding unsigned comment added by 82.120.236.246 (talk) 02:04, 14 February 2009 (UTC)
 * It's still not quite as good as the original - we're left wondering what the OTHER non-funny binary joke is.  The original stated what BOTH kinds of people are like so it was 'complete'.  But all jokes become horribly un-funny when you over-analyse them!  I was wondering if we could work in the fact that it is "a bit funny". SteveBaker (talk) 04:17, 15 February 2009 (UTC)


 * There are 11 types of people: those who understand binary, those that don't and those who don't realize that this joke is never funny when spoken out loud.

Capture video/audio output
You know how on Windows/macs, the Prnt Scrn and the snipping tool (called Grab on a Mac) captures the video output and saves it. I was wondering if there was a similar application available that captures audio output. Is there such a program? -- penubag  (talk) 09:32, 13 February 2009 (UTC)


 * Audacity runs on OS-X. I've not used it on that platform, but on linux and windows (so surely macos) it can be set to record to the "output mixer", which is essentially what gets played out of the speakers. That said, Vista's secure audio path is supposed to allow DRM-enabled players to avoid that "hole" (I don't know if anything really does); I don't know if OS-X has anything like that. Anyway, try Audacity. Mimetic Polyalloy (talk) 12:07, 13 February 2009 (UTC)
 * Wow! Thank you!! It works like magic! Just what I wanted! I salute to you, Mimetic Polyalloy. -- penubag  (talk) 01:46, 14 February 2009 (UTC)

Computer Virus
Where are computer virus files located in computer?Is not it possible to delete them? —Preceding unsigned comment added by 202.70.74.135 (talk) 14:18, 13 February 2009 (UTC)


 * If you take a look at our article Computer virus you should find the answers you seek. -- LarryMac  | Talk  14:59, 13 February 2009 (UTC)


 * They hide from you, they exist in multiple places, they hijack good programs, they mask themselves as things they are not, they watch to see if you try to delete them and then restore themselves—all of these are easy for a qualified programmer. "Just deleting them" is not an easy thing to do. --98.217.14.211 (talk) 15:52, 13 February 2009 (UTC)


 * Note that if you really mean a computer virus as opposed to other malware like trojans and worms and the like it should always be part of a host file. Often a virus will try to infect every compatible host file on your computer Nil Einne (talk) 15:56, 13 February 2009 (UTC)


 * A host is required, but some early computer viruses infected boot sectors; more recently, portable storage and mobile electronics are tempting hosts. With the proper OS vulnerabilities, a virus could infect a file system, a directory, any OS metadata, or even free disk space! –  7 4   16:37, 13 February 2009 (UTC)

PDF > DOC Converter
Is there any software that will put a Japanese .pdf into a .doc? I don't mean a tranlsator, as in language, as that is my job, I mean one that will convert from .pdf into .doc. I have one that does English very well, but not one for Japanese.--KageTora (talk) 15:54, 13 February 2009 (UTC)


 * What I do for an English PDF, and I don't see why it wouldn't work for Japanese, is highlight the entire document, copy the text and paste it into Word. -- SGBailey (talk) 09:54, 14 February 2009 (UTC)


 * Adobe Acrobat Professional will do it. It comes with Japanese fonts and also is sold as a Japanese version. You just go to File --> Save as...--K;;m5m k;;m5m (talk) 10:06, 14 February 2009 (UTC)
 * Zamzar can do it for you, too. Gary King  ( talk ) 22:16, 14 February 2009 (UTC)

1.6GHz
how good is 1.6GHz for a compuetr? it is enough to play games and watch filmes? —Preceding unsigned comment added by 194.80.240.66 (talk) 16:33, 13 February 2009 (UTC)


 * Films, probably. Games, not new ones. Part of it depends on whether that is one 1.6GHz processor or two 800MHz processors, though it seems more like that it is the former than the latter. --98.217.14.211 (talk) 16:51, 13 February 2009 (UTC)


 * Even if its a single-threaded player, and a dual core machine, an 800 is more than fast enough for DVD. If the screen resolution is greater than the film's, and the film is being watched in a window (i.e. no zoom necessary), then 800 is even good enough for baseline or main profile DivX/MPEG-4. YMMV. -- Fullstop (talk) 17:43, 13 February 2009 (UTC)
 * And if you have some sort of hardware video acceleration then you can do pretty well as well. I brought up the core distinction mostly for the question of games. --98.217.14.211 (talk) 01:03, 14 February 2009 (UTC)
 * You mean like a 1.6 GHz Intel Atom, or Pentium, or AMD semprom type processor? - Good enough for DVD films (with a bog standard bottom of the range graphics chip eg Intel 945 or whatever - the sort that comes for 'free' with the computer)
 * Probablu not good enough for Hi-Def )eg blue ray films - unless you have a separate chip for this.. —Preceding unsigned comment added by FengRail (talk • contribs) 18:00, 13 February 2009 (UTC)
 * As for games - what sort - will not run recently made 'full price games' - will run older games, flash games etc..  —Preceding unsigned comment added by FengRail (talk • contribs) 18:01, 13 February 2009 (UTC)


 * "1.6ghz" is really not enough to tell you anything. See Megahertz myth. Core 2 Duos running at 2ghz can easily outperform older Pentium D chips at 3ghz. You have to be more specific to get a true answer. 67.169.118.40 (talk) 02:17, 14 February 2009 (UTC)

subject line "another option" in Apple Mail
For some reason, I am not able to send a message with the subject line "another option" in Apple Mail, version 3.5. A bit of fiddling has demonstrated that all of the following work: ".another option", "another optionasjkdfl", "another option askfljd", and "another option" (2 spaces). In short, it seems that only this specific subject line causes the message to not send. Anyone know why? Lesgles (talk) 18:30, 13 February 2009 (UTC)


 * What do you mean by "not to send"? Do you mean it gives you an error or it just doesn't arrive? I just sent myself a message with that subject with Mail 2.1 and it worked fine. My suspicion, barring more information, is that that particular subject line triggers a spam/virus blacklist on either your server or the server you are sending it to. --98.217.14.211 (talk) 19:27, 13 February 2009 (UTC)


 * The message goes to the outbox, then opens up again without sending. It could be the server; I know someone else tried it and it didn't work, but she is on the same server. Lesgles (talk) 19:30, 13 February 2009 (UTC)


 * It could be that the configuration for your SMTP server is set to block messages with a subject that contain the substring "another option". I suggest contacting your computer support about it. --  JSBillings  23:12, 13 February 2009 (UTC)


 * I just tried it on my machine (Apple Mail 3.5 (930.3) under OS X 10.5.6), and it sent fine. So count this as another vote for something on the server. -- Speaker to Lampposts (talk) 09:52, 14 February 2009 (UTC)


 * Thanks! We'll see if I actually contact computer support; for now it's easier just to write "another possibility". Lesgles (talk) 06:24, 16 February 2009 (UTC)

VB.net: extra point for football program
I have an assignment where I have to create an American football scoreboard program in Visual Basic .NET. It's very simple: if I click the touchdown button, I add 6 to the label displaying the score and so on. How do I program the two checkboxes for extra points? I want them to be selectable only after a touchdown. -- hello, i'm a member  |  talk to me!  19:53, 13 February 2009 (UTC)

Nevermind. I understand now. -- hello, i'm a member  |  talk to me!  20:02, 13 February 2009 (UTC)

Bluetooth, WiMAX and Wi-Fi - are they Communications protocols?
would like to get your comments, here: Talk:Communications protocol. Thanx, TaBaZzz (talk) 20:04, 13 February 2009 (UTC)

I need help
I originally asked the question over at WP:Help desk regarding an edit to Hidden messages in which certain Windows fonts are used to illustrate an example that can only be understood by viewing them in Internet Explorer, which I made clear in the section. Another editor changed it, but I'm not so sure as to which version is correct. Someone who has a knowledge of this would be really helpful, which is why I'm here. -- Wh ip it !  Now whip it good! 21:37, 13 February 2009 (UTC)

Aside from anything else - you should not put content into the encyclopedia that only certain browsers can read. May I suggest getting a screen dump of those strings rendered in the appropriate fonts under IE and inserting that into the article as an image file. SteveBaker (talk) 01:25, 14 February 2009 (UTC)


 * As I understand it, he didn't; he merely indicated that the content required IE. But I agree it would be preferable to have an image file so the page content is not dependent on a specific browser. Here is an image of the characters 'NYC' in wingdings and webdings (which I, the creator, release under whatever license is necessary) if anyone would like to update the article. –  7 4   03:11, 14 February 2009 (UTC)
 * Thanks. -- Wh ip it !  Now whip it good! 06:25, 14 February 2009 (UTC)

Playstation 3 and F.E.A.R. Surround Sound is Wonky
While playing F.E.A.R. (the first one, trying to catch up before I get F.E.A.R. 2), I was sneaking up on a guy who was patrolling. I noticed that when I was facing him, I could hear his footsteps from my REAR speakers. I just put up with it for awhile, until I got to the place where the game plot introduces enemy-placed proximity mines. The mines blew up, and I could see and hear electricity arcing across the hallway. As I turned, I noticed left was right, and right was left.

I don't have this issue in any other game. I have an optical cable running from my PS3 to my audio system (an old Cambridge Soundworks/Creative Labs bundle, a bit like this, but with a different receiver). I have the PS3 set to Digital Out (Optical) as it should be, and I enabled Dolby Digital 5.1 Channel (when I play games the Dolby Digital 5.1 LED is illuminated on the system). I just ran the test function (which plays white noise on all the speakers in this order: L, C, R, RS, LS, SW) and it worked correctly, though I double-checked the rear connections just in case (they were fine). I couldn't find anything searching through Google, so I'm hoping someone out there has a similar set up with a similar issue, and even better, I hope they've solved the issue and can tell me how :).

Thanks. --Silvaran (talk) 22:43, 13 February 2009 (UTC)
 * Have you run an audio channel test on the PS3 itself (ie on a DVD or BD)? 24.76.160.236 (talk) 01:42, 14 February 2009 (UTC)
 * Most PC games have an option to reverse the stereo from left/right to right/left to allow for incorrect speaker setups. Does the audio options on this game on the PS3 have this facility? Exxolon (talk) 15:54, 14 February 2009 (UTC)

Screw it. I unplugged the center channel, swapped the front/back pairs, then swapped each of the left/right pairs. It seems to be correct now. :) --Silvaran (talk) 22:04, 15 February 2009 (UTC)