Skip to content

Instantly share code, notes, and snippets.

View iamkingalvarado's full-sized avatar
🏎️
Keep f*cking building

Daniel G. Alvarado iamkingalvarado

🏎️
Keep f*cking building
View GitHub Profile
@iamkingalvarado
iamkingalvarado / Class3.kt
Created February 8, 2023 04:21
Class3.kt
package com.example.thesocialnetwork
fun main2() {
println("Hello world!")
val size = 10 // Int/Integer Aqui esta una constante y almacena valores que no pueden cambiar
println(size)
var temperature = 37.5 // Float Aqui esta una variable y almacena valores que SI pueden cambiar
println(temperature)
@iamkingalvarado
iamkingalvarado / Class2.kt
Created February 3, 2023 07:20
Clase 2 de programación de @iamlordalvarado
package com.example.thesocialnetwork
fun main() {
println("Hello world!")
val size = 10 // Int/Integer Aqui esta una constante y almacena valores que no pueden cambiar
println(size)
var temperature = 37.5 // Float Aqui esta una variable y almacena valores que SI pueden cambiar
println(temperature)
abstract class Animal {
var height: Double = 0.0
var age: Int = 0
var weight: Double = 0.0
var isAlive: Boolean = false
var isLongHair: Boolean? = null
constructor() {
this.isAlive = true
}
anitalavalatina
anitalavalatina
larutanatural
romaamor
a
n
i
suspend fun <T> retry(
times: Int = Int.MAX_VALUE,
initialDelay: Long = 100, // 0.1 second
maxDelay: Long = 1000, // 1 second
factor: Double = 2.0,
block: suspend () -> T?
): T? {
var currentDelay = initialDelay
repeat(times - 1) {
try {
@iamkingalvarado
iamkingalvarado / Test1.java
Created October 4, 2018 17:08
Bluecoding test
import java.util.*;
class Test1 {
public static void main(String[] args) {
System.out.println(test1(new int[] {1,2,4,5,6,8,2,5,3,2}));
test2();
@iamkingalvarado
iamkingalvarado / Example.html
Last active December 23, 2021 08:34 — forked from Danielku15/Example.html
A MediaTypeFormatter for WebApi for multipart/form-data including file uploads
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>File Upload example</title>
<link href="/Content/bootstrap.css" rel="stylesheet" />
</head>
<body>
<form action="api/Upload" method="post">
<div class="form-group">
package io.dflabs.realm.realmkeys;
import android.content.Context;
import android.util.Log;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Enumeration;
import dalvik.system.DexFile;
@IBDesignable final class EMPView: UIView {
@IBInspectable var borderColor:UIColor = UIColor.clear
@IBInspectable var borderWidth:CGFloat = 0.0
@IBInspectable var cornerRadius:CGFloat = 0.0
@IBInspectable var shadowColor:UIColor = UIColor.clear
@IBInspectable var shadowOffset:CGSize = CGSize(width: 0, height: 0)
@IBInspectable var shadowRadius:CGFloat = 0.0
@IBInspectable var shadowOpacity:CGFloat = 0.0