Wikipedia:Reference desk/Archives/Computing/2011 November 17

From Wikipedia, the free encyclopedia
Computing desk
< November 16 << Oct | November | Dec >> November 18 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


November 17[edit]

Standard deviation error bars in Microsoft Excel[edit]

Stale
 – I had to turn it in this afternoon (without the error bars), but would still be interested to know what I was doing wrong. Ks0stm (TCGE) 22:09, 17 November 2011 (UTC)[reply]

I'm trying to add standard deviation error bars to a graph for a chemistry lab, but when I add standard deviation bars the bars it adds don't even include some of my data points (see here). How do I get it to add standard deviation error bars actually relevant to my data (which is found in the left two columns in the spreadsheet)? Ks0stm (TCGE) 21:57, 16 November 2011 (UTC)[reply]

Sound not working on this machine[edit]

I'm on a machine which has no sound. I am trying to work out why. The soundcard appears in the windows device manager, and isn't disabled. The Configure button in windows 7's configuration panel doesn't work, and the Levels tab under properties is empty. I even tried plugging a USB sound card in and making that the default device, and no sound comes from that either, with the same problems. The diagnostic tool when I double click the audio device icon in the system tray says The Audio Device is disabled but offers no help beyond that. What am I missing? System is Windows 7 Enterprise x86 192.84.79.2 (talk) 09:36, 17 November 2011 (UTC)[reply]

Forgive me for starting with the obvious, but does the computer have integral speakers? If not are your speakers plugged in and switched on? And what is the setting on the volume controls (both on-screen and on the speakers)?--Shantavira|feed me 12:58, 17 November 2011 (UTC)[reply]
I'm using headpones, and the onscreen thing has no volume control. The volume icon shows that the audio is disabled, like I said in my op. 192.84.79.2 (talk) 13:39, 17 November 2011 (UTC)[reply]

Kindle[edit]

It is not possible to make folders on Kindle, i.e. you can make on PC but on Kindle itself they won't show, all files will appear as though in a single list. However, there is a "Make New Collection" option in Kindle settings, but it is greyed out (disabled) by default. How can I activate this mode, using PC or Kindle itself. There is no way I can use Kindle's wireless network. Please help... Jon Ascton  (talk) 10:53, 17 November 2011 (UTC)[reply]

You use the collections like folders. Try selecting a book (in the Kindle interface), then pressing the "right" button, and then "Add to Collection" or something like that. Once you figure out how to put them into collections, you can change the default view to list by collections. --Mr.98 (talk) 13:03, 17 November 2011 (UTC)[reply]
Thanks, 98. Just tried that. Didn't work - when I press "right", after selecting a book, the menu appears with "Add to Collection" disabled...
You must register your Kindle to enable the collections feature. -- kainaw 14:16, 17 November 2011 (UTC)[reply]
Can I do it using PC (thru Internet), because wireless thing is only in USA, Europe etc ?
You can register it through Amazon's website (log in, go to "Manage my Kindle", add the serial number), but I don't think it will "unlock" that aspect of the actual device until you connect it to the Internet somehow. Does it have WiFi or just the Whispernet service? If you have WiFi it should use any internet WiFi connection. If you're in one of the countries without Whispernet then I'm not sure what you can do. --Mr.98 (talk) 20:07, 17 November 2011 (UTC)[reply]

Open-source software[edit]

Hi, I don't understand Open-source software at all. How are the developers of such software selected and vetted, and what is their motivation? Where are the quality control and checking mechanisms located? Clearly you cannot have a free-for-all where any random person can be editing source code, else the program would be just be overwhelmed with rubbish and malicious edits (just like leaving Wikipedia to its own devices without the army of people constantly reverting vandalism). So, some team of people must check every sumbitted edit if a viable product is ever to emerge, right? Our article seems weak on explaining how all this works. 86.179.7.93 (talk) —Preceding undated comment added 12:59, 17 November 2011 (UTC).[reply]

