I hereby claim:
- I am manjago on github.
- I am manjago (https://keybase.io/manjago) on keybase.
- I have a public key whose fingerprint is C552 9998 5198 0D6A 6429 5CA6 AA77 C378 EC58 D954
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Skip to content All gists Back to GitHub @Manjago Manjago/gist:dd80feb723d5346c5391fbd9373a6029 Secret Created May 9, 2024 16:36
Code Revisions 1
import java.util.ArrayList; | |
import java.util.List; | |
// 2023008-02 46. Permutations https://leetcode.com/problems/permutations/ by ChatGPT | |
public class LeetCode00046_1 { | |
public List<List<Integer>> permute(int[] nums) { | |
List<List<Integer>> result = new ArrayList<>(); | |
permuteHelper(nums, new boolean[nums.length], new ArrayList<>(), result); | |
return result; | |
} |
import java.util.ArrayList; | |
import java.util.List; | |
// 2023008-02 46. Permutations https://leetcode.com/problems/permutations/ | |
public class LeetCode00046 { | |
/* | |
{1 2 3 } | |
1 {2 3} | |
1 2 3 | |
1 3 2 |
: fibosum ( sum, second, first -- sum, second, first) | |
\ 1, 1, 2, 3, 5, 8 ... - calculate sum of Nth fibonacci sequance members | |
\ first - "first" member of fibonacci sequence | |
\ second - "second" member of fibonacci sequence | |
\ sum - current sum | |
OVER \ sum, second, first -- sum, second, first, second | |
+ \ sum, second, first, second -- sum, second, next(first+second) | |
ROT \ sum, second, next(first+second) -- second, next(first+second), sum | |
OVER \ second, next(first+second), sum -- second, next(first+second), sum, next(first+second) | |
+ \ second, next(first+second), sum, next(first+second) -- second, next(first+second), updatedSum |
package ru.mts.ftb.ftbotpservice.utils | |
import ch.qos.logback.classic.Level | |
import ch.qos.logback.classic.spi.ILoggingEvent | |
import ch.qos.logback.core.read.ListAppender | |
//inspired by https://www.baeldung.com/junit-asserting-logs | |
class MemoryAppender : ListAppender<ILoggingEvent?>() { | |
fun reset() = list.clear() |
public class Toster { | |
static class Zhopa{ | |
void display(){ | |
} | |
} | |
public static void main(String[] args) { |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.nio.charset.Charset; | |
import java.util.Properties; | |
public class Toster { | |
public static void main(String[] args) throws IOException { | |
Properties p = new Properties(); | |
p.load(new InputStreamReader(new FileInputStream("D:\\tmp\\test.properties"), Charset.forName("UTF8"))); |
package com.sts.voms.ui.client.common; | |
public interface Lambda2<T, T1, R> { | |
R execute(T arg0, T1 arg1); | |
} |
package com.sts.voms.ui.client.common; | |
public interface Lambda<T, R> { | |
R execute(T arg); | |
} |