Wikipedia:Reference desk/Archives/Computing/2009 August 7

= August 7 =

PHP/MSQL assist
This is one of those days where things avoid me and my ability to describe is subpar, so excuse me and try to bare with me.

I am trying to make something similar to a poll but for the life of me I can't remember how to do this, so I come to you guys. Here is a basic layout to give you an idea of what I am working on doing. There are two textareas, one of which is a multiple line and the other is a single line. Below the multiline is an Add Button, Subtract Button and the singe line (not in that order). So you write a value..in a numerical fashion...like 2 and hit add, I want that value to be checked against the existing in the multiline box and then redisplayed as the outcome number. So let us say the multiline number is current 6. I'd like it to go "Alright, so you are currently 6? I want you to add 2 then display the outcome.". I would like for the new value to replace the old one inside a MYSQL database...which I have also managed to forget today, perfectly able to add a new value as long as the old still exist..can't remember for the life of me how to make a new value and remove the old one...anyways, if you need anymore clarification just ask, thanks guys.  Rgood erm  ote    01:33, 7 August 2009 (UTC)
 * Quick clarification, the question is, what is the code or the functions needed for this?  Rgood erm  ote    01:34, 7 August 2009 (UTC)

S/PDIF
HELP! I just bought a 3.5mm to digital optical so that I could plug it in my soundcard (Creative Audigy 2 Sound Blaster) into my receiver and listen to music from iTunes via my surround sound. The problem is that I plugged it in both of them and no sound came out! I tried it on Vista and XP, it didn't work on either :(. Thanks for the help! --71.117.37.217 (talk) 02:39, 7 August 2009 (UTC)
 * Well at a guess, there would be some setting where you have to enable the digital output.. Have a look through the "sounds and audio devices" settings in control panel, and if you still can't get it going then RTFM. ;) Vespine (talk) 05:07, 7 August 2009 (UTC)


 * I've already tried enabling S/PDIF out, then made sure it was un-muted on both OS's. If I had the manual I wouldn't be asking here... --71.98.18.213 (talk) 18:50, 7 August 2009 (UTC)
 * Well, here's the Audigy manual. I noticed on one of the web pages at Creative's site that SPDIF output is not supported on sources protected by Microsoft's DRM.  Not sure how that would affect output from iTunes.  Have you tried just playing a system sound via your receiver?  Is there any setting on the receiver to enable digital input for whichever source you've chosen?  If you have the cable connected to the Soundblaster, can you see a red glow at the optical end?  -- LarryMac  | Talk  19:11, 7 August 2009 (UTC)

