Monday, 24 December 2007

Just for fun

Do not try this at home :)

Problem: After some hard work, saving returns an error. WHAT TO DO???

Try this: http://pc-breakdown.freeonlinegames.com/

Saturday, 22 December 2007

Subtitle Manager

I had a problems with some movies and their subtitle synchronization.

Well, now I don't have them thanks to the Subtitle Workshop. ALL problems are gone.

String's methods with regular expressions

The next example is for method replaceFirst(String regex, String replacement) which should find first substring that matches given regular expression and change it with replacement.

What if you want to replace only the first substring that is equal to "[sometnig]" - this represents regular expression that will match every single character from the word 'something', and, so 
a.replaceFirst("[something]", "anything");
will return (bold substrings are match and replacement):
  • if a="this is a [something] test"
    then "anythinghis is a [something] test"
  • if a="[something]"
    then "[anythingomething]"

What we need here is static method Pattern.quote(String s) which will make regular expression that matches string s as is. Thus, call
a.replaceFirst(Pattern.quote("[something]"), "anything");
if a="this is a [something] test"
will return "this is a anything test".

BTW: This is just for replacing only the first substring matched. If you want to replace all substring that are matched, you should use String's method replace. Also, there is method replaceAll which, again, uses String parameter for regular expression pattern matching.

Reading Linux's ext2 and ext3 partitions under Windows

After unsuccessful installation of Kubuntu, I decided to move some data I've downloaded from Kubuntu to my Windows.

After searching the Internet I found http://www.fs-driver.org/
It is very easy to install. You choose drive letters for partitions, and then use them as regular partitions (it has kernel mode and extend Windows so it can read ext2 or ext3 just as fat or ntfs).

Also, you will have to choose if you want to install support for larger files (above 4GBs). File with this size cannot be saved to Ext2 on Linux with kerver <=2.2 (read FAQ) - so, if you have older kernel choose not to install support for larger files.

Kubuntu 7.10 - Gutsy Gibbon instalation od Samsung X15

I install Kubuntu 7.10 - Gutsy Gibbon (from CD) on my laptop (Samsung X15).

Installation was very simple.

Still, I have no sound under Kubuntu.

I didn't find a solution for this problem, yet. :(

Friday, 21 December 2007

Start

Here is a start message:

So, this will be log for problems and their solutions - so I would remember them easier :)

And, of course, anyone who has the same problem can use the solution.

Enjoy.

Popular Posts