Wikipedia:Reference desk/Archives/Computing/2010 February 14

Computing desk
< February 13 << Jan | February | Mar >> February 15 >
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.


February 14

edit

Booting from USB when it's not a BIOS option

edit

Here's an un-lovely question. I've got an old Dell Dimension 8100 with a Pentium 4 in it. I want it to boot from the external USB drive, and I have disconnected and tossed the internal PATA HDD. After formatting the external USB drive with Ubuntu, I reboot to find that the computer complains there's no hard disk. The BIOS boot sequence lists the grand total of boot possibilities as (1) floppy, (2) CD-ROM, and (3) HDD (not installed). "Surely, this being Linux," I told myself, "there must be a workaround such that I can leave a boot floppy or CD in the drive that loads barely enough Linux drivers necessary for it to "boot" from the external USB drive." Any hints? Comet Tuttle (talk) 00:00, 14 February 2010 (UTC)[reply]

Try SmartBootManager; this review suggests that you can make a boot floppy which pops up a menu that lets you continue to boot from other devices. I've not tried it; please let me know how you get on (assuming you survive). -- Finlay McWalterTalk 00:09, 14 February 2010 (UTC)[reply]
Or PLoP, which (unlike SBM) explicitly says it supports booting from USB on unsupported BIOSes. -- Finlay McWalterTalk 00:14, 14 February 2010 (UTC)[reply]
After some work, I've got it working, but it feels shaky. I've got a PLoP CD booting; I manually choose to boot from USB, and then it actually boots from the external drive. I had to delete a file in the GRUB directory that was halting booting as it complained about an inability to write to the drive. Once this boot sequence resulted in a system halt of some sort with a call stack, and once with a fsck and another system halt, and then the third time it seemed to boot fine. Thanks for the help! Comet Tuttle (talk) 21:20, 15 February 2010 (UTC)[reply]

Google Books previews

edit

Has Google ever released statements on why some public domain books are available only in part? I just ran across a book that was available only at "limited preview", even though its title page included a statement of "This book is not copyrighted and is placed into the public domain by Harvard Square Library", its publisher. Do they just not have enough server space to display it all? Nyttend (talk) 01:31, 14 February 2010 (UTC)[reply]

If the statement was in the book itself, Google's staff may just not have noticed it. Or, the publisher supplying the book may not have provided Google with a complete copy so that they could still try to sell it. If you're outside the US, you might try accessing it through a US open proxy; some countries have weird copyright laws that Google might still be in the process of navigating. NeonMerlin 01:43, 14 February 2010 (UTC)[reply]
I asked google this question about eight months ago and received a response confirming NeonMerlin's take:
Thank you for taking the time to contact Google Books support. As you have noticed, some public domain books which are available in full view in the United States are in limited display in other countries.
This is because for users outside the U.S., we make determinations based on appropriate local laws. As with all of our decisions related to Google Books content, we're conservative in our reading of both copyright law and the known facts surrounding a particular book.
Please be assured that we are working to include these works in as many countries as quickly as possible; we appreciate your patience.
The Internet Archive very often has avaiable texts for which google only offers a limited preview or no view at all. Right now they have 1,877,231 texts online. I've grown weary of waiting for google to make good their assurance. --Tagishsimon (talk) 02:09, 14 February 2010 (UTC)[reply]
Thanks for the points. I doubt that non-US copyright law would be relevant here, since I'm in the USA. I've checked for the book (Notable American Unitarians 1936-1961) at the Archive, but they don't have it. It was published in 2007; do they normally have such recent texts? Nyttend (talk) 02:43, 14 February 2010 (UTC)[reply]
If it's public domain as you say, they would certainly accept an upload, but of course you'd have to get it from somewhere in order to upload it. 66.127.55.192 (talk) 10:55, 14 February 2010 (UTC)[reply]
It doesn't really matter what the title page says if Google doesn't believe it's in the public domain. For example, the Google preview clearly says 'copyrighted material' and the page says "Pages displayed by permission of Lulu.com". Lulu.com is a selfpublishing website, apparently used Harvard Square Library [1] to publish their book and at a guess give an option for their clients to submit these previews to Google Books but Google Books will only display these as limited previews of copyrighted works by default. You could try writing to Google to tell them they can display the full version since it says it's in the public domain. However it's possible Google doesn't even receive the full version in which case telling them is no use and in any case I doubt it'll be easy to get to the right person. A better bet is to write to the Harvard Square Library and ask them if they'll be willing to submit the entire book to places like the Internet Archive, Project Gutenberg and Google Books presuming these websites accept self published books. However for your own personal purposes, from what I can tell the book is simply a book version of the website (it says it began online in both the book and the Google/publisher description) and the book even says there's a colour illustrated version on their website, so it seems to me it'll be easier to just use the website [2] which may be more up to date as well as being in colour as the book itself said. P.S. As a self published book and website, I would be careful about trying to use this as a WP:RS in articles Nil Einne (talk) 21:32, 14 February 2010 (UTC)[reply]

