Skip to content

Instantly share code, notes, and snippets.

View h0tk3y's full-sized avatar
🐘

Sergey Igushkin h0tk3y

🐘
View GitHub Profile
Пушистость – крайне полезное качество, особенно если его развить до высокой степени.
Например, если ваша пушистость хотя бы 0.5 Агр., то есть примерно как у вербы, то
окружающие уже захотят потрогать вас, погладить, а то и накормить чем-нибудь
вкусненьким. А если пушистость приближается к одной целой Агриппине, то вы сможете
тыгыдыкать по льду Байкала без штанов, вас будут охотно брать в экспедиции за сокровищами,
а ещё можно получить работу помощника писательницы (потому что вы будете очень милым),
а это уже полпути к известности! Если же у вас не хватает для этого природной пушистости,
то подружитесь с кем-то с хорошей шёрсткой и всюду берите его с собой, так вы сможете
тоже пользоваться преимуществами этого качества.
@h0tk3y
h0tk3y / RemoveKDigits.java
Created February 5, 2025 18:11
Remove k digits - shortened
public static String removeKdigits(String num, int k) {
Deque<Character> resultDeque = new ArrayDeque<>();
resultDeque.add(num.charAt(0));
for (int i = 1; i < num.length(); ++i) {
var nextChar = num.charAt(i);
while (k > 0 && !resultDeque.isEmpty() && resultDeque.peekLast() > nextChar) { //Возвращаемся на символ назад
resultDeque.removeLast();
k--;
}
resultDeque.add(nextChar);
@h0tk3y
h0tk3y / Snow.kt
Created September 16, 2024 13:32
fun main() {
val n = readln().toInt()
val input = readln().split(" ").map { it.toInt() }
val result = solve(input)
if (result == null) {
println("NO")
} else {
println("YES")
println(result.joinToString(" "))
@h0tk3y
h0tk3y / 00-README.md
Last active July 4, 2024 16:00
DCL IDE experiment

Experimenting with DCL support in Android Studio

This set of patches shows some experiments in Android Studio to add features in the DCL support. It is based on the approach of directly converting DCL PSI elements to the DCL language tree and using that as an input to the Gradle analysis implementation. Therefore, it does not need to run the Gradle parser on the source text at all.

@h0tk3y
h0tk3y / 00-README.md
Last active July 2, 2024 10:44
AGP DCL support experimental changes

Experiment using AGP as a DCL model

Changes

Trimmed string navigation problem

You are given a multiline string $source$ – the content of a source file, and two numbers $startLine$ and $endLine$ such that $0 \le startLine \le endLine &lt; nLines$ where $nLines$ is the number of lines in $source$.

Trimming

You need to produce the resulting string $result$ such that:

  • It does not have any content from the $source$ lines whose zero-based line numbers $i &lt; startLine$ or $i &gt; endLine$.
  • It contains the lines at indices $i$ such that $startLine \le i \le endLine$, transformed by trimming the shortest
[Your Name]
[Your Address]
[City, State, Zip]
[Your Email]
[Your Phone Number]
[Date]
Hiring Manager’s Name
Recordati
[Company Address]
@h0tk3y
h0tk3y / restricted-dsl-apis.md
Last active December 1, 2023 14:51
restricted-dsl-apis.md

Supported APIs in settings.gradle.something:

  • Settings:
    • val rootProject: ProjectDescriptor
    • include(projectPath: String) (the vararg overload is not supported)
    • pluginManagement(pluginManagementSpec: PluginManagementSpec.() -> Unit)
      • (+ val pluginManagement)
    • dependencyResolutionManagement(dependencyResolutionConfiguration: DependencyResolutionManagement.() -> Unit)
      • (+ val dependencyResolutionManagement)
    • enableFeaturePreview(name: String)

[Your Name]

Professor and Laboratory Head

Tolyatti State University

[Address]

Tolyatti, Russia

ა - ани [ɑ]
ბ - бани [b]
გ - гани [ɡ]
დ - дони [d]
ე - эни [ɛ]
ვ - вини [v]
ზ - зени [z]
თ - тхани [tʰ]
ი - ини [ɪ]
კ - кани [kʼ]