Posts

Showing posts from 2013

openfire and jabberd2 and – setup log

Image
with above openfire and jwchat support bosh – setup log 1.setup spack downlaod spark_2_6_3_online.exe from http://www.igniterealtime.org/downloads/index.jsp setup it 2.register and login for openfire click "Account", input user and password,then click "Create account" account is created ok! input your created user and password,then click "login". login ok! 3.replace openfire with jabbed2 3.1 file list: in jabberd2 files like bellow: 3.2 setup profile i used my sql for my default db. so i changed: c2s.xml c2s–> authreg->module: <module>sqlite</module> => <module>mysql</module> for support bosh, uncomment: <ssl-port>5223</ssl-port> sm.xml –> sm->storage –> driver: <driver>sqlite</driver> –> <driver>mysql</driver> import mysql db to mysql: jabberd2\tools\db-setup.mysql create mysql account "jabberd2" password "secret" for db "jab...

openfire and jwchat support bosh - setup log

Image
1.setup openfire 1.1downlaod openfire setup program http://www.igniterealtime.org/downloads/index.jsp 1.2extract openfire files extract openfire_3_8_2.zip to c:\program files\ 1.3 setup C:\Program Files\openfire\bin\openfire.exe click "Launch Admin", or open url : " href="http://127.0.0.1:9090">http://127.0.0.1:9090 click "continue" change domain value:"localhost",click "continue" click " Embedded Database ",click "continue" click "continue" input "New Password:" and "Confirm Password:" with same value: "admin",click "continue",then wait some seconds. ok.then click " Login to the admin console " input username and password with:"admin","admin". click "Login" it ok! 1.4 edit openfire to support BoshConnection. click " security settings " checked "Accept self-signed ...

yii 集成taobao php代码

Image
1.下载php版taobao代码 下载地址: http://open.taobao.com/doc/detail.htm?id=112 2.程序目录结构 原始taobao结构: 修改后集成进yii的文件结构: 3.开始工作 1.把下载的程序结构解压,我放进了我的yii模块union中。 2.删除jushita、lotusphp_runtime目录 3.在top\目录下新建LtInflector.php、LtLogger.php两个文件 LtInflector.php 代码: <?php class LtInflector { public $conf = array( "separator" => "_" ); public function camelize($uncamelized_words) { $uncamelized_words = $ this ->conf[ "separator" ] . str_replace($ this ->conf[ "separator" ] , " " , strtolower($uncamelized_words)); return ltrim(str_replace( " " , "" , ucwords($uncamelized_words)), $ this ->conf[ "separator" ] ); } public function uncamelize($camelCaps) { return strtolower(preg_replace( '/([a-z])([A-Z])/' , "$1" . $ this ->conf[ "separator" ] . "$2" , $camelCaps)); } } LtLogger.php 代码: <?php class LtLogger {...

jabberd2 debug analyze – startup

1.c2s 1.1.entry point code in jabberd2\c2s\main.c line:608 JABBER_MAIN( "jabberd2c2s" , "Jabber 2 C2S" , "Jabber Open Source Server: Client to Server" , "jabberd2router\0" ) 1. 2.profile file in jabberd2\win32\bin\debug\c2s.xml search keywords "sqlite" and "mysql",and change these value. i changed: "authreg –> module" from "sqlite" to "mysql" 1.3. import mysql db data import jabberd2\win32\db-setup.mysql to mysql. add user: CREATE USER 'jabberd2' @ 'localhost' IDENTIFIED BY '***' ; GRANT ALL PRIVILEGES ON * . * TO 'jabberd2' @ 'localhost' IDENTIFIED BY '***' WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ; 2.sm 2.1 profile file in jabberd2\win32\bin\debug\sm.xml search keywords "sqlite" and "mysql",and change these value. i changed: "storage –> d...

jabberd2 debug analyze – startup