Why doesn't abs() return unsigned?

edit

In C's stdlib.h, why do abs() and labs() return a signed integer type, given that returning an unsigned type would eliminate the anomaly involving abs(INT_MIN) and labs(LONG_MIN) (and would make it safe to write (long)abs(x) instead of (long)(unsigned int)abs(x))? NeonMerlin 05:19, 14 February 2010 (UTC)[reply]

Are you saying you want "x = abs(y) - z;" to be a type error? Keep in mind that C's type system is very weak. 66.127.55.192 (talk) 08:03, 14 February 2010 (UTC)[reply]
That shouldn't be a type error (though abs(j) < i will get you a warning). There's a discussion at StackOverflow that suggests that C's type promotion rules (which make abs(j) - i legal) are the problem because they'll unexpectedly convert other signed values to unsigned. It's not a terribly strong argument, so I'd be happy to hear another reason. Paul Stansifer 13:54, 14 February 2010 (UTC)[reply]
There's a minimal speed gain in not checking for overflow every time. And maybe existing abs implementations were already doing it this way? --194.197.235.240 (talk) 15:47, 14 February 2010 (UTC)[reply]
That is a good argument, if you ask me. Consider:
int a = abs(-4) / -2; /* yields 0 if the result is unsigned, -2 otherwise */
On systems where INT_MAX < UINT_MAX, the following becomes implementation-defined:
int a = abs(0) - 1; /* this suddenly becomes implementation-defined */
The same is true for many other expressions involving abs, that would normally yield a negative value. decltype (talk) 20:15, 14 February 2010 (UTC)[reply]

Apple problem

edit

I have a new MacBook Pro and need to know please how to put a web page up into the tab bar at the top of the page. There are a number of addresses there already but I had a special address up there and it has disappeared. Help will be appreciated please. Thanks in anticipation.--88.110.51.49 (talk) 12:29, 14 February 2010 (UTC)[reply]

