Wikipedia:Reference desk/Archives/Computing/2006 October 31

Computing desk
< October 30 << Sep | October | Nov >> November 1 >
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 31

edit

Detecting speed of travel on computer

edit

Hello. I wanted to detect the speed (velocity) of how fast I'm traveling (like it a car, etc) via a computer. I need something with a fast update rate (5Hz or more) and it needs to connect to a serial port. I know some high-end GPS recievers can do this, but are there other alternatives? I was wondering if you could buy inertia sensors or something that would work as well? I couldn't find any information on anything but GPS recievers. I don't care about software support, I can do that myself. Any ideas? Thanks --71.171.2.96 00:40, 31 October 2006 (UTC)[reply]

I saw a commercial yesterday for a little device that you plug into your cigarette lighter. It detects speed, acceleration, horizontal acceleration, optimum shift times, 0-60 time, etc... all the stuff you want if you are racing. It is probably what you want and it comes complete. Problem is that I have no idea what it is called since I have no interest in it. --Kainaw (talk) 01:31, 31 October 2006 (UTC)[reply]
I'm not racing or doing anything of that sort. The main requirement is that I can log the speed to a computer, so I need some sort of communication between the device and computer. That might be a good sign that components are cheap if someone is selling a device like you describe though. --71.171.2.96 02:55, 31 October 2006 (UTC)[reply]
See the article On Board Diagnostics, which has some information and links on feeding OBDII diagnostic data (such as speed) into a computer. --Canley 03:33, 31 October 2006 (UTC)[reply]

Are you looking to just log the data or do you need use or process the data in real time? Adaptron 11:12, 31 October 2006 (UTC)[reply]

In general, you're going to need to tap into the car's instruments or so, or use GPS or some other radio navigation system. The reason is the relativity of velocity; in a hot air balloon on a cloudy moonless night, you (and your computer) have no way of knowing how fast you're travelling with respect to the things you can't see. Similarly, in a car you have to either look at how fast the wheels are spinning (which is what the speedometer does), or else look at the ground visually (very hard!) or use a fixed reference system (i.e., GPS). Accelerometers are nice, but for a trip of non-trivial length eventually they will suffer from numerical error when trying to evaluate velocities. --Tardis 16:43, 31 October 2006 (UTC)[reply]

Algorithms and code

edit

Over the past few days I've been looking for an algorithm to decode a wave files. All I needed was a few lines of code. Most of the sites I went to had a lot of details but none with all of the requirements or the straight forward code. I was, however, finally able to put some code together and now after several days of doing nothing else have exactly what I wanted. so it occurs to me that if there was a place in this wiki where specific algorithms could be kept that not only would they be available for immediate use but would be straight forward and to the point. (I should probably start by posting the algorithm and code I created right here until a better palce can be found but since this stiff gets archive quite often eventually the code would probably get lost. Any suggestions? BTW... I was fooling around with my bar code scanner and looking at my new LCD screen on my other computer when it occured to me how neat it would be if my scanner could read bar codes right off the screen. I went looking for sites with bar code examples and guess what? It works! Must be a trillion applications that could use bar codes from a screen. Have no idea what any of them are. Maybe you can help. Adaptron 12:00, 31 October 2006 (UTC)[reply]

Hi there! While your idea is a good one in theory, that's not what Wikipedia is for. There are many other sites out there that function as code repositories, I suggest that you try to contribute to one of them.
As regards bar codes, yes, it could be useful. However, most people do not have a bar code scanner attached to their computer :) — QuantumEleven 13:19, 31 October 2006 (UTC)[reply]
The word "esoteric" does come to mind now that I think about it. Perhaps people are happier when things are more abstract and less concret. Adaptron 13:29, 31 October 2006 (UTC)[reply]

While Wikipedia isn't the right place for this, another wiki might very well be. Just a few days ago somebody wanted to post an algorithm to predict sunrise and sunset based on location and date. I suggested we may want to create a WikiCode wiki for the purpose of sharing code. What does everyone think ? StuRat 02:31, 1 November 2006 (UTC)[reply]

