Wikipedia:Reference desk/Archives/Computing/2014 January 9

= January 9 =

Java assignments?
I've found a number of sites that teach C, JavaScript, Python, etc but haven't found anything that does the same for Java. Does anyone know of such a site? Or one that has maybe just some projects or assignments that move up in difficulty? Thanks, Dismas |(talk) 02:34, 9 January 2014 (UTC)

There are many books on Amazon under $20 each. --AboutFace 22 (talk) 03:31, 9 January 2014 (UTC)
 * There are a number of courses on iTunesU, though I can't see to find the one I did a while ago (I should be able to check when I get home and I'm on my personal iTunes account rather than my work one) MChesterMC (talk) 09:52, 9 January 2014 (UTC)

The Java Tutorials are the official training courses. They were written under the supervision of the original Java team at Sun (the folks who invented the language), and are now hosted by Oracle. They are free to use and share; they have good code examples, and they cover the language fundamentals as well as the vast standard libraries like Java Swing and the various utility frameworks. Nimur (talk) 15:09, 9 January 2014 (UTC)

WinZip
I am wondering if someone knows if I can purchase the WinZip as a DVD, not as a web download. The Amazon lists a few offers, some of them marked as "Download," others as "PC," then there is "PC Download," then "More Buying Choices - PC," etc. First I thought that those good looking boxes costing 60 [//www.amazon.com/s/ref=nb_sb_sabc?url=search-alias%3Daps&pageMinusResults=1&suo=1389237615925#/ref=nb_sb_noss_1?url=search-alias%3Daps&field-keywords=winzip&sprefix=winzi%2Caps&rh=i%3Aaps%2Ck%3Awinzip bucks] should entail a DVD arriving to your mailbox. Then I read one of user feedbacks and the man complained that he got one of such "expensive" boxes which amounted to "nothing more than a handshake" as he put it. He had to download the software via the Internet and he has a dial up connection with 56K per second speed. I do have high speed but I prefer a DVD nonetheless. Thanks, --AboutFace 22 (talk) 03:29, 9 January 2014 (UTC)
 * Have you looked at the WinZip page? It offers a backup CD, which should provide what you want.  --Phil Holmes (talk) 09:31, 9 January 2014 (UTC)
 * Newer versions of Windows already have the ability to read and create zip files. Why would you want to buy an additional product that does what Windows can already do?  Astronaut (talk) 12:26, 9 January 2014 (UTC)


 * 7-Zip is an open-source tool that does all the same things as WinZip and is free. I think I remember you asking about some .tar.gz archives or something similar recently, and it will be able to open them. I know in the past I've seen sites that offer to sell open-source software on CD, but a quick search didn't find anything and I don't remember them seeming all that trustworthy anyways...  K ati e R  (talk) 13:42, 9 January 2014 (UTC)


 * And actually, didn't you install MingW? That comes with tar, gzip and bzip so you should be able to use those to open up anything packaged in that format. Running "man tar" will bring up the help file for it, but I think "tar -xvzf filename.tar.gz" is what you want. That will unzip and unpack the tar file into the directory it is sitting in, and it probably is all contained within a folder in the archive, so it won't mess up the directory you run it from. Hopefully I'm remembering your situation right, otherwise that was a bunch of useless information. :-) K ati e R  (talk) 14:05, 9 January 2014 (UTC)

You, fellows, have excellent memory. All comments seem to be right on target. Many thanks. Cannot think about implementing what you are suggesting now: I am at work. The actual deeds may wait until Saturday. Thanks again. --AboutFace 22 (talk) 16:20, 9 January 2014 (UTC)

Answering Phil Holmes: No I don't see what he saw anywhere. The WinZip offers CD burning but that is different. I think they kept the issue ambiguous deliberately. Anyhow, I am going to order it now and will report to you in a couple of days. Thanks, --AboutFace 22 (talk) 01:22, 10 January 2014 (UTC)

I think I figured it out completely. They do not provide a CD. It is all "Delivery: electronic download." It is disgusting! I will punish them :-) by getting something else. --AboutFace 22 (talk) 01:32, 10 January 2014 (UTC)

