Wikipedia:Reference desk/Archives/Computing/2012 April 22

= April 22 =

Problem using Chrome
When I start up Chrome, it starts eleven sessions of chrome.exe, which I can track using Windows Task Manager. It didn't used to do that. I thought it might have something to do with recently installing arcadecandy, because when I killed some of the chrome sessions, I got a notice saying that arcadecandy had crashed, even though it wasn't currently running, so I uninstalled arcadecandy and restarted my PC, but I'm still getting all of those sessions. Any ideas? 69.62.243.48 (talk) 02:34, 22 April 2012 (UTC)


 * I assume by "sessions" you mean "processes". You can use Chrome's task manager to see what each process is for. -- BenRG (talk) 03:54, 22 April 2012 (UTC)
 * Well, that cleared three of them, probably temporarily, but there are still eight processes open. But thanks.  69.62.243.48 (talk) 04:08, 22 April 2012 (UTC)
 * Chrome uses processes to contain malfunctions (this is why a single tab can crash, but not take others down with it). It might be optimisitically spawning processes for the first few tabs, or it might be using them to contain plugins, etc. Paul (Stansifer) 18:49, 22 April 2012 (UTC)

Changing the default video software and explaining my ghost in the machine
I have a Mac and I have Parallels Desktop. It is and has been closed. I downloaded some MP4s and the icons while they were downloading had the two red stripes indicating Parallels Desktop, which was weird in itself. When they finished downloading that went away and they changed to show an image from the video, I guess the opening shot. When I double clicked on one it automatically opened up Parallels and tried to run in Windows Movie Player. Ugg. I had to force quit Parallels and even weirder, after I did so, with it gone from the force quit applications list and not showing in the dock, the video image disappeared but the audio of the entire half hour MP4 ran, even though Parallels was by all appearances shut down, and WMV couldn't even be running without Windows! That I found really bizarre. Anyway, I can watch the video's fine by dragging them into (or choosing "open with") Quicktime Player or VLC, but I have no idea how to set each video to default to opening up in them. I will forget and double click and having to go through this rigamarole again. It's not a computer-wide thing. Other videos I have default to opening in Quicktime for example. So, how do I reset these videos so they default to the player of my choice? Also can anyone explain the twilight zone of the audio playing as I described it?--108.54.17.230 (talk) 03:01, 22 April 2012 (UTC)
 * It sounds as if the file type association has been broken somehow, although I have no idea how. Right-click or control-click the file, select "Get Info" from the menu, and then select VLC from the pop-up-menu under "Open with" to fix this. --Stephan Schulz (talk) 08:10, 22 April 2012 (UTC)

On ASIMO and his ability to pour liquids from one container into another
At 4:55 in this video, the robot ASIMO is able to twist open the lid of one container, and pour its contents into a cup. The amount of liquid in the container is much less than the maximum capacity that the cup can hold, and somehow ASIMO knows this and tilts the container to nearly vertical in order to get all of it into the cup.

Now, my question is this. Can ASIMO be programmed to do this with any size container and any size cup (I mean size in the sense of amount of liquid that can be stored, i.e. volume)? For example, let's say one container has 5 pints of water, and there are two cups, one that can hold 2 pints, and one that can hold 3. Assuming the only information that's "fed" into ASIMO is which is the container and which are the cups, could ASIMO be able to: view the cups, and determine the size and amount of water each can store, and then lift the container and a cup, and then when pouring from the container in to a cup, use scales in its arms to determine when the change in weight between the container and the cup in order to match, say, the density of water? I guess the pseudocode would be:

Container a; Cup b; Cup c; a.liftL; \\lift object with left hand b.liftR; \\lift object with right hand m = a.weight; Pour(a, b, m == 3); \\Pour the contents of first input into second input until condition third input is met PlaceR; c.liftR; Pour(a, c, m == 0); Return;

Would this be viable & generalized?--99.179.20.157 (talk) 12:39, 22 April 2012 (UTC)


 * I see a couple problems with that approach:


 * 1) Dynamics. That is, the weight in the cup will appear to be heavier while liquid is landing in it.  You'd need to let it settle down to get an accurate weight.


 * 2) Condition 3. Since there is not a set cup weight empty to cup weight full ratio (a plastic cup is much lighter than an earthenware mug), what would this condition be ?


 * Most likely, it just pours for some set period of time, and they choose an appropriate cup so that this works out well, for the demo. StuRat (talk) 13:37, 22 April 2012 (UTC)

