万年素人からHackerへの道

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

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

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

    Unity C# コルーチンでのreturn

    この場合エラーになる isOkeyがtrueであろうがfalseであろうが、 「yield return null;」を行うはずなのに。 private IEnumerator Blink () { while (true) { if (isOkey) { yield return null; } else { yield return null; } } } 以下のようにif分がないと…

    Django テーブル内削除 ORMで

    Model名.objects.all().delete()Model名.objects.delete()のようにall()がないと出来ない。URL: http://www.djangoproject.jp/doc/ja/1.0/topics/db/queries.html

    Djangoでのviewのimport

    新たにviews.pyを作るためにそれを格納するフォルダを作成した。 ViewDoesNotExist at /hoge/ Could not import hoge.views. Error was: No module named nlpとブラウザに出た。 フォルダには「nlp.py」を格納しないといけない。

    Unity2Dでのpivotの設定

    アトラスのSpriteを選択した時にPivotで設定する。

    HOTweenの寄付

    UnityのHOTweenの寄付は日本円では不可能

    Unity C#非推奨メソッドを明示的に

    ・NGUIから抜粋 [System.Obsolete("Use Localization.language instead")] public string currentLanguage { get { return language; } set { language = value; } } これをつければ、このメソッドを使うときに古いですよ〜って行ってくれる。

    Unity GetInstanceIDの罠

    void OnTriggerEnter2D (Collider2D other) { Debug.Log (other.GetInstanceID () + ", " + other.gameObject.GetInstanceID ()); } 結果 8302, 8296otherをそのままGetInstanceIDしたものと、gameObjectを取得してからのでIDが異なる。 注意。

    Pythonで\uの含まれた文字列の表示

    URL: http://stackoverflow.com/questions/11094380/python-unicode-string-stored-as-u84b8-u6c7d-u5730-in-file-how-to-convert-it print "\u4eca\u65e5\u306f\u60aa\u3044\u5929\u6c17\u3067\u3059\u306d\u3002".decode('unicode-escape') 今日は悪い天気…

    Unity2DのAtlasからpivotを変更

    Sprite Editorからいじれる。

    MechanimからState一覧取得 Unity

    URL: http://answers.unity3d.com/questions/418854/getting-a-list-of-mecanim-states-in-animator.html

    PythonのJSON

    URL: http://stackoverflow.com/questions/12353288/python-json-get-values data = json.loads("{'lat':444, 'lon':555}") と data = json.loads('{"lat":444, "lon":555}') で意味合いが違う? ※シングルとダブル最初のはエラーになる。 URL: http://stack…

    C#のワーニング

    'Class.ToString()' hides inherited member 'object.ToString()'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword. public string ToString () { を書いた時に起こるはず。 new publi…

    Unity NGUIのワーニング

    Assets/NGUI/Scripts/Editor/UIPanelInspector.cs(204,85): warning CS0618: `UnityEditor.TargetGlesGraphics.OpenGLES_1_x' is obsolete: `OpenGL ES 1.x is deprecated, ES 2.0 will be used instead'「OpenGLES_1_x」は古いから「ES 2.0」に置き換えろっ…

    provisioningのエラー XCode

    No provisioned iOS devices are available with a compatible iOS version. Connect an iOS device with a recent enough version of iOS to run your application or choose an iOS simulator as the destination.おそらく期限が切れてたから。Developer C…

    OpenSSLの脆弱性

    URL: http://qiita.com/tachiba/items/83e5fd31d06e6577abb3 openssl versionでバージョンを確認 sudo yum clean all sudo yum update opensslででできるそうだが、 sudo yum update openssl Loaded plugins: fastestmirror, security Determining fastest m…

    Titaniumのエラー

    An internal error occurred during: "Computing SDK Info...". null argument:

    Django Python パスの指定

    URL: http://lightson.dip.jp/zope/ZWiki/134_e5_ae_9f_e8_a1_8c_e3_81_97_e3_81_a6_e3_81_84_e3_82_8b_e3_82_b9_e3_82_af_e3_83_aa_e3_83_97_e3_83_88_e3_81_ae_e3_83_91_e3_82_b9_e3_82_92_e6_b1_82_e3_82_81_e3_82_8b os.path.dirname(__file__) # スクリ…

    Django accounts/loginの転送先の設定

    なぜか accounts/loginへ転送される 本当は appname/accounts/login※appnameはアプリ名 にしたいsettings.py に LOGIN_URL = '/appname/accounts/login' を追加する

    Titaniumいまのウィンドウからビューを消す

    Ti.UI.currentWindow.remove(view);

    Titanium のFacebookモジュールを使う

    ・tiapp.xmlをコメントアウトして置き換える。 <modules> <module platform="android">facebook</module> <module platform="iphone">facebook</module> </modules> ・alloy.coffee ※JavaScriptを使う人はalloy.jsをいじる。 Alloy.Globals.Facebook = require('facebook…

    Titanium JadeのImageViewの画像指定

    ImageView(image="male.png")とかく。 ImageView (image="male.png")のように「ImageView」と「(」の間にスペース入れないこと!

    Titaniumでstylusとjade

    この枠でやらないといけないこともある? npm install l -g stylusと npm install l -g jade

    Sprite EditorのSpriteの枠の削除 Unity

    URL: http://forum.unity3d.com/threads/213518-Deleting-shapes-in-Sprite-Editorマウスで選択しただけで枠が増えて厄介・・・。[command] + [delete]で削除できる。

    SpritePacker Unity

    UnityのSpriteのドローコールをまとめるツールのSpritePackerを使う。 勘違いしやすいが、Atlas化ではない!まずデフォルトは非表示にされてるので、「Edit->ProjectSettings->Editor」 ModeをDisabledから、「Always Enabled」にする。そしたら、開くため、…

    Resource.LoadでNullにハマる Unity

    例えば同じディレクトリにHoge.prefab Hoge.animなどがあるときに、Resource.Load("Hoge") なんてやると、本来「Hoge.prefab」を読み込みたいのに「Hoge.anim」が先に読み込まれ、 プレハブではないのでNullになるという現象がある。 同じディレクトリに同じ…

    UnityのIsKinematicの2Dと3Dでの違い

    Rigidbody(従来の3D版) ではIsKinematicにチェックしても CollisionEnterなどは反応するURL: http://docs-jp.unity3d.com/Documentation/Components/class-Rigidbody.html 「リジッドボディに「isKinematic」と付いている場合、衝突や力、physX のその他の…