Wikipedia:Reference desk/Archives/Computing/2007 July 7

From Wikipedia, the free encyclopedia
Computing desk
< July 6 << Jun | July | Aug >> July 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.


July 7[edit]

How can I connect both of these computers to the Internet?[edit]

My cousin has two computers that run on Windows. He uses Verizon DSL and a Westell 6100 modem. He has succeeded in connecting one of his computers to the Internet. He also wants to connect his second computer to the Internet. However, a tech support guy from Verizon said that that was not possible because the Westell 6100 modem only supports 1 computer. He said that my cousin has to purchase a router.

My cousin is very reluctant to purchase a router. Is there any inexpensive way he can connect both of his computers to the Internet? —The preceding unsigned comment was added by Metroman (talkcontribs) 00:00, 7 July 2007.

Yes, it's called a router. Seriously. You can buy a basic ethernet router/switch for under $30 [1]. Donald Hosek 22:09, 6 July 2007 (UTC)[reply]
I checked some stores in the neighborhood and routers were more than $60. My research says that the Westell 6100 modem also comes with router functionality. It has two ports, an Ethernet one and an USB one.
Or if you have a spare old computer lying around with 64mb of memory then you can install M0n0wall on it and let that do the routing is well. --antilivedT | C | G 22:43, 6 July 2007 (UTC)[reply]
Your Westell modem won't work as a router. Although it does have two connectors (like my Motorola SurfBOARD), you're only supposed to use one. Unless your modem has Network address translation (and I bet it doesn't), the modem wouldn't be able to figure out which packets belong to which computer. Just buy a router for $20. If you can afford $20 or more per month for a DSL subscription, you can afford a router. bCube (talk · contribs) 07:30, 7 July 2007 (UTC)[reply]
You've got two choices: You can purchase a dedicated NAT router, or you can turn one of the computers into a NAT router by installing a second network card and activating "Internet Connection Sharing". A cheap NAT router will cost about $20, a cheap network card will cost about $10. --Carnildo 23:15, 6 July 2007 (UTC)[reply]
The Westell 6100 is a router, but it has only one Ethernet port. You can use a switch or hub to plug multiple computers into it. --Bavi H 22:05, 7 July 2007 (UTC)[reply]
Late advice here, but Bavi H is on the right track. You need a switch or hub and not a router, which go for about 10 bucks. I use a linksys switch for my setup. Take the ethernet cord from the modem and put it into the "uplink" slot on the switch. Then plug your computers into the other ports on the switch.--GTPoompt(talk) 15:36, 12 July 2007 (UTC)[reply]

what was the first wikipedia article?[edit]

what was it?

As far as I recall, that info is lost. There was a database change or something a few years back and the info was lost. This has been asked several times before, maybe I'll search the archives and try and find a better answer before someone else who knows off the top of their head responds.... Dismas|(talk) 22:34, 6 July 2007 (UTC)[reply]
Ah, here you go: Wikipedia:Wikipedia's oldest articles. Dismas|(talk) 22:37, 6 July 2007 (UTC)[reply]

WP:OLDEST and UuU --ʇuǝɯɯoɔɐqǝɟ 22:39, 6 July 2007 (UTC)[reply]

Prior to wikipedia, there was another project called Nupedia. The first article posted on that was atonality ;

by Christoph Hust ; Posted 2000-07-25; reviewed and approved by the Music group; editor, G. B. Lane ; lead reviewer, Edward (Ted) McIrvine ; lead copyeditors, Bruce Hamilton and Ruth S. Ifcher .

Vista and Libertad[edit]

Okay so I bought Velvet Revolver's new album, "Libertad" today. I put it into my computer (running on window's vista home basic) and it doesn't recognize the CD. When I try going to Computer>Libertad, it just ejects the drive. What's wrong?

