Thursday, November 18, 2010
opensource and linux commands
1.start http service=/etc/init.d/httpd start
2.php version =php -version
3.chmod 755 /var/www/html/open
4.chmod 777 /var/www/html/open
5.command to inclue file in php
localhost=require_once(dirname(__FILE__)."/path.php");
?>
or
$path = '/usr/lib/pear';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
?>
2.
urlencoding:
This function is convenient when encoding a string to be used in a query part of a URL, as a convenient way to pass variables to the next page.
php function:
string urlencode ( string $str )
example:
$text=urlencode("we can do and i am selva kumar");
?>
reference:
http://php.net/manual/en/function.urlencode.php
Sunday, October 31, 2010
Cassandra NoSQL database steps and CRUD
Cassandra is a highly scalable, eventually consistent, distributed, structured
key-value store.
Project description
-------------------
Cassandra brings together the distributed systems technologies from Dynamo
and the data model from Google's BigTable. Like Dynamo, Cassandra is
eventually consistent. Like BigTable, Cassandra provides a ColumnFamily-based
data model richer than typical key/value systems.
For more information see http://cassandra.apache.org/
Requirements
------------
* Java >= 1.6 (OpenJDK and Sun have been tested)
Getting started
---------------
This short guide will walk you through getting a basic one node cluster up
and running, and demonstrate some simple reads and writes.
* tar -zxvf apache-cassandra-$VERSION.tar.gz
* cd apache-cassandra-$VERSION
* sudo mkdir -p /var/log/cassandra
* sudo chown -R `whoami` /var/log/cassandra
* sudo mkdir -p /var/lib/cassandra
* sudo chown -R `whoami` /var/lib/cassandra
Note: The sample configuration files in conf/ determine the file-system
locations Cassandra uses for logging and data storage. You are free to
change these to suit your own environment and adjust the path names
used here accordingly.
Now that we're ready, let's start it up!
* bin/cassandra -f
Running the startup script with the -f argument will cause Cassandra to
remain in the foreground and log to standard out.
Now let's try to read and write some data using the command line client.
* bin/cassandra-cli --host localhost --port 9160
The command line client is interactive so if everything worked you should
be sitting in front of a prompt...
Connected to localhost/9160
Welcome to cassandra CLI.
Type 'help' or '?' for help. Type 'quit' or 'exit' to quit.
cassandra>
As the banner says, you can use 'help' or '?' to see what the CLI has to
offer, and 'quit' or 'exit' when you've had enough fun. But lets try
something slightly more interesting...
cassandra> set Keyspace1.Standard2['jsmith']['first'] = 'John'
Value inserted.
cassandra> set Keyspace1.Standard2['jsmith']['last'] = 'Smith'
Value inserted.
cassandra> set Keyspace1.Standard2['jsmith']['age'] = '42'
Value inserted.
cassandra> get Keyspace1.Standard2['jsmith']
(column=age, value=42; timestamp=1249930062801)
(column=first, value=John; timestamp=1249930053103)
(column=last, value=Smith; timestamp=1249930058345)
Returned 3 rows.
cassandra>
If your session looks similar to what's above, congrats, your single node
cluster is operational! But what exactly was all of that? Let's break it
down into pieces and see.
set Keyspace1.Standard2['jsmith']['first'] = 'John'
\ \ \ \ \
\ \ \_ key \ \_ value
\ \ \_ column
\_ keyspace \_ column family
Data stored in Cassandra is associated with a column family (Standard2),
which in turn is associated with a keyspace (Keyspace1). In the example
above, we set the value 'John' in the 'first' column for key 'jsmith'.
For more information on the Cassandra data model be sure to checkout
http://wiki.apache.org/cassandra/DataModel
Wondering where to go from here?
* The wiki (http://wiki.apache.org/cassandra/) is the
best source for additional information.
* Join us in #cassandra on irc.freenode.net and ask questions.
* Subscribe to the Users mailing list by sending a mail to
user-subscribe@cassandra.apache.org
HANDS ON PRACTICE:
[root@godtamil softwares]# cd apache-cassandra-0.6.6
[root@godtamil apache-cassandra-0.6.6]# bin/cassandra-cli --host localhost --port 9160
Connected to: "Test Cluster" on localhost/9160
Welcome to cassandra CLI.
Type 'help' or '?' for help. Type 'quit' or 'exit' to quit.
cassandra> ?
List of all CLI commands:
? Same as help.
help Display this help.
connect
describe keyspace
exit Exit CLI.
quit Exit CLI.
show config file Display contents of config file.
show cluster name Display cluster name.
show keyspaces Show list of keyspaces.
show api version Show server API version.
get
get
get
get
set
set
del
del
del
count
count
cassandra> show api version
2.2.0
cassandra> show keyspaces
Keyspace1
system
cassandra> set Keyspace1.Standard1.['murugar'].['first']='lord';
cassandra> set Keyspace1.Standard1.['murugar'].['first']=['lord'];
cassandra> set Keyspace1.Standard1.['murugar']['first']=['lord'];
line 1:23 extraneous input '.' expecting '['
line 1:45 extraneous input '[' expecting StringLiteral
Value inserted.
=> (column=6669727374, value=lord, timestamp=1288333757977000)
Returned 1 results.
cassandra> get Keyspace1.Standard1
cassandra> get Keyspace1.Standard1['murugar']
=> (column=6669727374, value=lord, timestamp=1288333757977000)
Returned 1 results.
cassandra> get Keyspace1.S
cassandra> get Keyspace1.Standard2['murugar']
Returned 0 results.
cassandra> get Keyspace1.Standard1['murugar']
=> (column=6669727374, value=lord, timestamp=1288333757977000)
Returned 1 results.
cassandra> get Keyspace1.Standard1['murugar']
=> (column=6669727374, value=lord, timestamp=1288334054007000)
Returned 1 results.
cassandra> set Keyspace1.Standard1['murugar']['first']='lord'
Value inserted.
cassandra> get Keyspace1.Standard1['murugar']
=> (column=6669727374, value=lord, timestamp=1288334104678000)
Returned 1 results.
Type 'help' or '?' for help. Type 'quit' or 'exit' to quit.
cassandra> set Keyspace1.S
set Keyspace1.Standard1 set Keyspace1.Standard2 set Keyspace1.StandardByUUID1 set Keyspace1.Super1 set Keyspace1.Super2
cassandra> set Keyspace1.Standard2['murugar']['first']='lord'
Value inserted.
cassandra> set Keyspace1.S
set Keyspace1.Standard1 set Keyspace1.Standard2 set Keyspace1.StandardByUUID1 set Keyspace1.Super1 set Keyspace1.Super2
cassandra> set Keyspace1.Standard
set Keyspace1.Standard1 set Keyspace1.Standard2 set Keyspace1.StandardByUUID1
cassandra> set Keyspace1.Standard2['murugar']['last']='alzhakar'
Value inserted.
set Keyspace1.Standard2['murugar']['age']='ageless'
Value inserted.
cassandra> get Keyspace1.Standard2
line 0:-1 mismatched input '
cassandra> get Keyspace1.Standard2['murugar']
=> (column=last, value=alzhakar, timestamp=1288334425977000)
=> (column=first, value=lord, timestamp=1288334370929000)
=> (column=age, value=ageless, timestamp=1288334457607000)
Returned 3 results.
cset Keyspace1.Standard2['selva']['first']='selva' ' '
Value inserted.
cassandra> set Keyspace1.Standard2['selva']['last']='kumar'
Value inserted.
cassandra> set Keyspace1.Standard2['selva']['age']='20'
Value inserted.
cassandra> get Keyspace1.Standard2['selva']
=> (column=last, value=kumar, timestamp=1288334652697000)
=> (column=first, value=selva, timestamp=1288334637395000)
=> (column=age, value=20, timestamp=1288334691443000)
Returned 3 results.
cassandra> get Keyspace1.Standard2['selva']['first']
=> (column=first, value=selva, timestamp=1288334637395000)
cassandra> get Keyspace1.Standard2['selva']['age']
=> (column=age, value=20, timestamp=1288334691443000)
cassandra> del Keyspace1.S
DELETION:
del Keyspace1.Standard1 del Keyspace1.Standard2 del Keyspace1.StandardByUUID1 del Keyspace1.Super1 del Keyspace1.Super2
cassandra> del Keyspace1.Standard['selva']['like']
No such column family: Standard
cassandra> del Keyspace1.Standard2['selva']['like']
column removed.
cassandra> del Keyspace1.Standard2['selva']
row removed.
cassandra> get Keyspace1.Standard2['selva']
Returned 0 results.
cassandra> get Keyspace1.Standard2['mugrugar']
Returned 0 results.
cassandra> get Keyspace1.Standard2['murugar']
=> (column=last, value=alzhakar, timestamp=1288334425977000)
=> (column=first, value=lord, timestamp=1288334370929000)
=> (column=age, value=ageless, timestamp=1288334457607000)
Returned 3 results.
SUPER COLUMN:
cassandra> set Keyspace1.Standard2['selva']['post1']['content']='cloudcomputing'
supercolumn parameter is invalid for standard CF Standard2
cassandra> set Keyspace1.Super1['selva']['post1']['content']='cloudcomputing'
Value inserted.
cassandra> get Keyspace1.Super1['selva']['post1']['content']
=> (column=636f6e74656e74, value=cloudcomputing, timestamp=1288335271397000)
cassandra> set Keyspace1.Super2['selva']['post1']['content']='NoSql'
Value inserted.
cassandra> get Keyspace1.Super2['selva']['post1']['content']
=> (column=content, value=NoSql, timestamp=1288335348079000)
cassandra> del Keyspace1.Super2['selva']['post1']['content']
column removed.
cassandra> get Keyspace1.Super2['selva']['post1']['content']
Exception null
cassandra> set Keyspace1.Super1['selva']['post1']['content']='cloudcomputing'
Value inserted.
cassandra> set Keyspace1.Super2['selva']['post1']['content']='NoSql'
Value inserted.
cassandra> get Keyspace1.Super2['selva']['post1']['content']
=> (column=content, value=NoSql, timestamp=1288335511929000)
cassandra> get Keyspace1.Super2['post1']['selva']['content']='cloudcomputing'
line 1:49 missing EOF at '='
Exception null
cassandra> set Keyspace1.Super2['post1']['selva']['content']='cloudcomputing'
Value inserted.
cassandra> set Keyspace1.Super2['post2']['selva']['content']='NoSql'
Value inserted.
cassandra> get Keyspace1.Super2['post2']['selva']['content']
=> (column=content, value=NoSql, timestamp=1288335606237000)
cassandra> get Keyspace1.Super2['post1']['selva']['content']
=> (column=content, value=cloudcomputing, timestamp=1288335587702000)
cassandra> get Keyspace1.Super2['selva']['content']
Returned 0 results.
cassandra> get Keyspace1.Super2['post1']['selva']
=> (column=content, value=cloudcomputing, timestamp=1288335587702000)
Returned 1 results.
cassandra> get Keyspace1.Super2['post1']
=> (super_column=selva,
(column=content, value=cloudcomputing, timestamp=1288335587702000))
Returned 1 results.
cassandra> set Keyspace1.Super2['selva']['post1']['content']='cloud computing'
Value inserted.
cassandra> set Keyspace1.Super2['selva']['post2']['content']='nosql'
Value inserted.
cassandra> get Keyspace1.Super2['selva']['post2']['content']
=> (column=content, value=nosql, timestamp=1288336013459000)
cassandra> get Keyspace1.Super2['selva']['post1']['content']
=> (column=content, value=cloud computing, timestamp=1288335996832000)
cassandra> get Keyspace1.Super2['selva']['post1']
=> (column=content, value=cloud computing, timestamp=1288335996832000)
Returned 1 results.
cassandra> get Keyspace1.Super2['selva']
=> (super_column=post2,
(column=content, value=nosql, timestamp=1288336013459000))
=> (super_column=post1,
(column=content, value=cloud computing, timestamp=1288335996832000))
Returned 2 results.
cassandra> count Keyspace1.S
count Keyspace1.Standard1 count Keyspace1.Standard2 count Keyspace1.StandardByUUID1 count Keyspace1.Super1 count Keyspace1.Super2
cassandra> count Keyspace1.Standard2['murugar']
3 columns
cassandra> count Keyspace1.Standard2['selva']
0 columns
cassandra> set Keyspace1.Standard2['selva']['first']='selva'
Value inserted.
cassandra> set Keyspace1.Standard2['selva']['last']='ku mar'
Value inserted.
cassandra> get Keyspace1.Standard2['selva']
=> (column=last, value=ku mar, timestamp=1288336154687000)
=> (column=first, value=selva, timestamp=1288336142197000)
Returned 2 results.
cassandra> count Keyspace1.Standard2['selva']
2 columns
COUNTING:
cassandra> count Keyspace1.Super2.['selva']['post1']
line 1:22 extraneous input '.' expecting '['
1 columns
cassandra> count Keyspace1.Super2['selva']['post1']
1 columns
cassandra> count Keyspace1.Super2['selva']['post2']
1 columns
cassandra> count Keyspace1.Super2['selva']
2 columns
more doubt means contact me:selvawithedu@gmail.com (knowledge should spread over the world)
REFERENCES:
1.http://www.klunde.net/tag/cassandra/
2.http://blog.nowvu.com/2010/08/19/cassandra-and-php-become-friendly-with-phpcassa/
3.http://www.sodeso.nl/?p=80
Tuesday, August 31, 2010
COMPUTER USER'S PLEASE AWARE - Repetitive Strain Injury
YouTube - Repetitive Strain injury
MOUSE USAGE TIPS: 10 Tips for Mouse Use
Monday, August 2, 2010
Friday, July 30, 2010
Wednesday, July 28, 2010
YouTube - I Love Living Life. I Am Happy.
10 வயதில் கம்ப்யூட்டர் இன்ஜினியர் மதுரை சிறுமி சாதனை
Tuesday, July 27, 2010
Monday, July 26, 2010
Saturday, July 24, 2010
Sunday, July 18, 2010
Powerful Applications of Vedic Mathematics in the field of Information Technology
- Sent using Google Toolbar"
Vedic Maths Forum India Blog: vedic mathematics
Vedic Maths Forum India Blog: vedic mathematics: "- Sent using Google Toolbar"
Saturday, July 17, 2010
Aptitude Questions and Answers - IndiaBIX
Wednesday, July 14, 2010
R S AGARWAL QUANTITATIVE APTITUDE- FREE DOWNLOAD | S.Narayanan
Sunday, July 11, 2010
திருக்குறள் THIRUKURAL WITH தமிழ் AND ENGLISH MEANING
ThirukkuRaL - English Translation
திருக்குறள்
kaDavuL vAzththu (Praise of God)
பாயிரம் ( கடவுள் வாழ்த்து )
1. அகர முதல எழுத்தெல்லாம் ஆதி
பகவன் முதற்றே உலகு.
akara mudhala ezuththellAm Adhi
bagavan mudhaRRE ulagu.
Translation:
'A' is the prime of all letters. The Source - the God is the prime of the world.
Notes:
i. All the letters are voiced subsequent to the letter "A" and hence we call them as
alphabets. For the world that came to existence there is One Who stood before
beginningless (and stands endless). That God is the ultimate Precedent of the world.
2. கற்றதனால் ஆய பயன் என்கொல் வாலறிவன்
நற்றாள் தொழாஅர் எனின்.
kaRRadhanAl Aya payan enkol vAlaRivan
n^aRRAL thozAar enin.
Translation:
What is the use of learning, if they do not adore the propitious Feet of Pure-scient.
Notes:
i. The wise thing to do is come out of the filth (pAcam) that binds and enjoy the
everlasting bliss. This is possible for one who holds on to the Feet of God. So the
learning is fruitful when it brings the maturity of mind to pursue this wisdom.
ii. c.f. kaRRuny civanyAnam illAk kaladhikaL cuRRamum viDAr thuricaRAr mUDarkaL - thirumUlar
kaRRavarkku Or kaRpagamAy n^inRAy n^IyE - appar
Odhi n^annUl kaRRAr parava - appar
iii. vAlaRivan - God, The One that knows in completeness and pureness.
3. மலர்மிசை ஏகினான் மாணடி சேர்ந்தார்
நிலமிசை நீடு வாழ்வார்.
malarmicai EkinAn mANaDi cErn^dhAr
n^ilamicai n^IDu vAzvAr.
Translation:
Those who reaches out to the Glorious Feet of the One Who shows up on the flower
(lotus of heart), would live long over the land (world).
Notes:
i. The focus of the devotees make them capable of even winning over the world.
(c.f. thiruththoNDar purANam) As they are yogis they do not die short, but get liberated.
Since they are sincere in their heart, they stay in the memories of the world.
(c.f. uLLaththAl poyyAdhozukin.. - kuRaL)
ii. malar - uLLaththAmarai/ hR^idaya pa.Ngajam (c.f. hariNa parashu pANim padma pIToparishtam)
4. வேண்டுதல் வேண்டாமை இலான் அடிசேர்ந்தார்க்கு
யாண்டும் இடும்பை இல.
vENDuthal vENDAmai ilAn aDicErn^dhArkku
yANDum iDumbai ila.
Translation:
For those who reach out to the Feet of the One, Who does not have requirement or reluctance,
there is never distress.
Notes:
i. God does not require anything external to exist or to be happy etc. Nor does It have
aversion towards anything. (If It has, It cannot be in absolute happiness !) It is the
Perfect Being and hence hailed as shiva. The form of Lord shiva that is adorned
with things that are least respected is an indication of this quality of God.
(c.f. ikazAdhE ArenbEyEnum aNin^dhuzalvAr - kAraikkAl ammaiyAr).
ii. As the God is beyond the likes and dislikes, the devotee who holds on to the bondless
God also gets the similar characteristics. However they may appear in the eyes of the world,
the devoted surpasses distress.
iii. c.f. kUDum anbinil kumbiDalE anRi
vIDum vENDA viRalin viLaN^ginAr - thiruththONDar purANam
5. இருள்சேர் இருவினையும் சேரா இறைவன்
பொருள்சேர் புகழ்பு¡¢ந்தார் மாட்டு.
iruLcEr iruvinaiyum cErA iRaivan
poruLcEr pukazpurin^dhAr mATTu.
Translation:
Either kind of deeds tainted with darkness would not reach on to those, who have done to
the worthy glory of God.
Notes:
i. Both the meritorious and demeritorious deeds produce good and bad fruits respectively,
but do not result in a state that is eternal bliss - that does not concern with the
external goodness and badness. So they both have the taint of darkness.
ii. As the devoted do not focus on themselves but focus on the ever blissful Lord, they do
not own the two kinds of deeds. (at the stage of liberation).
iii. c.f. aNNAmalai thozuvAr vinai vazuvAvaNNam aRumE - camban^dhar
6. பொறிவாயில் ஐந்தவித்தான் பொய்தீர் ஒழுக்க
நெறிநின்றார் நீடு வாழ்வார்.
poRivAyil ain^dhaviththAn poythIr ozukka
n^eRin^inRAr n^IDu vAzvAr.
Translation:
One Who extinguished the gates of the five sensors, in His path devoid of any insincerity,
those who stand, they would live long.
Notes:
i. The pursuit is for the Truth, so it is the path devoid of falsehood.
ii. c.f. anycu kolAm avar vel pulanAvana - thEvAram.
7. தனக்கு உவமை இல்லாதான் தாள் சேர்ந்தார்க்கு அல்லால்
மனக்கவலை மாற்றல் அ¡¢து.
thanakku uvamai illAdhAn thAL Ern^dhArkku allAl
manakkavalai mARRal aridhu.
Translation:
Other than for those who reached out to the Feet of the One without any simile for Himself,
it is hard to change the worries of mind.
Notes:
i. c.f. kAlanai venROm kaDun^arakam kaikazanROm - kAraikkAl ammaiyAr
aththan enakku aruLiyavARu Ar peRuvAr accOvE - thiruvAcakam
immaiyE tharum cORuN^ kUraiyum EththalAm iDar keDalumAm - cun^dharar
civana thAL cin^dhiyAp pEdhaimAr pOlan^I veLginAyE - camban^dhar
8. அறவாழி அந்தணன் தாள் சேர்ந்தார்க்கு அல்லால்
பிறவாழி நீந்தல் அ¡¢து.
aRavAzi an^thaNan thAL cErn^dhArkku allAl
piRavAzi n^In^dhal aridhu.
Translation:
Other than for those who reached out to the Feet of Ocean of Justness- the Kind One,
it is hard to swim over the ocean of births.
Notes:
i. Lord shiva has the flag of bull that signifies the Justness (aRam / dharma).
One of the eight characters of God is being highly merciful, so thirukkuRal also
addresses God as an^thaNan. (Also ref to - an^thaNar enbavar aRavOr - kuRal).
ii. Like the substance glued to the wheel, the pashus keep going up and down over the
wheel enjoying the good and bad fruits of the meritorious and demeritorious deeds.
If one wants to come out of this grind need to seek the help of the Force That could
pull us out of the wheel. So for getting liberation one needs to seek God.
9. கோளில் பொறியில் குணமிலவே எண்குணத்தான்
தாளை வணங்காத் தலை.
kOLil poRiyil guNamilavE eNguNaththAn
thALai vaNaN^gAth thalai.
Translation:
Lost its nature, paralyzed, and attitudeless is the head, when it does not salute the Feet
of the Eight Chractered.
Notes:
i. The purpose of boarding a bus is to reach the destination. The purpose of taking this
body is to get to the Eternal Bliss of God. The head that does not bow down to God
so that the journey goes forward to liberation, is as good as a non-functioning vehicle.
Though the head, the prime of the organs is told here, in the same lines it needs to be
derived for the hands that don't fold in adoration, tongue that doesn't praise etc.
c.f. thiruvaN^gamAlai of appar (1)
vAzththa vAyum n^inaikka maDan^enychum thAzththa cenniyum than^dha thalaivan - appar
vaNaN^gath thalai vaiththu - thiruvAcakam
ii. Lord shiva is specifically hailed by the purANas and scriptures as having Eight great
characters. (2)
c.f. eNNamarum guNaththArum - camban^dhar
eTTuk kolAm avar IRil peruN^guNam - appar
10. பிறவிப் பெருங்கடல் நீந்துவர் நீந்தார்
இறைவன் அடி சேராதார்.
piRavip peruN^kaDal n^In^dhuvar n^In^dhAr
iRaivan aDi cErAdhAr.
Translation:
They would swim off the huge ocean of births. Those who don't are the ones who have not
reached out to the Feet of God.
Notes:
i. The reason of existence is the liberation. So everybody is blessed to reach this shore
of Bliss holding on to the life boat of God's Feet. Those who don't hold on to It, delay
their Fortune further and further.
Wednesday, May 12, 2010
Friday, April 23, 2010
Tuesday, April 6, 2010
Friday, April 2, 2010
THIS IS NICE SITE TO KNOW ABOUT CURRENT TREND
GOOD TECHNICAL WEBSITE
in reference to: C-DAC: Centre for Development of Advanced Computing (view on Google Sidewiki)Wednesday, March 24, 2010
Monday, March 15, 2010
Saturday, March 13, 2010
PHOTOSHOP BUTTONS
PLEASE VISIT THE WEBSTIE