Jump to content

Wikipedia:Reference desk/Archives/Computing/2009 July 31

From Wikipedia, the free encyclopedia
Computing desk
< July 30 << Jun | July | Aug >> August 1 >
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.


July 31

[edit]

How Wiki came up with the idiom Wiki is not a crystal ball meaning Wiki does not calculate futue events. Crystal is just a gem, so what does crystal have anything to do with guestimating?--69.228.145.50 (talk) 00:29, 31 July 2009 (UTC)[reply]

See Crystal ball. --Tagishsimon (talk) 00:35, 31 July 2009 (UTC)[reply]

Image a usb memory stick

[edit]

I am looking for a program that can raw dump an entire USB memory stick to a single file - without adding any of its own crap to the image. As there any software that does it? I also want to be able to write the image back.--155.144.40.31 (talk) 01:33, 31 July 2009 (UTC)[reply]

'dd if=/dev/yourusbstick of=usbimage' should do it on linux. Reverse the input file and output file to write it back, bit for bit both ways. --Mask? 01:37, 31 July 2009 (UTC)[reply]
If you're not fortunate enough to be a linux user, this site has a long list of disk imaging tools. Most of them are bootable cds, probably not what you want, but this program sounds like it'll backup a usb drive to an image file. Indeterminate (talk) 01:38, 31 July 2009 (UTC)[reply]
I ended up getting cygwin so I could just do "dd if=/dev/sdb of=cygdrive/c/dump.raw" Thanks anyway!--155.144.40.31 (talk) 01:44, 31 July 2009 (UTC)[reply]

WinImage can do this // 14:57, 31 July 2009 (UTC)[reply]

SEO Optimization: URLs

[edit]

Hi All,

When it comes to optimizing urls, does it HAVE to be the page name containing the keywords, or will something in the path be just as effective? Example

www.mysite.com/somecategory/file-name-with-keywords.htm

as opposed to:

www.mysite.com/key-words-here/2.htm

Will it make a substantial difference going from one to the other?

Thanks in advance PrinzPH (talk) 03:03, 31 July 2009 (UTC)[reply]

That will depend entirely on the search engine you are optimizing for. Google does not publish its indexing and ranking methodology, so it is not possible to give you a definite answer for Google's system. In general, though - it is probably safe to say that a modern web-indexing search engine will use some information from the URL to estimate search relevance. Nimur (talk) 14:11, 31 July 2009 (UTC)[reply]


I see. My question really revolves around assuming that search engines do use the URL (the string itself), does really matter at what point in the string it occurs? PrinzPH (talk) 17:00, 31 July 2009 (UTC) EDIT: I just noticed my question is redundant (Search Engine Optimization Optimization? lol) :p PrinzPH (talk) 17:05, 31 July 2009 (UTC)[reply]

As I mentioned before, the answer to that question depends on which search engine you intend to optimize results for. Since no commercial search engine publishes its algorithms, it is not possible to accurately answer your question. Here is Google's SEO guidelines. Note that Google does not look too kindly on the concept of "Search Engine Optimization" - they prefer that you organize your site properly and make it easy to index and crawl; and let them decide how you rank. Ultimately, that is how search engines work - somebody else decides (or writes an algorithm to decide) how the pages rank, and they do not have to tell you why they made that ranking. This lack of openness was the primary reason that Wikimedia sought to develop Wikia Search, an open-source search engine, with published ranking methods and algorithms, and community intervention. However, the project did not perform, very well, and is no longer active. Nimur (talk) 00:09, 1 August 2009 (UTC)[reply]
I'm not a search engine, but I would prefer the first one. It is easier to remember and gives more information about the content (unless it's page 2 of "key-words-here"). Sites optimized for users get more links from other sites, so search engines rank them better. MTM (talk) 22:35, 6 August 2009 (UTC)[reply]

Strange network behavior

[edit]

So I'm visiting my parents' place for a couple of days and they had their internet cancelled for the summer. A neighbor has kindly allowed me to use their wireless next door, and the last time I used it I could access it from over half the rooms in the house.

This time around I could barely access it at all. For about 5 minutes, I could access google.com, and it was quite fast and responsive, but NO other sites would work at all. Meanwhile I could do Google searches to my heart's content, so I simply gave up.