You're using Vista. *badumppsssh*. Seriously, could be a scratched disk, does it work in other computers or CD players? ...It could also be DRM, although I'm not very familiar with that --ʇuǝɯɯoɔɐqǝɟ 01:22, 7 July 2007 (UTC)[reply]
Yeah, I'm guessing DRM. I know the first album was notorious for heavy-handed DRM, so the label probably did it again. -- Kesh 05:14, 7 July 2007 (UTC)[reply]
DRM is not encoded on regular audio CDs.  Tcrow777  talk  19:18, 7 July 2007 (UTC)[reply]
Not true. --frotht 05:29, 8 July 2007 (UTC)[reply]
Linux ask you what section (the data or audio) should be played, much more intelligent than even Vista... --antilivedT | C | G 06:09, 8 July 2007 (UTC)[reply]
Copy protection generally works by modifying the CD layout so that the tracks are not visible to CD drives but are to Audio CD players (which generally uses the Analog data path to play CDs, unlike computer drives). As such, many brands of CD drives have problems recognizng them, but some can. Try a different drive. Or use the drive's analog output (there used to be analog out jack on older drives that plugged in directly to sound card, and swith media players to analog mode; or turn on the computer but do not boot the OS, put the CD in and plug in speakers directly to the headphone jack). --soum talk 08:19, 8 July 2007 (UTC)[reply]
Actually some are just simply mixed-mode CD. Windows will only display the first (data) part so you cannot get to the actual audio part to rip it. It's merely a "feature" of Windows. --antilivedT | C | G 22:01, 8 July 2007 (UTC)[reply]
They are not "mixed mode" CDs (the data and audio tracks cannot be mixed in any order). The audio tracks MUST precede ALL audio tracks, or audio CD players wont be able to see them. And Windows definitely doesnt have problems with mixed mode CDs or enhanced CDs. It is able to properly see all tracks. If it does not happen to recognize the tracks, you wont be able to access it via Windows Explorer, but you can use burning software to extract the raw tracks or use address remapping to get it to do so (like using Mt. Rainier discs on non MRW drives with software drivers). But with copy protected CDs, the disc is not recognized at all (the drive continues to show as empty), its because the drive does not recognize the disc and has nothing to do with windows. It would behave the same on all OSs. Copy protected CDs use a lot of techniques on the data track like not closing it, or having the TOC point to locations outside the physical boundary of the discs (I cant remember the website I read it, but I can remember I reached it when I was trying to get the source of CDBurnerXP). Most drives have problems with such discs and that what allows the copy protection system to work (unless you go the Sony/BMG way and install a filesystem driver hidden behind a rootkit).
A simple black marker to cover the data track is all is needed to make the discs usable.
(Dont look at that unless you have to) --soum talk 10:37, 9 July 2007 (UTC)[reply]

I.T[edit]

How I.T related to Philosophy?

Among many other things, you might look at Open source, and Unix philosophy, for starters. These are not universal concepts in IT, but they certainly qualify. Nimur 05:48, 7 July 2007 (UTC)[reply]
I have my own philosophy concerning this, it's called do your own homework --ʇuǝɯɯoɔɐqǝɟ 05:53, 7 July 2007 (UTC)[reply]

I.T. is thoroughly drenched in the viscous impenetrable sludge of philosophical inquiry. Indeed, the academic disciplines currently promoted as "computer science" in most institutions walk hand-in-hand with entrenched and long-standing philosophical traditions, conjecture and speculation. This relationship is so fundamental, so thorough, that it is probably more sensible to ask how I.T. is not related to philosophy.

For example, just a tiny sampling would include:

It is impossible to gain even a rudimentary understanding of I.T. without confronting fundamental principles and questions of philosophy, whether you recognize them or not. dr.ef.tymac 14:15, 7 July 2007 (UTC)[reply]

Virus!!!!!!!! Alert[edit]

I have my 2Gb mp4 but the problem with my mp4 it has a trojan virus. how could i remove the f*cking virus??????

Delete the file? Splintercellguy 02:26, 7 July 2007 (UTC)[reply]
Normally, whatever program you used to detect the virus can also delete/quarantine the file. - Akamad 05:04, 7 July 2007 (UTC)[reply]

You could reformat the player's hard drive and re-sync your music. 68.44.59.204 21:36, 7 July 2007 (UTC)[reply]

What virus? (mp4 is usually a media container.) Epylar 02:27, 8 July 2007 (UTC)[reply]

Installing Operating Systems on Different Hardware[edit]

Greetings. Does anyone know if it is possible to install Mac OS X on a Windows-based PC? For example, I have a Compaq Presario Desktop computer, currently running Windows XP. Is it still possible for me to install the Mac operating system on it, from a disc? Thanks.Folger 02:56, 7 July 2007 (UTC)[reply]

Short answer: no. --cesarb 03:01, 7 July 2007 (UTC)[reply]


