Wikipedia:Reference desk/Archives/Computing/2008 January 17

Computing desk
< January 16 << Dec | January | Feb >> January 18 >
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.


January 17

edit

can I get there from here? A very small virtual machine just for a web browser.

edit

Can I get there from here? I'm running windows 2000 and would like a TINY (and I mean tiny) virtual machine running a web browser, I think Opera has the smallest footprint. I'm thinking of something that's a smaller image than Damned Small Linux. I want the emulation software to have a tiny footprint too.

If all I want is Opera running on a tiny stripped-down linux, and the former really doesn't have any dependencies (statically linked with QT, its gui framework) then could I fulfill my dream of a 20-50 megabyte image for that? Actually I just looked and DSL *includes* firefox in the fifty megabyte download, and also another tiny browser!

How would I go about getting DSL *without* the other stuff than a web browser?

Thank you! —Preceding unsigned comment added by 212.51.122.4 (talk) 00:21, 17 January 2008 (UTC)[reply]

You can check if Puppy Linux has a smaller one. Here there are some, with BareBones Puppy weighting 39mb only, although I am not sure if it even has a browser. If DSL works for you, you should keep it. -- ReyBrujo (talk) 03:10, 17 January 2008 (UTC)[reply]
Apparently, BareBones Puppy (per description at the wiki page) has no window manager and only the browser. That may be the smallest (useful) distro that you may find. -- ReyBrujo (talk) 03:18, 17 January 2008 (UTC)[reply]
Who needs a GUI? Use links or lynx --f f r o t h 03:07, 18 January 2008 (UTC)[reply]

Bash script help

edit

I want to make a very quick CPU benchark, and I came up with this.


 #!/bin/bash -e
 seq 1 $0 | factor > /dev/null
 exit 0


You time it, and it should give you a number you can compare with other computers. But it won't recognize the argument! Could someone tell me how to insert the first command line argument into the $0? Thank you. This is my first attempt at any kind of computer programming. —Preceding unsigned comment added by 76.239.184.49 (talk) 01:11, 17 January 2008 (UTC)[reply]

That is because $0 is usually the name of the program being executed. You want $1 instead. -- ReyBrujo (talk) 01:44, 17 January 2008 (UTC)[reply]
Worked beautifully, thanks. —Preceding unsigned comment added by 76.239.184.49 (talk) 02:02, 17 January 2008 (UTC)[reply]

Accessing router without browser

edit

The D-Link DI-524 offers a web interface to configure and query it. One of the status pages indicates the current wireless connections. I have been trying to access that information from the router without the web interface (with an API, a web service or command line) but haven't found anything. Does anyone know a way to access it without using the port 80? Thanks. -- ReyBrujo (talk) 03:16, 17 January 2008 (UTC)[reply]

Perhaps you should use the telnet command. type telnet, then router's IP, then the port you wish to use. Obviously not 80 or 81. That might be a beginning, it might not. Mac Davis (talk) 05:18, 17 January 2008 (UTC)[reply]
What do you expect to work? These routers are very very very simple devices and often have no form of communication besides HTTP (or UPNP if that counts). --Jmeden2000 (talk) 16:24, 17 January 2008 (UTC)[reply]
I nmaped the IP and got only ports 80 and 515 open. I was hoping there were some kind of API or at least some automatic way of querying information (more exactly, being notified every time a wireless device connected to it). Guess I will have to write some perl or python script to retrieve the page, parse it, and generate the information. -- ReyBrujo (talk) 19:39, 17 January 2008 (UTC)[reply]
Is there an "enable SNMP" option anywhere? --tcsetattr (talk / contribs) 21:52, 17 January 2008 (UTC)[reply]

Google questions

edit

I've got a site going and now I want to take care of two things, but I can't seem to figure out how:

  • I previously had an account with Google Adsense. I need to keep that account, but I also need to change the country of that account. Here is the answer how[1]. Except one thing— I'm supposed to email google about it, but they give no address. I can't find an address. Can you help? I can call headquarters soon I guess.
  • Those little abstracts under each site that comes up when you search for something in google— right now mine is horrible. It consists of the alternate text for an image. How can I get a nice description?

ThanksMac Davis (talk) 05:47, 17 January 2008 (UTC)[reply]

As for #2, my site's Google abstract is taken from a <meta> tag. Add something like this to the <head> section of your HTML on your index page: <meta name="description" content="This is what I'd like the abstract to say."> --24.147.69.31 (talk) 14:15, 17 January 2008 (UTC)[reply]

