Kotlin sample codes.

Overview

Kotlin Samples

Kotlin sample codes.

HTML Builder

html {
  lang = "en"
  head {
    title { +"Kotlin HTML" }
  }
  body {
    p {
      +"This is the first line of paragraph."
      +"This is the second line of paragraph."
    }
    a {
      href = "https://kotlinlang.org/"
      +"Link"
    }
  }
}

State Management

val store = Store(0) { state, action ->
  when (action.type) {
    "increment" -> state + action.payload as Int
    "decrement" -> state + action.payload as Int
    else -> state
  }
}
store.apply(logger())
store.subscribe { println(store.state) }
store.dispatch(Action("increment", 1))
store.dispatch(Action("increment", 2))
store.dispatch(Action("increment", 3))
store.dispatch(Action("decrement", 4))

2D Graphic

Circles

You might also like...
Webclient-kotlin-sample - An example of using the http web client to promote synchronous and asynchronous https calls

Web Client Consumer Kotlin Sample The project is an example of using the http we

This is a sample app to demonstrate the power of using EventSourced models and the ease with which these can be modelled using Kotlin.
This is a sample app to demonstrate the power of using EventSourced models and the ease with which these can be modelled using Kotlin.

Lego 4 Rent This is a sample app to demonstrate the power of using EventSourced models and the ease with which these can be modelled using Kotlin. To

Kotlin multi platform project template and sample app with everything shared except the UI. Built with clean architecture + MVI
Kotlin multi platform project template and sample app with everything shared except the UI. Built with clean architecture + MVI

KMMNewsAPP There are two branches Main News App Main The main branch is a complete template that you can clone and use to build the awesome app that y

❤️ A sample Marvel heroes application based on MVVM (ViewModel, Coroutines, LiveData, Room, Repository, Koin)  architecture.
❤️ A sample Marvel heroes application based on MVVM (ViewModel, Coroutines, LiveData, Room, Repository, Koin) architecture.

MarvelHeroes MarvelHeroes is a demo application based on modern Android application tech-stacks and MVVM architecture. Fetching data from the network

News app sample with Retrof't
News app sample with Retrof't

Android App Sample (ViewModel + LiveData + Kotlin + Retrofit + Dependency Injection (Hilt) + Coroutine) - News App Project Description In this project

Sample demonstrates use of Flow, StateFlow & how we can test Flow

FlowSample This sample demonstrates use of Flow, StateFlow & how we can test Flow. In Kotlin, Coroutine is just the scheduler part of RxJava but now w

sample project that shows you how you can use Ktor to creat a server for real Project.

Ktor-Sample This is a sample project that shows you how you can use Ktor to creat a server for real Project. What is done Save data to database (Get a

Spring Boot Webflux RDBMS Sample App

R2DBC Spring Boot Webflux Sample Project generate schema (DDL script) h2-console (Web based database management console) WebFlux and r2dbc is not supp

Nota FaceSDK Sample For Android

Nota Face SDK for Android 노타의 안드로이드용 안면인식 SDK License 노타에서 제공하는 데모 라이센스는 3개월 시용기간을 제공하고 있다 Features SDK에서 제공되는 기능은 아래와 같다 : 얼굴감지 : 이미지에서 얼굴의 BoundingB

Owner
Sadra Samadi
Full-stack developer.
Sadra Samadi
📚 Sample Android Components Architecture on a modular word focused on the scalability, testability and maintainability written in Kotlin, following best practices using Jetpack.

Android Components Architecture in a Modular Word Android Components Architecture in a Modular Word is a sample project that presents modern, 2020 app

Madalin Valceleanu 2.3k Dec 30, 2022
Shreyas Patil 2.2k Jan 4, 2023
Android sample with kotlin.

KotlinAndroidSample 1. NetWork with Kotlin + OkHttp + RxJava / RxAndroid Request url("https://github.com/wangjiegulu") and update UI: "https://github.

WangJie 28 Oct 3, 2022
🎓 Learning Kotlin Coroutines for Android by example. 🚀 Sample implementations for real-world Android use cases. 🛠 Unit tests included!

Kotlin Coroutines - Use Cases on Android ?? Learning Kotlin Coroutines for Android by example. ?? Sample implementations for real-world Android use ca

Lukas Lechner 2.1k Jan 3, 2023
Sample Social Login Project of Spring Boot and Kotlin

Sample-Spring-Boot-Social-Kotlin Sample Social Login Project of Spring Boot and Kotlin dependencies dependencies { implementation("org.springframewor

Seokhyun 2 Oct 11, 2021
kotlin micronaut sample

Micronaut 3.1.3 Documentation User Guide API Reference Configuration Reference Micronaut Guides Feature data-r2dbc documentation Micronaut Data R2DBC

Hodong 0 Nov 1, 2021
Kotlin Symbol Processing (KSP) sample project

Kotlin Symbol Processing (KSP) Sample Project Sample annotation processor created with Kotlin Symbol Processing (KSP) API. The repository supplements

Pavlo Stavytskyi 33 Dec 23, 2022
Micorservice with event sourcing sample kotlin

micorservice-with-event-sourcing-sample-kotlin Event Sourcing Exercises. Maybe it should work. Project eventsourcing Event Sourcing by Jpa or Cosmos D

nrs 20 Nov 11, 2022
Sample app to demonstrate the integration code and working of Dyte SDK for android, using Kotlin.

Dyte Kotlin Sample App An example app in kotlin using the Dyte Mobile SDK Explore the docs » View Demo · Report Bug · Request Feature Table of Content

Dyte 8 Dec 3, 2021
Cloud Bowl Sample - Kotlin Spring Boot

Cloud Bowl Sample - Kotlin Spring Boot To make changes, edit the src/main/kotlin/hello/KotlinApplication.kt file. Run Locally: ./mvnw spring-boot:run

Lukasz Domzalski 0 Dec 13, 2021