存档在 2006年5月

转一baidu 贴吧的笑话

2006年5月11日

转一baidu 贴吧的笑话 

tags:笑话 

笑话 爆强 http://post.baidu.com/f?kz=83297161 虽然看过

1、 碗掉下来,天大个疤  

2、一次文艺晚会,主持人上台报幕:下面请欣赏:新疆歌舞,掀起你的头盖骨!毛骨悚然!!!!!  
3、老虎不发猫,你当我是病危呀!  

4、上高中时,课堂纪律混乱,老师一怒之下揪起XXX,说:XXX,你给我站墙上去!~~全班暴寒!  

5、一次我开车,坐我旁边的女同事突然问:“你怎么开车不系安全套的?”  
6、我:那是我们物理老师。。。  
  同学:教什么的阿?  

  我:化学。。。  
7、在网吧,一同学突然举手,大喊:“老师!”  

8、我们宿舍一个人喝多了要去尿尿然后带出一句冷话:尿喝多了,酒就特别多.  

9、买橘子,老板:一块五一斤。我:太贵了,五块钱三斤吧。老板:不行不行。  

10、朋友问我电脑配置,我说显示器是彩屏的。(本来是想说液晶的)  
11、初中文艺晚会,抢答题环节。  

   女主持:“大家注意了,不要抢的太快。等我说完开始在举手”  
   然后开始念题目,说,“现在开。。。”  

   这时候,一个选手就抢答了。  
   主持人就说“这位同学太着急了一点。我‘始’(屎)还在口里,你怎么就抢 了”  

12、听过一MM在食堂喊“给我一碗viper~!”  
13、上学的时候  

   有一天一个电话找我  同学接完递给我说:“你妈**。”  
   我一边接过电话一便随口说到:“男的女的”  

   大家狂笑 我被笑了4年  

14、同学的高中同学(一男生)走进面馆很酷把头发一甩:“老板,2两葱不要米线!”完了还加一句:“多下点米线啊!”老板:“。。。。你到底是要米线还是要葱??”  

15、有一次寝室里同学的老妈打电话过来  
   我习惯说“他不在”,但是这一次我想说的的是“已经出去了”  

   结果说出来是:“他已经…不在了”  
16、gg递给我一根冰糕,我咬一口大叫:“烫死我了!”  

17、和我姐姐去李宁买鞋,我姐一开口:“小姐,这鞋多少钱一斤?”  
18、有一次我拍我宿舍同学的肚子,她大声说:“别拍,我肚子里有小便。”  

19、 高中时每人发个胸牌。。一次来检查前,班主任跑到教室大声喊,大家快把胸罩戴起来,来查拉。。 全场鸦雀无声。。。  

20、上学时周末回家,晚饭后烟瘾犯了,打算借口去散步。在门口换鞋时,老爸问我干吗去?我随口说了句:“去散个烟!”结果老爸从我身上搜出一包555,狠狠K了我一顿。  

21、一次教育局领导视察课间操,结束后,本应由体育老师宣布“解散”,但一时情急,忘词了,憋了半天,大喊:“撤退!”  

22、高中有一老师姓江,酷似罗家英(演大话西游唐僧的),我去问他问题,脱口而出:“唐老师,这题……”  

23、有一同事,有天我开车在路上车胎没气了,问哪里有充气的,同事说:“街上到处都是打胎的啊!”  

24、有一老师大概通宵麻将,见黑板没擦,大怒:“今天谁做庄啊?黑板都不擦!”  

25、有一次我大叔见我小姑在搽大宝,突然大叫一声:“你皮肤这么好,还用护舒宝啊?”  

26、老师留下作业,我不会做就抄别人的,然后去办公室交作业,看见老师说:“我抄完了!”  

27、有一次,我们去黄山旅游,导游刚好介绍到:百步云梯是当年刘小庆<<小花>>的景点。突然我们团里一个男人脱口而出:“导演……..“众人晕。  

28、那次几个女同学来我家玩,我去拿水了,她们打开影碟机看片子,我在里屋听到是粤语,然后我大喊调下音道,音道错了,顿时哑口无言,我脸一虹一紫~~差点晕了过去~~  

