Wikipedia:Reference desk/Archives/Computing/2010 May 13

From Wikipedia, the free encyclopedia
Computing desk
< May 12 << Apr | May | Jun >> May 14 >
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.


May 13[edit]

Change icon[edit]

Hi all! I recently installed a free codec (this one) so I could listen to Wikipedia's music offline. Unfortunately, it comes with a horrid image of a fish that all .ogg files I download now have. How can I change this? I've tried rightclick-properties but that doesn't seem to wokr. Thanks. ~`76.229.213.156 (talk) —Preceding undated comment added 02:28, 13 May 2010 (UTC).[reply]

HowToGeek provides an article detailing how to do this. Scroll down to "Change Icons for Regular File Types" which may apply to what you're looking for. Amordea (talk) 03:14, 13 May 2010 (UTC)[reply]

Get rid of beta[edit]

I hate the new "beta" style on Wikipedia and I want it gone. Since I'm not using an account I don't have the option to remove it in preferences. So would it be possible to write a greasemonkey script that could replace the new "Vector" skin with the classic monobook skin? 82.44.55.254 (talk) 11:21, 13 May 2010 (UTC)[reply]

Get an account. It's free and easier than writing a GM script. Buffered Input Output 11:26, 13 May 2010 (UTC)[reply]
Thank you, but I want to use a greasemonkey script for this. 82.44.55.254 (talk) 11:42, 13 May 2010 (UTC)[reply]
What's bad is that even after returning to the classic version you can't get rid of the new, ugly logo. Rimush (talk) 11:27, 13 May 2010 (UTC)[reply]
There's a discussion at Wikipedia:Village pump (technical)#New logo. -- BenRG (talk) 20:33, 14 May 2010 (UTC)[reply]

ToggleKeys won't beep[edit]

Hello. I am on Windows 7. I activated the ToggleKeys option, but when I press the Caps Lock button, I hear no sound, not even at maximum volume. Keeping Num Lock pressed for 5 seconds does turn the option on and off, but it doesn't do much else. All other system sounds are perfectly fine. Any help is greatly appreciated. Thanks in advance. 190.157.140.227 (talk) 13:24, 13 May 2010 (UTC)[reply]

I don't know about Win7, but on all versions of Windows I've used (up to XP), the "ToggleKeys" beep comes through the PC Speaker, which is the small internal speaker attached to the motherboard, inside the case, and not through the PC's sound card and external speaker setup.
This is an incredibly old-fashioned way of making a noise, and it's entirely possible that your PC doesn't even have a speaker attached to it, or you just can't hear it through the case, over the fans, etc. Unfortunately, I doubt there's a way to change this short of finding some 3rd-party software, and I'm not aware of any way of increasing the volume of the PC Speaker short of modding the hardware. Hope this at least explains the problem, even if it doesn't solve it. - IMSoP (talk) 20:26, 18 May 2010 (UTC)[reply]

Logical path to URL[edit]

Using vbscript I am able to create a text file on the server and write text to it using a set statement to create the Server.CreateObject("Scripting.FileSystemObject") object under ASP. The logical path on the server is '''d:\xxx\text.txt''' while the physical path is d:\ftp\xxx\text.txt. How do I move, convert, link to or make this file accessible as an http:// URL text page file, such as '''http://www.domain.com/xxx.text.txt'''? 71.100.0.29 (talk) 13:37, 13 May 2010 (UTC)[reply]

