Wikipedia:Reference desk/Archives/Computing/2006 October 9
< October 8 | <<Sep | October | Nov>> | October 10 > |
---|
| ||||||||
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions at one of the pages linked to above. | ||||||||
iPod FS
[edit]Is there a freeware/open source HFS+ file system reader for use in Windows XP? In other words, I'm wondering if I can at least view the data on my Mac formatted iPod on my PC. Thanks. 68.39.175.57 00:42, 9 October 2006 (UTC)
- The standard open-source packages for reading HFS disks are hfstools and hfsutils, but I don't think there's an up-to-date Windows port, and I've never seen a Windows GUI for them. As far as I know, the only complete HFS+ file system implementations for Windows are MacOpener and MacDrive, both shareware. XPlay from MediaFour, makers of MacDrive, is an iPod specific utility and the cheapest of the commercial options at $30, free trial available. If anyone knows of free alternatives, I'd be interested to hear about them too. -CarelessHair 01:59, 9 October 2006 (UTC)
- Would something like vPod help? It looks pretty music-oriented, but it's free. grendel|khan 16:57, 10 October 2006 (UTC)
forcing X into 16 bit color from boot
[edit]This page says for running xubuntu on virtual pc, you have to force x window into 16 bit colors. I can do this by entering safe mode but I'd rather just pass it as a boot option and run normally. The parameter vga=791 doesn't work, nor does opening the vesa menu at the boot options screen and selecting 16 bit color. Thanks --frothT C 00:54, 9 October 2006 (UTC)
Replacing HTML span tags with old style markup
[edit]I have some files which use the <span> tag, and matching CSS, for all style markup (eg. span class="italic"). I would like to convert some of these tags to nice retro HTML 2 <i>, <b> and so on, for compatibility with non-CSS software (some word processors and ebook readers, particularly). Obviously, a simple search and replace would deal with the opening tags, but replacing all </span> with </i> would not be good, so I need to replace only the right ones. Could somebody recommend some suitable software (preferably free and for Windows), or, if this can be done with a regex, could someone give me an example? Thanks. -CarelessHair 01:22, 9 October 2006 (UTC)
- If you're lucky enough to be fed valid XML you could try XSLT processing. As for regular expressions, they cannot cope with arbitrary nesting, but your inputs will not be arbitrary. The simplicity of the necessary regular expression depends on details of your input. It might be as simple as searching for <span class="italic"> followed by an arbitrary string followed by </span>, or it might not.
- Incidentally, class="italic" is considered a bad way to use the class attribute. If you really want italics everwhere it appears, then use style="font-style:italic" or <i> itself, or (better) a symantic markup like class="booktitle" or <em>. And if you don't want italics everywhere it appears, then this is horribly misleading markup! --KSmrqT 05:40, 9 October 2006 (UTC)
- Thanks for the suggestion: XSLT might well be the tool I'm looking for, if I knew how to use it! Could you give me an example stylesheet that would turn span class="italic" and span class="bold" into <i> and <b> respectively? The files don't validate as XML (duplicate ids, no alt tags etc), but the tags are correctly nested, which I imagine is the important thing? Unfortunately, italics don't always appear on their own with no other spans around, so the simplest search and replace won't do the trick. Finally, just to clarify: I didn't create these files, I'm just having to deal with them! My reaction to seeing class="italic" was the same as yours: Eeep! -CarelessHair 08:21, 9 October 2006 (UTC)
- Unfortunately for you, XSLT is defined in terms of XML trees, so the first stage in a tranformation is parsing the input into that form. And while the tradition in HTML was for browsers to tolerate almost anything, for XML the opposite approach was chosen. Either you must first clean up the input to produce valid XML, or you must choose a different method. Although HTML Tidy may be of some assistance in achieving validation, from your description a fair amount of manual intervention will be probably be needed as well. And it sounds like a simple search-and-replace may not suffice either. If the HTML parses acceptably, maybe you can use a DOM-manipulation approach (using JavaScript). --KSmrqT 10:15, 9 October 2006 (UTC)
Spell checker
[edit]How do you get a spell (or grammar) checker in a foreign language, such as Spanish, using Microsoft Word? zafiroblue05 | Talk 05:58, 9 October 2006 (UTC)
- You can change the language Word is using by going to Tools/Language/Define Language/ and selecting Spanish. Then use the checker as you normally use it.--RiseRover|talk 09:28, 9 October 2006 (UTC)
Do computer languages follow Zipf's law?
- It is highly likely. Some "words" in programming are very common. Others are not. It shouldn't be hard to pick out the most common word - "if"? Just do a word frequency counter on one of your own programs and see if it fits the Zipfian frequency. --Kainaw (talk) 19:43, 9 October 2006 (UTC)
- I doubt it. Even if you considered codified "language" to be words (for example considering == to be a word), it wouldn't follow human language patterns unless it was a very new programmer writing a very simple program and writing his code out in codeish english, like:
Repeat (Inc Counter) While Counter < 10 If Counter eq 7 Print "Seven" Else Print "Not seven"
- Which is easily readable phonetically and probably works with zipfs law. The problem you're going to run into is variable names (which certainly don't follow that exponential rule of usage) and the extremely limited "vocabulary" that you might have trouble seeing a pattern from. --frothT C 22:28, 9 October 2006 (UTC)
- Is there any ersearch on this?
- I thought about doing it on my programs, but there's a catch - you have to tokenize the source code. I'm too lazy to tokenize the source code, so I didn't do it. --Kainaw (talk) 01:23, 11 October 2006 (UTC)
base 64 encoding?
[edit]To encode an image, by base 64 encoding, and to send it with XML files to somewhere else and to be decrypted there. Pls anyone give me a brief idea how to do? Is this done by built in functions or we hav to do that..I'm using Java to send XML files.
- Try google and you'll find sites like this. --Kainaw (talk) 15:09, 9 October 2006 (UTC)
What is that thing on the end of cables (not the plug)
[edit]On some computer cables, there are cylindrical objects attached to the cable (see below)
What is it called, and what is it for?
Please answer my question on my talk page
Thanks Stwalkerster 16:00, 9 October 2006 (UTC)
- Maybe a 1:1 transformer that separates the signal from the DC power? - Rainwarrior 16:17, 9 October 2006 (UTC)
- Or no, if that's a USB cable, they are already separate (on a phone line though, something like that might be appropriate if you aren't using the telephone system's power). I don't think it's strain relief though, as the added weight would actually add strain to the cable; the strain is generally the worst at the ends anyway, which is where such a relief usually happens. Maybe it is some sort of device? Maybe a transformer to alter the voltage of the data itself? - Rainwarrior
- Strain relief. Sorry, we don't answer in other places. --LarryMac 16:14, 9 October 2006 (UTC)
- The strain relief is the ridged rubber part at the end of the plug. The questioner appears to be asking about the large plastic tube on the cable. I have a USB cable in my trashcan that has one. So, stomp, stomp, stomp... It has a coil of metal wires inside of it. Also, the wire doesn't go straight through. It makes a loop inside of the plastic case. My opinion - it is for blocking RF interference. --Kainaw (talk) 16:37, 9 October 2006 (UTC)
- I'm pretty sure it is some kind of protection against interference, like Kainaw said. I got 2 of them with my camcorder and it said in the manual to attach them to the USB cable and the cable that connects it to the TV. There seemed to be graphite or something similar inside them to act as a shield. --Ukdan999 17:39, 9 October 2006 (UTC)
- You guys have never heard of a choke??? --Jmeden2000 19:35, 9 October 2006 (UTC)
- Yes, it's definitely an inductive choke, which is just a cylinder of iron (usually) that filters out AC noise. —Keenan Pepper 23:07, 9 October 2006 (UTC)
- If you're sure that it's a choke, why doesn't someone add it to the article? Dismas|(talk) 00:36, 10 October 2006 (UTC)
- Also, is there some way to make Choke (electronics) a findable article. If you know "a cylinder thing on a wire that inhibits some sort of frequency of electricity or eletromagnetic waves", how do you find the choke article? --Kainaw (talk) 13:31, 10 October 2006 (UTC)
- What would you suggest? A redirect from a cylinder thing on a wire that inhibits some sort of frequency of electricity or eletromagnetic waves to Choke (electronics) ?? It's something you either know or don't know, I think you should suggest MFRs print 'choke (electronic)' on them as they are produced, or for minimum confusion http://wiki.riteme.site/wiki/Choke_(electronics) ... just a thought. --Jmeden2000 13:58, 10 October 2006 (UTC)
- I would just like to clarify that I mean the cylindrical object with wire on either side as Kainaw says. It is on a USB cable and that is the only one on that cable. However, there are other cables at the back of the computer that have these things. One is on a DC power supply for the monitor (TFT LCD), one on the VGA cable, 2 on another USB cable, and another on another USB cable. As some of you have said, a choke to protect against interference sounds like a reasonable explaination, so I assume it works in a similar way to repeater coils on telephone circuits.
- Thanks for your help.
- Jmeden2000, may be some note could be added to the cable page, to mention an electromagnetic interference as the noise source, and a choke as noise reducing solution. --CiaPan 18:26, 10 October 2006 (UTC)
- I have added a section per your suggestion. If anyone can think of other places where this info would be helpful, let me know. --Jmeden2000 19:17, 10 October 2006 (UTC)
- Jmeden2000, may be some note could be added to the cable page, to mention an electromagnetic interference as the noise source, and a choke as noise reducing solution. --CiaPan 18:26, 10 October 2006 (UTC)
- Cool! Now, when I search for "cable interference" I can find "choke". Thanks. --Kainaw (talk) 01:22, 11 October 2006 (UTC)
This is a Ferrite bead — Omegatron 04:26, 7 April 2008 (UTC)