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
| public static class ScopeFunctions | |
| { | |
| public static T Also<T>(this T self, Action<T> action) | |
| { | |
| action(self); | |
| return self; | |
| } | |
| public static TResult Let<T, TResult>(this T self, Func<T, TResult> func) => func(self); |
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
| [Unit] | |
| Description=%i service with docker compose | |
| Requires=docker.service | |
| After=docker.service | |
| [Service] | |
| SyslogIdentifier=%i | |
| Restart=always | |
| WorkingDirectory=/etc/docker/compose/%i |
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
| package example | |
| import android.arch.lifecycle.ViewModel | |
| import android.arch.lifecycle.ViewModelProvider | |
| import dagger.Binds | |
| import dagger.MapKey | |
| import dagger.Module | |
| import javax.inject.Inject | |
| import javax.inject.Provider | |
| import kotlin.reflect.KClass |
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
| fun <A, B> transformAsyncPair(futureA: ListenableFuture<A>, futureB: ListenableFuture<B>, executor: Executor): ListenableFuture<Pair<A, B>> { | |
| return Futures.transformAsync(futureA, AsyncFunction<A, Pair<A, B>> { a -> | |
| Futures.transformAsync(futureB, AsyncFunction<B, Pair<A, B>> { b -> | |
| Futures.immediateFuture(Pair<A, B>(a!!, b!!)) | |
| }, executor) | |
| }, executor) | |
| } |
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
| LC_NUMERIC="en_US.UTF-8" |
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
| // | |
| // USAGE: | |
| // | |
| // jdbi.registerColumnMapper(new LocalDateColumnMapper()); | |
| // | |
| import java.sql.Date; | |
| import java.sql.ResultSet; | |
| import java.sql.SQLException; | |
| import java.time.LocalDate; |
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 java.sql.Date; | |
| import java.sql.PreparedStatement; | |
| import java.sql.SQLException; | |
| import java.sql.Types; | |
| import java.time.LocalDate; | |
| import org.skife.jdbi.v2.StatementContext; | |
| import org.skife.jdbi.v2.tweak.Argument; | |
| import org.skife.jdbi.v2.tweak.ArgumentFactory; |
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
| package com.claimtowers.common.asynctask; | |
| public class AsyncTaskResult<T> { | |
| private T result; | |
| private Exception exception; | |
| public AsyncTaskResult(T result) { | |
| this.result = result; | |
| } |
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
| ibus restart && sleep 1 && ibus engine xkb:se::swe |
NewerOlder