万年素人からHackerへの道

万年素人がHackerになれるまで殴り書きするぜ。

  • ・資産運用おすすめ
    10万円は1000円くらい利益
    資産運用ブログ アセマネ
    • ・寄付お願いします
      YENTEN:YYzNPzdsZWqr5THWAdMrKDj7GT8ietDc2W
      BitZenny:ZfpUbVya8MWQkjjGJMjA7P9pPkqaLnwPWH
      c0ban:8KG95GXdEquNpPW8xJAJf7nn5kbimQ5wj1
      Skycoin:KMqcn7x8REwwzMHPi9fV9fbNwdofYAWKRo

    2014-06-01から1ヶ月間の記事一覧

    UILabelのタップイベント

    http://stackoverflow.com/questions/2539380/how-can-i-determine-if-a-uilabel-was-touched

    Bitbucketのエラー

    git pushででた。 ssh: connect to host bitbucket.org port 22: Connection refused使ってるLANのポートのせい。

    Android Intelエミュレータのエラー

    The kernel extension at “/System/Library/Extensions/intelhaxm.kext” is not from an identified developer but will still be loaded. Please contact the kernel extension vendor for updated software.

    conflicts with a declaration in a child block のエラー C#

    なぜかC#で Listの変数を宣言し、 List<Action> a = new List<Action>(); とやると、 conflicts with a declaration in a child blockのエラーが発生する。</action></action>

    Unity マルチ

    なぜかネットワークのスレッドで、NGUIのUILabelに対して this.hogeLabel.alpha = 0.0f; とやると CompareBaseObjectsInternal can only be called from the main thread. Constructors and field initializers will be executed from the loading thread wh…

    LitJsonはシンプル

    string serverMessage = "{\"name\":\"my response\",\"args\":[{\"count\":1}]}"; JsonData jd = JsonMapper.ToObject(serverMessage); string count =jd["args"][0]["count"].ToString(); Debug.Log (count);

    C#にポート

    LineRendererではない方法で線を書くhttp://docs.unity3d.com/ScriptReference/GL.html公式なのにC#がない・・・。 勉強しないエンジニアがよく使うUnityScriptだったのでC#にポートした。 using UnityEngine; using System.Collections; public class Creat…

    chatworkのAPI

    http://developer.chatwork.com/ja/index.html で申請する。その後、チャットワーク上の右上のリンクから、動作設定を開く。 一番右のタブ。

    FlaskとCocos2d-html5-v2.2.3 の連携でパスで変更する場所

    Cocos2d-html5-v2.2.3 を使った際に、Flaskを使った時にjsファイルのパスがそのままで出来ない。 僕は、「cocos2d-html5」のフォルダをFlaskのapp.pyの配下の「template」 の下へ追加している。 ※この構成でいいかはわからないので正攻法かは保証しませんが…

    GameObject.FindWithTagのへんてこなエラー Unity 4.3.4f1

    GameObject[] dropItemList = GameObject.FindGameObjectsWithTag ("DropItem"); のようなコードの時に go.IsActive() && go.GetTag() != 0 UnityEngine.GameObject:FindGameObjectsWithTag(String)のエラーが出る。 エラーではなさそうだが、赤文字でエラー…

    Flaskは外部からアクセスが出来ない

    URL: http://a2c.bitbucket.org/flask/quickstart.htmlFlaskは外部から出来ません。 外部から利用できないのは”デフォルトの設定”になっています。 socketio.run(app, host='0.0.0.0', port=8000) のようにhostを0.0.0.0にしないといけない。

    プロセス ポートを見てkill

    $ sudo netstat -anp | grep 8000 tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN 21207/node21207がnode.js系で起動している kill 21207

    UnityのAPIのオーバーライド

    親クラスと小クラスでOnBecameInvisible ()を分けたい時、・親 virtual protected void OnBecameInvisible () { ・子 override protected void OnBecameInvisible () { でできた。

    Scala理解

    URL: http://www.atmarkit.co.jp/ait/articles/1204/05/news126_2.html def calc(f:(Int,Int) => Int, num:Int) :Int = f(num,num) 「calc」という関数は、「Int型の引数を2つ取り、Int型を返す関数」 f:(Int,Int) => Intと 数値 num:Intの2つの引数を取りま…

    Playの?とか!

    http://choni-waniwani.blogspot.jp/2013/05/playframework211akka-actorwebsocket.html昔、 !・・・投げっぱなし !!・・・同期 !!!・・・非同期今、 !・・・返事いらない ?・・・返事欲しい

    Play Scala websocket-chatサンプル

    /playframework-master/samples/scala/websocket-chathttps://github.com/playframework/playframework から「websocket-chat」のサンプルを使用してみる。 playframework-master/samples/scala/websocket-chat/build.sbt:5: error: not found: value PlaySc…

    socket.io Unity C#これがいい

    URL: https://github.com/kaistseo/UnitySocketIO-WebSocketSharpEmit()メソッドが動いた。 自分でビルドしてDLLを生成すれば使用できる

    sqlite3_bind_textの第2引数

    URL: http://idocsq.net/page/521 0開始ではない。

    Objective-C NSStringをNSLogで使う時

    http://ori3.blogspot.jp/2010/12/nslognsstring.html

    WebSocket: NetEase/UnitySocketIO

    Unity 側から Emit 出来ない? URL: http://tips.hecomi.com/entry/2014/04/21/001606

    SQLiteをXcodeで使うときにハマった

    const char *err = sqlite3_errmsg(database); NSLog(@"%@", [NSString stringWithUTF8String:err]); とエラーを見てみると、 no such table: テーブル名のように、テーブルが無いと怒られる。NSBundle mainBundle を行ってる時、きちんとバンドルからコピー…

    XCodeでsqliteを使う

    操作はここが一番楽っぽい URL: http://yutaniphone.blogspot.jp/2012/02/sqlite3.htmlsqlite3のモジュールの入れ方とインポート方法URL: http://program.station.ez-net.jp/special/iphone/db/sqlite.asp"Framework" のところから、"追加" → "既存のフレー…

    XcodeでBitbucketを使う

    参考URL: http://dev.classmethod.jp/references/xcode5-source-contorl/ Source Control -> 今のブランチ -> Configure 自分のプロジェクト名 その後で+を押して、Add Remote...

    Storyboard XCodeで最初に起動されるビュー

    ViewControllerを複数作った時に、 最期に作成されたものが最初に起動されるっぽい? 下の変な■のアイコンを選択し。 右のペインでInitialのところを設定。

    bitbucketでThe requested URL returned error: 401 while accessing のエラー

    $ git push Password: error: The requested URL returned error: 401 while accessing https://accountname@bitbucket.org/repogitoryname/dirname.git/info/refsとなった。 これはパスワードミスった時。

    SocketIO4Net.Clientの使い方 C#

    socket.Emit ("my event", args); Emitの引数argsはstringかシリアライズしたJSONらしい。URL: http://www.nudoq.org/#!/Packages/SocketIO4Net.Client/SocketIOClient/Client/M/Emit payload must a string or Json Serializable payloadと呼ぶようだ。URL:…

    C# WebSocket自動再接続 WebSocket4Net

    http://kimux.net/?p=799

    Flask ValueError: urls must start with a leading slash

    ValueError: urls must start with a leading slashのエラー。 @app.route('hoge/<room>/<uid>') def join(room, uid): となってた時に出る。 @app.route('/hoge/<room>/<uid>') def join(room, uid): のように必ずスラッシュで開始すること。</uid></room></uid></room>

    Django 1.6のエラー

    <form action="{% url django.contrib.auth.views.login %}" method="post" id="login-form">{% csrf_token %}'url' requires a non-empty first argument. The syntax changed in Django 1.5, see the docs.</form>

    Playのインストール Mac

    brew install play