Social Icons

Thursday, June 3, 2010

starOut : Solutions for Javabat :23


Question: (Source)

Return a version of the given string, where for every star (*) in the string the star and the chars immediately to its left and right are gone. So "ab*cd" yields "ad" and "ab**cd" also yields "ad".

starOut("ab*cd") → "ad"
starOut("ab**cd") → "ad"
starOut("sm*eilly") → "silly"

Solution

public String starOut(String str) {
  if(str.indexOf("*")==-1) return str; // no stars :(
  String starOut="";
  for(int i=0 , lastI=0 ; i<str.length() ; i++){
             
      if(str.charAt(i)=='*' | i==str.length()-1){ // got a star
          if(i==0){// * @ the begining
              i=this.getI(i,str); lastI=i+1;
          }
          else if(i==str.length()-1) { 
              if(str.charAt(i)=='*')
                 starOut+=str.substring(lastI,i-1);
              else
                 starOut+=str.substring(lastI);
              }
              else {
                 starOut+=str.substring(lastI,i-1); // pre * part stored
                 i=this.getI(i,str); lastI=i+1;
              }
          }
     }
     return starOut;
                
}
int getI(int i , String str){
    // skips any adjacent *s 
    while(++i < str.length() && str.charAt(i)=='*' );
    return i;
}

Wednesday, June 2, 2010

Amarok 2.3.1 Released with Automated Playlist Generator


amarok-2.3.1

This release brings with it some exciting new features like the Automated Playlist Generator which helps you create playlists based on criteria like song length or file size. This is the start of bringing back the smart playlist feature of Amarok 1 and more.
Amarok’s developers have also added two new applets for the Context View. The Upcoming Events applet shows concerts and events that the currently playing artist is participating in and the Similar Artists applet uses the Last.fm database to show similar artist and makes the ones in your collection directly playable.
Cover fetching has seen a lot of improvements and we added support for the new system tray protocol.
The 2.3.1 release also fixes many bugs, both major and minor, and brings with it many other small improvements that overall help to make the Amarok experience even more enjoyable!

download

Xmarks - Bookmark and Password Sync Addon



Xmarks is the #1 bookmarking add-on for firefox . Keep your bookmarks, passwords and open tabs backed up and synchronized across computers and browsers. Search smarter with website ratings and reviews displayed with your search results.

xmarks-beta-v-125x122

Xmarks is not just a Sync add-on , let’s see what it has to offer to facilitate your works.

Smarter Search
Xmarks will highlight the top sites in your search results based on how other users have bookmarked and rated them. Simply click to learn more.

smarter_search4

Site Info built into your browser
Click on the Xmarks info icon in your location bar to see detailed information about the site you are on, and discover other great sites just like it.

site_info3

Sync and Backup
Install Xmarks on each computer you use, and it seamlessly integrates with your web browser and keeps your bookmarks safely backed up and in sync.
Xmarks will sync across browsers too. Today we support Firefox, Chrome, Internet Explorer, and Safari (Mac OS).

multi-browser-sync.jpg

Get Xmark FireFox

TeraCopy - Copy your files faster and easier


TeraCopy is a compact program designed to copy and move files at the maximum possible speed, providing the user with a lot of features:

Capture

Captcure

  • Copy files faster. TeraCopy uses dynamically adjusted buffers to reduce seek times. Asynchronous copy speeds up file transfer between two physical hard drives.
  • Pause and resume file transfers. Pause copy process at any time to free up system resources and continue with a single click.
  • Error recovery. In case of copy error, TeraCopy will try several times and in the worse case just skip the file, not terminating the entire transfer.
  • Interactive file list. TeraCopy shows failed file transfers and lets you fix the problem and recopy only problem files.
  • Shell integration. TeraCopy can completely replace Explorer copy and move functions, allowing you work with files as usual.
  • Full Unicode support.
  • Windows 7 x64 support.

download_button

ImgBurn - Free disc-burning software



ImgBurn is a lightweight CD / DVD / HD DVD / Blu-ray burning application that everyone should have in their toolkit!

screenshot_ezmodepicker

screenshot_read

When it comes to disc-burning software, "Just works" is a big recommendation, because it really stinks to deal with image files, disc types, or driver incompatibilities right before you want to hit "Burn." ImgBurn works with CDs, DVDs, and Blu-Ray, creates and opens all kinds of image formats, and supports every Windows OS back to 95.

It has several 'Modes', each one for performing a different task:

  • Read - Read a disc to an image file
  • Build - Create an image file from files on your computer or network - or you can write the files directly to a disc
  • Write - Write an image file to a disc
  • Verify - Check a disc is 100% readable. Optionally, you can also have ImgBurn compare it against a given image file to ensure the actual data is correct
  • Discovery - Put your drive / media to the test! Used in combination with DVDInfoPro, you can check the quality of the burns your drive is producing

Download ImgBurn v 2.5.1.0 (4.5 MB)

 
 
Blogger Templates http://slots.to/