2013-04-01から1ヶ月間の記事一覧

さくらVPSへのSCP

ポート番号を変えてる場合、ポート指定が必要 ポートのオプションは-P(大文字)であることに注意。 scp -i (identityfile) -P (Port) (Transferring file) username@host.com:~みたいな感じ。

Mountain LionでOpenCVを使う

https://sites.google.com/site/learningopencv1/installing-opencv を主に参考に http://jprogramer.com/opencva/522/ ライブラリの位置が違ったけど参考になった (追記 ここがよくまとまってた http://opencvexperiments.wordpress.com/2012/11/15/opencv…

iOSでopenCVを使う

ここを参考に。 http://qiita.com/items/3ff48a8bd6edd910e780フレームワークのビルドで [Errno 2] No such file or directory: '../build/iPhoneOS-armv7/install/include/opencv2' っていうエラーが出る。ブランチを変えないといけないらしい。 http://ans…

node.jsをHerokuにデプロイする

http://gihyo.jp/dev/serial/01/nodejs/0005expressコマンドでテンプレートを生成 Procfileという名のファイルを作って以下を記述 ルートに置いておく web: node app.jsherokuにデプロイ git init git add . git commit -m "initial commit" heroku create g…

node.jsのチュートリアルのまとめ

#9[モジュールのnpmへのデプロイ] http://www.youtube.com/watch?v=hEV5YXEb-Ww npm initでpackage.jsonを作る #12 Socket.ioを使ってTwitterをリアルタイムでストリーミングする http://www.youtube.com/watch?v=1iOwM6YasZY

node.jsで簡単なexpressアプリを作る

http://www.youtube.com/watch?v=A2OKXxAMqcs server.js var fs = require("fs"); var config = JSON.parse(fs.readFileSync("config.json")); var host = config.host; var port = config.port; console.log(host); console.log(port); var express = requi…

node.jsで簡単なHTTPサーバの実装

http://www.youtube.com/watch?v=zLxGA57GUx8&list=HL1366440453 var http = require("http"); console.log("Starting"); var host = "127.0.0.1"; var port = 1337; var server = http.createServer(function(request,response){ console.log("Received req…

Ethernet shieldでPush(的なこと)をする

今まで1Hzとかでポーリングさせてたけど、Pushできたら消費電力も抑えられる。できるのかなーと思ってたらやってる人がいた http://forums.adafruit.com/viewtopic.php?f=31&t=10347 curl -d "led=1" http://192.168.1.51/blinkled curl -d "led=o" http://1…

node.jsのチュートリアル

これが一番わかりやすかった。 最終的にSocket.ioを使ったリアルタイムTwitterストリーミングアプリを nodesterにデプロイするところまでやる。[node js tutorials from basic] http://www.youtube.com/playlist?list=PLw2e3dFxewkIjQ0Kr1LQ-nRlHrqTuPeA8Mon…

iOS6のシミュレーターで画像をPhotoアルバムに追加する

http://stackoverflow.com/questions/13441973/how-do-i-add-images-to-the-ios-6-simulatorシミュレーターでSafariを開いて、その画面上に写真をドロップするとSafariが写真を開く Shareボタンを押してSave in camera rollを選択する

iOSのSingle App Mode

iOSを単機能の端末に出来るhttp://feedtailor.jp/wp/?p=8035

wxPythonでロケールを設定する

Internationalization(i18n)の全体像 http://wiki.wxpython.org/Internationalizationレシピ http://wiki.wxpython.org/index.cgi/RecipesI18n

Inventorで回転させる

https://faq.qqweb.jp/faq/viewer.asp?ID=BA276DBF0DF4キーを押しながら左クリックでドラッグか(マウス使わないとき)、 SHIFTキーを押しながらマウスボタンでドラッグ(マウス使ってるとき)

Macのディスク使用状況を可視化する

Grandperspectiveというアプリケーションを使う。http://grandperspectiv.sourceforge.net

Google spreadsheetで現在時刻を入力するショートカット

http://q.hatena.ne.jp/1296499525"Ctrl" + "SHIFT" + ":" で入力できる。

RailsをProductionモードで起動