Assuming you are talking about Safari, Bookmarks > Show all Bookmarks, then edit the contents of the "Bookmarks Bar" (which is that tab bar your are referring to). --Mr.98 (talk) 13:41, 14 February 2010 (UTC)[reply]
Thanks for this, but the BookMarks Bar that I wish to add a page to is that one right across the top, and I cannot see how to "edit" that; any ideas please?--88.110.51.49 (talk) 13:46, 14 February 2010 (UTC)[reply]
I'm having a little trouble understanding what you mean. In Safari (the web browser), there is a Tab Bar which has active tabs only. I don't think you can make them permanent. The Bookmarks Bar is a thin line that you can enable (under View) to show up above the tabs. You edit those in the way that I indicated. Separate from that is a Bookmarks menu (which can be edited in the same way as the bar. If you are indicating that you had a tab open but it has closed, look for it in History. If there are too many tabs open and you can't find the one that should be open, click on the double-right arrow (>>) at the far right of the tabs. Does any of this describe what you are trying to do? --Mr.98 (talk) 14:41, 14 February 2010 (UTC)[reply]
SORTED! thanks Mr 98--88.110.51.49 (talk) 14:47, 14 February 2010 (UTC)[reply]

mapquest location

edit

Hello I run a business that is located at 450 saint peters howell rd saint charles, mo 63304 when I use map quest it shows my location 2 miles away how can I get location closer to hwy 94 Thanks Dan —Preceding unsigned comment added by 70.243.156.150 (talk) 16:31, 14 February 2010 (UTC)[reply]

Their website says that to fix business location errors you should visit www.mapquesthelp.com , where I can see a link about that problem. 78.149.145.203 (talk) 20:23, 14 February 2010 (UTC)[reply]

How do I skip (or automatically avoid) the MS Windows XP startup delay?

edit

When booting a PC it is annoying to have to wait the extra 15 seconds or so (it feels as if it were a full 59 seconds!), while Windows is showing the startup screen ("Windows XP ([...] edition))") with the "fake progress bar" below.

  1. How do I skip it at the time it appears?
  2. How do I configure the system to automatically avoid it at all times thereafter?

(I would prefer a general answer for MSWindowsXP, but one of the computers in question has: Microsoft Windows XP, Home Edition, Version 2002, Service Pack 3).
--Seren-dipper (talk) 18:47, 14 February 2010 (UTC)[reply]

There is no unnecessary delay. Windows NT startup process details the startup process - the Windows screen is displayed as the kernel starts, and while it is displayed various kernel services, drivers, and os services are started. If you put /noguiboot into your boot.ini then the screen itself is not shown, and instead you're shown a rundown of all the stuff it's doing; but this doesn't make things go any faster. -- Finlay McWalterTalk 19:10, 14 February 2010 (UTC)[reply]
True, but to answer the question in the classic way: Get a Mac (not that they boot faster, but at least mine is nearly never rebooted). Or install a lightweight Linux, where you can optimize the boot process to your hearts desire. I know 15 seconds total boot time is possible for 400 MHz embedded ARM Linux (because I met that requirement ;-). --Stephan Schulz (talk) 19:50, 14 February 2010 (UTC)[reply]
My Windows 7 machine is on in less than a second (from the hybrid power-save mode). I never preform "slow" reboots. --Andreas Rejbrand (talk) 19:53, 14 February 2010 (UTC)[reply]
If "Get Linux" was considered to be unhelpful I don't see why "Get a Mac" is any different. Both Windows and Linux have not required reboots for at least a decade now (seriously, the unstable Windows image is from Windows 9x, more than a decade ago). Similarly, hibernation and sleep have also been around on PC for almost a decade now (although support was slow to come). "Get a Mac" just for its hibernation/sleep ability is at best unhelpful, and at worst misguided and ignorant. --antilivedT | C | G 23:33, 14 February 2010 (UTC)[reply]
I have the same version of Windows you do. 15 seconds is lightning fast! Mine used to take several minutes. Do to a particular Windows Update which tackled this issue, it is now faster. If you use Ccleaner, then it may be best not to delete the "Old Prefetch data", or so it is said. I imagine the startup screen is just there while windows does things behind the scenes. I can remember computers like the Commodore 64], which started up as soon as you switched them on, so I too miss the quickness and simplicity of such machines. I would check to see which programs start up at startup, and disable those which are not needed. I have the freeware StartUp Control Panel 2.8 by Mike Lin installed, and have disabled everything from running at startup apart from my anti-virus. This causes no problems and the computer seems faster. 78.149.145.203 (talk) 22:28, 14 February 2010 (UTC)[reply]
Vanilla XP loads very fast; it's all the junk that you've installed that is slowing it down. Windows 7 is definitely much faster on reboot (technical story behind the reasons for this, which you can google), even with all the junk that I've installed... Sandman30s (talk) 09:48, 15 February 2010 (UTC)[reply]
If you can afford it, you could buy a solid state disk and reinstall Windows on it. The reason this helps is that a good portion of software start-up time is usually taken up by disk access delays, as the CPU waits for the mechanical drive head to move to the right position, and access time on a good SSD is orders of magnitude better than on a traditional hard drive. Once you get used to a SSD, hard-drive based computers feel quite sluggish. 80.186.158.218 (talk) 18:24, 15 February 2010 (UTC)[reply]
You could set it to hibernate as opposed to shutting off. In XP, it should be in Control Panel -> Power Options, or something of the like. You can set your tower's power button to hibernate the computer, and (possibly) set the shut down button to do the same. The only problem is that the shutdown and startup time is proportional to the amount of RAM you have, and your HDD's speed. I had a Windows XP Pro machine a few years back with 256 MB RAM and it took barely 20 seconds to hibernate and 15 seconds to start up. I still use hibernation now, with a Vista Home Premium x64 machine with 4GB of RAM, and it takes about 2 minutes to shut off and 1 minute to turn on, as opposed to 2 on and 4 off. However, if you do hibernate your PC, make sure you restart it after the PC's uptime (viewed in Task Manager) reaches around 60 hrs, because then applications can behave erratically.Hmmwhatsthisdo (talk) 04:15, 19 February 2010 (UTC)[reply]

How to get Mplayer to work?

edit

I'm using WinXp, with MPlayer already installed. User Reisio has kindly previously given a command which he indicates will record a video from on-screen. (It has to be recorded from the screen, because the stream is encrypted, and no work-around downloader exists.) I can forsee there's lots of room for misunderstanding, as I don't understand a few things.

The command was "mplayer -playlist -dumpstream URIhere -dumpfile foo" and Reisio adds "occasionally you will not want -playlist".

