Wikipedia:Reference desk/Archives/Computing/2010 July 21

Computing desk
< July 20 << Jun | July | Aug >> July 22 >
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.


July 21 edit

Is it bad to standby a computer too often? edit

For example I'm going to take a 20 minute break. Should I put the computer on standby? Or should I just keep it on? Is it bad to always be doing that?--75.185.120.28 (talk) 05:28, 21 July 2010 (UTC)[reply]

Do whatever you want to do. I'd personally just leave it on. In general the whole argument about turn off/leave on is overblown and not worth debating. But you really shouldn't be turning your computer off and on all the time (as far as most of your components care, standby is shutoff) --mboverload@ 07:19, 21 July 2010 (UTC)[reply]
In standby the hard drive will stop so to the hard drive, as mboverload said above, standby is the same as shutdown. This means that each time you enter and exit standby mode, the hard drive has to go though the start cycle which if done many times might lower its lifespan. Personally I wouldn't put the computer to standby, but then again I haven't tuned my computer off for 2 years (except for 30 second reboots) so maybe I'm not a typical user... 82.43.90.93 (talk) 09:27, 21 July 2010 (UTC)[reply]
Does 20 minutes of use degrade the components more or less than a shutdown and restart cycle? This is not an easy question to answer without data. Here's a good article on interpreting the statistics: "Disk failures in the real world: What does an MTTF of 1,000,000 hours mean to you?" Nimur (talk) 19:59, 21 July 2010 (UTC)[reply]

GIMP versus Photoshop edit

If GIMP is so good and available free then why at all is Photoshop still in business ?  Jon Ascton  (talk) 07:02, 21 July 2010 (UTC)[reply]

It's not as good as Photoshop. Literally, there's no need to answer any further than that. --mboverload@ 07:20, 21 July 2010 (UTC)[reply]
Indeed. I've used both GIMP and Photoshop, and Photoshop is definitely far superior. Theleftorium (talk) 07:24, 21 July 2010 (UTC)[reply]
Even if Gimp was as good as Photoshop, even perhaps if it was better, many people would still use, and still pay for, Photoshop.
  • For a creative professional, learning to really use Photoshop takes literally years, and the cost in productivity to them from changing to another system that does thing in different ways would be very great.
  • Similarly there's a training and documentation infrastructure built up for Photoshop
  • There's a huge ecology of Photoshop related software like plugins
  • Most importantly, Photoshop files are the lingua franca for many creative professionals' interchanges - they expect to be sending one another Photoshop files that they guarantee work and look identical on others' machines. To the extent that this isn't true for Photoshop (nothing's perfect), experienced Photshop professionals know the gotchas to look for.
