Jump to content

Wikipedia:Reference desk/Archives/Computing/2008 February 16

From Wikipedia, the free encyclopedia
Computing desk
< February 15 << Jan | February | Mar >> February 17 >
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 16[edit]

rstatd/portmap access through firewall[edit]

I'm interested in making rstatd connections available to a single host through my firewall, but I'm not sure how to do it (or if it's feasible). When rstatd starts up, it chooses a random (and privileged) port on which to listen for UDP, and registers with portmap. Is it sufficient to allow tcp/udp to port 111 (sunrpc) to this particular host, and allow established/related connections through as well? I'm running CentOS 4.6. Thanks. --Silvaran (talk) 00:15, 16 February 2008 (UTC)[reply]

I just checked Portmap and it says to use inetd (xinetd for me) to configure a static port. Is this required, or can I get away with portmap rpc?--Silvaran (talk) 00:18, 16 February 2008 (UTC)[reply]

Image issue[edit]

Specs which may or may not be relevant: PC, Windows XP, IE, Safari and Firefox available, no special image software. I'm trying to grab this image off of Google books to use as fair use in an article. In IE I have right clicked and tried "save picture as". In the window that opens I only get two options for "save as type," gif and bitmap. I see that Wikipedia supports gifs but when I try to open the saved image I get a blank screen. I then tried saving it appending .jpg to the name, which did save to my desktop with a different icon, but it has the same opening problems. To wit, when I attempt to open it, it defaults to Windows picture and fax viewer but there is no image. I then tried right clicking on the image icon, choosing "open with" and choosing paint, and internet explorer (the only three program options he menu has) and none work. Some help for the clueless?--Fuhghettaboutit (talk) 00:43, 16 February 2008 (UTC)[reply]

That's because of stupid copyright protection.. it should be possible to go through all of Google's ajax and figure out how the pages are being loaded, but it would be nontrivial, to use the classic understatement. Just zoom in and print screen- here, I did it for you: http://img524.imageshack.us/img524/5008/screenshot2yy1.png :D\=< (talk) 00:59, 16 February 2008 (UTC)[reply]
Cutting in here to say there's a much better way: in Firefox, when you have that page loaded, just go to "Page Info" and hit the "Media" tab. Go through the images listed there, you'll see it, and there's a "save as" button that lets you save it to disk.—Chowbok 05:48, 18 February 2008 (UTC)[reply]
Thanks! Downloaded, saved and opened without problem; ready to upload. Can you give me a bit of an explanation as to how you did this so I can do so in the future if the same problem arises? I hit the zoom in button and hit the print screen button on the google book image in an attempt to duplicate what you did. So I assume that now the image is saved in some way in my computer's memory, tied to print screen—how would I take the "print screen memory" and save that as an image (I'm sure it's screamingly obvious but: *spoonfeeding required*).--Fuhghettaboutit (talk) 01:42, 16 February 2008 (UTC)[reply]
When you hit the print screen key on your keyboard, Windows copies an image of your screen onto the clipboard. You can paste it into a number of programs, perhaps the most simplest of which is mspaint (check Start, Programs, Accessories). Holding in the ALT key while you press the print screen key will copy only the active/focused window to the clipboard. When you use this method, you suffer from WYSIWYG. Essentially, what you see on your screen is what you're going to end up with--no better, no worse. That's why :D\=</Froth zoomed in, to get the most detailed view of the page you wanted before capturing the screen. --Silvaran (talk) 03:14, 16 February 2008 (UTC)[reply]

To save anything you can see on your screen:While viewing it on your screen: 1) Hit the "Print screen" button, it's probably on the top right of your keyboard. 2) go to Paint. It's in Start>Programs>Accessories. 3) Hit the "edit" button on the top left of the screen. 4) Hit "Paste". You will see your page. If you want to make any changes this is a time to do it. 5) Hit File> "Save as" Then give it a name to save under. 6) Now you can exit paint and go to Start>My Pictures and find it saved under the name you gave it. If you want to save words you can do the same thing but go to Notebook to save it in the same way.