1.c2s 1.1.entry point code in jabberd2\c2s\main.c line:608 JABBER_MAIN( "jabberd2c2s" , "Jabber 2 C2S" , "Jabber Open Source Server: Client to Server" , "jabberd2router\0" ) 1. 2.profile file in jabberd2\win32\bin\debug\c2s.xml search keywords "sqlite" and "mysql",and change these value. i changed: "authreg –> module" from "sqlite" to "mysql" 1.3. import mysql db data import jabberd2\win32\db-setup.mysql to mysql. add user: CREATE USER 'jabberd2' @ 'localhost' IDENTIFIED BY '***' ; GRANT ALL PRIVILEGES ON * . * TO 'jabberd2' @ 'localhost' IDENTIFIED BY '***' WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ; 2.sm 2.1 profile file in jabberd2\win32\bin\debug\sm.xml search keywords "sqlite" and "mysql",and change these value. i changed: "storage –> d...

yii php develop log – bootstrap TbThumbnails widget

Image
1.screenshots: url: http://localhost/mw2/exam/exam/locale 2.code mw2\protected\modules\exam\views\exam\locale.php: <?php $ this ->widget( 'bootstrap.widgets.TbThumbnails' , array( 'dataProvider' => new CArrayDataProvider(Yii::app()->getModule( 'rss' )->getLocaleList()), 'template' => "{items}\n{pager}" , 'itemView' => '_localethumb' , )); ?> mw2\protected\modules\exam\views\exam\_localethumb.php: <li class = "span3" > <a href= "#" class = "thumbnail" rel= "<?php echo $data['country'] ?>" data-title= "<?php echo $data['country'] ?>" > <img src= "/s/images/flags/<?php echo $data['locale'] ?>.png" alt= "<?php echo $data['country'] ?>" > </a> </li> mw2\protected\modules\rss\RssModule.php: <?php class RssModu...

Inspirational - good saying

1、一杯清水因滴入一滴污水而变污浊,一杯污水却不会因一滴清水的存在而变清澈。          A drop of  dirty water will contaminate a glass of clean water, whereas a drop of clean water will not purify a glass of dirty water. 2 、这世上有三样东西是别人抢不走的:一是吃进胃里的食物,二是藏在心中的梦想,三是读进大脑的书。         There are three things in the world that people can not take away from you: the food in your stomach, the dream in your bosom, and the knowledge in your mind. 3 、马在松软的土地上易失蹄,人在甜言蜜语中易摔跤。        Horses are liable to stumble over soft grounds, so are people over sweet talks. 4 、世界没有悲剧和喜剧之分,如果你能从悲剧中走出来,那就是喜剧,如果你沉缅于喜剧之中,那它就是悲剧。        There is no distinction between tragedy and comedy.  The tragedy you can get over from is a piece of comedy; the comedy you indulge yourself with is a piece of tragedy. 5、如果不读书,行 万里 路也不过是个邮差。        Without reading, you are nothing but a mailman even you...

=B7=D6=B3=C9=D5=CB=B5=A5

------=_Part_1982_3663766.1387200585828 Content-Type: text/html;charset=GB2312 Content-Transfer-Encoding: quoted-printable =B7=D6=B3=C9=D5=CB=B5=A5 body{font-size:12px;text-align:center;} #wrap img{border:none;} #wrap a{color:#094faa;text-decoration:none;} #wrap *{padding:0;margin:0;} #wrap i{font-style:normal;} #wrap .left{float:left;width:402px;} #wrap .right{float:left;width:185px;padding-top:93px;} #wrap .right a{margin-bottom:21px;display: block;} #wrap .left dl{padding:119px 0 0 41px;} #wrap .left h3{background:url(http://u5.mm-img.com/rs/res/publish/settlemen= t/images/h3bg.jpg) no-repeat;color:#0a4a85;font-size:12px;height:25px;paddi= ng:22px 0 14px 43px;margin-top: 12px;} #wrap .left dt{padding-bottom:13px;} #wrap .left dt i{font-size:14px;font-weight:bold;color:#004395;} #wrap .left dd{line-height:20px;width:305px;text-indent:24px;} #wrap .left dd i{font-weight:bold;font-size:14px;color:#fe0000;} #wrap{width:598px;border:1px solid #e0e0e0;background:url(http://u5.mm-img.= com...

