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 LruStorage extends LinkedHashMap<String, byte[]> | |
| implements KV.Storage { | |
| private final ExecutorService mService = Executors.newSingleThreadExecutor(); | |
| private final KV.Storage mStorage; | |
| private final int mMaxSize; | |
| public LruStorage(KV.Storage storage, int size) { | |
| super(size/2, 0.75f, true); | |
| mStorage = storage; |
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
| val denom = arrayOf(1, 2, 5, 10, 20, 50, 100) | |
| val amount = arrayOf(5, 11, 53, 122, 155, 157, 210, 200) | |
| fun main(args: Array<String>) = amount.forEach { currentAmount -> | |
| val suggestions = mutableListOf<Int>() | |
| denom.forEach { | |
| if (it >= currentAmount) { | |
| suggestions += it |
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
| Testing started at 9:26 AM ... | |
| 07/18 09:26:57: Launching LoginActivityEspress... | |
| $ adb push /Users/esa/Documents/AndroidStudioProjects/driver-android-new/apks/etobeedriver-dev-debug.apk /data/local/tmp/com.etobee.driver | |
| $ adb shell pm install -r "/data/local/tmp/com.etobee.driver" | |
| pkg: /data/local/tmp/com.etobee.driver | |
| Success | |
| $ adb push /Users/esa/Documents/AndroidStudioProjects/driver-android-new/etobeedriver/build/outputs/apk/etobeedriver-dev-debug-androidTest.apk /data/local/tmp/com.etobee.driver.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
| Pasang ini untuk membuka akses blokir selain tiga dibawah ini. Pilih resolver yang paling deket (singapura) | |
| https://dnscrypt.org |
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' | |
| android { | |
| compileSdkVersion 21 | |
| buildToolsVersion "21.1.2" | |
| defaultConfig{ | |
| minSdkVersion 14 | |
| targetSdkVersion 21 | |
| versionCode 101 |
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
| # Uncomment this line to define a global platform for your project | |
| platform :ios, '8.0' | |
| # Uncomment this line if you're using Swift | |
| use_frameworks! | |
| target 'Rame' do | |
| pod 'Alamofire', :git => 'https://github.com/Homely/Alamofire.git', :branch => 'ios8' | |
| pod "SWSegmentedControl" | |
| pod 'Google/SignIn' | |
| pod 'Charts', :git => 'https://github.com/danielgindi/Charts.git', :tag => 'v3.0.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
| put card.xml in your drawables directory, put colors.xml in your values directory or add the colors to your colors.xml file. | |
| set the background of a view to card, | |
| as you can see in card.xml the drawable handles the card margin, so you don't have to add a margin to your view | |
| ``` xml | |
| <View | |
| android:layout_width="fill_parent" |
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
| // The code using Java 8 Lambda | |
| public class NoteRepository { | |
| public static Note createNote() { | |
| Note note = new Note(); | |
| note.setId(new RandomString(6).nextString()); | |
| return note; | |
| } | |
| public static void updateTitle(String noteId, String title) { |
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
| ## In case it's still apt-get | |
| echo 'alias apt="apt-get"' >> ~./bashrc | |
| ## Update APT | |
| apt update | |
| ## Essentials | |
| apt -y install htop xclip tmux unzip zsh git | |
| ## Change Shell Default to ZSH |
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.satulingkaran.obeng.http; | |
| import com.satulingkaran.obeng.data.model.Area; | |
| import com.satulingkaran.obeng.data.model.BaseResponse; | |
| import com.satulingkaran.obeng.data.model.Bengkel; | |
| import com.satulingkaran.obeng.data.model.Category; | |
| import com.satulingkaran.obeng.data.model.EditResponse; | |
| import com.satulingkaran.obeng.data.model.JenisUsaha; | |
| import com.satulingkaran.obeng.data.model.User; |