As far as OSX, I believe not, although I've heard of OSX running on everything from Apple TV to Xbox 360. If you're talking about OS in general, then yes, although they have to be modified. For example, Linux variants run on everything from iPods, to PDAs, to Macs, to toasters, to xbox, to routers... the list goes on and on. If you want to replace your Windows XP install, you could consider linux. If you want advice on that, leave a note on my talk page, so it doesn't fill this place up. Not to mention, if you just want the LOOK of OSX, Linux can replicate it fairly accurately --ʇuǝɯɯoɔɐqǝɟ 03:36, 7 July 2007 (UTC)[reply]
Sure you can, but it's illegal. Splintercellguy 03:34, 7 July 2007 (UTC)[reply]
It is not illegal if you buy it from Apple; you can install the Intel-based version of Mac OS X, but I recommend you go the way of Linux with KDE instead; you will have to istall either OS on a separate partition and there are a lot of Hardware compatibility issues.  Tcrow777  talk  03:41, 7 July 2007 (UTC)[reply]
Is it illegal if you buy it from Apple? No, because it won't work. The OS X EULA prohibits using OS X on a computer that is not Apple branded and EFI will prevent such an installation. The Intel version of OS X can run on standard PCs, but emulation of EFI and sometimes SSE3 is required, making the computer's operation generally slower (than running Linux on the equivalent PC) and unsatisfying. Please note that modifying OS X to not check for EFI is clearly against the terms of the OS X EULA. Freedomlinux 01:06, 13 July 2007 (UTC)[reply]
The InsanelyMac.com forum probably has more information on installing OSx86. Splintercellguy 04:12, 7 July 2007 (UTC)[reply]
The OS X EULA IIRC requires OS X be installed on a Mac, so yes, it is illegal. Furthermore, OS X as obtained from Apple won't boot in a PC -- the copy has to be modified. —Preceding unsigned comment added by 149.135.20.212 (talkcontribs) 06:15, 7 July 2007 (UTC)[reply]
It is anti-trust to require that OS X be installed on a Mac Computer.  Tcrow777  talk  06:19, 7 July 2007 (UTC)[reply]
Not really. Apple sells Macs, not Mac OSX. There is no reason a consumer would be forced to use OSX, so your point is null. Please don't suggest our users break the law based on your highly questionable opinion of the law. --ʇuǝɯɯoɔɐqǝɟ 06:29, 7 July 2007 (UTC)[reply]
(comment removed by author--appears to be addressed below, so was redundant) Epylar 02:31, 8 July 2007 (UTC) Epylar 02:33, 8 July 2007 (UTC)[reply]
It's NOT against the law, and even if it was protected under the DMCA it has a clause specifically protecting an individual's right to tinker- you just can't distribute information regarding bypassing security. Also apple does sell osx... at an insane price I might add, since it's really just a gui and a set of drivers plus free software --frotht 05:27, 8 July 2007 (UTC)[reply]

You will need to modify Mac OS X, because the "Trusted Platform Module" (TPM) is embedded inside those litle Intel-based Macs to make it to where you cannot install Mac OS X on PCs, but there is a way, the OSx86 Project has found one and there website is right here.  Tcrow777  talk  06:44, 7 July 2007 (UTC)[reply]

What, "…opinion of the law." I know about this. Apple sells OS X separately (how do you upgrade?) so it is anti-trust.  Tcrow777  talk  07:10, 7 July 2007 (UTC)[reply]
The Trusted Platform Modules inside Macs were never used, and newer Macs don't have the TPM inside them anymore. Just wanted to point that out. bCube (talk · contribs) 07:22, 7 July 2007 (UTC)[reply]
I don't believe you! Do you have a website to back that up (this is not an article or something, but I want more solid evidence in order to believe you).  Tcrow777  talk  07:59, 7 July 2007 (UTC)[reply]
This site says: "At the time of this writing (October 2006), the newest Apple computer models, such as the MacPro and possibly the revised MacBook Pro and the revised iMac, do not contain an onboard Infineon TPM. Apple could bring the TPM back, perhaps, if there were enough interest (after all, it is increasingly common to find TPMs in current notebook computers), but that's another story." The site also mentions that MacOSX never used the TPM in the OS. -- JSBillings 12:32, 7 July 2007 (UTC)[reply]
You say "anti-trust" like it was something meaningful here or some straightforward piece of the law. It isn't. When you violate a EULA technically you are violating copyright. Even the OSx86 wiki people know this and thus have the standard "we're not telling you how to break the law, we're just talking about it in the abstract!" disclaimer that all piracy sites have, and that courts have held to be worthless, at the bottom of their FAQ. --24.147.86.187 11:33, 7 July 2007 (UTC)[reply]
No, no no no no no no. You're wrong- most courts do not honor EULAs as binding. They're just a part of the software that you have to click a button to pass and has some text scroll by, it's not an actual contract and it's not binding and it's definately not a violation of copyright.. that wouldnt even make sense --frotht 16:00, 7 July 2007 (UTC)[reply]
If a EULA were treated as a copyright license then yes, it would make sense, in the same way that the GFL makes sense and restricts what someone can or cannot do with a piece of software. In any case, EULA enforcibility depends on a lot of things. The examples on the EULA page are telling: in one, it was held as worthless since it basically was being used to deny that the software should work at all (software claimed it was MS DOS compliant, but it was in fact not); in another, it was held as valid since someone tried to pirate the software and claim that the EULA didn't mean anything. Now "putting an operating system on unapproved hardware" is probably somewhere in between those two poles, and I would think it rash to dismiss the idea that the EULA's copyright license in this respect would not apply here without existing caselaw. I imagine most lawyers would probably agree, though I am not a lawyer. But then again, neither are you. --24.147.86.187 13:17, 12 July 2007 (UTC)[reply]
It's a lot easier to do the way around — installing Windows on an (Intel based) Mac, just FYI. --24.147.86.187 11:33, 7 July 2007 (UTC)[reply]
Apple can yap all they want about "ZOMG DUNT INSTALL OYR OSX OHN UR WINDOWZE PCZ OHR WEEL GEHT JOO" and slap all sorts of warnings in the eula, but unless they actually stop you technically then there's nothing they can do about it. See EULA. Note that even if those technical measures are pathetic and easily defeated, if they're cryptographic in nature then apple will have legal ground to stand on via the DMCA. Also yes IMO it's antitrust. --frotht 15:56, 7 July 2007 (UTC)[reply]
If what you say about the TPM is true, one can simply buy Mac OS X from Apple (not including Hardware compatibility issues) and install it on a PC.  Tcrow777  talk  19:00, 7 July 2007 (UTC)[reply]
It has other (more falsifiable) ways of detecting if it's an apple computer.. --frotht 04:05, 8 July 2007 (UTC)[reply]
For the Hardware compatibility issues you could try drivers for Linux, UNIX, or BSD, since Mac OS X is based on the UNIX/Linux family.  Tcrow777  talk  05:43, 8 July 2007 (UTC)[reply]
Read the EULA article again. It does not say unambiguously that they cannot be enforced. In fact it says in many cases that they have been enforced. You also mention "most courts" as if it were an opinion poll — it is not. Also, I'm not sure why rending the voice of Apple in 133t speak is supposed to be compelling to any side of the argument. --24.147.86.187 13:20, 12 July 2007 (UTC)[reply]

