Original solution sacrifices new api lint check.
Here my solution:
int minSdk = hasProperty('minSdk') ? minSdk.toInteger() : 16
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
package lt.mealdeal.android.utils; | |
import android.content.res.Resources; | |
import android.graphics.drawable.Drawable; | |
import android.support.v7.widget.SearchView; | |
import android.text.Spannable; | |
import android.text.SpannableStringBuilder; | |
import android.text.style.ImageSpan; | |
import android.view.View; | |
import android.widget.ImageView; |
Original solution sacrifices new api lint check.
Here my solution:
int minSdk = hasProperty('minSdk') ? minSdk.toInteger() : 16
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
package com.vinted.extensions | |
import kotlin.reflect.KProperty | |
/** | |
* @author Andrius Semionovas | |
* @since 2015-10-16 | |
*/ | |
class LazyVar<T> internal constructor(initializer: () -> T) { |
#!/bin/sh | |
# Copy templates to Android Studio in default location | |
TMP_PATH=`pwd` | |
TEMPLATES_PATH="/Applications/Android Studio.app/Contents/plugins/android/lib/templates/other" | |
DIRS=`find $TMP_PATH -type d -maxdepth 1 -not -name '.*' -not -path $TMP_PATH` | |
for f in $DIRS |
# bash/zsh completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# | |
# *) local and remote branch names | |
# *) local and remote tag names |
// ==UserScript== | |
// @name Markdown img to html converter | |
// @namespace neworld | |
// @version 0.2.0 | |
// @description Converts markdown img tag to html | |
// @author Neworld | |
// @match https://*.github.com/* | |
// @grant none | |
// @run-at context-menu | |
// ==/UserScript== |
public class TimedDynamicText extends SpannableStringBuilder { | |
private final ArrayDeque<Pair<Integer, CharSequence>> list; | |
private Handler handler = new Handler(); | |
private CharSequence nextText = ""; | |
public TimedDynamicText(CharSequence initialText, Collection<Pair<Integer, CharSequence>> list) { | |
this.list = new ArrayDeque<>(list); | |
nextText = initialText; | |
next(); |
data Tree a = Empty | Tree a (Tree a) (Tree a) deriving (Show) | |
singleton :: a -> Tree a | |
singleton x = Tree x Empty Empty | |
addToTree :: (Ord a) => a -> Tree a -> Tree a | |
addToTree new Empty = singleton new | |
addToTree new (Tree value left right) | |
| new < value = Tree value (addToTree new left) right | |
| otherwise = Tree value left (addToTree new right) |
send(to, from, count) | |
register short *to, *from; | |
register count; | |
{ | |
register n = (count + 7) / 8; | |
switch (count % 8) { | |
case 0: do { *to = *from++; | |
case 7: *to = *from++; | |
case 6: *to = *from++; | |
case 5: *to = *from++; |
val checkLock = Object() | |
val disposeLock = Object() | |
val completable = Completable.create { emitter -> | |
synchronized(checkLock) { | |
checkLock.notify() | |
} | |
if (!emitter.isDisposed) { | |
synchronized(disposeLock) { | |
try { |