Now that's spoonfeeding! Done thanks. My only problem was where to paste the image and that I could paste it jin the same manner as text; telling me to open paint was the key. Thanks everyone. Image by the way is here and put to good use.--Fuhghettaboutit (talk) 13:48, 16 February 2008 (UTC)[reply]

Hi Fuhghettaboutit. I'm the one who wrote the 1-6 above and glad I could be of help. I clicked on your "here" and saw your image - great! Now maybe you can teach me (please spoonfeed) how you get the click on "Here" to go to your picture. I'd like to try to do that with a picture of my own. —Preceding unsigned comment added by 74.233.68.202 (talk) 17:47, 16 February 2008 (UTC) P.S. What is the character between .png and "here" I don't see any character like that on my keyboard. —Preceding unsigned comment added by 74.233.68.202 (talk) 17:50, 16 February 2008 (UTC)[reply]

On my computer, the character | is "Shift" + "\". that is, I need to hold shift while I press \. Hope that helps. Kushalt 20:11, 16 February 2008 (UTC) I believe it is called piped link. Kushalt 20:13, 16 February 2008 (UTC) | I did it! Now I'll try to copy what you have above here lets see if this works. Well that didn't work. I see that you have to have a page in Wikipedia by the name of the picture and that your picture isn't in featured pictures. I don't know that I want to register and create a whole page in Wikipedia just for my little picture. Your picture is at least of interest to others but I might be infringing on some property rights if I tried to use this picture. Did you take that picture yourself or did you get it somewhere else? I got mine online, but I could try to do it using one of my own pictures. How hard is it to do?[reply]

Free Virus Protection[edit]

What is the best free virus protection package I can download for my computer?74.233.68.202 (talk) 03:38, 16 February 2008 (UTC)[reply]

AVG Security Software, Avast! or ClamAV. Of those 3 I prefer AVG the most as it is the least annoying (Avast! with its creepy voice notifications, and ClamAV with its unintuitive GUI). --antilivedT | C | G 04:04, 16 February 2008 (UTC)[reply]
I use Avast!, and turned off the voice notifications as soon as I got it. Does it have any more substantive disadvantages compared to AVG? Algebraist 14:13, 16 February 2008 (UTC)[reply]

I went to try AVG Security Software and got: Free - only $11.98 for 3yr, $15.88 for 2yr or $19.95 for 1yr. Not only do they not understand the meaning of "free" but they charge more for 1 year than 2 or 3 years! and I had to chose one of the above to download, not even a free trial period. So I went to Avast. At first I was turned off by the poor English on their homepage, but I read the writeup in Wikipedia and it won a lot of awards, so I downloaded it, had to restart and it ran a scan in reboot before updating. I don't want to scan every time I reboot but I don't know how to turn it off. Will go try to find out now. Thanks for the advice. —Preceding unsigned comment added by 74.233.68.202 (talk) 17:16, 16 February 2008 (UTC) Me again - asker of question - I didn't change anything, rebooted to see if it would scan on reboot again and it didn't, so I guess that was a one-time thing. Great! I'm starting to like Avast already.74.233.68.202 (talk) 17:30, 16 February 2008 (UTC)[reply]

AVG Anti Virus is free from http://free.grisoft.com/ AVG-AVpro and the full AVG security suite do cost money (and the free edition can't be legally used for business purposes). -- 17:39, 16 February 2008 (UTC) —Preceding unsigned comment added by Finlay McWalter (talkcontribs)

I went to the free.grisoft.com site which you suggested and downloaded AVG Anti-Virus free edition. I had to created a restore point and uninstall my new Avast first. It looks good so far. Thank you very much for your help.74.233.68.202 (talk) 22:13, 16 February 2008 (UTC)[reply]

System Restore has its own share of criticisms, particularly with virus and malware protection. Archiving infected files and restoring to that version defeats the purpose of having an antivirus software. Kushalt 01:16, 17 February 2008 (UTC) I had done several scans from different packages before creating a restore point and they all came out negative. I also cleaned out my temporary files first, but thanks for reminding me of that. —Preceding unsigned comment added by 74.233.41.57 (talk) 19:11, 17 February 2008 (UTC)[reply]

