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
| package com.example.switch | |
| import androidx.compose.animation.core.Spring | |
| import androidx.compose.animation.core.animateFloatAsState | |
| import androidx.compose.animation.core.spring | |
| import androidx.compose.foundation.Canvas | |
| import androidx.compose.foundation.background | |
| import androidx.compose.foundation.gestures.detectTapGestures | |
| import androidx.compose.foundation.layout.Box | |
| import androidx.compose.foundation.layout.BoxScope |
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
| /* | |
| * Copyright 2025 Kyriakos Georgiopoulos | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
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
| export class Cache<T extends object, K> { | |
| items = new WeakMap<T, K>() | |
| get<P extends T>(item: P, cb: (item: P) => K) { | |
| if (!this.items.has(item)) { | |
| this.items.set(item, cb(item)) | |
| } | |
| return this.items.get(item)! | |
| } |
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 com.google.common.graph.Graphs | |
| import com.google.common.graph.MutableValueGraph | |
| import com.google.common.graph.ValueGraphBuilder | |
| import org.gradle.api.DefaultTask | |
| import org.gradle.api.Project | |
| import org.gradle.api.artifacts.Configuration | |
| import org.gradle.api.artifacts.ProjectDependency | |
| import org.gradle.api.tasks.Input | |
| import org.gradle.api.tasks.TaskAction | |
| import org.gradle.api.tasks.options.Option |
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
| #+TITLE: Don't Build Your Own Lisp | |
| I feel somewhat pressed to give a negative review of this book. This | |
| comes from someone who has worked on various Lisp implementations, and | |
| written some amount of C, but that isn't an excuse to be overly harsh. | |
| This book, however, does not provide many nice things to say, and plenty | |
| of un-nice things. My apologies in advance. | |
| First off: God help you if you are going to write your first interpreter | |
| in C of all things. No one I know thinks it's a good idea to /start/ |
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 android.os.Build.VERSION.SDK_INT | |
| import android.os.Bundle | |
| import android.os.Parcel | |
| import android.util.Base64 | |
| /** | |
| * This class implements a fix for https://issuetracker.google.com/issues/147246567 | |
| * Investigation: https://twitter.com/Piwai/status/1374129312153038849 | |
| * | |
| * Usage: |
To convert animation GIF to MP4 by ffmpeg, use the following command
ffmpeg -i animated.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" video.mp4
movflags – This option optimizes the structure of the MP4 file so the browser can load it as quickly as possible.
pix_fmt – MP4 videos store pixels in different formats. We include this option to specify a specific format which has maximum compatibility across all browsers.
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
| apply from: "../jacoco.gradle" | |
| def debugTree = fileTree(dir: "${buildDir}/intermediates/packaged-classes/flavorUnsigned", includes: includeFileFilter, excludes: excludeFileFilter) | |
| def kotlinDebugTree = fileTree(dir: "${buildDir}/tmp/kotlin-classes/flavorUnsignedDebug", includes: includeFileFilter, excludes: excludeFileFilter) | |
| def mainSrc = "${project.projectDir}/src/main/java" | |
| task jacocoTestReport(type: JacocoReport, dependsOn: ['testFlavorUnsignedDebugUnitTest', 'assembleDebug']) { | |
| reports { | |
| xml.enabled = true |
NewerOlder