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
fun String.toArrayOfIntArray(): Array<IntArray> = split("],[") | |
.map { it.split(",").map { it.filter { it.isDigit() }.toInt() } } | |
.map { it.toIntArray() } | |
.toTypedArray() | |
fun String.toArrayOfCharArray(): Array<CharArray> = split("],[") | |
.map { it.split(",").map { it.filter { it.isLetterOrDigit() }[0] } } | |
.map { it.toCharArray() } | |
.toTypedArray() |
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
package com.github.omarmiatello.composeclub | |
import android.os.Bundle | |
import androidx.activity.ComponentActivity | |
import androidx.activity.compose.setContent | |
import androidx.compose.foundation.clickable | |
import androidx.compose.foundation.layout.* | |
import androidx.compose.foundation.lazy.LazyColumn | |
import androidx.compose.foundation.lazy.items | |
import androidx.compose.material.* |
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
package com.satispay.customer.profile.visionapi | |
import android.graphics.ImageFormat | |
import android.util.SparseArray | |
import com.google.android.gms.vision.Detector | |
import com.google.android.gms.vision.Frame | |
import com.google.android.gms.vision.barcode.Barcode | |
import java.nio.ByteBuffer | |
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
package gdax.notification | |
import gdax.conf.App | |
import gdax.utils.logV | |
import kotlinx.coroutines.experimental.* | |
import java.io.BufferedOutputStream | |
import java.io.BufferedReader | |
import java.io.InputStreamReader | |
import java.net.DatagramPacket | |
import java.net.DatagramSocket |
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 kotlinx.coroutines.experimental.CommonPool | |
import kotlinx.coroutines.experimental.channels.Channel | |
import kotlinx.coroutines.experimental.launch | |
import okhttp3.* | |
import okio.ByteString | |
import kotlin.coroutines.experimental.suspendCoroutine | |
/** | |
* Created by omarmiatello on 17/06/17. | |
*/ |
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
class B(val s:String, var i:Int=0) { | |
fun r(c:Int)=s.substring(i,i+c).apply{i+=length} | |
fun u(c:Char)=s.substring(i,s.indexOf(c,i)).apply{i+=length+1} | |
fun d():Any=when(r(1)[0]){ | |
'e'->Unit;'i'->u('e').toInt() | |
'l'->ArrayList<Any>().apply{var o=d();while(o!=Unit){add(o);o=d()}} | |
'd'->HashMap<String,Any>().apply{var o=d();while(o!=Unit){put(o as String,d());o=d()}} | |
in('0'..'9')->r((s[i-1]+u(':')).toInt()) | |
else->throw IllegalStateException("Char:${s[i-1]}") | |
} |
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
# Instruction: | |
# - git clone https://google.github.io/material-design-icons/ | |
# - Place and run this script inside the material-icons-master folder | |
# | |
# How to use (by example) | |
# python copy-android.py social notifications_none white 24dp ~/AndroidStudioProjects/my-project/app/src/main/res/ | |
# or separate name with ',' multiple images from same group | |
# python copy-android.py social notifications_active,notifications,notifications_none,notifications_off,notifications_paused 24dp ~/AndroidStudioProjects/my-project/app/src/main/res/ | |
# | |
# NOTE: You can search icons in https://www.google.com/design/icons/ |
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
package it.justonetouch.utils | |
import rx.Observable | |
import rx.Subscription | |
import rx.android.schedulers.AndroidSchedulers | |
import rx.schedulers.Schedulers | |
import rx.subscriptions.CompositeSubscription | |
import kotlin.properties.Delegates | |
/** |
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
package com.example.android; | |
import android.app.LoaderManager; | |
import android.content.Context; | |
import android.content.Loader; | |
import android.content.res.TypedArray; | |
import android.database.Cursor; | |
import android.graphics.drawable.Drawable; | |
import android.graphics.drawable.LayerDrawable; | |
import android.graphics.drawable.ShapeDrawable; |
NewerOlder