Computer cooling[edit]

Is it possible to take the fan out from an old power supply and hook it up to my computer for extra cooling, using my current PSU for power? I am talking about placing it in the fan slot in the middle of the case (rather than replacing the one in my PSU).

Most importantly, would this be electrically safe, or would the modified wiring create a hazard to my computer's lovely innards? − Twas Now ( talkcontribse-mail ) 08:40, 7 July 2007 (UTC)[reply]

Well since the power supply contain some pretty big capacitors and can give you a fatal shock long after it's disconnected I would suggest you not to do it. I've seen some fans that are soldered directly onto the board so unless you've got a bit of equipment and some molex or 3 pin headers you can't really use it. Otherwise they should be 100% compatible, but always read the label on the fan and the label on the PSU that say not to dissemble it. You can also get a fan for less than $10 in computer/electronics shops. --antilivedT | C | G 10:29, 7 July 2007 (UTC)[reply]
I can tell you from experience DON'T TRY TO DO THIS, it is not worth it. Trust me its not fun having 240v run through your body(Yep those capacitors can store a charge for months) , don't do it. Try to find an old cpu fan, it works much better, or buy a fan from the store. --Chris g 13:18, 7 July 2007 (UTC)[reply]
The warnings are probably warranted, but if you are careful you should be fine. The fan will probably say what voltage it needs so if it is five volt you can hook it up to the red leads from the power supply (12v is yellow or orange) double check the voltage with a meter before you plug anything in. Consider whether you might rather keep the old PSU assembled in case you might need it later. Fans are very cheap, but recycling is cheaper. -- Diletante 16:06, 7 July 2007 (UTC)[reply]


I have replaced the fan in a computer power supply using one from an old psu. If your old power supply hasnt been powered for some time the the capacitors are not likely to be charged up.-- but it is just possilbe-- so best to short them out with a screw driver before remonig the fan. The fan will either be a 5v or 12v unit and it may or may not be plugged into the psu pcb. If you do have a plug on the end, it is unlikly to fit the common power connecotrs in the computer, so you will have to obtain a connector and attach it to the leads. Red is positive and black negative so make sure this is correct or the fan may not operate.
--Tugjob 16:45, 7 July 2007 (UTC)[reply]

A brand new fan for that will probably not cost you more than 20$- you can probably pick something up for 5 at your local PC shop. Please do not endanger yourself over that --ʇuǝɯɯoɔɐqǝɟ 19:37, 7 July 2007 (UTC)[reply]

If you must do this try and use a power supply that has not had power running through it for at least a month and above evry thing else don't touch the capacitors (or the thing that looks like a huge audio converter for that matter). --Chris g 02:06, 8 July 2007 (UTC)[reply]

