Saturday, June 25, 2005

Here I am back for work but doin nothin

I returned on 21st and enjoyin day and night and day and .....
The sole purpose of workin on the proj seems to be at the farthest end in my mind.

Watchin movies and Full time BC , net, chats ,...
saw half a dozen of movies in the last 5 days : Mr and Mrs Smith, Kya Kool Hain Hum, Hitch,
Malena, Miss Congeniality-2 , and the other one i dont remember the name.

Kya Kool .... is one good Bollywood movie, i would like all to watch out. Some rib trickling comedy.
Mr. and Mrs. Smith ... just created some hype ... nothin special ... if u have nothin else to do then only take a chance with this one
Malena in my opinion is worth watchin

I hope to start workin on my movie srry project tonite .....
Wish me best of Luck.

Monday, May 30, 2005

I am back.....

Grrr....I published this post 2 days back
written a whole long post accounting the trip and
at the end, when i was writtin the "bbye then " part The light went off
(#$%^&*!@$%..)

anyways , had a gr8 time
Agroha, Chandigarh, Shimla, Kullu-manali, Dharmshala, chamunda, nainadevi, chintaharini, Guru Anand Pur SAhib , Kurukshetra

A 10-11 day trip .. went like a whip of fresh air .... travelled some 2700 kms in a brand new Bolero .........

shimla was a Cool Place (in both senses;) ) .... but in my opinion no use going along with the family , all lovebirds , newly weds and Romeo-julieots .....

Just enjoy the air , the freshness , hotel rooms, food and gals .....

the whole Punjab-Harayana area is gr8
The punjabi-food (parathes), punjabi-folks, punjabi-kudis ................ punjab rocks

booked my return tickets 2 days back .. will come there on 21st .... Its RAC hope i get the clearin

Tuesday, May 10, 2005

Alas Its all Rest and No Work and All Good

i returned here after 4months. I dont know what is that takes up my imagination durin the journey, the treatment u get at home from ur mom dad is mesmerising u feel majestic.

the food, the sleepk,everythin.to its brim, so that u can take no more......Its Good,very Good Indeed.

But Everytime u meet ur mamaas, chaachas, chaachis, taujis, mausajis the same old
"START the CONVERSATION" topic:
1)how is it going?
2)u dont have any probs now , do u ??"no certainly not??"
3)U have good company there ??
4)U dont have prob killin ur time now ,rite ?? friends,work is it not so


Some go a step ahead :
to wahan log lungi(dhoti) pahente hai naa??
Maan lag gaya??Bore to Nahi hota??

I say Come on,not again :
Tired of tellin them its not kerala or Tamil Nadu

But i guess this is not a prob u always need some thing to startup.
what else they have to ask me abt,

"the weather ?? "
"Its k ,fine."

then starts the same old good fashioned BC. Teasin, ear-pullin, masti, cards
( most of my taujis,chachajis love to play them with us , even my dad joins the game and then its gr8 fun)

Alll in alll its worth the wait of 4 months.

Tuesday, May 03, 2005

After all not a bad day

Today we went for Kaal but hard Luck, the movie was playing fullhouse.
We then decided to wait till the next show but it was Fullhouse for the next show too.
then finally decided to go for XXX-2 : State of The Union
And U know what, Ice Cube sucked hard in that movie. Just a bag of
shit, all crap bundled up.I could no longer stand up the "Adreline Pumpin"
Action Seens. All bullshit. Nothin like the Vin Diesel one (XXX -1 ).
I say even Austin Powers stands above that crap. No attitude ,
no looks, no scene(action/hot/comedy),simply nothin that u could recollect
(n believe me u dont wont to).

On a scale of 5 i would rate it *1/2.

But Still it wasnt all that bad ( i mean apart from the movie part ).
We went for the Boat ride in HussainSagar. It was good, the climate was
Coool and Pleasent.Had a gr8 time at eat Street and watched TV after
4 months, the promos ,ads good.
A not so bad outing at all.
And just for ur info i am leavin on 5. will be back in June.

And this is a good script i got my hands on,
found it somewhere wont tell u that but U will love it

" A PHP Script to send SMS "
----------------------------------------------------------------------

# 10 digit number .. can get it from a form using post method
$t = $_POST['toNo'];
$from="9885323234@ri.irisme.net";

# convert it to an email format
$to="91".$t."@ri.irisme.net";
$subject="hi";

# message body .. can get it from a form using post method
$body = $_POST['message'];
$header= "From:". $from."\r\n";
$header.= "X-Mailer: PHP/". phpversion();

if (mail($to,$subject,$body,$header,"-f $from"))
{
echo "To: $t \n";
echo "From: $f \n";
echo "Message: $body \n";
echo "message sent successfully.";
}
else
{
echo "Message delivery failed...\n";
}



-------------------------------------------------------------------

Tuesday, April 26, 2005

Aisa lagta hai .......(ummmmm) jane kaisa lagta hai ,i dont know;)

why is everything so funny today i worder ,
is it what it is or is it the way i am looking at things ?