Do you know what directory http://www.domain.com/ points to? --Phil Holmes (talk) 15:35, 13 May 2010 (UTC)[reply]
I meant "domain" generically. 71.100.0.29 (talk) 16:09, 13 May 2010 (UTC)[reply]
Where exactly the root of the domain points to in the file system of the server will depend on your ISP. I've had a number of different ISPs in the past and they all pointed to different directories. --Phil Holmes (talk) 16:55, 13 May 2010 (UTC)[reply]
That should be irrelevant. 71.100.0.29 (talk) 17:26, 13 May 2010 (UTC)[reply]
I'm not sure I understand what your question is—in that the answer seems too obvious to really be the question (but maybe I am wrong). On any web server the actual local file path will feature a local directory structure up to the directory which is served as public by the server. So c://whatever/username/apache/public_html/file.txt will be seen as http://www.yourdomain.com/file.txt because the server recognizes everything in public_html to be the root. So if you were coding this from the other side, where you knew the local file path, you'd just need to figure out what the snip out in order to be referencing the root directory (in this case, you snip out c://whatever/username/apache/public_html/). That should all be pretty obvious though, which is why I am confused by the question. If you are asking, how do I get the server to serve that information up as a web page in the first place, that requires the installation of an HTTP server, like Apache. --Mr.98 (talk) 22:33, 13 May 2010 (UTC)[reply]
Microsoft Server is already installed and uses drive D as the physical and logical drive letter. The physical path to my account on the server is named d:\ftp\myaccount\ and I can create a sub-directory called xxx with vbscript under asp using server.createobject("scripting.Filesystemobject") and write text to the file by uploading and running the script using FrontPage. The file shows up with a physical path on the server of d:\ftp\myaccount\filename.txt and with a logical path of d:\xxx\filename.txt and I can write to this file with another vbscript. Visitors, however cannot view the file with a browser nor can I find it using frontPage anywhere in the main or sub folders. It is no where to be found as a URL file such as http://www.domainname.com/myaccount/filename.txt. I know its on the server but I need to be able to access it from a browser and not just from a vbscript running under asp on the server. I need a way to move or copy the file from either the logical or the physical path to the URL path of my account. 71.100.0.29 (talk) 23:05, 13 May 2010 (UTC)[reply]
It sounds as if you are putting them in a directory that does not have an HTTP server making it public (it looks like it has FTP access but not HTTP). If that's the case then no amount of rooting around with the right domain name will help you. That is, it sounds like you have FTP access to an account but that the folder in question is not public—is this right? If that's the case then the problem is making the directory public more so than finding the right directory. --Mr.98 (talk) 01:20, 14 May 2010 (UTC)[reply]
Ironically enough FrontPage provides a "Save Results" web component or webbot to save the data collected by a form but I have not been able to get the webbot to work. Possibly there is a d:\http physical path but I can only reach the physical path through the creatobject which requires I use the logical path name. 71.100.0.29 (talk) 01:31, 14 May 2010 (UTC)[reply]
Resolved
I found a way to get the saved results webbot to work so problem solved. Thanks. 71.100.0.29 (talk) 02:01, 14 May 2010 (UTC)[reply]

Saving Passwords in Browser = More Risk?[edit]

Does saving my password and login information to websites in web browsers such as Firefox and IE increase my chances of having my passwords stolen in the event of spyware/malware infection? In other words, how well, if at all, are these passwords encrypted? Acceptable (talk) 14:02, 13 May 2010 (UTC)[reply]

Yes, a bit. Firefox does keep your passwords encrypted (ref) but it itself has the key to unencrypt that (otherwise the password store wouldn't work), so any malware that is smart enough to know how can figure it out. I'm not aware of any malware that does, and most password-stealing malware seems to do so by sniffing the keyboard instead, but there's no reason why this would be all that difficult. -- Finlay McWalterTalk 14:48, 13 May 2010 (UTC)[reply]
It could be argued that, since having the password stored removes the need to type it in, then you're less at risk from keyboard sniffers if you store your passwords in this way. --Phil Holmes (talk) 15:34, 13 May 2010 (UTC)[reply]
If you choose strong passwords and memorize them, then you do not need to save them to websites. See Study: Frequent password changes are useless - Yahoo! News. -- Wavelength (talk) 15:37, 13 May 2010 (UTC)[reply]
But if you use the same password for all sites, mine included, then you would give me your password for your banking site when you logged into my site. Choosing a different, strong password for every site you log into, and memorising them all, is beyond the power of most people, myself included. --Phil Holmes (talk) 16:53, 13 May 2010 (UTC)[reply]
One tip I have found useful is to generate a different strong password for each site procedurally - for example choose an easy to remember phrase for each site and use that as your password, but type it in with your hands centred on a non-standard position on the keyboard, effectively turning a weak password into a strong one by using a kind of substitution cipher (I don't use that particular technique myself - I'm not going to tell you what I actually use). 131.111.185.68 (talk) 19:01, 13 May 2010 (UTC)[reply]

Java escape sequences[edit]

I'm practicing manipulating data in Java through file input/output stream, and need to break a string into tokens. Surfing http://java.sun.com for StringTokenizer class but I am advised to use String.split() method instead (see here). Here is the exempli gratia on that page:

String[] result = "this is a test".split("\\s");

The split() method return an array of strings. In the example above each of them are 1 token seperated by space character. But I do not know why \\s represent the character space. I try to print it on the screen, like this:

System.out.print("\\s");

And receive the output: \s on the screen, since double back slash stand for the character backslash itself. I found the escape sequence reference on http://java.sun.com, but it does not cover my question. -- Livy the pixie (talk) 14:35, 13 May 2010 (UTC)[reply]

There are two layers to understand here. The first is the compiler - it takes that string literal "\\s" and stores it as an internal string that is just "\s" - so the \\ is for the compiler only. If you were to read a string in from a file or the user, you'd just enter \s to get what you want. Next is the String.split() method - it takes a regular expression - if you look at the Java documentation for its regexps here you'll see that \s is the regexp for "a whitespace character". -- Finlay McWalterTalk 14:42, 13 May 2010 (UTC)[reply]
Regular Expressions and Annotations are 2 last sessions in my textbook, and I admit I haven't read the book through to the end yet (I'm now stuck at the beginning of advanced Java). For now, I'd better pass a specific character (e.g: " " instead of \s) as an argument for this method. This seems to be less confuse and complicated than using the Regular Expression thing. Thanks for the answer. -- Livy the pixie (talk) 16:42, 13 May 2010 (UTC)[reply]
I agree that passing a specific character is better for your purposes; you are probably already aware that it doesn't do the same thing, but you don't NEED it to do the same thing. It is one reason why I object to too much dependence on examples; it is difficult to make an example that doesn't depend on other knowledge, and that illustrates what you want and ONLY what you want, and to make sure that what you are illustrating is clear TO THE READER, which is supposedly the point. I must say that, in this case, the example seems to go out of its way to be obscure... Ralphcook (talk) 01:03, 15 May 2010 (UTC)[reply]

Help me choose a username![edit]

I really hate usernames, but Wikipedia requires one to have an account. So help me decide. I want a username isn't long, annoying, pretentious, or related to me in any way. Go! —Preceding unsigned comment added by 86.70.113.44 (talk) 15:45, 13 May 2010 (UTC)[reply]

I'm afraid this is a reference desk, where we help by providing information. As you should have seen from the notice at the top of the page, "if you need advice or opinions, it's better to ask elsewhere." ╟─TreasuryTagsheriff─╢ 15:49, 13 May 2010 (UTC)[reply]

Where would you suggest I ask for help on choosing a wikipedia username to use on wikipedia? —Preceding unsigned comment added by 86.70.113.44 (talk) 16:02, 13 May 2010 (UTC)[reply]

See Wikipedia:Username policy. -- Wavelength (talk) 16:31, 13 May 2010 (UTC)[reply]
Alright, I asked my question there. I still don't see why you people here couldn't have helped, especially seeing as there's a question on the Miscellaneous‎ desk asking for opinions on what to buy a 20 year old girl for her birthday which got a load of helpful replies. Whatever man —Preceding unsigned comment added by 86.70.113.44 (talk) 16:40, 13 May 2010 (UTC)[reply]
See this thread from last December, from the Miscellaneous desk. Comet Tuttle (talk) 16:37, 13 May 2010 (UTC)[reply]
In addition to the many suggestions in that thread, you could try this generator of pronounceable letter sequences. Check prospective usernames here. -- BenRG (talk) 19:05, 13 May 2010 (UTC)[reply]
Use the random page link on the left bar, and click it a few times until you land on something suitable. Check special:ListUsers to make sure it's not too similar to an existing user (you'll often find it is, but most claimed usernames have been used only for a handful of edits long ago). Don't use a name of a person or an organisation. A few minutes of messing around found the following, all of which are vacant and (to my mind) pretty good: Oligarcha, Sealguard, Engineered Wood, Trophime, Distortion Synthesis, Pulse Generator, Rusenu. -- Finlay McWalterTalk 16:51, 13 May 2010 (UTC)[reply]
No more please on this page. The question was subsequently posted at the help desk. PleaseStand (talk) 22:13, 13 May 2010 (UTC)[reply]

