Skip to content

Instantly share code, notes, and snippets.

View dodyg's full-sized avatar

Dody Gunawinata dodyg

View GitHub Profile
@dodyg
dodyg / gist:5823184
Last active March 29, 2024 03:59
Kotlin Programming Language Cheat Sheet Part 1

#Intro

Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3

Kotlin project website is at kotlin.jetbrains.org.

All the codes here can be copied and run on Kotlin online editor.

Let's get started.

@dodyg
dodyg / gist:5616605
Last active November 21, 2022 03:05
Kotlin Programming Language Cheat Sheet Part 2

This is a quick guide to Kotlin programming language. The previous part of this guide is here

#Object Oriented

fun main(args : Array<String>) {
  class local (val x : Int)
  
  val y = local(10)
 println("${y.x}")

Create a console application to manage a recipe

This exercise is designed to measure your competency in C#.

Requirements

A recipe entry has the following details:

  • Title
  • Ingredients
@dodyg
dodyg / gist:5823756
Last active June 11, 2022 08:58
Kotlin Programming Language Cheat Sheet Part 3

#Control Structures

##If statement

Kotlin if statement should look familiar with other language

fun main(args : Array<String>) {
 val total = 10

Keybase proof

I hereby claim:

  • I am dodyg on github.
  • I am dodyg (https://keybase.io/dodyg) on keybase.
  • I have a public key ASDff_JS5X3QFHuMvsBUIlXkmLUxz164Szo1Ulb1PDi6ywo

To claim this, I am signing this object:

Just saw this thread and I had just recommended SUMO to some dude thinking about mining Crytonight w/ his Vega. Posting my reply to him when he asked why he should mine SUMO over Monero:
No legacy of traceable transactions as RingCT w/ minimum ringsize of 12(+1) was implemented since day one. This means that no transaction made on the Sumokoin blockchain can ever be traced back to its participants unlike Monero which implemented RingCT at a later point.
SUMO just implemented sub-addresses which allow you to do your business without every exposing your master wallet address to anyone. It's only been around for a few months and they accomplished implementing this with only FOUR (very talented) devs. Monero only recently implemented sub-addresses themselves with a much much larger dev team. If there's anything that gives me confidence that SUMO is going to be a big thing in the future, it's this. Their dev team may be small but they punch way out of their weight class. Also, there is a premine which will unloc