Kubuntu questions

edit

In Kubuntu 7.04, how do I set a mount command to always occur at startup? Also, is there a way to make sudone programs' KDE windows display differently from those of programs run from my normal account? NeonMerlin 07:24, 17 January 2008 (UTC)[reply]

Add the mount to /etc/fstab and enable the auto option. You can find a plethora of documentation how to do this if you search for fstab. —Preceding unsigned comment added by 88.75.77.106 (talk) 14:33, 17 January 2008 (UTC)[reply]
What do you mean "display differently"? If you mean have a different color title bar, talk to the window decorating people (Emerald). If you mean treating the window differently than others, ask the compiz people. If you mean putting a notice somewhere in the window, you'll have to get every program to do it individually and hope it looks consistent. A lot of programs do that automatically- I use xubuntu and Thunar (file manager) and Mousepad (text editor) both display a banner across the top alerting you when you're root. IIRC SUSE does the same thing with YaST- it gives you different options based on whether you're root or not, and puts a little red border around everything when you are. That's hardcoded into YaST though.. not a feature of the window manageer AFAIK. --f f r o t h 02:58, 18 January 2008 (UTC)[reply]

Video Cards

edit

How do I switch my video cards that are on my computer? —Preceding unsigned comment added by 64.119.61.7 (talk) 12:55, 17 January 2008 (UTC)[reply]

Assuming your computer actually has a video card (and not on-board video), you purchase a new one, put on your static-safety strap, open your computer, remove the old one (at most, it is held in with one screw at the back of the computer and a clip in the middle of the computer), put the new one in (reverse process of removing the old one), close the computer, turn on the computer, install the drivers for the new video card. Keep in mind that the video card you purchase must be compatible with your motherboard. For example, you can't shove an AGP video card into a PCI slot and expect it to work (or expect your motherboard to continue working). -- kainaw 14:31, 17 January 2008 (UTC)[reply]
Furthermore, some video cards require a separate power connection (or two--more expensive cards)--check the power supply requirements! Epylar (talk) 19:08, 20 January 2008 (UTC)[reply]

sorting problem (question moved from Language desk)

edit

hi. everyone.... i have some problem regarding sorting......


1.as we all know that we can search numbers in c and c# that user enters,is there any way by which i can files from harddisks by general coding........

2.similiarly we sort numbers in c and c#.which is the most efficient sorting that take min. time-:

a.)if numbers are sorted already
b.)if numbers are given in reverse sorted order  —Preceding unsigned comment added by Awdesh (talkcontribs) 13:16, 17 January 2008 (UTC)[reply] 
Look at disk IO operations, such as fopen and fgets. Those are used to read data from files. As far as sorting, the fastest "common" sort is quick sort. If the numbers are already sorted, it hits a worst-time that is no worse than the slow bubble sort. -- kainaw 17:41, 17 January 2008 (UTC)[reply]

Unexplained computer shutdowns

edit

My work computer has been subject to sporadic and unpredictable shutdowns since at least last November. I'm not doing anything abnormal on it other than work, Wikipedia, and downloading stuff now and then. I used to leave it on overnight then started powering it off before I left for the day, which seems to have made a slight improvement, but not much. The pattern of shutdowns that I started keeping track of is as follows:

11/27: 3
11/28: 1
1/9: 4
1/14: 2
1/16: 7

Yesterday was a record, with shutdowns occurring less than an hour apart. Been using a new surge protector since November at least. Phone and monitor are the only other things connected to it. I've never experienced this sort of thing with any other computer I've used. Other than switching out the HD, what could be causing these shutdowns? Anti-virus scans don't turn up anything. 47 out of 74 GB are free. BrokenSphereMsg me 17:01, 17 January 2008 (UTC)[reply]

