Wikipedia:Reference desk/Archives/Computing/2010 March 15

From Wikipedia, the free encyclopedia
Computing desk
< March 14 << Feb | March | Apr >> March 16 >
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.


March 15[edit]

Cannot access admin account[edit]

Resolved

Sorry for the double-posting, but this problem most certainly wasn't planned. I cannot access my administrator account on Windows XP. It has no password, but whenever I try to log on, all I get is "Loading personal settings..." and it stays that way forever. I have a backup admin account, but I was dumb enough to put a password on it, and even dumber to not remember where I put the password that I wrote down. So now I cannot log on to Windows as an admin, only my limited account (which I am typing this from) is still accessible. I don't have an OS installation disk, so reinstalling Windows is not a possibility for me. What are my options?24.189.90.68 (talk) 05:40, 15 March 2010 (UTC)[reply]

There are so many ways to get administrator access on XP, it's not even funny. :p http://www.google.com/search?q=%22windows%20xp%22%20forgot%20admin%20password ¦ Reisio (talk) 06:01, 15 March 2010 (UTC)[reply]
Obviously, the OP has no trouble getting access (if he did, then he would not be able to see "loading personal settings..."). His user just has trouble loading profile for some reason. --164.67.235.148 (talk) 05:20, 16 March 2010 (UTC)[reply]

No worries, Ctrl+Alt+Delete saved me, thanks! 24.189.90.68 (talk) 10:00, 15 March 2010 (UTC)[reply]

New SSD: clone or reinstall?[edit]

I am currently using a normal hard drive. If I buy a new SSD, can I just clone the hard drive to the SSD or do I have to reinstall the OS? 121.72.169.25 (talk) 10:25, 15 March 2010 (UTC)[reply]