Have commercial power supply designs actually gotten so crappy that they no longer include bleeder resistors? I would have expected that some regulatory agency somewhere still requires these.
Atlant 14:34, 8 July 2007 (UTC)[reply]
Some EHT supplies do not use bleeders (wonder why) - as I found to my cost when removing an eht lead from a scope tube Ouch! :-(

Firefox Browser[edit]

The back and forth feature of my Firefox Browser 2.0.0.4 has got stuck and I am not able to use it at all. Help from the Mozilla has not been of any real use. Neither has been the uninstal/instal again routine.What is the problem?Pksnn 10:26, 7 July 2007 (UTC)[reply]

You may have to get rid of all remnants of Firefox after you've uninstalled it. Before you try this, backup any bookmarks you may have installed, because this process will delete everything related firefox. Try uninstalling, then going to whichever directory Firefox was installed and delete that (eg: c:\Program Files\Mozilla Firefox), then delete the firefox data in this folder too: C:\Documents and Settings\*USERNAME*\Application Data\Mozilla. I think that'll get rid of everything related to firefox. Then you can try re-installing. - Akamad 11:29, 7 July 2007 (UTC)[reply]
Less drastically, you could try safe mode, and you could try reinstalling and then uninstalling and reinstalling -again- so you're using an uninstaller from a fresh install, and you could try alternate profiles. Epylar 05:00, 9 July 2007 (UTC)[reply]

Computer screen[edit]

Why, on a computer screen, does the mouse pointer go out of view when moved to the left or bottom of the screen, but remains within view when moved to the right or top of the screen? Think outside the box 11:33, 7 July 2007 (UTC)[reply]

Because the actual pointer is at the top-left of the display-pointer (where it is pointing at). The actual pointer itself cannot move out of the screen but the rest of the bitmap can and therefore you can't move it out of the screen at the top and left sides but you can move it out at the right and bottom sides. --antilivedT | C | G 11:49, 7 July 2007 (UTC)[reply]
So thats why, when you move the mouse here, there is always a one-pixel point at the bottom right on the screen. Thanks for that Think outside the box 13:08, 7 July 2007 (UTC)[reply]
Following on from antilived's answer - the active bit of a pointer is called the hot spot. What you've observed happens because the default cursor has its hotspot at the pixel 1,1. If you use a cursor with its hotspot at 32,32, you would see the opposite. If the pixel at 32,32 were transparent you wouldn't see any part of the pointer at the screen if you moved it into the top-left. — Matt Eason (Talk &#149; Contribs) 17:54, 7 July 2007 (UTC)[reply]

Logic optimization[edit]

Is there any way to optimize this further? I'm mighty suspicious that there's some huge optimization I'm missing since trn and xop are common in each OR tree. I'm making a small computer in a logic simulator as a personal project.. the symbolism in the simulator is rather standard- don't be thrown off by the JMP arrow (it's a hack to open a path from register 0 into the instruction pointer register) or the blue connections (the xfi arrows don't have anything hooked up to them yet). Thanks --frotht 15:14, 7 July 2007 (UTC)[reply]

Also in case anyone's curious, it does work. The entire computer (well, so far since I haven't implemented conditionals yet) is here in xml format, just save it as a cdl file and open it in Cedar Logic.
And since I'm not going to scan my sheaf of paper covered in opcodes and charts, here's a premade program that repeatedly adds 0x5 to register A (the third one down).. just save it as a cdm file and double click the ROM in the computer to load it, then repeatedly select the clock toggle to step through the instructions
--frotht 15:49, 7 July 2007 (UTC)[reply]


Have you read about Karnaugh maps? Espresso is a free tool (almost a programming language!) which can minimize logic table complexity. It has a fairly straightforward syntax, and you may find it helpful for designing your logic elements. Since you're trying to make an entire processor, I suggest you use these (or other tools) to assist you in automated logic debugging. Good luck! Nimur 15:58, 7 July 2007 (UTC)[reply]
Well it's already a two-level Sum-Of-Products solution so I doubt k maps will help much unless I can do some fancy sharing or "don't-care-term"ing, but I haven't looked at that stuff for awhile so I need some help --frotht 16:02, 7 July 2007 (UTC)[reply]
Also here's a picture of the rest of the circuit if it helps at all --frotht 16:40, 7 July 2007 (UTC)[reply]

Can you use a mux or demux?

E.g., xf1 and tf1 could choose between the lines:

xf1 tf1 line
------------
 0   0    0
 0   1  trn
 1   0  xop
 1   1  (trn OR xop) (can be precalculated)

Epylar 05:12, 9 July 2007 (UTC)[reply]

List of colours[edit]

I am looking for a list of colours with their hex codes (eg. 0xFFFFFF) and they must be CONTRASTING COLOURS so that users can easily distinguish between them.
The highest number of colours I could get was 16 here: List_of_palettes#Microsoft_Windows_default_16-color_palette
Rfwoolf 16:01, 7 July 2007 (UTC)[reply]

