Wikipedia:Reference desk/Archives/Computing/2010 November 1
Computing desk | ||
---|---|---|
< October 31 | << Oct | November | Dec >> | November 2 > |
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 1
[edit]Unallocated space
[edit]Hi, I have an asus n61j series (n61jv-x2) computer with the following disk partitions. What is the unallocated space for? Any ideas? Am I supposed to leave it as it is? Thank you in advance. Kushal (talk) 02:45, 1 November 2010 (UTC)
- I can't think of any reason why you couldn't create/resize partitions to use that space. There are partition types that NT won't recognize (e.g. Linux ext3), but they wouldn't show up as "unallocated". -- BenRG (talk) 04:16, 1 November 2010 (UTC)
- Well, this computer has Geforce GT 325M and optimus won't work on Linux apparently. But that's for another day I guess. Kushal (talk) 14:09, 1 November 2010 (UTC)
- One current fashion (of manufacturers) is to split a hard disk into 2, one part for os and general, and the other half for a file archive. ie two drives on one disk - this looks like something similar - except it's been forgotten to actually create the archive drive..? 87.102.115.141 (talk) 09:10, 1 November 2010 (UTC)
- I would understand the scheme better if it was one partition for os and one for user data but what's the point of backing up on not just the same computer but on the same disk? I must be missing something... Maybe that's where the system restore data should go?
- No you're not missing much - it's not a particularily intelligent scheme.. they do do it though (the manufacturers) - I suppose if people back up somewhere it's better than nothing. (I think the computers come installed with an 'own brand' backup your directorys tool as well - to help) - the flaws are obvious, obviously.Sf5xeplus (talk) 10:08, 2 November 2010 (UTC)
- Many computers these days have an extra, hidden partition for system recovery, but that wouldn't show up as unallocated space (unless it had been deleted, in which case you might as well reuse the space). Also it wouldn't be 100+ GB, it would be 10 GB tops. -- BenRG (talk) 21:06, 1 November 2010 (UTC)
- That's what the recovery partition in the Alienware looks like. I am having networking trouble on the Asus and the computer did not come with a recovery disk (and apparently a recovery partition either). :/ Sad times Kushal (talk) 22:00, 2 November 2010 (UTC)
- I would understand the scheme better if it was one partition for os and one for user data but what's the point of backing up on not just the same computer but on the same disk? I must be missing something... Maybe that's where the system restore data should go?
- Is this a second-hand computer? Volumes encrypted with tools such as TrueCrypt may show up as unallocated space in disk management. (In that case, you might as well treat it as such, unless you can get the previous owner to reveal the password).
decltype
(talk) 09:15, 1 November 2010 (UTC)- It is from warehouse deals fulfilled by amazon.com. :/ It was supposed to be in "used - mint" condition. I feel cheated. I hope the windows license sticker on the bottom of the computer will still work if I have to reinstall. Kushal (talk) 13:30, 1 November 2010 (UTC)
- From the disc management screenshot you gave, it looks like you should simply be able to extend the C: partition into the unallocated space. Right click on the C: partition and click "Extend Volume" (or something to that effect), and have it fill the remaining space.206.131.39.6 (talk) 15:24, 1 November 2010 (UTC)
- Note that, if memory serves, you actually have to right-click the letters "C:" and you can't right-click any of the fields off to its right (even on the same line). Comet Tuttle (talk) 15:41, 1 November 2010 (UTC)
- From the disc management screenshot you gave, it looks like you should simply be able to extend the C: partition into the unallocated space. Right click on the C: partition and click "Extend Volume" (or something to that effect), and have it fill the remaining space.206.131.39.6 (talk) 15:24, 1 November 2010 (UTC)
- It is from warehouse deals fulfilled by amazon.com. :/ It was supposed to be in "used - mint" condition. I feel cheated. I hope the windows license sticker on the bottom of the computer will still work if I have to reinstall. Kushal (talk) 13:30, 1 November 2010 (UTC)
- A partition encrypted with TrueCrypt would show up as an unrecognized filesystem, not as unallocated space. TrueCrypt does support encrypting an entire volume, not just a partition, but in that case the whole volume would show up as unformatted and unpartitioned. It's theoretically possible to "disguise" an encrypted partition as unallocated space, but TrueCrypt doesn't support that and I don't know of a product that does. It strikes me as a bad idea. I would reinstall Windows in any case, because who knows what spyware the previous user left on there. You may want to backup and restore the installed Windows license instead of using the one on the bottom of the machine, to avoid phone activation, as described here for example. -- BenRG (talk) 21:06, 1 November 2010 (UTC)
- Ordinarily, I would not consider going through the trouble of clean installing windows, but for the last two days, I am having networking trouble so I might have to... :/ I guess I need to start a new question for that one... Kushal (talk) 20:08, 2 November 2010 (UTC)
Software
[edit]What's the best software to edit sound. I'm a transcriber n sometimes i get really bad audios that i need to remove the background noise on them or they may be mono sound. I don't need a complex software just a really good reliable software. thanks. P.s Don't tell me to Google. —Preceding unsigned comment added by 196.201.218.247 (talk) 14:46, 1 November 2010 (UTC)
- The standard answer here: Audacity. Is free. Is good. --jjron (talk) 15:01, 1 November 2010 (UTC)
- He asked for the best, which is Pro Tools. Not free, better than good. Comet Tuttle (talk) 15:27, 1 November 2010 (UTC)
- Why don't you Google it? (Sorry... couldn't resist.) Kingsfold (Quack quack!) 16:59, 2 November 2010 (UTC)
- He asked for the best, which is Pro Tools. Not free, better than good. Comet Tuttle (talk) 15:27, 1 November 2010 (UTC)
What is the significance of the RIAA no longer suing infringers?
[edit]Does this mean that there are no (practical) legal consequences to illegal filesharing? Does anybody know of statistics of statistics showing an increase of illegal filesharing after the announcment was made? AGradman / talk / how the subject page looked when I made this edit 16:22, 1 November 2010 (UTC)
- For the record, that first paragraph said they're "set to drop" their lawsuit strategy; it doesn't say they have dropped it. Comet Tuttle (talk) 16:42, 1 November 2010 (UTC)
- Ramifications are described in detail in the article. Instead of going through a lengthy lawsuit, they have reached agreements with many major ISPs to simply have the user's internet connection cut off. In the end, it is cheaper and probably more effective than lawsuits. -- kainaw™ 16:50, 1 November 2010 (UTC)
computer troubles
[edit]Who or what is this 'Crawler' and how has it taken over my computer? I have managed to set my homepage back to normal, but how do I get my old search engine back?
Also, how do I get the old Microsoft Works icons back, these new ones look terrible?
And, properties of my Open Office Document: Created 31/10/2010 23:56:40, last modified 01/11/2010 00:39:11, total editing time 02:11:08. How does that work? —Preceding unsigned comment added by 148.197.121.205 (talk) 16:58, 1 November 2010 (UTC)
148.197.121.205 (talk) 16:53, 1 November 2010 (UTC)
- It appears that "Crawler" is a toolbar for Internet Explorer that is considered malware. It changes your default IE page, and redirects your web searches. Many editors here have recommended Malwarebytes, which is an anti-malware program that should remove it.
- Microsoft Works icons: What sorts of files have the new icons? What do they look like now? Can you upload a screenshot to Flickr or the like, for us to examine?
- For those properties of your document: Could you explain what exactly is your question? I think, but am not sure, that you may be getting confused because "01/11/2010" means "1st of November 2010" and not "January 11 2010"? Comet Tuttle (talk) 17:49, 1 November 2010 (UTC)
- Couldn't I just reset my old search engine somehow?
- All the Microsoft works word processor files do, they're really low resolution pictures, with a blue square at the top, and a stripey box in the middle.
- the problem is that I only had it open less than an hour and have apparently done more than two hours work in that time, I was wondering how it worked that out. 148.197.121.205 (talk) 17:57, 1 November 2010 (UTC)
- Resetting your old search engine: I don't know anything about Crawler, so you would have to ask the author(s) of the software how to change the search engine. Probably not, I will guess; because someone is probably paying them to force your search engine to be something else. If you don't know what Crawler is gaining you, I would remove it, personally.
- Works icons: When you double-click a Works document that has one of these weird icons, does it still open Works, or something else? What version of Windows are you running?
- The 2-hour thing: I see. This might be a bug in OpenOffice, possibly related to this bug (which I also noticed on a non-computer clock of mine at home) in which some clocks and software believed that a daylight savings time 1-hour shift occurred recently. Comet Tuttle (talk) 18:12, 1 November 2010 (UTC)
- How do I get rid of it though?
- They do open properly, it seems, just with annoyingly ugly icons.
- There was a change recently, but it was the night before that. 148.197.121.205 (talk) 18:17, 1 November 2010 (UTC)
- Malwarebytes is supposed to be one anti-malware solution that will get rid of it. Comet Tuttle (talk) 21:36, 1 November 2010 (UTC)
- I've tried that, it doesn't seem to have done anything. What have I done wrong? 148.197.121.205 (talk) 21:43, 1 November 2010 (UTC)
- Malwarebytes is supposed to be one anti-malware solution that will get rid of it. Comet Tuttle (talk) 21:36, 1 November 2010 (UTC)
- Hm. Sorry, I don't have a ton of insight into this because I've never installed it — have you gone to the Control Panel and chosen "Add/Remove Programs" (called slightly different things in Vista and Windows 7) and seen if Crawler is present, and removed it from there? Comet Tuttle (talk) 20:38, 3 November 2010 (UTC)
- The dates make sense if your computer thinks it's in the UK. There was a change in time in the UK from BST to GMT, but that was during the night of the 30/31st November. 92.24.185.90 (talk) 20:59, 1 November 2010 (UTC)
- Other good free anti-malware scanners you could try include Superantispyware and Spybot – Search & Destroy. Best to run them after using Ccleaner, and you may be able to use it to stop "Crawler" running at start-up. A dedicated computer forum may have more expertise and be willing to provide more detailed guidance. You must have an anti-virus and firewall installed. Avast! is a good free anti-virus, there are others. 92.15.10.141 (talk) 12:34, 5 November 2010 (UTC)
Need .exe file to close three processes on Windows XP
[edit]I need an .exe file that could close three processes given their names listed in a .txt file in the same directory. The system is Windows XP. It is not possible to run .exe file with parameters in command line. Everything should be completely automated. In fact, the executable will be auto-run from a disk-on-key with U3 inserted into USB slot of a computer without monitor, keyboard or mouse. If you do not know an existing program that could cope with this task, please suggest some piece of code to achieve this. I am not a programmer but know enough to compile it if it is complete. 79.181.28.155 (talk) 16:55, 1 November 2010 (UTC)
- Try this 82.44.55.25 (talk) 17:04, 1 November 2010 (UTC)
- No, unfortunately it does not solve my problem. As I have said, I cannot run it from command line and PsKill requires just that - with parameters. There is a U3 USB disk-on-key with an .exe file that executes automatically (in fact, U3 thinks it's FireFox browser) - you can substitute the browser .exe with any other by changing its name to FireFox-something. So it runs by itself and that's it. I can see no way to add the command line options. 79.181.28.155 (talk) 17:32, 1 November 2010 (UTC)
- Your claim "I cannot run it from command line" doesn't make much sense as you can place all the commands you like in a batch file and run the batch file as an executable. Can you further define the limitations of why batch files cannot be run? -- kainaw™ 17:36, 1 November 2010 (UTC)
- There's a computer with neither monitor nor keyboard doing something. I want to be able to kill three certain processes on this computer just by inserting a U3 disk-on-key into its USB slot. My idea is to substitute auto-run FireFox executable with any "killing" .exe file (renaming it to FireFox.exe or whatever it is called). It actually works - U3 happily runs any .exe I want automatically. The only part of the plan I still did't figure out is how this can be used to kill three certain processes I intend to kill. U3 doesn't run .bat files, only .exe it thinks is a FireFox browser. 79.181.28.155 (talk) 17:53, 1 November 2010 (UTC)
- You could convert a batch file to .exe with something like this 82.44.55.25 (talk) 17:51, 1 November 2010 (UTC)
- Your idea of converting .bat into .exe is a good one, but I am afraid to run obscure converters written by unknown persons (as opposed to PsKill and Rousinovich whom I trust). Could you please suggest C++ code that runs a .bat file, or better still, kills Process1.exe, Process2.exe, Process.exe running on XP system? I am not a programmer, but I can compile 79.181.28.155 (talk) 18:08, 1 November 2010 (UTC)
- You could convert a batch file to .exe with something like this 82.44.55.25 (talk) 17:51, 1 November 2010 (UTC)
- There's a computer with neither monitor nor keyboard doing something. I want to be able to kill three certain processes on this computer just by inserting a U3 disk-on-key into its USB slot. My idea is to substitute auto-run FireFox executable with any "killing" .exe file (renaming it to FireFox.exe or whatever it is called). It actually works - U3 happily runs any .exe I want automatically. The only part of the plan I still did't figure out is how this can be used to kill three certain processes I intend to kill. U3 doesn't run .bat files, only .exe it thinks is a FireFox browser. 79.181.28.155 (talk) 17:53, 1 November 2010 (UTC)
- Your claim "I cannot run it from command line" doesn't make much sense as you can place all the commands you like in a batch file and run the batch file as an executable. Can you further define the limitations of why batch files cannot be run? -- kainaw™ 17:36, 1 November 2010 (UTC)
- Unless I've misunderstood, what you're trying to do is swap something in place of the (U3) firefox.exe so that it'll autorun when you plug it into another computer. Why not just use Shortcut Creator 4U3 which would allow you to add your own applications to the U3 menu (including making them autorun if you wanted) and then you can call whatever you want (either an application with command line parameters or a batch file). I've used this software myself many times to add "non-U3" apps to the menu and it sounds exactly like what you want. ZX81 talk 18:01, 1 November 2010 (UTC)
- Right, but he doesn't even state his name... No way I'll run anything written by Mr. Unknown Hacker on a sensitive system. —Preceding unsigned comment added by 79.181.28.155 (talk) 18:12, 1 November 2010 (UTC)
- Well you could always download the source code for version 2 (which isn't vastly different and will do the same job) from that same page and compile it yourself. However, you don't run the shortcut creator on the targetmachine, you run it on any machine (be it real or virtual) as all it's doing is adding an icon to the U3 menu. If you're familiar with the U3 filesystem/menu structure you can verify for yourself that it hasn't done anything other than added the shortcut as you've asked and then you plug it into the remote system. ZX81 talk 18:42, 1 November 2010 (UTC)
- Right, but he doesn't even state his name... No way I'll run anything written by Mr. Unknown Hacker on a sensitive system. —Preceding unsigned comment added by 79.181.28.155 (talk) 18:12, 1 November 2010 (UTC)
- Try this:
#include <stdlib.h>
int main(void) {
system("pskill process1");
system("pskill process2");
system("pskill process3");
return 0;
}
- -- BenRG (talk) 22:24, 1 November 2010 (UTC)
- Thank you, BenRG! I have modified your code using tskill instead, and it worked like charm. 79.181.28.155 (talk) 22:04, 2 November 2010 (UTC)
- Or use the WinAPI functions: EnumProcesses() to list all processes, and select the one you care about; then call TerminateProcess() to terminate it (if your program has permission to do so). See MSDN's Process and Thread reference for more. Nimur (talk) 00:44, 2 November 2010 (UTC)
How do I close one of my windows on a laptop?
[edit]I tried to save a page and it's blocked the window. I can't get the window to close. What do I do apart from turning my PC off? Thank you.--Jeanne Boleyn (talk) 17:14, 1 November 2010 (UTC)
- That description is not clear at all:
- What's your operating system? Microsoft Windows, I suppose?
- What kind of page were you trying to save? A web page?
- What program did you try to save it with? Your web browser? (Internet Explorer, Firefox, Opera, ...?)
- Why can't you close the window? Is the closing button not visible on the screen? Or is it visible but doesn't react?
- In general, under Windows you can press control-alt-delete to get a list of applications as well as some other options. You can use this to end a stubborn application (losing any unsaved data). A more radical option is to log out and log in again. That's more or less equivalent to a reboot, but faster. Hans Adler 17:22, 1 November 2010 (UTC)
- Hold down the Alt key, then while doing so tap the Tab key. This will let you switch between applications. Comet Tuttle (talk) 17:32, 1 November 2010 (UTC)
- This is the answer that Hans Adler gave, but perhaps stated more clearly: On any Windows system, the way to kill a frozen and unresponsive program is (1) Press Control-Alt-Delete to bring up Task Manager, (2) Find the offending program in the list and select it, (3) Press the "end process" button. Looie496 (talk) 17:52, 1 November 2010 (UTC)
- Where do I find the delete key on an Italian Windows Vista laptop?--Jeanne Boleyn (talk) 18:28, 1 November 2010 (UTC)
- My son figured it out and it worked! Thanks for your helpful answers.--Jeanne Boleyn (talk) 19:15, 1 November 2010 (UTC)
- Where do I find the delete key on an Italian Windows Vista laptop?--Jeanne Boleyn (talk) 18:28, 1 November 2010 (UTC)
- This is the answer that Hans Adler gave, but perhaps stated more clearly: On any Windows system, the way to kill a frozen and unresponsive program is (1) Press Control-Alt-Delete to bring up Task Manager, (2) Find the offending program in the list and select it, (3) Press the "end process" button. Looie496 (talk) 17:52, 1 November 2010 (UTC)
- Hold down the Alt key, then while doing so tap the Tab key. This will let you switch between applications. Comet Tuttle (talk) 17:32, 1 November 2010 (UTC)
php
[edit]In php, how could you list all files in a directory by their modified date, newest first? 82.44.55.25 (talk) 18:26, 1 November 2010 (UTC)
- The following should do it. It's probably not the easiest way, but as I started learning php 28 minutes ago, it's the best I can do for now:
#!/usr/bin/php5
<?php
$store = array();
$dir = opendir(".");
while ($file = readdir($dir)){
$stat_data = stat($file);
$store[$stat_data['mtime']] = $file;
}
krsort($store);
foreach ($store as $foo){
echo $foo . "\n";
}
?>
- The modified time is fetched with "filemtime($file)". Using "stat($file)" returns an array - most of which you don't want. Also, more than one file can have the same modified time. So, you need a unique index for each file. You can concatenate the filename (which must be unique) to the modified time like:
// see above...
while($file = readdir(dir)){
$mtime = filemtime($file);
$store[$mtime.$file] = $file;
}
// see above...
- Then, even if two files have the same mtime, the index in $store will be unique. -- kainaw™ 20:23, 1 November 2010 (UTC)
- In the pathological case where new files are being added to a directory asynchronously (by another process), the while( ) loop risks entering an infinite loop. Instead, use scandir() to scan the directory exactly one time, and loop over its results:
// see above ...
$file_list = scandir($dir);
for ($i=0; $i < count($file_list); $i++) {
$file = $file_list[$i] ;
$mtime = filemtime($file);
$store[$mtime.$file] = $file;
}
- This is a safer way to scan a directory. Depending on your needs, you might have actually intended to re-scan the directory inside the loop to check for new updates - but I think you should handle that more properly with a separate check for updates. Nimur (talk) 20:35, 1 November 2010 (UTC)
- I don't understand what you mean. Looking at the source for PHP's readdir, it's essentially a wrapper around the POSIX dirent readdir(3) call; it functions pretty much like a generator, and it doesn't reopen and rescan the directory each time you call it. So I don't see why scandir is any safer. PHP either uses the native POSIX scandir (glibc source) or its own implementation (which works pretty much the same) - both say in essence while ((entry=readdir(direntPtr))!=NULL) ... which is essentially identical to the readdir loop, above, just in C rather than PHP. So, bar timing differences, the PHP readdir loop should work just the same as the C loop inside scandir. And they have, surely, the same pathological (mis)behaviours. -- Finlay McWalter ☻ Talk 23:19, 1 November 2010 (UTC)
- Hm. That seems pathological. I was under the impression that PHP scandir would guarantee a termination time, but on further inspection, I can see that the scandir documentation does not specify any such safety. I'm disinclined to dive into PHP source, but I'm in agreement with Finlay that it probably directly wraps glibc. So - followup questions - is this issue a well-known race condition? If you have a program (say, a logger) constantly writing new files into the directory, and if the timing coincides with any program that is scandir`ing that directory, doesn't this yield an infinite loop? What can be done about it? Shouldn't directory-listing be wrapped in a mutex`ed ownership of the directory? Does this vary from file-system to file-system (say, ext4 vs. NTFS)? Nimur (talk) 23:49, 1 November 2010 (UTC)
- In retrospect, I think my error is assuming file-I/O operations should be "safe" - i.e. to have a guaranteed response time; but few/no direct I/O operations are ever guaranteed to have finite return times. In my scenario above, a program is writing new files to the directory... and if there are an arbitrary number of additional files being added to the directory, it makes sense that listing the directory-contents should take an arbitrarily long time. Programmers who need to guarantee response-time would need to use a timeout on any I/O operation. I'm going to hide this discussion because it may confuse the OP, and is entirely based on my earlier misconception. Nimur (talk) 00:05, 2 November 2010 (UTC)
- Hm. That seems pathological. I was under the impression that PHP scandir would guarantee a termination time, but on further inspection, I can see that the scandir documentation does not specify any such safety. I'm disinclined to dive into PHP source, but I'm in agreement with Finlay that it probably directly wraps glibc. So - followup questions - is this issue a well-known race condition? If you have a program (say, a logger) constantly writing new files into the directory, and if the timing coincides with any program that is scandir`ing that directory, doesn't this yield an infinite loop? What can be done about it? Shouldn't directory-listing be wrapped in a mutex`ed ownership of the directory? Does this vary from file-system to file-system (say, ext4 vs. NTFS)? Nimur (talk) 23:49, 1 November 2010 (UTC)
- I don't understand what you mean. Looking at the source for PHP's readdir, it's essentially a wrapper around the POSIX dirent readdir(3) call; it functions pretty much like a generator, and it doesn't reopen and rescan the directory each time you call it. So I don't see why scandir is any safer. PHP either uses the native POSIX scandir (glibc source) or its own implementation (which works pretty much the same) - both say in essence while ((entry=readdir(direntPtr))!=NULL) ... which is essentially identical to the readdir loop, above, just in C rather than PHP. So, bar timing differences, the PHP readdir loop should work just the same as the C loop inside scandir. And they have, surely, the same pathological (mis)behaviours. -- Finlay McWalter ☻ Talk 23:19, 1 November 2010 (UTC)
Thanks, that works. Two things; how could I display the modified date of each file next to it? And I'm seeing "." and ".." listed in addition to the files, is there a way to get rid of that? 82.44.55.25 (talk) 14:53, 2 November 2010 (UTC)
- The changes are very minor. I'll skip all filenames beginning with "." for you - those are hidden files.
$store = array();
$dir = opendir(".");
while ($file = readdir($dir)){
if($file{0}=='.') continue; // Skip filenames beginning with .
$mtime = filemtime($file);
$store[$mtime.$file] = $file;
}
krsort($store);
foreach ($store as $time=>$foo){ // The index has the time
echo intval($time)."\t".$foo."\n"; // Need intval since the filename is concatenated to the time.
}
- That should work. -- kainaw™ 16:50, 2 November 2010 (UTC)
- I just thought that if you want an actual date, you can use date("Y-m-d", intval($time)) instead of just intval($time). -- kainaw™ 16:57, 2 November 2010 (UTC)
- Awesome! Thanks 82.44.55.25 (talk) 18:14, 2 November 2010 (UTC)