I feel butterflies in my stomach. I think its momentry apprehension.
It will decamp when i take a good sleep. I think it has all got to do abt me going home on 5th and i am thrilled that i am going home after 4 months and dad has planned a trip ( probably to some hill station , he said we will hire a Qualis or some bigger SUV for the trip , boy i am excited)
By the way my project is going fine and here is a simple code to send a image to a server ( put ur url in the Connector.Open() ) and simply put a PHP to upload image there.


---------------------------------------------------------------------------------
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
import javax.microedition.io.*;
import java.io.*;

public class ImageSend extends MIDlet implements CommandListener
{
private Image img;
private Display display;
private Command exit;
private Command show;
private Form fImage;
private ImageItem iitm;

private Form messF;
private byte data[];

public ImageSend()
{
getImage();
display=Display.getDisplay(this);
fImage=new Form("Some image");
exit=new Command("Exit",Command.SCREEN,1);
show=new Command("Send",Command.SCREEN,1);
iitm=new ImageItem(null,img,ImageItem.LAYOUT_DEFAULT,"Missing");
fImage.append(iitm);

fImage.setCommandListener(this);
fImage.addCommand(exit);
fImage.addCommand(show);
display.setCurrent(fImage);
}
public void startApp()
{


}
public void pauseApp()
{
}
public void destroyApp(boolean unconditional)
{
}
public void commandAction(Command c, Displayable d)
{
if(c==exit)
{
destroyApp(false);
notifyDestroyed();
}
if(c==show)
{
try
{
HttpConnection htt=(HttpConnection)Connector.open("http://192.168.36.200/~parag/linux/temp.php",Connector.READ_WRITE);
htt.setRequestMethod( HttpConnection.POST );
String boundary = "---------------------------7d43722015402c8";

String message = "--"+boundary+"\r\nContent-Disposition: form-data;"+
"name=\"bytes\"; filename=\"camera.png\"\r\nContent-Type: " + "/x-png\r\n\r\n";

byte []messageBody = message.getBytes();
htt.setRequestProperty("content-type", "multipart/form-data; boundary="+boundary);
DataOutputStream out = new DataOutputStream(htt.openOutputStream());
for(int i=0; i < j="0;j<" message="\r\n" messagebody =" message.getBytes();" i="0;" dis="htt.openDataInputStream();" baos="new" ch="dis.read())!="-1)" data="baos.toByteArray();" strb="new" r="0;r
strb.append((char)data[r]);

System.out.println(strb.toString());
//img=Image.createImage(dt,0,dt.length);
//iitm=new ImageItem(null,img,ImageItem.LAYOUT_DEFAULT,"Missing");
messF=new Form(strb.toString());
//messF.append(iitm);
messF.addCommand(exit);
messF.setCommandListener(this);
display.setCurrent(messF);
out.close();
dis.close();
htt.close();
}
catch(Exception e)
{
System.err.println("Msg: " + e.toString());
}
}
}
private void getImage()
{
DataInputStream is=null;
HttpConnection htt=null;
try
{
htt=(HttpConnection)Connector.open("http://192.168.36.200/~parag/linux/dcgui2.png");
int len=(int)htt.getLength();
data=new byte[len];
is=htt.openDataInputStream();
is.readFully(data);
is.close();
htt.close();
}
catch(Exception e)
{
System.out.println("Read Error");
img=null;
}
System.out.println("Image size "+data.length);
img=Image.createImage(data, 0, data.length);
}
}
---------------------------------------------------------------

If buzz me if u dont get the code. I think its pretty simple .

Wednesday, April 20, 2005

Hello World

Hi there ,
So u know this, guessed from d title, and have an idea where it will move on to .
"Hello World " The famous of all the programs that is written in most of the programming languages,to begin with, generally consists of the print statement...........well let me not go in the details i am no freeky programmer.

So why am i here ?? Apart from the accutomed reason for blogging ( to jot down special/significat moments, give my mind for your "food" for thought, my feeling/experience/observations ) , i think i m here for a special purpose :
I m doing a project (not that this is the first one) . what i experienced is when i am in trouble or i have a doubt i look for the solution on the net ( i use google , but i think i need to switch to some better one) and i have 1000's of solution there . Last sem someone suggested me why dont i try to keep the solutions to problems i faced on some website/blog.Hey that is a good idea ?
But why a blog ,i could have very well gone to some forum and done the same. Now here is the difference : on a forum it looks stupid to post d solution when no one is asking u the question but on a blog u can post it as a suggestion .secondly i dont find enough time to look out for the thousands of questions and answer them ( i mean the ones i have an idea of)..

but it wont be all community service; some fun and loads of "masti" ( now i m getting this feeling this is going to be gr8, incase u have noticed the title of ur browser).

So i think this is it for the first day.
so watch for this space regularly, for it may bring a smile on some face.

[C#] Mutliple Concurrent Producers and Consumers pattern for a Task Queue

If you are in need of a basic concurrent Producers consumers pattern to be used in your application, here is a sample C# program to refer to...