php develop log–yii yiic mirgate

Image
1.error Error: The migration directory does not exist: user.migrations   or Yii Migration Tool v1.0 (based on Yii v1.1.14) Creating migration history table "tbl_migration" ...done. Total 2 new migrations to be applied: m110805_153437_installYiiUser m110810_162301_userTimestampFix Apply the above migrations? (yes|no) [no]:y *** applying m110805_153437_installYiiUser Exception: Alias "user.UserModule" is invalid. Make sure it points to an existin g PHP file and the file is readable. (D:\doc\webserver\wwwroot\third\yii\YiiBase .php:322) #0 D:\doc\webserver\wwwroot\third\yii\YiiBase.php(196): YiiBase::import( 'user.Us erModule' , true ) #1 D:\doc\webserver\wwwroot\third\yii\ base \CModule.php(282): YiiBase::createComp onent( 'user.UserModule' , 'user' , NULL, Array) #2 D:\doc\webserver\wwwroot\mw2\ protected \migrations\m110805_153437_installYiiUs er.php(10): CModule->getModule( 'user' ) #3 D:\doc\webserver\wwwroot\third\yi...

Inspirational: Opportunity die in seven words in!

转: 机会,就死在这7句话里! Forwarding : Opportunity to die in seven words in! 大多数的机会,都死在别人的嘴里: Most opportunities are dead in someone else's mouth: 1:认为骗人。不去认真了解,直接下定论。一锤子砸死,导致丧失机会。要仔细想一下,别人能骗你什么呢?骗财还是骗色呢?最坏的是怎么样。 1: that the lie. Do not really understand, direct conclusion. A hammer killed, resulting in lost opportunities. To carefully think about what people can lie to you? Defraud or Pianse it? The worst is how. 2:迟疑。思想斗争时间过长,迟迟不下决定,把新闻熬成了历史。这和我们买衣服一样,今天看了一件衣服感觉很漂亮,想要买,但是嫌贵迟疑了,过几天衣服却不再了,或者已经失去了购买的欲望。趁热打铁是非常重要的。 2: hesitation. Ideological struggle for too long, less than delay the decision, the news revolve history. That and we buy clothes, today saw a dress I feel very beautiful, you want to buy, but too expensive hesitated a few days of clothes but no longer, or have lost the desire to buy. While the iron is very important. 3:研究。很有兴趣的从学术方面研究其理论,阐述其观点,放弃实践。研究会把自己搞复杂,成功者都是简单的人。选择都是看第一感觉的。 3: Research. Very interested in research from academic theory to explain their point of view, to aban...

应用发布进展通知(2013年12月13日)

