Wikipedia:Reference desk/Archives/Computing/2008 October 6

From Wikipedia, the free encyclopedia
Computing desk
< October 5 << Sep | October | Nov >> October 7 >
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.


October 6[edit]

Graphing Equations on Office[edit]

Hello. Is there a feature in Office 2007 Home and Student Edition where I can have an equation of my choice graphed onto a Cartesian plane (with a grid in the plot area) in a smooth line without listing so many x- or y- values? If so, how do I use it? Thanks in advance. --Mayfare (talk) 02:55, 6 October 2008 (UTC)[reply]

Does it really need to be within Office? gnuplot is what I often use; there is a wide variety of plotting software like it available for all platforms. If it really has to be Office, I imagine some sort of VBA solution could be constructed, but it would be much more complicated than using a program designed for the purpose. --Tardis (talk) 17:18, 6 October 2008 (UTC)[reply]
Gnuplot is a truly great program - and I use it all the time - but it's quite hard to learn. If you do this stuff a lot, it's worth the effort though. SteveBaker (talk) 19:42, 6 October 2008 (UTC)[reply]

CD-R Disks[edit]

I have a few CD-R disks i'm trying to get my lectures from school on, and they say 700MB/80 minutes. Does this mean that the maximum time limit for file(s) on the disk is 80 minutes, even if the material is well under 700MB? I've tried to start burning the files, but it says I may need more than one disk. Could someone confirm that its a 80 minute limit, or can I fit 700MB on there. Thank you in advance, Matty (talk) 03:05, 6 October 2008 (UTC)[reply]

The 700MB limit applies to data, like your lecture files. The 80 minutes limit only applies of you are burning an Audio CD for use in CD players. WikiY Talk 03:58, 6 October 2008 (UTC)[reply]

The lectures are audio recordings, so i'm guessing the 80 minute limit applies to them? Alright, well thats saved me alot of time trying to get it to work. Thank you! Matty (talk) 04:08, 6 October 2008 (UTC)[reply]
If your audio files are in MP3 format then the 80 min limit does not apply. If the files are more then 80 min long and under 700megs then they are most likely NOT in audio-cd format yet. ---J.S (T/C/WRE) 07:12, 6 October 2008 (UTC)[reply]
A lot of CD burning programs will let you create audio CDs from MP3 files without first converting them into the audio CD raw format. The important thing is whether you've told your CD burning software to make an audio CD or a CD-ROM. An audio CD will work on more standalone players than a CD-ROM. If you don't need that ability then make a CD-ROM, because you'll be able to fit a lot more MP3s on it. CD-ROM might also be called "data CD" or something like that. -- BenRG (talk) 09:51, 6 October 2008 (UTC)[reply]
I agree that most lectures do not need to be in CD quality audio and therefore can be compressed. Kushal (talk) 10:37, 6 October 2008 (UTC)[reply]
There are two quite distinct ways to record a CD. One is as a regular music CD that you can put into any old CD player and just play. The 80 minute limit applies to those devices. The second way is to record a DATA CD - in which case the 700Mbyte limit applies. If you are recording audio in MP3 format, the amount of space it takes is dramatically less than it takes on a music CD because the MP3 format compresses the files so they take less space. You can adjust the quality of the compression of an MP3 and with a 'medium' quality setting, you'll get maybe ten times more audio onto a single disk...so 80 hours rather than 8. That ought to be more than enough for a series of lectures! SteveBaker (talk) 19:41, 6 October 2008 (UTC)[reply]

error codes[edit]

on my iMAC, while trying to access the application folder in backup from my external hard drive I get the error code-10657 what is that? bill b —Preceding unsigned comment added by 76.169.196.142 (talk) 07:36, 6 October 2008 (UTC)[reply]

Google is faster for finding the answers to some questions. Dismas|(talk) 10:42, 6 October 2008 (UTC)[reply]

Possible data sharing problems within a homework[edit]

outline three possible problems of sharing data within a network —Preceding unsigned comment added by Fmcboy (talkcontribs) 09:22, 6 October 2008 (UTC)[reply]

1. please start your own thread. 2. please make attempts so that it does not sound like homework. :P Kushal (talk) 10:35, 6 October 2008 (UTC)[reply]