Windows security blocking my Safari downloads
Everytime I try to download a file in Safari, I get a pop-up from my Windows security system (or whatever it's called) that says something similar to "Windows found this file to be potentially harmful" and blocks the download, how can I disable this?  • S • C  • A • R  • C • E •   02:43, 7 August 2009 (UTC)
 * May I ask what OS you are using (XP? Vista?)? Also you ever tried to download from IE or Firefox? It could be that your Windows Firewall..or Windows Defender..or whatever the call it today is set too high and just blocks everything or this is some new form of denial of service attack by windows (ignore that paranoid statement).  Rgood erm  ote    03:14, 7 August 2009 (UTC)
 * Yeah, I currently have IE8, Firefox, Safari (of course) and Opera, because it seems like some browsers give you different features or because I don't feel like transferring my content I have saved when I try a new browser :). I do all my downloads from Firefox but Firefox is rather slow to load and I shouldn't have to do that. I disabled my security system and it still blocked it. I use XP Professional  • S • C  • A • R  • C • E •   03:20, 7 August 2009 (UTC)
 * Um, well could it be that just maybe it is an actual virus? I know Windows Defender can be wrong..often...but how about trying to download it from IE (Microsoft's baby) and seeing what it does? If it does it in IE, it isn't MS blocking Safari.  Rgood erm  ote    03:34, 7 August 2009 (UTC)
 * Every single download I attempt gets blocked. I downloaded Opera and it got blocked, I doubt that file is a virus, and the warning says "potentially"  • S • C  • A • R  • C • E •   03:50, 7 August 2009 (UTC)


 * Are you on the latest version of Safari? I have the same OS as yours and the same browsers (and then some!) and have never had this trouble. Of course I have the built-in Windows security system turned off. That may be what you'll have to do, too. Use the firewall from your anti-virus instead. But if the problem is in Safari only, it could be a glitch in the particular minor version WebKit it's running on. Download the latest updates (to Safari, not WebKit) and see if that works. - KoolerStill (talk) 10:16, 7 August 2009 (UTC)
 * Unless you are downloading .exe files Windows Defender won't normally alert. Have you got any internet security settings turned up to 11?83.100.250.79 (talk) 14:11, 7 August 2009 (UTC)
 * I have a suspicion it's related to this - - it may be that MS has decided to block downloads to protect you the use...
 * Are you using third party firewalls or anything like that. Also are you using any other browsers? Has the problem just started (windows update?) or always been like that.
 * I'd recommend uninstalling and reinstalling safari, make sure internet options are set to default.83.100.250.79 (talk) 14:26, 7 August 2009 (UTC)


 * There's another possibility - are you getting this message "File download - Security warning - do you want to open or save this file" every time - if so go to preferences (press the cog button top right hand corner, select preferences) then in the dialog box, select general, in the section "save downloaded files to" uncheck the "prompt before downloading box" ie no tick. Then close.
 * Once you have done that when you try to download a file the warning box will still appear at first - but with a new item "always ask before downloading this type of file" - if you uncheck that box (no tick) - the next time you download a file you will go straight to the "save to" dialog.
 * You'll get the box for each type of file eg .jpg, .pdf , .doc , once only - and it will only appear if you try to download a type of file you haven't downloaded before. Hope that helps.83.100.250.79 (talk) 14:55, 7 August 2009 (UTC)

Microcomputer I/O before the TV Typewriter
Before the TV Typewriter kit became available, what did home microcomputers use for input and output? Neon Merlin  06:15, 7 August 2009 (UTC)


 * On things like a Altair 8800 you toggled switches on the front and little lights went on and off. As most people who owned such machines were electronics hobbists, or at least knew some, they might rig up some fancier arrangement of lights or switches to a serial or parallel port. If someone had a lot of money, they could hook up a teleprinter, which was the way minicomputers and mainframes did human IO until the VDU. -- Finlay McWalter • Talk 14:27, 7 August 2009 (UTC)

Learning C
What's a good book/website for learning C (NOT C++)? The problem is that I'm not new to programming, I can program in Java, C++ and few more languages. all the books and websites I've found are aimed at novice programmers with little or no programming experience or are about C++ (Obviously Bjarne Stroustrup wasn't aware of how hard it is for search engines to distinguish C from C++, since there were none back then). I want to learn C without C++ because the linux kernel and alot of open source projects are written in pure C. And I find the combination of C and C++ quite confusing.
 * To rephrase: I want to migrate from Java to pure C. What books or websites do you suggest? 95.84.72.151 (talk) 10:15, 7 August 2009 (UTC)
 * As an aside to search for "C" type C -"C++" into search http://www.google.co.uk/search?hl=en&q=c+-"c%2B%2B"&btnG=Search&meta=  or more specifically tutorial c -"c++" -"c#" -"hepatitis" -"objective-c" -"c-sharp" (edited) 83.100.250.79 (talk) 10:31, 7 August 2009 (UTC)


 * "THE" book for C is "K&R" -- the original book by Kernighan and Ritchie who wrote the whole language. Slim and simple and all you need, especially if you have programmed before.
 * This online/downloadable tutorial claims to be specifically for experienced programmers. Your C++ compiler should be able to handle pure C, if you set it up appropriately. If you work through the examples in the book, you'll have it down, by the time you get to the end. Don't be fazed by it being a lot more cryptic than the object-oriented languages. That is the beauty of it; you can get on with telling it what to do,not worry about spelling a 31-character name. - KoolerStill (talk) 10:34, 7 August 2009 (UTC)
 * Searching for "C tutorial" also misses most of the C++ eg
 * In fact it turns up this, (note the disclaimer) , by Brian Kernigan, which should be a good intro, despite being out of date.83.100.250.79 (talk) 14:06, 7 August 2009 (UTC)


 * There is an excellent book called "C for Java Programmers" - $70 at Amazon. If, as you say, you are a proficient java programmer, then you need some "translation" about some fundamentally identical concepts, and some "transformation" about some fundamentally different concepts in pure C.  One of the biggest things that I had a hard time with was that C is much less standardized than Java - while Java had Sun Microsystems' rigorous specification, C evolved, flourished, contracted, and reflourished, several times over the last decade.  A few "versions" exist, and you probably want to stick with ANSI C or the slightly expanded version supported by the Gnu C Compiler.  (Or possibly, you want to use one of the Microsoft compilers, but for a beginner, you will have a hard time learning what is a language construct and what is a part of the Windows and MFC API).
 * Obviously, as you know, C is not object-oriented. There are no classes; there are no instances; but you can use struct and pointers to "fake" some object-like behavior (or at least keep your code modular).  Scope of variables still exists, but you will probably need to learn about the "extern" description, because there is a difference between "declaring" and "creating"a variable in C ((e.g. declaring vs. allocating stack or heap space - this concept did not exist in Java).  C language uses static in a totally different way than Java - it has to do with locally scoped, globally present variables.  Threading is not natively supported but is widely available using standard thread libraries.  Memory is not automatically allocated; you must explicitly allocate heap memory; and you need to learn the difference between Heap and Stack (which also existed in Java, but you probably ignored).  You need to understand the role of the C Preprocessor (and learn to use it just enough to get the job done, and not any more).  You should learn about linking, because this part of the compile process never got your attention in Java (not in Java SE, anyway, unless you played with the runtime classloader for fun and profit).  C does not natively support Exceptions, nor try/catch blocks.  If you get stuck on any of these specific concepts, please feel free to post specific questions; I'm just trying to point out some major conceptual obstacles you might encounter so that you realize you've hit a "weird different thing" you never realized would be different.  Nimur (talk) 15:03, 7 August 2009 (UTC)

Old Website URL
Hi, my company migrated to a new website, however some pages on the new website still have the old URL. Note all the content on those pages is correct and up to date. Any idea how to stop the old url from getting displayed in the address bar of the new website?

Thank you for any assitance.217.17.248.45 (talk) 14:38, 7 August 2009 (UTC)


 * What you mean by "some pages on the new website still have the old URL" - surely if they have the old URL, they're in the old website? Or do you mean that search engines like Google are still finding the old site, and you'd like visitors to be redirected to the new one? -- Finlay McWalter • Talk 14:41, 7 August 2009 (UTC)

What i mean is when i click on a subpage, im taken to the desired page, but the url displayed in the address bar changes to the old website address. 217.17.248.45 (talk) 15:36, 7 August 2009 (UTC)


 * The browser merely displays the URL of the page it was told to go to. So if a browser is displaying an old-site url, that's where you really are. It sounds like links inside your new site are defective; that they should be pointing to new-site pages, but are still pointing to their old-site equivalents. So the fix is to fix those pages. There's a chance, depending on how your web server is configured, that you've added url-rewrite rules to the server configuration (which point certain incoming urls to the old site); the fix for that is to alter, or remove, the url-rewrite rules from the server's config. Some other possibilities: your browser, or some intermediate cache, is storing old versions of pages, so clear your caches (a good way to tell is to have the scripts that build web pages put timestamps in html comments - if you're seeing a page that should have been fixed, check its source to verify that it's been generated since you made the switch).  And lastly you might have some non-obvious way of doing navigation, like a flash-menu, whcih has URLs embedded in it, and which you've neglected to fix. -- Finlay McWalter • Talk 15:42, 7 August 2009 (UTC)

Can you give an example?83.100.250.79 (talk) 15:48, 7 August 2009 (UTC)


 * It's very likely that they redirected the old DNS name to the new server (for in-transition compatibility) - you say that the old URLs are delivering updated, new content. So either the old server is still alive, and automatically mirrors the new server; or the old DNS name is now pointing to the new server.  Hopefully the web administrator will eventually update the hyperlinks in the pages and completely remove the old DNS name.  Are you the responsible person who needs help with this updating/transition process, or are you just curious why your web administrator has not finished the transition yet? Nimur (talk) 17:29, 7 August 2009 (UTC)

hi, im the Techie who works for this organization, and assigned the task of fixing this mess. Our new website is www.rvis.edu.bh, and the old one(which btw is still active, can this be deleted now?) www.riffaviewsschool.org. You might get a clear idea by visiting the new website and navigating to its sub pages. The website is managed by finalsite not me. Not sure who i should be contacting to fix this. Appreciate your help. 217.17.248.45 (talk) 19:44, 7 August 2009 (UTC)
 * It looks like most of the links connect to the new website, but the news links connect to the old ones - I'd suspect this is because the news is from an archive prior to the new website? Assuming you had a redesign I'd suspect that the old links were kept so that links from external sources did not become broken.
 * The obvious solution would be to contact whoever does your website design and get them to update the news stories so that they are on the new site. At least that's the answer if I've understood correctly.83.100.250.79 (talk) 19:56, 7 August 2009 (UTC)
 * It also looks like you should be asking to redirect all traffic from the old name to the new name.83.100.250.79 (talk) 19:57, 7 August 2009 (UTC)


 * That shouldn't be necessary, but it couldn't hurt either. All you really need to do is go through the News section and change all the links that start with "http://www.riffaviewsschool.org" to "http://www.rvis.edu.bh" and everything should work just fine. I'm not familiar with Finalsite, so I can't give you an exact walkthrough - if you have any trouble, you could ask those guys for help. Indeterminate (talk) 11:35, 8 August 2009 (UTC)

Thank you guys for all your help.RVIS Techie 80.88.241.94 (talk) 08:10, 9 August 2009 (UTC)

real time processing?
When you convert Kbs to Mbs on this site, you get results real quick. Is this real time processing? Apparently, it is not the server where the page is hosted doing the calculation. Where is the calculation done then? Is it performed using the resource of the client side computer? The page uses javascript. Can python do the same function?--Clericalmonk (talk) 16:59, 7 August 2009 (UTC)


 * It's javascript running in your browser. -- Finlay McWalter • Talk 17:02, 7 August 2009 (UTC)


 * It is probably not real-time processing. Real-time processing typically refers to a computer system running an algorithm that is guaranteed to complete operation in an exact amount of real clock-time.  This requires, among other things, total control of the operating system scheduler (or lack of a scheduling operating system), as well as a known hardware configuration.  Javascript, Windows, Firefox, "personal computers," and most of the stuff that you work with (including this example that you posted) strictly do not fall in to this category.  They may be called "very fast and responsive processing" but they are not "real time computing."  Nimur (talk) 17:32, 7 August 2009 (UTC)


 * Python can do the same calculations, but won't run in a browser (normally) - there are work arounds to getting python code to run in a browser, but in general it doesn't currently happen (as far as I know)83.100.250.79 (talk) 20:32, 7 August 2009 (UTC)

Follow-up question
Referring to, this may explain why I couldn't get on once I plugged the modem back in. I've been told to unplug the modem when the phone company had problems but the Internet was back. I mentioned what happened when I made a phone call in hopes of hearing there might have been such a problem that needed solving.

Why is it that if the computer is hung up causing the circle to just go around and around, it can't just find the web site it is looking for when the Internet comes back?

And what does it mean if the cursor turns into a circle going around and around too? Vchimpanzee ·  talk  ·  contributions  · 17:52, 7 August 2009 (UTC)
 * If the cursor goes round in a circle it means 'waiting' or 'processing' - in this case it may be waiting for a connection or for a download of a page to finish. I'm sorry I can't answer the rest of your question.83.100.250.79 (talk) 19:59, 7 August 2009 (UTC)


 * I see you stated in the earlier thread that you have DSL. That's good.  In the future, you'll need to mention DSL every time you ask a question here, because if you just say "modem" then we're all going to assume it's a dial-up modem instead of a DSL modem.  When your computer just does nothing and the "waiting" circle goes round and round forever, it may be waiting for a number of different reasons.  I think the most likely one is that your computer has not connected successfully to your ISP (the phone company).  One thing I always try is to click Start then in the "Start Search" field that appears, click and type "cmd" and hit Enter.  A command prompt will appear.  Type ping www.yahoo.com and hit Enter, and tell us what happens.  Tempshill (talk) 20:50, 7 August 2009 (UTC)


 * Sorry, I forgot I had even asked a question.


 * Yeah, once when I was unable to get on the Internet I was told how to type "cmd" and I think I have that written down somewhere too. I think that's what I was expecting from tech support. In that other situation, the light on the back of the computer wasn't working and they couldn't help because that involved calling the manufacturer, whose tech support people said do a system restore.


 * Thanks. Vchimpanzee ·  talk  ·  contributions  · 21:50, 7 August 2009 (UTC)

anonymous free (or low cost) email service?
This is not to disparage the free email services by companies like Yahoo!, Google, MS (Hotmail), et al. I just don't want to choose between (a) giving information like my name, birthdate, or ZIP code on the registration form; or (b) lying about such--however easy it might be. I'm not too worried about the computer I'm using--this one is in a government office. I'm not a terrorist. I'm well over 18. I'm not a spammer. (Pity those in China or Iran who have to face lying even more.) I just want something were I can (a) get an address, (b) require only a password, (c) type out the funny looking words to prove I'm a person. Any info would be appreciated. Thanks. —Preceding unsigned comment added by 68.179.108.25 (talk) 19:52, 7 August 2009 (UTC)
 * They exist - ireland . com only requires your age (not date of birth)- no address, dna sample etc, there must be others, have you tried all the ones in the Comparison of webmail providers, Comparison of e-mail clients 83.100.250.79 (talk) 20:48, 7 August 2009 (UTC)
 * Why not just put gibberish in for the Gmail registration for First/Last Name? The only other stuff you seem to have to put in is the e-mail address you want (what an idea!), your password, a location (set it to Canada?) and the CAPTCHA. Washii (talk) 07:31, 8 August 2009 (UTC)
 * He said he didn't want to lie, even though he knows he can.


 * Looks good. I've thought of the gibberish idea too. I also thought of blantant lies--such as gibberish, emailing the very service--telling them what I've done and why, and waiting a few months. The problem is, the deed would be done (the lying), I'd have to wait a few months, and I might get an email from them telling me the answers is "no."68.179.108.25 (talk) 15:50, 8 August 2009 (UTC)


 * Though, for all practical purposes, the lie is pretty white. I mean, it's not like the services are actually going to care all that much. I know—obviously for you it's about "the principle of the thing" but still, the principle of the thing is about not wanting to give obvious bogus data to free e-mail providers, and that's a pretty small principle. I assure you that nobody—NOBODY—actually cares if you lie on those forms. In any case, Gmail's prompt asks only for "First name:" and "Last name:". If you put in "First name" and "Last name" as the respective fields, you'd technically be telling the truth ("First name"="First name"), and thus not technically lying. (Perhaps you were just confused.) --98.217.14.211 (talk) 19:29, 8 August 2009 (UTC)


 * It's still "technically" a lie if you intend to decieve - by the dictionary (SOED) definition of "an intentional false statement" or "Something that deceives", or by the Wikipedia article definition of "a type of deception ... especially with the intention to deceive others". Although you could argue that an obvious withholding of information (eg First name="first name") isn't a lie, because you are not deceiving, you are instead overtly not providing the information. Mitch Ames (talk) 00:22, 9 August 2009 (UTC)
 * Well ignorance is no excuse in the eyes of the law etc... But the OP already stated that he didn't want to lie (no matter how creative; the "address=address" idea was funny :)
 * They've already got one email provider that matches - but I know that they don't do POP/IMAP for free - can anyone suggest one that does do everything for free and without any personally identifyable details?83.100.250.79 (talk) 00:27, 9 August 2009 (UTC)

Setting up spell check in Opera
How do you set up spell check for Opera? I already installed GNU Aspell and the English dictionary (aspell-en-0.50-2-3.exe). Yet it doesn't seem to be working, did I miss something?  • S • C  • A • R  • C • E •   20:55, 7 August 2009 (UTC)
 * Did you check the instructions (we've all got to) - maybe you didn't check the spell checking option - if that doesn't work something is seriously wrong.....83.100.250.79 (talk) 21:23, 7 August 2009 (UTC)
 * Did you fix the download problem with opera you had before?83.100.250.79 (talk) 21:52, 7 August 2009 (UTC)


 * It won't check as you type. Right click in any text field and choose CHeck Spelling to check the whole field. To check one word or phrase, highlight it first. - KoolerStill (talk) 22:32, 7 August 2009 (UTC)


 * "Restart Opera" oops! Works now, thank you.  • S • C  • A • R  • C • E •   03:04, 8 August 2009 (UTC)