See Web colors. --soum talk 16:03, 7 July 2007 (UTC)[reply]
kuler by Adobe may help :)? JoshHolloway 17:11, 7 July 2007 (UTC)[reply]
Google "Agave", it's a free program. I know it works in linux, if you use Windows, you can probably run it through Cygwin or something --ʇuǝɯɯoɔɐqǝɟ 19:35, 7 July 2007 (UTC)[reply]

XMP and PNG[edit]

I'm trying to save XMP information to a PNG file in Adobe Photoshop CS2. Now, I've tried saving the metadata as .xmp document and as a template, but when I reopen the file I don't see any XMP information. How do I embed this information in a PNG file? Extensible Metadata Platform mentions that this is stored in the iTXt chunk, but I cannot see any such metadata in the iTXt chunk. Any thoughts?

Nothing??

nested VMs[edit]

will vmware install itself? How about microsoft virtual pc? --frotht 20:55, 7 July 2007 (UTC)[reply]

You can run XP hosting XP hosting XP, the outer two using VMware.

Epylar 05:14, 9 July 2007 (UTC)[reply]

If you are using Hypervisor based virtualization, AFAIK there can be only one type 1 hypervisor (native virtualization), which will be directly connected with the root partition. All child partitions will be spawned by the root partition. Each of the partitions may host a type 2 hypervisor (which runs as a OS app, thus child OS will be running as an app on the parent OS, not as an independent OS). But why would you run multiple hypervisors? A single hypervisor itself will support multiple partitions. And its not like hypervisors are prone to something equivalent to a kernel panic. Hypervisors are a very thin layer; the resource management is done by the parent OS (in type 2 hypervisors) and root partition (in type 1 hypervisors). So rather than having multiple virtualizers to improve stability, a more stable parent OS is better. --soum talk 05:30, 9 July 2007 (UTC)[reply]
Multiple levels of virtualization is possible.

I am currently running Mac OS X in VMware inside of WindowsXP. The OS X then runs Parallels, which virtualizes a small distibution of Linux. -Why? Just because I can. I must, however, admit that the levels of virtualization and use of Mac on PC is experimental and not at all suitable for a production machine. Freedomlinux 01:13, 13 July 2007 (UTC)[reply]

Problem with USB[edit]

Hello, everyone. I just bought a new computer and a Sony Microvault flashdrive. I connected the flashdrive to my old computer and uploaded one 17.7 MB file, copied it to my new computer, and deleted it off the flashdrive. Then, the next day, I connected the flashdrive to my old computer, and it didn't recognize it, calling it an "Unknown Device." How strange! Just the other day it worked fine! Granted, I've had countless problems with the old computer's USB, but never before had a device worked one day and not the other. I'm hoping this strange occurance might help finally diagnose this computer's USB problem, if not at least help me operate the flashdrive again. The flashdrive still works fine on the new computer, so it's obviously the old computer's problem. Any ideas of what's going on? I'd really appreciate any advice at all, becuase it's been a long time that I've had this problem. (By the way, the old computer is a Dell, Windows XP SP2, about 3 or 4 years old. Let me know if you need to know anything else about it.) Thank you!--El aprendelenguas 21:38, 7 July 2007 (UTC)[reply]

Perhaps the USB port is wonky; try a different one. I have one machine which was built by a numskull who got the USB-D+ and D- pins reversed when he was wiring the case to the motherboard (no, it wasn't me, but getting to the darn pins to fix them is so finicky I've never bothered fixing it). The computer recognises that devices are plugged into that port, but never manages to talk to them properly and so tags them as unrecognised. -- Finlay McWalter | Talk 23:32, 7 July 2007 (UTC)[reply]

A common problem is "flash drive sag". This is when the flash drive's weight causes it the sag in a loose USB socket, leading to an intermittent connection. If this is the problem, a USB cable long enough to let you place the flash drive on a table, thus lessening the weigh on the connection, is the cure. StuRat 00:47, 10 July 2007 (UTC)[reply]

Best disk defragger[edit]

What is currently held by the computing fraternity to be the best disk defragger available today? Free ones would be nice!--Tugjob 21:58, 7 July 2007 (UTC)[reply]

For windows just use the defragger that comes with it. For everything else, don't bother defragging - in theory it helps, but in practice the performance gains people allege they achieve from doing it could as easily be obtained by sacrificing chickens to Legba. -- Finlay McWalter | Talk 23:29, 7 July 2007 (UTC)[reply]
I generally use the Windows defragger, but if I need something more I go fo O&O Defragmenterr. --soum talk 14:01, 9 July 2007 (UTC)[reply]
Thanks. Its OK now I managed to get my Ontrack Jet defragger to work after I made about 10% of free space on the disk.--Tugjob 14:26, 9 July 2007 (UTC)[reply]
Ah we dont have a page for Ontrack the disk drive data recovery company?--Tugjob 14:27, 9 July 2007 (UTC)[reply]

