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

= February 14 =

USB cords
Why do USB extension cables often have a big cylindrical piece about an inch from the plug? My Firewire cables don't seem to have such a thing but many of my USB cables (extensions, mouse cables, etc.) do. What's their purpose? Just curious. --98.217.14.211 (talk) 01:02, 14 February 2009 (UTC)


 * They supposedly reduce interference. Buffered Input Output 01:11, 14 February 2009 (UTC)


 * Yes - it's a Ferrite bead. SteveBaker (talk) 01:20, 14 February 2009 (UTC)


 * Interesting—thanks! --98.217.14.211 (talk) 01:42, 14 February 2009 (UTC)

Viewing 'hidden files' on Vista
I have a file that was sent to me, and for some reason it has 'hidden files' on it. I have asked the sender to tell me how to view them, but he doesn't speak English very well and I am none the wiser even after his advice. So, how do I view hidden files on a Vista (Home Premium) machine?--KageTora (talk) 01:58, 14 February 2009 (UTC)


 * I don't know whay you mean by saying that a file has files on it. But perhaps "file" was a typo for "CD" or similar; anyway, you have hidden files. Is the problem one of seeing them listed properly, or of actually seeing their content? If it's the former, and if you're using Explorer, you configure Vista to let you view [the presence of] hidden files. If you can see that they are there but want to look at them (e.g. to view hidden JPEG files) then you'll normally have to change their attributes ("unhide" them, and perhaps "unsystem" them too) before doing this. -- Hoary (talk) 02:25, 14 February 2009 (UTC)


 * That is what I want to do. Now, how do I do that?--KageTora (talk) 02:36, 14 February 2009 (UTC)


 * This article, third from the top in a Google search for "vista hidden file", says: Follow these steps to display hidden files and folders.
 * Open Folder Options by clicking the Start button, clicking Control Panel, clicking Appearance and Personalization, and then clicking Folder Options.
 * Click the View tab.
 * Under Advanced settings, click Show hidden files and folders, and then click OK.
 * –  7 4   03:17, 14 February 2009 (UTC)


 * Sorry I couldn't be more specific; I wasn't (and am not) using Vista when typing, so it was from memory. If you're going to follow the procedure described immediately above, I suggest that you also take that opportunity to ask Windows not to conceal recognized file extensions. (I don't know the exact name of this option but it should be easy to find.) Thus myhappyface.jpeg will appear not as myhappyface but as myhappyface.jpeg. When I use Windows, I find extension-hiding most annoying, because when I need the exact name of a file I have to guess what it is (in this example, whether it's JPG, jpg, jpeg, JPEG, or something else). -- Hoary (talk) 03:25, 14 February 2009 (UTC)


 * I'm not accusing anyone of anything - but if I got files via email, and they were tagged with the hidden attribute - I would delete them immediately. (or at the very least treat them as possible virus/malware threats) - Better safe than sorry.  If it's just wanting to view various hidden files - see above post. — Ched (talk) 05:23, 14 February 2009 (UTC)


 * It's good policy to treat *every* file sent via email as suspect, regardless of the hidden attribute. If you weren't expecting the file, or if there is any doubt that it is legit, don't open the attachment. Your computer (and whoever does your tech-support) will appreciate it. –  7 4   06:07, 15 February 2009 (UTC)

programming in 3 dimensions
will i be able to combine AutoCAD and Visual basic? i want to create a program which can predict the trajectory of an object with a specific velocity that passes by earth. I want to do that in 3 dimensional space. if not, will i be able to create a 3 dimensional space in VB? if not, please specify the application with which i can--Harnithish (talk) 08:38, 14 February 2009 (UTC)
 * You can simulate 3D space in any Turing-complete language (I don't know VB, but if I recall correctly it supports floats natively as well as classes, so you should be able to do that without too much difficulty). The problem would be rendering it; I'm not sure if AutoCAD will play nicely with VB, but you can achieve your stated goal (albeit perhaps more laboriously) in VB itself (combined with something like Microsoft XNA). -- Aseld  talk  09:02, 14 February 2009 (UTC)


 * (After edit conflict)Using visual basic to modify the behavior of AutoCAD requires that AutoCAD has an API that you can access with Visual basic. I suspect you can do so through it's .NET API.  Visual basic is turing complete, so yes you can program the calculation in it.  However both of these solutions are going to be very difficult.  If I where you I would seek a program that has built in capability of solving differential equations, and preferably graphing support.  Fortunately this is precisely the tasks of a Computer algebra system. Taemyr (talk) 09:05, 14 February 2009 (UTC)


 * Agreed. While it's possible in VB, using a CAS as suggested by Taemyr would be much easier. (Didn't think of suggesting an alternative in my original post). -- Aseld  talk  09:12, 14 February 2009 (UTC)

Avoiding Element overlap in IE
Hello,

I spent most of yesterday playing around in Firefox and eventually got my menu bar to look (more or less) how i wanted it to.I then opened it in IE and, surprise surprise, it looked really messed up! Basically, for sylistic reasons, different 'items' in the menu bar are styled differently. Orginally, both Firefox and IE made both items overlap rather than sit side by side. to get around this, I put both sections into a separate Div tags, whcih seemed to solve the problem in firefox, but made it 1000 times worse in IE. Does any one know any suitable IE workarounds? (I'm still learning this crap stuff, so please feel free to lay into my code, which is below). Obviously, my valentines day is getting off to a great start!

HTML of the 95% working firefox version:

  Home 

Services   1  2  3  </li>

How I work <ul> <li> 4</a></li> <li> 5</a></li> <li> 6</a></li> </ul> </li> Get In Touch</li> </li> </ul>

and the CSS is here:

ul { margin-left: 10%; list-style: none; font-family:Verdana,sans-serif; font-size:12px; font-weight:bold; padding:0px 0; }

background:#DDDDEE; border-color:#777788; border-style:solid; border-width: 1px; margin-left:auto; padding:3px; text-decoration:none; width:222px; text-align:center; }
 * 1) navbar li#a {

border-color:#777788; border-style:solid; border-width: 1px; float:left; padding:3px; text-decoration:none; width:222px; text-align:center; }
 * 1) home{background:#DDDDEE;

li#current { position:relative; background:white; border-style:solid; border-width: 1px; border-color: black black white black; padding:3px; text-decoration:none; width:222px; text-align:center; float:right; margin-right: 217px; margin-left:0px }

float: left; position: relative; width: 10em; }
 * 1) navbar li {

display: none; float: none; width: 50px; margin-top:30px; list-style: none; left: 0; border: none; padding:3px; }
 * 1) navbar li ul {
 * 1) navbar li#a:hover ul { display: block;}

