Skip to content

Instantly share code, notes, and snippets.

View haykgalstyan's full-sized avatar

Hayk Galstyan haykgalstyan

  • Yerevan
View GitHub Profile
@Zhuinden
Zhuinden / FragmentViewBindingDelegate.kt
Last active October 27, 2025 16:26
Fragment view binding delegate
// https://github.com/Zhuinden/fragmentviewbindingdelegate-kt
import android.view.View
import androidx.fragment.app.Fragment
import androidx.lifecycle.DefaultLifecycleObserver
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.Observer
import androidx.viewbinding.ViewBinding
import kotlin.properties.ReadOnlyProperty
@graphicbeacon
graphicbeacon / main.dart
Last active February 28, 2024 20:22
Flutter GestureDetector example - draggable square
import 'package:flutter/material.dart';
void main() => runApp(MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Padding(
// padding: const EdgeInsets.only(top: 20, left: 20, right: 20),
padding: const EdgeInsets.all(0),
child: Page()
)
@remarkablemark
remarkablemark / order-of-growth-classifications.md
Last active July 17, 2023 12:44
Common order-of-growth classifications

Common order-of-growth classifications

order of growth name code example description example T(2N) / T(N)
1 constant a = b + c statement add 3 numbers 1
log N logarithmic while (N > 1)
{ n = N / 2; }
divide in half binary search ~ 1
N linear for (i = 0; i < N; i++)
{ /* ... */ }
loop find the maximum 2
N log N linearithmic