Skip to content

Instantly share code, notes, and snippets.

View ShikaSD's full-sized avatar
🍍
Being there, doing that

Andrei Shikov ShikaSD

🍍
Being there, doing that
View GitHub Profile
onChange(
TextModel::textStyle,
callback {
DesignSystemConfigurationsHolder.textComponentConfigurator.applyStyle(it, this@TextComponent)
textStyle = it
}
)
onChange(
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())
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;
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
class Solution {
private static String[] letters = {
"",
"",
"abc",
"def",
"ghi",
"jkl",
"mno",
"pqrs",
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) {
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
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
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
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;