View MyDefaultFactory.java
class MyDefaultFactory extends ViewModelProviders.DefaultFactory {
// constructor
private final Map<String, ViewModel> mMap = new HashMap<>();
@Nullable
private String onetimeCacheKey;
@MainThread
public void setKey(@NonNull String key) {
View build.gradle
def loadProperties(filename, properties) {
file("$rootDir/$filename").withInputStream {
properties.load(it)
}
}
ext.properties = new Properties()
loadProperties("version.properties", ext.properties)
# properties.hogehoge
View movie2gif.sh
#!/usr/bin/env bash
set -eu
main() {
local -r workspace="____movie2gif"
local -r movie_filename="$1"
local -r ratio="$2%"
local -r frameRate="$3"
local -r output_filename="${movie_filename%.*}.gif"
View LintIssureRegistory.java
package com.kgmshin.lint;
import com.android.tools.lint.client.api.IssueRegistry;
import com.android.tools.lint.detector.api.Issue;
import java.util.Collections;
import java.util.List;
public class LintIssueRegistry extends IssueRegistry {
View PreferenceTarget.kt
import android.support.v7.preference.Preference
import android.graphics.Bitmap
import android.graphics.drawable.BitmapDrawable
import android.graphics.drawable.Drawable
import com.squareup.picasso.Target
import java.lang.ref.WeakReference
private class PreferenceTarget(pref: Preference) : Target {
private val ref: WeakReference<Preference?> = WeakReference(pref)
View renew_PreferenceFragmentCompat.kt
class SettingFragment : PreferenceFragmentCompat() {
companion object {
fun newInstance(rootKey: String?): SettingFragment = SettingFragment().apply {
arguments = Bundle().apply {
putString(PreferenceFragmentCompat.ARG_PREFERENCE_ROOT, rootKey)
}
}
}
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
View BookmarkTranslator.md
object BookmarkTranslator {
  fun toPresentation(model: Bookmark): BookmarkViewModel {
    return BookmarkViewModel().build(model.id.value) {
      name = model.name
      // ommit
    }
  }
  
  fun toDomainId(viewModel: BookmarkViewModel): Bookmark.Id = Bookmark.Id(viewModel.id.key)
View atom.installed
atom-dark-ui-slim
autocomplete-paths
autocomplete-sass
color-picker
highlight-selected
jumpy
maximize-panes
merge-conflicts
minimap
minimap-autohide
View gist:10add47e76a48b1ecebe
http://chrisjenx.com/gradle-robolectric-jacoco-dagger/
View Failure__NoSetter.java
@Table
data class AuthorizedUser(
@Column
val ok: Boolean,
@Column
val url: String,
@Column
val team: String,