You mean it's literally turning itself off, rather than crashing? Could be heat.. many computers shut down when they get too hot. Maybe the vents in the case are full of dust or something? Friday (talk) 17:22, 17 January 2008 (UTC)[reply]
I believe the IT guys raised the heat issue when I brought this to their attention. They did mention that they eventually had to switch out someone else's HD as it kept on shutting off, but his I think were more frequent. You can see that last December was trouble-free. This one will just completely shut off in the middle of any possible task. BrokenSphereMsg me 17:37, 17 January 2008 (UTC)[reply]
Hard drive? I can't see how this would be relevant. If your disk fails, your computer won't be able to work right, but it won't just turn itself off. It may produce errors and crash, but it should stay on. Or by "hard drive" do you mean the actual computer? I've heard the term misused this way before. Friday (talk) 17:41, 17 January 2008 (UTC)[reply]
It is almost always heat-related. The big issue is "why"? It could be a bad drive that is producing enormous amounts of heat. More common, one of the fans is flaking out and stops spinning. The little CPU fans are the worst for doing that. It is possible that the thermostat is bad and is reading high temps when the temperature is normal. It is possible that the power supply is failing and producing too much heat. It is possible that the heat sink on the CPU separated slightly, so it isn't cooling properly. All-in-all, this is one of the most difficult computer problems to fix because there are too many factors involved. When my computer did this, I replaced the whole motherboard, CPU, and fans just to take care of it in one fix. -- kainaw 17:45, 17 January 2008 (UTC)[reply]
When this used to happen to me, I got a vacuum cleaner and sucked ALL the dust out of my pc case including the power supply and the heatsinks (you'd be amazed how much dust can live in heatsink vanes') which fixed the prob instantly. I don't recommend this fix tho in all cases as some people have found that their vacuum cleaner wands can become statically charged when used, which isn't a good thing to be ramming into a pc. 86.21.74.40 (talk) 17:52, 17 January 2008 (UTC)[reply]
Sorry about flipping back and forth between terms. By "hard drive" I did mean the computer itself. I've had a spare computer sitting in my office for a couple months now as a backup, one of the older models without a CD burner. Before I switch out, as everyone's computer gets imaged as they call it, I want to get all my personal stuff off and wipe the history of what's been downloaded, which is another issue. BrokenSphereMsg me 17:56, 17 January 2008 (UTC)[reply]
Maybe the problem is electrical. I'm not really familiar with surge protectors, but maybe they just don't cut it. FWIW, I used to have a problem with my computer shutting down spontaneously. I got a UPS and I haven't had the problem since (plus, it allows some flexibility in case of a blackout). Or maybe the PSU is too weak. -- Meni Rosenfeld (talk) 18:04, 17 January 2008 (UTC)[reply]

If you have a can of compressed air or a hairdryer that blows out cold air, you might want to blow out the dust inside the casing of the computer (unless it is so gross that the dust would just float around). Just make sure to be safe and not touch any parts of the computer with the can or the hairdryer.

I know it is silly, but could you check the power connectors to see if any of them are shaky? Kushalt 18:02, 17 January 2008 (UTC)[reply]

If you meant the power cord, that is firmly in there now. BrokenSphereMsg me 18:17, 17 January 2008 (UTC)[reply]

Yes, its absurd, I know. However, it works in some cases. If you do not open the casing any often, I doubt that any internal connections are loose. If I were you I would just let sleeping dogs lie and not mess with the internals unless I knew exactly what I was doing (or I owned the computer;) ). Looking forward to your updates. I hope your problem will be solved soon. Kushalt 23:41, 17 January 2008 (UTC)[reply]

Idle time on Linux and Windows

edit

Are there any methods to finding the amount of time idled after a specific time? i.e. implementing something similar to a screensaver? In Linux, cat /proc/uptime gives me the uptime and total idle time but not the time idled from the last "non-idle" event. And I have no idea how to do this in Windows.

Any help would be appreciated. x42bn6 Talk Mess 17:49, 17 January 2008 (UTC)[reply]

What are you trying to do? The "idle time" reported by /proc/uptime is the time spent in the system idle loop, and is usually no more than a millisecond or two at a time. Even when your computer isn't "doing anything", it will periodically exit the idle loop to see if anything needs to be done, and if you're running an "idle monitor", that counts as "something to be done". --Carnildo (talk) 21:44, 17 January 2008 (UTC)[reply]
For example, I want to find out when a system has been idle for 30 minutes so I can execute another program. Kind of like a screensaver. x42bn6 Talk Mess 21:49, 17 January 2008 (UTC)[reply]
What do you mean "idle"? Devoid of mouse interaction or keyboard input? Try asking the X server, not the kernel --f f r o t h 06:32, 18 January 2008 (UTC)[reply]
Are you sure that's right? I thought it was interrupt-based. --f f r o t h 06:31, 18 January 2008 (UTC)[reply]
Yes, no user-activity. x42bn6 Talk Mess 14:52, 18 January 2008 (UTC)[reply]

HTTP Guide

edit

