import java.util.Calendar
// 1日前は-1とする
fun getDayAfterToday(day: Int): Long {
val calendar: Calendar = Calendar.getInstance()
calendar.add(Calendar.DAY_OF_MONTH, day)
return calendar.time.time
}
import android.content.Context
import com.google.android.gms.ads.identifier.AdvertisingIdClient
import com.google.android.gms.common.GooglePlayServicesNotAvailableException
import com.google.android.gms.common.GooglePlayServicesRepairableException
import timber.log.Timber
import java.io.IOExceptionjava.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives への対処
https://qiita.com/Capotasto/items/ad1824722da7c3d9da97
./gradlew app:dependencies
によりライブラリの依存を見分ける
上記コマンドが実行できない場合は、
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // How to Implement Binary Search Tree in Java? Example | |
| // https://javarevisited.blogspot.com/2015/10/how-to-implement-binary-search-tree-in-java-example.html#axzz4wnEtnNB3 | |
| import java.util.Stack; | |
| public class BST { | |
| private class Node { | |
| private int data; | |
| private Node left, right; |
-
FusedLocationProviderClientを使った実装サンプル
https://akira-watson.com/android/fusedlocationproviderapi.html -
開発ドキュメント
https://developer.android.com/training/location/change-location-settings
優先度
・iOS Get Link Speed (Router Speed Test)
試したが、どのアクセスポイントでも同じ値を返す。胡散臭い、ちゃんと測れているのか。
・Wi-FiのHotspotの自動にゅるにゅるを打ち消す
CNSetSupportedSSIDs を使ってもiOS12では効果無し。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //https://stackoverflow.com/questions/12906171/iphone-wifi-on-or-off | |
| //Swift 2.3 version | |
| func isWifiEnabled() -> Bool { | |
| var addresses = [String]() | |
| var ifaddr : UnsafeMutablePointer<ifaddrs> = nil | |
| guard getifaddrs(&ifaddr) == 0 else { return false } | |
| var ptr = ifaddr |
http://redmine.jp/tech_note/apache-passenger/ https://www.phusionpassenger.com/library/admin/nginx/restart_app.html#restart-txt
Railsアプリケーションの再起動方法 二つの方法があります。
- Apacheを再起動
Apacheを再起動することにより、全てのRailsアプリケーションが再起動されます。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| import CryptoSwift | |
| struct EncryptionUtil { | |
| // ----- encryption ----- | |
| // key:鍵 | |
| // iv:初期化ベクトル | |
| // target:暗号化する文字列 | |
| static func encrypt(key: String, iv: String, target:String) -> String? { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # 作業ディレクトリ作成 | |
| mkdir build | |
| # CleanしてArchive作成 | |
| xcodebuild -workspace hogehoge.xcworkspace \ | |
| -scheme hogehoge \ | |
| -configuration Release \ | |
| clean archive \ |