This file contains 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
// with just a simple extension function for the Data Binding ObservableField | |
inline fun <R> ObservableField<R>.observe(crossinline callback: (R) -> Unit) { | |
this.addOnPropertyChangedCallback(object : Observable.OnPropertyChangedCallback() { | |
override fun onPropertyChanged(p0: Observable?, p1: Int) { | |
callback(get()) | |
} | |
}) | |
} | |
... |
This file contains 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.aidanvii.extensions | |
import android.util.SparseArray | |
import java.util.* | |
val SparseArray<*>.max: Int get () = size() - 1; | |
inline fun <V> SparseArray<V>.forEachValue(action: (V) -> Unit): SparseArray<V> { | |
for (index in 0..max) { | |
val key = keyAt(index) |
This file contains 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
/* | |
* Copyright 2016 Google 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 |
This file contains 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
cd ~ | |
git clone [email protected]:fangzhzh/.vim.git | |
ln -s ~/.vim/.vimrc ~/.vimrc | |
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim | |
vim +PluginInstall +qall | |
d ~/.vim/bundle/YouCompleteMe && ./install.py --clang-completer |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
This file contains 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
# works only on Mac OS X with Evernote desktop client installed | |
# download the ohlife plaintext export and pipe it to this script | |
# eg. $ cat ~/Downloads/ohlife_2012blablabla.txt | python ohlife_to_evernote.py | |
# don't forget to change the notebook title if it's not "Journal" | |
from pipes import quote | |
import sys | |
import os | |
buf = '' |
NewerOlder