Many thanks, (and apologies for wikipedia's bizarre formatting - i don't know what's going on!)79.121.131.201 (talk) 12:48, 14 February 2009 (UTC)


 * Well, for starters your html is invalid - you've got one too many close li tags, and you close the outermost div and ul in the wrong order. While browers differ about how they handle correct html and css, they tend to differ much more about how they handle incorrect code. It's always a good idea to check your code with a validator like the W3c one before trying to fix browser inconsistencies.  I'll take a further look at your code shortly. 87.112.81.29 (talk) 13:03, 14 February 2009 (UTC)


 * This is true, but you're actually not allowed a div within a ul at all - the only valid children of a list are list items. You can have a div within a li, though. — Matt Eason (Talk &#149; Contribs) 14:10, 14 February 2009 (UTC)


 * After that, I can't entirely figure out how you want it to look - do you want all the options in a bar at the right of the screen? If you could upload a sketch or a screenshot to photobucket then that would make it easier to help you.  87.112.81.29 (talk) 13:22, 14 February 2009 (UTC)


 * And if you don't want home to be on top of the other menu stuff (which I guess you don't, given that you float it left rather than right) then don't have it inside the outermost ul at all (if that's what you want, you don't need the outermost ul at all), and you don't need to float it (it'll just be the first thing on the page). 87.112.81.29 (talk) 13:36, 14 February 2009 (UTC)


 * General advice: IE has two different rendering modes: 'standards-compliant' mode (which is *not* the default, but might or might not be in IE8) and 'quirks' mode (for rendering pages that were designed to compensate for the prior versions' layout problems). If you're designing new code for IE, you almost invariably want to include the magic to switch IE into standards-compliant mode. –   7 4   13:23, 14 February 2009 (UTC)


 * That's sage advice; even if you didn't care about IE in particular, the doctype helps browsers and validators understand your html properly. It's always a very wise idea to fix all the warnings and issues that a validator brings up, as even the most trivial things can make browsers behave differently. 87.112.81.29 (talk) 13:36, 14 February 2009 (UTC)


 * I've wrapped your code in &lt;pre&gt; tags to fix the formatting — Matt Eason (Talk &#149; Contribs) 13:54, 14 February 2009 (UTC)


 * I've taken the liberty of rewriting your example without all the ul/li tags (which may be what's confusing both you and IE). For simplicity of exposition I've inlined the stylesheet:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> Menu <style type="text/css"> #nav { float:right; background:#ddddee; border:solid #777788 1px; font:bold 12px Verdana,sans-serif; }     #nav a { display:block; text-decoration:none; }     #nav a:hover { background:black; color:white; }     div.framer { margin:5px; padding:2px; border:solid #777788 1px; }     div.framer a { margin-left:1em; }     <a href="Home.html">Home</a> Services 1</a> 2</a> 3</a> How I work 4</a> 5</a> 6</a> Get In Touch


 * That appears identical for me in IE and FF. 87.112.81.29 (talk) 14:50, 14 February 2009 (UTC)

Concatenating pdf files in LaTeX
Hello, I would like to know what the best way would be to concatenate pdf files in LaTeX without using the PDFLaTeX compiler (For this I would have to convert all my figures into pdf files which is not feasible since I easily have over 100 figures). I have heard about pdfpages but this only works if using PDFLaTeX. Is there a similar package to pdfpages that will work using the conventional LaTeX compiler? Thanks in advance, Jdrewitt (talk) 14:20, 14 February 2009 (UTC)


 * Maybe I should post this on a LaTeX forum instead, I just thought maybe someone would have or know of a clever script or package that allows you to insert .pdf files into a LaTeX document using the conventional compiler. Or maybe converting them to an image file such as *.eps would be the better way to do that? Thanks Jdrewitt (talk) 09:28, 15 February 2009 (UTC)


 * Your description is a little confusing. It seems that you want to add some PDF files to a LaTeX document, but do you want to add a few PDF pages to the output of a LaTeX document, or do you want to include PDF files as LaTeX figures? If the former, you can just convert your LaTeX file into PDF in your preferred way, and insert/append the PDF files afterward using tools like pdftk. If the latter, you can convert your PDF files into EPS. Either way, I still don't understand the pdflatex connection. In my experience as a user, pdflatex is just a version of latex that output PDF directly. I don't think it forces you to convert all figures to PDF (that is, native LaTeX drawings are still supported). Converting PDF to EPS can be done using the pdf2ps utility that's part of Ghostscript. If you have bunch of them to convert, you can write a simple shell script to iterate through all the .pdf files that match a certain pattern.


 * If you clarify the problem and give more information, readers of this Reference Desk may be able to give you more useful help. For example, what version of LaTeX do you use? What's your OS platform? Can you (and do you feel comfortable) installing additional software to get the task done? How many PDF files do you need to insert/append? Do you want them to be part of the LaTeX document (meaning they have page numbers (whether displayed or not), and can have headers and footers)? Or do you just want the pages added as a totally separate section (say, as color plates not included in the normal page numbering)? Or do you want to include the PDF pages as LaTeX figures that have captions and can be moved around? How many PDF pages do you want to insert? Do they need to be extracted from some bigger PDF files first? What formats are the rest of the figures in? Good luck. --173.49.17.152 (talk) 16:30, 15 February 2009 (UTC)


 * Hello, I am using MiKTeX 2.7 under XP with WinEDT as the editor. I would just like to add 3 pdf files, each of which contain several pages, into the LaTeX document whilst maintaining page numbering and the table of contents etc. I have heard that this can be done using the pdfpages package, however this only works if compiling using PDFLaTeX. If you try compiling with the conventional LATeX thingymijig it comes up with an error saying the pdfpages package is only supported by VTeX or pdfLaTeX. I tried using pdfLaTeX but my figures, which are all eps format, do not come out. I don't want the inserted pdf files to be figures with captions, but full page figures without captions and similar margins as in the original pdf's would be ok. I hope that clarifies things a bit better. Jdrewitt (talk) 17:37, 15 February 2009 (UTC)


 * I take it that by maintaining page numbering, you mean that the inserted PDF pages will cause the page number to increase normally, whether or not page numbers are printed on those pages. I don't have a good solution to offer, but maybe you can try this:
 * Convert each of your PDF files into single-page (Encapsulated) PostScript files
 * Include each of the pages individually as you normally would for any EPS files
 * Tweak the page margins of those included pages to make them fill the whole page
 * Tweak the page style to turn on/off headers/footers, as appropriate
 * It may not be an elegant solution, but it sounds like you only have a small number of pages to include. Hopefully it's not too painful. --173.49.17.152 (talk) 19:43, 15 February 2009 (UTC)


 * Thanks, I think that possibly sounds like the way to go, it might not be elegant but if it works then that is fine by me. Can I just ask what the easiest way is of changing the page margins of individual pages without affecting the margins for the rest of the document? Its not something I generally play around with. Thanks again. Jdrewitt (talk) 20:42, 15 February 2009 (UTC)


 * I'm not sure what would be a good way to change the page margins for just one or a few pages in LaTeX. When I wrote the suggestion above, I was thinking about using  to change the settings before including the PDF pages, and doing it again afterward. A web search turned up this  (It seems someone has already thought about it).


 * There's another solution that might be easier. The idea is to:
 * Use a bunch of  commands (or some other methods) to "reserve" a few blank pages in the PDF file generated from the LaTeX file
 * Substitute the PDF pages to be included for the blank pages, using pdftk or something similar.
 * The substituted pages won't have headers, footers, and page numbers like the rest of the document, but this may not be a problem for you. BTW, I've found pdftk to be a handy tool for manipulating PDF files at the page level. Good luck. --173.49.17.152 (talk) 00:43, 16 February 2009 (UTC)


 * Brilliant, some sound advice there, thank you very much. Jdrewitt (talk) 01:14, 16 February 2009 (UTC)

Cyrillic typing
How to type cyrillic alphabets on qwerty keyboard? —Preceding unsigned comment added by 202.70.74.150 (talk) 14:58, 14 February 2009 (UTC)


 * You install a different keyboard layout—usually somewhere in your system settings you indicate that the keyboard is not, say, "U.S. English" but is instead "Russian." If you have a Mac, "Russian Phonetic" is a great keyboard layout if you are not accustomed to typing on a Russian keyboard (it maps the Cyrillic characters to their comparable English phonemes). --98.217.14.211 (talk) 15:48, 14 February 2009 (UTC)


 * If you don't want to do that, run "charmap" (if you're running Windows) and scroll down. You can click on the Cyrillic characters and Copy them to the clipboard, then paste them.  Obviously not useful if you want to type more than a couple of words.  Tempshill (talk) 06:09, 16 February 2009 (UTC)