edit

I'd like to know what's the most popular wiki engine running on Windows/IIS platform in terms of installation base? Mahanchian 12:28, 31 October 2006 (UTC)[reply]

Wikipedia isn't software that runs on a server, it's script that's processed by the php interpreter, and that interacts with a mysql server. MySQL runs independent of the web server, and php I believe is supported by IIS. So download the mediawiki code, php, and mysql, set up your mysql server and your php configuration (it's mostly automatic with apache, not sure about IIS) --frothT C 18:16, 31 October 2006 (UTC)[reply]
I wasn't really asking about Wikipedia. My question is about other wiki engines which are out there. Mahanchian 19:21, 31 October 2006 (UTC)[reply]
And he wasn't talking about wikipedia, he was talking about mediawiki, the software that drives it, which also happens to be (Arguably) the most popular wiki tool in use today. Since our Comparison of wiki software article points out that most ALL common wiki tools are compatible with windows, your question is easily interpreted by the (possibly biased) stewards of the WP helpdesk as 'will wikimedia run on windows?'. Specific 'installation base' numbers are far harder to come by, especially considering that you may be interested in 'most popular by users', 'most popular by individual server', or anything in between. --Jmeden2000 21:07, 31 October 2006 (UTC)[reply]

Trying To Understand File Management In Linux

edit

If I have five HDs and load linux onto one of them, and run my Linux, where will I find the files? Since I'm used to my media being mounted at the root in Windows (I think I'm using the terminology correctly), I keep all the music on one drive, all my movies on another, all the work on another etc. I am currently unable to fathom where Linux will deem suitable to locate my files.

Furthermore, forgetting this particular situation, suppose I have my home/ directory and I put a few files in it, would these files be shared across different drives, even though they are in the same folder? Do I have any control over where Linux put my files? --Username132 (talk) 13:39, 31 October 2006 (UTC)[reply]