The things I don't understand are: 1) What is "URI" in "URIhere"? Is that the same as an URL? Should I put the URL of the webpage the video is playing in there? Or something else? 2) Do I need to replace "foo" with something, or should I leave it alone? 3) Where will the video file be downloaded to? 4) I tried putting the command string in the Run box (with the webpage URL included) and windows said it could not find "Mplayer". I tried "C:\Program Files\MPlayer for Windows\mplayer.exe....." and then Windows said it could not find "C:\Program".

Could anyone help please? I have Firefox, as well as IE8, installed and I'm willing to instal any other no-cost browser or software if it helps. Thanks 78.149.145.203 (talk) 20:16, 14 February 2010 (UTC)[reply]

1) All URLs are URIs; the difference isn't important here. My guess is that that's supposed to be the URI of the stream, (which won't be the URI of the page that plays the stream). 2&3) foo is the name of the file it will save it to; you can change it to something more sensible. 4) Do Run > "CMD" to get a command prompt. First, run the command cd "C:\Program Files\MPlayer for Windows" so that the program name "mplayer" is meaningful to it. Paul Stansifer 22:27, 14 February 2010 (UTC)[reply]
^ that ¦ Reisio (talk) 04:02, 15 February 2010 (UTC)[reply]

would a full hd screen look better than one with 33% better more pixels in each direction both vertically and horizontally?

edit

ie apple 21.5" vs. 27"? I mean when playing full hd content? thanks 82.113.106.103 (talk) 21:15, 14 February 2010 (UTC)[reply]

The displays are both 2D so they aren't better in the 3rd dimension (the screen itself may have different thickness but that's not going to make a difference to playback in itself). It'll also likely depend on what you mean by 'better'. If you simply mean bigger then you should use that word Nil Einne (talk) 21:37, 14 February 2010 (UTC)[reply]
Um, I meant that the 21.5" iMac has a resolution of 1920 x 1080 pixels which is exactly FULL HD, pixel-for-pixel. If I watch HD content on it, it would be pixel-for-pixel the exact HD source, no upsizing, downsizing, nothing. Now, the 27" iMac is exactly 2560 x 1440 pixels. This is 1/3 more pixels in each directin (2560/1920 = 1/3 and so does 1440/1080). If I watch HD content on that, it will no longer be pixel-for-pixel the HD content; instead it will be upscaled by 1/3 in each direction. So, my question is: as a result of this upscaling, will the viewing experience be worse, despite the larger screen, due to the upscaling artifacts? Thanks for now udnerstanding my question and trying an appropriate response. :) (I've also updated "each direction" in my question to vertical and horizontal.) 82.113.106.103 (talk) 22:18, 14 February 2010 (UTC)[reply]
The answer is probably not, at least not because of the size difference. On the 27 inch screen the HD content is just stretched to fill the screen as there just aren't any extra details, so unless you are sitting so far away that you can't see the details on a 21.5" screen the 27" screen is just a blown up version of the HD content and allows you to sit further away. However, the 27" screen is supposedly very good (although I can't tell too much difference from my brief time playing with it) so it may look "better", but not because it has a higher resolution. --antilivedT | C | G 22:22, 14 February 2010 (UTC)[reply]
what I'm getting at is that it's "blown up" but not by doubling the pixels or anything. Instead, it is blown up in a less natural way. Normally, I can very much tell the difference, on first sight, between content that is playing 1:1 at the resolution of the source, and content that has been "blown up". The only exception is when the pixels are just doubled in each direction, it can look just as good from a moderate distance, at least so far I have seen. My question is whether I would see the same effect on the 27" iMac? Now, I'm very interested in what yu heard about the 27" screen being "very good" -- can you elaborate on that? Is it "very good" in a way that the 21.5" screen isn't? Thank you very much. 82.113.106.103 (talk) 22:45, 14 February 2010 (UTC)[reply]


ps you said "probably not, at least not because of the size differences." I really didn't mean the size differences, I mean the resolution differences. I mean, if you're taking - this is a simplifying example - 9 pixels by 4 pixels and trying to display it on 12 pixels by 6 pixels in the SAME size, it's obvious you can't actually do it. Let's look at the first line, you call the pixles ABCDEFGHI. Now you want to go from that, the source, to displaying ABCDEFGHIJKL. What do you put in JKL? If you don't crop, leaving A and KL empty, what do you do? You can't just double any of the existing pixels, it would ruin the picture? So, you have to do something very ugly instead. I feel the same thing must be going on in each line when you go from the source, Full HD at 1920 pixels per line, to 2560 pixels per line. What do you put in the extra 640 pixels? You can't display each pixel in the source twice, and you can't just double some pixels but not others... so instead, you have to do something very ugly, don't you, to blow up by that 1/3? This is my impression is of what would have to happen, and I would just like some confirmation on it. Thank you. 82.113.106.103 (talk) 22:58, 14 February 2010 (UTC)[reply]

Modern interpolation work pretty well in my opinion. From my experience of playing 720p on my 1200p screen I can't tell too much difference between stretched 720p and 1080p versions. If you want to know more about how they do it, read interpolation and specifically Image scaling. The main reason why something looks sharper when played at native size as opposed to stretched to full screen is that the full screen version now covers a larger area, but there's so many points of information. If you simultaneously stand back a bit so that it occupies the same field of vision as the native size you'll find that you it's not very different to the unscaled version. And the new iMacs (both 21.5" and 27") use IPS panels now, which is similar to the old 24" and much more vibrant than the old 22" or your normal run of the mill TN panel monitors. --antilivedT | C | G 23:08, 14 February 2010 (UTC)[reply]
Native resolution is relevant. I bet it looks worse, yes, inevitably. Whether it's worse enough for you to detect on an ongoing basis is another matter. I'd look in particular at scenes that fade to black, which for me scream "artifacts!" Comet Tuttle (talk) 23:18, 14 February 2010 (UTC)[reply]

Automatically set formatting options when pipelining

edit

Do any shells or shell add-ons for GNU/Linux have the ability to automatically add formatting options to a command if its output is going to a pipe and won't otherwise match the second command's expectations? (E.g. change ls | xargs to ls -Q | xargs.) NeonMerlin 21:54, 14 February 2010 (UTC)[reply]

I can't think of anything to do what you specifically want, but you might be interested in the find command, which is a bit of a pain to use, but can often automate a whole complicated operation in a directory hierarchy; something like find . -maxdepth 1 -exec some_command {} \; executes some_command on everything in the current directory, and leaving out -maxdepth 1 makes it recursively visit subdirectories also. Paul Stansifer 22:14, 14 February 2010 (UTC)[reply]
There are a few pre-installed *nix commands that will format in from stdin and out to stdout inline like what you want. List of Unix commands has quite a few of course, but off the top of my head some useful ones are: tr, grep, sed, comm, expand, paste, unexpand, and sort. Of course you can do almost anything if you upgrade to a scripting language, including perl or awk, or even sed. Shadowjams (talk) 16:09, 15 February 2010 (UTC)[reply]

CRT vs LCD

edit

I have a normal 15" CRT monitor. It is quite clear and OK. But I heared that LCD monitor is even better. Is that so ? I mean has it more or less or equal pixels. Is overall performance i.e. picture quality real better or does the LCD sacrifice quality for sake of eye-safety, I mean using LCD won't I find things a bit dimmer than CRT ?  Jon Ascton  (talk) 23:49, 14 February 2010 (UTC)[reply]

I have used nothing but LCDs for many years now (as have most computer users, I believe), and they are generally far superior. First of all, the picture is stable (Swedish: bilden flimrar inte), and the screen is perfectly flat. In addition, on a LCD each pixel has its own space, so there cannot be any problems with the geometry of the picture, especially if the LCD is connected via a digital cable (e.g. DVI). Furthermore, LCDs are much smaller and nicer, and do not consume as much power as CRTs. The physical resolution (number of pixels per inch) is about the same. However, LCDs have minor drawbacks: First of all I believe that the colour representation might be a bit worse on cheap LCDs (TN panel LCDs) as compared to (more expensive?) CRTs. Also, you often cannot view the image of a LCD at an angle of 80-90° from the normal. (But that you cannot do with a CRT either, because it is not flat.) --Andreas Rejbrand (talk) 00:14, 15 February 2010 (UTC)[reply]
I mean, for almost everyone, I would strongly recommend a LCD rather than a CRT... --Andreas Rejbrand (talk) 00:15, 15 February 2010 (UTC)[reply]
Yes nowadays the contrast ratios and brightness (compare LED) of most LCD's are good enough. Refresh rates are generally good enough for rapidly changing frames (games, movies) and ghosting is a thing of the past. The future holds exciting prospects such as 3D screens and holographic emitters. CRT's have gone the way of the junkyards and are contributing to landfill problems worldwide... Sandman30s (talk) 09:41, 15 February 2010 (UTC)[reply]
At least in Sweden you cannot even buy CRT computer screens anymore... --Andreas Rejbrand (talk) 19:31, 15 February 2010 (UTC)[reply]
Having switched to LCD from CRT, I'm happy that I no longer may be getting a face full of X-rays. Its said that the most recent CRTs didnt give out much X-rays, but you can never be certain. 78.149.185.159 (talk) 20:17, 15 February 2010 (UTC)[reply]