Then I disabled 802.11n and connected with 802.11g. A little better, but most sites still don't work most of the time. google.com doesn't work anymore, so my previous success must have been a coincidence right? Well... I ssh'd into my work machine and tunneled VNC through that. The VNC is nice and responsive (as much as VNC typically is), in fact I'm typing this question into Firefox on my work computer through my VNC-over-SSH session.

I left a ping -t (in Windows) running for about 10 minutes to the machine I ssh'd into and got a 95% packet loss. Meanwhile the VNC session has been perfectly responsive the whole time, including various other things I had going on in my little Putty SSH session at the command line.

Can anyone explain this behavior, why I'm getting such a poor ping response while my VNC session remains perfectly fine (from what I can tell)? If the wireless is spotty, wouldn't that trigger wireless retransmits that are invisible to the ICMP layer? If these retransmits are taking too long and the ping is timing out anyways, why is my VNC session still so responsive? If it's a QoS thing where my SSH stuff is getting through at the expense of ICMP stuff, then why is most of my web traffic getting blocked when no VNC is running? These should hopefully give you an idea of my network knowledge--or lack thereof. Generally speaking, why is there such a huge reliability gap (perfect.....abysmal) between my VNC-over-SSH to my work computer and everything else I've tried?

I also tried OpenDNS with virtually identical results (not that that would explain the ping/VNC disparity).

Thanks. --Silvaran (talk) 03:22, 31 July 2009 (UTC)[reply]

what is the ping response with URL vs IP? use yahoo and not google as they have blocked pinging their servers. you can also try to uninstall and reinstall the network driver for your wireless. Then check the connection. Ivtv (talk) 05:19, 31 July 2009 (UTC)[reply]

How mysterious! Since an SSH tunnel works fine, I would also guess some kind of QoS issue. My best guess would be some kind of malfunctioning traffic control or deep packet inspection firewall on the neighbors' wireless router or broadband modem. What about HTTPS/SSL? I'd guess that it probably works fine too - it might just be unencrypted traffic that gets throttled or dropped. Could the neighbors be doing some heavy torrenting? Even combined with QoS, it seems unlikely that it could cause the problem, but hrm. As far as solutions go, my #1 suggestion would be to get the neighbors to reset their router & modem. I guess that might be a little rude to say to them...
Oh, you could also try a traceroute to a few different sites, see if it always drops out at a certain point. That way, if you can ping your neighbor's router and modem easily, you can narrow down the issue. Yeah, that's probably the best sleuthy solution. Indeterminate (talk) 11:26, 31 July 2009 (UTC)[reply]
Thanks for the suggestions! I'm grabbing nmap now, though I'm not positive what kinds of info it will give me. I can't get to the router web page very reliably (and the high SSH tunnel reliability won't help that!), so I don't think a tracepath would help, but I'll give it a shot. The neighbors are actually away on vacation for awhile, so I'm thinking what I might try and do is, if I can figure out the router web page's password and get there reliably enough for a few minutes, I'll change the WPA2 key and see if that fixes things. If so, I'll change it back, and suggest the owner change it when I get a chance to talk to him next. Thanks again! --Silvaran (talk) 14:16, 31 July 2009 (UTC)[reply]
No go on the router web page stuff, I can't figure out the password, nmap can't even detect it (but still gives me a fingerprint so its connection attempts must have been successful), I'll see how it works for my neighbor once he gets back. Having my SSH tunnel work virtually 100% of the time and everything else work only 1% of the time is really baffling though... --Silvaran (talk) 14:16, 31 July 2009 (UTC)[reply]

Saving response for ping command in C

[edit]

I know that with system("ping machinename") I can ping a machine in C. i'd like to save that output to a char array variable if possible. How would I do that? (if you could write up/copy paste some quick code, I'd appreciate it). Also, this isn't homework :). Chris M. (talk) 14:24, 31 July 2009 (UTC)[reply]

You can dump the output to a log file:
system("ping machinename > pingResult.log");

FILE* f = fopen("pingResult.log", "r");

// ... read and parse log file
Thanks, that worked exactly as I hoped. Chris M. (talk) 14:43, 31 July 2009 (UTC)[reply]
Ack, no, bad idea. There are a million ways that can fail: if the current directory isn't writable, if the file isn't writable, if the user has a file by that name that they don't want to lose, if two copies of your program are running concurrently in the same directory, if your program is running with elevated privileges and someone creates a symlink or exploits the system-fopen race... just don't do it. Use popen:
          FILE* f = popen("ping machinename", "r");

          // ... read and parse output