Hooking up a treadmill/exercise bike for use in a MMO?
I have seen this done by some World of Warcraft players in around 2008 but it seems nothing more came of it. They hooked up a treadmill to a wheel that was then attached to a mouse to control the forward movement of their character in game. I play Guild Wars 2 and the forward movement is controlled by the 'W' key. Does anyone know of a way I can set up a treadmill (or better yet, an exercise bike as I already have one) to trigger the W key on a PC? 63.95.64.254 (talk) 17:04, 9 January 2014 (UTC)


 * I suppose there's some way to set it up electronically, but I'd be tempted to set up a Rube Goldberg device to actually press the W key on the keyboard. A pen could be used as the final piece, since it already has a spring in it to return to the normal position, once pressed. You'd just need to disable the part that holds it down until you hit the release (or, if you don't, then it would hit the key once every 2 wheel rotations). Then an extension from the exercise bike's wheel with an eccentric cam could push the pen down with each rotation (hopefully one key press per wheel rotation is good, so no gears are needed).  You would also need a frame to hold the pen in place. StuRat (talk) 17:37, 9 January 2014 (UTC)


 * As you state the question, it's not too hard:


 * I could imagine finding an old PC keyboard with broken keys (but with a working 'W' key!) - butchering it to the point where only the important electronics are left and wiring a magnetic switch in place of the keyswitch for the 'W' key...then fixing a magnet onto the part of the exercise bike that spins as you pedal.  You could then use the keyboard as an external keyboard with most computers - and you should get a "W" typed by it once for every revolution of the wheel.  If that results in you having to pedal too hard, you could place two magnets 180 degrees apart and you'd get two "W" keystrokes for every revolution.


 * HOWEVER games that use the "WASD" keys don't work by you typing a 'W' for every step you take forward...they rely on you HOLDING DOWN the W key all the time you want to move - and for that, you need to know that the exercise bike is being pedalled continuously. I can imagine ways to detect that - but it would take a knowledge of electronics that I suspect you don't have (or you wouldn't be asking this question!)


 * SteveBaker (talk) 18:51, 9 January 2014 (UTC)


 * Steve, you are correct that my electronic knowledge is minimal but my husband is a computer tech so might be able to handle a more tech based answer. I was hoping there was a simple way to hook up the bike to give off a 'signal' of some kind which I could then map to the W key in the same way that he currently uses a PS2 controller mapped to the keys.  As the movement of the pedals activates the dash board we have on our bike that indicates time, speed, program etc. I was hoping some smart person out there had figured out a way to read that impulse and plug it into a PC instead of the on board one.  63.95.64.254 (talk) 21:43, 9 January 2014 (UTC)
 * There's possibly some way to hook up a dynamo to the bike, and when the generated voltage exceeds a threshold, send a signal to the computer. Just throwing out ideas in the hope that someone more techicaly able can suggest a way of implementing them.  Various gamepad-to-keyboard solutions (such as Joy2Key, at work, so can't provide a link) would let you map the incoming signal to the w key if you could generate a standard gamepad output from the dynamo voltage. MChesterMC (talk) 10:21, 10 January 2014 (UTC)


 * What's wrong with using the exercise bike while you rest the keyboard and mouse on the top? Is it necessary to link the cycling to moving on your game? I once contemplated cycling while gaming but changed my mind since i don't have the space for an exercise bike. Would a dance matt work? There are some that can plug into USB ports, and this has four directional buttons. This has the bonus of allowing you to move in more directions as though you are actually in the game. Good luck ツ Jenova   20  (email) 19:01, 9 January 2014 (UTC)


 * I suppose I could just get on the bike while I play but lazy and unmotivated as I am I figure having it linked to my character in game would keep me pedaling! I'm not thinking about immersion really here (although can't wait for the day when the oculus rift and partnered tread mill becomes common place). I'm thinking more of a way to get me exercising when I would rather just sit and game all day ;) 63.95.64.254 (talk) 21:43, 9 January 2014 (UTC)


 * And what if something were to chase you while your legs are tired from cycling? Aha, then you would be easy prey! Thanks ツ Jenova   20  (email) 13:00, 10 January 2014 (UTC)


 * You don't need an Oculus Rift to do what you want - all you need is some kind of sensor that knows that you're doing some kind of exercise and uses that to drive the game. I recently tried to Kickstart a device that I have invented that uses pressure sensors that slide into your shoes that lets you exercise (by jogging in place) in order to play games like this - but sadly it was a total failure.  See: ShoeHaiku.
 * If you have a tame tech-geek on hand, then the appropriate technobabble that you need to impart is: "Steve says: It's easy...take a $30 Arduino Leonardo (it's got to be a Leonardo because it can easily emulate a HID keyboard) and use it to monitor the pulses from the rotation sensor on the exercise bike - different bikes have different sensors - but by prodding around with an oscilloscope, I'm sure you can find either a once-per-revolution, 3 to 5 volt pulse - or perhaps an analog velocity signal - somewhere on the connector between wheel and electronics module that you can easily tap into.  It's easy to write software in the Arduino to read that signal using either the digital or analog pins on the Arduino.  Then it's easy to calculate how fast the wheel is rotating and there are plenty of online examples telling you how to generate the appropriate key-up/key-down signals that correspond to "walk", "run" and "sprint" depending on the frequency of the signal...you can probably do it in 20 lines of code."...but you do need a tame geek to decode that message and turn it into what you want! SteveBaker (talk) 14:05, 10 January 2014 (UTC)


 * We naturally have an article on these PCGamerBike (the product link site in the article is dead but I've found a couple of places that list them; whether they actually have them in stock is unknown) --TrogWoolley (talk) 15:48, 10 January 2014 (UTC)