Wednesday, June 27, 2007

We can search Flickr images with yahoo search now !

This is so cool that this takes care of searching for the images with the given attributes and renders the list of the returned list :). Same thing can be done even with google too, but i am not very sure whether google does indexing of the flickr images...

Any way the things are becoming clear and no need to remember hell lot of site names to search for a desired one...

Wednesday, June 20, 2007

FooPlot is really Cool ...

I tried by manually entering x+1 with a liner line funtion y = x + 1 in 3D to see the graph,














http://fooplot.com/x+1 the plot is well shown in the site. I read from this site that in coming days, it will communicate with Google spreadsheets and interact with server-side scripts that do curve fitting and other tasks :) Probably i will skim through my engineering graphics book to study the mysterious curves...




+

Monday, June 18, 2007

Jakie ...

I come to know from my brother that our pet dog has left to heaven ... It was part of our family since 1997. It was so good and understands the commands well. I still remember, it never used to leave my legs when i go to home once in a while... Actually it happened a month and half ago, since i love it much, parents didn't tell me immediately ... I was passive for a while after knowing this news and found the snap that looks similar in flickr. I was thinking to bring it to my place from the place where i had born. Bringing pets to office is not a restriction/ constraint in companies like google, yahoo or amazon. She is great. I am sure i will get a new pet very soon.


+

Nokia N-series ...

This cool series has many features . . . Recenly got this N70 - phone. It comes with a real player song by rehman, the song seems like it dedicated for this series of phones. You can take snaps using 2 of its cameras. I will try to post pics from this mobile soon here in this blog . . .

Tuesday, June 12, 2007

One liner to ensure desired directoy hierarchy exists . . .

This tick reveals unix command line depth and expertise:
You have a predefined directory structure hierarchy and before you start the installation/pushing the binaries into them want to make sure you create the directory structure.

How can you write a command line which creates only the directory structure of a given directory. It should not creates the files, just only the directory hierarchy.

Context:

Present directory is /home/narayana/ and it has the below structure:
a
|------- b
|.........|----- c
|.........|.......|---- t1.txt
|.........|
|.........|
|.........|----- d
|.........|.......|---- t2.txt

Create a new directory called programs in /tools/narayana/ and copy only the directory structure to this.

Solution:
Create a t directory and cd to /tools/narayana/ and execute the below command to create this hierarchy.

ls -Rl /home/narayana/a | grep -e '/home/narayana/a.*:$'| cut -d ':' -f 1| awk '{print substr($1, length("/home/narayana/")+1)}'| xargs mkdir -p

This command creates it!!!

Explanation:
------------
Check it by doing recursive listing byls -Rl:
narayana.desktop% pwd
/tools/narayana/
narayana.desktop% ls -Rl
.:
total 4
drwxr-xr-x 3 narayana homedev 4096 Jul 7 13:24 a

./a:
total 4
drwxr-xr-x 4 narayana homedev 4096 Jul 7 13:24 b

./a/b:
total 8
drwxr-xr-x 2 narayana homedev 4096 Jul 7 13:24 c
drwxr-xr-x 2 narayana homedev 4096 Jul 7 13:24 d

./a/b/c:
total 0

./a/b/d:
total 0


Check with the actual directory format:
narayana.desktop% pwd
/home/narayana
narayana.desktop% cd a
narayana.desktop% ls -Rl
.:
total 4
drwxr-xr-x 4 narayana homedev 4096 Jul 7 12:41 b

./b:
total 8
drwxr-xr-x 2 narayana homedev 4096 Jul 7 12:40 c
drwxr-xr-x 2 narayana homedev 4096 Jul 7 12:41 d

./b/c:
total 4
-rw-r--r-- 1 narayana homedev 126 Jul 7 12:41 3

./b/d:
total 4
-rw-r--r-- 1 narayana homedev 9 Jul 7 12:41 4


+ This is useful in many instances where you just want to create the bins into which
a scheduled job can populate the stuff/demographics :)




+