C# regexp[edit]

I can code in PHP pretty well, but I never learned C# properly. Luckily their syntax is somewhat similar. The problem I have is how to pull strings I matched with regexp into a array. I think I sort of understand how to use regexp to check if certain string exists, but am baffled thinking how to extract the matched string into an array. Anyway, any help is appreciated.

Anyway, if somebody is interested whats this question is about, User:Shinhan/AWB BannerSheller will be a module for AWB. Or maybe I should just code a new bot from grounds up? If somebody thinks that coding a bot from grounds up would be easier how would I go about extracting regexp matches in Python? — Shinhan < talk > 22:15, 7 July 2007 (UTC)[reply]

In python you do it as below. C# is probably similar in spirit, but I don't use that so I dunno. --TotoBaggins 13:37, 9 July 2007 (UTC)[reply]
>>> import re
>>> 
>>> text = "my name is Toto.  I am 85 years old"
>>>
>>> pattern = re.compile(r'my name is (\w+)\.  I am (\d+) years old')
>>> match = pattern.match(text)
>>> if match:
...     name, age = match.groups()
...     print 'Name: %s, age: %s' % (name, age)
... 
Name: Toto, age: 85


Yeah the basic premise is similar. --soum talk 13:59, 9 July 2007 (UTC)[reply]
 string text = "This can be done in lot other ways";
 Regex re = new Regex("t{1,2}", RegexOptions.Compiled);
 //Compilation is not necessary but increases performance
       
 int i = 0;
 string[] arr = new string[matches.Count];
 MatchCollection matches = re.Matches(text);
 foreach (Match m in matches) { arr[i++] = m.Value; }

 //Alternatively

 List<string> matchList = new List<string>();
 foreach (Match m in re.Matches(text)) { matchList.Add(m.Value); }
 string[] arr = matchList.ToArray();