The best write-up on this topic that I've found is "The Cathedral and the Bazaar". I've heard many people use this essay to talk about open vs closed source code. But it is actually about open-source code in which the code is heavily controlled vs open-source code in which it is fully open and available to everyone. They are two very different models. So, consider Wikipedia (actually Media-Wiki, the open-source software it runs on). The answers to your questions:
How are developers selected? They aren't. They decide to contribute code. When the contribute, the code may be accepted by the software maintainers. It may be rejected. It may be sent to others to be cleaned up and improved. I submit code to open-source projects often. I see a problem. I look at the code. I fix the problem. I submit my fix. Sometimes it is accepted. Sometimes it is not.
What is the motivation? Fixing the problem. I'd be fixing the problem on my computer if I submitted the fix or not. So, why not submit it to others? Not everyone is selfish. Programming is not a zero-sum game. Just because I submit a fix I wrote does not mean that I am losing something. There is also a touch of animosity. I have supported Okular simply because I hate Adobe. I have supported Gimp because I hate Photoshop. I want the alternatives to be as good as possible.
Where is the quality control? It depends on the project. Sometimes it is a single person at the top (ie: Linus Torvalds). Sometimes it is a company (ie: The Wikimedia Foundation). Sometimes it is just a group (ie: The KDE project).
How does the junk and malicious code get stopped? You use Wikipedia as an example. How do we have articles that aren't packed full of junk and vandalism? People volunteer to police projects they like. Similarly, people volunteer to police open-source projects they like. I've seen malicious code submitted to both Gimp and the libPurple library used for many chat projects. I made note of it immediately and the code never made it into the released project. Can some get through? Sure. Can malicious code get through closed models like Apple and Microsoft? Yes - it happens a lot more often than they want to admit.
Is every edit checked? Yes. Every edit is checked by many eyeballs. The entire theory is that with many eyeballs the errors are easy to spot.
I hope that helps a bit. -- kainaw 14:28, 17 November 2011 (UTC)[reply]
Thank you so much for your full answer. The key concept that seems to be under-emphasised (or perhaps not even mentioned at all) in our article is that edits are submitted to some authority -- "the software maintainers" you call them -- who, if I'm understanding correctly, have ultimate control over what goes into a release. 86.179.7.93 (talk) 14:59, 17 November 2011 (UTC)[reply]
That is true for all major projects. For minor projects which have very few people working on them, there is no authority. Perhaps you could say that the programmers are themselves the authority. -- kainaw 15:16, 17 November 2011 (UTC)[reply]
Anyone can be a software maintainer; just declare yourself to be one! The tricky thing is convincing people to use the software you maintain. Usually, for that to happen, the software has to be good, so you have to be a good coder, and someone who is good at convincing good coders to work with you. You also have the right to fork existing open-source code, although convincing people that your fork is better is extremely difficult, because it's usually not. Paul (Stansifer) 16:17, 17 November 2011 (UTC)[reply]
Indeed, there are plenty of important software projects today that were forked for no other reason than that the original or previous maintainers had become difficult in some fashion. This is part of what's great about free software. It's hard to manage a project with absolutely no official/s, equal or not. ¦ Reisio (talk) 16:45, 17 November 2011 (UTC)[reply]
Note that altruism is not the only motivation. If you write a fix or add some new functionality, it is much easier to send it upstream. This way it will be integrated in subsequent versions, so you can forget about it. Plus, it will be maintained by others, for free. If you keep the code to yourself, you have to maintain your own, non-standard version, indefinitely. Given that the standard code base might diverge, you'll have to spend some effort to adjust the code each time, possibly even introducing bugs in the process. Unless keeping the code to yourself gives you a strong competitive advantage, it is much more cost-effective to make the initial effort to please the maintainer so that it will accept your code. Everyone wins. Bomazi (talk) 20:54, 23 November 2011 (UTC)[reply]

command prompt beep[edit]

In Windows 7 on the command prompt if I echo this character

the computer makes two beep sounds via speakers. I am thinking of including it into some batch files, but I would like to know more about it first. What is this character? Are the beeps an intended feature of the command prompt or is it the result of an unintended error of some kind? Are there any negative effects using this beep method many times, eg corrupting files, slowing down the computer, damaging the processor, etc. I know those are very unlikely but I want to be sure. Thanks. 82.43.90.142 (talk) 18:22, 17 November 2011 (UTC)[reply]