The goal of Asimo's intelligence software is to avoid "scripted" behaviors, such as the pseudocode listed above. (Scripted joint-control is old-fashioned robotics theory from the 1950s! Since at least the late 1960s, robotics research has centered on abstracting goals and tasks from their implementation.  See SHRDLU for a start). Asimo's mechanical motions are programmed via an inverse kinematics solver in generalized coordinates, very similar to this open-source implementation of whole-body robotic coordination. Asimo's high-level task logic generates sub-goals, and these translate into objective functions for generalized "potential energies" - so the result is, in a high-dimensional space, Asimo's joints feel the force of "artificial gravity" tugging his hands towards what his AI goal is seeking to do. A feedback control system makes sure that he remains stable while satisfying a best-fit to the goal function, guaranteeing that he remains balanced while all of his many joint motors adjust for the correct position. This has an added benefit, for example, when pouring liquid. As the weight of the cup decreases, he is dynamically adjusting his motor controls to remain balanced and in the correct position, without needing an explicit script for the variations in the weight he's holding. If the simple script were used, Asimo's pouring script would fail if, for example, there was an invalid amount of water in the cup - which is undesirable. Nimur (talk) 15:53, 22 April 2012 (UTC)
 * For the very interested: according to the paper I linked above, one Asimo (or at least, the Asimo simulator) has actually loaded and executed the software. I believe the IK solver and the goals logic programs are all open-source, but Asimo is very expensive and proprietary.  However, it is possible, with appropriate modification, to port the IK solver to your robot.  If I recall, this is actually fairly trivial if you already know the mechanical properties of your robot; you essentially type your Jacobian matrix into the provided XML template, and ...presto - your PUMA thinks it's Asimo. As always, be careful with powerful software-controlled motors; I once had to wrestle a PUMA when a labmate punched in a wrong minus-sign; the robot nearly destroyed itself and its lab bench before he could reach the safety switch.  Nimur (talk) 16:03, 22 April 2012 (UTC)

Additional batteries for laptop: Battery instead of DVD drive and USB battery
How do you call a battery that replaces a DVD drive? Can any new laptop be fitted with it? Can we connect a USB battery on any laptop? XPPaul (talk) 15:42, 22 April 2012 (UTC)


 * Those are quite broad questions; the simple useless answers are, of course: 1) A good idea 2) yes technically depending on your expertise 3) see 2 ¦ Reisio (talk) 16:45, 22 April 2012 (UTC)
 * To be pedantic, presuming you mean the battery is not just stuck any old place then the answer to 2 is incorrect. (If you are just going to stick it anywhere then number 1 is highly questionable.) A laptop without a DVD or same sized empty or filled with something that can be removed to be replaced space can't be fitted with such a battery. Nil Einne (talk) 17:08, 22 April 2012 (UTC)
 * Practically speaking, you need a laptop which has been build around a modular bay concept. It's e.g. theoretically possible to replace the DVD drive in a current MacBook Pro with an additional battery, but it is not practically feasible even for expert users. --Stephan Schulz (talk) 17:20, 22 April 2012 (UTC)
 * Although would it not be simpler to just buy a back-up regular battery?-- Jac 16888 Talk 21:19, 22 April 2012 (UTC)
 * On the Lenovo ThinkPad T410s that I'm currently typing this, I've slotted the second battery into the DVD drive bay. This battery is shaped in the same form factor as a laptop DVD drive. The DVD drive is safely in my laptop bag for use as and when needed. I believe this to be a common modular design for Lenovo laptops (those that have optical drive bays at any rate), and I'd be surprised if other manufacturers aren't doing the same. You don't even need a screwdriver, the drive/battery slides out with a simple pull-the-lever-that-releases-the-latching-mechanism-then-pull-out-the-drive/battery technique. Google Image Search will reveal all. I don't know if the battery has a special name other than "spare battery that fits into the DVD drive bay". A USB battery will be impossible as the USB port is not designed to receive current, nor is the circuitry of the motherboard designed to take advantage of a power source coming from a USB port.Zunaid 00:00, 23 April 2012 (UTC)

Earphone buzzing
Yesterday I broke the connectors inside my earphones and soldered them back together. But now there is a constant buzzing sound behind whatever I'm listening to on my computer. The computer speakers work fine, and other headphones work on it too, so I know it's not the computer's fault. The constant buzzing is getting annoying and making it hard to hear the music/talking. Does anybody have any ideas of the causes and perhaps some solutions too? Thanks,  Rcsprinter  (shout)  11:22, 22 April 2012 (UTC)


 * Usually a Mains hum due to Ground loop. It happened to me when my sloppy soldering burned through a wire's insulation. I had to separate the wire from the housing with a strip of paper. Jim.henderson (talk) 14:07, 22 April 2012 (UTC)


 * Unless they are really nice earphones, you can buy some new ones quite cheaply that won't buzz in the background. Astronaut (talk) 16:25, 23 April 2012 (UTC)

