Comprehensive PHP extension development tutorials:
Extension Writing Part I: Introduction to PHP and Zend
Extension Writing Part II: Parameters, Arrays, and ZVALs
Extension Writing Part II: Parameters, Arrays, and ZVALs [continued]
Extension Writing Part III: Resources
2009年6月14日 星期日
2009年6月8日 星期一
了解自己, 了解別人
每個人都需要更了解自己. 越了解自己的缺點, 才能避免一些自己缺點引起的問題.
也唯有更瞭解自己的優點, 才能更精進自己, 往自己的目標前進.
每個人更需要了解生活中接觸的其他人, 因為這些人與自己的生活息息相關. 如果
與他們處的不好, 會影響自己的心情, 影響自己的工作, 甚至是影響自己的身體.
也唯有更瞭解自己的優點, 才能更精進自己, 往自己的目標前進.
每個人更需要了解生活中接觸的其他人, 因為這些人與自己的生活息息相關. 如果
與他們處的不好, 會影響自己的心情, 影響自己的工作, 甚至是影響自己的身體.
出張嘴最容易
不可諱言, 有些人想法跟意見很多. 但在某些情境裡面, 卻讓人有 "說的簡單" 的感覺.
Credit 是需要建立的. 覺得別人不尊重自己的意見時, 有時必須檢視自己是否有足夠的 Credit
可以使人信服 - 想想那些立法委員吧.
套句 Alex 說的話 - 當有人覺得自己是天才的時候, 世界上又誕生了一個笨蛋了.
思考跟事前工作當然都需要考量, 再來就是執行與提出成果. 有時說的再多,
都遠不如拿出具體成果或成績來的有說服力 - 有些人總是不懂.
與其自怨自艾, 覺得無法獲得應有的尊重跟待遇, 倒不如先把自己應當負責的工作做到完美吧~
Credit 是需要建立的. 覺得別人不尊重自己的意見時, 有時必須檢視自己是否有足夠的 Credit
可以使人信服 - 想想那些立法委員吧.
套句 Alex 說的話 - 當有人覺得自己是天才的時候, 世界上又誕生了一個笨蛋了.
思考跟事前工作當然都需要考量, 再來就是執行與提出成果. 有時說的再多,
都遠不如拿出具體成果或成績來的有說服力 - 有些人總是不懂.
與其自怨自艾, 覺得無法獲得應有的尊重跟待遇, 倒不如先把自己應當負責的工作做到完美吧~
2009年6月3日 星期三
Simplest GMime Example Code
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gmime-2.0/gmime/gmime.h>
#include <errno.h>
void
error_msg(const char *msg)
{
if (NULL != msg)
printf("%s - (%d)\n", msg, gmime_error_quark);
exit(1);
}
int
main(int argc, char *argv[])
{
FILE *fp = NULL;
const char *subject = NULL;
const char *msg_id = NULL;
GMimeParser *parser = NULL;
GMimeStream *gfs = NULL;
GMimeMessage *message = NULL;
GMimeObject *part = NULL;
gpointer user_data;
if (2 != argc ||
NULL == (fp = fopen(argv[1], "r")))
error_msg("invalid argument!!");
g_mime_init(0);
if (NULL == (gfs = g_mime_stream_file_new(fp)))
error_msg("failed to get stream!!");
if (NULL == (parser = g_mime_parser_new_with_stream(gfs)))
error_msg("failed to get parser!!");
if (NULL == (message = g_mime_parser_construct_message(parser)))
error_msg("failed to construct message!!");
subject = g_mime_message_get_subject(message);
msg_id = g_mime_message_get_message_id(message);
printf("Subject: %s\n", subject);
printf("Message-Id: %s\n", msg_id);
g_mime_shutdown();
return 0;
}
2009年6月2日 星期二
To Build and Compile Code with GMime on CentOS 5.2
Use pkg-config to generate compilation flags is convenient:
pkg-config --cflags --libs gmime-2.0
On CentOS 5.2, you should install gmime and gimime-devel to make pkg-config output correct compilation
flags:
yum install gmime
yum install gmime-devel
pkg-config --cflags --libs gmime-2.0
On CentOS 5.2, you should install gmime and gimime-devel to make pkg-config output correct compilation
flags:
yum install gmime
yum install gmime-devel
訂閱:
意見 (Atom)