SQL question[edit]

I have a table of orders for particular products, and a table of products that are on sale. (It's not ideal database structure, but that's out of my control.) What I want to do is outer join the order table to the sale table via product number, but I don't want to include any particular data from the sale table, I just want a Y if the join exists or N if it doesn't in the output. Can anyone explain how I can do this in SQL? Keepscases (talk) 18:19, 13 May 2010 (UTC)[reply]

One way is to "cheat" and use a sub-select (and CASE) within your select. There are probably better ways, but this should work.
select
column1,
column2,
...,
case when OrderProductId in (select ProductID from ProductsOnSale) then 'Y' else 'N' end as 'On Sale?'

from
   OrdersTable ...

--Nricardo (talk) 02:49, 14 May 2010 (UTC) (edits shortly thereafter with better table/column name)[reply]

That certainly works. A join might be faster than a subquery, though. I'd tend to use:
select 
  case when sale_products.product_id is null then 'N' else 'Y' end as sale_flag
from 
  orders 
  left join sales_products 
    on orders.product_id = sales_products.product_id

198.161.238.18 (talk) 15:22, 14 May 2010 (UTC)[reply]

Thank you so much for these examples. Keepscases (talk) 20:41, 14 May 2010 (UTC)[reply]

mp3 player/recorder/FM radio doesn't work[edit]

