Skip to content

Instantly share code, notes, and snippets.

View anztrax's full-sized avatar
🏠
Working from home

andrew ananta anztrax

🏠
Working from home
View GitHub Profile
@anztrax
anztrax / EncoderDecoderUtils.tsx
Created July 2, 2024 06:01
Encoder and Decoder Utils
import isEmpty from "lodash/isEmpty";
class EncoderDecoderUtils{
constructor() {
}
encodeBase64(data: string): string{
return Buffer.from(data).toString('base64');
}
import kotlin.properties.ReadWriteProperty
import kotlin.reflect.KProperty
class RangeRegulator(
initialValue: Int,
private val minValue: Int,
private val maxValue: Int,
) : ReadWriteProperty<Any?, Int> {
var fieldValue = initialValue;
class FillInTheBlankQuestion {
val questionText: String = ""
val answer: String = ""
val difficulty: String = ""
}
class TrueOrFalseQuestion {
val questionText: String = ""
val answer: Boolean = false
val difficulty: String = ""