It depends on your OS. If you have to install drivers to use the SSD in windows (i'm assuming you use windows) then it's not likely to work because, while windows would boot from the SSD, once windows started it wouldn't know how to work the SSD and you'd get a BSOD. Although, you could install the driver beforehand...but I'm not sure that would work... Even if it did, you'd be required to reactivate your windows installation because it detected a hardware change. On linux, it wouldn't be an issue.  Buffered Input Output 14:51, 15 March 2010 (UTC)[reply]
I am using Windows 7. 121.72.217.246 (talk) 19:15, 15 March 2010 (UTC)[reply]
It's probably easiest to reinstall, then copy your user files over (possibly using Windows Easy Transfer). You could try to clone your current hard drive, but in my experience that doesn't usually work well with drives that are different sizes. Indeterminate (talk) 10:05, 16 March 2010 (UTC)[reply]

SSD/Moore's Law[edit]

Does Moore's Law applies to SSDs? Should I expect SSDs halve in price or double in capacity next year? 121.72.169.25 (talk) 10:25, 15 March 2010 (UTC)[reply]

Moore's law applies to memory and many other components of computer systems, as well as to processors. Of course, it's just an approximation. But solid-state drive price/performance largely depends on that of flash memory; flash memory storage rates seem to be increasing a little faster than Moore's law[1][2]. --Normansmithy (talk) 13:31, 15 March 2010 (UTC)[reply]

Moore's Law is based on the idea that transistor density doubles every 18 months or so. It's an approximation, as of course companies and people within them have control over how quickly this actually happens. The cost of an SSD drive should half 18 - 24 months due to the ability to cram twice as many transistors on to the same amount of resource (wafer).

Don't confuse capacity with density. Capacity can be changed just by adding more drives or flash chips. The idea of Moore's law is that we can double the amount of transistors that we can get in the same physical area, not that we can make faster processors (or larger storage) by using more transistors. —Preceding unsigned comment added by 194.200.65.239 (talk) 14:06, 15 March 2010 (UTC)[reply]

Also note that price isn't necessary going to be cut in half just because density doubles. You may be able to buy a 2 TB drive for the cost of a 1 TB drive 18 months ago, but that doesn't mean a 1 TB drive will cost half as much as it did then. This is because prices aren't necessarily proportional to capacity, which is quite obvious with USB flash/pen drives, where the lowest cost per GB is somewhere around the 16-32 GB range, with prices per GB going up both for smaller and larger sizes. StuRat (talk) 16:44, 15 March 2010 (UTC)[reply]
You should also be aware that the price collapse of flash memory (exceeding Moore's Law?) over the last few years is not likely to continue, in fact it might soon slow considerably.Future pricing. Dbfirs 10:49, 16 March 2010 (UTC)[reply]

to connect two wifi devices[edit]

How to connect two wi fi devices, one compoter and other a robot so that afrer connecting the two the robot could be run using the computer? —Preceding unsigned comment added by Aishranj (talkcontribs) 11:37, 15 March 2010 (UTC)[reply]

Can you elaborate any more?  Buffered Input Output 14:52, 15 March 2010 (UTC)[reply]
The PC may be able to function as a wireless access point. Otherwise, you will need a third device such as a wireless router. Once both devices have an IP address, you can write a program or find pre-made software that uses socket programming to send data in both directions. Finally, you will need to design or find a program which can understand the data that you send and interpret it as commands. Typically, this will require a lot of programming effort on your part, unless you have a pre-made kit or commercial toy robot. Nimur (talk) 15:48, 15 March 2010 (UTC)[reply]
I've never used it but ad hoc mode is supposed to allow two devices to communicate without a router. -- Q Chris (talk) 15:58, 15 March 2010 (UTC)[reply]
It is very possible that a "robot" (rather, an embedded computer with an 802.11 radio) has limited or no support for ad-hoc networking. But, if you have the budget, you can get a full-blown, totally standards-compliant 802.11 radio system on an embedded mainboard; and nowadays, netbook-like devices are so small and cheap that you can quite probably mount one on your robot locomotion platform. Here is a nice project report called An Open Robot Platform for Mobile Ad-Hoc Network Research from the Wireless Group at University of Texas at Austin. Its an "undergraduate-level" project report and should be fairly readable if you have any engineering inclination. Conveniently, there are references to specific hardware platforms, total system cost appears to be about $1500, (which is "dirt cheap" by wireless robot standards). The main board is a NR10000EG embedded x86 system. Nimur (talk) 18:01, 15 March 2010 (UTC)[reply]
A Lego Mindstorms NXT system ($261 new) will connect wirelessly to a PC using Bluetooth. The range is a little more limited than WiFi - but it's cheap, super-flexible and literally anyone can learn to program the thing using Lego's graphical programming system. SteveBaker (talk) 03:00, 16 March 2010 (UTC)[reply]
Some wifi network cards can operate in infrastructure mode (act as access point). In windows, this functionality usually is available in software, which came with card, in linux, there is iwconfig option (mode master, if i remember corectly), bu i have not seen a device supporting this. -Yyy (talk) 08:11, 16 March 2010 (UTC)[reply]

Promissory abstracts[edit]

I am currently in the process of submitting an abstract to a conference for a computer science project I worked on during last summer. The conference site says, "Promissory abstracts are discouraged." What are "promissory abstracts"?

70.29.24.251 (talk) 14:55, 15 March 2010 (UTC)[reply]

It appears to be an abstract for something you have not yet written or implemented, see this link. -- Q Chris (talk) 15:15, 15 March 2010 (UTC)[reply]
I see, thanks! 70.29.24.251 (talk) 16:30, 16 March 2010 (UTC)[reply]
Resolved

Want to keep text between two text strings and discard everything else[edit]

I have over a hundred text files in a folder. They are all identical except for a small amount of text part-way through them. This text can be identified by text-strings before it and after it. Is there any easy to use (ie has a GUI) free software that would do this please? Or failing that, something without a GUI. I'm using Windows XP. Thanks 89.242.243.82 (talk) 15:57, 15 March 2010 (UTC)[reply]

About how many text strings are there total ? If there's only a few, it might be easier to edit the files manually and to do a find (Control F) than to write a script to do it. StuRat (talk) 16:28, 15 March 2010 (UTC)[reply]
For over a hundred text files, that is probably not the easiest way. I am sure that some clever shell scripter can do this in about one line of perl. --Mr.98 (talk) 16:42, 15 March 2010 (UTC)[reply]
If the files are exactly identical, you don't even need a string match - you can just count the size of the header and footer, and trim that many bytes off of the start and end of every file. This could be done easily in most scripting languages - without resorting to regular expression processing - do you have a script-language preference? Nimur (talk) 18:08, 15 March 2010 (UTC)[reply]
grep --194.197.235.240 (talk) 18:44, 15 March 2010 (UTC)[reply]
grep isn't a great choice if you're trying to extract a multiple-line block of text. awk or perl would be easier. -- Coneslayer (talk) 18:56, 15 March 2010 (UTC)[reply]
Sorry, bad answer from me. (but let's not forget -A) 194.197.235.240 (talk) 22:00, 15 March 2010 (UTC)[reply]
Assuming that the file names are of the form [First-uninteresting-variable-part][First-identifier][Interesting-part][Second-identifier][second-uninteresting-variable-part], and you want to isolate [Interesting-part] only:
First do
dir /b > wrk_1.txt
Then open wrk_1.txt in notpad, and replace [First-identifier] with a character (such as "|"), that does not occur in the filenames. Likewise with [second-identifier]. Save as wrk_2.txt. Then open wrk_2.txt in excel (menu option "Data|Import text file", or something similar; I'm translating from Norwegian here). Select "Data with separators", and select the "|" character as the separator. When the data has been imported into excel, your interesting data is in column B, and can easily be copied back into, say notepad or whatever. --NorwegianBlue talk 19:07, 15 March 2010 (UTC)[reply]

There is a large amount of text to discard - its about 360kb worth per file, so I fear that method would overload things and not work. I have three different folders of material and the biggest is two or three hundred files.

The format of each file is something like this: (Lots of stuff I want to discard - same or nearly the same in every file), (A few lines I want to keep, length varies from file to file), (Lots of stuff I want to discard - same or nearly the same in every file). 89.242.243.82 (talk) 20:55, 15 March 2010 (UTC)[reply]

there's a big difference between 'same' and 'nearly the same' here. any way you look at it, you need to specify for the computer precisely how to slice the documents, which means you need to find something exactly and completely consistent across all the documents that marks the cut points. If you had to explain to me (in words) where precisely I would cut this document if I were doing it by hand, what would you say?
sorry... if this were a Mac I could tell you how to do this in about twelve seconds - TextWrangler is an ideal tool for tasks like this, but it's Mac-only. call me a maid if you must, but either way I don't do Windows. --Ludwigs2 22:17, 15 March 2010 (UTC)[reply]

The lines of text I'm interested in can always be identified by some text before and (different) text after. So ideally I'd like to be able to tell something to save everything between the text strings "abcde" and "uvxyz" and discard the rest. Another possibility would be to do it in more than one pass: 1) chop off and discard everything in the file up to and including the text string "abcde". 2) chop off and discard everything after and including the text string "uvwxyz". I have been looking for freeware that can do this - have not found anything yet. Thanks 89.242.243.82 (talk) 22:31, 15 March 2010 (UTC)[reply]

My previous suggestion was based on the assumption that is was the file names that were of interest, but if it is the contents; in each directory do:
grep [First-identifier] *.* > wrk_1.txt
and (if necessary)
grep [Second-identifier] wrk_1.txt > wrk_2.txt
Then proceed as I suggested above (you may need to sort wrk_2.txt first, and remove by hand some header lines that grep produces). --NorwegianBlue talk 23:00, 15 March 2010 (UTC)[reply]

Wouldnt this just create one huge file called wrk_1.txt? Then the second command would not work. Looking at the grep article suggests that this will only work for individual lines, but the files are very large documents and have many different lines. 92.24.26.120 (talk) 23:45, 15 March 2010 (UTC)[reply]

I would pass it to a database to store it using a SQL query. It would be much faster. You could put this in your ASPX file:

SqlConnection connection;

SqlCommand command;
connection = new SqlConnection("Data Source=your data source, etc.");
command.CommandText = "INSERT, etc.";
connection.Open();
command.ExecuteNonQuery();

connection.Close();

You first have to parse the files using a simple regex script. Then, you can retrieve any queries you want from the DBMS. Install the DBMS on your local machine. I would recommend indexing the DB (CREATE INDEX, etc.), too, to speed up lookups. Is the data already in 3NF?--Chmod 777 (talk) 00:34, 16 March 2010 (UTC)[reply]
As it says at the start, they are just large text files. 92.24.26.120 (talk) 01:46, 16 March 2010 (UTC)[reply]
Exactly, so you should store the text in a database to speed up queries. I don't understand why you wouldn't do that.--Chmod 777 (talk) 02:45, 16 March 2010 (UTC)[reply]
If you had read the above you would see that its because each of the hundreds of files has around 360kb of more or less identical unwanted text to discard, leaving just a few short lines that I'm interested in. When I've found a way to dispose of the 360kb of garbage in each of the several hundred files, then I may start thinking about putting what's left in a database. You seem to be presupposing that I'm a programmer - I'm not, so what you write is completely meaningless to me. But thanks for your good intentions. 92.29.19.22 (talk) 10:01, 16 March 2010 (UTC)[reply]

I have found some freeware which may be able to do what I want: Text Magician, Piececopy, PowerUtils1.9, and DJuggler. Its a pity that there is no version of grep etc that can work with paragraphs, not just lines. 92.24.26.120 (talk) 01:46, 16 March 2010 (UTC)[reply]

If those don't work, perl will. Pipe each file through perl -ne 'next if (1 .. /REGEX_THAT_MATCHES_PRECEDING_LINE/); last if (/REGEX_THAT_MATCHES_FOLLOWING_LINE/ .. 1); print;'Korath (Talk) 10:32, 16 March 2010 (UTC)[reply]

Thanks, but I'm not a programmer so you'd need to explain that a lot more for me to be able to use it. 78.147.248.108 (talk) 16:25, 16 March 2010 (UTC)[reply]

First, you need a perl installation. I use Cygwin, though that's overkill if you don't need a full unix environment; I've seen Activeperl (download page) recommended to people who just need a perl binary for Windows, though I haven't tried it myself. Pick a regex that matches the line above the text you want saved, and another that matches the line under it, and use those to replace the REGEX_THAT_MATCHES_'s. Then, for each file you want to process, do something like perl -ne 'next if (1 ../FIRST_REGEX/); last if (/SECOND_REGEX/ .. 1); print;' <inputfilename >outputfilename in a command window. —Korath (Talk) 07:22, 17 March 2010 (UTC)[reply]

Hopefully OP has not given up hope! No need to overcomplicate with regex, SQL databases, Cygwin or perl. The following code works with AutoIt, freeware scripting software that I use to automate everyday tasks. All you'd need to run the code would be to install AutoIt and save this code as a text file with the .au3 extension.

#Include <File.au3>
Local $array
$folder = FileSelectFolder("Select folder with your text files", "")
$keepline = InputBox("Starting text", "What is your starting text? (case sensitive)")
$lastline = InputBox("Ending text", "What is your ending text? (case sensitive)")
$file_name = _FileListToArray($folder, "*.txt", 1)

For $x = 1 to $file_name[0]
	$textfile = $folder & "\" & $file_name[$x]
	_FileReadToArray($textfile, $array)

	For $y = 1 to $array[0]
		If StringInStr($array[$y], $keepline, 1) Then
			While Not StringInStr($array[$y], $lastline, 1)
				$y += 1
			WEnd
			Do
				$y += 1
				$array[$y] = Chr(0)
			Until $y = $array[0]
		Else
			$array[$y] = Chr(0)
		EndIf
	Next

	_FileWriteFromArray($textfile, $array, 1)
Next

A simple explanation of what the code does: It will open a prompt for you to select a folder. It will then ask you for the text strings marking the start and end of the block you want to preserve. It will then go through every .txt file in the folder you selected, removing anything before and after the sections you've specified. It's quite fast, but only tested by me, so please back up the text files before trying this out just in case :) I know you don't have programming experience, but it really is as simple as installing Autoit and running this code. You can compile this with Autoit into an .exe if you like. Please let me know if you have any questions. Coreycubed (talk) 16:23, 18 March 2010 (UTC)[reply]


Thank you. I tried the script, but got an error message:

"Line 8 (File "C:\.....yourscript.au3"):

For $x=1 to $file_name[0]

For $x=1 to $file_name^ERROR

Error:Subscript used with non-Array variable."

What can be done to fix this please? 78.147.148.36 (talk) 17:16, 20 March 2010 (UTC)[reply]

I found that that problem was due to using it in a folder without any text files. I did the correct folder and it worked, thanks very much. The only slight quibble I have was that it left the before and after text strings there rather than deleting them. It would be a useful script to compile and release into the freeware domain, as there seems to be nothing else that can do what it does. Thanks again. 78.147.148.36 (talk) 19:12, 20 March 2010 (UTC)[reply]

Computer froze like it never froze before[edit]

I don't know if I did something wrong on the keyboard, but here's what happened.

I was using inbox.com email, which has one specific purpose for me.

I wasn't getting a satisfactory repsonse to a question I asked them about copy and paste when the email is not plain text, so I tried again. While I was doing that, I typed "the" in the place for the URL and ended up with a list of possible sites to go to just below the line for the URL. I couldn't finish typing the address. Also, the cursor just disappeared, except it was a rotating circle in the area where the possible choices of URLs were.

Not knowing what else to do, I turned off the computer. This took a while. My computer (described here if you scroll down below the description of a similar problem) shuts down before actually turning off. When I turned it back on (after the Windows update and the "configuring updates message" that surprised me since I had asked to postpone the automatic shutdown), I was given two choices because Windows had shut down unexpectedly. I chose to open the tabs from before--this included a help screen and a feedback screen where I had informed inbox.com they were not helpful at all, and I was using the box as a notepad to copy from the URL that started with "the" so as to avoid the problems when it's not plain text.

The screen that came up with the original email asked me to sign in. When I did the screen just went blank and I had the rotating cursor again. I don't even think I was able to go to the other two screens. I had to turn the computer off, and when I turned it on again, I chose not to reopen tabs, but started over instead. All was well.Vchimpanzee · talk · contributions · 22:01, 15 March 2010 (UTC)[reply]

Sounds like an eventful half-hour. I think what you're saying is that after a reboot, you restarted your web browser, which offered you the choice of opening the tabs that were open when it was forcibly shut down. You took this choice, but the page you followed did not work. That's most likely because your session with inbox.com had timed out (and/or your IP address had changed), and inbox.com did not deal gracefully with the unexpected event of your browser's new request for service. Meanwhile windows had done all of an update bar the reboot; it took advantage of the reboot which you did by turning the machine off. In short, just a bad hair day. --Tagishsimon (talk) 00:03, 16 March 2010 (UTC)[reply]
I don't think my IP address changed. This doesn't explain why the computer froze and I had to turn it off, either the first time or the second time. My session didn't time out, but if I turn off the computer, it's not one of those sites that will keep me signed in because I've never asked it to.Vchimpanzee · talk · contributions · 13:27, 16 March 2010 (UTC)[reply]

mp3 quality[edit]

Is 98kb/s an acceptable quality level for most music? —Preceding unsigned comment added by 76.123.154.78 (talk) 23:09, 15 March 2010 (UTC)[reply]

"acceptable" really varies depending on who's doing the listening as well as what the music is. Personally I find 128 kbs is just fine for everything, but anything lower (like 112 kbs) sounds a bit flat and even lower still (like 96 kbs or lower) just sounds tinny, but that's just me. ZX81 talk 23:41, 15 March 2010 (UTC)[reply]
It depends on how good your speakers are, whether the audio is mono or stereo, whether the audio has been compressed, and whether that b in the kb/s means bytes or bits. Music off of a CD is 88 kilo-bytes (705 kilo-bits) per second when converted to mono, but twice that straight off the CD in stereo. Converting to mono divides the bit rate by two. With light MP3 compression, you can get CD-quality audio in about a half of that rate (320 kilo-bits per second). FM radio is about 256 kbps as an MP3, and AM radio is about 64 kbps as an MP3.--Chmod 777 (talk) 00:02, 16 March 2010 (UTC)[reply]
I think most people would find 98 kbps a bit low. --Mr.98 (talk) 02:17, 16 March 2010 (UTC)[reply]
I usually rip at 192 kbps. IMHO, it gives a nice compromise between filesize and acceptable quality through the speakers/headphones I use with my PC. 96 kbps is nowhere near as good, but the resulting files are small enough to allow me to fit several albums on my cell phone (useful when commuting and the background noise is high anyway). I don't know where Chmod gets his radio from, but in my experience FM radio sounds like 128 kbps and AM radio like 64 kbps or less. Astronaut (talk) 04:50, 16 March 2010 (UTC)[reply]
Most people with good hearing can hear sounds up to about 20 to 22kHz. The Nyquist sampling theorem says you need twice that for good reproduction - and you have two ears - so you need twice that. That gets you up to 88kHz. You need at least 8 bits per sample - so 700 kbits/sec is really the minimum for high quality audio. Some people will argue that you need 12 bits per sample 'linear' coding rather than 8 bits companded - so arguably, a megabit per second is "perfection". Mpeg compression does a good job of reducing that drastically - but any lossy compression scheme loses some quality. So even at 128 kbits/sec you're losing some quality. But a lot depends on how good your hearing is. If you're young - you'll certainly notice the difference at 98kbits/sec - you're older or if you wrecked your hearing by listening to music too loud or something - then you may well find 98 kbits/sec perfectly OK. SteveBaker (talk) 02:48, 16 March 2010 (UTC)[reply]
Of course, mp3 is a lossy compression method, so direct application of the nyquist limit isn't exactly valid. The frequency spectrum has been sparsified for storage based on the (nonlinear, heuristic) mpeg audio algorithm, which is designed with attention to the subjective, psychological effects of acoustic perception. So, even if there are only 5 kHz of actual, real information in an mp3 data stream (as limited by the bit-rate and the practical realities of information theory), it can be "re-inflated" to a 22kHz audio signal. Thus, it's better to talk about "quality" or accuracy (say, Mean Squared Error of the reconstructed samples), rather than the true frequency bandwidth of the signal. Nimur (talk) 15:42, 16 March 2010 (UTC)[reply]

Sound problem[edit]

In the last few hours my Windows 7 computer has begun having problems with sound playback. The problem is that when I play a music file for example it plays fine until I start to do anything else like browse the net or open a folder or basically anything which uses some cpu then the sound becomes all distorted and skippy while I do stuff, but if I leave the computer complexly alone except for music it works fine. As I said, this problem only started in the last hour or so. Any ideas what's causing it, and how to fix? —Preceding unsigned comment added by 76.123.154.78 (talk) 23:09, 15 March 2010 (UTC)[reply]

If my experience with windows media player on vista on a small dell laptop is anything to go by, it is as simple as WMP is crap and unable to cope without, I don;t know what ... much more memory ot more processor, or, frankly, someone more competent to code it in the first place. Simplest advice: get a new music player such as winamp or VLC media player. Clearly, if you are not using WMP, then all bets are off. Mine stutters as it reaches the end of any track, presumably as it starts to read the next track. So a 5 second burst in the last 20 seconds of any track is unlistenable. Great job, Bill. --Tagishsimon (talk) 00:15, 16 March 2010 (UTC)[reply]
And, if you haven't tried rebooting, try that now. I bet it fixes the problem. StuRat (talk) 00:42, 16 March 2010 (UTC)[reply]
Windows Media Player has always worked fine under Windows Vista on my Dell laptop. It certainly seems like something has swallowed all the available processor/memory resources. If a reboot doesn't fix it, look for malware or virus activity. If the problem is with streaming music straight off the internet, you might like to check your intrnet connection. Astronaut (talk) 04:36, 16 March 2010 (UTC)[reply]
I'm not using Windows Media Player, this problem is affecting VLC, mplayer, and even windows own sounds like the start up "ta-da" sound. I've rebooted many times and it hasn't fixed it —Preceding unsigned comment added by 61.46.19.68 (talk) 11:39, 16 March 2010 (UTC)[reply]
I'm not sure the response immediately above is from the OP. The IP address is very different from the first and they resolve to different continents.
A couple of other things to check: As the problem occurs early on in the boot process (the Windows startup sound is affected), maybe it is a sound driver problem; using the device manager, try rolling back or updating the sound driver. Also worth checking is whether you have blown the speakers; very high volume sounds can physically damage speakers and, depending on the specific wiring, the fault might not be audible through headphones. Astronaut (talk) 14:16, 16 March 2010 (UTC)[reply]
Or you could simply not have enough RAM to do more than just one thing. This happened to me until I added more RAM.  Buffered Input Output 15:39, 17 March 2010 (UTC)[reply]