------=_Part_3201_18352639.1386896404164 Content-Type: text/html;charset=GB2312 Content-Transfer-Encoding: quoted-printable .maintable { =09background-color:#EBF7F8; =09bordercolor:#9FCCEC; =09border-top:1px solid #9FCCEC; =09border-left:1px solid #9FCCEC; =09width: 60%; } .yi_hang_4 { =09float:left; =09text-indent: 15px; =09padding-left: 5px; =09font-family: "=CB=CE=CC=E5"; =09font-size: 12px; =09color: black; =09line-height: 1.7em; =09padding-top: 2px; =09padding-bottom: 2px; =09background-color: #EBF7F8; =09text-align: right; } .titletd { =09font-family: "=CB=CE=CC=E5"; =09font-size: 12px; =09color: black; =09line-height: 1.7em; =09padding-top: 2px; =09padding-bottom: 2px; =09text-align: center; } .yi_hang_9 { =09font-family: "=CB=CE=CC=E5"; =09font-size: 12px; =09line-height: 1.7em; =09background-color: #FFFFFF; } td { =09font-family: "=CB=CE=CC=E5"; =09font-size: 12px; =09line-height: 1.7em; } .noWarp{ =09width:60%; =09white-space:normal; ...

应用发布进展通知(2013年12月11日)

------=_Part_2429_17299309.1386723615660 Content-Type: text/html;charset=GB2312 Content-Transfer-Encoding: quoted-printable .maintable { =09background-color:#EBF7F8; =09bordercolor:#9FCCEC; =09border-top:1px solid #9FCCEC; =09border-left:1px solid #9FCCEC; =09width: 60%; } .yi_hang_4 { =09float:left; =09text-indent: 15px; =09padding-left: 5px; =09font-family: "=CB=CE=CC=E5"; =09font-size: 12px; =09color: black; =09line-height: 1.7em; =09padding-top: 2px; =09padding-bottom: 2px; =09background-color: #EBF7F8; =09text-align: right; } .titletd { =09font-family: "=CB=CE=CC=E5"; =09font-size: 12px; =09color: black; =09line-height: 1.7em; =09padding-top: 2px; =09padding-bottom: 2px; =09text-align: center; } .yi_hang_9 { =09font-family: "=CB=CE=CC=E5"; =09font-size: 12px; =09line-height: 1.7em; =09background-color: #FFFFFF; } td { =09font-family: "=CB=CE=CC=E5"; =09font-size: 12px; =09line-height: 1.7em; } .noWarp{ =09width:60%; =09white-space:normal; ...

yii develop log - test CActiveRecord

1.data tables 1.1 pkrss_test data table CREATE TABLE IF NOT EXISTS `pkrss_test` (   `id` int(11) NOT NULL AUTO_INCREMENT,   `k` varchar(255) NOT NULL,   `v` varchar(255) DEFAULT NULL,   PRIMARY KEY (`id`),   UNIQUE KEY `k` (`k`) ) AUTO_INCREMENT=3 ; INSERT INTO `pkrss_test` (`id`, `k`, `v`) VALUES (1, 'k1', 'v1'), (2, 'k2', 'v2'); 1.2 pkrss_test2 data table CREATE TABLE IF NOT EXISTS `pkrss_test2` (   `id` int(11) NOT NULL AUTO_INCREMENT,   `k` varchar(255) NOT NULL,   `v2` varchar(255) DEFAULT NULL,   `pid` int(11) NOT NULL,   PRIMARY KEY (`id`),   KEY `pid` (`pid`) ) AUTO_INCREMENT=3 ; INSERT INTO `pkrss_test2` (`id`, `k`, `v2`, `pid`) VALUES (1, 'k1', 'k1', 1), (2, 'k2', 'v2', 2); ALTER TABLE `pkrss_test2`   ADD CONSTRAINT `pkrss_test2_ibfk_1` FOREIGN KEY (`pid`) REFERENCES `pkrss_test` (`id`); 2.php code and test result 2.1 TestModel.php <?php /* CREATE TABLE IF NOT EXISTS `pkrss_test` ( `id` int(11) NOT ...

Windows 8 App Award

Congratulations! Your apps (PKMAP, PKBOOK) has been tested and rated by the BestWindows8Apps.net. Feel free to use Editor's pick award on your web page to show your visitors how highly we value your apps. Award: http://bestwindows8apps.net/wp-content/uploads/2013/11/editors_pick.png Your apps: http://bestwindows8apps.net/pkmap/ http://bestwindows8apps.net/pkbook/ Best Regards, Eric Manco BestWindows8Apps.net

cocos2d-x c++ implement auto object point release

1.why because some class liked "cs::CSJsonDictionary" is not derive from CCObject,so when i new it,need manual release it later. 2. todo implement one plan.that can auto release those class who are not derive from CCObject. 3. code Single ton and Memory pool class template< class _Ty> class pkSingleTon{ public : pkSingleTon(){} public : static _Ty* Instance(){ static _Ty s_val; return &s_val; } }; #include < string > #include <set> #include <map> #include <list> #include <vector> template< class _Ty> class pkObserver : public std::set<_Ty>{ }; template< class _Ty> class pkMemoryPool : private pkSingleTon<pkMemoryPool<_Ty> >{ private : typedef pkObserver<_Ty*> CON; CON mdatas; private : void _add(_Ty* v){ mdatas.insert(v); } void _remove(_Ty* v){ typename CON::iterator b = mdatas.find(v); if (b == mdatas.end()) ...