Wikipedia:Reference desk/Archives/Computing/2012 June 26

From Wikipedia, the free encyclopedia
Computing desk
< June 25 << May | June | Jul >> June 27 >
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.


June 26[edit]

background programs slowing computer down[edit]

A few months ago, I purchased a new HP netbook (running Windows 7 starter). Over the past month and a half, it has been getting slower and slower to load programs and webpages. I suspect that there are some programs running in the background (and, yes, I have done some downloads of programs). I have tried to find an answer in the archives but have not had any luck. So, my question is: how do I determine what, if any, programs are running in the background and how do I get rid of the ones I don't want/need? 99.250.103.117 (talk) 00:04, 26 June 2012 (UTC)[reply]

The Task Manager would be a good place to start. Look for any applications taking up an unreasonable amount of resources, and list them here, and we can help identify them. However, computers can also slow for other reasons, like hard disk fragmentation, a registry full of cruft, etc. Something to keep in mind is that everything you download will slow your computer down a bit, but, of course, some are far worse than others. The worst offenders are applications that feel the need to keep processes running all the time, whether you are using them or not (AOL and RealPlayer are two examples). StuRat (talk) 00:25, 26 June 2012 (UTC)[reply]


Thanks StuRat. I have checked the defrag and it is not necessary. I checked the task manager and took a screen shot. I have no idea how to paste it to this message. There are quite a few things there and I am a very poor typer. Is it possible 9or wise?) to attach the screen shot here as a jepg? 99.250.103.117 (talk) 00:59, 26 June 2012 (UTC)[reply]

Follow the link near the top of this page, on the left side, that says "Upload file", give it the unique name REF_DESK_TASK_MANAGER_SCREEN_SHOT.jpg (upload to Wikipedia, not Wikicommons). It should then appear right here:
File:REF DESK TASK MANAGER SCREEN SHOT.jpg
Screen shot.





StuRat (talk) 03:52, 26 June 2012 (UTC)[reply]

wget not downloading index.html files when link points to directory[edit]

I'm new to wget, and I'm trying to download a specific directory from a website and everything it links to that is below it in the hierarchy. The closest I've found to the right options is "wget -r -np -p -k". But when a link on one of the pages points to a directory name instead of the corresponding index.html file, wget doesn't download that index.html file. (Using "wget -r -np -p -k --default-page=index.html" doesn't make a difference, which isn't surprising because the man page implies it should be assuming index.html anyway). I tried "wget -r -L -p -k", which does download the index.html files, but instead of naming them index.html, it gives them filenames equivalent to the name of the directory they're in. Then it doesn't download the resource files for that page, presumably because there's no directory to put them in (i.e., instead of /example/, I have /example, which is a text file containing the contents of what was originally /example/index.html). Also, of course, the -L option isn't really what I want because sometimes the web developer uses absolute references even when linking within the hierarchy. Any tips? (I'm interested more in understanding what's going on than in actually solving the problem. Also, apologies if this has been asked already; there have been quite a few wget questions asked here and I may have missed something relevant.) Thanks! --Allen (talk) 00:36, 26 June 2012 (UTC)[reply]