29、偶高中,放学和偶MM一起回家,校门口看到一卖烧烤的,MM说要吃牛杂,因为烤架前人比较多,偶怕老板听不见,于是偶大声喊道:“老板,5串牛鞭”然后一片寂静,三秒钟后所有人一起暴笑。偶巨尴尬。。。最尴尬的是MM接着问偶“牛鞭是什么”偶只好非常非常小声地回答MM:“牛鞭就是牛尾巴啊”。。  

30、我和我的mm电话吵架,她把电视音量开得很大,我心里烦,就大声说:“把电话给我关掉!”现在想起来,那个寒啊!  
  31、早上和同学去吃早餐 其中一个只吃包子馅,另外一个只吃皮。我们正在说他们两个浪费的时候吃馅的同学来了一句“行了 以后你吃我的包皮好了”在场的所有喝粥 的全部喷出来了。 

32、说个真事,上班的厂车上,MM问我:我的电脑不行了,老是死。我说:那你回去查查病毒看,记得要升级杀毒软件。MM:哦。第二天一大早,车上又见MM,偶随口问了句:查过了没?怎样?然后。。。。。。。。。MM大声的说了句:气死我了,查了半天,说是没(梅)毒。你说怎么办好啊???当时那个寒啊。。。。现在还记忆尤新 

33、我宿舍一个同学的高中同学打电话来,他说找谁,我说不在,接着说了谢谢 

34、以前别人来我阿姨家作客,刚进门的。刚好我阿姨要去上厕所。她连忙招呼客人说:“你们坐哈坐哈,我去厕所给你们倒点茶喝!” 

35、以前我们有个政治经济学老师,特别喜欢侃!有次谈到美圆强势。他这么 

说,“你们知道为什么只有美圆才被叫做‘美金’,却从来没有听说过有叫‘英 
金’、‘法金’?” 

36、大学军训时,教官大吼一声说:用你们的旁光(余光)对齐~~~~偶们想笑又不敢笑,那个难过呀…. 

37、女同学和她的表妹请我吃饭,席间让我多吃点,我不知道怎么会犯如下的错 
误:“谢谢,最近没性欲,你们多吃点吧!”当时大家都喷饭了。。 

38、我们单位早上上班有车子接送的,因为车子不大,有一次,一mm上车后没座 

位,坐我旁边的一男同事忙站起来,热情的和她打招呼说到:“某某,你坐我屁股上吧!” 我当时一直狂笑到下车~! 

39、以前痴迷网络游戏,经常在网吧杀的混天暗地的,学期结束后,和一帮哥们回家,火车就快要开了,我们却还没找到站台,一时语急说道:“MD,这里怎么连个坐标(其实要找指示牌)也没有啊!~”哥们听后爆笑~~ 

40、以前住校的时候,上下铺。一次A手机要充电。可是一个床铺就一个插座,插了台灯看书就不能充电了,于是乎,A把充电器插在B上面。B晚上要听音乐,看见A的充电器大吼:“哎,我说你怎么老插我上面吖?你怎么不插你下面?”完后一阵骚动,汗~~ 

41、大学时候,一同学和我争论问题,一时处于下风,情急中一拍桌子起身大叫:你胡说,我又不是不傻! 

42、我一哥们去相亲,回来大家问他怎么样,哥们讲:这个女孩真糙。中午到了饭点,2个人进了一家牛肉拉面馆,女孩对师傅大声说道:嘿,给拉2碗~~~拉面的师傅说:你吃吗?吃我就拉。 

43、小时候冰棍雪糕的一般都是推着自行车叫卖,有一次,在屋子里听一阿姨喊:新来的雪糕,热乎的。(估计阿姨以前是卖油饼油条的) 

44、室友用热得快烧水,水开后那厮却悠哉游哉地看书不动弹,实在看不下去了于是开口说:“该拔了吧?叫得好大声。。”没反应。十五秒后补充:“那里很热哎,就这么一直插着很容易插坏的啊。。”没动静。过半分钟水彻底沸腾,哗啦啦地溅了来。“那什么,射出来了。喷出好多东西叫声也越来越大再插着恐怕会弄坏人家哎。。你确定不拔?”。。。一本厚厚的书朝偶的头飞过来!!!~ 

