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.google.android.gms.tasks.Task | |
import io.reactivex.Single | |
fun <TResult> Task<TResult>.toSingle(): Single<TResult> = | |
Single.create<TResult> { emitter -> | |
addOnSuccessListener { result -> emitter.onSuccess(result) } | |
addOnFailureListener { error -> emitter.onError(error) } | |
} |
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 android.content.Context | |
import android.support.v7.widget.AppCompatTextView | |
import android.util.AttributeSet | |
import java.text.DecimalFormat | |
import java.util.Currency | |
class PriceTextView(context: Context, attrs: AttributeSet?) : AppCompatTextView(context, attrs) { |
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 4 columns, instead of 6. in line 8.
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
,chinese,English, | |
key1,独家记忆,Memoria exclusiva, | |
key2,im your's,Burbujeante, | |
key3,最后的更新,Swing de la infancia, | |
key4,Never Say Goodbye,Mejorando la vida, | |
key5,帮助,AYUDA, | |
key6,需要达到前一关通过才能解锁下一模式哦,Pasa el nivel actual para desbloquear la siguiente etapa, | |
key7,左,Izquierda, | |
key8,嗨你发现了吗,琴颈上的小灯点已经亮闪闪了\n对应着小手指的颜色,Ahora que el diapason esta encendido, intente sujetarlo con el dedo derecho marcado con diferentes colores. Rasguear lejos!, | |
key9,好棒_你已经正确的弹奏了C和弦/n很简单吧,快来试试下一个_,¡Gran trabajo! Asi es como tocas el acorde de C., |
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
#!/bin/bash | |
gource \ | |
-s .03 \ | |
-1280x720 \ | |
--auto-skip-seconds .1 \ | |
--multi-sampling \ | |
--stop-at-end \ | |
--key \ | |
--highlight-users \ |
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 android.content.Context | |
import android.util.AttributeSet | |
import android.view.View | |
import androidx.coordinatorlayout.widget.CoordinatorLayout | |
import androidx.core.view.ViewCompat | |
import androidx.core.view.isVisible | |
import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton |
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 androidx.paging.PositionalDataSource | |
abstract class RetryableDataSource : PositionalDataSource<String>() { | |
private var retryAction: (() -> Any)? = null | |
override fun loadRange(params: LoadRangeParams, callback: LoadRangeCallback<String>) { | |
try { | |
val result = listOf("Api result data") |
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
{ | |
"info": { | |
"_postman_id": "872a7bd5-c9f6-4b8a-ab70-4276340208f2", | |
"name": "N2YO", | |
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" | |
}, | |
"item": [ | |
{ | |
"name": "Get TLE", | |
"request": { |
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
inline var ViewStubProxy.isVisible: Boolean | |
get() = isInflated && root.isVisible | |
set(value) { | |
if (isInflated) { | |
root.isVisible = value | |
} else { | |
if (value) { | |
viewStub?.inflate() | |
} else { | |
// already invisible |
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 androidx.fragment.app.Fragment | |
import androidx.fragment.app.FragmentActivity | |
import androidx.fragment.app.FragmentManager | |
import androidx.lifecycle.Lifecycle | |
import androidx.recyclerview.widget.AsyncListDiffer | |
import androidx.recyclerview.widget.DiffUtil | |
import androidx.viewpager2.adapter.FragmentStateAdapter |
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
#!/bin/bash | |
# Based on https://riviera.org.uk/2018/10/23/importing-non-gopro-videos-into-gopro-quik/ | |
for i in *.MP4; do ffmpeg -i "$i" -map_metadata -1 -codec copy -metadata:s handler="GoPro AVC encoder" -metadata:s handler_name=" GoPro AVC" "gopro-$i"; done |