The character to posted is not standard. You'd be better using the code instead of the character to demonstrate which one it is. I assume it is the bell character, which you can use anywhere you can print to a console. -- kainaw 18:24, 17 November 2011 (UTC)[reply]
The code? I don't understand. In the batch script I have
@echo off
echo �
I tried "echo ^G" from the bell character article but this did not make any sound. 82.43.90.142 (talk) 18:53, 17 November 2011 (UTC) — Preceding unsigned comment added by 82.43.90.142 (talk) 18:53, 17 November 2011 (UTC)[reply]
That "^G" is asking you to type control+G, rather than type the ^ character.  Card Zero  (talk) 19:00, 17 November 2011 (UTC)[reply]
^G means Control-G and you can't actually type ^G, you need to physically press Ctrl-G to create the beep/special character :)  ZX81  talk 18:59, 17 November 2011 (UTC)[reply]
I'm still trying to work out what character the OP actually pasted. I copied it to notepad and saved it as UTF-8 and looked at it in a hex editor, and got the sequence EF BF BD; and then I got lost in the UTF-8 article, so I tried again with notepad's plain "unicode" option (a bit vague, that?) and got 00 FD FF. Don't know what to do with these numbers next. Unicode doesn't like me. (I gather EF BF BD breaks down as 1110/1111 10/111111 10/111101, so without the special UTF-8 parts that's 11111111 11111101, or FF FD, which is the same two bytes the other way round.)  Card Zero  (talk) 19:04, 17 November 2011 (UTC)[reply]
Oh, U+FFFD is the "replacement character", so it probably pasted to the page as that. Here's what prints: if I surround the character the OP pasted with a <span class="Unicode"></span> tag. I wish I knew how to do a proper job of decoding unicode manually though, without guessing.
  • Further confusion: why is my Firefox printing the OP's original character as a little box, instead of the diamond with a question mark in it? My browser's set to UTF-8, and there are the right three bytes there on the page (EF BF BD, as I can verify if I change encoding so it appears as �), yet it's taking those three bytes and arriving at a box and not a diamond. Strange. What, in fact, does that "unicode" tag do?  Card Zero  (talk) 19:16, 17 November 2011 (UTC)[reply]
There's no standard appearance for U+FFFD (which is EF BF BD in UTF-8). It's not "black diamond with question mark", it's just "replacement character". -- BenRG (talk) 22:24, 19 November 2011 (UTC)[reply]
But why (and how) is the class=unicode span changing the look of the replacement character? (Inside that span I see the diamond, outside it see the box.) It doesn't seem to change the font - text inside that span appears in Arial for me, same as the rest of the page. Maybe it forces a switch (from ordinary Arial for the rest of the page) to Arial Unicode MS - but that ought to happen anyway when there's a missing glyph, because of font substitution - unless maybe ordinary Arial does have a U+FFFD character, which looks like a box, and then U+FFFD looks like the diamond in unicode Arial? Font substitution should make forcing a change of font pointless, though, so maybe class=unicode does something else, but what? No, I can't understand.  Card Zero  (talk) 09:01, 20 November 2011 (UTC)[reply]
According to Template:Unicode, the Unicode class just specifies a bunch of fonts which between them include practically everything. I don't know exactly what's going on, but it doesn't seem all that strange that you'd see different glyphs with different font lists. -- BenRG (talk) 04:35, 21 November 2011 (UTC)[reply]
Here's one way of getting a beep in a batch file: At a command prompt type copy con beep.txt (enter) control-G (enter) control-Z (enter). Then type notepad beep.txt and copy and paste the beep code (which should be visible) into your batch file. -- BenRG (talk) 22:24, 19 November 2011 (UTC)[reply]
Actually, I guess you already managed to do that—never mind. :-) -- BenRG (talk) 22:52, 19 November 2011 (UTC)[reply]

Factors affecting .svg rendering speed[edit]

What factors affect the speed at which browsers can render .svg files? I imagine that possibilities are the browser, RAM, processor and graphics card, but I don't have a clue of the relative importance of each. I'm asking because I want to animate things like this, but at the moment everything gets very jerky once a few hundred objects are animated. If anyone knows of a better way to animate things like this then I am open to suggestions - I've already tried openFrameworks but that doesn't work well either. SmartSE (talk) 18:51, 17 November 2011 (UTC)[reply]

Well, I've partly answered this part myself - chrome is way way better than firefox. SmartSE (talk) 23:57, 17 November 2011 (UTC)[reply]
Amid the current fondness for <canvas> and WebGL, animated SVG (and really SVG in general) seems like a neglected stepchild. You might get better performance if you coded it procedurally (javascript_webgl). -- Finlay McWalterTalk 17:50, 18 November 2011 (UTC)[reply]
Hmm, hadn't come across those so thanks! Being a coding novice, the big advantage of svg to me is that I can draw something in illustrator / inkscape and then adjust the code, but I might end up trying those some day. (Plus it's more like wiki markup than javascript). SmartSE (talk) 22:23, 18 November 2011 (UTC)[reply]
The SVG that Inkscape emits isn't very clear (in the long term, if you're generating stuff, you'll retain more hair if you generate SVG content from scratch). As to the state of WebGL, try this in Firefox or Chrom(e|ium). -- Finlay McWalterTalk 22:34, 18 November 2011 (UTC)[reply]

Related question[edit]

On the off chance someone knows how to code animated .svg, what would I add to something like this:

<line fill="none" stroke="#F47B20" stroke-width="0.25" x1="3.724" y1="84.039" x2="241.844" y2="480.904"/>

so that it rotates around the middle of the line? Thanks in advance! SmartSE (talk) 18:51, 17 November 2011 (UTC)[reply]

There's a basic example of SVG rotation animation here. As the last of Emil J's examples shows, you can set the centre of rotation by wrapping the whole thing in a translation first (as rotations are about the origin, in the prevailing coordinate system of the object). -- Finlay McWalterTalk 17:56, 18 November 2011 (UTC)[reply]
Thanks for the link, not sure why I couldn't find it before. I've been using something like this, but using the <g transform> might be easier.
<g>
<animateTransform       
attributeType="XML"       
attributeName="transform"       
type="rotate"       
from="360,399.82,399.78"
to="0,399.82,399.78"       
begin="0s" dur="20s"       
repeatCount="indefinite"/>
< lots of lines >
</g>

SmartSE (talk) 22:23, 18 November 2011 (UTC)[reply]

Executable over bittorrent = safe?[edit]

  • Background - I have four disks for running Sims 2, but they look a little beat up, my CD drive isn't functional without me tinkering with the computer, and Iost the registration key for the CD's.
  • Situation - Instead, I downloaded Sims 2 as a torrent from [REMOVED LINK]. It includes 4 disks and a zip with an executable, 14MB large. The instructions say to replace the normal executable installed with the executable provided by the torrent.
  • Question 1 - is there any way to know if it's safe to run that executable on my computer? I already rarely use Windows because I hate its security problems, and I don't like the idea of running a 14MB executable from the internet. Even if it runs the game, there might be an imbedded virus (right?)
  • Question 2 - is all of this even legal (I do own a legitimate copy of the game)? Is it a gray area?

Thanks. Magog the Ogre (talk) 20:02, 17 November 2011 (UTC)[reply]

1) No, there's no way to know it's safe other than relying on security through obscurity - distributing your malware in the form of copies of the Sims 2 (when the Sims 3 is the hot new thing) would be a strange choice of viral vector. Oh, but various virus checkers will scan a file to see whether it contains a virus, so you could offer the file to one or more of those and see if it gets rejected. 2) Yes, it's a grey area. Unless this counts as legal advice, in which case I can't give any. (It's certainly legal in nature, but I don't think I gave you any advice.) By the way, I did the same thing with Sid Meier's Alpha Centauri (which I own three worn-out copies of), replacing terran.exe with the cracked version, with only happy results, but it would be unscientific of you to be encouraged by anecdotal evidence.  Card Zero  (talk) 20:15, 17 November 2011 (UTC)[reply]
If you have a decent antivirus app (Avira, for example), it should catch any naughty software. You could try running it in a sandbox or VM first, too, but that's pretty paranoid. You can get into trouble for this. AIUI technically (so technically ISP's won't necessarily protect you over it), what's illegal is uploading. ¦ Reisio (talk) 20:23, 17 November 2011 (UTC)[reply]
Ugh; well is there a decent way to emulate a CD drive, so the game thinks it's talking to the CD drive, when actually it's talking to a CD image on the hard disk? It can be done with VirtualBox, but the game won't run in VirtualBox due to graphics issues. Magog the Ogre (talk) 20:44, 17 November 2011 (UTC)[reply]
I found this but again, I'm reticent to run the executable, even if it's off cnet.com. Magog the Ogre (talk) 20:46, 17 November 2011 (UTC)[reply]
Alcohol is legit and will work. So will Roxio and any other really dedicated disk mounter software. --Mr.98 (talk) 21:21, 17 November 2011 (UTC)[reply]
http://www.ltr-data.se/opencode.html/#ImDisk open source, works wonderfully. There are some less popular/more proprietary formats it doesn't manage, you'd possibly have to use daemon tools for that. ¦ Reisio (talk) 21:12, 17 November 2011 (UTC)[reply]
DAEMON Tools and Alcohol 120% are legit and highly recommended. I've been using DAEMON tools for years now really. My antivirus and firewall have yet to complain. All it does is create virtual CD/DVD Drives so that the computer thinks you have additional drives. Using images instead of the actual disks helps prevent degradation over time. It also reads faster than physical disks and is really quite easy to use.-- Obsidin Soul 02:51, 18 November 2011 (UTC)[reply]
I just realized I sounded like an advertisement, LOL. But virtual disk drives really do make your life a hell of a lot easier.-- Obsidin Soul 02:58, 18 November 2011 (UTC)[reply]