Javascript: events with generated content[edit]

I am trying to add buttons (spans) to a webpage using Javascript and have them run a function when they are pressed. The problem is that I can get the code to work in about 3 of the 4 browsers I test it in, but never all 4 at the same time. What do I do to get, lets say, alert("Hello") to run when a (Javascript generated) button is clicked in all major browsers.

Thanks, 159.134.98.23 (talk) 14:49, 16 February 2008 (UTC)[reply]


When I do something like this I make it an anchor tag, not a span. Something like: <a>Press me</a> usually works fine. Then you can assign those anchors a class to make it look more button like, if you want (add a border, adding some padding, get rid of its underline, etc.). However even in this case if it is something I'm expecting a lot of people to use and am worried that they might not have Javascript turned on, I'll put the javascript in the onClick= property and then put an alternative but still-functioning approach in the href property. It makes it transparently workable even without javascript turned on. --98.217.18.109 (talk) 14:52, 16 February 2008 (UTC)[reply]
How about this?
<input type="button" onclick="alert("Hi");" value="Click me" />
or
<button onclick="alert("Hi");">No, click me</button>
--grawity talk / PGP 18:29, 16 February 2008 (UTC)[reply]

The spans are being added using JavaScript (i.e. people without JavaScript will never see the buttons). I tried adding a onClick attribute containing the function to call (again in Javascript). This worked fine in everything except Internet Explorer 7 which was happy to add the elements to the page but none of them would respond to mouse clicks. Thanks, 89.127.160.227 (talk) 20:02, 16 February 2008 (UTC)[reply]

Web Content Accessibility Guidelines. Web Content Accessibility Guidelines! All right, I'll quote here for those who won't read it themselves.
6.3 Ensure that pages are usable when scripts, applets, or other programmatic objects are turned off or not supported. If this is not possible, provide equivalent information on an alternative accessible page. [Priority 1] For example, ensure that links that trigger scripts work when scripts are turned off or not supported (e.g., do not use "javascript:" as the link target). If it is not possible to make the page usable without scripts, provide a text equivalent with the NOSCRIPT element, or use a server-side script instead of a client-side script, or provide an alternative accessible page as per checkpoint 11.4. Refer also to guideline 1.
--tcsetattr (talk / contribs) 21:32, 16 February 2008 (UTC)[reply]
That doesn't help. But if you must know the buttons are for a textarea. Without Javascript the buttons will do nothing and so there is no point in displaying them, which is why I want to add them with Javascript in the first place. 159.134.98.23 (talk) 21:55, 16 February 2008 (UTC)[reply]
If one adhered rigidly to accessibility guidelines it would serious cripple the ability of web designers to push the envelope. Sometimes you're going to be inaccessible to some people if you are doing something different. I don't think the blind will ever appreciate a Pollock; sometimes you've got to use sites that require javascript and won't work without it. Life's not always fair, I'm afraid! --98.217.18.109 (talk) 17:30, 17 February 2008 (UTC)[reply]
Is there a reason that they have to be spans and not other tags (e.g. anchors)? (Not that I'm sure that will help, but I'd try it.) Anyway, what is the code you use to add the new content to the page? I suspect that might be where the issue is; it might be that IE is not adding it correctly. There are a number of ways to add code, you might try a few others (e.g. if you are just changing the innerHTML of a tag, you might instead try using the .appendChild method, build up the control in Javascript and set its onclick property there, rather than just doing it as HTML). --98.217.18.109 (talk) 17:30, 17 February 2008 (UTC)[reply]

Disabling SE Sidebar[edit]

How can the "SE Sidebar" default checkmark in the Explorer menu be removed, once it has become enabled? —Preceding unsigned comment added by 201.141.95.82 (talk) 16:02, 16 February 2008 (UTC)[reply]

