2017-01-01から1年間の記事一覧

PyQt5 returnPressed.connect win32 exception

def keyPressEvent(self, event): key = event.key() if key == Qt.Key_Escape: print('esc') QCoreApplication.quit() elif key == Qt.RightArroww: print('->') elif key == Qt.LeftArrow: print('<-') I delete the code and the exception problem was v…

AOJ 0140 Bus Line

問題 http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0140 バス停Aからバス停Bまで乗る時に通るバス停の列を答えよ 解法:やるだけ 私は普通にif分で簡単な場合などで分岐させて解いた http://judge.u-aizu.ac.jp/onlinejudge/review.jsp?rid=23…

AOJ 0139 Snakes

問題 http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0139 文字列が蛇かを判定する問題 A種の例: >'====#====~ >'==#==~ B種の例: >^Q=Q=Q=Q=~~ >^Q=Q=~~ 提出 指定のパターンの蛇かを判定する問題 私はいくつもif分で弾く判定を足していき、…

error CS1502: The best overloaded method match for `UnityEngine.Events.UnityEvent.AddListener(UnityEngine.Events.UnityAction)' has some invalid arguments

If you want to use AddListener and void function, you should not write like ``` button.onClick.AddListener (someFunction(id)); ``` but ``` button.onClick.AddListener (() => someFunction(id)); ```

RemoveAllListeners can't remove listeners

Refer to doc. https://docs.unity3d.com/jp/current/ScriptReference/Events.UnityEventBase.RemoveAllListeners.html It says that RemoveAllListeners can only remove listeners attached at runtime.