Be aware that when interpreting links, there's a difference between /abc (which suggests a file) and /abc/ (which suggests a directory).
Consider this senario: Imagine there is a directory called abc and no file called abc. If you send a request to the server for /abc, many servers will redirect you to /abc/. However, some servers may return the same response as it would for /abc/ with no redirection.*
If your links contain cases like /abc, and the server doesn't redirect to /abc/, then wget has no clue it's a directory, and will save the file as /abc instead of /abc/index.html.
You can use wget --spider as a quick way to confirm if there's redirection. For example, try:
wget --spider http://www.google.com/services 301 Moved Permanently then 200 OK
wget --spider http://www.google.com/services/ 200 OK
wget --spider http://superuser.com/questions 200 OK
wget --spider http://superuser.com/questions/ 200 OK
--Bavi H (talk) 01:30, 26 June 2012 (UTC)[reply]
*Clarification: After thinking about it, I think the only time a server would respond to /abc and /abc/ the same way is if the pages are dynamically created from a database (like Superuser's questions page above). If the server's documents are stored in a normal file system, the redirection from /abc to /abc/ is important for relative links to work properly. --Bavi H (talk) 02:02, 26 June 2012 (UTC)[reply]
Thank you! The page I'm dealing with is indeed linked as /example, so I suppose wget can't tell that it's a directory, as you said. But when I use the --spider option, I get the 301 Moved Permanently thing as with your google example, along with the 200 OK code after it redirects. But the thing that still confuses me is, if wget --spider can figure out that /example is a redirect to /example/, then why doesn't it just do the same thing when it's actually downloading, and therefore recognize it as a directory containing an index.html file? --Allen (talk) 01:14, 28 June 2012 (UTC)[reply]
Just to clarify: If there's redirection, wget looks at the final address of the redirection to decide how to save the file. The 301 Moved Permanently just indicates there's a redirect, you have to look at the Location right after that to see where the redirection is to. If abc is redirected to abc/, wget will save abc/index.html. But if abc is redirected to xyz, wget will save xyz. (And if there's no redirection, wget will save abc.)
  • Does wget --spider http://example.com/example show redirection to Location: http://example.com/example/?
  • Try wget http://example.com/example to download the example page only. See if there's a redirection and what file name is saved.
  • If you still have the files from your original download attempt, have you examined the /example file? It might contain an error message from the server. If wget is downloading as quickly as possible, the server may not like that and might return a dummy result (and no redirection). You can use the --limit-rate and/or --wait options to slow wget down.
  • Alternatively, the server may be identifying wget by its user-agent string and returning different results to prevent downloading. (The --spider option sends a HEAD request which just asks the server for header information and not the actual file, so perhaps the server neglects to check the user-agent in that case.) You can try downloading one file using something like wget --user-agent=anonymous http://example.com/example to test if the server responds differently based on the user-agent. But please consider if the website has reasons for preventing wget downloads before changing or removing the user-agent in a recursive download.
--Bavi H (talk) 03:44, 29 June 2012 (UTC)[reply]

Changeing words on websites[edit]

Is there any downloadable program avaliable that is capable of changing any instance of one word into another word whenever i surf the web, for example if i am browsing through random wikipedia pages the program automatically replaces any instance of the word "robin" and replaces it with the word "bird"? 72.235.221.120 (talk) 01:23, 26 June 2012 (UTC)[reply]

That's something that can be done with a Greasemonkey script (such as this one) but one needs a bit of JavaScript knowledge to get it doing what you want. -- Finlay McWalterTalk 01:27, 26 June 2012 (UTC)[reply]
Aw I suck at scripting :( Are there any more simpler or other options avaliable? 72.235.221.120 (talk) 07:00, 26 June 2012 (UTC)[reply]
Why would you want that? Apart from pranks, of course. Joepnl (talk) 21:28, 1 July 2012 (UTC)[reply]

Do you need patent licenses to implement GSM and W-CDMA and UMTS?[edit]

Do you REALLY need patent licenses to implement GSM and W-CDMA and UMTS, as well as other telecommunication standards? 117.5.15.50 (talk) 03:28, 26 June 2012 (UTC)[reply]

You're probably going to dislike this answer but even just reading this one section of the GSM article hints that it is not a very black and white issue. You obviously don't REALLY need a patent licenses to implement it, but whether you REALLY need a patent license to do implement it LEGALLY, or at least without getting sued, is a request for legal advice which is against ref desk guidlines. Vespine (talk) 04:26, 26 June 2012 (UTC)[reply]

My question is, are GSM, W-CDMA and UMTS free of patent protections? 117.5.15.50 (talk) 04:41, 26 June 2012 (UTC)[reply]

That question, simple as it may sound, does not have a "yes/no" style answer: it is a request for a legal opinion, which the Wikipedia Reference Desk will not provide. If you do not understand why your question is a request for a legal opinion, consider starting off by reading our articles on patent law. Nimur (talk) 15:20, 26 June 2012 (UTC)[reply]
There is nothing in any patent laws that specifically exempts the technologies you describe from protection. In general when you implement any technology from the last 20 years you will need to consider patents. This is also the case when you implement technology older than 20 years, if said technology has been refined in the last 20 years. Taemyr (talk) 19:01, 26 June 2012 (UTC)[reply]

What components can I swap out to customize a laptop?[edit]

http://pastebin.com/J7gm1zys

See, this is the gaming laptop I'd like to get. However, as you can see towards the bottom, it is rather overpriced.

http://originpc.com/shop/pc/configurePrd.asp?idproduct=647 <-- That is where I made my customizations. Go ahead, give it a try if you wish.

To start off, I know I can swap out hard drives. I'd rather choose the cheapest option and later trade off those drives for the cheapest 512GB SSDs I can find.

I don't wish to spend more than $3,000 on my new device (anywhere between 14" and 15.9.")

So besides the hard drives, what else is swappable? I know laptop components aren't as easily swappable as desktops, but I know some components are.

I want to have the most powerful mobile gaming machine out there (that'll still do academic and other essential work) but I want the best deals on them too. --70.179.170.114 (talk) 04:31, 26 June 2012 (UTC)[reply]

I'd go to a "build your own computer" website, where you can specify each component individually, and they then build it and ship it to you. Much cheaper than buying a computer and extra components and swapping them yourself, both because you end up paying for low-end components you don't use, and because you don't get their bulk discount when buying the high-end components. This also avoids the risk of getting an incompatible component or installing it improperly. StuRat (talk) 04:36, 26 June 2012 (UTC)[reply]
I'm sorry Stu, but OriginPC is already a build-your-own-PC site. What other gaming system site allows me to choose components with the same power, but for a better deal than OriginPC? Thanks. --70.179.170.114 (talk) 05:23, 26 June 2012 (UTC)[reply]
There seem to be lots of unnecessary, expensive items, to me:
  • Hard Drive One: 512GB Crucial M4 - Solid State Drive
$672.00
How about a regular hard drive, instead ? StuRat (talk) 05:45, 26 June 2012 (UTC)[reply]
Hi, this is the OP. I can't have a regular spinner drive anymore. I don't like its crash/fail rates, and SSDs have had rave-reviews about its durability. If I drop my laptop on a camping or whatever trip, I can trust that my data will remain intact in an SSD more so than in a one with moving parts. --70.179.170.114 (talk) 08:49, 27 June 2012 (UTC)[reply]
FWIW I bought a Crucial M4 drive 8 months ago and have had to replace it under warranty twice already. Both drives failed by developing bad sectors for no apparent reason. All three drives also have the habit of freezing for something like 60 seconds when under load, during which time any software that tries to do disk I/O freezes (temporarily) also. In contrast I haven't had a Winchester hard drive fail on me in the last 15 years. You may want to wait for the technology to mature a bit. Or maybe I'm just unlucky. -- BenRG (talk) 16:07, 27 June 2012 (UTC)[reply]
Any one storage device is unreliable. Instead, do backups onto another device. Specifically, I suggest a regular hard drive with backups of your critical data onto USB flash drives, which you store in another location. Another option is online backups. StuRat (talk) 16:26, 27 June 2012 (UTC)[reply]
As the others have said, relying on any single drive to keep your data safe is foolhardy. (I mean even ignoring the evidence I've seen is unclear on whether real world SSD failures rates are really much lower, you've acknowledged below the possibility of theft or loss of the laptop.) Instead you need to do regular backups. The primary reason you should care about durability is if you can't afford the downtime not because you think it does away with the need for backups. Nil Einne (talk) 19:35, 27 June 2012 (UTC)[reply]
  • External Optical Drive: SAMSUNG USB 2.0 External Slim Portable Blu-ray Writer 6X BD-R/8X DVD+/-R/24X CD-RW No Blu-ray Playback Software Included
$121.00
Why do you need two optical drives ? Do you intend to use this laptop to copy DVDs ? And an external drive obviously makes it less portable. StuRat (talk) 05:45, 26 June 2012 (UTC)[reply]
I guess I left that on by mistake. I don't think I would really plan to get an external. --70.179.170.114 (talk) 08:49, 27 June 2012 (UTC)[reply]
  • Audio: Creative Sound Blaster Recon3D
$142.00
That's a lot for a sound card. Won't a cheaper one suffice ? StuRat (talk) 05:45, 26 June 2012 (UTC)[reply]
I wish to know where to find the best deal for the quality just as good as the above card, if not better. (Which still fits in a laptop, of course.) --70.179.170.114 (talk) 08:49, 27 June 2012 (UTC)[reply]
I'm a little unclear on what extra quality you would actually get from this sound card. According to the web site it's "powered by the revolutionary Sound Core3D™ quad-core sound and voice processor". This is completely useless—in the old days when CPUs were slow there was some benefit to a dedicated sound processor, but these days everything is done on the CPU and I doubt you'll be able to find any third-party software that even uses this allegedly revolutionary processor. -- BenRG (talk) 16:07, 27 June 2012 (UTC)[reply]
  • TV Tuner: Hauppauge WinTV-HVR-950Q USB HDTV Tuner with Remote
$90.00
You didn't say you wanted to watch TV on it. And, how do you plan to get the signal ? An antenna or cable wouldn't make it very portable. StuRat (talk) 05:45, 26 June 2012 (UTC)[reply]
Aren't there wireless accessories for TV signals? (How big are the smallest ones?) If there aren't, I don't have a problem watching it through the device at home. --70.179.170.114 (talk) 08:49, 27 June 2012 (UTC)[reply]
You will either need an antenna or a cable connection. And any antenna that could be called portable will get crappy reception. By "through the device at home", do you mean your home TV ? If so, that sounds sensible. StuRat (talk) 16:15, 27 June 2012 (UTC)[reply]
  • Warranty: 3 Year Part Replacement and Free Shipping Warranty with DVD image and Lifetime Labor/24-7 Support
$269.00
Do you need this at all ? StuRat (talk) 05:45, 26 June 2012 (UTC)[reply]
I needed a warranty that extended to 5 years, with my Dell laptop. I shouldn't take any chances, since I've been through a lot of ups-and-downs on this current device. --70.179.170.114 (talk) 08:49, 27 June 2012 (UTC)[reply]
Extended warranties are bad deals, statistically speaking. You may want to consider self-insuring. -- BenRG (talk) 16:07, 27 June 2012 (UTC)[reply]
Agreed. I bet, if you add up all you've spent on extended warranties and all you've gotten back from them, you've lost money on the deal. You may also find that they wriggle out of warranty payments (saying you abused your laptop, serviced it yourself, etc.) or charge you excessively for shipping, or take so long to fix it under warranty that you end up paying somebody else to fix it quickly. StuRat (talk) 16:30, 27 June 2012 (UTC)[reply]
  • Bags and Carrying Cases: ORIGIN Backpack Black/Red
$49.00
Buy a backpack off the shelf for half that. StuRat (talk) 05:45, 26 June 2012 (UTC)[reply]
Can said suggested backpack help protect laptops from physical shock, falling, and other hazards from being in the backpack? It still needs to fit up to 15.9". --70.179.170.114 (talk) 08:49, 27 June 2012 (UTC)[reply]
If you want extra shock protection, wrap the laptop in bubble wrap before placing it in the backpack. StuRat (talk) 16:35, 27 June 2012 (UTC)[reply]
It probably will, yes. In general you seem kind of attracted to luxury items. This stuff is sold because it's profitable, not because anyone wants to offer high quality items to the discriminating purchaser. They will find some way to make it sound like a better product, but you shouldn't believe them without independent evidence. That said, I don't think $50 is excessive for a backpack. -- BenRG (talk) 16:07, 27 June 2012 (UTC)[reply]
  • LoJack: Absolute Software LoJack for Laptops Premium Edition - 3 Year
$100.00
Unless you think theft is likely, skip this. StuRat (talk) 05:45, 26 June 2012 (UTC)[reply]
I often take mine to a college campus. How do you think it is there? --70.179.170.114 (talk) 08:49, 27 June 2012 (UTC)[reply]
This kind of depends on how likely it is that this software will actually help in recovering your laptop if it is stolen. -- BenRG (talk) 16:07, 27 June 2012 (UTC)[reply]
And how good are you at holding on to it ? If you leave it unattended, then yes, I'd expect it to be stolen in short order. If I were carrying a laptop it would never leave my hands. StuRat (talk) 16:19, 27 June 2012 (UTC)[reply]
StuRat has a lot of good suggestions for things to trim. Since you mentioned using this to do academic work, I assume you're planning on using it at college. In my experience, going for the most powerful laptop you can get isn't always the best solution. Remember you'll be lugging this to class and running it without being plugged in. That system sounds heavy and like it will eat through your battery. If I were doing it again, I would buy a nice gaming desktop that will outperform that laptop and be much, much cheaper, then get a smaller laptop with a longer battery life. You'll spend less in the end, have a better gaming computer, and a better laptop for school use. You can get a laptop that can still run most games reasonably well in the $700ish range if you still want to game on it occasionally. 209.131.76.183 (talk) 13:45, 26 June 2012 (UTC)[reply]
Yes spending so much for a gaming laptop when you want to use it for academic work with potentially long times on battery and carried around a lot seems a bad idea, particularly if (from previous comments) you're a struggling student with poor job prospects. If a lower end laptop really isn't enough (consider reducing settings and even running below native res) you can buy a decent desktop for much less. If you're a post-graduate student doing research and so don't have to take it around much qnd expect to generally have it plugged in (i.e. more of a portable computer then a laptop) I guess it may be different, but it still seems a bit excessive to me. Besides do you really want gaming to be a potential distraction when you're supposed to be working? Nil Einne (talk) 20:03, 27 June 2012 (UTC)[reply]

Automated Exploration[edit]

Suppose I'm a robot stuck inside an unknown maze, and can see only a radius r around me. My goal is to fully explore the maze while minimizing the total distance (or time) traveled. Are there any standard algorithms for doing this? I know that adapting graph searches like depth-first search will work, but that seems terribly time-inefficient. --140.180.5.169 (talk) 05:38, 26 June 2012 (UTC)[reply]

One standard way to get out of a maze is to always turn right (or left), til you get out. If neither works, then you'd need to go to a more complex strategy. Generate a map as you try both turning right and left, and you can tell each didn't work if you return to the same point, headed in the same direction. That map can then be used as the start of the more complex strategy (going down unexplored halls outside the area already mapped, and mapping those, too). StuRat (talk) 05:48, 26 June 2012 (UTC)[reply]
The simplest maze where the always turn right (or left) strategy fails is this (with R being the robot's initial position):
+ - -   +
|       |
| | R | |
|       |
+ - - - +
StuRat (talk) 06:12, 26 June 2012 (UTC)[reply]
I think I didn't express myself clearly. When I said "maze", I really meant the inside of a large building with complicated interconnected rooms (not necessarily rectangular), hallways, and obstacles. The robot can only see a finite radius around itself, and the radius may not be large enough to see all the space between opposite walls. --140.180.5.169 (talk) 08:18, 26 June 2012 (UTC)[reply]
Rather than always turn left, the normal maze defeating strategy is to imagine you place one hand on the first wall you encounter, and always move so that the hand on the wall stays in contact with the wall. Eventually, in normal interconnected mazes, you will have travelled the entire maze, including the exit. --Phil Holmes (talk) 08:34, 26 June 2012 (UTC)[reply]
This fails in the same cases as the always turn left strategy. Including the case that StuRat showed. Taemyr (talk) 13:50, 26 June 2012 (UTC)[reply]
That's because it's the same strategy, stated differently. I didn't describe it that way, because this robot may not have "hands". StuRat (talk) 17:49, 26 June 2012 (UTC)[reply]
I don't know of a specific solution to this problem that is considered optimal for traversal time. I would guess that just performing a depth-first exploration would be reasonable. Your exploration will end up building a spanning tree of the area (loops are okay - once you run into somewhere you've already seen, treat it like a dead end). The optimal route has to cover everything once. This algorithm covers everything at most twice, so you end up within a constant factor of the absolute lower bound. I can certainly think of a few simple setups where any strategy (except maybe some probabilistic method that works better on average) would require 2 passes over an arbitrarily large portion of the maze. 209.131.76.183 (talk) 11:48, 26 June 2012 (UTC)[reply]
See Maze solving algorithm for an overview of many algorithms and their ups and downs. --Mr.98 (talk) 12:27, 26 June 2012 (UTC)[reply]
I endorse Mr.98's answer for its link to an actual article discussing this problem. Comet Tuttle (talk) 16:28, 28 June 2012 (UTC)[reply]
It's a novel idea, I'll admit. I mean, just because we've got an article on exactly this topic, why not just try to reason it through from first principles? How hard could it be? Why stand on the shoulders of giants when we can just spitball a bit? --Mr.98 (talk) 04:18, 29 June 2012 (UTC)[reply]
The article doesn't actually cover the question - the OP wants to fully explore, not just solve, a maze. They also showed that they are familiar with graph searches and mentioned the depth first search, which for at least some mazes is an optimal solution. The article (and no others I can find here) don't have details on if there are solutions that work better on the average case, even though we know the bound on the worst case. 209.131.76.183 (talk) 12:18, 29 June 2012 (UTC)[reply]
Clarification requested - do you want to solve the maze (find a specific goal point from a given starting point), or do you want to fully explore an unknown maze (cover the maze completely, including all the dead-ends, loops and switchbacks). If it's the latter, I doubt that on an arbitrary maze you can do much better than a standard depth-first search. As you need to explore all paths anyway, there really isn't any savings on the forward exploration. The real savings is in limiting the backtracking. But since you don't know much or anything about the unexplored portions of the maze, there really isn't much you can do to choose your forward path to limit the amount of backtracking. (I take that back, a bit - there might be times when you can choose between two paths, one of which is probably a self-enclosed dead end. In those cases, you'd want to choose that one, as you'd eventually end up back at the current junction anyway.) In practice, most of the savings is likely to come from being smart about how you backtrack, which in practice will only make a difference if there's loops or circuits, with standard backtracking being the most efficient way for a tree structure. -- 71.35.99.136 (talk) 16:06, 26 June 2012 (UTC)[reply]

Reading tzinfo binary files in Java or .NET[edit]

Is there an API for use in Java and/or .NET that can interpret tz database binary files? - Letsbefiends (talk) 11:13, 26 June 2012 (UTC)[reply]

In Java, the preferred way to modify time zone data is not at runtime, but to modify the JVM: by updating to a new VM, or by using the TZupdater tool manually. Anyone may implement a library that reads a tz data file, but this is not the normal mechanism, because it won't be able to support the Java system library time and date functions. Following the information I linked above, the Java timezone behavior will be consistent, system-wide. Nimur (talk) 14:17, 26 June 2012 (UTC)[reply]
Great info! Anyone know about .NET? - Letsbefiends (talk) 03:21, 27 June 2012 (UTC)[reply]

Saved Application Does Not Work[edit]

I want to save this page as an HTML file, and edit the source code so that I can use it to type Deseret letters. However, when I save the page and open the HTML file, the keyboard does not work at all. Why is this? Interchangeable 18:13, 26 June 2012 (UTC)[reply]

Probably because you did not correctly save the linked javascript - the part of that web-page that makes the character-entry "work." (Strictly, it does so by replacing your characters). If you correctly save the linked javascript file, and ensure that your page links to the correct location of your local-copy of the script, the page will behave as expected. However, this is not a great way to enter international characters. There are lots of better ways to type Cyrillic (or Deseret alphabet) characters, rather than using a JavaScript-driven web-page. On Windows, change your keyboard layout. On a Mac, change your keyboard layout. On a Linux system using the GNOME front-end, change your keyboard preferences. Nimur (talk) 21:54, 26 June 2012 (UTC)[reply]
Thanks for the help! But I don't want to change my keyboard layout; it would be a pain to switch back and forth between Deseret and ordinary layouts. That's why I'm trying to save the page, and why typeit.org was founded. Interchangeable 17:16, 27 June 2012 (UTC)[reply]
Looking at the source, you appear to need to link to this obfuscated/compressed code, and then the individual page itself has the code specific to the language. The linked code itself contains at least one routine (if(window.location.hostname.indexOf(".typeit.org")>=0){h="; domain=typeit.org"}else{if(window.location.hostname.indexOf(".typeit.local")>=0){h="; domain=typeit.local"}) to try and figure out whether you are running it off of the typit.org domain; I suspect it is canceling execution based on it. Downloading that code to your local computer and monkeying with that line might help (e.g. changing if(window.location.hostname.indexOf(".typeit.local")>=0) to if(1=1) might cause it to always detect it as happily local). I have not tested any of this. --Mr.98 (talk) 11:50, 28 June 2012 (UTC)[reply]