Wikipedia:Reference desk/Archives/Computing/2009 June 19

Computing desk
< June 18 << May | June | Jul >> June 20 >
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.


June 19

edit

Need MPEG to OGG converter for videos

edit

I have videos but Wikipedia won't accept them in the current format of MPEG.

Can someone send me a link to an easy-to-use free MPEG to OGG converter to my Talk Page?

Thank you. -- Guroadrunner (talk) 07:49, 19 June 2009 (UTC)[reply]

I don't know which OS you're using, or what you consider to be 'easy-to-use'. commons:Help:Converting_video has much information and a few suggested programs for different OSs. -- Consumed Crustacean (talk) 07:56, 19 June 2009 (UTC)[reply]
You can also use SUPER if you would prefer an easier way of converting. Rgoodermote  18:58, 20 June 2009 (UTC)[reply]

Simple regular expression

edit

I'm using Ubuntu with Sed and grep installed (I think is standard). I have a text file and I want to extract from it all occurrences of the following structure:

"word1 word2 MYKEYWORD word3 word4"

and save it in a different text file. The result would be a series of "word1 word2 MYKEYWORD word3 word4".

How can I do it? PS: I don't know anything of programming, but I suppose this is easy. There must be something like: "sed RE file1 file2" Or grep RE file1 file2 --Quest09 (talk) 15:11, 19 June 2009 (UTC)[reply]

