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 xxx | |
import android.content.Context | |
import android.graphics.Bitmap | |
import android.graphics.PixelFormat | |
import android.hardware.display.DisplayManager | |
import android.hardware.display.VirtualDisplay | |
import android.media.ImageReader | |
import android.media.projection.MediaProjection | |
import android.util.Log |
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 main(args: Array<String>) { | |
launch { | |
loadAllFiles() | |
} | |
} | |
fun launch(block: suspend () -> Unit) { | |
block.startCoroutine(object : Continuation<Unit> { | |
override val context: CoroutineContext get() = EmptyCoroutineContext | |
override fun resume(value: Unit) {} |
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 | |
import com.example.mapper.json.JsonObjectMapper | |
import org.springframework.boot.SpringApplication | |
import org.springframework.boot.autoconfigure.SpringBootApplication | |
import org.springframework.boot.web.support.SpringBootServletInitializer | |
import org.springframework.context.annotation.Bean | |
import org.thymeleaf.spring4.SpringTemplateEngine | |
import org.thymeleaf.spring4.templateresolver.SpringResourceTemplateResolver | |
import org.thymeleaf.spring4.view.ThymeleafViewResolver |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
package="xxx"> | |
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | |
... | |
</manifest> |
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
interface Extension | |
// Why is keyword `class` instead of `object`? | |
// Because we can use the `foo` function after importing `FooExtension.foo`. | |
class FooExtension : Extension { | |
fun String.foo(): String = "Foo${this}" | |
} | |
class BarExtension : Extension { | |
fun String.bar(): String = "Bar${this}" |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="xxx"> | |
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/> | |
<application | |
... | |
<service android:name=".FloatingAppService"/> |
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
using UnityEditor; | |
using UnityEngine; | |
using UnityEngine.AddressableAssets; | |
namespace AssetLoader | |
{ | |
[RequireComponent(typeof(AudioSource))] | |
public class AudioSourceLoader : MonoBehaviour | |
{ | |
[SerializeField] private AssetReferenceAudioClip audioClip; |
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.livedata | |
import androidx.lifecycle.LiveData | |
import androidx.lifecycle.MutableLiveData | |
import kotlin.properties.ReadOnlyProperty | |
import kotlin.reflect.KProperty | |
abstract class LiveDataEditor<R> { | |
fun <T> propertyOf() = LiveDataProperty<T>() |
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
@echo off | |
cd %~dp0 | |
setlocal | |
set CMD=adb devices | |
for /f "usebackq tokens=1,2,3*" %%a in (`%CMD%`) do ( | |
if "%%b" == "device" ( | |
set DEVICE_ID=%%a |
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
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
package="xxx"> | |
<application | |
android:name=".MyApplication" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name"> | |
... |
NewerOlder