Depending on your specific flavor of linux, your drives will be one logical volume or a root with multiple mount points. Most flavors are going for the single logical volume now. So, you as a user do not consider it to be five drives. You consider it one big drive. When the first one is full, it will just spill over to the next one (technically, it spreads it all around for speed, but you don't want to get into that). The big difference between Windows and Linux is that in Windows you are constantly in the midset of "what drive am I on" or "what network connection am I on". In Linux, everything is mounted under the root filesystem. So, for me, my home is /home/kainaw. I have a fileserver for my business junk under /home/kainaw/fileserver. I put public files for others to use in /home/public/kainaw. I share program tools in /home/public/share/src. I have a webserver mounted in /home/kainaw/public_html/live (and my testing one is in /home/kainaw/public_html/test). My USB drive is /media/usb and my dvd player is /media/dvd. So, you can see that all of the different storage mediums appear from a Windows standpoint to be one drive. It is just a different way of looking at things. --Kainaw (talk) 13:57, 31 October 2006 (UTC)[reply]
To my knowledge, your hard discs will not automatically be "combined" in this fashion; instead, they should be labelled /dev/hda1, /dev/hdb1, etc. (Sometimes the letter s replaces h.) (If they are in fact partitions on one drive rather than really separate drives, they will probably be called /dev/hda1, /dev/hda2, etc..) But this isn't where the files are, it's where the representation of the disk itself is; to put the files somewhere, you (as root) use mount DEVICE DIRECTORY, where DEVICE is one of the names I've already listed and DIRECTORY is an existing, typically empty directory. Commonly such directories are put into /mnt; you could do something like
mkdir /mnt/music
mkdir /mnt/movies
mkdir /mnt/work
# Typically /dev/hda1 is already /
mount /dev/hdb1 /mnt/music
mount /dev/hdc1 /mnt/movies
mount /dev/hdd1 /mnt/work
and then all your files on those drives/partitions are available within the directories in /mnt. The mkdirs are permanent, but the mounts evaporate when the system shuts down; you can arrange for them to automatically happen at every boot with /etc/fstab. You may be able to get a hint as to what device names to use by typing just mount. Does that help? --Tardis 16:28, 31 October 2006 (UTC)[reply]
Older implementations of Linux keep the /dev/hd* model and you have to mount each drive to a mount point (except the root one, of course). Logical volume management is more common now. You will still see the drives in /dev, but you don't mount each drive to a mountpoint. On install, the LVM allows the partitions to span multiple drives, so you can have something like 2 (or more) drives be mounted under /home and not worry about which drive the files are put on. --Kainaw (talk) 16:43, 31 October 2006 (UTC)[reply]
Presumably one has to choose LVM explicitly; obviously the filesystems on various logically-connected drives cannot be pure classic ext or FAT or whatever (what if two drives carried a file with the same name?). As U132 has Windows filesystems on these drives already, it would not be immediately treatable as an LVM setup, yes? --Tardis 16:48, 31 October 2006 (UTC)[reply]
I said that when you install linux, it will use LVM to configure the drives inside your box. It formats them and sets them up for LVM. So, if you had one with NTFS and one with FAT32 and one with ext3 - you now have 3 of them completely erased and all treated as a single volume. That is now common in Linux. It doesn't mean you cannot add a FAT drive and mount it to /some/mount/point/i/like. My point for mentioning it is that in Windows, if you have 3 drives when you install, you have to remember where you put things (C:, D:, or E:). In Linux with LVM, you are using all three drives all the time without thinking about it - unless you explicitly tell it on install to not include one of the drives in the LVM. --Kainaw (talk) 17:08, 31 October 2006 (UTC)[reply]
Oh, I think this concerns me. I've got five drives in total and I don't want Linux coming along an erasing them all on install to include under some 'LVM'.
Tardis, regarding your mount suggestion, the mount command makes folders appear to be on specific drives, although actually they're not? This spreading around of files is "decreasing the mean time until failure", isn't it? Not to mention, if I pull out one of my drives for reading off another system, it wont be able to do it, because Linux has spread my data accross multiple drives.
Right now, I can take my music drive, plug it into any computer, and there are all my music and related files, right where they ought to be. If I use this mount command, it seems as though my music files are on my music file drive, but actually it's just a ruse? --Username132 (talk) 18:20, 31 October 2006 (UTC)
Any respectable version of Linux will have an installer that asks which drives (or partitions) to add to the LVM. You can omit those that you do not want to include. As for mounting, to use a drive in Linux, it must be mounted. You mount it to a directory, such as /mnt/music. The issue is getting rid of the concept of a C: drive and a D: drive and a E: drive and a F: drive and on to the concept of a root mount point / and everything is mounted somewhere below there. --Kainaw (talk) 21:01, 31 October 2006 (UTC)[reply]
Any set of physical disks on which LVM has been established should thenceforth be treated as one coherent chunk: you are welcome to move all the drives together to another system (although that system might require some minor configuration to understand that the disks should be consulted as a unit), but you can't move just one. That's the price paid for storage flexibility. Mount points are entirely unrelated: in Windows terms, you can think of the mount table as a set of "/path/to/mount/point/" -> "D:" mappings, where D is some drive letter; whenever any file name is used (to read or write), the longest mapped string which is a prefix of the file name is used and the rest of the path is a path on the corresponding device. This means that "/" -> "C:" can control the "base" or "root" filesystem, but it's still possible to use "/mnt/music/" -> "F:" to redirect a subset of file accesses to a different device even though everything begins with "/". Then a file /mnt/music/foo/bar/baz would actually be the file with "physical name" F:/foo/bar/baz. You could then, if you wanted, mount something at "/mnt/music/no/not/really/I/meant/video/instead/" -> "J:" and then accesses beginning with that path would go yet a third place even though they quite clearly begin with "/mnt/music/". The only "spreading" that occurs is that the "parent" filesystem (the one that owns the path in a mapping, like the music drive for the video mount I mentioned) must actually have a directory at the point where you add the other filesystem; its contents are irrelevant, since they will be invisible after the mount. Is that clearer? --Tardis 21:31, 31 October 2006 (UTC)[reply]
I've read your post a couple of times and I think that so long that an LVM is not established on any drive except the system drive, I can mount my drives somewhere and access them just like in Windows except there will be /some/unintelligible/crap before the important directories (like music/ and movies/ for example begin) - the drives will still work as separate entities, available to be removed individually, as I please. --Username132 (talk) 21:53, 31 October 2006 (UTC)[reply]
Yes, that's right (separate removal and all); however, there's nothing stopping you (as root) from making the "unintelligible crap" be as short as /f/Firestarter.mp3 and /g/Lost.mov. Most people just find (especially with tab completion and the ability to make symlinks) that using the more-explicit style of prefix (like "/mnt/music/") is more convenient. --Tardis 15:52, 1 November 2006 (UTC)[reply]

It's much cleaner just to use a RAID controller and have the filesystem treat it as one gigantic drive --frothT C 18:20, 31 October 2006 (UTC)[reply]

Bug: linking to downloads

edit

Dell computer, browsing with IE. For the last week about a third of the time whenever I click a link, be it at Wikipedia or elsewhere, instead of linking I get a "download file" dialogue box. I have restarted twice, run norton without it finding any virus, have three separate anti-spyware programs running, and I defragmented a few days ago. I have made no voluntary modifications to any of my computer's settings. Anyone have any ideas? Maybe a malicious script or something changed a setting on my computer that I can change back? Would me best bet be to reinstall internet explorer? It's an extremely annoying bug--Fuhghettaboutit 14:43, 31 October 2006 (UTC)[reply]

When you request a file (by clicking a link) from a webserver, it responds by sending you that file along with some extra information, such as the content type, which tells your browser what kind of thing is really coming (audio file, web page, raw text, image, …). Your browser can use that information to determine what to do with the file it receives (show in the browser window, play with an audio player, give you the download dialogue box, …). When requesting a web page, somewhere in the response from the server is probably the line "Content-Type: text/html;". Perhaps your browser has forgotten what it is supposed to do with that kind of file, and instead displays the dialogue box. I'm afraid I don't know how you can reset it. —Bromskloss 15:29, 31 October 2006 (UTC)[reply]
Thanks for the information. Now if only I had a fix!--Fuhghettaboutit 15:32, 31 October 2006 (UTC)[reply]
Perhaps your keyboard is faulty? I believe Shift+click requests a file download. Try typing in Notepad or so, and see if you get any unexpected capital letters (or commands; it could be Control or Alt as well). --Tardis 16:08, 31 October 2006 (UTC)[reply]
In firefox shift click is open in new window, control click is open in new tab, and alt click is download --frothT C 18:29, 31 October 2006 (UTC)[reply]
Thanks everyone. I had an old keyboard lying around and hooked it up. No difference. I'm getting a new computer in a few months anyway, and maybe this problem will just vanish in a few days. Let's just chalk it up to gremlins.--Fuhghettaboutit 18:43, 31 October 2006 (UTC)[reply]

I have a thought, perhaps IE is set for "automatic upgrades" but your security settings are such that you are prompted whenever a download of an update is attempted. When a download fails (because you refuse it), it may just wait for some time period and/or some number of interactions, then try again. It could also be software for your ISP or an anti-virus program, or some other software, which is attempting automatic updates. As a test, I suggest you "turn everything off". That is, stop Norton and all the other extraneous software, and use the Task Manager to make sure everything you can shut down is really shut down all the way. Then pick some links in Wikipedia, which hopefully won't try to load a virus onto your system, and see if this behavior changes. If this cures it, then you need to track down which one of the stopped programs was the culprit. If this doesn't cure it, then shut down IE and try another browser, like Firefox or Netscape. StuRat 02:04, 1 November 2006 (UTC)[reply]

Hard Drive Recognition in SUSE Linux

edit

I just installed SUSE 10.1 Linux, which I am dual booting with win xp. I have a total of four physical hard drives on my system. Two are IDE and two are SATA. BIOS recognizes all of them. Windows recognizes all, except for one SATA drive because it is one big partition over 300gb. However, the really strange thing is that SUSE recognizes both SATA drives, but not either of my IDEs. This keeps me from using linux with any regularity, because at the moment most of my personal data is on the IDEs. I'm excellent with windows, but a linux noobie. Any advice would be greatly appreciated.

First of all SATA is an IDE standard, and the old IDE was retroactively named PATA. Not sure why suse's giving you trouble though. The XP recovery console doesn't recognize my SATA hdd unless I have the drivers loaded onto my thumbdrive and it's in the usb port, try that? --frothT C 18:23, 31 October 2006 (UTC)[reply]

I'm lost, are you saying try finding the linux drivers for my PATA drives? Anybody else?? The more insight the better. Thanks a lot guys.

Sorry, first I was correcting you on your incorrect use of "IDE" being different from "SATA" when SATA is actually an IDE drive. What you mean is PATA and SATA. I'm suggesting that you go into windows and try to find drivers for your hard drive (from your laptop provider if it's a laptop) put them on a cd or thumbdrive, and hope that suse detects them --frothT C 02:57, 1 November 2006 (UTC)[reply]

