Skip to content

Instantly share code, notes, and snippets.

View hcblmnla's full-sized avatar

Daniil Serov hcblmnla

View GitHub Profile
-- 01 Select (1)
select distinct author_id as id
from Views
where author_id = viewer_id
order by id;
-- 02 Basic Joins (4)
select customer_id, count(*) as count_no_trans
@hcblmnla
hcblmnla / Main.kt
Created April 19, 2025 21:32
explicit-formula
import java.math.BigInteger
import java.util.*
import kotlin.math.max
typealias BigInt = BigInteger
val Int.bigInt
get(): BigInt = this.toLong().toBigInteger()
data class Frac(val p: BigInt, val q: BigInt) {
@hcblmnla
hcblmnla / objectExpression.js
Last active April 3, 2025 22:36
The simplify reference
"use strict"
const exprBuilder = (ctor, methods) => {
Object.assign(ctor.prototype, methods)
return ctor
}
const Const = exprBuilder(function (value) {
this.value = value
}, {