2015-01-01から1年間の記事一覧
Hugoの使い方 http://gohugo.io/overview/quickstart/ 公式のここがいい。 まずプロジェクト作る hugo new site /path/to/site /path/to/siteに生成される。 作成先に移動 cd /path/to/site hugo new about.md これでプロジェクト直下/path/to/site/content/…
まずこれは行ける。 var ordinals = new string[] { "First", "Second", "Third" }; var indexed = ordinals.Select((n, i) => new { Index = i, Ordinal = n }) .Select((e) => { Debug.Log(e.Index); Debug.Log(e.Ordinal); return e; }).ToArray(); "Firs…
Hoge[] hoges をEditorWindowで出したい。 using UnityEngine; using UnityEditor; public class MyEditor : EditorWindow { [System.Serializable] // 必須. class Hoge { public bool boolHoge; public int intHoge; public string strHoge; } [SerializeF…
www.sitepoint.com
brew update すると、 error: unable to unlink old '.gitignore' (Permission denied) error: unable to create file .travis.yml (Permission denied) error: unable to unlink old '.yardopts' (Permission denied) error: unable to unlink old 'CONTRIB…
URL http://connpass.com/event/22061/ ドットインストールのRails 4のを見ながらElixir/Phoenixやってみる。 ・ドットインストール http://dotinstall.com/lessons/basic_rails_v2/ Elixir は ErlangのVM上で動くプログラミング言語です。 Elixirのバージョ…
SerializeFieldの値にEditorとかでアクセス HogeObjectというGameObjectにあるHogeCompコンポーネントの hogeLabelという名前のUIWidgetにアクセスすることを想定。 // GameObjectの取得 var HogeObject = GameObject.Find("HogeObject"); // コンポーネント…
MyEnumTypeというEnum型があるとする、 EnumはNullableではない。as演算子はNullableのみ。 (MyEnumType)obj キャストはOK。 MyEnumType as obj はだめ。
null許容型にnullが入った時に0比較でどうなるか実験してみた。 int? nullableInt = null; if(nullableInt == 0) { Debug.Log("int? null is zero"); } if(nullableInt == null) { Debug.Log("int? null is null"); } if((int)nullableInt == 0) { Debug.Log…
i-jupiter thinktank.: C# 静的コードチェックツール StyleCop C#やってる人はこれ、StyleCop必須だが、 メソッドの後に半角スペースも消すことが必須。 で設定できる。 Constructorsのスクリーンショットしか貼ってないが、 DeclarationsとかStatementsとか…
クリップボードにコピーする qiita.com があったので、 UniClipboardをEditor拡張から呼ぼうとした。 「Editor」フォルダの中にいれたスクリプトによって、 UniClipboard.value = "Hello, UniClipboard!"; が呼べない。 仕方ないので「UniClipboard.value」…
http://www.toxicfork.com/90/fixed-width-labels-for-fields-in-unity3d ここがいい。英語なので今度じっくり・・。
何故かこの画像のように ここにアニメーションファイルをドラッグすると外れる。 http://answers.unity3d.com/questions/770899/cant-add-motion-to-an-animator.html と調べたら、Legacyになってるから。 僕の使ったのはまだMecanimがUnityにないときのキャ…
その1 Isnpectorが変わる! ここがいい
Event for Diverse Game Engineers プログラムを愛するエンジニアの為の勉強会 http://peatix.com/event/100971 思い描いているものを形にするための事前準備(挨拶と会場説明込み) by ろっさむ C++, Python 土田さん 170人超え 行動する。 小さいことをまず…
react-nativeのAndroid版が使えるっぽいので試してみた。 react-native run-android がうまくいかない。 Commandrun-androidunrecognized. Did you mean to run this inside a react-native project?と怒られる。 https://github.com/facebook/react-native/…
MonoDevelopの設定を良くする。 Solarizedというカラー。目に優しい。 iTermでも使える。 カラー qiita.com git clone https://github.com/oleyb/monodevelop-colors-solarized.git フォント morizyun.github.io Rictyを落とす。 MonoDevelopを再起動しよう。…
Personとそれを継承したTaro作る public class Person { public string name; // 名前. public int age; // 年齢. public virtual void Say() { Debug.Log("person"); } } public class Taro : Person { public override void Say() { Debug.Log("I am taro"…
using UnityEngine; using System.Collections; public class Skill { public string name; public int power; public string ToString() { return "[" + name + " (" + power + ")]"; } } public class Person { public string name; // 名前. public int a…
権限がないユーザでApplicationsがホーム直下などの時。 普通はシンボリックリンクを作るらしいが作る権限すらない時。 .zshrcとかに alias subl="~/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl" を追記。
配列系は勝手に参照渡しではない。一応確認。 using UnityEngine; using System.Collections; using System.Collections.Generic; public class RefTest : MonoBehaviour { // Use this for initialization void Start () { List<string> listRef = new List<string>(); list</string></string>…
d.hatena.ne.jp ↑この記事のC#版 ”今、再生している”アニメーション名を取る ただanimationで取れなくなったので、 docs.unity3d.com Animation animation GetComponent<Animation>(); しておき、 string GetCertainlyAnimationName () { var bestWeight = -1.0; string</animation>…
リフレクションであるプロパティにアクセスしたい。 var qry = typeof(Foo).type.GetProperties(BindingFlags.Public|BindingFlags.Instance); だとsetプロパティがないのもとれてしまう・・・。 http://stackoverflow.com/questions/302476/how-do-you-find…
http://infrapre.connpass.com/event/17896/ 2015年8月22日 ・Kitematic(カイトマティック) https://kitematic.com/ Dockerが買収 コンテナごと上げるのが主流に成る? Electron(node.js) ◯インストール mkdir ~/Docker vagrant box add trusty64 h…
Restore from this backup:を選ぶ。
すべての要素が0のジャグ配列(配列の配列)を作りたい。 using System.Linq; でusingしておき、 int row = 10; int column = 10; int[][] arrArr = Enumerable.Range(0, row).Select( x => Enumerable.Range(0, column).Select(y => y * 0).ToArray<int>() ).ToA</int>…
クラス的なHelloモジュールを作る 「defmodule」はtypoかと思ったが、「def module」ではなくそのまま続ける。 defmodule Hello do def print do IO.puts "Hello World" end end Hello.print Hello.printってのは実際の実行。 elixir hello.exs で実行する
mix phoenix.server でサーバ起動しようとしたら。 Compiled lib/phoenixapp.ex [warning] calling "plug :router, YourApp.Router" in your endpoint is deprecated, plug your router directly instead: "plug YourApp.Router" lib/phoenixapp/endpoint.ex…
Linqなので忘れずこれ using System.Linq; こうする int rowMax = 10; int columnMax = 10; private int[][] myArray = new int[rowMax][]; for (var i = 0;i < columnMax; i++) { var seq = Enumerable.Range(0, rowMax).Select(x => x * 0).ToArray<int>(); myA</int>…
以下のようにやってる場合。 void Awake () { IObservable<long> updateStream = Observable.EveryUpdate (); updateStream.Subscribe (count => Fade ()).AddTo(eventResources); } のようにしているとこのFade()メソッドに関連しているオブジェクトがDestroyされ</long>…