If I understand you correctly, "MYKEYWORD" appears in every line, but the other words might differ. If so, this:
grep '\<MYKEYWORD\>' input.txt > output.txt
will do what you want. The "\<" and "\>" make sure that MYKEYWORD is a whole word, so you won't match "NOTMYKEYWORD", for example. --Sean 17:05, 19 June 2009 (UTC)[reply]
If I interpret the question correctly, Quest09 wants the output to be only lines containing exactly five words, where MYKEYWORD is preceded by exactly two words, i.e. a subset of what your (Sean's) regex will return. --NorwegianBlue talk 20:16, 19 June 2009 (UTC)[reply]

It's not clear whether the output line has exactly those five words, or contains those five words in part of a line. Moreover, the code to match that pattern depends upon what characters can be in the "words" and what spacing appears between words: one blank, a tab, or arbitrary numbers of whitespace characters. A "word character" (alphanumeric) is specified as \w. A string of consecutive word characters (with at least one of them) is specified as \w+. A whitespace character is \s, and a string of one or more whitespace characters is \s+. So in the most generous interpretation of a matching string, try this as your regular expression in a grep command:

\w+\s+\w+\s+MYKEYWORD\s+\w+\s+\w+

This does not care what comes before or after the pattern of 5 words. If you want the line to match this pattern exactly (nothing before or after the pattern), you want to specify the beginning of line ("^") and end of line ("$") codes.

^\w+\s+\w+\s+MYKEYWORD\s+\w+\s+\w+$

and for exactly one blank between tokens, leave off the + after the s each time. 24.0.97.201 (talk) 12:56, 20 June 2009 (UTC)[reply]

Thanks for the answers. I still need another simple RE. For example: I want to search until I reach the first full-stop, no matter how long the string is. That would be: ^\w+\s+\w+\s+MYKEYWORD\s+\w+ any number of words until the first full stop--Quest09 (talk) 17:30, 20 June 2009 (UTC)[reply]

I'm interpreting this to mean you want the full-stop to be added to the criteria for determining which records are returned. It seems to me your match could be written as "any number of characters until the first full stop." The "." character matches anything, and ".*" refers to zero or more characters. As I understand it, you need to "escape" the full-stop character when you refer to it literally. That would mean you'd tack on ".*\." to the end of your search string, meaning zero or more characters followed by a full stop. If there's no full stop character, the match will fail and the record will not be returned. (The pattern can be written to specify a series of words too. But the only difference would be the treatment of non-alphanumeric characters other than the full-stop.)

But if you are talking about truncating the record at the full-stop, that is, returning partial lines, "grep" alone won't do it. You might "pipe" your output to a "cut" command where the dot character is specified as the delimiter. 24.0.97.201 (talk) 13:13, 21 June 2009 (UTC)[reply]

grep -o returns only what of each line matched the pattern. --Tardis (talk) 23:49, 22 June 2009 (UTC)[reply]

MS Word 2003 has started checking spelling in American-English, not British-English

edit

In the past my MS Word2003 would check the spelling in British-English, since I am British. Today its suddenly started checking the spelling in American-English. I ran a Windows Update yesterday, so perhaps that's why. How can I change it back to British-English spelling please? 89.243.192.190 (talk) 15:21, 19 June 2009 (UTC)[reply]

Tools / Language / Set Language. --LarryMac | Talk 15:32, 19 June 2009 (UTC)[reply]

Thanks, an excerpt from a webpage I've just found says: "...open a new Microsoft Word document, cut and paste some text into it from somewhere, and then click on Tools/Language/Set Language and select English (UK). Next, whilst English (UK) is highlighted, and the option Detect language automatically is selected, click on the Default button. You should get a message indicating that the template.dot template will be changed and that all new documents from now on will use the UK dictionary by default." 89.243.192.190 (talk) 15:33, 19 June 2009 (UTC)[reply]

Linux equivalent of Windows Update?

edit

Windows Update looks at your hardware and automatically finds the latest drivers for it. Similarly, when you add or change some hardware Windows recognises what it is and integrates it more or less automatically with the rest of you computer - I don't know what the name for that process is. Are things as easy when you use Linux, or does it require a lot more technical knowledge and initiative? 78.149.190.223 (talk) 20:15, 19 June 2009 (UTC)[reply]

This is not an exact answer to your question, but it's related: I've had to reinstall two PC's from scratch recently, for my kids who have gotten their PC's so malware-infested that they just won't boot (asked a Q here recently about some XP related problems). Installing Ubuntu is a breeze, works straight out of the box, wifi and all. Installing windows from anything but the DVD that shipped with the PC is a true PITA. I haven't tried to do exactly what you ask, though, so I don't know. However, Knoppix, which is a no-risk introduction to Linux, boots just about anything from a live CD, i.e. with no prior knowledge about your hardware. Nevertheless, I won't exclude the possibility that a Linux installation might get more confused by a given hardware configuration change than a windows installation would. As far as I know, the Linux installation managers (apt-get etc.) are more application-oriented than hardware-oriented. --NorwegianBlue talk 20:37, 19 June 2009 (UTC)[reply]
(edit conlfict) That's good news because my last experience with linux (2003) resulted in a damaged hard drive because I expected it to park the disk heads when I performed an electronic (soft) power down.. That's just an interjection,,
I really came here to say the name of the thing you didn;t know the name for is probably Plug and play also see the links in the 'see also' in that article.83.100.250.79 (talk) 20:41, 19 June 2009 (UTC)[reply]
Operating systems, of whatever ilk, haven't been responsible for parking the heads on a hard drive for well over a decade. Even late MFM disks would autopark. 87.113.134.218 (talk) 20:56, 19 June 2009 (UTC)[reply]
Well something was wrong there, especially since I later discovered that I was supposed to issue a park command (can't remember what it was called) before powering down. It's all water under the bridge for me now anyway.83.100.250.79 (talk) 21:00, 19 June 2009 (UTC)[reply]
(ec) : On Ubuntu linux, software updates are managed by Update Manager, and you add and remove software with Synaptic; these are installed and configured when you install, and they both just work. Most drivers are part of the Linux operating system itself, and just work. Printer drivers are part of the CUPS printing system, which is supplied, and just works. Video drivers are supplied as part of the X.org window system, but that's supplied too, and just works. All of these things are setup automatically on install and are kept up to date automatically. My recent experience has been that it is considerably easier to set up Ubuntu Linux on a given machine than Windows Vista on the same hardware. The only special thing I've done, on one machine, is to install Nvidia's own video driver, rather than the (perfectly good, but rather slower) driver that came with Ubuntu. Installing that was much as its Windows counterpart: visit nvidia's website, pick the latest driver, download, install, done. The nicest thing is that Ubuntu (and other Linux installs) come as Live CDs (which means they'll boot and run off a CD or DVD without installing on your hard disk), so you can verify all your hardware is supported before taking the plunge and zapping the old OS you have installed. 87.113.134.218 (talk) 20:38, 19 June 2009 (UTC)[reply]
Just a gentle correction/clarification. On Ubuntu, it's probably better to add and remove software using the "Add/Remove" program. While you can also add and remove programs with Synaptic, Add/Remove is organized by application, whereas Synaptic is organized by "package". A single application would use multiple packages, and there are a number of packages (development libraries and the like) which aren't really part of any end-user application. For a novice user, the Add/Remove application presents a much simpler and straightforward user interface, with fewer "what the heck is this for" confusions. Conversely, Synaptic allows the power user to tweak the system - assuming they know what they're doing. -- 128.104.112.114 (talk) 20:54, 19 June 2009 (UTC)[reply]
I personally think Windows Update are extremely poor - they just end up making the system slow. That's what happened to my laptop, and I had to uninstall all of them to make it fast again. I don't know about Linux, but definitely I wouldn't recommend using Windows Update. Rkr1991 (talk) 14:20, 20 June 2009 (UTC)[reply]