Does C# have any magic quoting like Python's r'...'? Or do you have to do things like match a literal backslash with new Regex("\\\\", ...)? --TotoBaggins 15:33, 9 July 2007 (UTC)[reply]
Whats magic quoting? Like writing strings without escape characters? If so, answer is yes. "\\\\" generally would refer to a double back-slash (\\, after escaping). The same string can also be represented as @"\\". --soum talk 15:38, 9 July 2007 (UTC)[reply]
I think TotoBaggins is referring to what Csharpians refer to as "Verbatim String Literals"see here. ... and what Pythonistas refer to as "raw strings" (in a less-complicated world, the zillions of programming language designers out there would at least get together and use the same names for these kinds of things ... but then where's the fun in that?). dr.ef.tymac 15:48, 9 July 2007 (UTC)[reply]
Thats why I didnt refer it by name :D There should be some common keywords as well, at least between curly braces languages. I sure as hell couldnt understand Java style of foreach loop if I hadnt known it before. And this/me between C# and VB.NET will be the main reason for me getting bald in five years! --soum talk 16:10, 9 July 2007 (UTC)[reply]

Thank you all. Now I just need to decide which is easier to learn Python or C# to make this bot. — Shinhan < talk > 16:56, 9 July 2007 (UTC)[reply]

You might be interested in PyWikipediaBot, which is used by many of the wikipedia bots. --TotoBaggins 18:20, 9 July 2007 (UTC)[reply]

I can't resist demonstrating Perl's conciseness as compared to other languages. My Python example above would be written as below. --TotoBaggins 18:26, 9 July 2007 (UTC)[reply]

$_ = "my name is Toto.  I am 85 years old";
print "Name: $1, age: $2\n" if /my name is (\w+)\.  I am (\d+) years old/;
A two liner to do the same can be written in C# as well. So lets not turn it into a bashfest. :D --soum talk 08:20, 10 July 2007 (UTC)[reply]
For that matter, a two-liner can be written in Python, but then I never bought into the "computer language religious war" thing either. The more "languages" you learn, the more you realize there's more 'distinctions' than 'differences'. dr.ef.tymac 14:20, 10 July 2007 (UTC)[reply]
@Shinhan, you asked splitting it into an array, I gave the example for that. But you can directly use the MatchCollection to iterate over or index into as you do with an array.
 string text = "This can be done in lot other ways";
 Regex re = new Regex("t{1,2}", RegexOptions.Compiled);
       
 MatchCollection matches = re.Matches(text);
 Console.WriteLine("Second match is {0}", match[1].Value);

A single Match object also does other stuff like finding the start and end indexes of the matched substring. So, if you let us know what exactly you are trying to achieve, we can probably suggest a better way than splitting all into an array. I can handle the C# queries and Toto will probably handle the Python stuff. --soum talk 08:20, 10 July 2007 (UTC)[reply]

we can probably suggest a better way than splitting all into an array ... yes indeed. In fact, both python and C# support what is known as "named capturing groups" (although I'm sure they each use their own "official names" .. yippie!). This allows you to directly parse whatever substrings you want directly into a "dictionary" (aka 'array' in PHP-speak), where each substring can be accessed by a specific 'field name'. This is very useful, and no futzing around with (numerically-indexed) arrays is needed.

Python example:

import re
sRaw    = r"httq://blah.blah.foo?Fname=Homer&Lname=Simpson&Age=33"
reTest  = r'Fname=(?P<fname>[^&]+)&Lname=(?P<lname>[^&]+)&Age=(?P<age>[^&]+)'
vDict   = re.search(reTest,sRaw).groupdict()
print vDict
print 'Hello there, %s %s!' % (vDict['fname'], vDict['lname'])

This should convey the basic point, someone else can provide a csharp example if they want. dr.ef.tymac 14:57, 10 July 2007 (UTC)[reply]

Here is the C# version
 string text = @"http://blah.blah.foo?Fname=Homer&Lname=Simpson&Age=33";
 string regexp = @".*Fname=(?<fname>\w+)&Lname=(?<lname>\w+)&Age=(?<age>\d+)";
 GroupCollection gc = new Regex(regexp, RegexOptions.Compiled).Match(text).Groups;
 Console.WriteLine("Hello there, {0}, {1}", gc["lname"], gc["fname"]);

 //A shorthand could have been used as well
 Console.WriteLine(Regex.Replace(text, regexp, "You are: ${lname}, ${fname}; Age: ${age}"));

The regexp engine can be used to mutate the source string as well.

 static void Mutate()
 {
     string smallText = @"the match engine directly will capitalize first character of each word";
     string regexp = @"\w+";
     Console.WriteLine(Regex.Replace(smallText, regexp, new MatchEvaluator(FirstCharToUpperCase)));
 }

 static string FirstCharToUpperCase(Match m)
 {
     return m.Value.Substring(0, 1).ToUpper() + m.Value.Substring(1);
 }

Feel free to contact me if anything is unclear. --soum talk 16:31, 10 July 2007 (UTC)[reply]

As to we can probably suggest a better way than splitting all into an array I wrote the simple algorithm at User:Shinhan/AWB BannerSheller. I need regexp to search for, and extract, specific templates. Each template is delimited with {{ and }} but since I want to extract only selected templates I first have to read the list of those templates (from a WP page) change those template names into regexp queries... So, it might not be needed to extract into array, yeah.

Im not well versed in regexping, so I didnt know that PHP can do this as well preg_match_all but I need to give it matches array where to put it as one of the parameters. (Actual return value is only match counter). PHP uses regexp similar to Perl 5, with notable differences. — Shinhan < talk > 11:19, 11 July 2007 (UTC)[reply]

Zone Alarms[edit]

I want to remove this program from my computer but whenever I do it resets the ports and maybe does some other stuff that keeps me from accessing the Internet or the local network until I reload and run Zone Alarms again - keeping me from removing it. Is there anyway to set the ports and other things back to normal without loading and running Zone Alarms again? Julie Moon 23:17, 7 July 2007 (UTC)[reply]

The administrator of your computer (which may, or may not, be you) can uninstall ZoneAlarm by opening Control Panel and then add/remove programs. -- Finlay McWalter | Talk 23:26, 7 July 2007 (UTC)[reply]
She said that when she does remove it, things go wrong. I can't imagine what the problem could be, except that you're using a crappy software firewall instead of a dedicated machine --frotht 04:07, 8 July 2007 (UTC)[reply]
add/remove programs does not effect whatever changes the program has made to various port or address or property settings. These are what need to be changed after the program is removed. Julie Moon 09:49, 8 July 2007 (UTC)[reply]
Huh? Those changes should be gone. Splintercellguy 20:36, 8 July 2007 (UTC)[reply]
Windows (core) doesn't have "port or address" settings. The way a firewall like ZoneAlarm works is that it hooks into the windows networking stack at boot time and intercepts networking. If a program like ZoneAlarm hasn't been explicitly hooked into these points, Windows will just pass everything blithely back and forward. So possibilities are a) ZoneAlarm hasn't properly uninstalled (somehow bits of it are still being autostarted, and all you've managed to remove is the control program that configures the firewall bit), b) another firewall has instead been started (maybe the Windows Firewall itself, which has instead hooked the networking stack and is blocking communications, or c) your problem isn't ZoneAlarm, but perhaps a dedicated firewall as Froth mentions. -- Finlay McWalter | Talk 20:47, 8 July 2007 (UTC)[reply]