Unable to access my watchlist or my preference
Hello. I am unable for some reason to access my watchlist or preferences. When I click on them the only thing that comes up is this text: /*generated user stylesheet*/ a. new, #quickbar a.new {color: # CC2200;}. Thanks. Tumblin Tom (talk) 15:32, 14 February 2009 (UTC)
 * You'll probably get a faster response on Help_desk - the RD is for general questions about anything, the help desk for Wikipedia specific questions. Exxolon (talk) 15:52, 14 February 2009 (UTC)
 * Thanks. I have asked the question there. Tumblin Tom (talk) 16:27, 14 February 2009 (UTC)

Algorithm for computing biconnected components
Our article on Biconnected components mentions a "classic sequential algorithm for computing biconnected components in a connected graph due to John Hopcroft and Robert Tarjan (1971)" -- does anyone what this algorithm is, and if there's a description of it online? &mdash; Matt Crypto 16:42, 14 February 2009 (UTC)


 * Knuth. 87.112.81.29 (talk) 16:47, 14 February 2009 (UTC)

What is a good software application for keeping an address book, from a data portability standpoint?
What is a good (preferably freely available) software application for keeping an address book? Ideally it should support importing/exporting data from/to many formats. I've looked at Thunderbird but its address book is not well designed, plus its import/export facilities seem rather limited. --173.49.17.152 (talk) 20:12, 14 February 2009 (UTC)
 * How about Zimbra? Gary King  ( talk ) 22:14, 14 February 2009 (UTC)

