Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Sławomir Kustra kustraslawomir

🏠
Working from home
View GitHub Profile
View gist:d92cbca2abdb6bf3c26a38ff0717a973
package com.ultron.ar.presentation.argameplay
import android.Manifest
import android.os.Bundle
import android.view.View
import android.widget.TextView
import com.domain.model.jobdetails.JobDetailsDomain
import com.domain.model.route.Type
import com.domain.usecase.games.SubmitAnswerUseCase
import com.google.ar.core.Config
View gist:734948e95edda3368425d13cceb3dcc9
private fun initializeDetector(modelFile: File, labels: List<String>) {
val detector = TensorObjectDetector.create(
interpreter = Interpreter(modelFile),
labels = labels)
cameraView.addFrameProcessor { frame ->
when (frame.dataClass) {
ByteArray::class.java -> {
val bitmap = BitmapUtils.getBitmapFromFrame(
frame = frame,
View Pato pętle
fun mapDaysWithEvents(events: ArrayList<CalendarEvent>): ArrayList<DayIndicatorItem> {
dayIndicators.forEach { day ->
val filteredEvents = arrayListOf<CalendarEvent>()
events.forEach { event ->
if (eventOccursOnSelectedDay(event, day.date)) {
filteredEvents.add(event)
}
}
day.events = filteredEvents
View db.json
{
"posts": [
{
"id": 1,
"title": "Post 1"
},
{
"id": 2,
"title": "Post 2"
},
View mockLogin.json
{
"id":1,
"name":"Leanne Graham",
"username":"Bret",
"email":"Sincere@april.biz",
"address":{
"street":"Kulas Light",
"suite":"Apt. 556",
"city":"Gwenborough",
"zipcode":"92998-3874",