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
{ | |
"C_Cpp.autocompleteAddParentheses": true, | |
"C_Cpp.clang_format_sortIncludes": true, | |
"C_Cpp.codeAnalysis.updateDelay": 300, | |
"C_Cpp.default.mergeConfigurations": true, | |
"C_Cpp.experimentalFeatures": "Enabled", | |
"C_Cpp.intelliSenseEngineFallback": "Enabled", | |
"C_Cpp.intelliSenseUpdateDelay": 500, | |
"C_Cpp.workspaceSymbols": "All", | |
"cmake.configureOnOpen": true, |
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
// Place your key bindings in this file to override the defaults | |
[ | |
{ | |
"command": "workbench.action.closeOtherEditors", | |
"key": "shift+cmd+w" | |
}, | |
{ | |
"command": "-workbench.action.closeOtherEditors", | |
"key": "alt+cmd+t" | |
}, |
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
import io.reactivex.Observable | |
import io.reactivex.ObservableSource | |
import io.reactivex.ObservableTransformer | |
import java.util.Optional | |
import java.util.concurrent.atomic.AtomicReference | |
/** | |
* A transformer that remembers the last value. For observer, you'll get a pair of | |
* last value and current value. | |
* |
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
import android.content.Context | |
import android.view.LayoutInflater | |
import android.view.View | |
import android.view.ViewGroup | |
import android.widget.ArrayAdapter | |
import android.widget.Filter | |
import androidx.annotation.LayoutRes | |
import com.fitbit.coin.kit.internal.service.FuzzySearchArrayAdapter.FuzzySearchFilter | |
import java.util.concurrent.CopyOnWriteArrayList |
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
import android.text.Editable | |
import android.text.Spanned | |
import android.text.TextWatcher | |
import android.text.style.ReplacementSpan | |
import android.widget.EditText | |
import android.widget.TextView | |
import io.reactivex.Completable | |
import io.reactivex.disposables.Disposable | |
import java.text.NumberFormat | |
import java.util.Currency |
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
import android.graphics.Canvas | |
import android.graphics.Paint | |
import android.text.style.ReplacementSpan | |
import kotlin.math.ceil | |
/** | |
* Spans for annotating the TextView or EditText with a character. | |
*/ | |
internal class CharAnnotationSpan( | |
private val symbol: Char, |
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
class Solution { | |
public List<String> removeInvalidParentheses( | |
String s | |
) { | |
// Find how many left and right parentheses to remove. | |
final int[] parenToRemove = new int[2]; | |
computeParanToRemove(s, parenToRemove); | |
final int l = parenToRemove[0]; | |
final int r = parenToRemove[1]; | |
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
class Solution { | |
private final static char NULL_CHAR = '_'; | |
private final static int PADDING = 1; | |
public boolean isMatch(String s, String p) { | |
final List<String> pattern = extractPattern(p); | |
// System.out.println(String.format("Search string: %s", s)); | |
// System.out.println(String.format("Regex pattern: %s", pattern)); |
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
class Solution { | |
// Example: | |
// Input: | |
// search string: "missia" | |
// pattern string: "mis*is*p*." | |
// Output: | |
// Regex DFA graph: ["m", "i", "s*", "i", "s*", "p*", "."] | |
// [0]=m vs m | |
// [1]=i vs i |
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
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> |
NewerOlder