In Visual C++ it's called _popen instead of popen. You still need to sanitize the machinename if you got it from a source you don't trust. -- BenRG (talk) 21:28, 31 July 2009 (UTC)[reply]
Indeed. And it's also very wise to supply an absolute path for ping (e.g. /bin/ping). If you're going to be doing a lot of pinging, and need more control than the command-line ping executable can give, skipping popen and using a dedicated ICMP or ping library (or hand-writing it with SOCK_RAW/IPPROTO_ICMP, if you really must) like liboping (which Debian ships) might be for you. -- Finlay McWalterTalk 21:42, 31 July 2009 (UTC)[reply]
Or, you can set up a named pipe, if you are on Unix, and open the pipe without ever writing to disk. Nimur (talk) 14:30, 31 July 2009 (UTC)[reply]

vista user pic

[edit]

is there a way to ged rid of that bloody pic every user gets assigned in windows since xp to vista ??? i mean that there was no pic at all —Preceding unsigned comment added by 77.35.47.159 (talk) 14:36, 31 July 2009 (UTC)[reply]

One easy solution is to assign all users a blank, transparent PNG file. You will never see any image logos for users; and you don't have to spend a lot of time mucking around with complicated settings. Here is a 1x1 pixel transparent PNG that will do the trick. [1], and this Microsoft page explains how to set the user's picture. Nimur (talk) 14:58, 31 July 2009 (UTC)[reply]

diagnosing monitor trouble

[edit]

A while ago my laptop began to have a problem where after being off for a while and then turning it on, the screen image would be flickery and then often go out. Once it went out there would still be an image on the screen, but with no illumination so it was almost impossible to see. This led me to believe there was a problem with the monitor's backlight. The only way to get it to work again would be to turn the monitor off and back on (the quickest way was to put it in stand by mode). The problem seemed to go away as the monitor was on for longer, so after a few tries it would work better, and then once it was on for a few minutes straight it would be fine until the next time I turned it off. Over a few weeks this issue got worse and worse until it became unusable. I connected it to an external monitor, which worked with no problem. I've been using it like that for a few months since I've been too lazy to do anything about it. Then yesterday I suddenly started having the same issue with the external monitor. The external monitor is an LCD as well. Is this a common enough problem that it's conceivable I'm having the same issue with two different monitors in the span of 6 months or is there something with the computer that could cause this? Rckrone (talk) 17:57, 31 July 2009 (UTC)[reply]

I had an LCD monitor (Samsung) with the exact same problem. After doing some online research, I found that it was due to a capacitor overheating (it can get pretty hot in my study during summer, which explains why the monitor worked just fine in winter/early spring/late fall). After replacing the capacitor (a half an hour job) the problem went away. If your monitor/laptop is a Samsung, that's likely your problem as well, but, of course, it could be a million other things.—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 18:03, July 31, 2009 (UTC)

External HDD question

[edit]

I think I know the answer to the question I am going to ask, but I'm gonna ask it anyway, just to confirm.

What is the worst that could happen to an external HDD (or the data on it) if it is connected simultaneously to two computers? The HDD in question has two connections (USB and eSATA)—if the drive is connected to a running PC via USB and also to another running PC via eSATA, what could the consequences be? The HDD contains a repository of data both PCs need to access, and neither PC is expected to update the data (not often anyway).

And yes, I know I can just share the drive over the network, so both PCs would have access to it no problem. I am just curious about this alternative approach (if only for access speed reasons). Thanks.—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 17:58, July 31, 2009 (UTC)

