EventBus は必ず onStart() と onStop() で呼ぶ。バックグラウンドで色々動かれて困る。
また、onStop() では super.onStop() よりも 先に 呼ぶ。
@Override
protected void onStart() {
super.onStart();| #!/bin/bash | |
| # xtetsuji 2018/04/10 | |
| # Usage: | |
| # move-to DIR FILE1 FILE2 ... | |
| # | |
| # mv FILE1 FILE2 ... DIR ; 移動元ファイル群と移動先の指定が逆なもの | |
| # | |
| # これは xargs で役立つ | |
| # e.g.: | |
| # 4並列、一度の移動プロセスで最大100ファイルを目的のディレクトリへ移動させる場合 |
| /* | |
| * Copyright (C) 2015 uPhyca Inc. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| #!/bin/bash | |
| # git pre-commit hook that runs an clang-format stylecheck. | |
| # Features: | |
| # - abort commit when commit does not comply with the style guidelines | |
| # - create a patch of the proposed style changes | |
| # modifications for clang-format by [email protected] | |
| # This file is part of a set of unofficial pre-commit hooks available | |
| # at github. |
| Re: http://blog.goo.ne.jp/hishidama/e/701f48e62000243418c0a0f251f118b9 | |
| バグはそもそも複合的な概念なので、絶対的な基準で定義できるものではないと思います。 | |
| 平たく言えば、文脈に依存するものなので、各々の文脈での「バグ」の定義が衝突することはありえます。 | |
| それが嫌な場合は各々の文脈の「バグ」を定義するしかないと思います。 | |
| 少なくとも、何の前提もなく「バグ」と言った場合は日常用語だと思うので、そもそも論として科学的な議論の対象としては不適当だと思います。 | |
| その上で、「仕様を満たしているかどうか」をバグの基準とする考えは一般的ですし、異論はありません。 | |
| しかし、その定義もあらゆる意味での「バグ」を説明できているとは思えません。 | |
| また、私自身も失敗の観点から「バグ」を定義するやり方は筋悪だと思います。 |
| import scala.language.higherKinds | |
| import scalaz.{Functor, \/} | |
| class LeftConverter[E1, E2](g: E1 => E2) { | |
| def apply[A, F[_]](f: F[E1 \/ A])(implicit F: Functor[F]): F[E2 \/ A] = | |
| F.map(f)(_.leftMap(g)) | |
| } | |
| object LeftConverter { | |
| def apply[E1, E2](g: E1 => E2): LeftConverter[E1, E2] = new LeftConverter(g) |
2014年7月8日 山城潤
Google Cardboard作成時に得たノウハウを記録しておく。
https://twitter.com/yamajun_ofug/status/486373754096717824
2時間半かけてようやく Google #Cardboard できた。 #台風ソン https://pic.twitter.com/hPUNqCKvBF
| 更新: | 2024-10-08 |
|---|---|
| 作者: | @voluntas |
| バージョン: | 2024.1 |
| URL: | https://voluntas.github.io/ |
概要
| def toCamelCase(String string) { | |
| String result = "" | |
| string.findAll("[^\\W]+") { String word -> | |
| result += word.capitalize() | |
| } | |
| return result | |
| } | |
| afterEvaluate { project -> | |
| Configuration runtimeConfiguration = project.configurations.getByName('compile') |