This file contains hidden or 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
pragma solidity >=0.7.0 <0.9.0; | |
contract loan { | |
address payable lender; | |
address payable borrower; | |
uint totalcents; | |
uint payed; | |
uint interest; | |
This file contains hidden or 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
suspend fun addTen(n: Int): Int { | |
delay(1000) | |
return n + 10 | |
} |
This file contains hidden or 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
public final class MainKt { | |
public static final void main(); | |
public static void main(java.lang.String[]); | |
public static final java.lang.Object addTen(int, kotlin.coroutines.Continuation<? super java.lang.Integer>); | |
} |
This file contains hidden or 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
public static final Object addTen(int n, Continuation continuation) { | |
switch (continuation.label) { | |
case 0: { | |
continuation.n = n; | |
continuation.label = 1; | |
if (delay(1000L, continuation) == COROUTINE_SUSPENDED) | |
return COROUTINE_SUSPENDED; | |
} | |
case 1: { |
This file contains hidden or 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
interface Continuation<in T> { | |
val context: CoroutineContext | |
fun resumeWith(result: Result<T>) | |
} |
This file contains hidden or 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 kotlinx.coroutines.* | |
import kotlin.system.* | |
fun main() = runBlocking { | |
val executionTime = measureTimeMillis { | |
val asyncTask1 = async{addTen(1)} | |
val asyncTask2 = async{addTen(2)} | |
println("task 1: ${asyncTask1.await()}") | |
println("task 2: ${asyncTask2.await()}") | |
} | |
println("execution time: [$executionTime] ms") |
This file contains hidden or 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 kotlin.system.* | |
fun main() { | |
val executionTime = measureTimeMillis { | |
val task1 = addTen(1) | |
val task2 = addTen(2) | |
println("async task 1: ${task1}") | |
println("async task 2: ${task2}") | |
} | |
println("execution time: [$executionTime] ms") | |
} |
This file contains hidden or 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
{ | |
"swagger": "2.0", | |
"info": { | |
"description": "MovilePay Wallet API", | |
"version": "1.0.0", | |
"title": "MovilePay API" | |
}, | |
"host": "internal-abc2a9727492711eab43e028429ac920-2080467542.sa-east-1.elb.amazonaws.com", | |
"basePath": "/v1", | |
"tags": [ |
This file contains hidden or 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
{ | |
"swagger": "2.0", | |
"info": { | |
"description": "Hello, This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", | |
"version": "1.0.0", | |
"title": "Swagger Petstore", | |
"termsOfService": "http://swagger.io/terms/", | |
"contact": { | |
"email": "[email protected]" | |
}, |
This file contains hidden or 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
################################ | |
# Instalação do Docker no Ubuntu | |
################################ | |
# Verificar a versão do sistema | |
lsb_release -a | |
# Obter o script de isntação oficial do Docker | |
curl -fsSL https://get.docker.com -o get-docker.sh | |
NewerOlder