"SE Sidebar"? Can you make a screenshot? Is this related to Sony-Ericsson software, or what? --grawity talk / PGP 18:14, 16 February 2008 (UTC)[reply]

I am using Spanish-based XP and this barnacle seems to have become incorporated into Wikipedia by some type of outside influence. Every time I redirect to another Wikipedia page, in the "Ver" menu (in English, I guess, Appearance)in the drop down menu "Barra del Explorador" (in English, I guess, Explorer Bar)the line item "SE Sidebar" always reverts to checked (enabled) status. I have looked for the way to disable it many hours, with no results. Thanks.189.136.132.116 (talk) 22:14, 16 February 2008 (UTC)[reply]

Sounds to me very much like some malware - there are a lot of malicious "search bars" out there that like to install themselves into the heart of IE without permission. I would run something like Spybot - Search & Destroy or Ad-Aware and see if it can identify and remove the offender for you - just changing the settings is unlikely to work, because it's not something that should be there in the first place! - IMSoP (talk) 18:42, 17 February 2008 (UTC)[reply]

Getting MS Access data into a MySQL database[edit]

I've got a database in MS Access that I'm trying to get into a MySQL database. I'm having difficulty exporting one of the tables, though, because it contains a few very large text fields (full-text contents of long documents). With the other tables I've been able to just export them as CSV and import them through phpMyAdmin, but it doesn't handle the full-text fields right at all. I've tried Googling around and all I've found are little scripts that people have written for Access that supposedly can export the data to SQL but they seem to struggle with the large text fields as well — they overflow or otherwise just don't work right with newer versions of Access (I'm using Access 2003). (They also just seem poorly written to me, the authors not even knowing how to do declare specifically which library a function is from so it won't conflict with other similarly named functions!)

Oh, and here's an important caveat. The MySQL database is on an OS X machine, and the Access database is on a virtualized version of XP that runs inside it. (Access doesn't run on a Mac, obviously.) So I can't use any of the Windows-based database management tools, I don't think, because they can't import to the MySQL database directly. Blah.

Anyway, any suggestions or thoughts? Something I haven't thought of? --98.217.18.109 (talk) 17:11, 16 February 2008 (UTC)[reply]

What is the datatype of the long text fields in the MySQL database? The Access ones are Memo I gather, are you using BLOB or LONGTEXT for the MySQL definitions? --Canley (talk) 22:20, 17 February 2008 (UTC)[reply]
LONGTEXT, but that wasn't any sort of problem with it. Anyway, I figured out a way to do it after messing around for an entire day on it—in the end I had to fix some of the free SQL generating code made for Access (really stupid stuff, like not using integers to loop over contents where they could presumably go higher than 32000 bytes) and it ended up creating a lot of INSERT VALUES statements that I could execute using phpMyAdmin. Anyway it works now, and was a one-time sort of conversion. --98.217.18.109 (talk) 22:44, 17 February 2008 (UTC)[reply]

Make a data logger[edit]

I have a Mac running Leopard. I want to make a simple data logger that works over USB, so that I can measure a voltage (from 0V to 5V), convert it to digital, and send it via USB to the Mac. I then want to either get or produce a piece of software to display it as a graph, and also to be able to export the raw data to Excel. Would it be possible to make the hardware from an old joystick, as surely they contain an analogue-to-digital converter? How would I go about this? And then, what would I need to do to produce the appropriate code to record and graph the data. Which language would be best, or is there an existing programme that is free.

Many thanks, --Cash4alex (talk) 18:05, 16 February 2008 (UTC)[reply]

How old is the joystick? Gameport ones don't contain any circuitry at all (except the later models) and all the ADC is done in the computer, but you can't use that as Macs don't have gameport. Newer USB ones either have the optical detection (Microsoft ones) which would be of no use for you, or the more traditional potentiometer ones (getting rare). I have heard of people using their sound card's line-in to use as ADC, if you can find a good guide for it that might be the easiest way to do what you're trying to do. --antilivedT | C | G 04:30, 17 February 2008 (UTC)[reply]