I have some 50,000 words I want to search for with Google. I'm completely new to HTTP, but managed collect enough information to write a C program for searching for a given word. The problem is an average search seems to require to receive about 20 Kbytes, and I'm only interested in the amount of hits the word gets. For example the following gives 243,000 hits and 17 Kbytes:

GET http://www.google.com/search?hl=en&q=ulkomainen
Host: www.google.com


As said, I don't know anything about HTTP. Also I almost copypasted the program from msdn, so something explaining how to just not receive some data would be useful. What can I do/read to get less bytes? --212.149.216.233 (talk) 18:26, 17 January 2008 (UTC)[reply]

When you read in the data, look for the phrase " of about <b>". The numbers after that are the number of estimated hits. Once you read in the number of estimated hits, close your http connection and go on to the next term. There's no law claiming that you have to read ALL of the data before disconnecting. -- kainaw 18:52, 17 January 2008 (UTC)[reply]
true, but unfortunately, the Google servers won't send this information back to the user character by character, so you're always going to get back extra information beyond the
tags that you are looking for. Actually, I didn't say this below, but your best bet may be to try and make a GET request for the Google WAP page - this has no images and is likely to be much smaller in terms of size. It would take some checking though to make sure that the hits returned are identical to the general Google search. Kavanagh21 (talk) 01:25, 18 January 2008 (UTC)[reply]

Is this an automated script? I thought Google provided API in google labs for developers who wanted to use google. Perhaps it is overkill in this case? Kushalt 22:57, 17 January 2008 (UTC)[reply]

  • I write similar stuff in Visual Basic - it depends on how you are accessing the data. If you are using Windows Sockets, then you could just collect the chunks of data you need, and then close the socket once you have all the information you want (using Winsock, data comes back as packets, which you can choose drop if not required). If you are using the Internet transfer control (or something similar), then you can't help but recieve all of the data from your GET request. The problem is, once you make the GET request to Google, their servers will fire back ALL the information on that HTML page, regardless of what bits and bobs you actually need. Kavanagh21 (talk) 01:21, 18 January 2008 (UTC)[reply]
You have to take the data and parse it for what you want. I don't use C but in PHP this is trivial—you read the HTML in as a string and then parse out the numbers you want. It's just string manipulation at that point. Note that if you IP makes 50,000 quick requests to Google it may block you; it is against their policy to make automated searches of Google without using their API (and registering with an API key), if I recall. --24.147.69.31 (talk) 03:59, 18 January 2008 (UTC)[reply]

Horror of horrors! What would I do if I were blocked from Google? My entire online existence would be at stake ... Kushalt 01:03, 19 January 2008 (UTC)[reply]

Last I heard, google had discontinued the use of the search API, so that route's a no-go.
I've written a script to do exactly this. (Matter of fact, it's running now.) Bear in mind (as 24 mentions) that google discourages (but does not outright prohibit) automated queries like this. I think their Terms of Service say that any automated queries must be limited to less than 1,000 per day or something like that. So it's going to take you at least 50 days to get all the counts you're looking for.
Bear in mind also that google word counts are not nearly as definitive as we'd like them to be (where by "we" I mean all of us who are desperately trying to use the counts to gather statistics or resolve word-usage questions even though the data really isn't good enough for those sorts of applications, nor indeed intended by google to be useful for those sorts of applications at all).
Yet another thing to consider is that google seems to tailor the estimated word counts, based on... something. I once noticed that the estimates differed by a factor of 10 based on which browser I used. It turned out that one browser had the cookie for my google userid and the other didn't. Why google would give me different counts when logged in as me versus anonymously is beyond me, but there it was.
As an indication of how variable google's word counts can be, here are counts for the words "the" and "cat" on various dates, culled from my data:
date the cat ratio
2006-09-24 14,530,000,000 686,000,000 0.047
2006-10-16 13,960,000,000 51,300,000 0.004
2007-11-23 4,940,000,000 416,000,000 0.084
2007-12-04 548,000,000 46,900,000 0.086
2007-12-14 1,220,000,000 51,400,000 0.042
2007-12-15 10,210,000,000 811,000,000 0.079
2007-12-19 9,900,000,000 811,000,000 0.082
2008-01-13 9,340,000,000 808,000,000 0.087
2008-01-17 9,450,000,000 808,000,000 0.086
I'm afraid the obvious conclusion is that google counts really aren't deterministic enough to do any kind of meaningful statistical analysis on. I wish it were otherwise, and I bet a bunch of other people do, too, but I really can't complain. (And if google ever did want to make this data useful to the people wanting it, clearly it would be much better to have a separate, simple "estimate word count" interface, so we didn't have to waste google's time doing dummy searches and our time ferreting out the count from all that "unnecessary" other stuff on the results page.) —Steve Summit (talk) 01:21, 19 January 2008 (UTC)[reply]
Commafied and aligned your table. --Anon, 03:38 UTC, January 19, 2008.

