Wikipedia:Reference desk/Archives/Computing/2010 September 8

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Computing desk
< September 7 << Aug | September | Oct >> September 9 >
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.

September 8[edit]

What is a GeekTool script?[edit]

Does this compound word mean anything other than "desktop theme" for a Mac computer? (talk) 00:23, 8 September 2010 (UTC)

No, it's not a desktop theme. GeekTool[1] is a single program that can display the output of various Unix commands or shell scripts on the desktop. GeekTool scripts are often used as part of a theme, however. If you click the "Screenshots" link on that GeekTool page I linked, you can see some examples. Just about all of the text you see in those images was generated with GeekTool. (talk) 11:18, 8 September 2010 (UTC)

Trillian AIM connection issues[edit]

Ever since the mandatory upgrade for Trillians AIM users a few days ago my AIM account has been connecting and disconnecting every 20-30 minutes for 5 minutes at a time. Ive updraged to the 2 newest versions of trillian and the problem persisted. I know it cant be an ISP Connection issue because I can continue to load pages and download files while the AIM account is disconnected. Does anyone know what could be causing this?

Thanks for the help.

-- (talk) 03:38, 8 September 2010 (UTC)


Is there a software to display the words beginning or ending with the same spelling? E.g. 1). If I enter *cide (Wild card character), it should display all words ending with cide such as suicide, patricide, infanticide and so on. 2). If I enter *tw* , it should display all words contain tw such as twin, between, twice, twig, twine, two and so on. Thank you. —Preceding unsigned comment added by (talk) 07:00, 8 September 2010 (UTC)

Where do you want that software to find those words? In your browswer window What browser?or in a specific application What application?or ...? Or were you looking for a site like this one (talk) 07:10, 8 September 2010 (UTC)

grep, although you will have to write regexps. So your "*tw*" would be just "tw", and your "*cide" would be "cide\W". Also grep reports the line(s) in which the match was found. If you work in word or similar, then you will have to save as pure text. Taemyr (talk) 07:14, 8 September 2010 (UTC)

Special programs exist for this. Try searching sourceforge Quadrupedaldiprotodont (talk) 14:29, 8 September 2010 (UTC)

If a web site will do, various Scrabble word searches are out there. I landed on [2], and while the interface is awkward, simply entering "cide" in "word pattern" and match "end of word", or "tw" in "word pattern" and match "start of word", gets you what you want. There are more advanced options. Riggr Mortis (talk) 23:48, 10 September 2010 (UTC)

Easy computer game development software[edit]

I'm looking for information or links on computer game development software that is easy to use/learn and preferably very affordable. Think chicken sandwich budget, rather than company account.I have used the "Construction Set" that Bethesda Softworksprovided with the "Elder Scrolls" package. I've had a look at an old version of Gamestudio. But I have no clue whether that would be a good thing to start with. I'm basically looking for something that doesn't require ages to learn or advanced languages like C++ but offers a way to design figures running around, doing tasks and having some kind of conversation/speech bubble abilites. It should work on standard platforms and not use oodles of resources. Both me and my teenage nephew would be using it. Ultimately I'm trying to develop a language teaching game, but this could just serve as a first stage in that project. (My last programming experience is Assembler, so I basically don't know diddly about what the new stuff does and can do.) Hope this question doesn't break any rules and someone can point me in the right direction of where to look and what to look for. (talk) 07:04, 8 September 2010 (UTC)

Depending on the genre, there is the Adventure Game Studio, which requires a little bit of scripting, but not very much. There are other such things in Category:Video_game_creation_software, but I don't know any of them very well other than AGS. --Mr.98 (talk) 12:41, 8 September 2010 (UTC)
THANK YOU!!! And it's even freeware. I can give it a try and see where it takes me. From the first look it seems to fit the bill perfectly. If it doesn't I now know where else to look. Consider yourself awarded a virtual chicken salad sandwich :-)) Thks. again. (talk) 01:22, 9 September 2010 (UTC)
PyGame is another "easy-to-learn" option. Personally, I recommend an "advanced language" like Java or C++. libSDL or Java OpenGL both make 3D programming much simpler than it was in earlier eras, but this will still be much more complicated than PyGame. Nimur (talk) 01:26, 9 September 2010 (UTC)
As long as you're not interested in advanced 3D, it might be worth your time to check out Game Maker; despite its generic name and unpleasant logo, it's surprisingly powerful (provided you use its programming language and not its much-maligned drag-and-drop modules). As an example, Spelunky (a fairly popular procedurally-generated platform game) was made using Game Maker (and its source code is available for download, which might be helpful while getting used to GM). Hiram J. Hackenbacker (talk) 13:43, 11 September 2010 (UTC)

