Skip to content

Instantly share code, notes, and snippets.

View denistsyplakov's full-sized avatar

Denis Tsyplakov denistsyplakov

View GitHub Profile
my $result = eval {...};
if ($result) {
# deal with error here
}
@denistsyplakov
denistsyplakov / kangoo25.java
Created March 15, 2018 21:09
2018.03.15 Кенгуру математика, задание 25
package com.company;
import java.util.HashMap;
import java.util.Map;
/**
* ДОМ+КЕН=ГУРУ
* ДОМ=256
* Найти чему равны остальные цифры.
*/
@denistsyplakov
denistsyplakov / test.ts
Created April 8, 2018 17:52
Typescript How to create class instance from its reference
class A {
public do(): void {
console.log("do A!");
}
}
class B extends A {
public do() {
console.log("do B!");
}
@denistsyplakov
denistsyplakov / test.java
Created April 25, 2018 20:18
Задача Алисе - перебор чисел.
package ru.yandex.lc.alice2;
public class Test {
public static void main(String[] args) {
int[] pa = new int[] {1, 2, 3,4,5,6,7,8,9};
prmt(pa, 0);
}
private static void prmt(int[] pa, int i) {
unsuccess
-all falls through
-doesn't come off
-doesn't succeed
-it flops
-it turns out badly
-fail to come off
other topic
- work out
@denistsyplakov
denistsyplakov / Main.java
Created April 18, 2019 21:42
Small demo of Condition and ReentrantLock usage
package ru.yandex.lc.proto.condition;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;
import java.util.logging.Logger;
public class Main {
package com.dataart.hzc.scheduling.test;
import com.hazelcast.core.Hazelcast;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.core.HazelcastInstanceAware;
import java.io.Serializable;
import java.util.concurrent.TimeUnit;
import java.util.logging.Logger;
@denistsyplakov
denistsyplakov / solution.py
Created March 5, 2020 13:50
Решение
import raccoon
raccoon.goRight(2)
#add your code here
raccoon.goUp()
while raccoon.look(1, -1) or raccoon.look(1, 0):
raccoon.wait()
raccoon.goRight(3)
@denistsyplakov
denistsyplakov / System Design.md
Created July 5, 2020 14:02 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@denistsyplakov
denistsyplakov / test.html
Created September 22, 2020 09:08
test html hosting
<html>
<body>
test
</body>
</html>