万年素人からHackerへの道

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

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

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

    PhoneGapのエラー

    [error] An error occured during creation of android sub-project. /Users/shinriyo/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:126 throw e; ^ Error: Please install Android target 19 (the Android newest SDK). Make sure you have…

    C#のメソッド拡張でin

    URL: http://stackoverflow.com/questions/501194/is-string-in-arrayメソッド拡張 public static bool IsIn<T>(this T source, params T[] values) { return values.Contains(source); } こう使える string myStr = "str3"; bool found = myStr.IsIn("str1", "</t>…

    pythonanywhereでDjangoでHello World

    Web [Web]画面で[Add a new web app]によって、まず、新規にDjangoでプロジェクト作成。 Consoles [Consoles]でBashを使って、vimなどで編集 プロジェクト直下の ・urls.py urlpatterns = patterns('', # Examples: url(r'^$', 'proj_name.views.home', name…

    MacにAntを入れる

    brew update brew install ant

    PhoneGapのインストール

    URL: http://phonegap.com/install/最近はnpmで管理されてるようだ。 sudo npm install -g phonegapでいけるhttp://stackoverflow.com/questions/20616893/an-error-occured-during-creation-of-android-sub-projectしかし、 phonegap run androidでこける。…

    json Pyton はまりやすい

    \u306bの文字化け 参照URL: http://iyukki.blog56.fc2.com/blog-entry-137.html dumps(to_json, ensure_ascii=False) ensure_ascii=Falseがいるのだが、忘れがち!

    python manage.py migrateでエラー

    parts = app_name.split('.') AttributeError: 'module' object has no attribute 'split'のエラーが出た。 これはINSTALLED_APPSのところで発生しているようだったsettings.pyの設定で INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contentt…

    Djangoのワーニング

    /home/shinriyo/.virtualenvs/django_app/lib/python2.6/site-packages/django/conf/__init__.py:75: DeprecationWarning: The ADMIN_MEDIA_PREFIX setting has been removed; use STATIC_URL instead. "use STATIC_URL instead.", DeprecationWarning) /hom…

    NGUIのUIScrollBarのバグ?

    UIScrollBarにてスクロールすると、勝手にforegroundのバーの大きさがbackground のサイズに合わさってしまう。このように関係ない方向が修正されないようにしたがこれでいいのか? public void ForceUpdate () { mIsDirty = false; if (mBG != null && mFG …

    AngularJSとDjangoの共存

    1.5では標準らしいverbatim を使う URL: http://stackoverflow.com/questions/13671701/angularjs-twig-conflict-with-double-curly-braces {% verbatim %}{{ angular_var }}{% endverbatim %}のように前後に挟んで普通にAngularJSを書く。しかし、1.4などを…

    Djangoの設定 staticの設定

    毎回はまってる気がするのでメモsettings.pyと同じ所にstaticを配置、 そして以下をsettings.pyへ記載 STATICFILES_FINDERS = ( 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', 'djan…

    Titanium tiapp.xml 3.2.1.GA

    3.2.1.GAを使っている。 apk作成で、 <tool-api-level> has been deprecated, please specify the target SDK using the <uses-sdk> tag:のログが出た。タグはもういらないのか?</uses-sdk></tool-api-level>

    cocos2d-xでのenumとswitchの書き方

    class Player : public CCSprite { public: enum Direction { Left, Right, Up, Down }; }; のように定義しておくと、switchでは switch(_player->direction) { break; case Player::Right: { _player->initWithSpriteFrameName("Player_right_1.png"); } br…

    TitaniumのWarning

    TiUIScrollView: (main) [13262,356427] Scroll direction could not be determined based on the provided view properties. Default VERTICAL scroll direction being used. Use the 'scrollType' property to explicitly set the scrolling direction.

    TitaniumのSQLでのreturnに注意

    function hogeMethod() { hoge_table.map(function(res) { var message = res.get('message'); return message; }); }のようにreturnしても。hogeMethod自体がreturnされるのではなく、 hoge_table.map(function(res) {の部分を抜けるだけのようだ。 Titaniu…

    Alloyの型

    ログを見ると・・・ [INFO] : Adding "alloy_id" to uniquely identify rows [WARN] : "string" is not a valid sqlite field, using TEXT instead [WARN] : "date" is not a valid sqlite field, using TEXT instead [WARN] : "boolean" is not a valid sql…

    Titaniumの変なエラー

    メソッドをへらさないといけないの? [NSNull krollObjectForBridge:]: unrecognized selector sent to instanceURL: http://jazzguitar7.blog118.fc2.com/blog-entry-33.html

    Titanium SDKのエラー(Titanium 3.2.1)

    Titanium 3.2.1にしてから、iOSのシミュレータで起動しようとしたら、 ios sdk version 7.0 not found. titaniumのポップアップ https://developer.appcelerator.com/question/160722/updated-to-320-ios-7-sdk-not-found-among-many-other-broken-things ti…

    Alloy Titanium 自動のid

    参考URL: https://developer.appcelerator.com/question/149888/alloy-models-not-saving 参考URL: http://fukuchiharuki.me/wiki/index.php?Alloy%2F%E3%83%A2%E3%83%87%E3%83%AB%E5%9F%BA%E6%9C%AC%E6%93%8D%E4%BD%9Calloy_idでつく。fetchするときにSQLの…

    sqliteでランダムに一件取り出す

    参考URL: http://d.hatena.ne.jp/innx_hidenori/20090707/1246926747 SELECT * FROM regular_unit ORDER BY RANDOM() LIMIT 1; 順番ソートなので、LIMIT 1をするだけ。

    MavericksでTitnaiumが起動しない!!

    Mavericksにアップデートしたら何故か起動しない。 http://www.appcelerator.com/blog/2013/10/studio-3-1-4-for-os-x-mavericks/dmgに入ってるTitaniumを直接起動するとこのエラーが出た。 これが参考になる? http://developer.appcelerator.com/question/…

    Admob+Titanium+Alloy

    あまり情報がない? http://matome.naver.jp/odai/2135869348273901001参考にした。僕は「ti.admob-android-2.1.0.zip」をどこからかダウンロードしてきた。 https://github.com/appcelerator/titanium_modules/tree/master/admob/mobile/android/dist かな…

    iTermとTerminalでの単語単位での移動

    ・iTerm 日本語 http://d.hatena.ne.jp/sugyan/20120221/1329794826英語 http://www.michael-noll.com/blog/2007/01/04/word-movement-shortcuts-for-iterm-on-mac-os-x/・Terminal http://snipplr.com/view/28113/config-terminal-to-move-wordbyword/

    NGUIの本

    http://www.amazon.co.jp/gp/product/B00I2ORN4M?ie=UTF8&camp=1207&creative=8411&creativeASIN=B00I2ORN4M&linkCode=shr&tag=noctushinrsdi-22

    UnityでLogのウィンドウを見失った時

    Logウィンドウではなく「Console(コンソール)」!・ショートカット Shift+command+C・画像

    CCPointの配列 cocos2d-x

    CCPointの配列を作りたいが、cppをCCArrayに追加しようとすると変なエラーになる。 CCArray *array = CCArray::create(); array->addObject(cpp(1, 1)); // error そういう時は、CCPointArrayを使う。 CCPointArray *pointArray = CCPointArray::create(255)…

    Pixenのショートカット

    いちいちメニューから選ぶのがめんどくさいけど ショートカットまとめてるサイトがないので書いた。 画像のアイコンの上にショートカットを記載した。覚え方とともに説明ペン・・・penの[p] スポイト・・・吸い取る?drainの[d] 選択・・・selectの[s] ※sent…

    cocos2d-xでTileの変更

    insertTileForGID insertTileForGID updateTileForGIDぜんぶ非推奨?

    アニメーション cocos2d-x(バージョン:cocos2d-2.1rc0-x-2.1.3)

    CCAnimationのinitWithAnimationFramesの引数でloopが何か分からない。ループ回数? 0だとアニメーションしない? 1だと一度だけ? 無限ループは? /** how many times the animation is going to loop. 0 means animation is not animated. 1, animation is…

    cocos2d-xのAtlasを使う(バージョン:cocos2d-2.1rc0-x-2.1.3)

    プロジェクトへ「Player.plist」、「Player.png」を追加した。Player.plistはこのようにキャッシュさせる CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile("Player.plist"); 「Player.png」自体は文字を実際に使わない。 フレームの…