Archive for 4月, 2013

 

ユビレジAPI の getAccessToken

4月 23rd, 2013

まさかのBasic認証が必要だったとは。 ヘッダーにBasic認証を付けたら大丈夫でした。 https://github.com/ubiregiinc/ubiregi-api/issues/56

Read full article | コメントは受け付けていません。

python 2.4.3 … pip とかいろいろ

4月 22nd, 2013

pythonbrewで 2.4.3を入れたけど全然動かない^^^ いろいろバージョンが pip-1.1 https://pypi.python.org/pypi/simplejson/2.1.0 https://github.com/simplegeo/python-oauth2 2.4.3だと https://bugzilla.redhat.com/show_bug.cgi?id=787003 なエラーとか

Read full article | コメントは受け付けていません。

ocn hotspot レギュラープラン

4月 19th, 2013

追記:良いことばかり書いていたので、残念なところを書いておきます。 ・申し込んでから利用までが1週間くらいかかる・・・webから申し込んでその日に使えると思ったら・・・ ・図書館で使えなくなるっぽい・・・なんのために申し込んだのか >o

Read full article | コメントは受け付けていません。

javascript regexp exec

4月 16th, 2013

regexp.exec 滅多に使わないけど、こんな出力だったんだなと var str = ‘[0-9]+'; var re = new RegExp( ‘[0-9]+’, ‘g’ ); // re = /[0-9]+/g var st = ‘あい876うえお全 100件全 99件'; var result = re.exec(st); console.log(result); var result = st.match(re); console.log(result); $ node test_regexp [ '876', index: 2, input: 'あい876うえお全 100件全 99件' ] [ '876', '100', '99' ] execだとindexとinputが返ってくるようです。何か必要なこともあるかもしれませんね。

Read full article | コメントは受け付けていません。

titanium httpclient getResponseHeader ?

4月 16th, 2013

http://docs.appcelerator.com/titanium/3.0/#!/api/Titanium.Network.HTTPClient   var client = Ti.Network.createHTTPClient({      onload : function(e) {        // Ti.API.info(e.source.getResponseHeaders());        // Ti.API.info(e.source.getAllResponseHeaders());      }, iOSでは getResponseHeaders Androidでは getAllResponseHeaders でheaderを全部読むことが出来るようですが、getResponseHeadersがドキュメントに載っていないのが気になるところです。

Read full article | コメントは受け付けていません。

夢売るふたりと蛇イチゴ@目黒シネマ

4月 14th, 2013

夢売るふたり そこそこの映画ですが、オチがいまいち。オチまでの持って行き方が最悪。 蛇イチゴ こっちのほうが毒があって面白い。けどオチはいまいち。 惜しいなぁ、もうちょっとで森田芳光。 「ゆれる」は評判が良いからか個人的には面白くないのですが、そこそこ 全部そこそこ面白いから、もうちょっと最後に向かって盛り上げる展開を作ったら相当良くなるだろうと思う。

Read full article | コメントは受け付けていません。

install node.js centos

4月 12th, 2013

http://nodejs.org/ http://serverfault.com/questions/299288/how-do-you-install-node-js-on-centos インストールしてrpm作成 http://nodejs.org/download/ 今日時点で v0.10.4 http://nodejs.org/dist/v0.10.4/node-v0.10.4.tar.gz node-v0.10.4]# ./configure { ‘target_defaults': { ‘cflags': [],                       ‘default_configuration': ‘Release’,                       ‘defines': [],                       ‘include_dirs': [],     […]

Read full article | コメントは受け付けていません。

node.js beginner

4月 12th, 2013

http://nodejs.jp/ http://www.nodebeginner.org/index-jp.html httpdサーバーが何してるか知らない人が読んだら良い勉強になる内容ですね http://nodeguide.com/ 書き方 なるほど、これに併せて書きます。

Read full article | コメントは受け付けていません。

apache2 virtual host ssl

4月 11th, 2013

http://wiki.apache.org/httpd/NameBasedSSLVHosts 別ドメインの場合は、ipかportを変える必要がある。みたい。 http://httpd.apache.org/docs/2.2/ssl/ssl_howto.html http://wiki.apache.org/httpd/RemoveSSLCertPassPhrase 消さないけど。 /etc/ssl/certs/make-dummy-certs があるので、これの中身を変えて利用 answerのところだけ #!/bin/sh umask 077 answers() {        echo JP        echo Tokyo        echo Osaki        echo Ground Road Technology,LLC        echo IT        echo groundroad.com        echo info@groundroad.com } if [ $# -eq […]

Read full article | コメントは受け付けていません。

titanium mobile : delete remote image cache

4月 10th, 2013

http://developer.appcelerator.com/question/144356/urgent-how-to-clearreset-titanium-remote-image-cache-android この辺。 http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Filesystem applicationCacheDirectory : StringREADONLY Path to the application’s internal cache directory. iosのほうはみんな違う書き方をしているけど昔は無かったのかな? Ti.Filesystem.applicationCacheDirectory ios : Applications/00000000-0000-0000-0000-AAAAAAAAAA/Library/Caches/ これなのでiosもあっています。 Libraryの下は Cookies Preferences Caches Private Documents があって、Private Documents/databasename.sql という名前でsqliteが保存されていました。 画像は、普通に ハッシュ値.jpgの拡張子で保存されています。.をみて消している方は、ディレクトリを消しています。 特に問題ないと思いのですが、中に Cache.dbとかあります。手で全消ししても問題ないようです。 (十分テストが必要ですが) androidはexternalのときの処理が必要。 androidの処理はbanzai mobileさんのやり方を利用させていただきます。 http://developer.appcelerator.com/question/144356/urgent-how-to-clearreset-titanium-remote-image-cache-android#answer-251819 ポイントは、/_tmp/remote-cache/ですね。 全消しはなんとなくあれなので、ファイルを消す処理(getFile以外)は、iosと共通で。 iosだけだとこんな感じ dir = Ti.Filesystem.getFile(Ti.Filesystem.applicationCacheDirectory); if( dir.exists() ){  var files = dir.getDirectoryListing();  for( var i in files […]

Read full article | コメントは受け付けていません。