how do I do this to Paint Shop Pro?
example:



OK it's a bit of a cliche but how do I do it? Make the background black and white and something else not. Is there any tutorials anywhere?

Does it have a proper name?

Cheers,

Frank. —Preceding unsigned comment added by 86.166.234.129 (talk) 20:40, 14 February 2009 (UTC)


 * I don't know the specifics for PSP, but its workalikes Photoshop and Gimp, you a) select the thing you want to preserve, probably using the lasso tool b) invert the selection (so you're got everything else selected) c) probably feather the selection a bit (so the transition is fuzzy rather than a harsh line) and d) reduce saturation (which is colour-nerd speak for "colourfullness"). 87.112.81.29 (talk) 20:52, 14 February 2009 (UTC)

That's a help but I can't get it to work and still could do with a tutorial Frank. —Preceding unsigned comment added by 86.166.234.129 (talk) 21:57, 14 February 2009 (UTC)


 * In photoshop/gimp: duplicate the image layer (so you have two layers with the same image on them). on the bottom one, "desaturate" to make it grayscale. on the top one, apply a mask to it and fill it in totally black (so the top layer in invisible). then use the paintbrush tool to color white on the mask, revealing the colored image in all that you expose. it's really very easy but you have to learn how to use a mask tool first. if you know how to use masks then it is trivial—so look for a mask tutorial. --98.217.14.211 (talk) 23:42, 14 February 2009 (UTC)


 * That will work. The previous suggestion is just as quick - use the hand-drawn select tool (each paint program gives it a different name) and outline the area to stay in color.  In the select menu, there is an option to invert the selection.  Then, in the color settings, reduce all the colors so you just have black and white left.  You could also use one of the many tools that automatically make the selected area monochrome or old-timey looking, or stenciled...  I seriously doubt you'll find a "tutorial" for this because it is a 3-step process: Select the color area, invert the selection, remove color. --  k a i n a w &trade; 00:16, 15 February 2009 (UTC)


 * The issue I have with the "select" method is it is not easy to modify if you are unhappy with the final product. A masking method gives you a lot more flexibility, as well. "Quick" is not usually what one is looking for in situations like this (and even then, you can use the masks as a way of doing the select version in a way that is far more adjustable). --98.217.14.211 (talk) 00:36, 15 February 2009 (UTC)