miercuri, 3 noiembrie 2010

Music player in Ubuntu

The default one is Rythmbox.
You have to add the MP3 Plugin (when it starts for 1st time it says they aren't and shows a button to get them).

Besides the common features, it's not obvious how to repeat same melody.
Well, the solution I have is to search for it until remains the only one in list.
Then just Play.

It will be repeated if you have Repeat activated (CTRL+R).

luni, 1 noiembrie 2010

Replace with appereance number

Using Jedit, at replace can be put a BeanShell snippet.
If you have a file with:
a
ba
abaa

And want to be like:
a1
ba2
a3ba4a5

(eg: a file with same error message in many places and you want to uniquely identify them)

Then in Jedit do:
- in search field enter: a
- change the option to use BeanShell instead of text
- enter in replace field: i=1
- press replace all
- click on main window press undo
- back, in replace field put: _0+i++
(_0 is the searched string ; + is for unification of the strings, i++ increases the value of i by 1)
- press replace all

The every appearance of the searched text is replaced with the text and the number of appearance.