My Transcend brand player twice the size of a pen drive is not working. I can still plug it into my system via usb and move files to or from. But It doesn't charge nor does it starts when I press the button. It's only a few months old and very sparingly used. On the lower side there is a very tiny hole with reset inscribed near it. If I put a pin and press what will happen? Will the factory settings be restored if it is not physical damage? How many seconds to press a pin down the hole? Thanks for any advice. --117.204.80.75 (talk) 21:37, 13 May 2010 (UTC)[reply]

Can't comment specifically on the Transcend. (Model No. or a link to it may help.) Have you read the manual, if it has one? If so, following the advice there is a good start. I have a Creative Zen Neeon 2. It also has a reset hole and a few times I have used it when the player 'locked up' (meaning the software has crashed like a PCs 'Blue screen of death'. Using it is basically the same as resetting your PC or any other micro-processor based device. The bit about not charging might mean a battery problem, (internal battery?) or it may just mean it is again 'locked up'.
You should only need to push the reset for a second, if that. It will likely restore factory settings. I would suggest using something non-conductive, unless it specifically says otherwise. I think I pared down a match-stick & it worked ok. Here is a link to the Transcend web site Support page. [1]--220.101.28.25 (talk) 05:51, 14 May 2010 (UTC)[reply]
I would always be cautious about exactly what a reset button will reset. As you can access the content on the player via USB, I suggest you back up what you can, before pressing the reset button. Under the hole, is an ordinary plastic topped button, or sometimes a flexible strip of metal. Depending on the size of the hole, an unfolded paperclip, a pared down matchstick or a pin will easily do the job; just stick it in straight while the player is on, push gently for a second or two and don't wriggle it around. Astronaut (talk) 12:55, 14 May 2010 (UTC)[reply]
This [2] is the model.I tried reset and it didn't work.-117.204.84.191 (talk) 12:59, 14 May 2010 (UTC)[reply]
Assuming you did check the troubleshooting section on p.38 of the manual and made sure the "hold" switch isn't on, it sounds like it is broken, the battery is broken or maybe just the battery charger is broken. I'm unsure of your rights to a replacement in your country, but here in the UK I would try to get a refund from where I bought it, or insist they replace it with one that works. Failing that, your MP3 player comes with a two year manufacturers warranty (p.41 of the manual) under which it could could be repaired or replaced. Astronaut (talk) 17:56, 14 May 2010 (UTC)[reply]

Rapidshare[edit]

Resolved

I can't access rapidshare.com, and I heard VirginMedia ISP is blocking it deliberately. Any way to confirm if they are or if it's a problem at my end (I had difficulty accessing another site recently that turned out to be my computers problem) 82.44.55.254 (talk) 22:55, 13 May 2010 (UTC)[reply]

