Skip to content

Instantly share code, notes, and snippets.

View rostopira's full-sized avatar
🍺
🦔

Dmytro Rostopira rostopira

🍺
🦔
View GitHub Profile
import 'dart:collection';
class LazyMap<K, V> extends MapMixin<K, V> {
final _map = Map<K, V>();
final V Function(K) _generator;
LazyMap(this._generator);
@override
V operator [](Object key) {
@rostopira
rostopira / QrView.kt
Last active July 23, 2018 09:29
Simple QRView for Android using ZXING
import android.content.Context
import android.graphics.*
import android.os.Build
import android.view.View
import com.google.zxing.BarcodeFormat
import com.google.zxing.EncodeHintType
import com.google.zxing.qrcode.QRCodeWriter
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel
import java.util.*
package com.kid.gl.utils
import android.util.Log
import com.google.firebase.crash.FirebaseCrash
import com.google.firebase.database.DatabaseError
import gl.kid.alert.BuildConfig
private const val TAG = "FirePig"
class FirePig(message: String): Exception(message) {
NSDictionary *searchBarTextAttributes = @{
NSForegroundColorAttributeName: lightGray,
NSFontAttributeName : [UIFont systemFontOfSize:[UIFont systemFontSize]]
};
[UITextField appearanceWhenContainedInInstancesOfClasses:@[[UISearchBar class]]]
.defaultTextAttributes = searchBarTextAttributes;