Wikipedia:Reference desk/Archives/Computing/2009 June 23

= June 23 =

Hot pluggable SATA/eSATA
Something that's not obvious from the articles on hot swapping and SATA... maybe someone can comment here, find cites, or update the articles with useful information.

SATA itself by design is hot swappable, and yet there is minimal to no clear answer in the wiki as to when and under what conditions a user can actually use that capability. For example:


 * Under which operating systems?
 * Which kinds of drivers, BIOS features, or specialized bridge/interface chips or cards are required?
 * To what extent is effective hot swappability available in mainstream PCs using a SATA hard drive?
 * Does unplugging or connecting a SATA drive to a modern power supply cause transients that may crash or harm the system? if so how does one power an external SATA drive (hot swapped or otherwise)?

FT2 (Talk 00:23, 23 June 2009 (UTC)


 * I have used SATA hot swapping in winxp, using various SATA HDD's (manufactured in 2006 and later). Motherboard chipset was some nvidia Nforce4 ultra (probably)(it certainly was nforce4 and there were no SLI)(amd cpu). Hot plugging did not work on intel chipset (875P).
 * I have never used any specialized interface cards. I have not tried plugging in or pulling out, without OS loaded (if that was meant). In windows, this probably requires chipset drivers to be installed (but it is one of first thing to do after windows reinstall, anyway).
 * Availability of hot swappability in mainstertam PCs depends solely on chipset support.
 * Unplugging and especially connecting SATA drive to power does causes transients, but these have not crashed system yet (i have been usin this time by time for about a year)(since february once in 2 weeks or so).
 * -Yyy (talk) 12:54, 25 June 2009 (UTC)

NT CMD peculiarities
I have encountered some strange behaviour with NT command files. I have reduced the batch file to the following

if "1" == "1" (   set VARIABLE=C:\myprog\bin    PATH %VARIABLE%;%PATH% )

if you put that in "test.cmd" then execute the followng DOS commands:

C:\>set VARIABLE=WRONGVALUE C:\>test.cmd

The value of variable will be set properly:

C:\>set V VARIABLE=C:\myprog\bin

but the path will be set using the old value:

C:\>path PATH=WRONGVALUE;C:\WINDOWS;C:\WINDOWS\system32

Why is this, and is there a better work-around than using a "call" to a label, as in the following working example:

if "1" == "1" (  call :setup ) goto :eof :setup set VARIABLE=C:\myprog\bin PATH %VARIABLE%;%PATH%

I would like to understand what's happening, because I found the work-around by trial and error and a propper understanding would avoid future errors. -- Q Chris (talk) 08:36, 23 June 2009 (UTC)


 * What's happening is that cmd.exe substitutes %variables% in the whole IF statement, including the body, before any part of it is executed. A hacky workaround is available (see here) but you might just want to use a goto. -- BenRG (talk) 11:43, 23 June 2009 (UTC)


 * thanks! -- Q Chris (talk) 12:22, 23 June 2009 (UTC)

Capitalizing a list
How can I capitalize a list of words? (only with Open Office, grep, sed, if possible).

Can I use some sort of variable with grep or sed?

For example: sed will substitute s/word1/word2/g along the document, but what if I want to mark up a word that ends in 'ing'? Can I just have a variable like s/word1/word1AgainButWithMarkUP/g. In the first case we already know what we are substituting, in the second not.--Quest09 (talk) 10:40, 23 June 2009 (UTC)


 * With Open Office 3.0 (assuming they are in a list):
 * select the list, right click and select "Character", under "Font Effects" select "Capitals" under "Effects".
 * Even though it doesn't show in the preview it's there when you apply the styling. If you want to do it the terminal way you can do . --antilivedT 11:06, 23 June 2009 (UTC)


 * Thanks, but what if I only want to capitalize the first character?--Quest09 (talk) 11:43, 23 June 2009 (UTC)
 * The Open Office solution also didn't work, since I couldn't save it as text.Quest09 (talk) 11:57, 23 June 2009 (UTC)


 * Use sed:  (hint, when trying to replace stuff in text files, there is almost always a sed way to do it.) --  k a i n a w &trade; 11:54, 23 June 2009 (UTC)


 * Thanks you kainaw, for the solution. The first two solutions above didn't work.--Quest09 (talk) 11:57, 23 June 2009 (UTC)


 * Yes yes I get the point, you meant the OTHER "capitalize"; no need to rub it in! And no, OOo Writer definitely can save as text, that's pretty much its whole point of existence. --antilivedT 12:13, 23 June 2009 (UTC)
 * OO can save as text. But effects like the one above won't get saved as text.--Quest09 (talk) 12:54, 23 June 2009 (UTC)

Two messenger accounts,one i want hidden
I have two accounts(handles) on msn and when i go to sign in they both appear and give me a choice of which one to use.The problem is i want one of them to be hidden to other users on my computer so they dont know of my 2nd handle,how do i do this?
 * Instructions here. It's slightly different in Vista - you shouldn't need to click Change an Account first. 'Manage your network passwords' is listed down the left. — Matt Eason (Talk &#149; Contribs) 19:43, 23 June 2009 (UTC)

Preparing a square-pixel image for DV NTSC video
Hello,

I've read in numerous places (e.g. in the user manuals for Final Cut Pro and Adobe Premiere ) that if you're producing a typical image on a computer (i.e. an image that uses square pixels) but you want to use the image for DV NTSC video (the type that uses non-square pixels with an aspect ratio of 10/11 and an equivalent square pixel resolution of 720x480) you should make the image resolution 720x534 (in terms of square pixels) to avoid distortion when the image is displayed on a non-square pixel device (e.g. a standard 4:3 television). I understand the rationale behind this, but I can't figure out why the recommended square-pixel image dimensions are 720x534. If anyone could show the calculation(s) behind this suggested square pixel image resolution, I'd be interested to see it. I suspect that it might involve some simple rounding/truncation (similar to this, although with vertical scaling, not horizontal), but 534 seems a rather specific result for that type of thing.

Any assistance would be appreciated.
 * Does this help it seems that there are 720 horizontal samples - so I guess the idea is to retain that sampling rate, and alter the vertical resolution (rather than vice versa) - at least that's how I read it.
 * It goes on to say that only 712 out of the 720 horizontal samples are used - and 712/534 = 4/3 exactly. I would assume (unless I've misread) that the 720x534 includes the blank samples. Also I thought 720x534 was for square pixels, not non-square.83.100.250.79 (talk) 19:18, 23 June 2009 (UTC)


 * Hmm, that site seems to directly contradict the various user manuals I've read (see the link to the Adobe Premiere manual above) in that it recommends using a square pixel image of 720x528 (not 720x534) for use in DV NTSC (720x480) video (it recommends 720x534 for D1 NTSC video). I think they got 528 by taking $$\dfrac{11}{10}480$$, which certainly seems logical. However, since that site's the only place I've seen 720x528 square pixel images recommended for use with 720x480 DV NTSC video, I'm inclined to think they're making a mistake (I would imagine that Apple and Adobe would get the recommendation right). This site states that, for 720x480 DV NTSC video, the "active area" is 710.85x486, so perhaps 534 is arrived at via $$\dfrac{11}{10}486$$ with the decimal point truncated. However, even if that's the case, it seems odd to use that number instead of the 480 lines that are actually present when DV NTSC video is copied onto a computer.
 * EDIT: I think the difference between the 528 vs. 534 recommendations is simply due to precision. $$\dfrac{10}{11}=0.90909...$$, but apparently this value is often just treated as 0.9, which would result in $$\dfrac{480}{0.9} = 533.3 \approx 534$$ (as opposed to the more precise $$\dfrac{11}{10}480=528$$). So, the site recommending 720x528 for 720x480 video is probably correct, while the image size of 720x534 recommended by Apple and Adobe is close enough to appear properly scaled, but not strictly correct.
 * I don't see any contracdiction (or mistakes in the official documentation) - just to repeat what I suggested using 720x534 square pixels for a 4:3 NTSC image doesn't require any rounding errors etc if you assume that the 720x534 image includes the unused samples. ie only 712 of the 720 lines actually have data in them : 712/434 = 4/3 (no rounding)
 * Thus the digitised image of the 'film' is exactly 4:3, but the overal image would be slightly out, due to the blank lines.
 * The only thing that isn't explained by that explanation is why the blank samples are included, ie why 712x534 is not used instead.
 * You could try the conversion to 720x534 and look at individual frames - if there are 8 blank vertical lines in the digital frame then this will confirm that the aspect ratio is being converted absolutely accurately.83.100.250.79 (talk) 15:49, 24 June 2009 (UTC)

Online translators
Nice short question but how do online translators work? BigDunc Talk 17:35, 23 June 2009 (UTC)
 * The article on machine translation has a good explanation. At its most basic level, though, they use a dictionary to change one word to another, combined with rules on what order words should go in. :) A le_Jrb talk  17:38, 23 June 2009 (UTC)
 * Some also use a statistical (sort of matching words in common texts) method - notable google translate - it's one to watch out for because it turns up some weird spuria such as converting "de" to "en" in a german to english translation - when of course de should stay as de...83.100.250.79 (talk) 19:13, 23 June 2009 (UTC)
 * Some also understand words that have their suffixes changed, in inflected languages. Others do not. Some come out with every second word left in the original language. If you use Firefox, try downloading FoxLingo which uses up to 6 different on-line translators at a time (for any given language pair), either for a webpage or selected text. It is quite interesting how different the various translations are. (It also saves a lot of googling if you need a snippet of an obscure language translated). - KoolerStill (talk) 01:07, 24 June 2009 (UTC)

Monitor problem
The last couple of days, when I first boot up in the morning, I only see brief flashes of the screen, each time the display is supposed to change. After several reboots, it's okay again. Is there anything I can do to make it stop doing this? I'm on Vista Home Premium SP1. Clarityfiend (talk) 19:41, 23 June 2009 (UTC)


 * You will dislike me strongly for asking you this, but the first question is whether you have checked that both ends of the power cable are firmly seated, and whether you have checked that both ends of the video cable are firmly seated, preferably by unplugging each of the 4, and then re-plugging each in firmly. Tempshill (talk) 20:41, 23 June 2009 (UTC)
 * (Along the same lines try wiggling the cables just to make sure there isn't a loose connection in the wires)


 * Here: mentions "Apollo motherboard used in the HP Pavilion dv2000, 6000 and 9000 series". Does that sound similar to yours?
 * The standard response is "update your video drivers" since the video card/drivers will be starting up/changing resolution as you go through the startup process this sounds like it might be something to consider.
 * As the computer boots the bios / vista is loading etc screens only display for a short period of time (flashes) - is that right? So the screen is effectively black the rest of the time? Does the computer successfully boot anyway?83.100.250.79 (talk) 21:15, 23 June 2009 (UTC)
 * It's an HP Pavilion. Your description of what it does is spot on. I guess it boots all right, since I hear the little fragment of music it plays when it reaches the login screen. I'll try updating my drivers and maybe the suggestions from that link. Thanks. Clarityfiend (talk) 21:48, 23 June 2009 (UTC)


 * Something else to consider, have you got another monitor you could try it with? The reason I ask is because it could be that the monitor is on the way out and it might be that the "After several reboots, it's okay again" is actually nothing to do with the software, but by this time the monitor has warmed up and the problem has gone away. ZX81  talk  00:25, 24 June 2009 (UTC)
 * Do flat screen monitors need to warm up? Clarityfiend (talk) 07:29, 24 June 2009 (UTC)
 * Not really (as far as I know) - I think the suggestion is that a faulty monitor may work when warm (could be due to expansion of faulty solder joints or something) - since what you are experiencing sounds more specific than simply "an erratic display" it's probably not an issue here.83.100.250.79 (talk) 15:51, 24 June 2009 (UTC)
 * I'd agree that it's unlikely to be the monitor, but if it's tested with another monitor and the same problem persists then at least it can be ruled out. After all just because it's unlikely, doesn't mean it's not impossible and when deducing any fault nothing should be assumed. ZX81  talk  16:57, 24 June 2009 (UTC)
 * Interesting. I turned on my PC this morning and the same thing happened, but I got called away before I could do anything. When I came back later, the screen was working, so maybe it does need to warm up. Clarityfiend (talk) 02:55, 25 June 2009 (UTC)