The results do always use "about" as in "Results 1 - 10 of about 127,000,000". Should we get a clue from that? Kushalt 01:00, 21 January 2008 (UTC)[reply]

Best Video Software

edit

What's the best video editing freeware? I'm hoping to find the equivalent of Audacity or GIMP, but for video instead of sound and images. Thanks. --71.117.42.164 (talk) 22:50, 17 January 2008 (UTC)[reply]

You might peruse Category:Free video software. Of those the ones that sound like what you might want are Jahshaka (Cross-platform), Kino (software) (Linux only), or Cinelerra (Linux and OS X). Like most free software, most of them suffer from poorly thought-out interfaces (programmers make lousy GUI designers), are somewhat slow and/or buggy, and have little to no documentation about them. (Open-source software's a great idea but cutting out the "management" level has its detriments. Programmers alone are not enough for complicated products designed to be used by people other than programmers.) --24.147.69.31 (talk) 22:57, 17 January 2008 (UTC)[reply]
Cinelerra is alright in the usability aspect. --antilivedT | C | G 23:01, 17 January 2008 (UTC)[reply]
Okay, thanks for your quick responses thus far. So am I correct in assuming that there is no editor that stands out from the crowd, such as Audacity or GIMP? --71.117.42.164 (talk) 23:23, 17 January 2008 (UTC)[reply]
My understanding of it—from a similar search I did a few months ago—was that there wasn't, though Cinelerra was more widely used than any other, I believe. But maybe somebody else knows better. --24.147.69.31 (talk) 23:35, 17 January 2008 (UTC)[reply]

Does a MS Windows port exist for Cinerella? Kushalt 23:37, 17 January 2008 (UTC)[reply]

Not according to our article. And sorry, I forgot to mention I'm running Windows XP. --71.117.42.164 (talk) 23:59, 17 January 2008 (UTC)[reply]

Enter Cygwin? Kushalt 02:53, 18 January 2008 (UTC)[reply]

Will Cinerella work under Windows XP if Cygwin is installed? Kushalt 01:00, 19 January 2008 (UTC)[reply]

Dear OP,

Have you ever considered dual booting between MS Windows XP and Kubuntu (or any other Linux Distro)? I think I can recommend a dual boot if you know what you are doing. Kushalt 13:11, 19 January 2008 (UTC)[reply]

I have never used it yet, but I think HandBrake deserves a try. Kushalt 20:17, 21 January 2008 (UTC)[reply]

iTunes update

edit

when an update for Mozilla Firefox or Thunderbird is released, there are release notes on their website that I can see. Does a similar thing exist for Apple iTunes for Mac? A cursory google search revealed non apple websites and the site:apple.com did not help much either. Kushalt 23:36, 17 January 2008 (UTC)[reply]

Apple do publish release notes for all their software updates on docs.info.apple.com. For example, there's a list of security update notes here. You can also access a link to the update notes in Software Update in Mac OS X. --Canley (talk) 23:47, 17 January 2008 (UTC)[reply]
Mac OS X checks periodically if any updates are required and shows you a list of the available updates. You can then decide how to proceed. I just checked myself and was informed that a 44MB update for version 7.6 was available.
Under the Apple menue, item "Sotware Update...". The item below, "Mac OS X Software", gets you to more detailed notes on the various updates available. --Cookatoo.ergo.ZooM (talk) 00:39, 18 January 2008 (UTC)[reply]

I see it now. Thanks a lot! Kushalt 03:03, 18 January 2008 (UTC)[reply]

If you have a choice, don't upgrade to itunes 7.6, it breaks the windows apps of the hymn project. Was about to buy an album when I noticed that.. they lost a customer. --f f r o t h 06:29, 18 January 2008 (UTC)[reply]

What is the Hymn project? Unless you are talking about this [2] (just googled it), I am completely blank on this one. (I do not have it on my computer.) I want to support the anti-DRM movement and so I do not buy DRMed music as far as practicable.

I saw that QuickTime was updated as well. Kushalt 00:58, 19 January 2008 (UTC)[reply]