Skip to content

Instantly share code, notes, and snippets.

View binaryroot's full-sized avatar

Nazar Ivanchuk binaryroot

View GitHub Profile
@binaryroot
binaryroot / MediumArray.java
Last active October 26, 2019 08:34
Get element
Element_Address = Base_Address + index * Element_Size
@binaryroot
binaryroot / MainActivity.kt
Created September 4, 2018 22:03
How coroutines switch back to the main thread.
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
launch(context = UI) {
val result = async { loadString() }.await()
Log.d("TAG",
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
launch(context = UI) {
val result = async { loadString() }.await()
Log.d("TAG",