Wikipedia:Reference desk/Archives/Computing/2008 March 7
From Wikipedia, the free encyclopedia
Computing desk | ||
---|---|---|
< March 6 | << Feb | March | Apr >> | March 8 > |
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. |
[edit] March 7
[edit] Default Connection
I am currently running OSX 10.5 If i have to connections to the internet (Wifi and a 3G Modem) What will my computer default to?--196.207.47.60 (talk) 13:40, 7 March 2008 (UTC)
- I don't know for sure but with my Macbook if I don't turn Airport off it will go with that if it has a signal, no matter what else is plugged into it, I believe. --98.217.18.109 (talk) 15:39, 7 March 2008 (UTC)
-
- In the Network Preferences, find the little gearwheel under the list of interfaces on the left. One of the options there is "set service order", which will allow you to specify the priority you want (and is a lot harder to find than the equivalent function on older versions of OS X!). I tend to put things like modem and bluetooth, which I would be turning manually on and off, at the top of the list, so that when I turn one on it takes over automatically. Then wired ethernet (I can unplug it if I don't want to use it) then wireless. 81.187.153.189 (talk) 22:43, 10 March 2008 (UTC)
[edit] Creating a wiki like wikipedia?
How can I start one up? Thank You Very Much! --Coltrum (talk) 01:04, 7 March 2008 (UTC)
- Try wikia or set up your own web server and install mysql and apache and set up mod_php :D\=< (talk) 01:36, 7 March 2008 (UTC)
to hard i need a basic wikipedia type database to get started. --Coltrum (talk) 01:48, 7 March 2008 (UTC)
they never help me --Coltrum (talk) 01:58, 7 March 2008 (UTC)
ok i downloaded both and now i need to know to set up a web server how? --Coltrum (talk) 02:07, 7 March 2008 (UTC)
- Have a look that this Think outside the box 10:52, 7 March 2008 (UTC)
[edit] Laptops in Aircraft
If you have a laptop on your person in high altitude can it be damaged by the altitude difference if it is on.--logger (talk) 03:47, 7 March 2008 (UTC)
- I would say on civil aircraft no. If you are talking about a military flight, where you need an oxygen mask, that is a whole different ballgame. -- Q Chris (talk) 14:30, 7 March 2008 (UTC)
- Completely original research, but I've used my laptop on flights from Hawaii to mainland US and from NYC to Dublin, and many other shorter flights (which presumably didn't get as high) and had no problems at all. --LarryMac | Talk 03:55, 7 March 2008 (UTC)
- Vibrations from takeoff and landing (or maybe turbulence) would frag a non-solid-state drive pretty quick. Air pressure doesn't change much. Change in gravity isn't an issue. I don't think I'm missing anything :D\=< (talk) 04:07, 7 March 2008 (UTC)
-
- At some sufficiently-high altitude, the flying read-write heads in the hard disk drive will be unable to fly and will crash into the media. Similarly, the less-dense air will be unable to sufficiently cool the chips in the laptop. But that altitude is higher than the "altitude" that the cabin is ordinarily allowed to ascend to. Still, your laptop will probably run hotter, having a minor effect on its ultimate lifetime per the Arrhenius equation.
-
- (ec) Air pressure changes enough to cause several issues, although for civil aviation they're managed and mitigated. FAA regulations mandate that, for passenger aircraft, the cabin pressure be no lower than the pressure you'd experience at 8000ft in the open (ref), which gives a pressure level of around 75% of that you'd experience at sea level (ref). That's not a huge change, but if your laptop contained any air-filled voids that weren't open to the outside (i.e. that didn't depressurise along with the cabin) that would exert a quite nontrivial force, enough to cause thin-walled enclosures to swell a bit. So for this reason laptops, along with other electronic devices, don't contain such voids (there's always a channel connecting any non-solid space to the outside world). This poses a problem for the design of hard disk drives, which depend on having very clean air inside (dust getting in is devastating); they have foam plugs that fill the channel between the inner void and the outside, allowing the air pressure to equalise without risking inducting dirt from outside into the platter void. A second air pressure issue is cooling - PCs and (most) other electronic systems shed excess heat by dumping it into the surrounding air. As the air pressure at altitude is lower, there's less air mass into which to shed that heat, and so cooling systems are proportionately less efficient. So your laptop fan will have to work a bit harder to keep the system cool (and if you're mad enough to radically overclock your laptop you would be increasing the chance of overheating). Now there's also cosmic rays, which you do encounter a bit more at altitude, although I really don't know to what practical degree (this guy's claims that it's quite a lot). Of course none of this stops millions of people using their laptops on commercial flights every day, to no ill effect other than annoying the bloke next to them. -- Finlay McWalter | Talk 13:32, 7 March 2008 (UTC)
- In what way is it annoying to the bloke next to me if I'm using my laptop? --LarryMac | Talk 14:11, 7 March 2008 (UTC)
- Once I sat between weird-porno-guy and guy-watching-odd-slapstick-while-making-sinister-choking-noises-guy. Which one were you? :) -- Finlay McWalter | Talk 14:23, 7 March 2008 (UTC)
- In what way is it annoying to the bloke next to me if I'm using my laptop? --LarryMac | Talk 14:11, 7 March 2008 (UTC)
- (ec) Air pressure changes enough to cause several issues, although for civil aviation they're managed and mitigated. FAA regulations mandate that, for passenger aircraft, the cabin pressure be no lower than the pressure you'd experience at 8000ft in the open (ref), which gives a pressure level of around 75% of that you'd experience at sea level (ref). That's not a huge change, but if your laptop contained any air-filled voids that weren't open to the outside (i.e. that didn't depressurise along with the cabin) that would exert a quite nontrivial force, enough to cause thin-walled enclosures to swell a bit. So for this reason laptops, along with other electronic devices, don't contain such voids (there's always a channel connecting any non-solid space to the outside world). This poses a problem for the design of hard disk drives, which depend on having very clean air inside (dust getting in is devastating); they have foam plugs that fill the channel between the inner void and the outside, allowing the air pressure to equalise without risking inducting dirt from outside into the platter void. A second air pressure issue is cooling - PCs and (most) other electronic systems shed excess heat by dumping it into the surrounding air. As the air pressure at altitude is lower, there's less air mass into which to shed that heat, and so cooling systems are proportionately less efficient. So your laptop fan will have to work a bit harder to keep the system cool (and if you're mad enough to radically overclock your laptop you would be increasing the chance of overheating). Now there's also cosmic rays, which you do encounter a bit more at altitude, although I really don't know to what practical degree (this guy's claims that it's quite a lot). Of course none of this stops millions of people using their laptops on commercial flights every day, to no ill effect other than annoying the bloke next to them. -- Finlay McWalter | Talk 13:32, 7 March 2008 (UTC)
-
-
-
- Also the size of your laptop is often correlated with the amount of annoyance. People with monster laptops end up pushing their elbows out to the side in order to type on them, given the cramped conditions of modern flight. And that's kind of annoying. But not as annoying as the person in front of you deciding that they'd like to push their seat back far enough to put their head in your lap, which seems to be quite common in my experience. --98.217.18.109 (talk) 15:38, 7 March 2008 (UTC)
-
-
-
-
-
-
- When man first dreamt of flying through the sky he had no idea of the horrible sacrifices he would have to make in order to do so. 206.252.74.48 (talk) 16:16, 7 March 2008 (UTC)
-
-
-
-
-
-
-
-
- Right right. We should all be happy with whatever we get, no matter how shoddy the service is, no matter how unnecessarily irritating our fellow man can be with his lack of consideration for others. Why have standards? It could always be worse. And so it will be. --98.217.18.109 (talk) 23:41, 7 March 2008 (UTC)
-
-
-
-
/me smells Sarcasm. Kushal 20:59, 7 March 2008 (UTC)
- Hoping that someone still reads this thread... what means to "frag a non-solid-state drive", as mentioned by :D\=< above? And what's the best way to prevent it (other than not flying with a labtop)? Thanks, Ibn Battuta (talk) 06:38, 10 March 2008 (UTC)
-
- D\=< is wrong. Laptops (and their flying disk heads and platters) will routinely survive the sorts of shock loads imposed by turbulence. The force that the head mount imposes on the air bearing is much larger than the G-loads imposed bythe external vibration.
-
- Atlant (talk) 16:47, 10 March 2008 (UTC)
- I would expect to see a cheap drive head crash after one rough landing, or a few miles of clacky train track. Oh and I mean if it's in use-- yeah if the laptop's just sitting in your case it's fine, Atlant is right. But combine an in-use drive platter spinning at 5200 times per minute with a sharp metal drive head smashing downward, and you have data loss. :D\=< (talk) 19:03, 10 March 2008 (UTC)
- Atlant (talk) 16:47, 10 March 2008 (UTC)
-
-
-
- Do you have any actual experience, or references, or anything to back up your claims?
-
-
On the cosmic ray side of things, an IBM study in the 80s found that you were 5 times more likely to experience bit rot from cosmic radiation in Boulder, Colorado at about 1 mile above sea level, than in New York City. You were ten times more likely to see errors in Leadville, Colorado at about 2 miles above sea level. If that continues linearly (and I'd have to go re-read the study again to be sure), then a laptop at 30,000ft would be 30x more likely to experience memory problems than one at sea level. Lattitude also figures, though. That said, I've been running machines at 10,000ft for a looong time, and I've never been bothered by any more than the usual instability. --Mdwyer (talk) 21:40, 10 March 2008 (UTC)
[edit] batch file (.bat) to rename all the extension of some file -including- in all subfolders
Hello, I'm completely new to Windows scripting and I hosted a VB board for very long but now is the time to shutdown... I still want to be able to use all the attachement that were uploaded to the VB board, but they are all named in the format #.attach where # is an integer. I found that this script :
ren *.attach *.jpg
could do the trick, -but- the trick here is that vbuiltin put all those attachement in folders that contain subfolders, that contain other subfolders. I would like to be able to apply this batch command to all file in subfolders included.
How can I do that Esurnir (talk) 15:57, 7 March 2008 (UTC)
- hmmm it seems like there wasn't only jpg in the archive, is there any way to look into the file and if the first hex match a certain type (like FF D8 FF for jpg) rename the file to the correct extension ?
- I can live without but it would help Esurnir (talk) 16:33, 7 March 2008 (UTC)
-
- Well, I had this solution for you that I thought should do the trick, but that was prior to that added twist. I really don't think batch is going to be the answer if you need to look at the file contents. For the record, here's what I came up with previously. You'd want to find a way to test this on a small set of data -
for %%i in (dir your base directory here /ad /s /b) do ( cd "%%i" ren *.attach *.jpg )
recursive walking through a directory structure is much easier with JPSoft's 4DOS & 4NT.
4DOS (v7.58) is now free since DOS/Windows9x is now out of date but it can't see long file names in windows NT - use 4NT (or the current version - TakeCommand au$79.95) for it's 30 day trial (www.jpsoft.com)
If you need to go more than about 4 layers down you need to set stacks= higher in config.sys (4NT has a limit of 32 layers deep)
this is ren-all.bat
for /d %d in (*.*) do (cd %d & call %0 %d & cd ..) if ISFILE *.attach for %f in (*.attach)( if %@FILEREAD[%@FILEOPEN[%f,r],3]==0xFFD8FF ren %f %@name[%f].jpg )
- this is off-the-cuff & would need debugging
- I think the signature is 'JFIF' at 6 bytes in which would be
if %@right[4,%@left[10,%@line[%f,0]]]==JFIF ren %f %@name[%f].jpg
Alanthehat (talk) 21:04, 13 March 2008 (UTC)
[edit] BNF for a quoted string
BNF - Backus–Naur form
I was working on some BNF rules and I started working on clearly defining a quoted string. This is any string of characters that begins and ends with a double-quote, such as "this is a quoted string". The issue is with escape characters. I'm using the backslash, so I can use "escape looks like\"". So, obviously, a BNF that just demands a beginning and ending quote won't work because "something \" is not valid. This led to wonder if someone has written a nice concise BNF for a quoted string. If so, what does it look like? -- kainaw™ 19:30, 7 March 2008 (UTC)
- This description of Java in BNF describes it by defining:
- <string literal> ::= " <string characters>?"
- <string characters> ::= <string character> | <string characters> <string character>
- <string character> ::= <input character> except " and \ | <escape character>
- where presumably an escape character is a " or a \ followed by a single string character. Does that help? grendel|khan 19:43, 7 March 2008 (UTC)
-
- It appears that there is no way around the ambiguity of the escape character without clearly defining a non-escaped character as anything except a \. The problem I have is that I don't think "Anything except..." is proper BNF. So, I was trying to avoid that as well as avoid typing out every possible character except the \. -- kainaw™ 01:40, 8 March 2008 (UTC)
- In my day, when compilers were being written you would handle quoted strings in the lexical analysis phase, sometimes called the scanner. One reason for doing this was performance. It gets tedious to handle all the low-level details in the BNF, and it may not be very fast. Also, there is usually some corner of the grammar where you have to 'cheat' (no context-free grammar for the language feature may exist) and the scanner can handle the funny cases in regular procedural code. EdJohnston (talk) 02:36, 8 March 2008 (UTC)
- It appears that there is no way around the ambiguity of the escape character without clearly defining a non-escaped character as anything except a \. The problem I have is that I don't think "Anything except..." is proper BNF. So, I was trying to avoid that as well as avoid typing out every possible character except the \. -- kainaw™ 01:40, 8 March 2008 (UTC)
-
-
- Saying "this production except ..." is OK for Extended BNF. --sean —Preceding unsigned comment added by 69.134.115.242 (talk) 17:36, 8 March 2008 (UTC)
-
(Alanthehat (talk) 22:29, 13 March 2008 (UTC))
[edit] Why is tr working differently on one server?
On every server but one:
$ sh -c "echo 'abc123' | tr -d '[:alpha:]'" 123 $ sh -c "echo 'abc123' | tr -d [:alpha:]" 123
On one server:
$ sh -c "echo 'abc123' | tr -d '[:alpha:]'" 123 $ sh -c "echo 'abc123' | tr -d [:alpha:]" bc123
The versions of bash (3.2-0ubuntu7) and coreutils (5.97-5.2ubuntu3) match up. All servers are running Ubuntu 7.04 (Feisty). Is the latter form something that isn't really guaranteed to work, and it's weird that it is working on one machine? If I'm using a packaged script which uses the latter form, should I file a bug requesting that they use the former? grendel|khan 19:39, 7 March 2008 (UTC)
- You should. I tested these on a OpenBSD system (grex, to be exact), with these results:
grawity@grex:~ $ sh -c "echo 'abc123' | tr -d '[:alpha:]'" 123 grawity@grex:~ $ sh -c "echo 'abc123' | tr -d [:alpha:]" abc123 grawity@grex:~ $ echo 'abc123' | tr -d "[:alpha:]" 123 grawity@grex:~ $ echo 'abc123' | tr -d [:alpha:] abc123 grawity@grex:~ $
The form without quotes will be picked up by the shell and treated as a filename wildcard _if there is a filename that matches it_ (i.e. single letter in the set ':','a','l','p','h'), but will be passed to tr as-is if there is no such filename. —Random832 20:22, 7 March 2008 (UTC)
-
- Ah, you're right! I moved into an empty directory on the offending server (which happened to have a file called "a" in ~) and got the "proper" response.
$ touch a $ echo tr -d [:alpha:] tr -d a $ rm a $ echo tr -d [:alpha:] tr -d [:alpha:]
-
- This has been bugging the guys at the office for the last three weeks--it's the sort of thing that wasn't a problem for months and months until someone decided to name some scratch file "a"... and the brackets were interpreted by the shell. You guys are fantastic. I'll go file that bug. grendel|khan 20:37, 7 March 2008 (UTC)
-
- And isn't it always the way that after nailing down and patching a particularly recalcitrant bug, it'll turn out to have been fixed months ago upstream? Gah. grendel|khan 20:54, 7 March 2008 (UTC)
[edit] Internet Explorer 8
Hello, I have installed IE 8, now I want to deinstall it, but I don't now how. It is now shown at "software". So please can you teach me step-by-step what I have to do for deinstalling? Greetings, --85.178.36.102 (talk) 19:59, 7 March 2008 (UTC)
- Have you tried a howto such as this one? The key seems to be viewing the list of "Updates" specifically, as it doesn't appear as an installed program. grendel|khan 20:10, 7 March 2008 (UTC)
-
- First I haven't vista, second I don't know how to uninstall updates. Please help. -85.178.36.102 (talk) 20:16, 7 March 2008 (UTC)
Under Add/remove programs, there should be a check box that says "show updates" or something similar. Try checking/unchecking the box to see if you can see IE8 under it. I hope that helps. Kushal
- Add/Remove programs is found in the Control Panel (which may be under Settings in your Start Menu). Useight (talk) 23:54, 7 March 2008 (UTC)
Advertisement: By the way, did you know that Mozilla Firefox 3 is in active development? It would be great if you could it out. The nightly build for Firefox 3 beta 5 preview is currently available for free download from the Mozilla website. Kushal 20:55, 7 March 2008 (UTC)
- You can get old versions of Internet Explorer (or many other programs) at www.oldversion.org. It's pretty good for reverting to a different version of Windows Media Player or anything else that you think got worse with updates. Useight (talk) 23:52, 7 March 2008 (UTC)
- www.oldversion.org seems to be an add site? Think outside the box 15:50, 8 March 2008 (UTC)
- I believe Useight meant http://www.oldversion.com. Algebraist 17:04, 8 March 2008 (UTC)
- Ah, thanks. Think outside the box 10:09, 10 March 2008 (UTC)
- I believe Useight meant http://www.oldversion.com. Algebraist 17:04, 8 March 2008 (UTC)
- www.oldversion.org seems to be an add site? Think outside the box 15:50, 8 March 2008 (UTC)
[edit] Sending files over Bluetooth
Widcomm's Windows Bluetooth stack had a nice way to send files via Bluetooth - it was just like copying them. Microsoft's program to send files is just stupid. Is there any program (command-line preferred) to batch-send files over Bluetooth? I use Microsoft's stack on Windows XP SP2. --grawity talk / PGP 20:17, 7 March 2008 (UTC)
[edit] How to predict necessary server hardware by server role
I am an admin for the computer lab of a K12 school. We are about to replace the lab, likely with a dozen Vista PCs. We have one server that functions as a domain controller, file server, and print server. Also, each of the 30 students has a roaming profile. Assuming that our new server runs Windows Server 2008 Standard, how do I calculate (or whom do I ask about) the necessary hardware: speed/number of CPU cores, transfer rate of HD, speed of NIC, speed/amount of RAM (missing anything?). I can make minor adjustments after the purchase (like more RAM), but not buying 15000RPM SAS drives and a controller when they would have helped would be a pain, as would buying them when they were not necessary. If it makes a difference, I am eying something like an IBM x3200 or x3400. --41.210.1.120 (talk) 21:58, 7 March 2008 (UTC)
- Do you really need any of that? None of the things that you've mentioned are anywhere near CPU-intensive, and you are just getting Vista on the clients for memory hog and nothing else. A fast gigabit backbone is a must and it should have RAID arrays (RAID 5 with harddrives from different manufacturers would be nice, RAID 6 is even nicer) for speed/data security, but otherwise a dual-core Xeon (or if you're crazy enough, a quad-core Xeon) is just overkill. You should concentrate more on the networking and enough ram for Vista (or just go back to XP, or consider a Linux-based network like Edubuntu). --antilivedT | C | G 10:34, 8 March 2008 (UTC)
-
- Do I really need any of this? Well, that's my question, isn't it? I don't know! I immediately suspect your experience, though, when you suggest RAID 5 with different manufacturers, which is almost always a big no-no. Having cold spares of identical HDs is usually the preferred method of using RAID 5. Heck, do I even need RAID 5, or is RAID 1 enough? I'm thinking of 1 or 2 GB RAM in the clients, which will be doing lightweight tasks. Vista and Server 2008 have plenty of features I'm ready to use (improved Remote Access, improved Remote Desktop Connection, new Shadow Copy, etc). Stop bashing Vista. Remember when XP came out, and people like you were telling people to stick to 2000? Our current server is Fedora Core with Samba, and I have previously administered Edubuntu labs. Edubuntu does not fill my needs for this lab. The typing tutors offered on Linux, for example, are not nearly as full-featured as those on Windows. Also, OpenOffice's bibliography tools are a mess compared to MS Office's. And if you tell me that I can use crossover or wine, then I challenge you to look at the memory footprint of Edubuntu + CrossOver. It ain't no Damn Small Linux. I'm writing this from Ubuntu, and pushing 600 MB. I do suspect you are right about the relative unimportance of the CPU, though. --41.210.1.120 (talk) 00:08, 9 March 2008 (UTC)
-
-
- Well I like the notion of having some more time to do the replacing and recovery than having all drives from the same batch of the same manufacturer. With proper back-ups you don't even need RAID arrays, but then this is getting out of scope. I think you're using features for the sake of them being available, because I don't see why you need the new RDP when the old RDP is perfectly capable, and versioning can be done for ages through something like rdiff-backup. Also, I'm confused: why would a K12 school need bibliography of this scale? People have done them manually for ages, why would a K12 school REQUIRE some vendor-specific feature that is only recently available? Same for the typing tutor, are these actual feedbacks from the students themselves? I also question the benefits of moving to Vista, what do you need it for? Don't fall into the trap of useless software bloat. --antilivedT | C | G 03:21, 9 March 2008 (UTC)
-