Gotcha, yeah I forgot that technically they're both IDE, while one is parallel and the other serial. I'll give it a shot. Thanks!

Dilemma: DVDs, macrovision, and other anti copy protocols

edit

Okay heres my problem: Im trying to make my computer into a sort of media center. I already have a new video card which can output S-Video to my telelvision. I wish to purchase a DVD player for the computer so that i can put the dvd in it and play it back through to the TV and still maybe be able to do things on my monitor. The problem is, my TV has a built in VCR. I know that plugging a regular DVD player to it makes the picture mess up and get lighter and darker, like macrovision maybe? so will i be able to see the image when i use my computer? my thought is because it is the graphics card which is outputting the signal, it might go through. I have no intention of copying my purchased DVDs to a VHS tape, thats just silly. i only want to know if i will be able to view it on my television. Anyone know the answer to my question? thanks for the help! :)

Mike [[[User:172.162.48.59|172.162.48.59]] 19:22, 31 October 2006 (UTC)]

While there is no way to say for certain if it will happen, it is possible for a modern PC to be subject to Macrovision copy protection, which is typically implemented in DVD player software and on video cards with TV outputs, and is enforced by operating system drivers. There are 'workarounds' depending on the details of your setup, but that's probably not up for discussion on this forum. Don't you just love the DMCA? --Jmeden2000 20:56, 31 October 2006 (UTC)[reply]

