Stand With Ukraine

Monday, June 8, 2009

String formatting in java

Recently I have discovered very useful static method of java.util.String class - format( String formatStr, Object arg1, ...). Here are some examples demonstrating its capabilities that I know of:


System.out.println("\""+String.format("%10s", "mama")+"\"");
result:"      mama"

System.out.println("\""+String.format("%-10s", "mama")+"\"");
result:"mama      "


System.out.println("\""+String.format("%2.7f", Math.PI)+"\"");
result:"3.1415927"

Monday, May 25, 2009

Miro is a great video aggregator and player for Ubuntu


Yesterday I found a pretty good program that manages your videos and video feeds for you, it is called miro(http://www.getmiro.com/).
You can also create an account in order to let it know your preferences via your ratings and hence suggest you the most suitable videos for you. Also it plays .avi, .mov, .mpeg files, and probably more. I have already signed up to linux journal and ubuntu team uploads.
And it is easy to use, looks very nice, so I recommend you trying it out.

Things I customized (go to Menu Video -> Options -> Playback):
1. Made all the videos open in a new window.
2. Made it stop after each video. So this way it does not play the whole feed, but just the selected video.