Wikipedia:Reference desk/Archives/Computing/2015 March 16

= March 16 =

What programming language did Punched cards use?
Back then, when people were punching holes in paperboard cards, what programming language did they use? --Senteni (talk) 02:34, 16 March 2015 (UTC)


 * Various languages, including FORTRAN, COBOL, PL/1, and assembly languages. Robert McClenon (talk) 02:38, 16 March 2015 (UTC)
 * GNU_Cobol still supports the column formatting and width restrictions needed to print the program on the cards (although as an option, not a requirement).OldTimeNESter (talk) 12:16, 16 March 2015 (UTC)
 * And somewhat later, on the IBM 96-column cards, RPG II. &#8213; Mandruss  &#9742;  02:51, 16 March 2015 (UTC)


 * See History of programming languages for some early ones. Bubba73 You talkin' to me? 04:03, 16 March 2015 (UTC)
 * There's a Youtube documentary on punch cards, and it looks like they are using ALGOL. I can't post the link, but I highly recommend it for a glimpse of how good we have it today (both programmers and users).OldTimeNESter (talk) 12:16, 16 March 2015 (UTC)


 * I used punched cards during my last two years in highschool and my first year in college (early 1970's) - we used did coursework in high school in Fortran and using Algol 60 in college, but Cobol would also have been common and certainly PL/1 was available. We also used BASIC, but that was available for interactive work on Teletypes - we had a TINY allocation of hard disk space - so we tended to use paper tape rather than cards.  But punched cards were just one option for storage.  We also used paper tape, and (more rarely) magnetic tape.  We had a PDP-11 computer with a small hard drive and (best of all) "DECTape" - which was truly the best option for us - since that was a UNIX machine, we could program it in C.  The choice of programming language was really completely independent of the storage mechanism.


 * I would often type my Algol 60 programs in on a teletype, save work-in-progress temporarily to paper tape - and then send it off to have the mainframe operators transfer it to punched cards so I could submit it into the batch system for compilation and execution. In college, we had a programming languages course where we learned a new language every week...so there must have been at least 20 languages available in some form or another.


 * It's kinda like asking what programming language you'd currently use for things stored on a thumb drive rather than a hard disk...it doesn't really make sense. SteveBaker (talk) 05:21, 17 March 2015 (UTC)

MS Sculpt Bluetooth mouse erratic pointer
When I use my MS Sculpt Bluetooth mouse, especially after several minutes of use, the pointer starts to develop a mind of its own and it becomes increasingly difficult to direct it to buttons and slider arrows. Rebooting fixes it - for a while. (Pointer control is always fine if I use the touch pad.) What should I do? Hayttom 05:05, 16 March 2015 (UTC) — Preceding unsigned comment added by Hayttom (talk • contribs)

[I just tested a wired mouse and it works perfectly, so the problem is definitely related to my mouse or Bluetooth. Hayttom 05:26, 16 March 2015 (UTC) ] — Preceding unsigned comment added by Hayttom (talk • contribs)


 * Could be any of several things, but the first things I would try are changing the mouse batteries and cleaning the lens under the mouse. Use a mousepad if you are not already doing so.--Shantavira|feed me 08:57, 16 March 2015 (UTC)


 * I associate this behavior with reaching the range limit on a wireless mouse. Many have absurdly short ranges.  Note that the range listed is usually "up to" a certain distance, but they never actually give the average or minimum range.  New batteries might extend the range a bit, but I wouldn't count on it. StuRat (talk) 21:59, 16 March 2015 (UTC)


 * I should have mentioned that this problem had gradually arisen, which might then have indicated even to me that batteries (or dirt) were to blame. I have just bought some new good-quality batteries (not completely easy in my remote part of Bangladesh) and PROBLEM SOLVED.  Thanks.  103.230.105.25 (talk) 13:15, 19 March 2015 (UTC)

PHP reading a .txt file
Hello, how would I do I get php to pull information from a .txt file? I need to have the code search for 10 different names in the txt file like example: Line 10 of the txt file reads "John, Carpenter, 20, 20, 50" Then the php program prints: John was a Carpenter age 50 earned 20 dollars in 20 hours.

How do I go about selecting different information from each line from a txt file? — Preceding unsigned comment added by 204.42.31.250 (talk) 15:24, 16 March 2015 (UTC)
 * Is this what you're looking for? http://php.net/manual/en/function.fgetcsv.php OldTimeNESter (talk) 16:04, 16 March 2015 (UTC)

I am not sure, I am very confused about this specific PHP aspect. The webpage doesnt help me that much because I dont understand it. I dont get how to write the code using that. How do I assign each section of the line to variable? like "John, Carpenter, 20, 20, 50" I to assign all 5 options in the line to a different variable like: first part of the line = $name and then second part of the line = $profession and so on for the last 3 parts of the line. — Preceding unsigned comment added by 204.42.31.250 (talk) 17:19, 16 March 2015 (UTC)


 * The example code on that page opens a file, reads in the data, line by line, and prints each value, one at a time, per line. If that is not clear, you need to work more on general PHP and then come back to this specific problem. It is also very important to be able to read the documentation pages, such as the one provided above. PHP is a very well-documented language. If you avoid the documentation, you will have great difficulty with the language. 209.149.114.176 (talk) 12:11, 17 March 2015 (UTC)

I read the page, I need to know how I can assign each part of the the line to a variable so that the contents between each comma in the text file is assigned a variable. The page doesnt tell me how to do that and that is what I am asking. — Preceding unsigned comment added by 204.42.31.250 (talk) 14:46, 17 March 2015 (UTC)


 * The example code uses a loop to get a line of data from the file and store it in the array . It then counts the number of fields (i.e. data items separated by commas: there are 5 in your case), and stores this in  . Then, it uses the variable   as the index to the array , and prints the data item in   in a for loop. It keeps doing this until   returns FALSE, which means that the end of the file has been reached. Here are the critical lines from the example code:

The key idea is that each line of data is stored in an array, and you use an index to the array to print the data. This is a typical way to do this sort of thing, and it saves you from having 5 different variables in your program. Hope this helps. OldTimeNESter (talk) 18:01, 17 March 2015 (UTC)

Help finding a game manual
I've got a PC CD Rom game called Revolution that I bought years ago & I can't remember if I bought it with a manual & I've lost it or there wasn't one with the game when I bought it. Does anyone know where I can find a replacement manual ? 194.74.238.137 (talk) 15:58, 16 March 2015 (UTC)