What a pain. all i want is to WATCH the DVD material. not really a crime! ;) -Mike

Get a nice digital TV with VGA inputs --frothT C 02:59, 1 November 2006 (UTC)[reply]

Shell program

edit

Hello all, I'd really be grateful if some one helped me with this.I have an assignment and I'm required to do a program similar to the linux shell using c++ and under windows.This program shall be able to execute some system calls like cd, mkdir, mv, ls, kill, ps, etc. and we shouldn't use the exec function. So can some body plz tell me what r the API functions that i can use to execute these commands?? coz i'm really clueless ! Thanks in advance.

Yasmeen

Try ShellExecuteEx or ShellExecute. You should be able to just pass the name of the command (del, move, etc.) as lpFile, and the arguments to whatever command you are using as lpParameters. lpVerb (or lpOperation) would probably be "open". Other than that, see the links. There are lots of other related functions listed in the left pane of the MSDN links. Hope this helps --Bennybp 04:11, 1 November 2006 (UTC)[reply]
Are you sure you are supposed to execute external programs at all? Based on solely your description, it might be that you are expected to implement a program that both reads the command text and then interprets it, or in other words, your own program should rename, remove or copy files according to the user command. 130.233.228.9 13:47, 1 November 2006 (UTC)[reply]

yes, my program should read the user input and execute that command

Content Management System (or similar) for hosting user-submitted files

edit

I'm creating a website. I know very little PHP or mySQL, so many of the websites features (e.g. forums, blogs) were created using a variety of CMSs. Now I'd like to add the capability for users to be able to upload files, (in this case open-source code libraries) and categorize and tag them. Preferably, they would also be able to submit new versions of the file (like the latest version of a library).

