Wikipedia:Reference desk/Archives/Computing/2010 January 21
Computing desk | ||
---|---|---|
< January 20 | << Dec | January | Feb >> | January 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. |
January 21
[edit]Program start
[edit]How can a program be made to start automatically when you start the computer in windows? —Preceding unsigned comment added by 113.199.170.77 (talk) 12:53, 21 January 2010 (UTC)
- Create a shortcut to the program in the Autostart folder in the Start Menu. --Andreas Rejbrand (talk) 13:07, 21 January 2010 (UTC)
- In Windows XP (and earlier) the folder is called Startup. AndrewWTaylor (talk) 13:17, 21 January 2010 (UTC)
Bank statement in CSV/spreadsheet - want to put each amount in a category
[edit]I have some CSV files of my bank statements over serveral months, and have downloaded them into an OpenOffice spreadsheet successfully. They include a column of money paid out and another column of money paid in. I would like to be able to manually decide which of many categories these various individual amounts should be in (eg insurance, petrol, salary, electricity bill, and many more) so that I can total each of them over a year. What would be the easiest and quickest way of doing this please? Just copying them item by item to various columns would take a long time.
Does anyone know (without guessing) if Grisbi or Gnucash could do the same thing more easily? I have never used any accounting or bookeeping software before. Thanks. 92.24.85.238 (talk) 14:15, 21 January 2010 (UTC)
- Make another column for type, fill in the type for each entry, sort by type, then sum each section. ---— Gadget850 (Ed) talk 14:43, 21 January 2010 (UTC)
Thanks, although I almost added above that I would like to preserve the date order. Is there any way of doing it that retains the date order? 92.24.85.238 (talk) 14:50, 21 January 2010 (UTC)
- Yes — fill in the "type" column as above, with each row having one cell saying "petrol", "insurance", etc., and then sort it by date; and then to see the summary of where you spent your money, see our article Pivot table; in OpenOffice it is called a "DataPilot". Comet Tuttle (talk) 18:00, 21 January 2010 (UTC)
Thanks, I've found that the freeware Easy Cash Manager can do the above and import CSV files. (The overpowering green colour can be changed to battleship grey or blue). Minor quibble: no running total, would like choice of more columns. I tried Grisbi but could not get it to work, and the manual is only in French. 92.29.31.202 (talk) 17:40, 22 January 2010 (UTC)
- Gnucash can do it easily. Don't know about .csv though, I use .ofx files from my bank and Gnucash seems to import those without problems. --antilivedT | C | G 23:55, 22 January 2010 (UTC)
I have tried Gnucash and the advantage to me is that you only have to classify each different description from the bank statements, rather than doing it for each different payment payment. On the other hand it has a lot of stuff about share dealing which I have no need for. 92.29.81.16 (talk) 11:15, 24 January 2010 (UTC)
Trojan - question
[edit]An antivirus program recently detected a trojan - "Alureon" - the warning appeared when looking at e-mail (web based) in a browser - the trojan appeared to located in the browsers temp. directory.
Question: I can understand a web page downloading many unwanted things (but actually activating them is another thing), but what about a web based e-mail program (using ajax)- given that I didn't get any instructions to start an .exe or activeX, or similar - does this mean the trojan wasn't activated. If it could have been activated without me actually opening anything other than the email - how? Thanks.87.102.67.84 (talk) 16:07, 21 January 2010 (UTC)
- You're probably okay; downloading a Trojan without activating it is usually harmless. The webmail site or your browser may have cached the attachment locally in preparation for downloading, but that doesn't mean they ran it. If there is a flaw in the browser (e.g. the recent zero day exploits against IE6, and to a lesser extent IE7/8), it might be exploited to activate the Trojan (in which case it's not properly a Trojan; a Trojan by definition requires the user to activate it). You should make sure your browser is up to date with the latest patches, if it isn't, or if you're running IE of some flavor (for which the known exploits have not had a patch released yet), you should run a full system scan with your regular virus checker and, if possible, one other checker (you don't need a second live scanner, but a second opinion system scan would be a good idea). —ShadowRanger (talk|stalk) 22:26, 21 January 2010 (UTC)
- One unusual thing that happened was a memory access error from adobe reader when I shut the system down (never happened before) - this makes me suspicious of noise on the system - maybe something like a buffer overflow exploit messing up memory. Enough to make me reinstall.
- However if my suspicions are true - it's not clear to me how using just html and javascript such a thing could (overflow) have been done. I thought I understood that modern OS's just didn't allow memory writes outside a sandboxed area set aside. It's possible that the adobe error had nothing to do with it. Any clues?87.102.67.84 (talk) 00:06, 22 January 2010 (UTC)
- Assuming there was a JS exploit, they don't need to infect the OS itself immediately. If they can break the JS interpreter, they can just request the OS write a file and start a program; any program can do this unless that privilege is explicitly removed. The browser is designed to not start programs without user interaction, but if the browser itself was compromised, it can do anything you can do (although it can't take admin privileges on Linux or Vista or later machine unless the OS itself has an unpatched vulnerability). Even without admin privileges though, it can write to your user directory, create registry entries specific to your login, etc. Admin privileges are needed to hide itself from virus scanners well, but they aren't required to listen to keystrokes, operate a covert server on your machine, and run most programs. —ShadowRanger (talk|stalk) 15:58, 22 January 2010 (UTC)
Why do virtual machines peg the CPU?
[edit]Why when running DOS, Win 95 98 or ME in a virtual machine does it always use 50% of hosts cpu when idle, whereas running Win 2000, XP, Vista or 7 in a virtual machine uses very little of the host cpu when idle? —Preceding unsigned comment added by 82.43.91.83 (talk) 16:45, 21 January 2010 (UTC)
- I'm not familiar with this behavior (I've only used VMs in the past five years or so, and usually with XP or more recent OSes), but I can provide a theory. The high CPU OSes you mention are all OSes that provide some level of direct access to the hardware by random programs. Simple actions like polling for I/O must be intercepted, interpreted and then passed along to the safe interface used by the host OS. In a more modern OS that shares the aversion to direct hardware access, you can recognize and rewrite the API calls on load to point to the VM manager's functions that pass them to the host OS. On an older OS, the lack of an API means you need to examine every memory access to see if it's trying to access "special" addresses associated with hardware under the old OS. There's no marking to tell you ahead of time that the address is special, so you're stuck with dynamic interpretation on the fly.
- Again, this is a theory. I'm a CS major, and I worked with people on the VM team at Microsoft, but I'm not an expert; take this as the likely explanation, but don't rely on it to land on the moon, pass a test, etc. :-) —ShadowRanger (talk|stalk) 22:17, 21 January 2010 (UTC)
- One additional note: The 50% really means 100% of one core, it's not some magic number. The VM is completely occupying a single CPU, and you have a dual core (or hyperthreaded) machine. The VM tells the guest OS that there is only one processor, so as to maintain performance for the host OS and other programs competing for CPU. —ShadowRanger (talk|stalk) 22:20, 21 January 2010 (UTC)
- The real reason is because those operating systems don't make use of the hlt instruction and instead place the CPU in an idle loop. There are third-party utilities available that can make those operating systems utilize the instruction. 96.226.235.46 (talk) 02:10, 22 January 2010 (UTC)
- Oh, duh. I'm an idiot. I think I read about that ages ago on The Old New Thing, but had completely forgotten. Yes, that's likely the cause of a lot of the difference. —ShadowRanger (talk|stalk) 15:52, 22 January 2010 (UTC)
- For those interested in why Windows 95 didn't use hlt, even though it was an available feature: The Old New Thing: Hardware backwards compatibility —ShadowRanger (talk|stalk) 19:30, 22 January 2010 (UTC)
- Oh, duh. I'm an idiot. I think I read about that ages ago on The Old New Thing, but had completely forgotten. Yes, that's likely the cause of a lot of the difference. —ShadowRanger (talk|stalk) 15:52, 22 January 2010 (UTC)
- The real reason is because those operating systems don't make use of the hlt instruction and instead place the CPU in an idle loop. There are third-party utilities available that can make those operating systems utilize the instruction. 96.226.235.46 (talk) 02:10, 22 January 2010 (UTC)
power supply issues
[edit]I am working on a Gateway 300S LTD and when I plug it in and push the power. THe power button flashes on then goes out and won't come on again unless I pull the plug, then plug it back in. But it does the same thing. What could be wrong with it —Preceding unsigned comment added by 152.31.162.62 (talk) 18:07, 21 January 2010 (UTC)
- Many things could cause this. Make sure all cables between PC power supply and Motherboard are plugged in & in the correct sockets. CPU correctly inserted in socket. RAM SIMMS installed correctly. CPU cooling fan operation is ESSENTIAL, check cable. Why are you 'working' on the PC? Has it been faulty in any other way?
ps. Please sign your message. Type ~~~~ or use the 'sign' button. --220.101.28.25 (talk) 20:56, 21 January 2010 (UTC)
- Presuming this is a desktop with an ATX power supply. Remove the PS connector from the motherboard and jump 16 (green) to 15 (black)— the PS should turn on. If the PS comes on, then remove all the memory and plug-in boards from the motherboard, connect the PS and see what happens. ---— Gadget850 (Ed) talk 13:18, 22 January 2010 (UTC)
e-Ink longevity
[edit]What's the known lifespan of an e-Ink display? Does it only work for so many on-off cycles or so many years? What happens when they stop working? Does it go light/dark/or freeze the last image? --70.167.58.6 (talk) 18:53, 21 January 2010 (UTC)
- The manufacturer does not give it a lifespan. It is electronic, so it will eventually wear out. It is also pixel-based. There are a bunch of little capsules (like pixels) that can be one color or a different color (black/white is normal). The color changes based on the charge behind the capsule. It is possible for a capsule to break through force - such as slamming the display with a hammer. I see the circuit behind the crystal as the point of failure. I expect that when it begins to fail, you will see lines where it is always white or always black - very similar to what an LCD display looks like as it begins to fail. -- kainaw™ 22:03, 21 January 2010 (UTC)
- I'd suspect, based on what I know of the technology, that the lifecycle would be measured primarily in on-off cycles. On the other hand, I suspect the screen itself won't be the main point of failure in these devices; damage due to accidents and poor care, combined with the relatively short useful life of the built-in batteries are likely to off it before the screen has been used enough to suffer wear from mere pixel cycling. —ShadowRanger (talk|stalk) 22:08, 21 January 2010 (UTC)
- Now that I think about it... Being off for an extremely long time will likely cause the charged "ink" to lose some charge. Being on puts a charge near the ink, so it will tend to work properly. Being off places the positive/negative charged ink near each other. I see it similar to tossing bunch of magnets in a drawer. If left for an extremely long time, some won't work as well. However, we are talking about long after the circuit to charge/discharge the ink has worn out. -- kainaw™ 22:19, 21 January 2010 (UTC)
- I think the charge is chemical (eg think of charged surfactant like molecules (eg oleyl trimethyl ammonium) embedded in a polymer with the counter ion (eg Cl-) being soluble - slightly different in practice) - so loss of charge as such wouldn't be a problem. Excluding the damage to wires already mentioned above, I'd expect degradation of the polymer to be one problem - eg especially under uv light or in radical rich enviroments (eg a sunny california, outdoors and in the smog) - a glass cover would stop most of this. Simple things like the charged particles starting to stick together (agglomeration) would reduce effectiveness over time, which is not beyond the bounds of possibility. Thickening of the carrier liquid (again uv light) could slow or eventually stop response. Beyond that there is much I can think of - they may be very long lasting - I couldn't find any much data either.87.102.67.84 (talk) 23:20, 21 January 2010 (UTC)
- Now that I think about it... Being off for an extremely long time will likely cause the charged "ink" to lose some charge. Being on puts a charge near the ink, so it will tend to work properly. Being off places the positive/negative charged ink near each other. I see it similar to tossing bunch of magnets in a drawer. If left for an extremely long time, some won't work as well. However, we are talking about long after the circuit to charge/discharge the ink has worn out. -- kainaw™ 22:19, 21 January 2010 (UTC)
- We have an article, see E Ink, and the company website is www.eink.com 220.101.28.25 (talk) 11:50, 22 January 2010 (UTC)Bold text
So would the display get damaged if frozen or left in a very hot car? --70.167.58.6 (talk) 23:04, 22 January 2010 (UTC)
- From the eInk website :
Environmental Operating Temperature Range: 0º—50º C Storage Temperature Range: -25º—70º C
APL (talk) 23:38, 22 January 2010 (UTC)
Quick Java question on Thread.interrupt()
[edit]Hello! Consider the following code snippet:
//Thread 1 extends Thread
InputStream in;
byte[] bytes = new byte[100];
//... in is initialized properly, but may or may not contain bytes yet
try{
in.read(bytes);
}
catch(IOException e) {
//ignore
}
catch(InterruptedException e)
{
//do something
}
//Thread 2
Thread_1 toInterrupt = new Thread_1();
toInterrupt.start();
//...
toInterrupt.interrupt();
If Thread_1 is interrupted while it is blocking waiting to read at in.read(), will an InterruptedException be thrown, and execution will switch from in.read() to code in the catch{} block? This is probably an easy question, but I'm just not sure if the method to interrupt must throw a checked InterrruptedException (like Thread.sleep()) for the interrupt to work properly. Thank you!--el Aprel (facta-facienda) 23:10, 21 January 2010 (UTC)
- Yes, if the timing is right and Thread 2 executes the interrupt() call during a period when Thread 1 is still blocking on the read, then control for Thread 1 will transfer to the catch block, because an InterruptedException was received. (Thread 2 will continue marching along, unless you intentionally wait for some response or notification from Thread 1). in.read() is a blocking method. If it is interrupted, the behavior of the InputStream will depend on the instantiated class type of InputStream. You may or may not lose bytes as a result of this - again, check carefully whether the exact InputStream you instantiated is declared thread safe. (In other words, whether an interrupted read() operation guarantees some kind of rollback mechanism). If you're using one of the Sun implementations, thread-safety and behavior for I/O is defined in the javadoc. Also, note that Thread.interrupt() documents behavior if the java.nio InterruptibleChannel API is in use. ("If this thread is blocked in an I/O operation upon an interruptible channel then the channel will be closed, the thread's interrupt status will be set, and the thread will receive a ClosedByInterruptException.") For other cases, you may have to check with the sourcecode of the InputStream or unit-test it. This article from a Java developer news site discusses some finer details. Nimur (talk) 23:33, 21 January 2010 (UTC)
- Thank you for the quick response, Nimur! Exactly what I needed to know.--el Aprel (facta-facienda) 00:13, 22 January 2010 (UTC)
- Nonsense. Read does not declare InterruptedException. It will throw an InterruptedIOException instead. You can treat it specially if you put the InterruptedIOException catch block before the IOException catch block. —Preceding unsigned comment added by 80.226.1.7 (talk) 01:45, 23 January 2010 (UTC)
- Ah. I think this is true. The InputStream may be implemented by a class which does throw that exception, but the way this code is written, it must be treated as a generic InputStream (irrespective of its additional capabilities at runtime). As the IP pointed out, the specific type of IOException that could be thrown is an InterruptedIOException. My mistake - I spoke too soon! Nimur (talk) 03:06, 23 January 2010 (UTC)
- Nonsense. Read does not declare InterruptedException. It will throw an InterruptedIOException instead. You can treat it specially if you put the InterruptedIOException catch block before the IOException catch block. —Preceding unsigned comment added by 80.226.1.7 (talk) 01:45, 23 January 2010 (UTC)
- Thank you for the quick response, Nimur! Exactly what I needed to know.--el Aprel (facta-facienda) 00:13, 22 January 2010 (UTC)