What is the difference between Java and Javascript?
Max Viwe &#124;  Wanna chat with me?  21:11, 22 April 2012 (UTC)


 * The languages are mostly unrelated, they just happen to share a similar name by coincidence . Javascript is an interpreted language used primarily for interactive web pages, whereas Java is usually compiled and run offline, although Java applets can be embedded on websites. → Σ  τ  c . 21:17, 22 April 2012 (UTC)
 * Well, it appears that JavaScript was originally called LiveScript, and then renamed to JavaScript because it was more influenced by Java, so there is a connection in the names. → Σ  τ  c . 21:23, 22 April 2012 (UTC)
 * (ec) They are two very different languages. See Java and Javascript. Java is a statically typed object-oriented language typically compiled to bytecode and executed on the Java Virtual Machine. It's used for all kinds of programming. Javascript is weakly typed, prototype-based (not class-based) language typically embedded in web pages and executed by an interpreter that is part of a web browser. It is most often used to implement interactive web pages. --Stephan Schulz (talk) 21:24, 22 April 2012 (UTC)
 * Java and Javascript are both related, quite distantly mind - they're both object oriented programming languages, but the primary difference between both is that Javascript simply has a smaller, easier command set to work with - it basically makes the language easier to understand. Java can basically work on its own, as an Applet, essentially a fully contained program, whereas Javascript needs to be put inside something else, like an HTML page in order for it to work.


 * Javascript is fed through a browser and then whatever is fed in, the browser produces the results of. The other thing is that Java needs to be compiled into machine language to produce an applet, but Javascript can be simply written as text, and added to an HTML page without any need to compile it.  If I've missed anything, I'm sure someone will pick me up on it! Hope this helps.  MarkBurberry32 &#124; talk  21:25, 22 April 2012 (UTC)
 * (It's possible to write standalone JS programs (and some people do!), but it's true that this wasn't JS's original purpose.) There's a good explanation on Metafilter. Essentially, other than superficially similar appearance, and the fact that both of them are some flavor of of OO, JavaScript might as well have been designed to be as different from Java as possible. I consider that a to be a good thing about JavaScript Paul (Stansifer) 21:50, 22 April 2012 (UTC)
 * The above answers are all good, but we can focus it a bit more. If you are interested in the name, the links will explain how it got to be that way. In short, it has a lot to do with a deal between Sun and Netscape, and reflects commercial concerns more than computing ones. If you are interested in how they are used, JavaScript was designed primarily for the web. That means the standard libraries have a lot of web-related things, such as allowing the user to write HTML easily from within a JS file. If you are curious about the syntax and the language fundamentals, a lot of JS is similar to Java, mainly (I think) because they are both similar to C. Control statements are identical or very similar in all three (eg. for loops). The significance is that C is very big in the programming world, and probably will remain so for a long time, so you help newbies if you keep as much C-style syntax as possible. Neither Java nor JS will compile C code, nor each other's code for that matter, but the basic syntax is close. Apart from the libraries (input/output modules, graphics stuff etc), it would be easier to translate simple programs from Java into JS than the other way round, because JS is loosely typed. If you are thinking of learning JS, I've just given myself a crash course, and hated it. You don't get any warnings about syntax errors, which drastically steepens the learning curve. Apart from that, it is kind of like stripped-back C++ or Java. IBE (talk) 05:22, 24 April 2012 (UTC)
 * There are many ways to get syntax errors (and more) for javascript, like closure or the developer functionality of browsers. --145.94.77.43 (talk) 10:15, 24 April 2012 (UTC)

hard disk capacity and speed
Hard disk capacity has been doubling about every 19.3 months, on the average, see File:Hard drive capacity over time.svg. I can't find any similar data for hard disk transfer speed, but it seems to me that the transfer speed has not kept pace with the increased capacity. Does anyone have any data on that? Bubba73 You talkin' to me? 22:23, 22 April 2012 (UTC)
 * There are lots of links in the references section of Disk-drive performance characteristics. Some of those might give you what you want. RudolfRed (talk) 23:54, 22 April 2012 (UTC)


 * That article says "These performance characteristics can be grouped into two categories: access time and data transfer time (or rate)." which is what I suspected. If I could find the typical transfer rate of a home computer MFM drive around the mid 1980s, I could answer my question.  I found it for a commercial drive, but I don't know what it is for a home computer.  Bubba73 You talkin' to me? 03:15, 23 April 2012 (UTC)