This appears to be a homework question. I'm afraid you're going to have to do it yourself. (Also, I added a title to your question, as you hadn't included one. You're welcome!) -- Captain Disdain (talk) 10:35, 6 October 2008 (UTC)[reply]

Easiest route JPEG to PDF[edit]

What would be the easiest way for me to compile a bunch (over 100) of 7 Megapixel JPEG images into a PDF file? I am on an Intel MacBook, OS 10.4.11. Suggestions please? Thank you. Kushal (talk) 10:33, 6 October 2008 (UTC)[reply]

Use ImageMagick: convert *.jpg foo.pdf -- Finlay McWalter | Talk 10:48, 6 October 2008 (UTC)[reply]
Thanks, Finlay. I have two more questions, 1. will it let me compile all of the images into a single file? 2. will it work on Tiger? the binary is only for Leopard. Kushal (talk) 11:42, 6 October 2008 (UTC)[reply]
Yes, that command line will take any number of images and will emit a single PDF. I don't know anything about MacOS specifics, I'm afraid. -- Finlay McWalter | Talk 11:44, 6 October 2008 (UTC)[reply]
It's really a pain to compile ImageMagick on Tiger, but supposedly it can be done. I was never able to get it working, though, after hours of attempts. Just a lot of dependencies...
Here's another way: I've used this "ImagesToPDFs" Applescript before with good success. It turns each image into a separate PDF. Then you can use Automator to combine the PDFs. Works fine on Tiger. --98.217.8.46 (talk) 13:52, 6 October 2008 (UTC)[reply]
Really? How disappointing. For Kushal one's immediate problem, it should be possible to compile a rather minimalist ImageMagick with as few external dependencies as possible. The *nix configure script has a lot of --without-xyz options which disable reliance on a given external library. I guess Kushal one only needs the JPEG and Ghostscript modules. -- Finlay McWalter | Talk 15:51, 6 October 2008 (UTC)[reply]

That is true. I would not bother taking pictures in RAW format with the camera I have (that is, if I could). I just need JPEG and PDF support. All I need to do is create a modern, standards-compliant (not strictly, just need to make sure that it works with Adobe Readers) PDF file that contains ALL the images in one PDF file. I would assume that the pages would be the same size with respect to one another, and I do NOT expect my people to print a hard copy off it. What would I need if I were to build ImageMagick myself? I just got an idea. Could I use LaTeX to compile the PDF? Could someone build it for me? I already have LaTeX but I have been greatly successful in putting off actually learning LaTeX for a long time! Any help is appreciated. Kushal (talk) 19:46, 6 October 2008 (UTC)[reply]