Anyone know of any software that would allow me to add this feature to my site?

Thanks! --- Michael

Yep, Joomla is a very good and easy to use CMS. It has many features, is open-source and requires no real programming (unless you decide to do more advanced things). You can grab it from: http://www.joomla.org/. It is good because you can 'install' extensions easily which are like programs to run on the website, like user blogs, photo galleries, games, forums, with a centralised user database. Ronaldh 13:37, 3 November 2006 (UTC)[reply]

Skype

edit

I was looking at Skype, but couldn't find an answere. Is skype (the sowtware at least) free to download and use? MHDIV Englishnerd 20:14, 31 October 2006 (UTC)[reply]

Yes (the Skype website explains this, I think). It's free to call one computer from another. --Username132 (talk) 20:39, 31 October 2006 (UTC)[reply]
You can't call a skype number from a normal phone without paying --frothT C 02:47, 1 November 2006 (UTC)[reply]

Windows vs SuSE Linux server platforms

edit

We are a small nonprofit organization with a plan to create a large digital archive - text, audio, video material - that will be used in house and eventually offered to the web. The hard drive array is being installed soon by a generous donor - I've been told: SATA in a SAS (Serial Attached SCSI) Infrastructure. We need to select a server operating system. The choice offered is: Microsoft Windows Server 2003 R2 Datacenter Edition or Novell SuSE Linux Enterprise Server Application Platform. We have some Linux expertise, but are mostly familiar with Windows. Is it a fair distinction to say: less security with Windows, increased administrator complexity with Linux? We will have to learn to do everything, how to educate ourselves to make the decision that will work for us now and in the long term. Many thanks, Tom

It is not necessarily true that Linux is more secure than Windows. The "hackers" that just copy scripts from others tend to get hacks for Windows servers - so the population exploiting the weaknesses end up being much larger for Windows weaknesses than Linux weaknesses. Also, it is not necessarily true that Linux is harder to administrate than Windows. If you had to install a peer-to-peer service that will only run between 11pm and 2am and grants access to a specific IP address to a certain backup directory in Windows 2003, do you know how to do that? Probably not. You have to look it up. Knowing how to drag and drop files is not administration. Chances are your "administrators" know very little about what will be required in either Windows or Linux. They just get a warm and fuzzy feeling by sticking with Windows. All in all, I base the decision on money - not the cost of the OS - the cost of everything else. I've only had one Windows box since 1998. All of my other computers are Linux/Unix. Yearly, the Windows box costs me about $400 in new software/licenses. Linux/Unix costs me $0. Soon, we will be required to have more software on the Windows box (due to the idiocy of management), which will bump the cost of that server to about $3000/year. The program we are licensing is available for Linux at no cost. But, it gives the management a warm and fuzzy feeling to license the Windows version. Oh - and a SAS is nice. My fileserver is a small gateway server with a 4TB SAS JBOD connected to it. The server has died twice, but the JBOD kept the files nice and safe. --Kainaw (talk) 00:50, 1 November 2006 (UTC)[reply]
That's not exactly an accurate description of security; linux is inherently more secure than windows. If anything the focus has been on linux security; it's far more interesting than the overcomplex Windows --frothT C 02:46, 1 November 2006 (UTC)[reply]
I'm not sure if this has canged (I doubt it), but it used to be that msWindows tries to shield you from the details. This means that for newbies it's easier, but if the standard solutions don't work and you want to (have to) get down to the nitty gritty hardware details, msWindows won't let you (because it assumes you are too stupid for that or something). Linux traditionally only let yo work on the nitty gritty level, but has in the last few years started giving you the simpler msWindows options as well. Still not as good as msWindows, though. But it seems Suse is the best in this field. Also, when it comes to networks, Linux used to be the best, hands down (internet works instantly after installation), but Microsoft seems to have caught up in that field. DirkvdM 12:17, 1 November 2006 (UTC)[reply]