Test case[edit]

I got a job recently and am now still an apprentice. My company's recent project is a C++ one. Switching from Java to C++ is not a too difficult task because they resemble in many ways, and sometimes I even think Java is a subset of C++. But after 2 weeks, when I'm quite familiar with C++ syntax, my chief manager has a new, special (if it is another word for "terrible") task for me -- writing a test case. He always makes me full of surprises. 2 weeks ago he told me that the project is written in C++ and I have to study C++ from the beginning. And now my burden grows heavier with a "special" task, just 'cause none can do it (my company has no tester). I ask him how, he said "study it yourself".

I don't even know what in the world is a test case. I was trained to be a developer, not a tester. I wonder if there's any IT school that teaches students how to test software -- at least not mine. But up to now, I haven't contributed anything to my company's project. Beeing a newbie, I suppose I don't have much of a choice. I need a step-to-step guide 'bout the so-called test case. A six hundred page tutorial just like the C++ tutorial would be very nice, even if it will take me onother 2 week studying. Thanks in advanced. -- Livy the pixie (talk) 09:56, 8 September 2010 (UTC)

Start at Test case and follow the external link. (I hope more help arrives soon. In my experience, programs and more especially modules should always be specified with relation to test cases, and ideally should always have a complementary test harness written for them. And that is all language independent advice: it does not matter if you're in C++ or Java or any other languages.) --Tagishsimon (talk) 11:23, 8 September 2010 (UTC)

How do you find out what search terms were used to find your blog?[edit]

I've seen people posting about weird search terms used to find their blog; but how do you find out what those search terms are? (talk) 10:07, 8 September 2010 (UTC)

I use and the dashboard shows you search terms used. I expect other blogging platforms do the same thing Some of the search terms are very weird! -- Q Chris (talk) 10:16, 8 September 2010 (UTC)
By looking at the HTTP referrer. When somebody requests (visits) a page, part of the information sent is the URL of the previous page (if any) containing the link they clicked on to get there. If the link was in a search engine, the URL usually contains the search terms. (talk) 10:21, 8 September 2010 (UTC)
You need to install something like Google Analytics if you don't already have it in place. An easy way to do this is to install Google Analytics, but read the fine print first. Once you have it running (and have accumulated some data), log in to Analytics, go to Traffic Sources > Keywords. There are other web stat aggregators out there (or you can try to get access to your webmasters raw access logs, or maybe they offer up their own stat analyzers), but in my experience, Google Analytics does a better job of letting you sift through the data than any other I've seen, and it's downright easy to use, at that. --Mr.98 (talk) 11:47, 8 September 2010 (UTC)
Actually you don't. My web host has a built-in stats accumulator and I can look at the referring pages without having had to install anything. (My web hosting service installed something, I suppose — my point is that I doubt that most webmasters who use a hosting provider have to affirmatively install anything to get this info.) Comet Tuttle (talk) 16:57, 8 September 2010 (UTC)
I don't think we should say anyone "needs to install Google Analytics." I don't mean to belabor this point, Mr. 98, but your explanation is inaccurate and promulgates a common piece of misinformation: web hosts, including bloggers, do not need Google, or any other third-party, to analyze their data for them. Though Google's services are convenient for many, and the appeal of "zero-cost" is easy to understand, we are a computer reference desk on "Wikipedia, The Free Encyclopedia" - so I feel like we ought to be the forefront of the campaign to dispel common misconceptions about needing commercial software. It is totally optional to permit Google Analytics access to your data: and by doing so, you are signing away rights to otherwise private, potentially sensitive information. As such, I think we should show a little caution before we refer questioners to third-party service providers! All the OP needs to do is open his server log and read the HTTP referrer information. And, as our List of web analytics software conveniently demonstrates, there is no shortage of free software that can perform this analysis for you - you can easily create nice graphs, charts, and plots - all without handing over your private data to a corporation. I can think of lots of reasons why a blog host and his/her subscribers might object to a 3rd-party organization having access to a record of every single person who read the blog. Nimur (talk) 21:03, 8 September 2010 (UTC)
I said "something like" it if you don't already have [something like] it in place. And gosh, fellows, I was trying to make life easy for these people. I don't care whether they use Analytics or some free stat aggregator, or get one through their host. Analytics is a pretty user-friendly approach to it, though, and costs them nothing. There are less user-friendly approaches if one is fearful about Google looking at your blog content or somehow taking over your life by seeing your search terms. :-P (I went over their TOS, I didn't see any actual signing away of rights. I saw them saying, "we can keep your data that we generate with this, but we won't show it to anyone else", and that was about it.) Google Analytics is the only web stat aggregator I know that can be easily used by people who don't know how to make a web stat aggregator themselves, which is why I usually recommend it to people who bother to ask. --Mr.98 (talk) 01:17, 10 September 2010 (UTC)

php can do this Quadrupedaldiprotodont (talk) 14:09, 9 September 2010 (UTC)

diffing with text motion[edit]

There's lots of code around to diff two files, by finding the shortest (or near shortest) sequence of insertions and deletions that turns the first file into the second. Trouble is this doesn't notice moves, i.e. I edit a wikipedia article by swapping the locations of two paragraphs. I haven't inserted or deleted anything, just moved stuff, but diff shows it as an insertion and a removal.

Are there good algorithms (and preferably existing libraries) that notice moves as moves? Thanks. (talk) 11:08, 8 September 2010 (UTC)

You are referring to blocks of text, but the algorithm is the same for character-by-character editing. Levenshtein distance is what you are describing. It considers insertions, deletions, and substitutions (an insert on top of a delete). Damerau–Levenshtein distance expands on this by adding the transposition of two neighboring characters. The problem with Damerau-Levenshtein distance is that it is a "restricted" edit distance. You are asking for an "unrestricted" edit distance. Right now, there is no standard algorithm for unrestricted Damerau-Levenshtein distance, even though it has been studied by a lot of researchers for well over 40 years. My best suggestion (other than telling you be the first to make a good algorithm) is to search for "unrestricted damerau levenshtein" and see if any of the algorithms in the papers you find will satisfy your needs. -- kainaw 12:25, 8 September 2010 (UTC)
Thanks. I'll look for papers but expect them to be complicated. For my purposes I can probably concoct something ad-hoc and approximate that's good enough. (talk) 12:58, 8 September 2010 (UTC)
wikEdDiff detects block movement just fine.—Emil J. 13:18, 8 September 2010 (UTC)
Looks interesting. It cites a paper from 1978, even. Thanks. (talk) 14:34, 8 September 2010 (UTC)
That paper by Heckel contains a diff algorithm that has been improved over time. I considered mentioning diff in my first response, but it only shows insertions and deletions. It kind of shows substitutions as a deletion and insertion in the same place. To show transposition, you will need to identify a deletion and insertion that have identical text. That is rather easy - run diff on the insertions and deletions to see if there are changes. The problem is that it is a rather slow process. Assume you have two texts and there are 5 insertions and 5 deletions. You will have to compare all 5 insertions to all 5 deletions in a worst-case scenario, which is 25 extra calls to diff just to check for transposition. Because it is in the realm of a O(n2) algorithm, it isn't what I consider a "popular solution". -- kainaw 16:01, 8 September 2010 (UTC)
I have no idea how either Heckel's algorithm or the wikEd implementation works, but comparing n insertions with n deletions can be easily done with O(n log n) comparisons: just sort them.—Emil J. 16:17, 8 September 2010 (UTC)

TLDs favouritised by google[edit]

Layman question alert: Is it just me or are the more popular TLDs such as .com .net etc favouritised by search machines such as google and the like. I askbecause more often than not .com pages are shown first in the results. Would this be the case even if say a .biz or .tt site´s content matched my search criteria more exactly. If so is there a list of precedent for TLDs? I hope you get what I´m trying to put across... Thanks —Preceding unsigned comment added by (talk) 11:55, 8 September 2010 (UTC)

In some cases there are places where the weirder subdomains come out on top — see, e.g., URL shortener. --Mr.98 (talk) 12:28, 8 September 2010 (UTC)
There just aren't as many sites with the unpopular TLDs. When they do exist, they're likely to be newer and less established, have a smaller budget, and not be as well-optimized for search engines. .com is the default in most everyone's mind, so it's advantageous for a business to use that TLD if possible. I doubt that the major search engines care about TLDs at all, as Mr.98's search suggests. Paul (Stansifer) 13:40, 8 September 2010 (UTC)
I suspect some TLDs are rated more highly in Google's algorithm than others — like .edu and .gov, which are actually regulated — but who knows what the "secret sauce" is. Ranking unregulated domains is just silly. There's no reason to think a .com or a .org site is more meaningful than a .cc or something like that, if none are regulated. --Mr.98 (talk) 13:51, 8 September 2010 (UTC)
This could be incorrect, and it is certainly a generalisation, but: I would argue that one reason behind the usually higher ranking of .edu or .com addresses is that larger companies or organisations favour these sorts of addresses because they feel that they look more professional. I would argue that these bigger companies are also likely to invest more in SEO techniques, and will generally have a larger amount of online content (also helping to stregthen SEO). Ergo, the addresses do not rank highly because the end in .edu or .com, but because of the investment in the websites... perhaps.
Also, not to be taken as gospel, but google tends to refute those sorts of claims, but plenty of people do query whether some sort of favourtism exists. (all assertions are IMO - disclaimer -) Darigan (talk) 15:47, 8 September 2010 (UTC)
The difference between .com and .edu is that anybody can use a .com to appear to "look more professional" (including spammers, scammers, and cranks — they cost practically nothing and are completely unregulated), but only actual educational institutions can have .edus. (Which isn't to say there aren't a few cranky places there, too, but far fewer than you get in the .com bracket). Treating .com as special or privileged would make zero sense. Treating .edu as something different might, but even then, it might not be necessary (since .edus usually do pretty well in the "have more people link to you than you link to" aspect of PageRank). --Mr.98 (talk) 22:46, 8 September 2010 (UTC)
Not really related to the question but I have read some surveys were people ranked how much they trust TLDs and I think .com is usually fairly high compared to .biz as well as some country TLDs. Funnily enough of course while I have no comment on the likelihood of scammers etc hiding behind things like .cn, .asia or .my these are probably more difficult to obtain and cost more then a .com (relatively speaking .com is actually very cheap and of course really has no limiting criteria) Nil Einne (talk) 16:32, 9 September 2010 (UTC) (nearly closed with a /scammer instead of /small)


I got a "Linksys EW5HUB 5-port ethernet workgroup hub" a few days ago. It has 5 ethernet ports on the back, and a 6th ethernet port which is labeled "uplink". Is the uplink port for connecting the internet from my cable modem too? (talk) 14:38, 8 September 2010 (UTC)

Yes. --Sean 16:15, 8 September 2010 (UTC)
Googling the product name shows that it is a 10MBit hub (not a switch, which sometimes are called switching hub) - so I would recommend against using that dinosaur. You should try to get a 100MBit or 1GBit switch instead. The reason why it has one port labelled "uplink" is that back in its time and age, you needed a cross-over cable if you wanted to connect two ethernet devices of the same type (like, two computers or two hubs). The port labelled "uplink" basically has a built-in cross-over, so you can use the same kind of cable for all connections. Note that with some hubs, the uplink port was next to another, regular port and you could only use one of these two at a time, as on the inside of the hub, both were connected to the same wires - just one straight and the other with the cross-over feature. -- (talk) 16:50, 8 September 2010 (UTC)

How to view Korean NTSB page from late 1990s[edit]

Who has a Windows 98 or 2000 operating system computer with Korean fonts from the time period? and other NTSB pages need Korean, but computers with modern Korean fonts installed cannot see them. Are there older fonts that need to be installed? How could someone view the documents? A check on*/ shows that the page probably always looked like this. WhisperToMe (talk) 20:01, 8 September 2010 (UTC)

Here's an excerpt from the page source:
Mr. Berman&Agrave;&ordm; &plusmn;&sup3;&Aring;&euml;&frac34;&Egrave;...
The document character set is EUC-KR, but the document consists entirely of explicitly encoded Unicode characters in the 00A1-00FE range. The page must have been loaded and re-saved by somebody with no Korean support on their computer. I can't believe that any web browser, even a very old one, would render this page as Korean. It's certainly possible to recover the Korean text, though: just convert the character entities to Unicode, then (using a Unicode-aware but HTML-unaware text editor) save the result as Latin-1 or Windows-1252, then load it in a web browser. I don't know how to do the first step conveniently with off-the-shelf tools; maybe someone else can help. -- BenRG (talk) 20:34, 8 September 2010 (UTC)
I did that with our handy list (Emacs is a wonderful thing), but I'm not sure it fixed everything (partially because I don't read Korean, and partly because Emacs failed to decode the result entirely as EUC-KR). Anyway, I put it through base64 to protect the (possibly mis-encoded) characters that can't be represented in Unicode and pasted it. Hope that helps. --Tardis (talk) 21:39, 8 September 2010 (UTC)
Mm. I realized my mistake: I wrote the Unicode as UTF-8 (thinking that the document had been converted to UTF-8, then had each byte replaced by an entity as if it were a Latin 1 character). Writing the Unicode (which, as you say, is all below 0x100) directly to disk makes it much more legible. I updated the pastebin entry to be the decoded HTML, but it wasn't happy with all the non-ASCII characters and turned them into (Unicode-Korean, this time) character references. Maybe that renders correctly, at least without the EUC-KR declaration, so I removed that. Let me know if it needs to be fixed again. --Tardis (talk) 21:48, 8 September 2010 (UTC)

Here's a Python 3.x script to do the conversion. Save the broken HTML files to your hard drive and either drag-and-drop them into the script or run it from the command line. The fixed files will be in the same directory with ".FIXED.html" appended to the end. The script will work with Python 2.x if you replace html.entities by htmlentitydefs and delete .encode('ascii') and .encode('latin-1'). -- BenRG (talk) 04:50, 5 June 2011 (UTC)

import sys
from html.entities import *

for filename in sys.argv[1:]:
    with open(filename, 'rb') as f: text =
    for name, val in entitydefs.items():
        if '\xA0' <= val <= '\xFF':
            text = text.replace(('&%s;' % name).encode('ascii'), val.encode('latin-1'))
    with open(filename + '.FIXED.html', 'wb') as f: f.write(text)

TV tuners[edit]

Where should I look if I want to buy a tv tuner for my Windows 7 desktop? I intend to watch terrestrial analogue broadcasts and would like to have a remote control. I've tried google, but got lost in the descriptions and lack of reviews. Shouldn't this kind of thing be pretty cheep? I live in Ireland, if that's relevant. Thanks- is mise, Stanstaple (talk) 21:41, 8 September 2010 (UTC)

Computer shops like PC World (retailer) usually stock tv tuner cards / usb tuners. You could also order from (talk) 21:48, 8 September 2010 (UTC)
I suppose I'm looking for informed recommendations as to particular products. Stanstaple (talk) 22:01, 8 September 2010 (UTC)
Well, I have this and I'd recommend it. I'd also recommend using ProgDVB with whatever tuner you end up buying, especially if it's a hauppauge product, as their software is awful. (talk) 22:17, 8 September 2010 (UTC)
(e/c with above) The Hauppauge HVR-900, or generally anything from Hauppauge as they have a reputation for good products. But the included software is dreadful, so I would stick to Windows Media Center. The link is to their UK website. You may have to go to a brick-and-mortar store and look for a similar model, as their .eu website contains a paltry selection of tuners, and there is no specific Irish website. The main problem is that there are few good analog/digital tuners left, and Ireland is lagging behind the rest of Europe in the switch to DTT. Several countries (Germany comes to mind) have already switched and the UK will switch soon. Correct me if I'm wrong but I don't think Irish DTT is even broadcasting yet.
I think you're right. There's no digital tv broadcast yet. Thanks for the help. Stanstaple (talk) 17:45, 10 September 2010 (UTC)
You can also choose to wait until Ireland rolls out DTT and get a digital-only HDHomeRun from SiliconDust. (They are most popular in the ATSC countries but also make a DVB-T version.) I haven't ever used one, although I'm planning to get one and I haven't seen any bad reviews. This review by Mark "Trip Ericson" Columbo, proprietor of the excellent, is typical. Even if you don't get one now, it's a good option for an upgrade in the future. Xenon54 (talk) 22:49, 8 September 2010 (UTC)
I have a Hauppauge WinTV Nova-T dual-channel USB DVB-T (that's digital) decoder, in the UK (I think it's the same as the one linked). If you can at all help it, I wouldn't get a purely analog decoder - analog switchoff says Ireland will switch off analog TV by 2012, making your analog decoder junk (although it seems you'll wait until 2013 to get a full commercial service). Dual channel is useful (strictly I have an older Hauppauge single-channel PCI DVB-T decoder card too, giving me three channels); once you get used to the PVR functions of a modern media PC (particularly the "record this whole series" function) you can easily get into corners where there are two or three things you want to record or view at the same time. I also agree with that Hauppauge's software is dreadful; I'm very rarely a fan of Microsoft software, but Windows Media Center (which comes in the Home Premium, Professional, Enterprise, and Ultimate editions of Windows 7) is very good indeed (so you still run the Hauppauge drivers, but not their bizarre applications). I bought an Emprex 3009URF remote control (it's infrared, with a USB detector) which works fine with the above. -- Finlay McWalterTalk 23:03, 8 September 2010 (UTC)