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
| onChange( | |
| TextModel::textStyle, | |
| callback { | |
| DesignSystemConfigurationsHolder.textComponentConfigurator.applyStyle(it, this@TextComponent) | |
| textStyle = it | |
| } | |
| ) | |
| onChange( |
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
| object Main { | |
| private val out: PrintWriter = | |
| PrintWriter(BufferedWriter(OutputStreamWriter(System.out, "UTF-8"), 512)) | |
| @JvmStatic | |
| fun main(args: Array<String>) { | |
| val bufferReader = BufferedReader(InputStreamReader(FileInputStream(File("f_big.in")))) | |
| val stringTokenizer = StringTokenizer(bufferReader.readLine()) |
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
| class Solution { | |
| public boolean wordBreak(String s, List<String> wordDict) { | |
| return check(s, wordDict, 0); | |
| } | |
| private HashMap<Integer, Boolean> cache = new HashMap<>(); | |
| public boolean check(String s, List<String> wordDict, int index) { | |
| if (index == s.length()) { | |
| return true; |
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.badoo.mobile.proposals.prop4 | |
| import android.content.Context | |
| import android.view.LayoutInflater | |
| import android.view.View | |
| import com.badoo.mobile.kotlin.gone | |
| import com.badoo.mobile.kotlin.visible | |
| import com.jakewharton.rxrelay2.PublishRelay | |
| import io.reactivex.ObservableSource | |
| import io.reactivex.functions.Consumer |
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
| class Solution { | |
| private static String[] letters = { | |
| "", | |
| "", | |
| "abc", | |
| "def", | |
| "ghi", | |
| "jkl", | |
| "mno", | |
| "pqrs", |
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
| class Solution { | |
| public List<List<Integer>> combinationSum(int[] candidates, int target) { | |
| Arrays.sort(candidates); | |
| List<List<Integer>> result = new ArrayList<>(); | |
| findTarget(target, candidates.length - 1, new ArrayList<>(), result, candidates); | |
| return result; | |
| } | |
| private void findTarget(int target, int lastElementIndex, List<Integer> current, List<List<Integer>> result, int[] candidates) { | |
| if (target == 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
| package com.github.zsoltk.pokedex.common | |
| import androidx.animation.AnimationEndReason | |
| import androidx.animation.ExponentialDecay | |
| import androidx.compose.* | |
| import androidx.ui.core.* | |
| import androidx.ui.core.gesture.PressGestureDetector | |
| import androidx.ui.foundation.* | |
| import androidx.ui.foundation.animation.AnimatedValueHolder | |
| import androidx.ui.foundation.animation.FlingConfig |
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.example.lifelike | |
| import android.os.Bundle | |
| import androidx.appcompat.app.AppCompatActivity | |
| import androidx.compose.Composable | |
| import androidx.compose.onActive | |
| import androidx.compose.state | |
| import androidx.ui.animation.Crossfade | |
| import androidx.ui.core.setContent | |
| import androidx.ui.foundation.Clickable |
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.example.lifelike | |
| import android.os.Bundle | |
| import androidx.appcompat.app.AppCompatActivity | |
| import androidx.compose.Composable | |
| import androidx.compose.onActive | |
| import androidx.compose.state | |
| import androidx.ui.animation.Crossfade | |
| import androidx.ui.core.setContent | |
| import androidx.ui.foundation.Clickable |
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
| class Solution { | |
| public int canCompleteCircuit(int[] gas, int[] cost) { | |
| int min = Integer.MAX_VALUE; | |
| int start = -1; | |
| int current = 0; | |
| for (int i = 0; i < gas.length; i++) { | |
| current += gas[i] - cost[i]; | |
| if (current < min) { | |
| min = current; |
OlderNewer