NNTP control messages in Thunderbird[edit]

Is Thunderbird capable of sending a valid control message to an NNTP server? If so, how do I configure it to send all the required fields (besides "Control:" in the header, and those it would be sending anyway)? NeonMerlin 18:41, 16 February 2008 (UTC)[reply]

Script class[edit]

Would this script classify as a CMS, a template engine, or what? (It basically prints out headers/stylesheet, reads some data from requested file and prints <h1>, includes requested file, and prints footer.) (and no, this is not an attempt to advertise my site.) --grawity talk / PGP 19:59, 16 February 2008 (UTC)[reply]

Proxy question[edit]

Would it be possible to download a piece of software on my home computer and use it as a private proxy from somewhere else? For example software "a" can let me configure a proxy at home and only that exact copy of "a" (on a Flash Drive) could let me access my internet/home proxy. Yamakiri TC § 02-16-2008 • 20:11:43

It's technologically feasible. Note, however, that there's nothing to prevent the remote machine's owner from installing software that invisibly copies the contents of any inserted flash drive to the hard disk. To defeat this you'd need to type in a password on each use, but that doesn't help if they also have a keylogger. To defeat that combination you'd need a one-time password system.
All that aside, you could for example run an ssh server on your home machine and use PuTTY in dynamic forwarding mode (-D command-line option) on the remote machine; this effectively turns your home machine into a SOCKS proxy. -- BenRG (talk) 22:10, 16 February 2008 (UTC)[reply]
Not sure but this could be what your after Think outside the box 17:54, 22 February 2008 (UTC)[reply]

iMovie[edit]

I am using iMovieHD as a part of iLife '06 on an Apple MacBook. I have a question regarding iMovieHD. Is the [dot] imovieproject the only file I need to back up to back up an imovie project? Does it include all the deleted scenes and sound effects? I want to back up some of my movie projects and I want to make sure I do it right. Any suggestions? Kushalt 21:17, 16 February 2008 (UTC)[reply]

Yes, that should be right. The .imovieproject file is actually a big "package" file that contains all sorts of little files inside of it, including trashes and unused scenes and etc. I am reasonably certain that when you import movies and sounds it includes them inside the file (rather than just linking to them); anyway you should be able to tell by the size of the file (it should be large). --98.217.18.109 (talk) 17:18, 17 February 2008 (UTC)[reply]

yes, 3.06 GB file size. Thank you very much. Kushal 12:25, 18 February 2008 (UTC)[reply]

Is my iTunes Music Library.xml file corrupt?[edit]

Okay so...I want to import listening the last.fm client so my profile will have my previous listening history. However, this does not work. The last.fm people said the file is either too small or is corrupt. I probably have about 1000-ish plays in iTunes and the iTunes Music Library.xml file is "1.5 mb on disk" - so do you think the file is fine, and that there is another problem? I get no errors or anything when using iTunes or synronising my iPod. -- Stacey talk to me 22:08, 16 February 2008 (UTC)[reply]

I would say the size is OK. I just checked mine, which is 2.4 MB, which covers 1662 items (counting duplicates). Did you check the previous iTunes library folder?

If everything except last.fm is working fine, I would say the problem is probably with last.fm Kushalt 01:10, 17 February 2008 (UTC)[reply]

"Did you check the previous iTunes library folder" do you mean the "Previous iTunes libraries"? Last.fm says it imported but nothing showed up because it's either small or corrupt but it seems to be neither. It's really annoying :\ -- Stacey talk to me 01:53, 17 February 2008 (UTC)[reply]

I wish I could be of help but I know nothing about last fm. Yes, I meant "Previous iTunes libraries". Try working with the latest one backups from the folder. I hope it works. Kushalt 04:53, 17 February 2008 (UTC)[reply]

Will I lose playcounts if I do that? -- Stacey talk to me 21:21, 17 February 2008 (UTC)[reply]

Your playcounts in iTunes should remain unaffected. What happens to last.fm, I have no idea. Kushal 13:16, 18 February 2008 (UTC)[reply]