rake db:migrate RAILS_ENV=production unicorn_rails -c config/unicorn.rb -D -E productionindex.htmlに接続すると404エラーが出る。http://serverfault.com/questions/168292/rails-3-shows-404-error-instead-of-index-html-nginx-unicorn static asset…

Ubuntu上にAndroid開発環境を構築する with Eclipse

Android SDKを入れてもADBがないと言われる。 SDKフォルダの下のToolsのパーミッション設定で allow executing file as a program にチェックを入れないといけない。http://forum.xda-developers.com/showthread.php?t=1550414あと64bit環境だと32bit関係の…

UbuntuにRailsをインストールする

http://www.oiax.jp/rails/zakkan/rails_3_2_installation_on_ubuntu.html

Ubuntuで日本語入力を使う

US keyboardだからどうやって切り替えるのかなと探していたら そもそも日本語入力が入っていなかった。System Tools>Preferences>Input Method Switcherをクリック ・User IBusにチェックSystem Tools>Preferences>Keyboard Input Methodsをクリック IBus Pr…

XcodeでCould not launch appとなって起動できない

Bluetooth Low Energyを使ったiOSの通信を試す。 http://d.hatena.ne.jp/shu223/20120923/1348355900CBPeripheralManager-Demo https://github.com/KhaosT/CBPeripheralManager-Demo Peripheral Mode TestがCould not launch appとなって起動できない。(ビ…

NSJSONSerializationでJSONをパースする

http://d.hatena.ne.jp/paraches/20120116/1326705736 NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://192.168.11.3/jsonReplySample.json"]]; NSData *json_data = [NSURLConnection sendSynchronousRequest:request…

iOS6.1でJSONKitを使う

http://wiki.ad-stir.com/ARCアプリに組み込むARCを利用する場合はjsonkit.mターゲットのコンパイラフラグに --fno-objc-arcを指定する。

Google chart APIでQRコードを生成する

http://allabout.co.jp/gm/gc/24013/ <img src="http://chart.apis.google.com/chart?chs=150x150&cht=qr&chl=http://allabout.co.jp/" width="150" height="150" alt="QRコード">

iOSでJSONを使う

http://code2wing.blog83.fc2.com/blog-entry-63.html NSLog(@"WebAPIのURL:%@",apiUrlJson ); NSURL *httpDataUrl2 = [NSURL URLWithString:apiUrlJson]; NSURLRequest *request = [NSURLRequest requestWithURL:httpDataUrl2]; NSData *json_data = [NSUR…

rubyで空白かどうか確認する

http://www.ruby-forum.com/topic/160638nil?, empty?, blank?メソッドなどについて。 モデルでカラムはあるけど中身が空であるものを判定したいときは blank?メソッドを使う。

Storyboardを使わないで画面遷移を実装する

#import "nextViewController - (IBAction)nextButton:(id)sender { nextViewController *mycontroller = [self.storyboard instantiateViewControllerWithIdentifier:@"viewIdentifier"]; [self presentViewController:mycontroller animated:YES completio…

iOSで値の受け渡し with prepareForSegue

http://eien.seesaa.net/article/261740269.html -(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ( [[segue identifier] isEqualToString:@"hogeIdentifier"] ) { NextViewController *nextViewController = [segue destination…

論理回路の基礎

ロジックIC 【ニコニコ動画】【実況?】 零からの電子工作 第6回:ロジックIC論理式 【ニコニコ動画】【実況?】 零からの電子工作 第17回:論理式

FPGAについてのもろもろ

susuさんにいろいろ教わった FPGAが適している処理 ・画像処理などの高速処理 ピコ秒レベル ・大量のI/Oをさばく PWM100軸とか ミラーのアクチュエータとかチップメーカー ・ALTERA ・Xilinx ALTERAの方が若干評判がいいとかFPGAを書く ・Verilog HDL ・V…

Texで2段組の最中に1段組の表を貼る

2段組で書いている途中で一旦2段組を解除して、図や表を貼りたいとき アスタリスクをつけると一時解除される \begin{figure*} \end{figure*}でもこれだとなぜか真ん中に来てしまう。以下の命令をヘッダに書いとけばうまくいくことがわかった。 \makeatletter…