久々のエントリー。仕事サボってた訳ではございません^^;バタバタしてました!
今日はUIViewをcocos2dで利用する場合のメモメモです。
UIView *myView = [UIView alloc] init]; [[[CCDirector sharedDirector] openGLView] addSubView:myView];簡単ですね。
cocos2dでゲームアプリを開発しながら、UIViewなオブジェクトを貼り付けたいとき!はこの方法でOK!
以上でぇぇぇえぇす!
大阪でWEB屋しています。
OSSに関するメモ帳のかわり。
UIView *myView = [UIView alloc] init]; [[[CCDirector sharedDirector] openGLView] addSubView:myView];簡単ですね。
$ node --nouse_idle_notification and --expose_gc app.jpのようにして起動させます。
global.gc();を追加します。
$ nave install stable
$ vim app.js --------------------------------- var express = require('express'); // これはもう使わない // var app = module.exports = express.createServer(); var app = express(); var io = require('socket.io'); // 使わない // app.listen(3000, function() { // console.log("Express server listening on port %d in %s mode", app.address().port, app.settings.env); //}); var socket = io.listen(app.listen(3000));これでバッチリ
# rpm -ivh http://packages.groonga.org/centos/groonga-release-1.1.0-0.noarch.rpm # yum install groonga-devel
# yum install mecab-develしておいて
# wget http://packages.groonga.org/source/groonga/groonga-2.0.3.tar.gz # tar zxvf groonga-2.0.3.tar.gz # cd groonga-2.0.3 # ./configure # make -j$(grep '^processor' /proc/cpuinfo | wc -l) # mak installとします。
# yum install mecab-ipadic
# wget 'https://github.com/downloads/mroonga/mroonga/mroonga-2.03.ta.gz' # tar zxvf mroonga-2.03.ta.gz # cd mroonga-2.03
# ./configure --with-mysql-source=/path/to/mysql --with-mysql-config=/path/to/mysql/bin/mysql_config --with-default-parser=TokenMecab # make # make installこれでMySQLのプラグインディレクトリ以下にha_mroonga.soが生成されます。
# /path/to/mysql/bin/mysql mysql> INSTALL PLUGIN mroonga SONAME 'ha_mroonga.so'; mysql> SHOW ENGINES; +--------------------+---------+------------------------------------------------------------+--------------+------+------------+ | Engine | Support | Comment | Transactions | XA | Savepoints | +--------------------+---------+------------------------------------------------------------+--------------+------+------------+ | CSV | YES | CSV storage engine | NO | NO | NO | | InnoDB | DEFAULT | Supports transactions, row-level locking, and foreign keys | YES | YES | YES | | MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO | | PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO | | MyISAM | YES | MyISAM storage engine | NO | NO | NO | | MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO | | mroonga | YES | CJK-ready fulltext search, column store | NO | NO | NO | +--------------------+---------+------------------------------------------------------------+--------------+------+------------+ 7 rows in set (0.02 sec)Yes!インストールでけた!
ENGINE=mroonga;
をつけてね!$ npm -g install log4js
var log4js = require(‘log4js’); // 設定 log4js.configure({ appenders: [ { type: ‘console’, category: ‘console’ }, { type: ‘file’, filename: ‘logs/access_log’, category: ‘access_log’, backups: 30, maxLogSize: 1024 * 1024 } ] }); var consoleLog = log4js.getLogger(‘console’) ,accessLog = log4js.getLogger(‘access_log’); consoleLog.info(’Server Start.'); accessLog.info(‘This is test(access_log)’);こんな感じです。
var logger = log4js.getLogger(‘access_log’).setLevel(‘ERROR’);のように指定することも可能です。
{ type: ‘console’, category: ‘console’ }で指定してあり、Node起動時に
$ node app.js >> logs/node.logとかすれば良いです。