Skip to main content

Posts

Showing posts from November, 2005

Day 3 - Rishikesh

The weather looked gloomy with an overcast sky as we woke up. We had breakfast at the hotel and decided to visit Rishikesh today. Again we headed back the way we came yesterday and after crossing Rajaji National Park the road divides and one goes towards to Dehradun and one to Rishikesh. The drive was pleasant, as we opted Laxman  Jhula as our destination google map smartly took us via highway bypassing the main city.But at the end the roads started to get narrower lucky for us we found a parking lot packed yet as we early risers ;)
The weather was little cold compared to the planes of Dehradun with lots of breeze coming from Ganga. We walked to Laxman Jhula to cross it. Oh boy! We have no idea what local authority allows two-wheelers, cycle to cross the hanging bridge which is meant for a pedestrian. And top of it you even have some cows standing in the middle.
I am sure the people coming all the from abroad to Rishikesh for peace, meditation and self-purity do get a complete shock wi…

Metro in Paris

Living in Paris and not travelling in Metro has lots of demerits. Like usual I am going to start with the traffic jams, one way roads, unavailability of parking, high parking tickets and very unusual sense of Parisian driving skills.
These only list if you have a car and travelling of your own. But what about those who are taking other mode of smart transports like Bus, Tram, Bicycle, Rollerblade or just walk to work or work from home? Well, looking at the list they look cool-nice with their own merits and demerits. For example, I used to go to work in summer by bike, it was the quickest mode to reach work with no major traffic. And I used to go-through Bois-de-Boulogne to have some exercise and fresh air.
But wait, I have not listed demerits yet for these mode of transport over Metro. You will have no clue about what is coming up or going on social front like which movie or big concert as metro walls list all those for you. You never know when there is “SALE” coming up from Galeri…

create typewriter effect with ming php for flash (swf) movie

This is nice and simple code it creates the simple effect which you might have seen in lots of web sites. As it is PHP you can use the same from your own news reader to database.

setBackground(0x00,0x00,0x00);// SM - This is very important as it set sets the speed of the movie// SM - Higher the number faster the typing will appear$movie->setRate(3);// SM - This one will depends upon you$movie->setDimension(600,40);$movie->setFrames(31);$movie->nextFrame();// Define your String here $str = 'Miing Typewriter Effect'; /* SM - As you note The space between character if not fixed SM - due to font width so you have to figure out your own SM - Now we split our string and make an array with the same */ $chars = preg_split('//', $str, -1, PREG_SPLIT_NO_EMPTY);// print_r($chars);$inc = 0 ;for($i=0;$isetFont($myFont); $myText->setColor(255,255,255); $myText->SetHeight(30); $myText->addString($chars[$i]); echo ("$chars[…

Create Banner with mirror effect by ImageMagick

A simple way to create a text image which will have mirror effects. The best part of this you do not have to use any fancy imging software and it takes only few seconds to create the same. The code a single line to make it easier for Windows convert -size 460x130 xc:white -font forte -pointsize 72 -fill "#cccccc" -annotate 0x180+12+80 "Banner Mirror" -gaussian 0x2 -stroke black -strokewidth 1 -fill "#80904F" -stroke black -strokewidth 1 -annotate 0x0+12+55 "Banner Mirror" -draw "line 0,68 430,68" Banner-Mirror-Imagemagick.jpg

Reached 10K and folding

Folding @ Home is a Stanford University project of understating protein folding. It is distributed computing where small tasks are sent to Personal Computers (PC) across the world and it uses those CPU power to calculate. The results are sent back to the main computer. It is a very safe program and probably you will not notice any performance change for your computer.
There are similar projects for understanding Genome to AIDS which uses more or less similar technology of distributed computing. If you think you can contribute using your unused power of your PC other than warming the planet than please join any project of your choice.
The recent announcement from Sun about their low power consuming CPU is a new start from those Mega Hertz and Giga Hertz race. As most of the commonly used applications can not use any way as they are always backward compatible to reach all the market.

Orsay revisited

To my greatest surprise I found failure in implementing a perfect backup system for my digital images. Somehow I lost all the pictures from Orsay museum. May be I just deleted them(by mistake)!!! Yes I know the trouble of digital memories they are very easy to capture but most difficult to save. There are lists of problem that can happen to your golden past; starting with the media card to Hard Drive not to mention virus problems or accidental deletion of files
My current system is far from perfect I have one copy on my computer and other in external USB drive. That way I am insured from virus and hard-drive failure but may be I should make DVD(s) and keep it in a separate place. Working for IT is making me so paranoid with backups but I know few people who lost their digital pictures just thinking nothing wrong will happen to them.
Well enough of bragging, I think it was a small and good lesson and great reason to go back again to Orsay. Being there I just forgot all those anxiety…

Diwali at Paris

"Are you safe out there?" This was typical question to which I have been answering to my friends and relatives after the riots at Paris suburbs. I myself was keeping updated with news only. "Thank God" it looks like getting better now. I would not like to make any comments and express my view on the same as it seems to be very complex matter. We celebrated Diwali quite well this year. On evening of 2nd oct. it was at Vendanta Society of Paris(with puja).And on 5th it was at Maison de l'inde with fireworks and cultural activities. But this year the biggest celebration of Diwali was hosted by Mayor of Paris at “Hotel de Ville” for the first time. It was an event by invitation. Unfortunatley, I didnot have enough social contacts to be there.

Part -2

create individual pages for each image dirty way with php
[code]
<?php
//$image_files=[] ;
$type = "jpg";
$abspath_folder = "/home/santm/public_html/PamelasCreation/images" ;
if ( is_dir ( $abspath_folder ) ) {
if ( $handle = opendir( $abspath_folder ) ) {
while (false !== ( $file = readdir($handle ) ) ) {
if ( $file != '.' && $file != '..' && $file != 'CVS' && $file != 'index.html' ) {
//santm echo "FILE is $file \n" ;
$the_array[] = $file;
}
}
}
}
closedir( $handle );
// end of reading the directory
// santm print_r ( $the_array );
// making sure the array only has our jpg image starting with a number
foreach ( $the_array as $img ) {
if ( !is_dir( $abspath_folder .'/'. $img ) ) {
if ( eregi( $type, $img ) && eregi ( "^[0-9]", $img)) {

photo album : imagemagick (part -1)

Quick and dirty way of creating photo album with imagemagick, creating images with black border as it looks good for all #!/bin/cshset files = `echo [0-9]*.jpg`echo $filesforeach file ( $files )set w = `identify -format "%w" $file`set h = `identify -format "%h" $file`if ($w > $h) then convert $file -thumbnail 500X -bordercolor black -border 1 /tmp/foo100/$fileelse convert $file -thumbnail X500 -bordercolor black -border 1 /tmp/foo100/$fileendifend