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 profile.adapter | |
import profile.adapter.RandomSequencer.Companion.fromCharRange | |
import profile.adapter.RandomSequencer.Companion.fromIntRange | |
import profile.adapter.RandomSequencer.Companion.fromLongRange | |
import kotlin.random.Random | |
/** | |
* A Random Sequencer which accomplish : | |
* 1. Generate a sequence of random items within range. |
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 android.graphics.Rect | |
import android.view.View | |
import androidx.annotation.Dimension | |
import androidx.core.text.TextUtilsCompat | |
import androidx.core.view.ViewCompat | |
import androidx.recyclerview.widget.GridLayoutManager | |
import androidx.recyclerview.widget.RecyclerView | |
import li.wafer.nbnhhshandroid.common.extensions.dipToPx | |
import java.util.* | |
import kotlin.math.roundToInt |
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 android.graphics.Rect; | |
import android.view.MotionEvent; | |
import android.view.TouchDelegate; | |
import android.view.View; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class TouchDelegateComposite extends TouchDelegate { |
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
@SuppressLint("RestrictedApi") | |
class App : Application(), CameraXConfig.Provider { | |
override fun getCameraXConfig(): CameraXConfig { | |
val defaultConfig = Camera2Config.defaultConfig() | |
val provider = CameraDeviceSurfaceManager.Provider { context, cameraManager, availableCameraIds -> | |
Camera2DeviceSurfaceManagerModified(context, cameraManager, availableCameraIds) | |
} |
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.InternalCoroutinesApi | |
import kotlinx.coroutines.flow.Flow | |
import kotlinx.coroutines.flow.FlowCollector | |
import kotlinx.coroutines.flow.collect | |
import java.util.concurrent.atomic.AtomicInteger | |
private val defaultKeySelector: (Any?) -> Any? = { it } | |
private val defaultAreEquivalent: (Any?, Any?) -> Boolean = { old, new -> old == new } |
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 requests | |
import csv | |
def main(): | |
response = requests.get('https://database.radioid.net/static/user.csv') | |
with open('user.csv', 'wb') as csv_file: | |
csv_file.write(response.content) | |
with open('user.csv', newline='') as csv_file: | |
csv_reader = csv.reader(csv_file, delimiter=',') |
OlderNewer