Hmm... I'm not a expert in this, but I would assume it would work like a normal HDD. If a file is locked, you can't write to it, so there would be no corruption. Maybe someone else knows more? Thanks. AHRtbA== Talk 18:10, 31 July 2009 (UTC)[reply]
I would imagine that the controller inside a consumer external HDD with two interfaces will only allow one or t'other to be active at a given time; that it'll ignore the other altogether. In the event that it does support both, I'd guess it would work like a multi-interface storage area network device - it deals only in reads and writes of whole blocks (LBAs), and maintains a queue for reads and writes, actioning only one at a time. Almost all filesystems expect that they're the only user of a given block level device, and two such filesystems blindly accessing the same block level storage in this way isn't something they know how to deal with, so there will be terrible corruption and total (cache-related) inconsistency. So, in short, it won't work, and if it does, don't do it. -- Finlay McWalterTalk 18:06, 31 July 2009 (UTC)[reply]
Well, this one isn't a consumer-oriented HDD; it's industrial (and quite expensive), so it'd be silly to risk frying it with an experiment like this. The whole inquiry was just unbridled curiosity speaking. Still, if I had a cheap HDD with two interfaces, I'd try it out just for kicks, to see what happens :) Thanks anyway!—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 18:16, July 31, 2009 (UTC)
I would certainly consider it defective if simply plugging in two interface cables actually broke the thing. I should qualify my above slightly: if there were two partitions on the disk (assuming concurrent access was supported) and you arranged it for one computer to access the first, and the other the second, then that wouldn't be a logical problem. Performance-wise it would be a catastrophe, however, as the two computers disk-scheduling schemes would fight with one another, causing the drive head to perform big seeks repeatedly, dancing inefficiently to serve two selfish masters. -- Finlay McWalterTalk 18:28, 31 July 2009 (UTC)[reply]
The matters are complicated by the fact that it's actually two (physical) drives in a RAID1 configuration (one logical drive). At any rate, I have no inclination of moving almost two terabytes of data elsewhere (in case they become corrupted) just to try out a silly experiment like this :) It would be most interesting to see how badly the performance would be hit, though. Cheers,—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 18:39, July 31, 2009 (UTC)
Don't worry, there's absolutely no chance it would do anything interesting. Maybe there are external drives with multiple USB ports or multiple eSATA ports that are designed for concurrent block-level use, though I doubt it. But using two different interface standards to hook up two computers is obviously a hack, and there's no way they'd implement all the tricky arbitration logic that would be needed to support that hack, especially since in the vast majority of cases the result of all that effort would be to corrupt the file system and lose customers' data. -- BenRG (talk) 21:05, 31 July 2009 (UTC)[reply]
Unless this was specifically designed and advertised to be used by two computers at once, I would be very surprised if what you're looking to do actually worked. I suspect that You'll need some sort of server in the loop. Tiny File servers are (Relatively) cheap these days. I've got one of these : NSLU2, but there are others out there. APL (talk) 07:18, 2 August 2009 (UTC)[reply]

How to use MediaWiki PAGENAMEE for custom page name?

[edit]

I know that in MediaWiki, they have two variable expansions, {{PAGENAME}} and {{PAGENAMEE}}, where the second one is the first one with special characters URL-encoded, and spaces turned into underscores. However, suppose I want to make a template that allows people to link to an external wiki outside of the Wikipedia family using a direct URL link (since it's a wiki using MediaWiki, I need to URL-encode page names in the URL when I link it), but I want to allow people to specify the page name as a normal page name (i.e. with spaces and special characters). So my question is: is there some special MediaWiki function that performs the exact same transformation as {{PAGENAME}} to {{PAGENAMEE}}, but on a custom string. Thanks, --71.106.173.110 (talk) 18:21, 31 July 2009 (UTC)[reply]

Mobile phone, voice recognition for calling

[edit]

I have a Sony Ericsson W595 phone which I very often use with a bluetooth headset, and the first thing I did after buying it, was to try out the voice recognition feature for making calls. I recorded commands such as "Call Erik", "Call Ellen", etc. (I used the Norwegian word for call - Ring - and these are not the actual names). I did this for about ten or fifteen of my contacts. It worked beautifully. Beautifully, that is, in the quiet room where I was when I did the exercise. When I need the feature, however, it's a disaster. Outdoors, on the metro, when I'm running -- it hardly ever works. My question is - what should I do to make the feature usable?. My first thoughts are: don't say "Call" before the name of the contact, and keep the number of contacts that I use the feature for to a minimum. Any other suggestions? --NorwegianBlue talk 18:45, 31 July 2009 (UTC)[reply]

Try recording the commands when you're in a noisy environment. --LarryMac | Talk 18:51, 31 July 2009 (UTC)[reply]
Yes, I've thought of that, but I haven't tried it. The trouble is — I fear — that the ambient noise when I'm running, when I'm on the metro, when I'm in my car, when I'm in a shopping mall etc., are very different. I have, too, thought of making silly noises, whistling, gargling, singing falling and rising tones etc. to maximize the difference between the audio signatures of each contact. But that would really make people think I'm a lunatic. (I'm oldish, I don't really care all that much what people think, but still, there's a limit...). I would very much like this feature to work, because I would have used it a lot, especially when running (which I do for about an hour every day, on my way to work and back home in the evening). --NorwegianBlue talk 20:08, 31 July 2009 (UTC)[reply]
My daughter just arrived when I was typing my previous entry, and asked if I had used the bluetooth headset when recording the commands, and the answer is no, I used the phone's mike. I'll re-record the entries with the bluetooth headset, and without the Ring before the names. I'd still like to hear if anyone has experience in using voice-activated calls for more than a couple of contacts, though. --NorwegianBlue talk 20:21, 31 July 2009 (UTC)[reply]