Try http://downforeveryoneorjustme.com/. It should tell you if it's on your end or theirs. If you want to see a little more clearly what is going on, consider running a traceroute and see where it fails. --Mr.98 (talk) 01:15, 14 May 2010 (UTC)[reply]
Tried that and it reports it as fine. Pinged the site and it pings fine too. Try to browse and it fails. Try to browse through proxy and it works. As I said, there's talk that Virgin Media are blocking the site deliberately. 82.44.55.254 (talk) 08:31, 14 May 2010 (UTC)[reply]
I just googled for it and they are deliberately blocking it, and other sites. Apparently it's a "technical error" (yeah right) that they'll be fixing later today. 82.44.55.254 (talk) 08:35, 14 May 2010 (UTC)[reply]
I wouldn't put down to malice what could easily be due to stupidity/incompetence. As the very forum you linked to above says, it could easily be someone screwed up while attempting to throttle such sites or do something similar like set up a transparent caching proxy (or maybe they already have these and they got broken some how). The fact that they'll be fixing it soon also makes this likely, unless you know a reason they would bother to block it for a few days and then unblock it? While it's possible they really thought no one would notice or care and reversed their plans when they got complaints, this seems rather unlikely to me, they can't be that stupid. There's also the question of why they would want to block such sites. While I'm sure many ISPs would like they're well aware isn't worth the hassle particularly when there are far better options like throttling to do most of what they want to achieve by blocking. Edit: [3] another site with a different suggestion. Nil Einne (talk) 17:10, 14 May 2010 (UTC)[reply]
Maybe you are right, but I can't help being suspicious, especially with the new Digital Economy Act 2010 and similar incidents in the past 82.44.55.254 (talk) 18:31, 14 May 2010 (UTC)[reply]
"it will go into effect on June 12 of the same year" so there's no reason for them do be doing anything yet. It's possible they're testing some future blocking set-up BUT blocking isn't that hard and they already have the IWF filter so I don't really see why they'd bother. Unless perhaps they're testing some set-up which decides which sites to block automatically but that seems unnecessarily complicated to me. Far more likely any blocking would be manual and of course as I implied earlier, if they do decide to block a site, it seems likely they would mention they did it because Digital Economy Act 2010 and unlikely they'd say it was because of technical problems and unblock the website a few days later.
I don't really get the relevance of the IWF example here (in fact it was one of the reasons I said don't put down to malice what could be due to stupidity). The reason for the blocking there was quickly explained and well established, whether or not people felt the decision there made any sense. No one claimed the blocking was anything but intentional (okay it's possible some of the earliest clueless tech support people did but I think we can all agree what they say is next to useless). And while they eventually backed down, they did it publicly after their own consideration (which took a fair while despite much adverse publicity), explaining why they backed down. They didn't then try to pretend they had never intended to block that image. They also never tried to block the entirety of wikipedia intentionally. There were various unintended consequence because of poor implementation which if anything just further demonstrates the point. And of course the link I provided above mentions that such unintended consequences from the IWF blocklist could very well be the cause of the entirety of Rapidshare being blocked.
To put it a diff way from my POV the IWF examples shows that when they do block things intentionally, they're not going to hide behind lame execuses or pretend it wasn't intentional and it also shows that many of the problems that appear (bearing in mind the issue also raised discussion of previous history and problems with blocks, and what many argued was the poor way the IWF blocks were implemented in general) that while there are unintentional blocks, other then being something they don't pretend wasn't intentional, they dwarf the number of unintentional problems including blocks that arise.
Nil Einne (talk) 11:29, 16 May 2010 (UTC)[reply]
I know this is late but whatever. I understand what you're saying, but after seeing zshare, megaupload, rapidshare and today hotfile all being filtered it can not just be a coincidence or mistake on their part. Also, you said "they're not going to hide behind lame execuses or pretend it wasn't intentional", well that's EXACTLY what they did with Wikipedia, they served up a fake 404 error page claimed that the wikipedia server couldn't find the page, not that it had been blocked by the isp 82.44.55.254 (talk) 17:03, 22 May 2010 (UTC)[reply]

Wikipedia doesn't work on the PS3 browser[edit]

Not sure if this has been raised as an issue already, but Wikipedia pages do not seem to render correctly on the browser built into the PS3, since the introduction of the new page style. I seem to get two vertical blank strips, about a third of the way and two thirds of the way across the page, which probably blank out about half of an article's content. I have tried various settings on the browser but it always seems to render the same. SilverTrack (talk) 22:57, 13 May 2010 (UTC)[reply]

This issue has been raised a few times around WP - such as the WP:HD. Please try looking on there because I think a user posted some helpful links to a question on there somewhere... Chevymontecarlo. 11:56, 14 May 2010 (UTC)[reply]