- [Data Structures] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#data-structures)
- [Linked Lists] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#linked-lists)
- [Trees] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#trees)
- [Binary Trees] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#binary-trees)
- [Binary Search Tree] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#binary-search-tree)
- [Red-Black Tree] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#red-black-tree)
- [AVL Tree] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#avl-tree)
- [Tries] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#tries)
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 class SignUpValidator implements Validator { | |
| /** | |
| * If aClass equals User | |
| * @param aClass | |
| * @return | |
| */ | |
| @Override | |
| public boolean supports(Class<?> aClass) { | |
| return User.class.equals(aClass); |
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 class SignUpValidator implements Validator { | |
| /** | |
| * If aClass equals User | |
| * @param aClass | |
| * @return | |
| */ | |
| @Override | |
| public boolean supports(Class<?> aClass) { | |
| return User.class.equals(aClass); |
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 abstract class BaseFragment extends Fragment { | |
| private Unbinder unbinder; | |
| @Override | |
| public void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| injectDependencies(AppDelegate.getAppComponent(AppDelegate.getContext())); | |
| } |
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
| test |
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
| /** | |
| * Created by antonkazakov on 15.11.16. | |
| */ | |
| public class SeekBarPreference extends Preference implements SeekBar.OnSeekBarChangeListener { | |
| private int mProgress; | |
| private int MAX = 20; | |
| public SeekBarPreference(Context context) { | |
| this(context, null, 0); |
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
| @Override | |
| @SuppressWarnings("deprecation") | |
| public Observable<SimpleLocation> getMyLocation() { | |
| return Observable.fromEmitter(new Action1<Emitter<Location>>() { | |
| @Override | |
| public void call(Emitter<Location> tEmitter) { | |
| LocationListener locationListener = tEmitter::onNext; | |
| GoogleApiClient.OnConnectionFailedListener onConnectionFailedListener = connectionResult -> tEmitter.onError(new LocationUnavailableException("ERROR")); | |
| GoogleApiClient.ConnectionCallbacks connectionCallbacks = new GoogleApiClient.ConnectionCallbacks() { |
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
| /** | |
| * | |
| * This module provides all network dependencies like OkHttpClient with interceptors, | |
| * Retrofit, GSON and RetrofitConverters. | |
| * | |
| * Any network dependency should go there. | |
| * | |
| * @author Anton Kazakov | |
| * @date 29.03.17. | |
| */ |
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
| apply plugin: 'com.android.application' | |
| apply plugin: 'kotlin-android' | |
| apply plugin: 'kotlin-kapt' | |
| android { | |
| compileSdkVersion 25 | |
| buildToolsVersion "25.0.3" | |
| defaultConfig { | |
| applicationId "com.greencode.kotlinsimplemvp" |
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
| // Top-level build file where you can add configuration options common to all sub-projects/modules. | |
| buildscript { | |
| ext.kotlin_version = '1.1.2-3' | |
| repositories { | |
| jcenter() | |
| } | |
| dependencies { | |
| classpath 'com.android.tools.build:gradle:2.3.2' | |
| classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" |
OlderNewer