Custom Search

Wednesday, January 5, 2011

Jealousy

The warped human mind. An emotion typically of negative thoughts and feelings of insecurity, fear, and anxiety over an anticipated loss of something that the person values, such as a relationship, friendship, or love.
The talent I have, the passion I have in computer programming, the creative problem solving skills that has proven to be triumph with every memory leak I solved, every database conflict I resolved with vendors providing amateurish coding skills and employees with supposedly good logical programming skills.
I used my savings from being a researcher to start my small passion and I'm still struggling in this world 7 months after I started. 17 months ever since I started planning for it. Constantly multi tasking between multi touch technologies and my father's business.
How heaven plays with people. A god sent "son". My age, my talent but a different field. A money making one. One that my father would love. On the way to marriage with a gorgeous wife. A trap he laid perfectly to allow my father to let him use his fortune to build his own.
Why do I care? Why am I jealous? My father has seen what I can do. He has seen what this pseudo-son of his do...or has he? The game has just begun. He has no idea what this pseudo-son has up his sleeve. With his guard down with my father triumph? I warned him. I have done my duty to warn him. Its up to him to pay for his lesson.
I want to stick to my passion. I can take over his business. I can join the money making entrepreneurial passionless rat race or know that my interactive technology is never going to be scalable with the meager capital. Never in time at least before I have to join the rat race that my father needs me to take over so that he can retire. Time is running out.

Saturday, November 27, 2010

Samsung Galaxy Tab M1 settings

Name: sunsurf internet
APN: sunsurf
Proxy: not set
Port: not set
User name: +65
Password: user123
Server: Not Set
MMSC: http://mmsgw:8002
MMS proxy: 172.016.014.010
MMS port: 8080
MCC: 525
MNC: 03
Authentication type: None
APN type: internet + mms


Friday, November 26, 2010

Flash Export to Quicktime mov

When exporting to Quicktime movie, make sure that there is no stop(); inside the as code. If there is, it will hang at "Recording Flash content".
This export function works for timeline written Flash and not purely AS written Flash. I exported a movie that loaded everything with Flash and it was only a clip that is half a second long. Therefore, you will have to specify the length of the movie manually.

Monday, August 30, 2010

php mail() function

When using smtp.gmail.com, gmail will automatically change the From: field to the account.

$receiverName = "receiver name";
$to = "to@hotmail.com";

$senderName = "sender name";
$senderEmail = "sender@hotmail.com";

$subject = "Hi $receiverName, Email From $senderName";

$fileatt = 'image.jpg';

$fileatttype = 'image/jpeg';

$fileattname = 'image.jpg';

$file = fopen( $fileatt, "r" );

$data = fread( $file, filesize( $fileatt ) );

fclose( $file );

$dataencode = chunk_split(base64_encode(file_get_contents('image.jpg')));

$mime_boundary='==Multipart_Boundary_x'.md5(mt_rand()).'x';

//reply to field allows the reply to one sender.
// but from field will still show 2 senders

$headers = "From: $senderEmail \r\n" .
"Reply-To: $senderEmail \r\n".
"MIME-Version: 1.0\r\n" .
"Content-Type: multipart/mixed;" .
"boundary=\"$mime_boundary\";\n\n"
;

$message = "--$mime_boundary\n";
$message .= "Content-Type: text/plain; charset=UTF-8\n";
$message .= "Content-Transfer-Encoding: 8bit\n\n";
$message .= "Thank You.\n\n";

$message .= "--$mime_boundary\n" .
"Content-Type: image/jpeg;\n" .
" name= image.jpg \n" .
"Content-Disposition: attachment;\n" .
" filename= $fileattname \n" .
"Content-Transfer-Encoding: base64\n\n" .
$dataencode . "\n\n" .
"--$mime_boundary--\n";
$message1 = "test";

$mail_sent = @mail( $to, $subject, $message1, $headers."From: $senderName<$senderEmail>");
//if the message is sent successfully print "Mail sent". Otherwise print "Mail failed"
echo $mail_sent ? "Mail sent" : "Mail failed";


Will result in the From field being your gmail regardless of what you key in.

However, if you use Yahoo email smtp server, the From: field will not be automatically changed and the result will be your desired one.

change the mail function to the following when using gmail smtp servers:

$mail_sent = @mail( $to, $subject, $message1, $headers."From: $senderName<$to>");

So that your default gmail account will not be seen. However, in the original message properties, it will still be shown for both yahoo and gmail.

Tuesday, August 17, 2010

smtp server settings

gmail

smtp.gmail.com
Port 465, Implicit TLS. Protocol always starts with TLS.

smtp.bizmail.yahoo.com
Port 25, Do not use TLS

smtp.mail.yahoo.com
Port 25, Do not use TLS

smtp.live.com
port 25, SSL enabled

Sunday, August 8, 2010

How to connect your iphone to your laptop wifi ad-hoc

Some hotels don't have wireless internet connection and they only have a wired LAN and unfortunately, iphone can't connect to the internet via the usb unlike windows mobile phones.

Here's how to setup a wireless adhoc network on windows xp and connect your iphone to your laptop to use the LAN.

Go to wireless network connection properties,

Add... a new Preferred networks:

Enter a new SSID, wireless network key of your choice,

Then click ok

Next, Highlight both your LAN and Wireless Network Connection

Right click and create a network bridge

Done!

You should see that your wireless Network Connection is not connected but the Network bridge is connected when you connect your phone.

This should work like a normal wireless router and no additional configurations should be needed on your phone.

Cheers!

Wednesday, February 24, 2010

opencv read xml file contents

I spent 1 hour trying to find out what was the problem of reading the contents of an xml file.

When reading a single parameter,

eg. 0

you have to use cvReadIntByName

When reading multiple parameters

eg. 0 30 200 10 3

you have to use CvSeq* s = cvGetFileNodeByName(fs,0,"calibration")->data.seq;

then cvReadInt( (CvFileNode*)cvGetSeqElem(s,index) );

My problem was I was reading a single parameter and I used the second method but specifying index = 0. This doesn't work! CvSeq* s returns rubbish when there is only 1 parameter.