This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{:deps {org.clojure/clojure {:mvn/version "1.10.0"} | |
com.taoensso/nippy {:mvn/version "2.14.0"} | |
org.apache.commons/commons-compress {:mvn/version "1.18"}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.animation.Animator; | |
import android.animation.AnimatorListenerAdapter; | |
import android.animation.ValueAnimator; | |
import android.annotation.TargetApi; | |
import android.graphics.Matrix; | |
import android.graphics.Rect; | |
import android.os.Build; | |
import android.transition.Transition; | |
import android.transition.TransitionValues; | |
import android.view.ViewGroup; |
#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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns mmu | |
(:gen-class) | |
(:use [clojure.contrib duck-streams])) | |
(defn gc [] | |
(dotimes [_ 4] (System/gc))) | |
(defn used-memory [] | |
(let [runtime (Runtime/getRuntime)] | |
(gc) |