For any software system (free or not) to replace an entrenched incumbent it has to overcome all of these obstacles. That's a task at least an order of magnitude harder than simply producing a product that's of comparable quality and capability as the incumbent. -- Finlay McWalterTalk 12:07, 21 July 2010 (UTC)[reply]
Also, for the short term, people who are using Photoshop now have already purchased Photoshop (it's a sunk cost). It's not expensive vs. free, it's (no additional cost) vs. free. (Although Finlay's points come into play when they consider upgrading.) -- 174.24.196.51 (talk) 16:58, 21 July 2010 (UTC)[reply]
But you'd almost surely not go from, say, Photoshop CS3 to GIMP (as opposed from CS3 to CS5 or whatever they are up to). For an experienced Photoshop user, GIMP is really retrograde. It's not so much the things like filters (which GIMP does okay at), but the elaborate ways Photoshop (and all the newer CS products) let you set up very sophisticated and reliable work flows both within applications and between them. Photoshop also has an army of professionals trying to improve its interface and its capabilities with every release, to give people a reason to upgrade. The GIMP as I've seen it lately looks pretty identical to the GIMP I saw three years ago—still the same stubbornly annoying interface that is dissimilar from all other graphics programs, more or less the same capabilities. (As someone who just spent a lot of time learning Blender's stubbornly annoying interface, I have come to appreciate how nice it is that all of the Adobe products are synchronized in appearance, hot keys, etc.) --Mr.98 (talk) 18:32, 21 July 2010 (UTC)[reply]
On the flipside to Finlay's point, I, as someone who has invested a lot of time into learning GIMP, would not switch to Photoshop even if I was given a free copy, unless my needs were to change in such a way that it was an absolute requirement. I don't deny that GIMP falls short in quite a few areas (the lack of proper CYMK support is a deal-breaker for creatives working in print), but it is on par or superior in others. AJCham 19:36, 21 July 2010 (UTC)[reply]
In my less ethical days, I made use of pirated software. I haven't for some time now, but it's a phase I went through. I had the latest PhotoShop... the latest everything, for that matter. Yet for graphics stuff, I still made use of Jasc Paint Shop Pro and I ended up uninstalling PS because I never used it. It's not that PSP was better, it's just that I already knew how it worked. For complex programs, that ability to almost work it with your eyes closed is invaluable. I still maintain that what killed WordPerfect was when they switched all their function keys around (though not entirely of their own volition). Matt Deres (talk) 20:34, 21 July 2010 (UTC)[reply]
Ah yes, I remember (legal) Word Perfect. In fact I still (perversely) configure Microsoft Word to use a few of Word Perfect's keyboard shortcuts. Habit persists! Dbfirs 07:23, 22 July 2010 (UTC)[reply]
But that's exactly what I'm talking about. PS and the other Adobe products have really tried for the most part to keep consistent keys and to use fairly intuitive key assignments. You want the "Hand" tool? Press H. You want the "Marquee"? M. Paste and copy are standard V and C. You know, simple, obvious stuff. I compare that with, say, Blender, which has totally idiosyncratic key assignments that vary depending on context. ("X" either means, "delete this" or "constrain this action to the X axis." Cause, you know, that key with DELETE written on it wouldn't have been more appropriate for the former!) The point is, the goal of the whole Adobe Creative Suite at this point is that you learn one set of skills and concepts and it works across all of their programs. For a guy like me, who uses Photoshop, Illustrator, and InDesign pretty much simultaneously, that's pretty important. Juggling the different interfaces and compatibility between GIMP, Inkscape, and whatever the free InDesign equivalent is, is a huge pain. The open source community is deliberately fragmented, all drawing little territorial lines around themselves, all very proudly claiming their UI ideas are the best, all blindly holding to the mantra that "once you learn the interface, you'll wish all programs were like this!" and so on. In short, it's what happens when you let engineers design interfaces without managers. ;-) Too many engineers is a problem, just like too many managers is (Cf. Microsoft). --Mr.98 (talk) 13:59, 22 July 2010 (UTC)[reply]

Virus edit

Is, this virus warning real ? http://www.gimpdome.com/index.php?topic=1500.0 —Preceding unsigned comment added by Jon Ascton (talkcontribs) 08:30, 21 July 2010 (UTC)[reply]

What virus warning? --Ouro (blah blah) 09:02, 21 July 2010 (UTC)[reply]
I too see no virus warning. You might want to check your machine for viruses and malware. Astronaut (talk) 14:03, 21 July 2010 (UTC)[reply]
Perhaps OP was talking about the "This site may harm your computer" warning Google search sometimes throws up, many times on sites which are not harmful at all, and then later the warning is removed as it was in error. 82.43.90.93 (talk) 16:20, 21 July 2010 (UTC)[reply]
Or, if you ever see a banner ad saying your computer has a virus, that is a scam. A server showing you an advertisement can not possibly know whether your computer has a virus or not. (Well, it is possible to imagine a situation, but not in practice.) 88.112.56.9 (talk) 19:40, 22 July 2010 (UTC)[reply]

What does this error mean? edit

  Resolved

I have recently installed Eclipse on a spare laptop running Fedora and it works OK. Today, I thought I would try using the laptop through Microsoft's Remote Desktop Connection so I can make use of my Vista machine's larger screen and nicer keyboard and mouse. After some trouble getting the remote connection to work at all (install and configure the xrdp daemon, configure the firewall and SE Linux settings), I now have the remote connection working in glorious 1920x1080 high def. However, when I start Eclipse, I get the following (lengthy) error message:

Error message from Eclipse
VM terminated. Exit code=-1
-Xms128m
-Xmx512m
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=/usr/share/eclipse/dropins
-XX:CompileCommand=exclude,org/eclipse/core/internal/dtree/DataTreeNode,forwardDeltaWith
-XX:CompileCommand=exclude,org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding,<init>
-XX:CompileCommand=exclude,org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates,instantiateTemplate
-XX:CompileCommand=exclude,org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage,addBinding
-XX:CompileCommand=exclude,org/python/pydev/editor/codecompletion/revisited/PythonPathHelper,isValidSourceFile
-XX:CompileCommand=exclude,org/python/pydev/ui/filetypes/FileTypesPreferencesPage,getDottedValidSourceFiles
-Djava.class.path=/usr/lib/eclipse//plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
-os linux
-ws gtk
-arch x86
-showsplash /usr/lib/eclipse//plugins/org.eclipse.platform_3.3.201.R35x_v20090813/splash.bmp
-launcher /usr/lib/eclipse/eclipse
-name Eclipse
--launcher.library /usr/lib/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.200.v20090520/eclipse_1207.so
-startup /usr/lib/eclipse//plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
-vm /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/bin/../lib/i386/client/libjvm.so
-vmargs
-Xms128m
-Xmx512m
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=/usr/share/eclipse/dropins
-XX:CompileCommand=exclude,org/eclipse/core/internal/dtree/DataTreeNode,forwardDeltaWith
-XX:CompileCommand=exclude,org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding,<init>
-XX:CompileCommand=exclude,org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates,instantiateTemplate
-XX:CompileCommand=exclude,org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage,addBinding
-XX:CompileCommand=exclude,org/python/pydev/editor/codecompletion/revisited/PythonPathHelper,isValidSourceFile
-XX:CompileCommand=exclude,org/python/pydev/ui/filetypes/FileTypesPreferencesPage,getDottedValidSourceFiles
-Djava.class.path=/usr/lib/eclipse//plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar 

Eclipse still works OK on the Fedora laptop even while the remote connection is still active, but it is squished into the cramped laptop screen. Any ideas what causes this error and how to fix it? Thanks. Astronaut (talk) 11:50, 21 July 2010 (UTC)[reply]

That's not an error message, that's just the list of command line option used to start the program. -- Finlay McWalterTalk 11:52, 21 July 2010 (UTC)[reply]
The first line says "VM terminated. Exit code=-1". The Eclipse development environment doesn't appear, nor do I get the questionabout which workspace to use. Astronaut (talk) 11:58, 21 July 2010 (UTC)[reply]
A quick googling suggests there are several things that can give that error. See if any of those suggestions help. 88.112.56.9 (talk) 13:19, 21 July 2010 (UTC)[reply]

In fact, I think I've managed to solve this myself. When I ran Eclipse from a terminal, I got a different error message: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/bin/../lib/i386/client/libjvm.so: cannot enable executable stack as shared object requires: Permission denied According to this page, such errors are caused by the shared object requesting an "executable stack" and SE Linux again stepping in to prevent it, even though "executable stack" are rarely actually required. By entering the following command (as root): execstack -c /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/bin/../lib/i386/client/libjvm.so, I can now start Eclipse, though I am unsure what imapact that will have later.

TBH, most of my problems so far have been caused by SE Linux stepping in to prevent some apparently risky activity. It seems like a bigger menace than Vista's much loathed UAC. Is there any compelling reason to keep SE Linux running? Astronaut (talk) 13:47, 21 July 2010 (UTC)[reply]

I have found SE Linux to be both less effective and more buggy than default linux / unix permissions. The greatest advantage is that it can support hardware cryptographic signatures, like the Trusted Platform Module chip, or some SSL hardware accelerator cards (though SELinux is not required for these hardware). However, it is so often incorrect or overbearing in its protection-mechanisms, that it is widely known to create insecurity - because it must be manually circumvented - Security-Enhanced Linux describes some of these complaints. Set your file-permissions properly; if you have sensitive data, encrypt it; and if you have very highly confidential data, carefully control physical and network access to the machine. SELinux does none of those things. The few things that SELinux actually does, like control access to certain .so files (breaking Eclipse and the JVM, in your case), often interferes with normal use-cases that are non-security-breaches. If anyone for any reason can come up with a legitimate need to control access to an .so file, then I would recommend placing it in an encrypted user-space file-system with properly-managed user and group permissions. Nimur (talk) 17:01, 21 July 2010 (UTC)[reply]

distance and signal strength relation in wlans edit

according to various sources (e.g.[1] pg3.)the APs with stronger RSSI are generally closer to the client. i want to know to what extent this is true. like out of say 100 APs sampled to be nearest to the mobile node at different points of time what percentage are likely to be having the best signal strengths?? any help would be great. thanks. --scoobydoo (talk) 15:20, 21 July 2010 (UTC)[reply]

You can read about multipath interference to learn about the greatest pitfall to this method of distance-estimation. The other unknown is the source signal power - but if we can assume that every "consumer-grade" access-point is transmitting omnidirectionally at a known power level, then there is a strict 1/r2 falloff with distance. This is compounded by atmospheric effects, interfering objects/walls/vegetation, and of course multipath interference (which is difficult, if not theoretically impossible) to solve. Nimur (talk) 17:05, 21 July 2010 (UTC)[reply]

Understanding C++ code edit

I have a C++ code which is spread over many files (it is RADONUMBERS on this site). Is there a website where I can someone can help me understand the whole code (and take payment for it in return for his time). Thanks-Shahab (talk) 17:39, 21 July 2010 (UTC)[reply]

That's not much code! Just 1103 lines total. It's also barely C++ (since there's just the one eq.cc). I don't know about any established "code mentor for hire" site, but you ought to be able to buy that amount of help for a candy bar if you know the helper. I'll tell you for free that the only interesting bits as far as the code goes (I didn't try to understand the mathematics, except that I noticed it was using random numbers) are that it's generating a small amount of machine code dynamically (the gen* files; you have to arrange to include the appropriate header file for your architecture when compiling gen.c) and that eq.cc is just a simple parser. --Tardis (talk) 18:39, 21 July 2010 (UTC)[reply]
And for what it's worth, the author explains it as well: "It determines, given k and j, the minimum integer N such that any 2-coloring of [1,N] admits a monochromatic solution to x+y+kz=jw." If this explanation isn't sufficient, maybe our coloring problem article can help. Nimur (talk) 18:43, 21 July 2010 (UTC)[reply]

Timezone Databases in Javascript edit

I want a simple Javascript function that accepts a city/location and a UTC-date as input, and returns a correct UTC offset for that timezone during that date (compensated for daylight-savings-time, regional changes, and so on).

I have a simple JavaScript clock that accepts a location and spits out a time, corrected for timezone offset. Unfortunately my implementation of time-zone is a direct lookup-table between city-name and UTC offset. I was going to add some time-zone changes for daylight-savings time, but I know that this is not easy. Modern time-zone handling programs are really complicated. In Java, I would just create a Date object, and I know and trust its internal giant database of every time-zone/DST corner-case in the world (Taipei had no daylight-savings-time from 1979 to 1980?)... Similarly, in C or C++, I would query the operating system's timezone database. But I need this program to run in Javascript in a web-browser. I want to be able to input a city (or a "locale" or a "zone" or whatever), and obtain a current, accurate UTC offset for that city. Is there an easy way to do this in Javascript? Can I query some operating-system database? Is there an easy-to-use web service that I can query? Nimur (talk) 18:41, 21 July 2010 (UTC)[reply]

Same question with some good-looking answers here. --Sean 18:46, 21 July 2010 (UTC)[reply]
From that link, I got to EarthTools.org... it provides exactly the service(s) I need. And I don't even have to wrap my requests in some bloaty JQuery or SOAP framework! Thanks for the help. Nimur (talk) 19:53, 21 July 2010 (UTC)[reply]
No prob. I just googled "time zone web service". --Sean 21:55, 21 July 2010 (UTC)[reply]
My algorithm is as follows:
  • Calculate the daylight saving time changes. To do this:
    • Set your Date object to the latest possible date for the change. (Example: first Sunday in October, use October 7. Remember the gotcha about JavaScript month numbering.)
    • Assuming the correct changeover date is a Sunday (most are), look at the number of the day of the week (Sunday = day 0, this is default JS weekday numbering) and set your Date object back this many days. Remember to use the functions GetUTCDate, GetUTCDay, etc.
    • Handle Saturday changeovers by pretending that they happen on the following day, and then subtract 1 day.
  • Use comparisons to see whether necessary to make a DST adjustment, and if necessary, make it.

75.41.70.185 (talk) 09:48, 23 July 2010 (UTC)[reply]

In Tor I specified "ExcludeExitNodes" and an ip address in the torrc file but Tor is just ignoring this and using it anyway. This is extremely annoying, why won't it obey ExcludeExitNodes? "ExitNodes" and "StrictExitNodes" settings are working fine, it's just ignoring ExcludeExitNodes 68.44.168.121 (talk) 19:19, 21 July 2010 (UTC)[reply]