Indirect sharing of contact info

[edit]

On what social networking sites, if any, can I create a list of friends who can share my private profile with people I don't know, without allowing those friends to share the right to share the profile? NeonMerlin 20:37, 31 July 2009 (UTC)[reply]

Just to clarify, what you want is something like a way to set up specific groups that have "friends of friends" access, in the Facebook parlance? --98.217.14.211 (talk) 21:59, 31 July 2009 (UTC)[reply]
Note that this strategy is subject to the analog hole - (or rather, the digital hole). As soon as your data becomes viewable to others, they can copy it to some other unprotected system, and share it with others. Any copy-protection scheme is invariably prone to fail, because free information will proliferate. Such a system only functions as long as the data remains inside the closed system - which, by definition, is not closed, because you intend to allow "friends of friends" to view your data. You cannot vet these people for security clearance unless they are already in your "friends" group. Even then, you are assuming on good faith that they will not proliferate your data outside of the system you have asked them to use. I'm ranting here, but I'm still baffled how this minor bit of logic fails to register with the vast majority of Social Network users and designers. Nimur (talk) 00:12, 1 August 2009 (UTC)[reply]
But what they copy and share will be a static snapshot that can't be updated unless it's copied and shared again. So if you start getting e-mail spam and can find the "friend" responsible, you can cut them off and change your address. NeonMerlin 06:23, 1 August 2009 (UTC)[reply]

How to save a video clip to hard disk

[edit]

How can I save the video clip here http://news.bbc.co.uk/1/hi/business/8173285.stm to hard disk? My normal method of finding the .flv file in the cache does not work. 89.243.180.82 (talk) 20:41, 31 July 2009 (UTC)[reply]

BBC News has switched over from Realplayer to the same technology as BBC iPlayer; it uses a transport (and, it seems, encryption) mechanism that's much more sophisticated than the simple flash movie player used by, for example, YouTube. I'm not aware of any means of permanently storing iPlayer content. People in the UK can temporarily store iPlayer content with BBC iPlayer Desktop, but I don't know if that extends to video embedded in non-iPlayer pages, like BBC News. -- Finlay McWalterTalk 21:49, 31 July 2009 (UTC)[reply]
get_iplayer http://linuxcentre.net/getiplayer/ 87.194.213.98 (talk) 22:20, 31 July 2009 (UTC)[reply]

Thanks, I downloaded Get iplayer. But so far I have been unable to download the video clip linked to above - here's what I got:

"C:\Program Files\get_iplayer>get_iplayer --get --modes=flashhd,flashvhigh,flashh igh,iphone,flashnormal --type=tv --url='http://news.bbc.co.uk/1/hi/business/8173 285.stm'

get_iplayer v2.14, Copyright (C) 2009 Phil Lewis This program comes with ABSOLUTELY NO WARRANTY; for details use --warranty. This is free software, and you are welcome to redistribute it under certain conditions; use --conditions for details.

INFO Trying to stream pid using type tv INFO: pid not found in tv cache ERROR: Failed to get version pid metadata from iplayer site

INFO: No versions exist for this programme"

What command should I use please? 78.146.243.101 (talk) 19:23, 2 August 2009 (UTC)[reply]

From a quick look at the get_iplayer website, it doesn't look like it supports the BBC news site yet. You may want to ask the author if he/she would consider supporting it Nil Einne (talk) 19:34, 2 August 2009 (UTC)[reply]