//open connection
$ch = curl_init();
//set the url, number of POST vars, POST data
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_POST, count($fields));
curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);
//execute post
$result = curl_exec($ch);
//close connection
curl_close($ch);
Internet is vague. It has nothing left to be covered now. However, things get messed up sometimes and I forgot where I used to find the materials I had just searched for some days ago. So, I am now gathering all those into this blog. This is just my bookmark or my scrapbook or anything you wish to say. If you think these are helpful, you can take references, no any rights to be defined here. No styles and no colorful designs, just an area to jot down some scraps and all. Enjoy
Pages
Tuesday, May 14, 2013
curl post (php)
Sunday, March 17, 2013
Saturday, March 9, 2013
Mplayer and your own Theare (For Public)
$ mplayer -fs -vf mirror video.flv
Find a window with white curtain, and project from inside. Get a gang outside the window and run your own theatre .
It was COOL to see Sparrow SMS commercial blowup. wooooooooooooow
Find a window with white curtain, and project from inside. Get a gang outside the window and run your own theatre .
It was COOL to see Sparrow SMS commercial blowup. wooooooooooooow
Friday, January 18, 2013
Monday, June 18, 2012
OLAP in mysql
SELECT field1, field2, count(field3), count(field4)
group by field1, field2
with rollup
group by field1, field2
with rollup
Labels:
Database,
HowTO,
mysql,
OLAP,
Tips and Tricks
Sunday, March 18, 2012
Git tags to Github
$ git tag -a TAGNAME
# -a means to annotate a tag with some description.
$ git push --tags
# push the local tags
To know more
http://gitref.org/branching/#tag
# -a means to annotate a tag with some description.
$ git push --tags
# push the local tags
To know more
http://gitref.org/branching/#tag
Labels:
git,
git tags,
github,
howt,
Tips and Tricks,
troubleshooting
Monday, January 2, 2012
Bookmark: Regex Replace for MySQL
Reference -
http://techras.wordpress.com/2011/06/02/regex-replace-for-mysql/
If you are using MySQL version 5.0.1 or higher, make sure you set the NO_BACKSLASH_ESCAPES mode ON, before you use the above function to replace any characters which are escaped with back slash “\”, ie: \A,\B,etc… See how to set the NO_BACKSLASH_ESCAPES mode here
Example on how to use this function
mysql>
Happy Coding!!
http://techras.wordpress.com/2011/06/02/regex-replace-for-mysql/
DELIMITER $$ CREATE FUNCTION `regex_replace`(pattern VARCHAR(1000),replacement VARCHAR(1000),original VARCHAR(1000)) RETURNS VARCHAR(1000) DETERMINISTIC BEGIN DECLARE temp VARCHAR(1000); DECLARE ch VARCHAR(1); DECLARE i INT; SET i = 1; SET temp = ''; IF original REGEXP pattern THEN loop_label: LOOP IF i>CHAR_LENGTH(original) THEN LEAVE loop_label; END IF; SET ch = SUBSTRING(original,i,1); IF NOT ch REGEXP pattern THEN SET temp = CONCAT(temp,ch); ELSE SET temp = CONCAT(temp,replacement); END IF; SET i=i+1; END LOOP; ELSE SET temp = original; END IF; RETURN temp; END$$ DELIMITER ;Note:
If you are using MySQL version 5.0.1 or higher, make sure you set the NO_BACKSLASH_ESCAPES mode ON, before you use the above function to replace any characters which are escaped with back slash “\”, ie: \A,\B,etc… See how to set the NO_BACKSLASH_ESCAPES mode here
Example on how to use this function
mysql>
select regex_replace('[^a-zA-Z0-9\-]','','2my test3_text-to. check \\ my- sql (regular) ,expressions ._,');Happy Coding!!
Labels:
Bookmarks,
HowTO,
mysql,
Regular expression,
Tips and Tricks
Subscribe to:
Posts (Atom)