45、高3时我们班主任是教数学的…他给我们复习时~每到画图时,画射线时~~就大声说~~`同学们看好了啊~~我射了啊 

46.上大学的时候去衡山玩,当时爬山爬了一半,累的正想歇会的时候看到路边有个买纪念品的欧巴桑,上去开口就问:"老婆…….." 

47.上自习的时候,大家都在看复习,GG对MM说:“我刚背了单词,帮忙默写一下。” MM不想默,GG就求她,你(摸)默我吧,(摸)我吧!!结果MM实在忍受不了,大喊,老师你看我不想(摸)默他,他非要我(摸)默~~~!!! 

48.有一天去同学家吃饭,喝了点酒,她爸爸忽然进来了,本来是想喊叔叔的,结果说错了,说:“爸,来座!”~~寒!大帮同学笑得要死 

49.我同事跟人争执,急了张口来了句“你以为我吃饭长大的啊?”我一直纳闷他到底吃什么长大的。" 

50.小学时一个很讨厌的男生找我借橡皮,我不借,他就死缠烂打,之后我用尽全身的力气狂吼了一句“我不嫁(借)给你”当时同学们立马安静下来了,,,。 

51.一次ktv,点歌,一mm大声喊:给我点一首周截棍的“双杰伦”……

technorati tags:

linux压缩解压,快查

2006年5月10日

tags:tar,bzip2,gzip,bz2,gz 

压缩
tar -cf xxx.tar dir1 file2   >xxx.tar
bzip2 xxx.tar  > create xxx.tar.bz2 rm xxx.tar
gzip xxx.tar >create xxx.tar.gz rm xxx.tar

解压
tar -xf xxx.tar
tar -xzf xxx.tar.gz
tar -xjf xxx.tar.bz2
bunzip2 xxx.bz2 > create xxx rm xxx.bz2
gunzip xxx.gz > create xxx rm xxx.gz

 

查看
tar -tvf xxx.tar 

technorati tags: , , , ,

摘录 feed burner 的 html柱状图

2006年5月10日

tags:柱状图,统计图表,html,feedburner

<head>
  <style>
/* undohtml.css */
/* (CC) 2004 Tantek Celik. Some Rights Reserved.             */
/*   http://creativecommons.org/licenses/by/2.0                   */
/* This style sheet is licensed under a Creative Commons License. */
:link,:visited { text-decoration:none }
ul,ol { list-style:none }
h1,h2,h3,h4,h5,h6,pre,code { font-size:1em; }
ul,ol,li,dl,dt,dd,h1,h2,h3,h4,h5,h6,pre,form,body,html,p,blockquote,fieldset,input
{ margin:0; padding:0 }
a img,:link img,:visited img { border:none }
address { font-style:normal }
  </style>
  <style>
 /* GENERAL */

a.extLink {
    background: url(/fb/i/icn/arrow_up.gif) no-repeat;
    background-position: center right;
    padding-right: 12px; 
}s
a.extLink:hover {
  text-decoration: none;
  border-bottom: 1px solid #015fab;
}
* html #blast {
    display: none;
}

/* MENU ITEMS */

li#dashboardLink a,
li#adDashboardLink a {       
    background-image: url(/fb/i/icn/gauge.gif);
}  
li#subscribersLink a {       
    background-image: url(/fb/i/icn/subscriber.gif);
}
li#itemsLink a {       
    background-image: url(/fb/i/icn/item.gif);
}
li#uncommonLink a {       
    background-image: url(/fb/i/icn/uncommon.gif);
}
li#adStatsByDateLink a {       
    background-image: url(/fb/i/icn/bar.gif);
}

/* CHART WIDGET */

#chart {
    height: 166px;       
}
* html #chart {
    height: 145px;
}      

/* single item title */

#chart h3 {
    margin-left: 1px;
    font-weight: normal;
    margin-top: -3px;
}

/* date range select */

#chart p {         
    text-align: right;
    font-size: 11px;
    margin: -26px 0 10px 0;
}
#chart p select { 
    font-size: 10px;
    margin-left: 4px;
 }                      
* html #chart p {
    margin-top: 0;
}
                      
/* the big guy himself */                                     

#chart dl {
    border-top: 1px solid #e6e6e6;
    padding-top:19px;
    width: 483px;      
}
/* damn you IE! */
* html #chart dl {
    width: 472px;
    padding-left: 22px;
}
 
#chart dt {
    display: none;
}    

#chart dd {
    float: left;  
}                
#chart dd a {           
    display: block;
     
    background: #7cc483;
    border-right: 1px solid #74b47a;   
    border-left: 1px solid #90d197;
    border-top: 1px solid #90d197;
    border-bottom: 1px solid #999;

    color: white;
    text-align: center;
    font-weight: bold;
    font-size: 9px;           
    line-height: 0;       
}
#chart dd a:hover {
    background: #88c98e;         
    text-decoration: none;
}    
#chart dd a.weekend {
    background: #74b47a;         
}
#chart dd a.weekend:hover {
    background: #7cc483;         
}
#chart dd a span {
    display: block;
    margin-top: 8px;
}     
 
/* y-axis min/max labels */

span#maxLabel,
span#minLabel {     
    display: block;

    font-size: 12px;
    letter-spacing: -1px;
    text-align:right;
    line-height: 16px;

    margin: -17px 0 0 10px;
    padding: 0 6px 0 0;

    color: #444;
    border-bottom: 1px dotted #ddd;
}                  
* html span#maxLabel {
    margin-top: -122px;
}
span#minLabel {
    margin-top: 86px;
}

/* chart changes size, etc depending on selection and context */
         
.thirty-day dd a {
    width: 12px;
    margin-right: 1px;   
}                    
.thirty-day dl {
    padding-left: 25px;     
}

.seven-day dl {
    padding-left: 24px;
}
.seven-day dd a {
    width: 60px;
    margin-right: 3px;
}      

/* for one-day view only */

.one-day dd a {
    opacity: 0.4;
    -moz-opacity:0.4;
    filter: alpha(opacity=40);
}                
.one-day dd a#selected {
    opacity: 1;
    -moz-opacity: 1;        
    filter: alpha(opacity=100);
}

/* earliest to date */

.all img {
    margin-top: 3px;
}
#chart.all {
    height: 139px;
}

/* PAGE BODY */

#statsHolder {                                                      
    padding: 12px;
    background-image: url(/fb/i/stats/bg-statsArea.gif);     
    background-repeat: no-repeat;                
    border-bottom: 1px solid #999;       
  background-position: center top;                                       
}
* html #statsHolder {
    background-position: center 12px;
}                                                                  

/* DATE AND POSITION POINTER */     

h4#date {

    background-image: url(/fb/i/stats/point.gif);
    background-repeat: no-repeat;
   
    background-position: -45px 2px;
    margin-top: -25px;
    padding-top: 24px;
}  
* html h4#date {  
    margin-top: -13px;
}                              
                 
#feed-single-item #statsHolder p {   
    margin-top: 6px;
    font-size: 12px;
    color: #333;
    line-height: 12px;
}                  
p.seeMore {
    margin-top: 12px;
}

/* BIG NUMBERS */

#statsHolder ul li {
    list-style: none;
    margin-left: 0;
    padding-left: 16px;
    margin-top: 18px;
    font-size: 16px;
    color: #333;
    background-image: url(/fb/i/bullet_red_diamond.gif);
}                 
#statsHolder ul li strong {
    font-size: 28px;
    vertical-align: -4px;
    letter-spacing: -1px;
    padding-right: 6px;
    color: black; 
}
#feed-aggregate-items ul li strong,
#feed-single-item ul li strong {
    vertical-align: -2px;
}                       
#statsHolder ul li em {
    font-size: 18px;
    font-style: normal;
    font-weight: bold;

#statsHolder ul li.primary strong {
    font-size: 34px;
    vertical-align: -6px;
 }

/* the pie */

#feed-subscribers img {
    margin-top: 3px;
}     

/* uncommon uses listing on dashboard */
                              
#statsHolder ul.uncommonUses li {
    line-height: 20px;
    margin-top: 12px;
}
#statsHolder ul.uncommonUses li strong { 
    font-size: 16px; 
    letter-spacing: 0;        
    vertical-align: 0;
}                                                     

/* stats tables */

#statsHolder table {
    border-collapse: collapse;
    border-top: 1px solid #ddd;
    border-left: 1px solid #ddd;
    color: #222;
    margin-top: 12px;
    width: 472px;
}             
#statsHolder table td,
#statsHolder table th {
    padding: 5px;
    text-align: left;
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    width: 40px;
    text-align: right;               
}
#statsHolder table td.longCol,
#statsHolder table th.longCol {
    width: auto;
    text-align: left; 
}
#statsHolder table tr#total {
    background: url(/fb/i/bg/bg_pink2.gif);
    font-weight: bold;
}
#statsHolder table th {
    background: url(/fb/images/home_right_gradient.jpg) repeat-x 0px -70px;
    color: #222;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 10px;
    padding-top: 1px;
    padding-bottom: 1px;
}
#statsHolder table td {
    font-size: 13px;
}          

#statsHolder table tr.hover * {
    background-color: #015fab;
    color: white;
}

/*  client table specifically */

#statsHolder table td p {
    display: none;

    font-size: 11px;
    line-height: 16px;
    margin-bottom: 4px;
    color: #444;
}                 
#feed-subscribers #statsHolder table tr td.longCol{
    overflow:hidden;
}
#feed-subscribers #statsHolder table {
    table-layout: fixed;
}

/* uncommon uses table */

#statsHolder table td.check {
    text-align: center;
}
#statsHolder table tr.whitelisted td a {
    opacity: 0.4;
    -moz-opacity:0.4;
    filter: alpha(opacity=40);
}
 
#feed-uncommon-uses #statsHolder table ul {
    display: none;
}
#feed-uncommon-uses #statsHolder table li {
    font-size: 11px;
    margin: 0;
    background: none;
    padding: 0;
}
#feed-uncommon-uses #statsHolder table li a {
    color: #333;
}
#feed-uncommon-uses #statsHolder table td {
    vertical-align: top;
}
#feed-uncommon-uses #statsHolder table td input {
    margin-top: 5px;
}

/* *** TEASERS *** */

#statsTeaser {   
    background: url(/fb/i/stats/teaser-dashboard.gif) no-repeat left top;
    height: 666px;          /* the devil’s height */
    padding-top: 65px;
}
#statsTeaser div,
div#teaser {
    width: 300px;
    margin: 0 auto 0 auto;
    text-align: center;
    padding: 1px 20px 20px 20px;
    background: #f3f3f3;
    border: 1px solid #aaa;
    border-top-color: #ccc;
    border-left-color: #ccc;
}  
div#teaser {
    width: auto;
    margin: 12px 0 12px 0;
    padding: 0;
}
div#teaser p {
    margin: 12px;
}

#statsTeaser h4 {
    font-size: 22px;
    margin-bottom: 6px;
    border: 0;
    color: black;
    letter-spacing: -1px;
    line-height: 26px;
}

/* ********************* */
/* AD PERFORMANCE STYLES */

#months tr#header th {
    text-align: center;
}
#months tr#header th.longCol {
    text-align: left;
}
tr.subHeader td {
    font-weight: bold;

}
#months tr td span {
    color: #666;
    font-size: 11px;
}
#months tr td span.paid {
color: #74b47a;
font-weight: bold;
}
#months tr th.payment {
    width: 110px;
}
#ads-bycampaign ul#campaignStats {
    margin-top: 20px;
}
#ads-bycampaign ul#campaignStats li {
    margin-top: 12px;
}

#accountadstats table,
#stats-date table {
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}
#accountadstats table tr,
#stats-date table tr {
    color: #444;
}
#accountadstats table tr td,
#stats-date table tr td {
    font-size: 11px;
    padding-top: 2px;
    padding-bottom: 2px;
}
#accountadstats table tr td.payment,
#stats-date table tr td.payment {
    border-right: 1px solid #ddd;
}
#accountadstats table tr.subHeader td,
#stats-date table tr.subHeader td {
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    border-top: 1px solid #ddd;
    font-size: 13px;
    padding-top: 16px;
}
table tr.subHeader {
    color: #222;
}

#ads-bycampaign h5 {
    font-size: 30px;
    font-weight: bold;
    letter-spacing: -1px;
    line-height: 30px;
    margin: 12px 0 8px 0;
}
  </style>
</head>
 <div id="chart" class="thirty-day">
    <p>Show stats for
 </p>
    <dl>
        <dt>4/9/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-04-09&amp;id=124550" style="height:0px; margin-top:100px; text-indent: -9000px;" class="weekend" id="" title="Sunday, Apr 09: 0 subscribers">S</a>
        </dd>
        <dt>4/10/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-04-10&amp;id=124550" style="height:10px; margin-top:90px; text-indent: -9000px;" class="" id="" title="Monday, Apr 10: 0 subscribers">M</a>
        </dd>
        <dt>4/11/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-04-11&amp;id=124550" style="height:50px; margin-top:50px; text-indent: -9000px;" class="" id="" title="Tuesday, Apr 11: 0 subscribers">T</a>
        </dd>
        <dt>4/12/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-04-12&amp;id=124550" style="height:30px; margin-top:70px; text-indent: -9000px;" class="" id="" title="Wednesday, Apr 12: 0 subscribers">W</a>
        </dd>
        <dt>4/13/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-04-13&amp;id=124550" style="height:100px; margin-top:0px; text-indent: -9000px;" class="" id="" title="Thursday, Apr 13: 0 subscribers">R</a>
        </dd>
        <dt>4/14/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-04-14&amp;id=124550" style="height:0px; margin-top:100px; text-indent: -9000px;" class="" id="" title="Friday, Apr 14: 0 subscribers">F</a>
        </dd>
        <dt>4/15/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-04-15&amp;id=124550" style="height:0px; margin-top:100px; text-indent: -9000px;" class="weekend" id="" title="Saturday, Apr 15: 0 subscribers">S</a>
        </dd>
        <dt>4/16/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-04-16&amp;id=124550" style="height:0px; margin-top:100px; text-indent: -9000px;" class="weekend" id="" title="Sunday, Apr 16: 0 subscribers">S</a>
        </dd>
        <dt>4/17/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-04-17&amp;id=124550" style="height:0px; margin-top:100px; text-indent: -9000px;" class="" id="" title="Monday, Apr 17: 0 subscribers">M</a>
        </dd>
        <dt>4/18/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-04-18&amp;id=124550" style="height:0px; margin-top:100px; text-indent: -9000px;" class="" id="" title="Tuesday, Apr 18: 0 subscribers">T</a>
        </dd>
        <dt>4/19/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-04-19&amp;id=124550" style="height:0px; margin-top:100px; text-indent: -9000px;" class="" id="" title="Wednesday, Apr 19: 0 subscribers">W</a>
        </dd>
        <dt>4/20/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-04-20&amp;id=124550" style="height:0px; margin-top:100px; text-indent: -9000px;" class="" id="" title="Thursday, Apr 20: 0 subscribers">R</a>
        </dd>
        <dt>4/21/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-04-21&amp;id=124550" style="height:0px; margin-top:100px; text-indent: -9000px;" class="" id="" title="Friday, Apr 21: 0 subscribers">F</a>
        </dd>
        <dt>4/22/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-04-22&amp;id=124550" style="height:0px; margin-top:100px; text-indent: -9000px;" class="weekend" id="" title="Saturday, Apr 22: 0 subscribers">S</a>
        </dd>
        <dt>4/23/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-04-23&amp;id=124550" style="height:0px; margin-top:100px; text-indent: -9000px;" class="weekend" id="" title="Sunday, Apr 23: 0 subscribers">S</a>
        </dd>
        <dt>4/24/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-04-24&amp;id=124550" style="height:0px; margin-top:100px; text-indent: -9000px;" class="" id="" title="Monday, Apr 24: 0 subscribers">M</a>
        </dd>
        <dt>4/25/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-04-25&amp;id=124550" style="height:0px; margin-top:100px; text-indent: -9000px;" class="" id="" title="Tuesday, Apr 25: 0 subscribers">T</a>
        </dd>
        <dt>4/26/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-04-26&amp;id=124550" style="height:0px; margin-top:100px; text-indent: -9000px;" class="" id="" title="Wednesday, Apr 26: 0 subscribers">W</a>
        </dd>
        <dt>4/27/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-04-27&amp;id=124550" style="height:0px; margin-top:100px; text-indent: -9000px;" class="" id="" title="Thursday, Apr 27: 0 subscribers">R</a>
        </dd>
        <dt>4/28/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-04-28&amp;id=124550" style="height:0px; margin-top:100px; text-indent: -9000px;" class="" id="" title="Friday, Apr 28: 0 subscribers">F</a>
        </dd>
        <dt>4/29/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-04-29&amp;id=124550" style="height:0px; margin-top:100px; text-indent: -9000px;" class="weekend" id="" title="Saturday, Apr 29: 0 subscribers">S</a>
        </dd>
        <dt>4/30/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-04-30&amp;id=124550" style="height:0px; margin-top:100px; text-indent: -9000px;" class="weekend" id="" title="Sunday, Apr 30: 0 subscribers">S</a>
        </dd>
        <dt>5/1/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-05-01&amp;id=124550" style="height:0px; margin-top:100px; text-indent: -9000px;" class="" id="" title="Monday, May 01: 0 subscribers">M</a>
        </dd>
        <dt>5/2/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-05-02&amp;id=124550" style="height:0px; margin-top:100px; text-indent: -9000px;" class="" id="" title="Tuesday, May 02: 0 subscribers">T</a>
        </dd>
        <dt>5/3/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-05-03&amp;id=124550" style="height:0px; margin-top:100px; text-indent: -9000px;" class="" id="" title="Wednesday, May 03: 0 subscribers">W</a>
        </dd>
        <dt>5/4/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-05-04&amp;id=124550" style="height:0px; margin-top:100px; text-indent: -9000px;" class="" id="" title="Thursday, May 04: 0 subscribers">R</a>
        </dd>
        <dt>5/5/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-05-05&amp;id=124550" style="height:0px; margin-top:100px; text-indent: -9000px;" class="" id="" title="Friday, May 05: 0 subscribers">F</a>
        </dd>
        <dt>5/6/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-05-06&amp;id=124550" style="height:0px; margin-top:100px; text-indent: -9000px;" class="weekend" id="" title="Saturday, May 06: 0 subscribers">S</a>
        </dd>
        <dt>5/7/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-05-07&amp;id=124550" style="height:0px; margin-top:100px; text-indent: -9000px;" class="weekend" id="" title="Sunday, May 07: 0 subscribers">S</a>
        </dd>
        <dt>5/8/06</dt>
        <dd>
            <a href="/fb/a/dashboard?day=2006-05-08&amp;id=124550" style="height:0px; margin-top:100px; text-indent: -9000px;" class="" id="" title="Monday, May 08: 0 subscribers">M</a>
        </dd>
    </dl>
    <span id="maxLabel">12</span>
    <span id="minLabel">0</span>
</div>
 

在php中使用sqlite

2006年5月10日

tags:sqlite,learn,php,ez_sql

连接 sqlite 数据库
 $ php -r ‘dl("sqlite.so"); \
    $error="";\
    if($db=sqlite_open("sqlite_test.db",0666,$error)){\
         sqlite_close($db);\
         echo "sqlite closed!\n";\
   }else{echo $error;};’
  # 如果指定的sqlite数据库不存在,则创建之


使用sqlite

<?php
dl("sqlite.so");
$db_file = "test.db";
$db = sqlite_open($db_file,0666,$con_error); #con_error is return!
if($db === false){
    die($con_error);
}
//$query_string = "select * from sqlite_master ";
//query($db,"CREATE TABLE test_table ( MyColumnA INTEGER PRIMARY KEY, MyColumnB TEXT(32) );");
query($db,"select * from sqlite_master ");
query($db,"select * from test_table ");
query($db,’INSERT INTO test_table (MyColumnB) VALUES ("’.md5(microtime()).’");’);
sqlite_close($db);

 function query($db,$qs){
     $result = sqlite_query($db, $qs);
    if($error=sqlite_last_error($db)){
        $error_str=sqlite_error_string($error);
    }
     $changes=sqlite_changes($db);
     $last_insert_id=sqlite_last_insert_rowid($db);
     if(is_resource($result)){
         $num_fields=sqlite_num_fields($result);
         $fns=array();
         for($i=0;$i<$num_fields;$i++){
             $fns[]=sqlite_field_name($result,$i);
         }
         $rs=array();
         $result = sqlite_fetch_all($result, SQLITE_ASSOC);
         foreach ($result as $row) {
             $r=array();
             foreach($fns as $f){
                $r[$f]=$row[$f];
            }
            $rs[]=$r;
         }

         echo $qs,"\n",$changes,"\n",$last_insert_id,"\n",$num_fields,"\n";
         print_r($fns);
         print_r($rs);
     }else{
         echo $qs,"\n",$changes,"\n",$last_insert_id,"\n",$num_fields,"\n",$result,"\n";
     }
 }
?>

 通过ez_sql使用sql_lite

 下载 ez_sql 包 download ez_sql.zip

 拷贝 ez_sql 包到 应用ez_sql的目录

 由于我的sqlite不是默认安装的 所以在 ez_sql_sqlite.php 中添加了    

    if(!function_exists(’sqlite_open’)){
        dl(‘sqlite.so’);
    }
 手动导入sqlite扩展的代码

 没有发现sqlite的 close代码 所以安全起见 添加之

        function close()
        {
            if($this->dbh){
                sqlite_close($this->dbh);
            }
        }

 在 ezSQL_sqlite 类定义中添加 显示关闭连接的代码

<?php
    // Include ezSQL core
    include_once "ez_sql_core.php";
    // Include ezSQL database specific component
    include_once "ez_sql_sqlite.php";
    // Initialise database object and establish a connection
    // at the same time – db_path / db_name
    $db = new ezSQL_sqlite(‘./’,'test.db’);
    // Create a table..
    $db->query("CREATE TABLE test_table2 ( MyColumnA INTEGER PRIMARY KEY, MyColumnB TEXT(32) );");

    // Insert test data
    for($i=0;$i<3;++$i)
    {
        echo $db->query(‘INSERT INTO test_table2 (MyColumnB) VALUES ("’.md5(microtime()).’");’);
    }
   
    // Get list of tables from current database..
    $my_tables = $db->get_results("SELECT * FROM sqlite_master WHERE sql NOTNULL;");
    // Print out last query and results..
    $db->debug();

    // Loop through each row of results..
    foreach ( $my_tables as $table )
    {
        // Get results of DESC table..
        $result=$db->get_results("SELECT * FROM $table->name;");
        print_r($result);
        // Print out last query and results..
        //$db->debug();
    }

    // Get rid of the table we created..
    $db->query("DROP TABLE test_table2;");
?>
  常用方法

bool     $db->query(query)
var       $db->get_var(query)
mixed $db->get_row(query)
mixed $db->get_results(query)

 

php的开源的sql操作封装包
 http://www.jvmultimedia.com/portal/node/6 download ez_sql.zip
 参考 http://justinvincent.com/docs/ezsql/ez_sql_help.htm
sqlite 参考
 http://sqlite.org/lang.html
 http://sqlite.org/quickstart.html
php sqlite 参考
 http://www.php.net/manual/zh/ref.sqlite.php 

 

technorati tags: ,

在php中安装gd库

2006年5月10日

author: fallseir.lee (fallseir at gmail.com)
tags:php,gd,画图

备份以前的php安装配置
  $ php -r "phpinfo();"
        |awk ‘/Configure Command/’    # 获取当前安装的php的配置
  { Configure Command => 
        ‘./configure’
        ‘–with-apxs=/home/apache/bin/apxs’

        ‘–enable-track-vars’
        ‘–with-iconv’
        ‘–with-mbstring’
        ‘–with-sqlite’

        ‘–without-mysql’
        ‘–with-curl’}
添加gd包支持
  由于gd中的png需要zlib
    查找zlib的位置
      $ whereis zlib
      {zlib: /usr/include/zlib.h
        /usr/share/man/man3/zlib.3.gz}
  $ sudo ./configure
        –with-apxs=/home/apache/bin/apxs

        –with-apxs=/home/apache/bin/apxs
        –with-iconv
        –with-mbstring
        –with-sqlite

        –without-mysql
        –with-curl
        –with-gd
        –with-zlib-dir=/usr/include/

重新安装php 
  $ sudo make
  $ sudo make install
 
查看当前安装的模块
  $ php -m
 
$ ll /usr/share/fonts/chinese/TrueType/bsmi00lp.ttf
 
gd 官方网站 http://www.boutell.com/gd/
freetype http://www.freetype.org/
 download http://sourceforge.net/projects/freetype/ 
 
$ ‘./configure’
    ‘–with-apxs=/home/apache/bin/apxs’
    ‘–enable-track-vars’
    ‘–with-iconv’
    ‘–with-mbstring’
    ‘–with-sqlite’
    ‘–without-mysql’
    –with-gd
    –with-zlib-dir=/usr/include/
    –with-ttf-dir=/usr/lib
    –with-freetype-dir=/usr/lib
    –with-jpeg-dir=/usr/lib
    –with-xpm-dir=/usr/X11R6
    –with-tiff-dir=/usr/lib

 

 

technorati tags: , ,