I think that you will need the jpeg library and ghostscript. Graeme Bartlett (talk) 20:21, 6 October 2008 (UTC)[reply]
Unless ImageMagick requires me to have system privileges to install it, I can try to take over someone's Windows computer (armed with my flash drive) and get this over with. On the long term, I will probably get Snow Leopard as soon as it gets out. Thanks everyone! Kushal (talk) 07:52, 7 October 2008 (UTC)[reply]
It does need admin rights. :( back to square one. Kushal (talk) 03:06, 8 October 2008 (UTC)[reply]

Slashes[edit]

What is the angle of a slash relative to a Vertical bar or pipe? Dismas|(talk) 10:40, 6 October 2008 (UTC)[reply]

Doesn't that depend on what font you use? I am getting confused. Kushal (talk) 11:43, 6 October 2008 (UTC)[reply]

Yes, it is dependent on the font as well as the aspect ratio of the display. For example, if I stretch a 4:3 display into a 16:9 ratio, the angle will change. -- kainaw 12:59, 6 October 2008 (UTC)[reply]
If you change the aspect ration then at that point you're just distorting the font, it's no longer at its "correct" shape.
Seems like the best way to answer this would be to print out a slash and a bar in your favorite font and take a protractor to it. APL (talk) 15:32, 6 October 2008 (UTC)[reply]
What happened to saving paper? Aspect ratio wars aside, I would say a screen print should be just as fine. Oh, did you mean print it to the screen? Apologies, APL! Kushal (talk) 19:48, 6 October 2008 (UTC)[reply]
"/" <--- this slash, on my display, slants at 63° in my browser's textarea font, but at 70° in the default Wikipedia display font. So I guess relative to a vertical bar those would be 27° and 20° to the right, respectively--Sean 16:15, 6 October 2008 (UTC)[reply]
Thanks, all. It wasn't until after I had posted this question that the person I was talking to about this and I realized that it most likely depends on the font. I thought that there may be some ISO or Unicode dimensions that defined a character After all, ISO standards can be rather nit picky at times. Thanks for the responses though! Dismas|(talk) 05:43, 7 October 2008 (UTC)[reply]
The unicode guys do have reference renderings of the characters eg for printing on code sheets, but that's pretty arbitrary. —Preceding unsigned comment added by 194.223.156.1 (talk) 14:14, 7 October 2008 (UTC)[reply]

Too lazy to experiment ....[edit]

http://www.w3schools.com/PHP/func_date_date.asp

  • e - The timezone identifier (Examples: UTC, Atlantic/Azores)
  • T - Timezone setting of the PHP machine (Examples: EST, MDT)

Well, what are the differences between e and T? How do I assign a value to e or T? How do I get a list of all allowed e and T values? Say, the T (abbreviations) for Asia/Tokyo or Europe/Paris ... -- Toytoy (talk) 15:43, 6 October 2008 (UTC)[reply]

I haven't played around with it, but here's what I think this does...: "T" is going to give you the timezone setting in the PHP.ini file. "e" will give you whatever it is set currently. You can set the time zone on a per-script basis using "putenv("TZ=US/Eastern");" according to this website: [1][2] The official PHP website suggests this script: bool date_default_timezone_set ( string $timezone_identifier ). ---J.S (T/C/WRE) 22:58, 6 October 2008 (UTC)[reply]
And here is the list of supported timezones. — Shinhan < talk > 08:46, 7 October 2008 (UTC)[reply]

un-sudo?[edit]

Assuming I am running some bash script as root, and I need to do some actions as a regular user, is it possible to "un-sudo" inside the script? Or do I have to make another script? one for root actions and other to non-root actions? SF007 (talk) 16:32, 6 October 2008 (UTC)[reply]

You can call sudo again inside your script, this time to run a command as someone else; sudo lets you do stuff as any user you want: sudo -u someprole foo -- Finlay McWalter | Talk 16:52, 6 October 2008 (UTC)[reply]
Consider that SUDO is related to SU, which are both designed to "switch user" in the process of the command, the default user just happens to be root. The article on sudo is a bit misleading in this respect. --66.195.232.121 (talk) 17:31, 6 October 2008 (UTC)[reply]
Guess it's better to have 2 scripts... SF007 (talk) 23:32, 7 October 2008 (UTC)[reply]

Virus destroying hard disk[edit]

I know, of course, that a virus/trojan can erase a hard disk, making it unreadable to the OS. But can a virus destroy a hard disk to the extent that it is not recognized by the BIOS? I ask because some friends of mine have an amazing track record of wrecking hard disks. It's unlikely to have been caused by other defective hardware, because it has happened on two separate PC's. I know that at least one of these was severely malware-infested. --NorwegianBlue talk 19:15, 6 October 2008 (UTC)[reply]

I doubt it. It's possible that some hard drives could have their firmware 'reflashed' with garbage - but not many of them are like that and I'd be surprised if any virus writer would spend the effort to implement that stuff for just one or two drive types. It's more likely that your friend lets his PC get too hot - or bashes it around while it's running. It could also just be a run of bad luck. (What amazes me is just how non-nasty most virii are. How is it that nobody wrote a virus that orders 100 random books from Amazon under your name?!) I can't imagine how bad it would be to work with PC's that can get attacked like that! (I use Linux - no malware concerns whatever!) SteveBaker (talk) 19:27, 6 October 2008 (UTC)[reply]
Kind of a tangent, but: Linux is not any less vulnerable to this kind of attack than Windows. As a rule of thumb, anything you can do without entering a password, a program you run can do invisibly in the background. If you can order 100 books from Amazon shipped to a third-party address on your credit card without entering your password (perhaps because you have autocomplete turned on and haven't set a master password), then any program you run can probably do it too; if you can't then a malicious program probably can't either. That's true on Linux or Windows. The email viruses that caused untold media hysteria a few years back worked by (1) claiming to be something useful or fun so that recipients would run them; (2) sending copies of themselves to everyone in the user's address book; (3) in some cases perhaps damaging the user's personal files. All of these things would have been just as possible on a Linux system. The root of the problem is the user-based security model that both UNIX and NT are built on. When I run a program I don't want it to have the privileges of my user account, I want it to have no privileges at all. It shouldn't even be able to see the file system until I give it permission. Java's security model is closer to the right idea. It has nothing to do with Java's being a virtual machine; operating systems could provide the same level of control over native code. The Java security model is better simply because it was designed more recently and so better reflects what people need in this day and age. -- BenRG (talk) 20:52, 6 October 2008 (UTC)[reply]
Certainly that's true in theory - but in practice, there are simply no actual, in-the-wild attacks that run rampant through Linux machines. Malware is just a non-issue for desktop Linux users. SteveBaker (talk) 13:03, 7 October 2008 (UTC)[reply]
Presumably that's true because of the very small userbase for Linux. If (or when) it becomes more ubiquitous this "in theory" problem will need to be addressed. --Rixxin 08:43, 9 October 2008 (UTC)
(ec)In theory you can permanently trash a hard disk from software using its firmware update mechanism - you do the firmware update procedure, but send it bad firmware. In practice I've never heard of a virus that does so; given that most malware is now commercial (its written for the financial gain of its author or their backers, to send spam or insert advertising or whatever) I don't see a reason why anyone would bother. Now if I were a government (many of whom now say they're building a "cyberspace command" or whatever) then that's probably exactly the kind of thing I would be coding. I doubt your friend has enemies that scary; if he does he has problems worse than computer woes. -- Finlay McWalter | Talk 19:29, 6 October 2008 (UTC)[reply]
It would be really infeasible though because the firmware update mechanism is probably specific to each model of drive, or at least each brand. So the virus would have to know ahead of time what kind of drive he had; or it would have to have code for every different mechanism. --71.106.183.17 (talk) 19:46, 6 October 2008 (UTC)[reply]
It might be possible with a zombie that they can have spyware to spit back the hardware configuration and then request a new firmware that would, then, trash the hard disk. However, I would not know what the motive behind such an attack could be. If the computer was a zombie already, it would make little sense to destroy the hard disk itself ... unless the specific zombie's work was done and they were tying up the loose ends. Kushal (talk) 20:24, 6 October 2008 (UTC)[reply]
Not infeasible at all, unfortunately. It's mostly a standard(ish) mechanism (for example, ATA defines a DOWNLOAD MICROCODE instruction), and the major vendors can (and do) define custom SCSI or ATA commands for firmware update. Mostly you just issue the requisite command, bung a block or two of data at the drive, and (generally if it checksums) you're done. The code to update a given drive is probably 1 or 2 K compiled. The fact that vendors often don't document the firmware update procedure is little defense - they all offer (usually windows) programs that let you reflash a drive, and monitoring or disassembling these isn't very hard. And you don't need hundreds of loaders for different drives - there are very few hard-disk makers any more, and each only really makes a couple of technically distinct products at a time (they use the same platform for several years, and over a range of platter counts and sizes). And, because it's simpler and there's no reason not to, subsequent generations from the same manufacturer use the same mechanism. Writing a general piece of code that could detect and kill most of the drives it'd encounter in the wild would be 50 or 100k compiled. Those that survive would mostly be OEM ones with nonstandard vendor strings (it's a Seagate but it claims to be a Sun or a Dell or whatever). Because the evil attack program doesn't have to download valid firmware (but instead just junk that checksums okay) it doesn't need a massive library of firmware to send. And there's really little limit on how big viruses can be now - they're not hiding in the boot sector on a floppy any more. -- Finlay McWalter | Talk 21:21, 6 October 2008 (UTC)[reply]
Finlay, now you are really scaring me. We know that most people who write malicious code no longer do it as a 'proof of concept'. Most often, these are 'businesspersons' who are into making money. The motive behind such a scenario is what is problematic to me. There are at least hundreds of thousands of zombies[citation needed,I know but I think I saw this on some tv show] around the world, connected to the Internet. Finlay, do you think that the data is recoverable from the hard disk after it has been 'destroyed'? Would be prohibitively expensive, if at all possible? Kushal (talk) 07:47, 7 October 2008 (UTC)[reply]
Firmware updates sometimes fail for innocuous reasons, and there are ways of reflashing the firmware and fixing the drive (though I think you need special equipment). There are various ways this attack could be prevented, such as cryptographically authenticating the flashed firmware or putting a physical switch on the drive that has to be flipped before flashing. I don't know whether those measures are in place right now. If software that attacked drives this way did surface, it would probably affect a large number of drives and create a huge PR problem, and the manufacturers might end up offering free repair as a kind of product recall. -- BenRG (talk) 11:32, 7 October 2008 (UTC)[reply]
Sure, you can definitely put it on a jig, connect to pads on the board with pogo pins, and reflash (that's essentially how it's done in the factory); that's probably not cost effective unless the data on the drive is pretty valuable. Back in the day I did a lot of this situ firmware update coding, and then we were paranoid about there being no way to permanently hork a device by botching the update. These days all kinds of things seem to be very lax, their manuals declaiming "if you power me off during update, I need to go back to the factory". -- Finlay McWalter | Talk 11:57, 7 October 2008 (UTC)[reply]
Once malware is inside your machine - there is really nothing it can't do if the coder is sufficiently motivated to do it. Trashing your hard drive is annoying and would maybe cost you a couple of hundred bucks to fix - but if it can rewrite the firmware on the drive - then it can put malware inside the drive WITHOUT trashing it. Such a virus would be almost impossible to track down and eradicate and since it could change any block of data coming from or going to your drive, it would be a snap for it to produce all sorts of interesting effects by sending slightly different code for your operating system when it detects the boot loader grabbing it. SteveBaker (talk) 13:08, 7 October 2008 (UTC)[reply]
Worse, there's firmware in all kinds of places - in the modem, the ethernet card, the bios, SCSI card, the WLAN adapter (and if you're a server, in odd places like the power supply). I've never heard of any of these requiring the firmware to be signed (I doubt most of these devices are up to doing the crypto involved). The recent example of something (not entirely sure what, still) inadvertently trashing the firmware on Intel network cards on Linux should serve as a salutary example. -- Finlay McWalter | Talk 13:51, 7 October 2008 (UTC)[reply]

Thank you everyone for your responses! To sum it up, a virus could use a firmware update mechanism that is reasonably standard, and replace the firmware with garbage (or worse), thereby making the disk unrecognizable to the BIOS. However, such a virus has not yet been observed in the wild, and is unlikely to be be the cause of my friends' problems. --NorwegianBlue talk 20:23, 7 October 2008 (UTC)[reply]

Goodtimes virus will re-write your hard drive. Not only that, but it will scramble any disks that are even close to your computer!
Seriously though, the CIH (computer virus) is one prime example of the firmware changing type, flashes the BIOS with garbage once triggered, before built-in BIOS recovery is common (this was last millennium). --antilivedT | C | G 07:40, 9 October 2008 (UTC)[reply]

IM spam[edit]

I have Adium on my Intel Mac 10.4.11. It keeps me connected on to various accounts. Lately, I have been getting a lot of IM spam. I never click on any of them but the flurry continues. Here is a basic example of the spam:

Hey [deleted]%20[deleted] I would like to chat with you but I this is my friends msn. You you can send me a msn chat request here [some hotmail address] Hope we can chat

or

8:48:39 AM alyssaedtxjon@live.com: My cam still is not working. Message me on http://[somename].blogspot.com so I can send you a cam invite. Hope to chat soon :P

Is there anything I can do about it? Kushal (talk) 20:18, 6 October 2008 (UTC)[reply]

Switch handles maybe. ---J.S (T/C/WRE) 23:05, 6 October 2008 (UTC)[reply]
It's probably because you've had your screenname out on the internet in too many places for people to see. Mac Davis (talk) 03:37, 7 October 2008 (UTC)[reply]
Live Messenger has an option to disallow IMs from people who are not on your contact list. You'd need to enable that through the official client though, I don't see any way to do it through Adium. I think it's server-side so it should work when you get back into Adium, but I'm not sure. The other protocols likely have similar mechanisms, though that's the only one I've had spam problems with. -- Consumed Crustacean (talk) 04:29, 7 October 2008 (UTC)[reply]
I don't have admin access to a windows computer to install Windows live. As a temporary solution, I have disabled the hotmail account on my adium. I don't think I want to install the piece of carp called Messenger for Mac just to get rid of the spam. Kushal (talk) 22:47, 7 October 2008 (UTC)[reply]