Monday, June 28, 2010

Change your existing/saved SVN user to other user on your UNIX machine or MAC OSx

Locate and find your .subversion directory, mostly it will under your home directory.

.subversion/auth/svn.simple/random-numbered-file ( without extension )

for eg ( in my machine ) :

Jackys-MacBook:svn.simple gokulamurthy$ ls
772c71669d28a02d42addb1d967d1862
Jackys-MacBook:svn.simple gokulamurthy$ vi 772c71669d28a02d42addb1d967d1862

K 8
passtype
V 8
keychain
K 15
svn:realmstring
V 42
SVN Access
K 8
username
V 14
your-existing-svn-username
END

change your existing svn username to current username then save and close the file.

when you do any operation under your subversioned directory like svn ls , svn log, svn up, svn switch, etc., for any operations it will ask you enter the svn new username and password.

Thats all. Have Fun with SVN.

Saturday, June 26, 2010

SVN log commands must be useful

SVN List of all files modified/added/deleted by a particular user:

svn log | sed -n '/username/ p'

For multiple users:
svn log | sed -n '/username/,/-----$/ p'

SVN List Comment and Files Changed for a Certain Revision:

svn log -v -r RevisionNo https://yoursvnurl.com

Hope this will help.

Tuesday, November 17, 2009

extended array or specifically enum methods in ruby

The methods available for enum is pretty much useful when we need to make block with the condition. Below are the few example methods:

%w{ ant bear cat}.all? {|word| word.length >= 3} #=> true
%w{ ant bear cat}.all? {|word| word.length >= 4} #=> false
[ nil, true, 99 ].all? #=> false


%w{ ant bear cat}.any? {|word| word.length >= 3} #=> true
%w{ ant bear cat}.any? {|word| word.length >= 4} #=> true
[ nil, true, 99 ].any? #=> true


Enjoy coding...

Wednesday, October 28, 2009

OOPS: Creating object for an Interface is Possible

    Use the below sample code to create an object for an interface. This is called as "anonymous inner class".
What's happening here is that an object gets instantiated that implements the interface.

    public interface MyInterface {
    public void myMethod() ;
    }

    ...

    MyInterface myIntfObj = new MyInterface() {
    public void myMethod() {
    ....
    }
    };

    myIntfObj.myMethod();


Thursday, October 22, 2009

install gems by .gem files

To install gems by .gem files use the below command on command prompt or terminal.

Note: To download .gem files for a specific gem, do a search in rubyforge.org

gem install –install-dir PATH library_name

then the output will like this
Successfully installed library_name.version
1 gem installed

Hope this will help for someone or me!!! :)

Simple Array Comparison in Ruby

Here is a simple method to compare two arrays using Ruby, few examples:

> [1,2,3] <=> [1,2,3]
=> 0
> [1,2,3] <=> [2,2,3]
=> -1
> [1,2,3] <=> [3,2,3]
=> -1
> [1,2,3] <=> [1,3,3]
=> -1
> [1,2,3] <=> [1,1,3]
=> 1

By use of Terinary Operator (<=>), we can acheive the simple method to compare two arrays of comparison.

Hope this will help for someone or me in future!!!

Saturday, August 1, 2009

Lyrics - sambo siva sambo song from Nadodigal movie

Nadodigal added into one of my favorite movie list. We should appreciate this movie director( Samuthrakanni), everyone know this story but didnt taken this ever in any film industry. He made it. He brought us this wonderful story in a beatiful screenplay. No more words to express my appreciation to him and his effort on this film. Expect to do more movies like this in our industry.

Download this song

Sambo Siva Sambo Lyrics – Nadodigal


சம்போ
சிவ சம்போ, சிவ சிவ சம்போ
சம்போ சிவ சம்போ, சிவ சிவ சம்போ

உறங்கும் மிருகம் எழுந்துவிடட்டும்
தொடங்கும் கழகம் குனிந்து விடட்டும்
பதுங்கும் நரிகள் மடிந்து விடட்டும்
தோள்கள் திமிரட்டும்

துடிக்கும் இதயம் கொழுந்துவிடட்டும்
தெறிக்கும் திசைகள் நோறிங்கிவிடட்டும்
வடிக்கும் பகைமை மறைந்துவிடட்டும்
நட்பே ஜெய்கட்டும்!!!


சம்போ சிவ சம்போ, சிவ சிவ சம்போ
சம்போ சிவ சம்போ, சிவ சிவ சம்போ

நீ என்ன நானும் என்ன, வேதங்கள் தேவையில்லை..
எல்லோரும் உறவே என்றால், சோகங்கள் ஏதும் இல்லை
சிரிக்கின்ற நேரம் மட்டும், நட்பென்று தேடிடாதே
அழுகின்ற நேரம் கூட, நட்புண்டு நீங்கிடாதே
தோல்வியே என்றும் இல்லை........
துணிந்த பின் பயமே இல்லை.....
வெற்றியே.......

சம்போ சிவ சம்போ, சிவ சிவ சம்போ
சம்போ சிவ சம்போ, சிவ சிவ சம்போ

உறங்கும் மிருகம் எழுந்துவிடட்டும்
தொடங்கும் கழகம் குனிந்து விடட்டும்
பதுங்கும் நரிகள் மடிந்து விடட்டும்
தோள்கள் திமிரட்டும்

துடிக்கும் இதயம் கொழுந்துவிடட்டும்
தெறிக்கும் திசைகள் நோறிங்கிவிடட்டும்
வடிக்கும் பகைமை மறைந்துவிடட்டும்
நட்பே ஜெய்கட்டும்!!!

சம்போ சிவ சம்போ, சிவ சிவ சம்போ
சம்போ சிவ சம்போ, சிவ சிவ சம்போ

ஏக்கங்கள் தீரும்மட்டும், வாழ்வதால் வாழ்க்கையாகும்
ஆசைக்கி வாழும் வாழ்க்கை, ஆற்றிலே கோலமாகும்
பொய் வேடம் வாழ்வதில்லை, மண்ணோடு வீழும் வீழும்
நட்ப்பாலே ஊரும், உலகம் எந்நாளும் வாழும் வாழும்
சாஸ்திரம் நட்புக்கு இல்லை.......
ஆத்திரம் நடப்புக்கு உண்டு..........
ஆட்டமே...

சம்போ சிவ சம்போ, சிவ சிவ சம்போ
சம்போ சிவ சம்போ, சிவ சிவ சம்போ

சம்போ சிவ சம்போ, சிவ சிவ சம்போ
சம்போ சிவ சம்போ, சிவ சிவ சம்போ

எரியும் வெளிகள் உறங்குவதென்ன
தெரியும் திசைகள் பொசுங்குவதென்ன
முடியும் துயரம் திமிருவதென்ன
நெஞ்சில் அனல் என்ன

மறையும் பொழுது திரும்புவதென்ன
மனதை பயமும் நெருங்குவதென்ன
இனியும் இனியும் தயங்குவதென்ன
சொல் சொல் பதில் என்ன

சம்போ சிவ சம்போ, சிவ சிவ சம்போ
சம்போ சிவ சம்போ, சிவ சிவ சம்போ

சம்போ சிவ சம்போ, சிவ சிவ சம்போ
சம்போ சிவ சம்போ, சிவ சிவ சம்போ

Enjoy!!!