path
stringlengths
4
280
owner
stringlengths
2
39
repo_id
int64
21.1k
879M
is_fork
bool
2 classes
languages_distribution
stringlengths
13
1.95k
content
stringlengths
7
482k
issues
int64
0
13.9k
main_language
stringclasses
121 values
forks
stringlengths
1
5
stars
int64
0
111k
commit_sha
stringlengths
40
40
size
int64
7
482k
name
stringlengths
1
100
license
stringclasses
93 values
game/src/main/kotlin/xlitekt/game/packet/UpdatePrivateChatStatusPacket.kt
runetopic
448,110,155
false
null
package xlitekt.game.packet /** * @author <NAME> */ data class UpdatePrivateChatStatusPacket( val mode: Int, ) : Packet
0
Kotlin
3
8
c896a2957470769a212961ba3e4331f04fc785df
127
xlitekt
MIT License
tabler/src/commonMain/kotlin/com/woowla/compose/icon/collections/tabler/tabler/outline/Sword.kt
walter-juan
868,046,028
false
{"Kotlin": 20416825}
package com.woowla.compose.icon.collections.tabler.tabler.outline import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.PathFillType.Companion.NonZero import androidx.compose.ui.graphics.SolidColor import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.graphics.vector.ImageVector.Builder import androidx.compose.ui.graphics.vector.path import androidx.compose.ui.unit.dp import com.woowla.compose.icon.collections.tabler.tabler.OutlineGroup import androidx.compose.ui.graphics.StrokeCap.Companion.Round as strokeCapRound import androidx.compose.ui.graphics.StrokeJoin.Companion.Round as strokeJoinRound public val OutlineGroup.Sword: ImageVector get() { if (_sword != null) { return _sword!! } _sword = Builder(name = "Sword", defaultWidth = 24.0.dp, defaultHeight = 24.0.dp, viewportWidth = 24.0f, viewportHeight = 24.0f).apply { path(fill = SolidColor(Color(0x00000000)), stroke = SolidColor(Color(0xFF000000)), strokeLineWidth = 2.0f, strokeLineCap = strokeCapRound, strokeLineJoin = strokeJoinRound, strokeLineMiter = 4.0f, pathFillType = NonZero) { moveTo(20.0f, 4.0f) verticalLineToRelative(5.0f) lineToRelative(-9.0f, 7.0f) lineToRelative(-4.0f, 4.0f) lineToRelative(-3.0f, -3.0f) lineToRelative(4.0f, -4.0f) lineToRelative(7.0f, -9.0f) close() } path(fill = SolidColor(Color(0x00000000)), stroke = SolidColor(Color(0xFF000000)), strokeLineWidth = 2.0f, strokeLineCap = strokeCapRound, strokeLineJoin = strokeJoinRound, strokeLineMiter = 4.0f, pathFillType = NonZero) { moveTo(6.5f, 11.5f) lineToRelative(6.0f, 6.0f) } } .build() return _sword!! } private var _sword: ImageVector? = null
0
Kotlin
0
1
b037895588c2f62d069c724abe624b67c0889bf9
2,022
compose-icon-collections
MIT License
components/settings/impl/src/main/java/com/flipperdevices/settings/impl/api/SettingsApiImpl.kt
flipperdevices
288,258,832
false
null
package com.flipperdevices.settings.impl.api import com.flipperdevices.core.di.AppGraph import com.flipperdevices.settings.api.SettingsApi import com.flipperdevices.settings.impl.fragments.SettingsFragment import com.github.terrakok.cicerone.Screen import com.github.terrakok.cicerone.androidx.FragmentScreen import com.squareup.anvil.annotations.ContributesBinding import javax.inject.Inject @ContributesBinding(AppGraph::class) class SettingsApiImpl @Inject constructor() : SettingsApi { override fun getSettingsScreen(): Screen { return FragmentScreen { SettingsFragment() } } }
2
Kotlin
31
293
522f873d6dcf09a8f1907c1636fb0c3a996f5b44
600
Flipper-Android-App
MIT License
subprojects/core/src/main/kotlin/com/handtruth/mc/mcsman/server/session/Argon2PasswordHashStrategy.kt
handtruth
417,843,728
false
null
package com.handtruth.mc.mcsman.server.session import com.handtruth.mc.mcsman.server.module.MCSManConfig import com.handtruth.mc.mcsman.server.util.PasswordHashStrategy import com.kosprov.jargon2.api.Jargon2.* class Argon2PasswordHashStrategy(config: MCSManConfig.PasswordsConfig.Argon2Config) : PasswordHashStrategy { private val hasher: Hasher = jargon2Hasher() .type(config.type) .memoryCost(config.memoryCost) .timeCost(config.timeCost) .parallelism(config.parallelism) .saltLength(config.saltLength) .hashLength(config.hashLength) private val verifier = jargon2Verifier() override fun hash(password: String): String { return toByteArray(password).encoding(Charsets.UTF_8).use { hasher.password(it).encodedHash() } } override fun verify(data: String, password: String): Boolean { return toByteArray(password).encoding(Charsets.UTF_8).use { verifier.hash(data).password(it).verifyEncoded() } } override fun toString(): String = "HashStrategy(argon2)" }
0
Kotlin
0
0
58b2d4bd0413522dbf1cbabc1c8bab78e1b1edfe
1,078
mcsman
Apache License 2.0
app/src/main/java/com/test/bd/kotlin_db/MainActivity.kt
VladDao
149,362,476
false
null
package com.test.bd.kotlin_db import android.os.Bundle import android.support.v7.app.AppCompatActivity import android.support.v7.widget.LinearLayoutManager import android.support.v7.widget.RecyclerView import android.widget.Toast import io.realm.Realm import io.realm.RealmConfiguration import io.realm.RealmList import io.realm.kotlin.where import retrofit2.Call import retrofit2.Callback import retrofit2.Response import java.util.* class MainActivity : AppCompatActivity() { lateinit var RealmContact: RealmList<ContactList> internal var recyclerView: RecyclerView? = null internal var posts: MutableList<ContactList>? = null // Instead of // RealmObject.addChangeListener(contactList, changeListener) // you can do //realm.delete<ContactList>() // realm.where<ContactList>() // .findAllAsyc() //.asFlowable() // contactList.addChangeListener() // internal var postsFriend: List<List<Friend>>? = null override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) Realm.init(this) val config = RealmConfiguration.Builder().name("myrealm.realm").build() Realm.setDefaultConfiguration(config) apiService = Controller.api posts = ArrayList() // postsFriend = ArrayList() val realm = Realm.getDefaultInstance() realm.beginTransaction() val dBPosts = realm .where<ContactList>() .findAll() // .asFlowable() realm.commitTransaction() recyclerView = findViewById(R.id.posts_recycle_view) val layoutManager = LinearLayoutManager(this) recyclerView!!.layoutManager = layoutManager val adapter = RecyclerAdapter(this, dBPosts) recyclerView!!.adapter = adapter apiService!!.friendList.enqueue(object : Callback<List<ContactList>> { override fun onResponse(call: Call<List<ContactList>>, response: Response<List<ContactList>>) { (posts as ArrayList<ContactList>).addAll(response.body()!!) recyclerView!!.adapter.notifyDataSetChanged() val realm = Realm.getDefaultInstance() // opens "myrealm.realm" try { realm.beginTransaction() realm.copyToRealmOrUpdate(this@MainActivity.posts) /* val dogs = realm .where<ContactList>() .findAll() .asFlowable() */ // Log.i("Id", dogs.) realm.commitTransaction() // realm.executeTransaction() } finally { realm.close() } } override fun onFailure(call: Call<List<ContactList>>, t: Throwable) { Toast.makeText(this@MainActivity, "An error occurred during networking", Toast.LENGTH_SHORT).show() } }) /* Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); contactList = new ArrayList<>(); parentView = findViewById(R.id.parentLayout); listView = (ListView) findViewById(R.id.listView); listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { Snackbar.make(parentView, contactList.get(position).getName() + " => " + contactList.get(position).getPhone(), Snackbar.LENGTH_LONG).show(); } }); Toast toast = Toast.makeText(getApplicationContext(), R.string.string_click_to_load, Toast.LENGTH_LONG); toast.setGravity(Gravity.CENTER, 0, 0); toast.show(); FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab); assert fab != null; fab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(@NonNull final View view) { // Checking Internet Connection if (InternetConnection.checkConnection(getApplicationContext())) { final ProgressDialog dialog; //Progress Dialog for User Interaction dialog = new ProgressDialog(MainActivity.this); dialog.setTitle(getString(R.string.string_getting_json_title)); dialog.setMessage(getString(R.string.string_getting_json_message)); dialog.show(); //Creating an object of our api interface ApiService api = RetroClient.getApiService(); //Calling JSON //Call<FriendList> call = api.getFriendList(); Call<List<FriendList>> friend = api.getFriendList(); // Enqueue Callback will be call when get response... friend.enqueue(new Callback<List<FriendList>>() { @Override public void onResponse(Call<List<FriendList>> friend, Response<List<FriendList>> response) { //Dismiss Dialog dialog.dismiss(); if (response.isSuccessful()) { Snackbar.make(parentView, "Done", Snackbar.LENGTH_LONG).show(); contactList = response.body().getFriends(); adapter = new ContactAdapted(MainActivity.this, contactList); listView.setAdapter(adapter); } else { Snackbar.make(parentView, R.string.string_some_thing_wrong, Snackbar.LENGTH_LONG).show(); } } @Override public void onFailure(Call<List<FriendList>> friend, Throwable t) { dialog.dismiss(); } }); } else { Snackbar.make(parentView, R.string.string_internet_connection_not_available, Snackbar.LENGTH_LONG).show(); } } }); */ } companion object { private var apiService: ApiService? = null } }
0
Kotlin
0
0
bb2c86e490c4500379df809ca771782f0be571db
6,527
Kotlin_DB
Apache License 2.0
src/main/kotlin/_2018/Day5.kt
thebrightspark
227,161,060
false
null
package _2018 import aocRun fun main() { aocRun(puzzleInput) { val chars = react(it) return@aocRun chars.size } aocRun(puzzleInput) { return@aocRun "abcdefghijklmnopqrstuvwxyz".toSet().parallelStream().map { char -> val removed = it.replace(char.toString(), "", true) return@map char to react(removed).size }.min(Comparator.comparing<Pair<Char, Int>, Int> { it.second }).get().let { "Char: ${it.first}, Length: ${it.second}" } } } private fun react(input: String): MutableList<Char> { val chars = input.toMutableList() var i = 0 while (i < chars.size - 1) { val c = chars[i] val nextC = chars[i + 1] if (c.equals(nextC, true) && c != nextC) { chars.removeAt(i + 1) chars.removeAt(i) if (i > 0) i -= 1 } else i++ } return chars } private const val puzzleInput = "vVZzWwrEeCcwvoOVsSiCHhDQqdcUuWwsiCctVvTIaAKkSCcIpPYmMgGyfFlLENneEeEeqQVNnpPVvTtHhaQeEHhiIEoOzZaeqQqgaAGdDVSsvjJDdhPpWpLlPwmLlMPzZgGpusSTtQqxXUeEUuMkvVKmLDdnNCpPVaABbOnNobBvhHcaaAAloOIipVvsSRrPiIHmMWIinEFfyBbYYyeiGgjJQqIDdQqNqQSsWwoeEtKkTtnNjEeJxRuUrXjJAaXxjYTtcAaXxCvVyqqfFQgGQmMvVsSsSJBaACMmcbAaGhHgEepPQrRqLlMmpTtyvVYIisSmMwkKJjWGgyYJjrRyDlLBbKdDkYydiHhIgKsetTEEeTtJdCtTlLoORrZyYzfFemMEJjdDyjJYuVvoOxXqQrDdROoFfFfwDdaFfAKZzkBbQnNqyYWXxxXkKvyYVMBbYymgGuUCcOodwqYJjcCyWwQWDgGUrRcpPCZzGutTQqUgXxA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Y>ciIWrRwZfFTOZzxXHMmhMyFfYKVvkDdWwKkbbBBZzJxsSXQjJqjTtCWwGtTgcLwWuUrRYylnOoNcmMCEeuUiIgGUuzuURJjKkrrZzRoOoOJjeTtwjJWEMYycCAayYmmMmMZMcZztFfTAaZYyPpzVvqQjNnwcCWJrRXxDSsdhHlLCtTqQmYyFfYfGgFQqQqeEyXxJCYySAaaAseElAaLnNQqcAajoOmMIimOFfozZwXxiIWMwWmwUhHuwoOWupNnZzeCcEhHPUVvAhHvaAnDSsdDdCchHRrXPpYJYgGyYyjAVvazZyuUxgGdDNKnSsNNnkuFfUMmIIzZgGIVvRrVNnvaAijCFfcFfQqgGgGJIijniIPpNqQIiAaJvVQoOqiiRrWR"
0
Kotlin
0
0
ee6031d155d0fce816b3bf70279bbc4f7ffef024
33,391
AdventOfCode
Creative Commons Zero v1.0 Universal
app/src/main/java/com/orti/shoppingtodo/ItemRepository.kt
Abili
325,955,007
false
null
package com.orti.shoppingtodo import android.content.Context import androidx.lifecycle.LiveData import java.util.concurrent.ExecutorService import java.util.concurrent.Executors /** * Handles data sources and execute on the correct thread. */ class ItemRepository(dao: ItemDao, private val mIoExecutor: ExecutorService) { private val mDao: ItemDao = dao //private val getTea: LiveData<Item> //private val item: Item fun insert(item: Item) { mIoExecutor.execute { mDao.insertItem(item) } } // fun delete(tea: Item?) { // mIoExecutor.execute { mDao.delete(tea) } // } fun getItem(): LiveData<List<Item>> { return mDao.getItems() } companion object { @Volatile private var sInstance: ItemRepository? = null private const val PAGE_SIZE = 20 fun getInstance( context: Context? ): ItemRepository? { if (sInstance == null) { synchronized(ItemRepository::class.java) { if (sInstance == null) { val database: ItemRoomDatabase = ItemRoomDatabase.getDatabase(context!!) sInstance = ItemRepository( database.itemDao(), Executors.newSingleThreadExecutor() ) } } } return sInstance } } init { //val item = Item(null, null, null) //getTea = mDao.getItems(item.itemName!!) } }
0
Kotlin
0
0
99e324e542d7d7ebe3efae15f2a57d10c40b93f0
1,584
Shopping_Todo
Apache License 2.0
idea/testData/intentions/replaceWithOrdinaryAssignment/mutableList.kt
JetBrains
278,369,660
false
null
// IS_APPLICABLE: false // WITH_RUNTIME fun main() { val mutableList = mutableListOf(4, 5, 6, 7, 8) mutableList <caret>+= 9 }
0
Kotlin
30
82
cc81d7505bc3e9ad503d706998ae8026c067e838
133
intellij-kotlin
Apache License 2.0
app/src/main/java/fr/uge/pokedex/components/profile/TopBar.kt
NagaYZ
621,883,292
false
null
package fr.uge.pokedex.components.profile import androidx.compose.foundation.background import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.* import androidx.compose.material.Icon import androidx.compose.material.MaterialTheme import androidx.compose.material.Text import androidx.compose.material.icons.Icons import androidx.compose.material.icons.rounded.ArrowBack import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.unit.dp import androidx.navigation.NavHostController import fr.uge.pokedex.components.navigation.Route import fr.uge.pokedex.data.user.PokedexAppDatabase import fr.uge.pokedex.service.music.MusicButton import kotlinx.coroutines.runBlocking @Composable fun TopBar( navController: NavHostController, currentProfileId: Long, onClick: () -> Unit, audioState: Boolean ) { val context = LocalContext.current val profile = runBlocking { PokedexAppDatabase.getConnection(context).profileDao().getProfile(currentProfileId) } Row( modifier = Modifier .fillMaxWidth() .height(40.dp) .background(color = MaterialTheme.colors.primary), horizontalArrangement = Arrangement.Start, verticalAlignment = Alignment.CenterVertically ) { Column( horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.SpaceEvenly, modifier = Modifier.clickable { navController.navigate(route = Route.Profiles.path) }) { Icon( Icons.Rounded.ArrowBack, "Back to profiles", modifier = Modifier.padding(12.dp), tint = Color.White ) } Column( horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.SpaceEvenly, ) { Text( text = if (profile != null) profile.getProfileName() else "", style = MaterialTheme.typography.button, modifier = Modifier.padding(12.dp), color = Color.White ) } Column( horizontalAlignment = Alignment.End, modifier = Modifier.weight(1f) ) { MusicButton(audioState, onClick) } } }
0
Kotlin
0
0
8361d684922ed2430d753da319dbf2f5b27d0eff
2,538
Pokedex
MIT License
keel-clouddriver/src/main/kotlin/com/netflix/spinnaker/keel/clouddriver/model/Certificate.kt
Tekyantrainc
352,888,129
true
{"Kotlin": 2770258, "Java": 20143, "Shell": 1691, "Slim": 359}
package com.netflix.spinnaker.keel.clouddriver.model data class Certificate(val serverCertificateName: String, val arn: String)
0
null
0
0
dbe1677897a6dbbea4682d11c52dc0ad46818c26
129
keel
Apache License 2.0
app/src/main/kotlin/it/vfsfitvnm/vimusic/ui/screens/album/AlbumScreen.kt
Sagnik0684
861,208,877
false
{"Kotlin": 713513}
package it.vfsfitvnm.vimusic.ui.screens.album import android.content.Intent import androidx.compose.animation.ExperimentalAnimationApi import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Spacer import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.runtime.saveable.rememberSaveableStateHolder import androidx.compose.runtime.setValue import androidx.compose.runtime.snapshotFlow import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.unit.dp import com.valentinilk.shimmer.shimmer import it.vfsfitvnm.compose.persist.PersistMapCleanup import it.vfsfitvnm.compose.persist.persist import it.vfsfitvnm.innertube.Innertube import it.vfsfitvnm.innertube.models.bodies.BrowseBody import it.vfsfitvnm.innertube.requests.albumPage import it.vfsfitvnm.compose.routing.RouteHandler import it.vfsfitvnm.vimusic.Database import it.vfsfitvnm.vimusic.R import it.vfsfitvnm.vimusic.models.Album import it.vfsfitvnm.vimusic.models.SongAlbumMap import it.vfsfitvnm.vimusic.query import it.vfsfitvnm.vimusic.ui.components.themed.Header import it.vfsfitvnm.vimusic.ui.components.themed.HeaderIconButton import it.vfsfitvnm.vimusic.ui.components.themed.HeaderPlaceholder import it.vfsfitvnm.vimusic.ui.components.themed.Scaffold import it.vfsfitvnm.vimusic.ui.components.themed.adaptiveThumbnailContent import it.vfsfitvnm.vimusic.ui.items.AlbumItem import it.vfsfitvnm.vimusic.ui.items.AlbumItemPlaceholder import it.vfsfitvnm.vimusic.ui.screens.albumRoute import it.vfsfitvnm.vimusic.ui.screens.globalRoutes import it.vfsfitvnm.vimusic.ui.screens.searchresult.ItemsPage import it.vfsfitvnm.vimusic.ui.styling.LocalAppearance import it.vfsfitvnm.vimusic.ui.styling.px import it.vfsfitvnm.vimusic.utils.asMediaItem import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.flow.combine import kotlinx.coroutines.withContext @ExperimentalFoundationApi @ExperimentalAnimationApi @Composable fun AlbumScreen(browseId: String) { val saveableStateHolder = rememberSaveableStateHolder() var tabIndex by rememberSaveable { mutableStateOf(0) } var album by persist<Album?>("album/$browseId/album") var albumPage by persist<Innertube.PlaylistOrAlbumPage?>("album/$browseId/albumPage") PersistMapCleanup(tagPrefix = "album/$browseId/") LaunchedEffect(Unit) { Database .album(browseId) .combine(snapshotFlow { tabIndex }) { album, tabIndex -> album to tabIndex } .collect { (currentAlbum, tabIndex) -> album = currentAlbum if (albumPage == null && (currentAlbum?.timestamp == null || tabIndex == 1)) { withContext(Dispatchers.IO) { Innertube.albumPage(BrowseBody(browseId = browseId)) ?.onSuccess { currentAlbumPage -> albumPage = currentAlbumPage Database.clearAlbum(browseId) Database.upsert( Album( id = browseId, title = currentAlbumPage.title, thumbnailUrl = currentAlbumPage.thumbnail?.url, year = currentAlbumPage.year, authorsText = currentAlbumPage.authors ?.joinToString("") { it.name ?: "" }, shareUrl = currentAlbumPage.url, timestamp = System.currentTimeMillis(), bookmarkedAt = album?.bookmarkedAt ), currentAlbumPage .songsPage ?.items ?.map(Innertube.SongItem::asMediaItem) ?.onEach(Database::insert) ?.mapIndexed { position, mediaItem -> SongAlbumMap( songId = mediaItem.mediaId, albumId = browseId, position = position ) } ?: emptyList() ) } } } } } RouteHandler(listenToGlobalEmitter = true) { globalRoutes() host { val headerContent: @Composable (textButton: (@Composable () -> Unit)?) -> Unit = { textButton -> if (album?.timestamp == null) { HeaderPlaceholder( modifier = Modifier .shimmer() ) } else { val (colorPalette) = LocalAppearance.current val context = LocalContext.current Header(title = album?.title ?: "Unknown") { textButton?.invoke() Spacer( modifier = Modifier .weight(1f) ) HeaderIconButton( icon = if (album?.bookmarkedAt == null) { R.drawable.bookmark_outline } else { R.drawable.bookmark }, color = colorPalette.accent, onClick = { val bookmarkedAt = if (album?.bookmarkedAt == null) System.currentTimeMillis() else null query { album ?.copy(bookmarkedAt = bookmarkedAt) ?.let(Database::update) } } ) HeaderIconButton( icon = R.drawable.share_social, color = colorPalette.text, onClick = { album?.shareUrl?.let { url -> val sendIntent = Intent().apply { action = Intent.ACTION_SEND type = "text/plain" putExtra(Intent.EXTRA_TEXT, url) } context.startActivity( Intent.createChooser( sendIntent, null ) ) } } ) } } } val thumbnailContent = adaptiveThumbnailContent(album?.timestamp == null, album?.thumbnailUrl) Scaffold( topIconButtonId = R.drawable.chevron_back, onTopIconButtonClick = pop, tabIndex = tabIndex, onTabChanged = { tabIndex = it }, tabColumnContent = { Item -> Item(0, "Songs", R.drawable.musical_notes) Item(1, "Other versions", R.drawable.disc) } ) { currentTabIndex -> saveableStateHolder.SaveableStateProvider(key = currentTabIndex) { when (currentTabIndex) { 0 -> AlbumSongs( browseId = browseId, headerContent = headerContent, thumbnailContent = thumbnailContent, ) 1 -> { val thumbnailSizeDp = 108.dp val thumbnailSizePx = thumbnailSizeDp.px ItemsPage( tag = "album/$browseId/alternatives", headerContent = headerContent, initialPlaceholderCount = 1, continuationPlaceholderCount = 1, emptyItemsText = "This album doesn't have any alternative version", itemsPageProvider = albumPage?.let { ({ Result.success( Innertube.ItemsPage( items = albumPage?.otherVersions, continuation = null ) ) }) }, itemContent = { album -> AlbumItem( album = album, thumbnailSizePx = thumbnailSizePx, thumbnailSizeDp = thumbnailSizeDp, modifier = Modifier .clickable { albumRoute(album.key) } ) }, itemPlaceholderContent = { AlbumItemPlaceholder(thumbnailSizeDp = thumbnailSizeDp) } ) } } } } } } }
0
Kotlin
0
0
d068ae496559b4f7cc7152e38de3483a12b0b8f0
10,716
BuzzVibe
MIT License
packaging-gradle-plugin/src/main/kotlin/com/hanggrian/packaging/internal/DefaultPackagingExtension.kt
hanggrian
120,912,663
false
{"Kotlin": 36428, "CSS": 1653}
package com.hanggrian.packaging.internal import com.hanggrian.packaging.LinuxOptions import com.hanggrian.packaging.LinuxOptionsImpl import com.hanggrian.packaging.MacOptions import com.hanggrian.packaging.MacOptionsImpl import com.hanggrian.packaging.PackagingExtension import com.hanggrian.packaging.WindowsOptions import com.hanggrian.packaging.WindowsOptionsImpl import org.gradle.api.Action import org.gradle.api.file.DirectoryProperty import org.gradle.api.file.ProjectLayout import org.gradle.api.file.RegularFileProperty import org.gradle.api.model.ObjectFactory import org.gradle.api.provider.ListProperty import org.gradle.api.provider.Property import org.gradle.api.provider.SetProperty import org.gradle.kotlin.dsl.listProperty import org.gradle.kotlin.dsl.property import org.gradle.kotlin.dsl.setProperty import java.io.File public open class DefaultPackagingExtension( private val objects: ObjectFactory, layout: ProjectLayout, ) : PackagingExtension { public var windowsOptions: WindowsOptions? = null public var macOptions: MacOptions? = null public var linuxOptions: LinuxOptions? = null //region Generic Options final override val appVersion: Property<String> = objects.property() final override val copyright: Property<String> = objects.property() final override val appDescription: Property<String> = objects.property() final override val appName: Property<String> = objects.property() final override val outputDirectory: DirectoryProperty = objects .directoryProperty() .convention(layout.buildDirectory.dir("install")) final override val vendor: Property<String> = objects.property() final override val verbose: Property<Boolean> = objects .property<Boolean>() .convention(false) //endregion //region Options for creating the runtime image final override val modules: SetProperty<String> = objects.setProperty() final override val modulePaths: SetProperty<File> = objects.setProperty() final override val bindServices: Property<String> = objects.property() final override val runtimeImage: RegularFileProperty = objects.fileProperty() //endregion //region Options for creating the application image final override val icon: RegularFileProperty = objects.fileProperty() final override val inputDirectory: DirectoryProperty = objects.directoryProperty() //endregion //region Options for creating the application launcher(s) final override val launcher: RegularFileProperty = objects.fileProperty() final override val args: ListProperty<String> = objects.listProperty() final override val javaArgs: ListProperty<String> = objects.listProperty() final override val mainClass: Property<String> = objects.property() final override val mainJar: Property<String> = objects.property() final override val mainModule: Property<String> = objects.property() //endregion //region Options for creating the application package final override val appImage: RegularFileProperty = objects.fileProperty() final override val fileAssociations: RegularFileProperty = objects.fileProperty() final override val installDirectory: DirectoryProperty = objects.directoryProperty() final override val license: RegularFileProperty = objects.fileProperty() final override val resourcesDirectory: DirectoryProperty = objects.directoryProperty() //endregion final override val windows: WindowsOptions get() { if (windowsOptions == null) { windowsOptions = WindowsOptionsImpl(objects, this) } return windowsOptions!! } final override val mac: MacOptions get() { if (macOptions == null) { macOptions = MacOptionsImpl(objects, this) } return macOptions!! } final override val linux: LinuxOptions get() { if (linuxOptions == null) { linuxOptions = LinuxOptionsImpl(objects, this) } return linuxOptions!! } final override fun windows(action: Action<in WindowsOptions>): Unit = action.execute(windows) final override fun mac(action: Action<in MacOptions>): Unit = action.execute(mac) final override fun linux(action: Action<in LinuxOptions>): Unit = action.execute(linux) }
3
Kotlin
1
19
93c4282b504d9668d09acc37ecf0ccbae6d87f22
4,613
packaging-gradle-plugin
Apache License 2.0
app/src/main/java/com/example/arknightsautoclicker/AppController.kt
qwerttyuiiop1
684,537,002
false
{"Kotlin": 142059}
package com.example.arknightsautoclicker import android.content.Context import android.content.Intent import com.example.arknightsautoclicker.andorid.AutoclickService import com.example.arknightsautoclicker.processing.io.Clicker import com.example.arknightsautoclicker.processing.io.RandomClicker import com.example.arknightsautoclicker.processing.tasks.TaskHandler import com.example.arknightsautoclicker.andorid.ui.BubbleController import com.example.arknightsautoclicker.processing.io.Overlay import com.example.arknightsautoclicker.processing.io.Screenshot import com.example.arknightsautoclicker.processing.tasks.Task /** * Links the components of the app */ class AppController ( private val svc: AutoclickService ) { companion object { const val ACTION_BUBBLE = "action_bubble" } private val ctx: Context = svc private lateinit var taskHandler: TaskHandler private var uiController: BubbleController? = null private lateinit var clicker: Clicker private lateinit var screenshot: Screenshot fun onCreate(intent: Intent) { val hasBubble = intent.getBooleanExtra( AutoclickService.EXTRA_HAS_BUBBLE, true) clicker = RandomClicker(svc) screenshot = Screenshot(svc, intent) taskHandler = TaskHandler( screenshot, ctx, clicker, svc.handler ) taskHandler.onTaskChangeListener = { task -> svc.handler.post { uiController?.onTaskSelect(task) } } taskHandler.onCompleteListener = { res -> svc.handler.post { uiController?.alert(res) } } taskHandler if (hasBubble) { uiController = BubbleController(svc).apply { onShowListener = { taskHandler.pause() } onHideListener = { taskHandler.resume() } onConfirmTaskListener = { handleTask(it) } onBindListener = { screenshot.preprocess = Overlay(getOverlaysToHide()[0]) } start() } } } /** * close this app controller */ fun close() { taskHandler.close() uiController?.close() screenshot.close() } fun handleAction(action: String) { when (action) { ACTION_BUBBLE -> uiController?.showView() AutoclickService.ACTION_CLOSE -> svc.handleAction(action) else -> handleTask(Task.valueOf(action)) } } fun handleTask(task: Task) { when (task) { Task.CLOSE -> svc.handleAction(AutoclickService.ACTION_CLOSE) else -> taskHandler.performTask(task) } } }
1
Kotlin
0
1
4c7ca55be02c08d1784bac57b3eff15decd07389
2,730
Arknights-Autoclicker
MIT License
src/main/kotlin/org/digma/intellij/plugin/ui/notifications/AllNotificationsPanel.kt
digma-ai
472,408,329
false
{"Kotlin": 1213163, "Java": 780708, "C#": 114216, "FreeMarker": 15244, "HTML": 12092, "Shell": 5404}
package org.digma.intellij.plugin.ui.notifications import com.intellij.openapi.project.Project import com.intellij.ui.jcef.JBCefApp import com.intellij.util.ui.JBUI import org.digma.intellij.plugin.ui.jcef.JCefComponent import org.digma.intellij.plugin.ui.jcef.JCefComponentBuilder import org.digma.intellij.plugin.ui.list.listBackground import org.digma.intellij.plugin.ui.panels.DisposablePanel import java.awt.BorderLayout import java.awt.Insets import javax.swing.JComponent import javax.swing.JLabel class AllNotificationsPanel(private val project: Project) : DisposablePanel() { private lateinit var jCefComponent: JCefComponent init { layout = BorderLayout() border = JBUI.Borders.empty() background = listBackground() add(createComponent(), BorderLayout.CENTER) } override fun getInsets(): Insets { return JBUI.emptyInsets() } private fun createComponent(): JComponent { return if (JBCefApp.isSupported()) { jCefComponent = JCefComponentBuilder(project) .url(NOTIFICATIONS_URL) .messageRouterHandler(AllNotificationsMessageRouterHandler(project)) .schemeHandlerFactory(NotificationsSchemeHandlerFactory(project, NotificationViewMode.full)) .build() jCefComponent.getComponent() } else { JLabel("JCEF not supported") } } //called by MainToolWindowCardsController.closeAllNotifications when closing the panel override fun dispose() { jCefComponent.dispose() } }
322
Kotlin
6
18
ca856d69733323044ddb0174b7eaf171ff932894
1,593
digma-intellij-plugin
MIT License
src/commonMain/kotlin/containers/enemy/TestEnemy.kt
jmsmith84
476,642,290
false
null
package containers.enemy import com.soywiz.korge.view.Sprite import program.AssetManager import program.LevelManager import program.SoundManager class TestEnemy(assets: AssetManager, soundManager: SoundManager, levelManager: LevelManager) : SpriteEnemy(Sprite(assets.testEnemyBitmap), soundManager, levelManager) { }
0
Kotlin
0
0
3cf2ebbb44e7bc548954d3b0c1e52e23dde114cb
328
korge-boot
MIT License
app/src/main/java/com/example/wishlist/ItemAdapter.kt
alrafimo
538,737,406
false
{"Kotlin": 4675}
package com.example.wishlist import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.TextView import androidx.recyclerview.widget.RecyclerView class ItemAdapter (private val Wish: List<WishListItem>) : RecyclerView.Adapter<ItemAdapter.ViewHolder>(){ // Provide a direct reference to each of the views within a data item // Used to cache the views within the item layout for fast access class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { // TODO: Create member variables for any view that will be set // as you render a row. lateinit var Item: TextView lateinit var Price: TextView lateinit var Store: TextView // We also create a constructor that accepts the entire item row // and does the view lookups to find each sub-view init { // TODO: Store each of the layout's views into // the public final member variables created above Item = itemView.findViewById<TextView>(R.id.textView) Price = itemView.findViewById<TextView>(R.id.textView2) Store = itemView.findViewById<TextView>(R.id.textView3) } } override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { val context = parent.context val inflater = LayoutInflater.from(context) // Inflate the custom layout val contactView = inflater.inflate(R.layout.items, parent, false) // Return a new holder instance return ViewHolder(contactView) } override fun onBindViewHolder(holder: ViewHolder, position: Int) { // Get the data model based on position val need = Wish.get(position) // Set item views based on views and data model holder.Item.text = need.item holder.Price.text = need.price holder.Store.text = need.store } override fun getItemCount(): Int { return Wish.size } }
1
Kotlin
0
0
3ac0b1582ab630ea67c05d7fddb2fd2898ccb34f
2,164
Wishlist
Apache License 2.0
app/src/main/java/com/riezki/floodreportapp/ui/adapter/ListReportAdapter.kt
IkkyKun10
601,246,692
false
null
package com.riezki.floodreportapp.ui.adapter import android.view.LayoutInflater import android.view.ViewGroup import androidx.recyclerview.widget.DiffUtil import androidx.recyclerview.widget.ListAdapter import androidx.recyclerview.widget.RecyclerView import coil.load import com.riezki.floodreportapp.R import com.riezki.floodreportapp.databinding.ItemListReportBinding import com.riezki.floodreportapp.model.CloudDataEntity class ListReportAdapter : ListAdapter<CloudDataEntity, ListReportAdapter.ViewHolder>(DIFF_CALLBACK) { companion object { private val DIFF_CALLBACK = object : DiffUtil.ItemCallback<CloudDataEntity>() { override fun areItemsTheSame(oldItem: CloudDataEntity, newItem: CloudDataEntity): Boolean = oldItem.id == newItem.id && oldItem.loc == newItem.loc && oldItem.image == newItem.image override fun areContentsTheSame(oldItem: CloudDataEntity, newItem: CloudDataEntity): Boolean = oldItem == newItem } } class ViewHolder(private val binding: ItemListReportBinding) : RecyclerView.ViewHolder(binding.root) { fun bind(item: CloudDataEntity) { with(binding) { binding.namaLokasi.text = item.loc binding.imageReportId.load(item.image){ crossfade(true) placeholder(R.drawable.ic_download) } } } } override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { return ViewHolder(ItemListReportBinding.inflate(LayoutInflater.from(parent.context), parent, false)) } override fun onBindViewHolder(holder: ViewHolder, position: Int) { val item = currentList[position] holder.bind(item) } }
0
Kotlin
0
0
9e75b767847cee8d4a8211b12c856d05cb76e103
1,785
FloodReportApp
Apache License 2.0
app/src/main/java/com/cocdetails/ui/screens/landing/LandingPage.kt
iKhan1057
571,087,717
false
null
package com.cocdetails.ui.screens.landing import android.util.Log import androidx.compose.foundation.background import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.* import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items import androidx.compose.foundation.shape.CircleShape import androidx.compose.material3.Divider import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Surface import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.drawBehind import androidx.compose.ui.graphics.Brush import androidx.compose.ui.graphics.Color import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.navigation.NavHostController import com.cocdetails.ui.components.ChangePallateColors import com.cocdetails.ui.navigation.AppScreenName import com.cocdetails.ui.nodels.landing.Landing import com.cocdetails.ui.nodels.landing.LandingParent import com.cocdetails.utils.AssetParser import com.cocdetails.utils.JsonConvertor import com.cocdetails.utils.JsonConvertor.toJson import com.google.gson.Gson @Composable fun LandingPage( navHostController: NavHostController ) { Surface(modifier = Modifier.fillMaxSize()) { Column() {/* val landingdataFromServer = produceState<DataOrException<LandingParent, Boolean, Exception>>( initialValue = DataOrException( loading = true ) ) { value = landingViewModel.getLandingDataFromServer() }.value if (landingdataFromServer.loading == true) { CircularProgressIndicator() } else { if (landingdataFromServer.data == null) { Text( text = "Some Error Occured", modifier = Modifier.fillMaxSize(), fontWeight = FontWeight.ExtraBold, color = Color.Red ) } else { ShowContent(navHostController, landingdataFromServer.data!!) } } */ val context = LocalContext.current val jsonLanding = AssetParser.loadJSONFromAssets(context, "", "landing") Log.d("LANDING", jsonLanding) val landindData = Gson().fromJson(jsonLanding, LandingParent::class.java) ShowContent(navHostController, landindData.landing) } } } @Composable fun ShowContent(navHostController: NavHostController, data: List<Landing>) { ChangePallateColors(color = Color(0xFFE4410E)) LazyColumn( modifier = Modifier .fillMaxSize() .background( brush = Brush.radialGradient( colors = listOf( MaterialTheme.colorScheme.background, Color(0xFFE4410E) ) ) ), verticalArrangement = Arrangement.Center ) { items(items = data) { landing -> Column( modifier = Modifier .fillMaxSize(), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center ) { Column( modifier = Modifier .padding(20.dp) .background(color = Color(0xFFE4410E), shape = CircleShape) .clickable { navHostController.navigate(AppScreenName.COMPLETEDIRECTORYSCREEN.name + "/${landing.toJson()}") } ) { Text( text = landing.name.uppercase(), modifier = Modifier .padding(start = 45.dp, top = 20.dp, end = 45.dp, bottom = 20.dp), color = MaterialTheme.colorScheme.background, fontWeight = FontWeight.ExtraBold ) } } } } }
0
Kotlin
0
0
761228f09ea423a1745e556330c4c2b34fe0af38
4,368
cocinfo
Apache License 2.0
app/src/main/java/lucky/online/matka/app/ui/main/fragments/wallut/WalletFragment.kt
navdeepmeenaraj
563,979,652
false
{"Kotlin": 349451}
package lucky.online.matka.app.ui.main.fragments.wallut import android.content.Context import android.content.Intent import android.net.Uri import android.os.Bundle import lucky.online.matka.app.utils.Constants.PREFS_TELEGRAM import androidx.fragment.app.Fragment import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.navigation.NavController import androidx.navigation.Navigation import com.pixplicity.easyprefs.library.Prefs import dagger.hilt.android.AndroidEntryPoint import lucky.online.matka.app.R import lucky.online.matka.app.databinding.FragmentWalletNewBinding import lucky.online.matka.app.ui.main.view.PActivity @AndroidEntryPoint class WalletFragment : Fragment() { private lateinit var binding: FragmentWalletNewBinding private lateinit var mContext: Context private lateinit var navController: NavController override fun onAttach(context: Context) { super.onAttach(context) mContext = context } override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? ): View { binding = FragmentWalletNewBinding.inflate(inflater, container, false) return binding.root } override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) navController = Navigation.findNavController(view) setOnClick() } private fun setOnClick() { binding.buttoAddPoints.setOnClickListener { startActivity(Intent(mContext, PActivity::class.java)) } binding.buttonTelegram.setOnClickListener { val intent = Intent(Intent.ACTION_VIEW) intent.data = Uri.parse(Prefs.getString(PREFS_TELEGRAM, "")) startActivity(intent) } binding.textPoints.text = Prefs.getInt("Balance",0).toString() + " Pts" binding.buttonWithdrPoints.setOnClickListener { navController.navigate(R.id.withdrawFragment) } binding.buttonPhonepe.setOnClickListener { navController.navigate(R.id.phonepayFragment) } binding.buttonGpay.setOnClickListener { navController.navigate(R.id.gpayFragment) } binding.buttonPaytm.setOnClickListener { navController.navigate(R.id.paytmFragment) } } }
0
Kotlin
0
0
770766d4f97480824d5d6303c511ba3a84af583a
2,415
LuckyMatka
Apache License 2.0
projects/club/src/fanpoll/club/club/routes/ClubRoutes.kt
csieflyman
359,559,498
false
{"Kotlin": 785294, "JavaScript": 17435, "HTML": 6167, "PLpgSQL": 5563, "Dockerfile": 126}
/* * Copyright (c) 2024. fanpoll All rights reserved. */ package fanpoll.club.club.routes import fanpoll.club.ClubAuth import fanpoll.club.ClubConst import fanpoll.club.ClubKoinContext import fanpoll.club.club.dtos.ClubDTO import fanpoll.club.club.dtos.CreateClubForm import fanpoll.club.club.dtos.UpdateClubForm import fanpoll.club.club.services.ClubService import fanpoll.club.database.exposed.ClubDatabase import fanpoll.club.user.dtos.UserDTO import fanpoll.infra.auth.authorize import fanpoll.infra.base.location.StringEntityIdLocation import fanpoll.infra.base.response.respond import fanpoll.infra.database.exposed.util.queryDB import fanpoll.infra.openapi.route.dynamicQuery import fanpoll.infra.openapi.route.post import fanpoll.infra.openapi.route.put import fanpoll.infra.session.UserSession import io.ktor.http.HttpStatusCode import io.ktor.server.application.call import io.ktor.server.response.respond import io.ktor.server.routing.Routing import io.ktor.server.routing.route import io.ktor.server.sessions.get import io.ktor.server.sessions.sessions import org.jetbrains.exposed.sql.Database import org.koin.core.qualifier.named fun Routing.clubRoutes() { val clubService = ClubKoinContext.koin.get<ClubService>() val clubDatabase = ClubKoinContext.koin.get<Database>(named(ClubDatabase.Club.name)) route("${ClubConst.urlRootPath}/clubs") { authorize(ClubAuth.Admin) { post<CreateClubForm, Unit>(ClubOpenApi.CreateClub) { form -> form.creatorId = call.sessions.get<UserSession>()!!.userId clubService.createClub(form) call.respond(HttpStatusCode.OK) } } authorize(ClubAuth.User) { put<StringEntityIdLocation, UpdateClubForm, Unit>(ClubOpenApi.UpdateClub) { _, form -> form.currentUser = call.sessions.get<UserSession>()!! clubService.updateClub(form) call.respond(HttpStatusCode.OK) } dynamicQuery<UserDTO>(ClubOpenApi.FindClubs) { dynamicQuery -> call.respond(dynamicQuery.queryDB<ClubDTO>(clubDatabase)) } } } }
1
Kotlin
9
74
1a7d54115dbc42c6a02230f527d9ad56862b4a0b
2,172
multi-projects-architecture-with-Ktor
MIT License
kingmc-platform-common/src/main/kotlin/kingmc/platform/audience/particle/Particle.kt
Kingsthere
599,960,106
false
null
package kingmc.platform.audience.particle import kingmc.util.builder.Buildable /** * Represent an in-game particle that could send to a [ParticleRecipient] * and display on players client * * @author kingsthere * @since 0.0.3 * @param TData the type of extra data for this particle */ data class Particle<TData : Any>( /** * The type of this particle */ val type: ParticleType<TData>, /** * The value of extra data for this particle */ val data: TData ) : Buildable<Particle<TData>, Particle.Builder<TData>> { override fun toBuilder(): Builder<TData> = Builder(type, data) /** * A builder to build `Particle` instances */ class Builder<TData : Any>( val type: ParticleType<TData>, var data: TData? = null ) : Buildable.Builder<Particle<TData>> { fun data(data: TData): Builder<TData> { this.data = data return this } override fun build(): Particle<TData> { require(data != null) { "Particle data can't be null" } return Particle(type, data!!) } } }
0
Kotlin
0
1
9a010ff50677c7effbb941320108d2f25b2a154d
1,124
kingmc-platform
MIT License
src/main/kotlin/br/com/fabiofiorita/restapi/service/UsuarioService.kt
FabioFiorita
626,425,405
false
null
package br.com.fabiofiorita.restapi.service import br.com.fabiofiorita.restapi.exception.NotFoundException import br.com.fabiofiorita.restapi.model.Usuario import br.com.fabiofiorita.restapi.repository.UsuarioRepository import org.springframework.data.repository.findByIdOrNull import org.springframework.security.core.userdetails.UserDetails import org.springframework.security.core.userdetails.UserDetailsService import org.springframework.stereotype.Service @Service class UsuarioService(private val repository: UsuarioRepository, private val notFoundMessage: String = "Usuario não encontrado!"): UserDetailsService { fun buscarPorId(id: Long): Usuario { return repository.findByIdOrNull(id) ?: throw NotFoundException(notFoundMessage) } override fun loadUserByUsername(username: String?): UserDetails { val usuario = repository.findByEmail(username) ?: throw NotFoundException(notFoundMessage) return UserDetail(usuario = usuario) } }
0
Kotlin
0
0
78a9c395cf1614164640e5c9e7d08042a3b2347a
982
Kotlin-REST-API
MIT License
composeApp/src/commonMain/kotlin/domain/model/CurrencyType.kt
vengateshm
818,708,913
false
{"Kotlin": 238460, "Swift": 1506, "HTML": 353, "CSS": 102}
package apps.currency_converter_udemy.domain.model sealed class CurrencyType(val code: CurrencyCode) { data class Source(val currencyCode: CurrencyCode) : CurrencyType(currencyCode) data class Target(val currencyCode: CurrencyCode) : CurrencyType(currencyCode) data object None : CurrencyType(CurrencyCode.USD) }
0
Kotlin
0
0
941b8439a2b9ab330bf12833c0f8c83c8e53fc19
325
currencyconverter-kmp
Apache License 2.0
archive/src/main/kotlin/com/grappenmaker/aoc/year19/Day22.kt
770grappenmaker
434,645,245
false
{"Kotlin": 403844}
package com.grappenmaker.aoc.year19 import com.grappenmaker.aoc.PuzzleSet import com.grappenmaker.aoc.rotateInPlace import com.grappenmaker.aoc.splitInts fun PuzzleSet.day22() = puzzle(day = 22) { var deck = (0..10006).toMutableList() inputLines.forEach { l -> when { l == "deal into new stack" -> deck.reverse() l.startsWith("cut") -> deck.rotateInPlace(-l.split(" ")[1].toInt()) l.startsWith("deal") -> { val add = l.splitInts().last() val result = MutableList(deck.size) { -1 } var curr = 0 deck.forEach { result[curr.also { curr = (curr + add) % result.size }] = it } deck = result } } } partOne = deck.indexOf(2019).s() // This function has this name for a good reason... i could definitely not figure this out on my own // I do understand the underlying concepts, but I would never have come up with this // This is one of the few puzzles I did not solve myself, like at all // I suspected that this had to do with modular arithmetic, but the mathematical modeling... fun solveThisRidiculousDumpTruckOfAPuzzle(): String { var step = 1.toBigInteger() var idx = 0.toBigInteger() val modulus = 119315717514047.toBigInteger() val steps = 101741582076661.toBigInteger() inputLines.forEach { l -> when { l == "deal into new stack" -> { idx = (idx - step).mod(modulus) step = -step.mod(modulus) } l.startsWith("cut") -> idx = (idx + step * l.split(" ")[1].toBigInteger()).mod(modulus) l.startsWith("deal") -> { step = (step * l.splitInts().single().toBigInteger().modInverse(modulus)).mod(modulus) } } } val singleStep = step val one = 1.toBigInteger() step = step.modPow(steps, modulus) idx = (idx * (one - step) * (one - singleStep).modPow(modulus.dec().dec(), modulus)).mod(modulus) return (idx + step * 2020.toBigInteger()).mod(modulus).s() } partTwo = solveThisRidiculousDumpTruckOfAPuzzle() }
0
Kotlin
0
7
e037dbf7c8d477549a0c81259891337a6f34cb53
2,246
advent-of-code
The Unlicense
multilanguage/src/main/kotlin/furhatos/app/multilanguage/flow/main/greeting.kt
FurhatRobotics
418,899,332
false
{"Kotlin": 120881, "Python": 13628, "JavaScript": 5293, "HTML": 4541, "CSS": 2334}
package furhatos.app.multilanguage.flow.main import furhatos.app.multilanguage.flow.Parent import furhatos.app.multilanguage.flow.log import furhatos.app.multilanguage.util.sayInLocalLang import furhatos.flow.kotlin.State import furhatos.flow.kotlin.furhat import furhatos.flow.kotlin.onResponse import furhatos.flow.kotlin.state import furhatos.flow.kotlin.voice.PollyNeuralVoice import furhatos.util.Language var greeting = "hello" val Greeting: State = state(Parent) { onEntry { furhat.voice = PollyNeuralVoice.Matthew() furhat.setInputLanguage( Language.ENGLISH_US, Language.SWEDISH, Language.GERMAN, Language.ARABIC ) // Set up to four input languages for to the robot to listen in simultaneously delay(200) furhat.say("Hello, how are you doing today?") furhat.listen(12000) } onResponse { log.debug(it.text) log.debug(it.alternatives) log.debug(it.language) log.debug(it.language.code) furhat.setInputLanguage(it.language) // Setting the input language to the language spoken by the user. when (it.language) { // Set the voice to match the input language. Language.ENGLISH_US -> furhat.voice = PollyNeuralVoice.Matthew() else -> furhat.setVoice(language = it.language) } furhat.sayInLocalLang("So you want to speak English") goto(FavAnimal) } }
1
Kotlin
12
4
70aa5af3ca6f1d4a1e81f01db9d86444aa838043
1,463
tutorials
MIT License
flutter_item_stack_view/android/app/src/main/kotlin/com/example/flutter_item_stack_view/MainActivity.kt
irahulcse
263,720,346
false
{"Dart": 30212, "HTML": 1152, "Swift": 808, "Kotlin": 280, "Shell": 92, "Objective-C": 76}
package com.example.flutter_item_stack_view import io.flutter.embedding.android.FlutterActivity class MainActivity: FlutterActivity() { }
0
Dart
0
1
f832a070fcd28713df80be01b2a5bd945263b01f
140
Flutter-Widgets
The Unlicense
snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/media/entity/MediaAdBreakType.kt
snowplow
20,056,757
false
{"Kotlin": 1227237, "Java": 38410, "Shell": 78}
/* * Copyright (c) 2015-2023 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. * * Unless required by applicable law or agreed to in writing, * software distributed under the Apache License Version 2.0 is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ package com.snowplowanalytics.snowplow.media.entity /** * Type of ads within the break. */ enum class MediaAdBreakType { /// Take full control of the video for a period of time Linear, /// Run concurrently to the video NonLinear, /// Accompany the video but placed outside the player Companion; override fun toString(): String { return when (this) { Linear -> "linear" NonLinear -> "nonlinear" Companion -> "companion" } } }
16
Kotlin
62
102
c6ad42b49faf979f3f8c13cc8b91304c423872bd
1,219
snowplow-android-tracker
Apache License 2.0
server/src/main/kotlin/io/tuzzy/portal/api/HalLink.kt
maxtuzz
225,085,025
false
{"TypeScript": 118399, "Kotlin": 59202, "HTML": 1815, "CSS": 358, "Dockerfile": 207}
package io.tuzzy.portal.api class HalLink(val href: String = "")
22
TypeScript
0
2
60da9d67452bf040d8659a7e4cfb6e237602dc5b
65
tuzhub
Apache License 2.0
src/main/kotlin/com/github/jozott00/wokwiintellij/toolWindow/WokwiSimulationToolWindow.kt
Jozott00
737,328,628
false
{"Kotlin": 113010, "HTML": 2436}
package com.github.jozott00.wokwiintellij.toolWindow import com.intellij.openapi.ui.DialogPanel import java.awt.BorderLayout import javax.swing.JComponent import javax.swing.JPanel class WokwiSimulationToolWindow(private val configPanel: DialogPanel) : JPanel() { init { this.layout = BorderLayout() this.add(configPanel) } fun showSimulation(simulator: JComponent) { this.removeAll() this.add(simulator) this.repaint() } fun showConfig() { this.removeAll() this.add(configPanel) this.repaint() } }
1
Kotlin
0
3
686bdac9fb73268f1ebc1e0353f7ad87025c9c6d
596
wokwi-intellij
MIT License
livingdoc-engine/src/test/kotlin/org/livingdoc/engine/execution/examples/scenarios/ScenarioExecutorTest.kt
Drakojin
91,075,858
true
{"Kotlin": 320459, "Java": 48232, "HTML": 1293}
package org.livingdoc.engine.execution.examples.scenarios import io.mockk.every import io.mockk.verify import io.mockk.verifySequence import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Nested import org.junit.jupiter.api.Test import org.livingdoc.engine.execution.Result import org.livingdoc.engine.execution.Result.* import org.livingdoc.engine.execution.examples.scenarios.model.ScenarioResult import org.livingdoc.repositories.model.scenario.Scenario import org.livingdoc.repositories.model.scenario.Step internal class ScenarioExecutorTest { val cut = ScenarioExecutor() @Test fun `executes a complete scenario`() { val step1 = Step("when the customer scans a banana for 49 cents") val step2 = Step("and an apple for 39 cents") val step3 = Step("when the customer checks out, the total sum is 88") val steps = listOf(step1, step2, step3) val scenarioResult = cut.execute(Scenario(steps), SelfCheckoutScenarioFixture::class.java, null) assertThat(scenarioResult.result).isEqualTo(Executed) assertThat(scenarioResult.steps).hasSize(3) scenarioResult.steps.forEach { step -> assertThat(step.result).isEqualTo(Executed) } } @Test fun `executes scenarios following the expected lifecycle`() { val steps = listOf(Step("step1"), Step("step2")) val resultScenario = cut.execute(Scenario(steps), LifeCycleFixture::class.java, null) assertThat(resultScenario.result).isEqualTo(Executed) val fixture = LifeCycleFixture.callback verifySequence { fixture.before() fixture.step1() fixture.step2() fixture.after() } } @Test fun `multiple steps matching different templates can be mapped to the same method`() { val steps = listOf( Step("step2"), Step("Alternate template for step2") ) cut.execute(Scenario(steps), LifeCycleFixture::class.java, null) val fixture = LifeCycleFixture.callback verify(exactly = 2) { fixture.step2() } } @Nested inner class `when executing steps with parameters` { val fixture = ExtendedLifeCycleFixture.callback!! @Test fun `parameter values are passed as method parameters with the same name`() { // requires compilation with "-parameters" (Java8) // Reminder: To configure this in Intellij IDEA, go to "Settings" > "Build, Execution, Deployment" > // "Compiler" > "Java Compiler" and add "-parameters" to "Additional command line parameters", // then clean and rebuild the project. execute(Step("Step with parameter: wonderful")) verify { fixture.parameterizedStep("wonderful") } } @Test fun `parameter values are passed to methods based on explicit name bindings`() { execute(Step("Step with parameter passed by explicit name bindings: explicit")) verify { fixture.parameterizedStepWithBinding("explicit") } } @Test fun `a mismatching parameter results in "Exception"`() { val result = execute(Step("Step with mismatching parameter: Oh noes!")).result assertThat(result).isInstanceOf(Exception::class.java) } } @Nested inner class `when an assertion fails during execution of a scenario step` { val fixture = ExtendedLifeCycleFixture.callback!! @Test fun `the result of the scenario is Executed`() { every { fixture.step1() } throws AssertionError() val result = execute(Step("step1"), Step("step2")).result assertThat(result).isInstanceOf(Executed::class.java) } @Test fun `the result of the step is Failed`() { every { fixture.step1() } throws AssertionError() val stepResult = execute(Step("step1"), Step("step2")).steps[0].result assertThat(stepResult).isInstanceOf(Failed::class.java) } @Test fun `the following steps are Skipped`() { every { fixture.step1() } throws AssertionError() val stepResult = execute(Step("step1"), Step("step2")).steps[1].result assertThat(stepResult).isInstanceOf(Skipped::class.java) } @Test fun `the teardown commands are executed`() { every { fixture.step1() } throws AssertionError() execute() verify { fixture.after1() fixture.after2() } } } @Nested inner class `when an exception is thrown` { val fixture = ExtendedLifeCycleFixture.callback!! @Nested inner class duringasetupcommandBefore { @Test fun `the result is Exception`() { every { fixture.before1() } throws IllegalStateException() val result = execute(Step("step1"), Step("step2")).result assertThat(result).isInstanceOf(Exception::class.java) } @Test fun `the following setup commands are not invoked`() { every { fixture.before1() } throws IllegalStateException() execute(Step("step1"), Step("step2")) verify(exactly = 0) { fixture.before2() } } @Test fun `no scenario steps are executed`() { every { fixture.before1() } throws IllegalStateException() execute(Step("step1"), Step("step2")) verify(exactly = 0) { fixture.step1() fixture.step2() } } @Test fun `the results of all steps are Skipped`() { every { fixture.before1() } throws IllegalStateException() val result = execute(Step("step1"), Step("step2")) assertThat(result.steps[0].result).isEqualTo(Skipped) assertThat(result.steps[1].result).isEqualTo(Skipped) } @Test fun `teardown commands, however, are invoked`() { every { fixture.before1() } throws IllegalStateException() execute(Step("step1"), Step("step2")) verify { fixture.after1() fixture.after2() } } } @Nested inner class `during execution of a step` { @Test fun `the result of the scenario is Executed`() { every { fixture.step1() } throws IllegalStateException() val result = execute(Step("step1"), Step("step2")).result assertThat(result).isInstanceOf(Executed::class.java) } @Test fun `the result of the step is Exception`() { every { fixture.step1() } throws IllegalStateException() val stepResult = execute(Step("step1"), Step("step2")).steps[0].result assertThat(stepResult).isInstanceOf(Exception::class.java) } @Test fun `the following steps are Skipped`() { every { fixture.step1() } throws IllegalStateException() val stepResult = execute(Step("step1"), Step("step2")).steps[1].result assertThat(stepResult).isInstanceOf(Skipped::class.java) } @Test fun `the teardown commands are executed`() { every { fixture.step1() } throws IllegalStateException() execute() verify { fixture.after1() fixture.after2() } } } @Nested inner class duringateardowncommandAfter { @Test fun `the result of the scenario is Exception`() { every { fixture.after1() } throws IllegalStateException() val result = execute().result assertThat(result).isInstanceOf(Exception::class.java) } @Test fun `all exceptions are collected and attached to the Exception result`() { val exception1 = IllegalStateException() val exception2 = IllegalStateException() every { fixture.after1() } throws exception1 every { fixture.after2() } throws exception2 val result = execute().result as Result.Exception assertThat(result.exception).isInstanceOf(ScenarioExecution.AfterMethodExecutionException::class.java) assertThat(result.exception.suppressed).containsExactlyInAnyOrder(exception1, exception2) } @Test fun `subsequent teardown commands are executed`() { every { fixture.after1() } throws IllegalStateException() execute() verify { fixture.after2() } } } } @BeforeEach fun reset() { LifeCycleFixture.reset() ExtendedLifeCycleFixture.reset() } private fun execute(vararg steps: Step): ScenarioResult { val scenario = Scenario(steps.asList()) return cut.execute(scenario, ExtendedLifeCycleFixture::class.java, null) } }
0
Kotlin
0
0
b81fe455a24ea8cd4b46083d443178039fffb2e3
9,501
livingdoc2
Apache License 2.0
io/json/src/main/kotlin/io/bluetape4k/json/jackson/uuid/JsonUuidEncoderAnnotationInterospector.kt
debop
625,161,599
false
{"Kotlin": 7504333, "HTML": 502995, "Java": 2273, "JavaScript": 1351, "Shell": 1301, "CSS": 444, "Dockerfile": 121, "Mustache": 82}
package io.bluetape4k.json.jackson.uuid import com.fasterxml.jackson.databind.deser.std.UUIDDeserializer import com.fasterxml.jackson.databind.introspect.Annotated import com.fasterxml.jackson.databind.introspect.AnnotatedMethod import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector import com.fasterxml.jackson.databind.ser.std.UUIDSerializer import io.bluetape4k.logging.KLogging import java.util.* class JsonUuidEncoderAnnotationInterospector: JacksonAnnotationIntrospector() { companion object: KLogging() { private val ANNOTATION_TYPE: Class<JsonUuidEncoder> = JsonUuidEncoder::class.java } override fun findSerializer(annotatedMethod: Annotated): Any? { val annotation = _findAnnotation(annotatedMethod, ANNOTATION_TYPE) if (annotatedMethod.rawType == UUID::class.java) { return annotation?.let { when (it.value) { JsonUuidEncoderType.BASE62 -> JsonUuidBase62Serializer::class.java JsonUuidEncoderType.PLAIN -> UUIDSerializer::class.java } } ?: UUIDSerializer::class.java } return null } override fun findDeserializer(annotatedMethod: Annotated): Any? { val annotation = _findAnnotation(annotatedMethod, ANNOTATION_TYPE) if (rawDeserializationType(annotatedMethod) == UUID::class.java) { return annotation?.let { when (it.value) { JsonUuidEncoderType.BASE62 -> JsonUuidBase62Deserializer::class.java JsonUuidEncoderType.PLAIN -> UUIDDeserializer::class.java } } ?: UUIDDeserializer::class.java } return null } private fun rawDeserializationType(ann: Annotated): Class<*> { if (ann is AnnotatedMethod && ann.parameterCount == 1) { return ann.getRawParameterType(0) } return ann.rawType } }
0
Kotlin
0
1
ce3da5b6bddadd29271303840d334b71db7766d2
1,961
bluetape4k
MIT License
app/src/main/java/com/vr/app/sh/ui/books/view/ReadPDF.kt
Vadim-Rudak
510,027,925
false
{"Kotlin": 257696}
package com.vr.app.sh.ui.books.view import android.graphics.pdf.PdfRenderer import android.os.Bundle import android.os.ParcelFileDescriptor import android.widget.ImageButton import android.widget.TextView import androidx.appcompat.app.AppCompatActivity import androidx.viewpager.widget.ViewPager import com.google.android.material.tabs.TabLayout import com.vr.app.sh.R import com.vr.app.sh.ui.books.adapter.ReadPDFadapter import java.io.File class ReadPDF : AppCompatActivity() { var pdfRenderer: PdfRenderer? = null var fileDescriptor: ParcelFileDescriptor? = null override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_read_pdf) val path = intent.getStringExtra("path").toString() val file = File(path) fileDescriptor = ParcelFileDescriptor.open(file,ParcelFileDescriptor.MODE_READ_ONLY) pdfRenderer = PdfRenderer(fileDescriptor!!) val btnBack = findViewById<ImageButton>(R.id.btn_back) btnBack.setOnClickListener { finish() } val viewTitle = findViewById<TextView>(R.id.viewTitle) viewTitle.text = file.nameWithoutExtension val viewPager = findViewById<ViewPager>(R.id.pager_questions) viewPager.adapter = ReadPDFadapter(supportFragmentManager,pdfRenderer!!.pageCount,pdfRenderer!!) val tabLayout = findViewById<TabLayout>(R.id.tabs_open_pdf) tabLayout.setupWithViewPager(viewPager) } override fun onDestroy() { super.onDestroy() pdfRenderer?.close() fileDescriptor?.close() } }
0
Kotlin
0
0
8a3e4f80636a19187cf053f4a9e58301f1b135ef
1,635
SH
Apache License 2.0
app/src/main/java/com/shicheeng/hacg/PreviewActivity.kt
zhuyufu233
525,263,047
false
{"Kotlin": 60824, "Java": 350}
package com.shicheeng.hacg import android.annotation.SuppressLint import android.content.Context import android.content.Intent import android.graphics.Bitmap import android.graphics.drawable.Drawable import android.net.Uri import android.os.Bundle import android.text.method.LinkMovementMethod import android.view.View import android.view.ViewGroup import androidx.activity.viewModels import androidx.appcompat.app.AppCompatActivity import androidx.core.content.ContextCompat import androidx.core.view.* import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView import com.bumptech.glide.Glide import com.bumptech.glide.request.target.CustomTarget import com.bumptech.glide.request.transition.Transition import com.google.android.material.snackbar.Snackbar import com.shicheeng.hacg.adapter.CommentAdapter import com.shicheeng.hacg.common.magnet import com.shicheeng.hacg.data.CodeError import com.shicheeng.hacg.databinding.ActivityPreviewBinding import com.shicheeng.hacg.fm.CommentDialogFragment import com.shicheeng.hacg.fm.MagnetListDialogFragment import com.shicheeng.hacg.util.CommentSerializable import com.shicheeng.hacg.vm.CommentDialogViewModel import com.shicheeng.hacg.vm.PreViewModel import me.wcy.htmltext.HtmlImageLoader import me.wcy.htmltext.HtmlText import me.wcy.htmltext.OnTagClickListener class PreviewActivity : AppCompatActivity() { private lateinit var binding: ActivityPreviewBinding private val viewModel: PreViewModel by viewModels() private val viewModelOnComment: CommentDialogViewModel by viewModels() @SuppressLint("SetJavaScriptEnabled") override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) binding = ActivityPreviewBinding.inflate(layoutInflater) val view = binding.root WindowCompat.setDecorFitsSystemWindows(window, false) setContentView(view) val url: String = intent.getStringExtra("NEXT_URL")!! viewModel.onLoadHtmlData(url) viewModelOnComment.onLoadComment(url) viewModel.htmlTitle.observe(this) { binding.previewContextInclude.previewWebTitle.text = it } viewModel.htmlData.observe(this) { val text = binding.previewContextInclude.previewWebView text.movementMethod = LinkMovementMethod.getInstance() HtmlText.from(it).setImageLoader(object : HtmlImageLoader { override fun loadImage(url: String?, call: HtmlImageLoader.Callback?) { Glide.with(this@PreviewActivity).asBitmap().load(url) .into(object : CustomTarget<Bitmap>() { override fun onResourceReady( resource: Bitmap, transition: Transition<in Bitmap>?, ) { call!!.onLoadComplete(resource) } override fun onLoadCleared(placeholder: Drawable?) { call!!.onLoadFailed() } }) } override fun getDefaultDrawable(): Drawable { return ContextCompat.getDrawable(this@PreviewActivity, R.drawable.ic_loading_image)!! } override fun getErrorDrawable(): Drawable { return ContextCompat.getDrawable(this@PreviewActivity, R.drawable.ic_loading_error)!! } override fun getMaxWidth(): Int = text.width override fun fitWidth(): Boolean = true }).setOnTagClickListener(object : OnTagClickListener { override fun onImageClick( p1: Context, list: MutableList<String>?, positon: Int, ) { val intent = Intent(this@PreviewActivity, ImageActivity::class.java) intent.putExtra("IMAGE_URL", list!![positon]) startActivity(intent) } override fun onLinkClick(p0: Context?, p1: String?) { val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url)) startActivity(intent) } }).into(text) binding.previewFab.setOnClickListener { _ -> val list = it.magnet().toList() val arrayList = ArrayList<String>() list.forEach { s -> arrayList.add(s) } val magnetListDialogFragment = MagnetListDialogFragment.newInstance(arrayList) magnetListDialogFragment.show(supportFragmentManager, MagnetListDialogFragment.TAG) } } viewModel.htmlTime.observe(this) { binding.previewContextInclude.previewWebTime.text = it } viewModel.htmlError.observe(this) { when (it) { CodeError.SOMETHING_ERROR.ordinal -> { Snackbar.make(view, "出现了某些问题", Snackbar.LENGTH_INDEFINITE).show() } CodeError.TIME_OUT.ordinal -> { Snackbar.make(view, "超时", Snackbar.LENGTH_INDEFINITE).show() } } } viewModelOnComment.loadComment.observe(this) { val theAdapter = CommentAdapter(it) val recycler = binding.previewCommentInclude.previewCommentRecycler val layout = LinearLayoutManager(this, RecyclerView.VERTICAL, false) recycler.apply { adapter = theAdapter layoutManager = layout isNestedScrollingEnabled = false } theAdapter.setOnItemClickListener { positon -> val commentSerializable = CommentSerializable() commentSerializable.elements = it[positon].comments CommentDialogFragment.newInstance(commentSerializable) .show(supportFragmentManager, CommentDialogFragment.TAG) } } viewModelOnComment.tipText.observe(this) { binding.previewCommentInclude.previewCommentIsNo.apply { if (it.equals("无评论")) { visibility = View.GONE text = it } } } binding.previewToolBar.setNavigationOnClickListener { finish() } ViewCompat.setOnApplyWindowInsetsListener(view) { v: View, windowInsetsCompat: WindowInsetsCompat -> val insets = windowInsetsCompat.getInsets(WindowInsetsCompat.Type.systemBars()) v.updateLayoutParams<ViewGroup.MarginLayoutParams> { leftMargin = insets.left rightMargin = insets.right } binding.previewAppbarLayout.updatePadding(top = insets.top) binding.previewCommentInclude.root.updatePadding(bottom = insets.bottom) WindowInsetsCompat.CONSUMED } viewModel.showBar.observe(this) { binding.previewContextInclude.previewProgressIndicator.visibility = if (it) { View.VISIBLE } else { View.GONE } } viewModelOnComment.indicator.observe(this) { binding.previewCommentInclude.previewCommentIndication.visibility = if (it) { View.VISIBLE } else { View.GONE } } } }
0
null
0
0
8152072bb37e438bcde84918e1b5663dbb7caa22
7,678
HACG
MIT License
15-dagger-and-modularization/projects/starter/Busso/plugins/engine/src/main/java/com/raywenderlich/android/plugins/engine/di/InformationPluginEngineModule.kt
aasmc
417,089,569
true
{"Kotlin": 6085897, "Shell": 1914}
package com.raywenderlich.android.plugins.engine.di import com.raywenderlich.android.di.scopes.ApplicationScope import com.raywenderlich.android.plugins.api.ComplexInfoKey import com.raywenderlich.android.plugins.api.InformationPluginRegistry import com.raywenderlich.android.plugins.api.InformationPluginSpec import com.raywenderlich.android.plugins.engine.impl.InformationPluginRegistryImpl import com.raywenderlich.android.plugins.engine.ui.InformationPluginPresenter import com.raywenderlich.android.plugins.engine.ui.InformationPluginPresenterImpl import com.raywenderlich.android.plugins.engine.ui.InformationPluginViewBinder import com.raywenderlich.android.plugins.engine.ui.InformationPluginViewBinderImpl import dagger.Binds import dagger.Module import dagger.Provides import retrofit2.Retrofit @Module object InformationPluginEngineModule { @Provides @ApplicationScope fun provideInformationPluginRegistry( retrofit: Retrofit, informationPlugins: @JvmSuppressWildcards Map<ComplexInfoKey, InformationPluginSpec> ): InformationPluginRegistry = InformationPluginRegistryImpl(retrofit, informationPlugins) @Module interface FragmentBindings { @Binds fun bindInformationPluginPresenter( impl: InformationPluginPresenterImpl ): InformationPluginPresenter @Binds fun bindInformationPluginViewBinder( impl: InformationPluginViewBinderImpl ): InformationPluginViewBinder } }
0
Kotlin
0
0
38ceb2272bcd83288d190ad2e7046acfd0166fef
1,506
dag-materials
Apache License 2.0
src/main/kotlin/dev/nathanpb/dogo/utils/Holder.kt
DogoBot
131,007,802
false
null
package dev.nathanpb.dogo.utils /* Copyright 2019 Nathan Bombana 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 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /** * Simple container to hold Objects of the type [T]. * * @author NathanPB * @since 3.1.0 */ class Holder<T> { /** * The container. */ private var hold: Any? = null /** * Get the contained value. * @return the contained value. */ fun hold() = hold as T /** * Holds the value [t]. * * @param[t] the value to hold. */ fun hold(t: T) { hold = t } }
0
Kotlin
0
2
f62ae4640cf86bc85c76b06a244b78befaa360b8
1,029
Dogo
Apache License 2.0
app/src/main/java/in/junkielabs/parking/tools/timer/Stopwatch.kt
JunkieLabs
361,432,908
false
null
package `in`.junkielabs.parking.tools.timer import android.os.CountDownTimer /** * Created by niraj on 03-01-2020. */ class Stopwatch(millisInFuture: Long, countDownInterval: Long) : CountDownTimer(millisInFuture, countDownInterval) { override fun onTick(millisUntilFinished: Long) { callback?.onTick(millisUntilFinished); } override fun onFinish() { try { callback?.timerExpired(); }catch (e: Exception){ e.printStackTrace() // Crashlytics.logException(e) } } private var callback : StopwatchCallback?= null; fun setCallback(callback: StopwatchCallback?) { this.callback = callback } interface StopwatchCallback { fun timerExpired(); fun onTick(millisUntilFinished: Long); } }
0
Kotlin
4
7
e5e8c3f09560b0d27efe08c9744d43ddb1db41fe
817
junkie-parking-android-app
MIT License
app/src/main/java/com/banuba/sdk/agorapluginexample/widget/carousel/HorizontalMarginItemDecoration.kt
Banuba
386,239,254
false
null
package com.banuba.sdk.agorapluginexample.widget.carousel import android.graphics.Rect import android.view.View import androidx.annotation.Px import androidx.recyclerview.widget.RecyclerView class HorizontalMarginItemDecoration( @Px betweenSpace: Int, @Px private val topMargin: Int, @Px private val bottomMargin: Int ) : RecyclerView.ItemDecoration() { private val halfBetweenSpace = betweenSpace / 2 override fun getItemOffsets( outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State ) { with(outRect) { top = topMargin bottom = bottomMargin left = halfBetweenSpace right = halfBetweenSpace } } }
3
Kotlin
2
5
f97375380acdd59b305893bf3662c906965928d5
746
agora-plugin-filters-android
MIT License
process-app/src/main/kotlin/com/alfresco/content/process/ui/utils/ActionsReadOnlyField.kt
Alfresco
201,430,708
false
{"Kotlin": 1271418, "JavaScript": 17131, "CSS": 15164, "HTML": 1854, "Shell": 735}
package com.alfresco.content.process.ui.utils import android.content.Context import android.os.Bundle import androidx.navigation.NavController import com.airbnb.mvrx.Mavericks import com.alfresco.content.component.ComponentBuilder import com.alfresco.content.component.ComponentData import com.alfresco.content.component.ComponentType import com.alfresco.content.data.payloads.FieldType import com.alfresco.content.data.payloads.FieldsData import com.alfresco.content.data.payloads.UploadData import com.alfresco.content.process.R import com.alfresco.content.process.ui.fragments.FormViewState fun actionsReadOnlyField( isTapped: Boolean, field: FieldsData, navController: NavController, state: FormViewState, context: Context, ) { when (field.params?.field?.type?.lowercase()) { FieldType.UPLOAD.value() -> { if (isTapped && field.value is List<*> && (field.value as List<*>).isNotEmpty()) { val bundle = Bundle().apply { putParcelable( Mavericks.KEY_ARG, UploadData( field = field, process = state.parent, ), ) } navController.navigate( R.id.action_nav_process_form_to_nav_attach_files, bundle, ) } } FieldType.TEXT.value(), FieldType.MULTI_LINE_TEXT.value() -> { ComponentBuilder( context, ComponentData( name = field.name, query = "", value = field.value as? String ?: "", selector = ComponentType.VIEW_TEXT.value, ), ) .onApply { name, query, _ -> } .onReset { name, query, _ -> } .onCancel { } .show() } } }
3
Kotlin
7
4
0f3472ed2b8559a0d6ede93fed6845d6a7f8e2b9
2,037
alfresco-mobile-workspace-android
Apache License 2.0
src/main/java/de/ddkfm/hcloud/models/Exceptions.kt
DDKFM
121,857,095
false
null
package de.ddkfm.hcloud.models import com.mashape.unirest.http.HttpMethod import com.mashape.unirest.http.HttpResponse import com.mashape.unirest.http.JsonNode import com.mashape.unirest.request.GetRequest import org.json.JSONObject /** * Created by maxsc on 18.02.2018. */ class HCloudException( val code : String, override val message : String, val details : JSONObject ) : Exception() { } //fun GetRequest.asJSON
0
Kotlin
0
6
a53303007416879793ccdabf8069ed5c31bdb719
433
hcloud-kotlin
MIT License
kotlinx-coroutines-core/js/src/internal/ThreadSafeHeap.kt
kazemihabib
202,566,280
true
{"Kotlin": 2520441, "Java": 30547, "CSS": 8215, "Shell": 3332, "JavaScript": 2529, "Prolog": 1975, "Ruby": 1932, "HTML": 1675, "IDL": 801, "QMake": 173}
/* * Copyright 2016-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ package kotlinx.coroutines.internal @Suppress("NOTHING_TO_INLINE") internal actual inline fun <T> clear(a: Array<T?>) { for (i in a.indices) a[i] = null }
0
Kotlin
0
0
0d7f3fbef9b5ccb4972bcd6b974c487581431fcd
270
kotlinx.coroutines
Apache License 2.0
app/src/main/java/com/example/swiftbargain/ui/order_details/view_model/OrderDetailsEvents.kt
ahmedfikry24
814,676,783
false
{"Kotlin": 481653}
package com.example.swiftbargain.ui.order_details.view_model sealed interface OrderDetailsEvents { data object NavigateToBack : OrderDetailsEvents data object UnAuthorizedAccess : OrderDetailsEvents data class NavigateToProductDetails(val id: String) : OrderDetailsEvents }
0
Kotlin
0
0
bcf6af56ecf14d638b44a78908a0f0c7b41c69df
287
SwiftBargain
MIT License
app/src/main/java/com/github/theapache64/swipesearch/ui/screen/search/FlipCards.kt
yash-k9
466,834,266
true
{"Kotlin": 58131}
package com.github.theapache64.swipesearch.ui.screen.search import androidx.compose.foundation.Image import androidx.compose.foundation.background import androidx.compose.foundation.layout.* import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.MaterialTheme import androidx.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.text.SpanStyle import androidx.compose.ui.text.buildAnnotatedString import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.text.withStyle import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import coil.compose.rememberImagePainter import coil.transform.CircleCropTransformation import com.github.theapache64.swipesearch.data.remote.Item import com.github.theapache64.swipesearch.ui.composable.twyper.SwipedOutDirection import com.github.theapache64.swipesearch.ui.composable.twyper.flip.TwyperFlip import com.github.theapache64.swipesearch.ui.composable.twyper.flip.TwyperFlipController @Composable fun FlipCards( items: List<Item>, onItemSwipedOut: (Item, SwipedOutDirection) -> Unit, onEndReached: () -> Unit, twyperFlipController: TwyperFlipController, boxModifier: () -> Modifier ) { TwyperFlip( items = items, twyperFlipController = twyperFlipController, onItemRemoved = onItemSwipedOut, onEmpty = onEndReached, cardModifier = boxModifier, front = { item -> Card(item) }, back = {item -> ReverseCard(item) } ) } @Composable fun ReverseCard(item: Item) { Box(modifier = Modifier.fillMaxSize()){ Column( modifier = Modifier .align(Alignment.Center) .padding(10.dp), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center ){ Text( text = "Description", style = MaterialTheme.typography.h4 ) Spacer( modifier = Modifier.height(10.dp) ) Text( text = item.description ?: "No Description Available", textAlign = TextAlign.Center, style = MaterialTheme.typography.body1, overflow = TextOverflow.Ellipsis ) } } } @Composable private fun Card(item: Item) { Column( modifier = Modifier.fillMaxSize() ) { Box( modifier = Modifier .fillMaxWidth() .weight(1f) ) { // Repo name Text( text = item.name, fontSize = 50.sp, textAlign = TextAlign.Center, modifier = Modifier.align(Alignment.Center) ) // Stars Text( text = buildAnnotatedString { withStyle(style = SpanStyle(fontSize = 18.sp)) { append(text = "⭐️\n") } withStyle(style = SpanStyle(fontSize = 13.sp)) { append(text = "${item.stargazersCount}") } }, textAlign = TextAlign.Center, modifier = Modifier .padding(10.dp) .align(Alignment.TopEnd) .background( color = Color.Black.copy(alpha = 0.5f), shape = RoundedCornerShape(10.dp) ) .padding(10.dp) ) } Row( horizontalArrangement = Arrangement.spacedBy(10.dp), modifier = Modifier .fillMaxWidth() .background(Color.Black.copy(alpha = 0.8f)) .padding(10.dp) ) { Image( painter = rememberImagePainter( data = item.owner.avatarUrl, builder = { transformations(CircleCropTransformation()) } ), contentDescription = null, modifier = Modifier.size(50.dp), ) Column { Text(text = item.owner.login, fontSize = 18.sp) Text( text = item.description ?: "---", maxLines = 2, fontSize = 12.sp, overflow = TextOverflow.Ellipsis, color = Color.White.copy(alpha = 0.8f) ) } } } }
0
Kotlin
0
0
b186ddd24ece9a6518e781f424da578ed76cc77e
4,788
swipe-search
Apache License 2.0
app/src/main/java/com/ambient/stories/data/entities/UserData.kt
sidhu18
268,223,376
false
null
package com.ambient.stories.data.entities import androidx.room.ColumnInfo import androidx.room.Entity import androidx.room.PrimaryKey @Entity(tableName = "user_table") data class UserData( @PrimaryKey @ColumnInfo(name = "user_id") var userId : Long = 0L, @ColumnInfo(name = "user_name") var userName : String = "", @ColumnInfo(name = "user_bio") var userBio : String = "", @ColumnInfo(name = "post_count") var postCount : Int = -1, @ColumnInfo(name = "followers_count") var followersCount : Int = -1, @ColumnInfo(name = "following_count") var following_count : Int = -1, @ColumnInfo(name = "profile_image") var profileImageUri :String = "" // @ColumnInfo(name = "join_date") // var joinDate : Long = System.currentTimeMillis() ) fun List<UserData>.asDomainModel() : List<UserData>{ return map { UserData( userId = it.userId, userName = it.userName, userBio = it.userBio, postCount = it.postCount, followersCount = it.followersCount, following_count = it.following_count, profileImageUri = it.profileImageUri // joinDate = it.joinDate ) } }
0
Kotlin
0
3
f03c355a7f4ba42b0848393776eae718049a9dec
1,227
Stories
Apache License 2.0
hw/Assignment05/src/main/kotlin/Main.kt
redhotchili0909
748,037,735
false
{"Kotlin": 87517}
import kotlin.random.Random import NeedlemanWunsch.Companion.needlemanWunsch fun main() { /** * Generates a square matrix of a given size filled with random integers in the range [0, 10). * * @param size The size of the matrix * @return A [Matrix] instance of the specified size, filled with random integers. */ fun generateRandomMatrix(size: Int): Matrix { val matrix = Matrix(size) for (i in 0 until size) { for (j in 0 until size) { matrix.set(i, j, Random.nextInt(0, 10)) } } return matrix } /** * Performs a limit test to compare the performance of traditional matrix multiplication * and Strassen's matrix multiplication algorithm. */ fun limitTest() { var size = 2 val maxSize = 1024 while (size <= maxSize) { val matrixA = generateRandomMatrix(size) val matrixB = generateRandomMatrix(size) val traditionalStartTime = System.nanoTime() matrixA.just_multiply(matrixB) val traditionalEndTime = System.nanoTime() val strassenStartTime = System.nanoTime() matrixA.strassenMultiply(matrixB) val strassenEndTime = System.nanoTime() val traditionalDuration = traditionalEndTime - traditionalStartTime val strassenDuration = strassenEndTime - strassenStartTime println("Size: $size, Traditional: $traditionalDuration, Strassen: $strassenDuration") if (strassenDuration < traditionalDuration) { println("Strassen wins at size: $size") break } size *= 2 // Increment size (e.g., 2, 4, 8, 16...), adjust as needed for your test range } } /** * Code was running too long for me to actually verify at what size Strassen would be faster :( */ limitTest() /** * Same here. Couldn't verify with the sample sequences, because the code ran too long :( */ val targetGenome = "GGATCCGACAGGGAAAATCGTTGAGCGTGTTGTGATAAAAAAGATCGCGACTATGGCGATGCTTTCGTAATGCATTCATGGGATCC" val testAgainst = "TGGCCACCACGATAGCAGAATTTTTTCGCGATAATGGAAAGCGCATTGCC" val (alignment1, alignment2) = needlemanWunsch(targetGenome,testAgainst) println("Alignment:") println(alignment1) println(alignment2) }
0
Kotlin
0
0
224886df44bb2719190c1f4b05016ae15030ec43
2,399
dsa_2024
MIT License
libraries/libcrypto3/api/src/nativeMain/kotlin/ossl.kt
whyoleg
603,041,596
false
{"Kotlin": 192727, "C": 15066, "Makefile": 521}
@file:Suppress( "PrivatePropertyName", "FunctionName", "ClassName", "SpellCheckingInspection", "ACTUAL_TYPE_ALIAS_NOT_TO_CLASS", ) package dev.whyoleg.ffi.libcrypto3 import dev.whyoleg.ffi.c.* actual typealias OSSL_LIB_CTX = dev.whyoleg.ffi.libcrypto3.cinterop.OSSL_LIB_CTX actual object OSSL_LIB_CTX_Type : COpaqueType<OSSL_LIB_CTX>()
2
Kotlin
2
65
c3bc926fd2756d6ca0afd1edc0f21c5fce7e3676
348
ffi-kotlin
Apache License 2.0
examples/db-scheduler-ktor-example/src/main/kotlin/JacksonConfiguration.kt
osoykan
829,021,723
false
{"Kotlin": 58001}
import com.fasterxml.jackson.databind.* import com.fasterxml.jackson.databind.json.JsonMapper import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule import com.fasterxml.jackson.module.kotlin.registerKotlinModule object JacksonConfiguration { val default: ObjectMapper = JsonMapper.builder() .apply { configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false) } .build() .registerKotlinModule() .registerModule(JavaTimeModule()) .findAndRegisterModules() }
2
Kotlin
0
1
97840a66253d753f93bffa77eec0eb29331098bc
501
db-scheduler-additions
Apache License 2.0
mbmobilesdk/src/main/java/com/daimler/mbmobilesdk/biometric/iv/BaseAppPreferencesIvProvider.kt
rafalzawadzki
208,997,288
true
{"Kotlin": 1297852, "Groovy": 4489}
package com.daimler.mbmobilesdk.biometric.iv import android.content.SharedPreferences import android.util.Base64 internal abstract class BaseAppPreferencesIvProvider : IvProvider { protected abstract fun getIvFromPreferences(key: String, def: String): String protected abstract fun putIvToPreferences(key: String, value: String) protected abstract fun getPreferencesForDeletion(): List<SharedPreferences> override fun getIvForAlias(alias: String, tag: String): ByteArray? { val raw = getIvFromPreferences(key(alias, tag), "") return if (raw.isBlank()) null else Base64.decode(raw, Base64.NO_WRAP) } override fun saveIvForAlias(alias: String, tag: String, iv: ByteArray) { val raw = Base64.encodeToString(iv, Base64.NO_WRAP) putIvToPreferences(key(alias, tag), raw) } override fun deleteIvForAlias(alias: String) { getPreferencesForDeletion().forEach { prefs -> val editor = prefs.edit() prefs.all.filter { it.key.contains(alias) }.forEach { editor.remove(it.key) } editor.apply() } } private fun key(alias: String, tag: String) = "$alias:$tag.key" }
0
null
0
0
1a924f70fbde5d731cdfde275e724e6343ee6ebe
1,238
MBSDK-Mobile-Android
MIT License
app/src/main/java/com/github/libliboom/epubviewer/ui/bookshelf/BookshelfViewModel.kt
libliboom
258,487,396
false
null
package com.github.libliboom.epubviewer.ui.bookshelf import android.content.Context import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import com.github.libliboom.common.io.FileUtils import com.github.libliboom.epubviewer.presentation.bookshelf.BookshelfPresenter import com.github.libliboom.epubviewer.presentation.bookshelf.BookshelfStore.Action import com.github.libliboom.epubviewer.util.dev.EPubFileStub import com.github.libliboom.epubviewer.util.file.StorageManager import kotlinx.coroutines.launch import java.io.File import java.io.FileOutputStream import java.io.InputStream import java.io.OutputStream // TODO: 2020/05/13 Fetch data form local database class BookshelfViewModel : ViewModel() { private val presenter by lazy { BookshelfPresenter() } var ePubFiles = listOf<String>() val coverPaths = listOf( EPubFileStub.ASSET_EXTRACTED_COVER_FILE_PATH_01, EPubFileStub.ASSET_EXTRACTED_COVER_FILE_PATH_02, EPubFileStub.ASSET_EXTRACTED_COVER_FILE_PATH_03, EPubFileStub.ASSET_EXTRACTED_COVER_FILE_PATH_04 ) fun bind(binder: BookshelfViewBinder) { viewModelScope.launch { presenter.state.collect { binder.represent(it) } } } fun dispatch(action: Action) { presenter.dispatch(action) } fun initResources(context: Context) { ePubFiles = context.assets.list("books")?.toList() as List<String> forceInitialization(context) } private fun forceInitialization(context: Context) { val cachedBooksPath = createBooksDirIfNotExist(context) lateinit var istream: InputStream lateinit var ostream: OutputStream try { for (f in ePubFiles) { val assetsFile = EPubFileStub.BOOKS_PATH + f istream = context.assets.open(assetsFile) ostream = FileOutputStream(File(cachedBooksPath + f)) FileUtils.copy(istream, ostream) } } finally { istream.close() ostream.close() } } private fun createBooksDirIfNotExist(context: Context): String { val cachedBooksPath = StorageManager.getBooksPath(context) val dir = File(cachedBooksPath) if (dir.exists().not()) dir.mkdirs() return cachedBooksPath } }
5
Kotlin
0
7
1e145f072d8087235361af8b291a9fb54eab093e
2,182
Epub-Viewer-Android
MIT License
tools/plugins/initial-rbac/src/main/kotlin/net/corda/cli/plugin/initialRbac/InitialRbacPlugin.kt
corda
346,070,752
false
null
package net.corda.cli.plugin.initialRbac import net.corda.cli.api.CordaCliPlugin import net.corda.cli.plugin.initialRbac.commands.UserAdminSubcommand import net.corda.cli.plugin.initialRbac.commands.CordaDeveloperSubcommand import net.corda.cli.plugin.initialRbac.commands.FlowExecutorSubcommand import net.corda.cli.plugin.initialRbac.commands.VNodeCreatorSubcommand import org.pf4j.Extension import org.pf4j.Plugin import org.pf4j.PluginWrapper import picocli.CommandLine @Suppress("unused") class InitialRbacPlugin(wrapper: PluginWrapper) : Plugin(wrapper) { override fun start() { } override fun stop() { } @Extension @CommandLine.Command( name = "initial-rbac", subcommands = [UserAdminSubcommand::class, VNodeCreatorSubcommand::class, CordaDeveloperSubcommand::class, FlowExecutorSubcommand::class], description = ["Creates common RBAC roles"] ) class PluginEntryPoint : CordaCliPlugin }
71
Kotlin
9
28
fa43ea7a49afb8ed2d1686a6e847c8a02d376f85
966
corda-runtime-os
Apache License 2.0
app/src/main/java/com/fantasyfang/developmenttool/di/ApplicationModule.kt
fantasy1022
257,029,907
false
null
package com.fantasyfang.developmenttool.di import android.content.Context import com.fantasyfang.developmenttool.MainApplication import dagger.Binds import dagger.Module import javax.inject.Singleton @Module abstract class ApplicationModule { @Singleton @Binds abstract fun provideContext(app: MainApplication): Context }
0
Kotlin
0
0
1bca4516624b4c8c04986245806046a969e69486
335
DevelopmentTool
Apache License 2.0
parser/src/main/java/com/urbancompany/parser/lexer/Token.kt
urbanclap-engg
240,444,084
true
{"Kotlin": 131214}
package com.urbancompany.parser.lexer internal data class Token(val tokenType: TokenType, val value: String? = null)
0
Kotlin
0
0
e06fdd4d79fd67389047dd38a69e72fc4a5612f9
118
SpannableStringParser
Apache License 2.0
http/src/commonMain/kotlin/pw/binom/io/http/AsyncContentLengthInputStream.kt
dragossusi
277,504,821
true
{"C": 13518997, "Kotlin": 569853, "C++": 546364, "Shell": 86}
package pw.binom.io.http import pw.binom.io.AsyncInputStream import pw.binom.io.EOFException import pw.binom.io.StreamClosedException open class AsyncContentLengthInputStream(val stream: AsyncInputStream, val contentLength: ULong) : AsyncHttpInputStream { override suspend fun read(): Byte { if (read(staticData) != 1) throw EOFException() return staticData[0] } override val isEof: Boolean get() = closed || readed >= contentLength private var readed = 0uL private var closed = false private val staticData = ByteArray(1) override suspend fun read(data: ByteArray, offset: Int, length: Int): Int { checkClosed() if (isEof) return 0 val r = if ((contentLength - readed < length.toULong())) { stream.read(data, offset, (contentLength - readed).toInt()) } else stream.read(data, offset, length) readed += r.toULong() return r } override suspend fun close() { checkClosed() closed = true } protected fun checkClosed() { if (closed) throw StreamClosedException() } }
0
null
0
0
d16040b0f0d340104194014fc174858244684813
1,173
pw.binom.io
Apache License 2.0
app/src/development/java/com/addhen/checkin/di/module/DevelopmentAppModule.kt
zularizal
151,024,171
false
null
package com.addhen.checkin.di.module import com.addhen.checkin.data.repository.PostDataRepository import com.addhen.checkin.data.repository.PostRepository import dagger.Module import dagger.Provides import javax.inject.Singleton /** * Development related dagger modules. */ @Module(includes = [AppModule::class]) internal object DevelopmentAppModule { @Provides @Singleton @JvmStatic fun providePostRepository(postRepository: PostDataRepository): PostRepository = postRepository }
0
Kotlin
1
0
e95e26679ee045456814155b286ae20931f12ff2
494
checkin
MIT License
tv_viewmodel/src/main/java/com/bytebyte6/viewmodel/SearchViewModel2.kt
bytebyte6
324,579,353
false
null
package com.bytebyte6.viewmodel import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData import androidx.lifecycle.map import com.bytebyte6.common.* import com.bytebyte6.data.DataManager import com.bytebyte6.data.PAGE_SIZE import com.bytebyte6.data.entity.Tv import com.bytebyte6.usecase.FavoriteTvUseCase import com.bytebyte6.usecase.SearchTvLogoParam import com.bytebyte6.usecase.SearchTvLogoUseCase import com.bytebyte6.usecase.UpdateTvParam class SearchViewModel2( private val dataManager: DataManager, private val searchTvLogoUseCase: SearchTvLogoUseCase, private val favoriteTvUseCase: FavoriteTvUseCase ) : BaseViewModel() { val itemChanged: LiveData<Int> = searchTvLogoUseCase.itemChanged.map { val indexOf = pagingHelper.getList().indexOf(it) val pos = if (indexOf == -1) 0 else indexOf pos } private val count = MutableLiveData(0) private val pagingHelper: PagingHelper<Tv> = object : PagingHelper<Tv>(PAGE_SIZE) { override fun count(): Int { val tvCount = dataManager.getFtsTvCount(getKey()) count.postValue(tvCount) return tvCount } override fun paging(offset: Int, pageSize: Int): List<Tv> { val ftsTvPaging = dataManager.ftsTvPaging(offset, getKey(), pageSize) val param = SearchTvLogoParam(ftsTvPaging) addDisposable(searchTvLogoUseCase.execute(param).onSingle()) return ftsTvPaging } } private var keyword = "" val resultCount: LiveData<Int> = count val searchResult = pagingHelper.result() val favoriteResult = favoriteTvUseCase.result() fun getKey() = keyword fun search(key: CharSequence?) { if (!key.isNullOrEmpty()) { keyword = key.toString() addDisposable(pagingHelper.refresh().onIo()) } else { count.postValue(0) } } fun loadMore() { if (getKey().isNotEmpty()) { addDisposable(pagingHelper.loadResult().onIo()) } } fun fav(pos: Int) { searchResult.getSuccessData()?.apply { val tv = this[pos] addDisposable( favoriteTvUseCase.execute(UpdateTvParam(pos, tv)).onIo() ) } } override fun onCleared() { searchTvLogoUseCase.stop() super.onCleared() } }
0
Kotlin
7
9
3c22f2baad651c3df53b3615fd6fc28263621a42
2,403
Tv
Apache License 2.0
src/main/kotlin/tech/igrant/jizhang/detail/StatService.kt
guangtuan
222,254,780
false
null
package tech.igrant.jizhang.detail import com.google.common.collect.Maps import org.springframework.stereotype.Service import tech.igrant.jizhang.ext.getStartOfTomorrow import tech.igrant.jizhang.subject.SubjectService import java.util.* interface StatService { fun statByBigSubject(start: Date, end: Date, subjectIds: List<Long>): List<AmountTotal> fun statBySmallSubject(start: Date, end: Date, subjectIds: List<Long>): List<AmountTotal> @Service class Impl( private val detailRepo: DetailRepo, private val subjectService: SubjectService ) : StatService { private fun listRequire(start: Date, end: Date): List<Detail> { return detailRepo .findByStartAndEnd(start, end.getStartOfTomorrow()) .filter { d -> d.destAccountId == null } } override fun statBySmallSubject(start: Date, end: Date, subjectIds: List<Long>): List<AmountTotal> { val subjectNameLookup = Maps.transformValues(subjectService.subjectMap()) { v -> v?.name } return listRequire(start, end) .filter { d -> subjectIds.isEmpty() || d.subjectId in subjectIds } .groupBy { d -> d.subjectId } .entries.map { AmountTotal( it.key, subjectNameLookup.getOrDefault(it.key, "未知"), it.value.map { v -> v.amount.toLong() }.reduce { acc, i -> acc + i } / 100 ) } .sortedBy { i -> i.total } .toList() } override fun statByBigSubject(start: Date, end: Date, subjectIds: List<Long>): List<AmountTotal> { val subjectLookup = subjectService.subjectMap() val subjectNameLookup = Maps.transformValues(subjectLookup) { v -> v?.name } return listRequire(start, end) .filter { d -> subjectIds.isEmpty() || subjectLookup[d.subjectId]?.parentId in subjectIds } .groupBy { d -> subjectLookup[d.subjectId]?.parentId } .entries.mapNotNull { it.key?.let { key -> AmountTotal( key, subjectNameLookup.getOrDefault(it.key, "未知"), it.value.map { v -> v.amount.toLong() }.reduce { acc, i -> acc + i } / 100 ) } } .sortedBy { i -> i.total } .toList() } } }
1
Kotlin
0
2
b5c5fe8a6a80d512f29ab2c0a0cfeba03af344ef
2,600
jizhang
MIT License
shared/src/commonMain/kotlin/presentation/viewmodel/createexpense/CreateExpenseScreenIntents.kt
carlosgub
679,364,046
false
{"Kotlin": 197593, "Swift": 742, "Shell": 228, "Ruby": 101}
package presentation.viewmodel.createexpense import kotlinx.coroutines.Job import domain.model.CategoryEnum import domain.model.FinanceEnum interface CreateExpenseScreenIntents { fun setCategory(categoryEnum: CategoryEnum): Job fun setAmount(textFieldValue: String): Job fun showDateError(boolean: Boolean): Job fun showNoteError(boolean: Boolean): Job fun showError(boolean: Boolean): Job fun setNote(note: String): Job fun setDate(date: Long): Job fun create(): Job }
0
Kotlin
0
2
d2708c1c9b044c77692984e04653807c73b7b481
504
myFinances
Apache License 2.0
src/main/kotlin/com/github/noahshen/panther/persistence/leveldb/TransactionLevelDbStorage.kt
NoahShen
125,637,113
false
null
package com.github.noahshen.panther.persistence.leveldb import com.github.noahshen.panther.persistence.TransactionEntity import com.github.noahshen.panther.persistence.TransactionStorage class TransactionLevelDbStorage : TransactionStorage, LevelDbStorage { constructor(dataBaseFilePath: String) : super(dataBaseFilePath) override fun loadTransaction(transId: String): TransactionEntity? { val transactionBytes: ByteArray = leveldb.get(transId.toByteArray()) if (transactionBytes.isEmpty()) { return null } return gson.fromJson(String(transactionBytes), TransactionEntity::class.java) } override fun saveTransaction(transactionEntity: TransactionEntity) { leveldb.put(transactionEntity.transHash.toByteArray(), gson.toJson(transactionEntity).toByteArray()) } }
0
Kotlin
0
0
b401e33dc1ca1de71b2108044664acd69191cb26
837
panther
Apache License 2.0
src/commonMain/kotlin/com/soywiz/ktcc/gen/BaseGenerator.kt
cybernetics
183,833,678
true
{"Kotlin": 288873, "Shell": 2475, "HTML": 2123, "Dockerfile": 234}
package com.soywiz.ktcc.gen import com.soywiz.ktcc.parser.* import com.soywiz.ktcc.transform.* import com.soywiz.ktcc.types.* open class BaseGenerator(val program: Program, val parser: ProgramParser) { val strings get() = parser.strings val fixedSizeArrayTypes: Set<ArrayType> by lazy { //program.getAllTypes(program.parser).filterIsInstance<ArrayType>().filter { it.numElements != null && it.elementType is ArrayType }.toSet() program.getAllTypes(parser).filterIsInstance<ArrayType>().toSet() } fun Type.resolve(): Type = this.resolve(parser) val Type.requireRefStackAlloc get() = when (this) { is StructType -> false else -> true } }
0
Kotlin
0
0
70b2c78e1b0e21b3f373679c77315f2a4919933c
697
ktcc
MIT License
git-domain/trending/src/main/java/com/example/trending/repo/RepoBuiltBy.kt
prdp89
391,939,601
false
null
package com.example.trending.repo data class RepoBuiltBy ( var id: Int, var avatar: String, var href: String, var username: String )
0
Kotlin
0
1
651bd0b582f4b8844181c253cd7a5018d096a648
149
Trending-Git
MIT License
app/src/main/java/com/mospolytech/mospolyhelper/features/ui/account/students/adapter/ViewHolderStudents.kt
tonykolomeytsev
341,524,793
true
{"Kotlin": 646693}
package com.mospolytech.mospolyhelper.features.ui.account.students.adapter import android.view.View import android.widget.TextView import androidx.recyclerview.widget.RecyclerView import com.google.android.material.chip.Chip import kotlinx.android.synthetic.main.item_student.view.* class ViewHolderStudents(view : View) : RecyclerView.ViewHolder(view) { val name: TextView = view.title_student val group: Chip = view.chip_group val course: Chip = view.chip_course val educationForm: Chip = view.chip_form val direction_specialization: TextView = view.dir_spec_student val education: Chip = view.chip_education }
0
null
0
0
379c9bb22913da1854f536bf33e348a459db48b9
638
mospolyhelper-android
MIT License
src/main/kotlin/uk/gov/justice/digital/hmpps/authorizationapi/data/repository/ClientDeploymentRepository.kt
ministryofjustice
498,250,140
false
{"Kotlin": 330593, "Shell": 8164, "Dockerfile": 1328}
package uk.gov.justice.digital.hmpps.authorizationapi.data.repository import org.springframework.data.repository.CrudRepository import uk.gov.justice.digital.hmpps.authorizationapi.data.model.ClientDeployment interface ClientDeploymentRepository : CrudRepository<ClientDeployment, String> { fun findClientDeploymentByBaseClientId(baseClientId: String): ClientDeployment? fun deleteByBaseClientId(baseClientId: String) }
2
Kotlin
1
0
62fef23a635ba44ea2bd2c0be677093d431eaa7d
426
hmpps-authorization-api
MIT License
src/backend/environment/api-environment/src/main/kotlin/com/tencent/devops/environment/pojo/thirdPartyAgent/HeartbeatInfo.kt
Roy9102
211,615,562
true
{"Kotlin": 5871313, "Vue": 2662255, "JavaScript": 671898, "CSS": 377747, "Go": 119173, "Lua": 111686, "TSQL": 96222, "Shell": 89697, "Java": 71407, "TypeScript": 33693, "HTML": 23525, "Python": 10390, "Batchfile": 1974, "PLSQL": 901}
package com.tencent.devops.environment.pojo.thirdPartyAgent data class HeartbeatInfo( val masterVersion: String, val slaveVersion: String, val hostName: String, val agentIp: String, val parallelTaskCount: Int, val agentInstallPath: String, val startedUser: String, val taskList: List<ThirdPartyBuildInfo>, var agentId: Long?, var projectId: String?, var heartbeatTime: Long? ) { companion object { fun dummyHeartbeat(projectId: String, agentId: Long): HeartbeatInfo { return HeartbeatInfo( "", "", "", "", 0, "", "", listOf(), agentId, projectId, System.currentTimeMillis() ) } } }
0
Kotlin
0
0
61199feb62705fe063d9975badefc80fc7868b2a
850
bk-ci
MIT License
app/src/main/java/br/com/compasso/markup/ui/binding/EventBindingAdapters.kt
jotavier
330,055,469
false
null
package br.com.compasso.markup.ui.binding import android.widget.ImageView import androidx.databinding.BindingAdapter import br.com.compasso.markup.R import br.com.compasso.markup.services.extensions.setTint @BindingAdapter("app:favorite") fun favorite(imageView: ImageView, favorite: Boolean) { if (!favorite) { imageView.setTint(R.color.white) return } imageView.setTint(R.color.red) }
0
Kotlin
0
1
fc9a47ca44cdb4e50916dbc450f99bb51e58c9c9
416
markup
MIT License
src/main/kotlin/net/ndrei/teslapoweredthingies/blocks/DungBricks.kt
MinecraftModDevelopmentMods
77,729,751
false
{"Kotlin": 552829}
package net.ndrei.teslapoweredthingies.blocks import net.minecraft.block.material.Material import net.ndrei.teslacorelib.annotations.AutoRegisterBlock import net.ndrei.teslacorelib.blocks.RegisteredBlock import net.ndrei.teslapoweredthingies.TeslaThingiesMod /** * Created by CF on 2017-07-07. */ @AutoRegisterBlock object DungBricks : RegisteredBlock(TeslaThingiesMod.MODID, TeslaThingiesMod.creativeTab, "dung_bricks", Material.CLAY) { init { this.setHarvestLevel("pickaxe", 0) this.setHardness(3.0f) } // override val recipe: IRecipe? // get() = ShapedOreRecipe(null, ItemStack(this, 4), // "bb", // "bb", // 'b', DungBlock // ) }
21
Kotlin
4
2
22fdcf629e195a73dd85cf0ac0c5dda551085e71
724
Tesla-Powered-Thingies
MIT License
grafka/src/main/kotlin/com/grafka/resolvers/KafkaTopicMutationResolver.kt
codingblocks
220,845,985
false
null
package com.grafka.resolvers import com.coxautodev.graphql.tools.GraphQLMutationResolver import com.grafka.configs.KafkaClientFactory import com.grafka.entities.topics.KafkaNewTopicRequest import com.grafka.entities.topics.KafkaReplicationAssignment import com.grafka.entities.topics.KafkaTopicConfig import org.springframework.stereotype.Component @Component class KafkaTopicMutationResolver(private val adminClientFactory: KafkaClientFactory) : GraphQLMutationResolver { fun newTopicByPartitionAndReplicationFactor(clusterId: String, topicName: String, partitionCount: Int, replicationFactor: Short, configs: List<KafkaTopicConfig>?) = createTopic( clusterId, KafkaNewTopicRequest.create(topicName, partitionCount, replicationFactor, configs) ) fun newTopicByReplicationAssignments(clusterId: String, topicName: String, replicationAssignments: List<KafkaReplicationAssignment>, configs: List<KafkaTopicConfig>?) = createTopic( clusterId, KafkaNewTopicRequest.create(topicName, replicationAssignments, configs) ) private fun createTopic(clusterId: String, request: KafkaNewTopicRequest): Boolean { adminClientFactory .getAdminClient(clusterId) .createTopics(listOf(request.toNewTopic())) .all() .get() return true } }
30
JavaScript
4
13
7f82297ff7e3d7704d4dcae3dc87e50977821c00
1,376
grafka
MIT License
DesignSystem/src/main/java/com/yourssu/design/compose/atom/ListItem.kt
yourssu
364,290,281
false
null
package com.yourssu.design.compose.atom import android.os.Parcelable import android.util.Log import androidx.annotation.DrawableRes import androidx.compose.foundation.background import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.foundation.interaction.collectIsPressedAsState import androidx.compose.foundation.layout.* import androidx.compose.material.Text import androidx.compose.runtime.* import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import com.yourssu.design.R import com.yourssu.design.compose.YdsTheme import com.yourssu.design.compose.foundation.YdsIcon import com.yourssu.design.compose.base.noRippleClickable import kotlinx.parcelize.IgnoredOnParcel import kotlinx.parcelize.Parcelize @Parcelize data class ListItemState( private val _text: String, @DrawableRes private val _leftIcon: Int? = null, @DrawableRes private val _rightIcon: Int? = null, private val _isDisabled: Boolean = false ) : Parcelable { @IgnoredOnParcel var text by mutableStateOf(_text) @IgnoredOnParcel var leftIcon by mutableStateOf(_leftIcon) @IgnoredOnParcel var rightIcon by mutableStateOf(_rightIcon) @IgnoredOnParcel var isDisabled by mutableStateOf(_isDisabled) } @Composable fun rememberListItemState( text: String, @DrawableRes leftIcon: Int? = null, @DrawableRes rightIcon: Int? = null, isDisabled: Boolean = false ): ListItemState = rememberSaveable( text, leftIcon, rightIcon, isDisabled ) { ListItemState(text, leftIcon, rightIcon, isDisabled) } @Composable fun ListItem( onClick: () -> Unit, state: ListItemState, modifier: Modifier = Modifier, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() } ) { val isPressed by interactionSource.collectIsPressedAsState() val backgroundColor = if (isPressed && !state.isDisabled) { YdsTheme.colors.bgPressed } else { YdsTheme.colors.bgNormal } Row( modifier = Modifier .then(modifier) .fillMaxWidth() .height(48.dp) .noRippleClickable(interactionSource) { if (!state.isDisabled) { onClick() } } .background(color = backgroundColor), horizontalArrangement = Arrangement.SpaceBetween, verticalAlignment = Alignment.CenterVertically ) { Spacer(Modifier.width(20.dp)) state.leftIcon?.let { leftIconId -> YdsIcon(id = leftIconId) Spacer(Modifier.width(8.dp)) } Text( text = state.text, modifier = Modifier.weight(1.0f), style = YdsTheme.typography.body1 ) state.rightIcon?.let { rightIconId -> Spacer(Modifier.width(8.dp)) YdsIcon(id = rightIconId) } Spacer(Modifier.width(20.dp)) } } @Preview(showBackground = true) @Composable fun ListItemPreview() { var count by remember { mutableStateOf(0) } val listItemState = rememberListItemState( text = "로그아웃", rightIcon = R.drawable.ic_ground_filled ) ListItem( onClick = { Log.d("test", "ListItemPreview: ${count++}") }, state = listItemState ) }
4
Kotlin
1
16
79b4a7323c51e3e8da4f58840495d20fc9a47d6d
3,463
YDS-Android
MIT License
cottontaildb-dbms/src/main/kotlin/org/vitrivr/cottontail/dbms/statistics/selectivity/NaiveSelectivityCalculator.kt
vitrivr
160,775,368
false
null
package org.vitrivr.cottontail.dbms.statistics.selectivity import org.vitrivr.cottontail.core.queries.predicates.BooleanPredicate import org.vitrivr.cottontail.dbms.statistics.entity.RecordStatistics /** * This is a very naive calculator for [Selectivity] values. * * It simply delegates [Selectivity] calculation for [BooleanPredicate.Atomic]to the [RecordStatistics] object of * the column and then combines these [Selectivity] values as if they were uncorrelated. * * @author <NAME> * @version 1.0.1 */ object NaiveSelectivityCalculator { /** * Estimates the selectivity of a [BooleanPredicate] given the [RecordStatistics]. * * @param predicate The [BooleanPredicate] to evaluate. * @param statistics The [RecordStatistics] to use in the calculation. */ fun estimate(predicate: BooleanPredicate, statistics: RecordStatistics): Selectivity = when (predicate) { is BooleanPredicate.Atomic -> estimateAtomicReference(predicate, statistics) is BooleanPredicate.Compound -> estimateCompoundSelectivity(predicate, statistics) } /** * Estimates the selectivity of a [BooleanPredicate.Atomic] given the [RecordStatistics]. * * @param predicate The [BooleanPredicate.Atomic] to evaluate. * @param statistics The [RecordStatistics] to use in the calculation. */ private fun estimateAtomicReference(predicate: BooleanPredicate.Atomic, statistics: RecordStatistics): Selectivity = Selectivity(1.0f) /** * Estimates the selectivity for a [BooleanPredicate.Compound]. * * This is a very naive approach, which assumes that the [BooleanPredicate]s that make up * a [BooleanPredicate.Compound] are independent (i.e. there is no correlation between them). * * @param predicate The [BooleanPredicate.Compound] to evaluate. * @param statistics The [RecordStatistics] to use for the evaluation. */ private fun estimateCompoundSelectivity(predicate: BooleanPredicate.Compound, statistics: RecordStatistics): Selectivity { val pp1 = estimate(predicate.p1, statistics) val pp2 = estimate(predicate.p2, statistics) return when (predicate) { is BooleanPredicate.Compound.And -> pp1 * pp2 is BooleanPredicate.Compound.Or -> pp1 + pp2 - pp1 * pp2 } } }
8
Kotlin
15
15
c6e06263d9163f697e0aa5dc334a910521620215
2,335
cottontaildb
MIT License
app/src/main/java/com/example/myapplication/GameActivity.kt
plmkonist
260,388,427
false
null
package com.example.myapplication import android.content.Intent import android.media.MediaPlayer import android.os.Bundle import android.view.View import android.widget.Button import android.widget.LinearLayout import android.widget.TextView import androidx.appcompat.app.AppCompatActivity import kotlinx.coroutines.* import java.lang.Thread.sleep import java.util.* class GameActivity : AppCompatActivity() { private val ROW_SIZE = 6 private val COLUMN_SIZE = 5 private var score = 0 //private var gameStartTime: Long = 0 //private var noteTimes: ArrayList<Long>? = null private val REVEAL_TIME = 1675L private var song2: MediaPlayer? = null //private boolean[] correctButtonClicked; override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_game) //val time = System.currentTimeMillis() val song = SongConstants.songArray[intent.getIntExtra("song",0)] val noteTimes = song.noteTimes setupUI(song, noteTimes) } private fun setupUI(song: Song, noteTimes: ArrayList<Long>) { val gameRowsAndColumns = findViewById<LinearLayout>(R.id.rowsAndColumns) val scoreText = findViewById<TextView>(R.id.sdf) scoreText.text = "Current song " + song.name val difficultyConst = intent.getIntExtra("difficulty", 1) val buttonArray: Array<Button?> = arrayOfNulls(ROW_SIZE * COLUMN_SIZE) val buttonToClick: Array<ScoreTracker?> = setUpButtonToClick(difficultyConst) for (i in 0 until COLUMN_SIZE) { val gameBtnRow: View = layoutInflater.inflate( R.layout.game_row_chunk, gameRowsAndColumns, false ) for (j in 0 until ROW_SIZE) { val gameRow = gameBtnRow.findViewById<LinearLayout>(R.id.gameRow) val gameBtns: View = layoutInflater.inflate( R.layout.game_btn_chunk, gameRow, false ) val gameButton = gameBtns.findViewById<Button>(R.id.gameButton) buttonArray[i * ROW_SIZE + j] = gameButton //revealArray[(i * ROW_SIZE) + j] = new ButtonFadeThread(gameButton); gameButton.setOnClickListener { for (i in buttonToClick.indices) { if (gameButton == buttonToClick[i]?.button) { score++ scoreText.text = "score: $score" gameButton.visibility = View.INVISIBLE buttonToClick[i]?.clicked() } } } gameRow.addView(gameBtns) } gameRowsAndColumns.addView(gameBtnRow) } GlobalScope.launch { startGame(buttonArray, buttonToClick,song, noteTimes) } } private fun setUpButtonToClick(difficultyConstant: Int): Array<ScoreTracker?> { return when (difficultyConstant) { 0 -> { arrayOfNulls<ScoreTracker?>(2) } 1 -> { arrayOfNulls(3) } else -> { arrayOfNulls(4) } } } private fun startGame(buttonArray: Array<Button?>, buttonToClick: Array<ScoreTracker?>, song: Song, noteTimes: ArrayList<Long>) { var gameIsRunning = true var gen = Random() val r = findViewById<Button>(R.id.time) val randomButtonLocations = IntArray(buttonToClick.size) var x = gen.nextInt(ROW_SIZE * COLUMN_SIZE) randomButtonLocations[0] = x var index = 0 var i = 1 while (i < randomButtonLocations.size) { val y = gen.nextInt(ROW_SIZE * COLUMN_SIZE) if (y == x) { continue } x = y randomButtonLocations[i] = x i++ } runOnUiThread { song2 = MediaPlayer.create(this@GameActivity, song.iD) song2?.start() } val gameStartTime = System.currentTimeMillis() runBlocking { for (i in buttonToClick.indices) { launch(Dispatchers.Default) { buttonToClick[i] = ScoreTracker(buttonArray[randomButtonLocations[i]], gameStartTime + noteTimes[index++]) val waitTime = buttonToClick[i]!!.time - System.currentTimeMillis() if (System.currentTimeMillis() < buttonToClick[i]!!.time) Thread.sleep(waitTime) buttonClickedCheck(buttonToClick, i) } } } while (gameIsRunning) { for (g in buttonToClick.indices) { if (buttonToClick[g]!!.clicked || buttonToClick[g]!!.time + REVEAL_TIME <= System.currentTimeMillis()) { if (index < noteTimes.size) { GlobalScope.launch(Dispatchers.Default) { val x = genInt(randomButtonLocations); randomButtonLocations[g] = x; buttonToClick[g]?.reset(buttonArray[x], gameStartTime + noteTimes[index++]) val waitTime = buttonToClick[g]!!.time - System.currentTimeMillis() if (System.currentTimeMillis() < buttonToClick[g]!!.time) { sleep(waitTime) } buttonClickedCheck(buttonToClick, g) } } Thread.sleep(25) } } if (index >= noteTimes.size) gameIsRunning = false } runOnUiThread { endGame() } } private fun buttonClickedCheck(buttonToClick: Array<ScoreTracker?>, i: Int) { runOnUiThread { buttonToClick[i]!!.button!!.visibility = View.VISIBLE } val startTime = System.currentTimeMillis() while (System.currentTimeMillis() <= startTime + REVEAL_TIME - 100) { if (buttonToClick[i]!!.clicked) { break } } runOnUiThread { buttonToClick[i]!!.button!!.visibility = View.INVISIBLE } Thread.sleep(250) } private fun endGame() { Thread.sleep(1000 + intent.getIntExtra("difficulty", 1) * 450L) val gameOver = Intent(this, GameOver::class.java) gameOver.putExtra("finalScore", score) startActivity(gameOver) finish() } private fun genInt(arr: IntArray): Int { val gen = Random() val x = gen.nextInt(ROW_SIZE * COLUMN_SIZE) for (i in arr.indices) { if (x == arr[i]) { return genInt(arr) } } return x } override fun onDestroy() { song2?.stop() super.onDestroy() } }
0
Kotlin
1
1
993b063d933d2dac9b13b93f84c3231e2dc2fd67
7,100
boogalo
MIT License
windows-navigation/src/jvmMain/kotlin/io/github/lukwol/windows/navigation/WindowsNavigation.kt
lukwol
562,428,336
false
null
package io.github.lukwol.windows.navigation import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.getValue import androidx.compose.runtime.remember /** * Declare windows navigation by defining all [windows][WindowsMapBuilder.window] for [routes][WindowRoute]. * * Provides [LocalWindowController] that can be used for navigation inside each window. * * @param startRoute first [route][WindowRoute] for which window will be displayed * @param builder the builder used to construct the windows navigation map */ @Composable fun WindowsNavigation( startRoute: WindowRoute, builder: WindowsMapBuilder.() -> Unit ) { val mapBuilder = WindowsMapBuilder() builder(mapBuilder) val windowsMap = remember { mapBuilder.build() } val windowsController = remember { WindowsControllerImpl(startRoute) } val routes = windowsController.routesState CompositionLocalProvider( LocalWindowController provides windowsController ) { windowsMap.forEach { (route, content) -> @Composable fun window() = routes .find { it.route == route } ?.let { content(it.arguments) } window() } } }
3
Kotlin
0
6
15037da74cf5244605e284d3aad0a421b93157ab
1,284
cm-navigation
MIT License
data_wallet/src/main/java/io/igrant/data_wallet/models/wallet/WalletModel.kt
decentralised-dataexchange
344,557,240
false
null
package io.igrant.data_wallet.models.wallet import com.google.gson.annotations.Expose import com.google.gson.annotations.SerializedName import io.igrant.data_wallet.models.MediatorConnectionObject import io.igrant.data_wallet.models.connection.Connection import io.igrant.data_wallet.models.credentialExchange.CredentialProposalDict import io.igrant.data_wallet.models.credentialExchange.RawCredential import java.io.Serializable class WalletModel : Serializable { @SerializedName("raw_credential") @Expose var rawCredential: RawCredential? = null @SerializedName("credential_id") @Expose var credentialId: String? = null @SerializedName("connection") @Expose var connection: MediatorConnectionObject? = null @SerializedName("credential_proposal_dict") @Expose var credentialProposalDict: CredentialProposalDict? = null @SerializedName("organization") @Expose var organization: Connection? = null }
0
Kotlin
0
0
904c77346fefac169238bffab6d00a98224868ec
966
ama-android-sdk
Apache License 2.0
src/main/kotlin/dev/kandavu/intellij/AddStatusAction.kt
kandavu
310,377,852
false
null
package dev.kandavu.intellij import com.google.gson.Gson import com.intellij.notification.NotificationType import com.intellij.openapi.actionSystem.AnAction import com.intellij.openapi.actionSystem.AnActionEvent import com.intellij.openapi.actionSystem.PlatformDataKeys import com.intellij.openapi.editor.Editor; import com.intellij.openapi.ui.popup.JBPopup import com.intellij.openapi.ui.popup.JBPopupFactory import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.RequestBody.Companion.toRequestBody import java.awt.FlowLayout import java.awt.event.ActionEvent import java.awt.event.ActionListener import java.io.IOException import javax.swing.JButton import javax.swing.JPanel import javax.swing.JTextField import javax.swing.border.Border import javax.swing.border.EmptyBorder class AddStatusAction : AnAction() { // this is the persistent component we can read or write to private val state get() = ConfigPersistentStateComponent.instance.state private var statusField: JTextField? = JTextField() private var statusPopup: JBPopup? = null var editor: Editor? = null val gson = Gson() private var addStatusButton: JButton? = JButton("Add Status").apply { actionCommand = "Add Status" addActionListener(AddStatusClickListener()) } private var cancelAddStatusButton: JButton? = JButton("Cancel").apply { actionCommand = "Cancel Add Status" addActionListener(CancelAddStatusClickListener()) } class Status( val description: String?, ) { override fun toString(): String { return "Status [description: ${this.description}]" } } private inner class CancelAddStatusClickListener : ActionListener { override fun actionPerformed(e: ActionEvent) { statusField!!.text = "" statusPopup!!.dispose() } } private inner class AddStatusClickListener : ActionListener { override fun actionPerformed(e: ActionEvent) { val client = OkHttpClient() val statusText = statusField?.text as String val status = Status(statusText) val statusJson: String = gson.toJson(status) val request = Request.Builder() .url("${state.API_URL}/statuses") .header("Authorization", state.accessToken as String) .post(statusJson.toRequestBody(ConfigPersistentStateConfigurable.MEDIA_TYPE_JSON)) .build() client.newCall(request).execute().use { response -> if (!response.isSuccessful) throw IOException("Unexpected code $response") statusField!!.text = "" statusPopup!!.dispose() StatusNotification.notifyEvent("Status", "Status has been updated.") } } } override fun actionPerformed(event: AnActionEvent) { if(state.accessToken === null || state.accessToken!!.isEmpty()) { StatusNotification.notifyEvent("Status", "Access Token not found, please add your personal access token for Kandavu in preferences", NotificationType.ERROR) return } editor = event.getData(PlatformDataKeys.EDITOR) statusField!!.columns = 20 val margin : Border = EmptyBorder(10, 10, 10, 10) val statusTextFieldPanel = JPanel(FlowLayout(FlowLayout.CENTER)).also { it.add(statusField) it.add(addStatusButton) it.add(cancelAddStatusButton) } statusTextFieldPanel.border = margin statusPopup = JBPopupFactory.getInstance().createComponentPopupBuilder(statusTextFieldPanel, statusField) .setShowBorder(true) .setShowShadow(true) .setRequestFocus(true) .setCancelOnWindowDeactivation(true) .createPopup() statusPopup!!.showInFocusCenter() } }
1
Kotlin
0
0
ed43b36b54a9bfcc213a06da4fdf17ec8a77d58b
3,926
kandavu-jetbrains-plugin
MIT License
src/main/kotlin/com/godlike/client/keybind/KeybindHandler.kt
abelinsenmayer
838,055,627
false
{"Kotlin": 82106, "Java": 13455}
package com.godlike.client.keybind import com.godlike.common.networking.DoSelectionPacket import com.godlike.common.networking.TkSelectionPackage import com.godlike.client.keybind.ModKeybinds.DO_SELECT import com.godlike.client.keybind.ModKeybinds.LAUNCH_TK import com.godlike.client.keybind.ModKeybinds.PICK_TO_TK import com.godlike.client.keybind.ModKeybinds.PLACE_TK import com.godlike.client.keybind.ModKeybinds.SET_TK_HOVERING import com.godlike.client.keybind.ModKeybinds.TK_SELECTION import com.godlike.client.keybind.ModKeybinds.TOGGLE_SELECT_FAR import com.godlike.client.keybind.ModKeybinds.TOGGLE_SELECT_VERTICAL import com.godlike.client.keybind.ModKeybinds.TOGGLE_TK_MODE import com.godlike.common.Godlike.logger import com.godlike.common.components.* import com.godlike.common.networking.DropTkPacket import com.godlike.common.networking.HoverTkPacket import com.godlike.common.networking.LaunchTkPacket import com.godlike.common.networking.ModNetworking.CHANNEL import com.godlike.common.networking.PickBlockToTkPacket import com.godlike.common.networking.PickEntityToTkPacket import com.godlike.common.networking.PickShipToTkPacket import com.godlike.common.networking.PlaceTkPacket import com.godlike.common.networking.SetChargingLaunchPacket import com.godlike.common.networking.SetModePacket import com.godlike.common.networking.TelekinesisControlsPacket import com.godlike.common.telekinesis.LAUNCH_POINTER_DISTANCE import com.godlike.common.telekinesis.getPointerAtDistance import com.godlike.common.util.toVec3 import net.minecraft.client.Minecraft import net.minecraft.network.chat.Component import net.minecraft.world.phys.Vec3 const val POINTER_DELTA_INCREMENT = 0.5 /** * Called every client tick to handle keybinds related to telekinesis. * Constructs a [TelekinesisControlsPacket] based on key inputs and send it to the server. */ fun doTelekinesisKeybindControls() { val playerLookDirection = Minecraft.getInstance().cameraEntity!!.lookAngle var pointerDistanceDelta = 0.0 while (ModKeybinds.POINTER_PULL.consumeClick()) { pointerDistanceDelta -= POINTER_DELTA_INCREMENT } while (ModKeybinds.POINTER_PUSH.consumeClick()) { pointerDistanceDelta += POINTER_DELTA_INCREMENT } val isRotating = ModKeybinds.ROTATE_TK.isDown CHANNEL.clientHandle().send( TelekinesisControlsPacket(playerLookDirection, pointerDistanceDelta, isRotating) ) } /** * Called at the top of the client tick to handle input events. This means that it is called before any other * keybinds are processed. */ fun handleModInputEvents() { val client = Minecraft.getInstance() val player = client.player!! while (TOGGLE_TK_MODE.consumeClick() && !player.selection().clientChargingLaunch) { val currentMode = player.getMode() if (currentMode == Mode.TELEKINESIS) { CHANNEL.clientHandle().send( SetModePacket(Mode.NONE.name) ) } else { CHANNEL.clientHandle().send( SetModePacket(Mode.TELEKINESIS.name) ) } } while (PICK_TO_TK.consumeClick()) { if (player.getMode() == Mode.TELEKINESIS && !player.selection().clientChargingLaunch) { // If we are carrying something, drop it. Otherwise, pick up the block/entity/ship if (player.telekinesis().getTkTargets().isEmpty() || !player.telekinesis().hasNonHoveringTarget()) { val selection = player.selection() var didPick = false selection.cursorTargetBlock?.let { CHANNEL.clientHandle().send(PickBlockToTkPacket(it)) didPick = true } selection.cursorTargetEntity?.let { CHANNEL.clientHandle().send(PickEntityToTkPacket(it.id)) didPick = true } selection.cursorTargetShip?.let { CHANNEL.clientHandle().send(PickShipToTkPacket(it.id)) didPick = true } if (didPick) { player.selection().clear() player.selection().isSelecting = false } } else { CHANNEL.clientHandle().send(DropTkPacket()) player.selection().isSelecting = true } } } while (SET_TK_HOVERING.consumeClick() && !player.selection().clientChargingLaunch) { if (player.getMode() == Mode.TELEKINESIS) { CHANNEL.clientHandle().send(HoverTkPacket(Minecraft.getInstance().cameraEntity!!.lookAngle)) player.selection().isSelecting = true } } while (PLACE_TK.consumeClick() && !player.selection().clientChargingLaunch) { if (player.getMode() == Mode.TELEKINESIS) { CHANNEL.clientHandle().send(PlaceTkPacket()) player.selection().isSelecting = true } } // while (TOGGLE_SELECTION_MODE.consumeClick()) { // val currentMode = player.getMode() // if (currentMode == Mode.SELECTING) { // player.setMode(Mode.NONE) // } else { // player.setMode(Mode.SELECTING) // } // } while (TOGGLE_SELECT_VERTICAL.consumeClick()) { if (player.getMode() == Mode.SELECTING) { ModComponents.SELECTING_VERTICAL.get(client.player!!).toggle() client.player!!.sendSystemMessage( Component.literal( if (ModComponents.SELECTING_VERTICAL.get(client.player!!).getValue()) "Vertical selection" else "Horizontal selection" ) ) } } while (TOGGLE_SELECT_FAR.consumeClick()) { if (player.getMode() == Mode.SELECTING) { ModComponents.SELECTING_FAR.get(client.player!!).toggle() client.player!!.sendSystemMessage( Component.literal( if (ModComponents.SELECTING_FAR.get(client.player!!).getValue()) "Selecting far" else "Selecting near" ) ) } } while (DO_SELECT.consumeClick()) { // send a packet to the server to add the preview to their cursor selection if (player.getMode() == Mode.SELECTING) { CHANNEL.clientHandle().send( DoSelectionPacket( ModComponents.CURSOR_PREVIEWS.get(client.player!!).getPositions(), ModComponents.TARGET_POSITION.get(client.player!!).getPos() ) ) } } while (TK_SELECTION.consumeClick()) { // send a packet to the server to create a physics object from the cursor selection if (player.getMode() == Mode.SELECTING) { CHANNEL.clientHandle().send( TkSelectionPackage() ) client.player!!.setMode(Mode.TELEKINESIS) } } if (LAUNCH_TK.isDown && !player.selection().clientChargingLaunch) { CHANNEL.clientHandle().send(SetChargingLaunchPacket(true)) player.selection().isSelecting = true player.selection().clientChargingLaunch = true } else if (!LAUNCH_TK.isDown && player.selection().clientChargingLaunch) { val launchTargetPos: Vec3 = player.selection().getSelectionPosition() ?: getPointerAtDistance(player, Minecraft.getInstance().cameraEntity!!.lookAngle, LAUNCH_POINTER_DISTANCE) CHANNEL.clientHandle().send(LaunchTkPacket(launchTargetPos)) player.selection().isSelecting = true player.selection().clientChargingLaunch = false } }
0
Kotlin
0
0
384f28a98bd73c5686de737cb6d4314dd697c846
7,645
godlike-minecraft-mod
Creative Commons Zero v1.0 Universal
src/main/kotlin/jp/nephy/hypixelin/response/FindGuild.kt
SlashNephy
112,994,308
false
null
package jp.nephy.hypixelin.response import com.github.salomonbrys.kotson.byBool import com.github.salomonbrys.kotson.byNullableString import com.google.gson.JsonElement class FindGuild(val json: JsonElement) { val success by json.byBool val guildId by json.byNullableString("guild") }
0
Kotlin
0
0
17573678a2e46cae714eb04d75930288e552afb8
295
Hypixelin
MIT License
app/src/main/java/com/bth/reciperadar/domain/models/Review.kt
BryanAafjes
718,555,578
false
{"Kotlin": 52345}
package com.bth.reciperadar.domain.models import com.bth.reciperadar.data.dtos.ReviewDto data class Review ( var id: String = "", var recipe: Recipe? = Recipe(), var userId: String? = "", var rating: ReviewRating = ReviewRating() ) fun Review.toDto(): ReviewDto { return ReviewDto( id = this.id, recipe = this.recipe?.toDto(), userId = this.userId, rating = this.rating.toDto() ) } fun ReviewDto.toDomain(): Review { return Review( id = this.id, recipe = this.recipe?.toDomain(), userId = this.userId, rating = this.rating.toDomain() ) }
0
Kotlin
0
0
396474807f3d6499aceb1d55fbd7361f86d312f7
637
RecipeRadar
MIT License
app/src/main/java/com/richmat/mytuya/ui/sign/SecondSign.kt
jasonpanjunnan
424,535,534
false
{"Kotlin": 369748}
package com.richmat.mytuya.ui.sign import androidx.compose.animation.ExperimentalAnimationApi import androidx.compose.foundation.layout.* import androidx.compose.material.* import androidx.compose.runtime.Composable import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.ui.Modifier import androidx.compose.ui.focus.FocusRequester import androidx.compose.ui.focus.focusRequester import androidx.compose.ui.graphics.Color import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.navigation.NavGraph.Companion.findStartDestination import androidx.navigation.NavHostController import androidx.navigation.compose.rememberNavController import com.example.compose.jetsurvey.signinsignup.PasswordState import com.richmat.mytuya.ui.theme.JetsurveyTheme import com.richmat.mytuya.R import com.richmat.mytuya.ui.components.Email import com.richmat.mytuya.ui.components.Password import com.richmat.mytuya.ui.components.SignInSignUpScreen import com.richmat.mytuya.ui.components.SignInSignUpTopAppBar import com.richmat.mytuya.ui.Home.TabItem import com.richmat.mytuya.ui.sign.textFieldState.PhoneState import com.richmat.mytuya.util.supportWideScreen import com.tuya.smart.android.user.api.ILoginCallback import com.tuya.smart.android.user.bean.User import com.tuya.smart.home.sdk.TuyaHomeSdk import kotlinx.coroutines.launch @Composable fun SecondSignInScreen(navController: NavHostController) { val snackbarHostState = remember { SnackbarHostState() } val scope = rememberCoroutineScope() val snackbarErrorText = stringResource(id = R.string.feature_not_available) val snackbarActionLabel = stringResource(id = R.string.dismiss) Scaffold( topBar = { SignInSignUpTopAppBar( topAppBarText = stringResource(id = R.string.sign_in), onBackPressed = { navController.navigateUp() } ) }, content = { SignInSignUpScreen( modifier = Modifier.supportWideScreen(), onSignedInAsGuest = { } ) { Column(modifier = Modifier.fillMaxWidth()) { SignInContent( onSignInSubmitted = { phone, password -> //账号密码登陆 TuyaHomeSdk.getUserInstance() .loginWithPhonePassword( "86", phone, password, object : ILoginCallback { override fun onSuccess(user: User) { // Toast.makeText( // MyApplication.context, // "Login success:" + TuyaHomeSdk.getUserInstance().user!!.username, // Toast.LENGTH_SHORT // ).show() navController.navigate((TabItem.HomeTab.page.route)) { //清空顶上的回收栈 navController.popBackStack() popUpTo(navController.graph.findStartDestination().id) { //此项可控制是否退出首项 StartDestination inclusive = true saveState = true } launchSingleTop = true restoreState = true } } override fun onError(code: String, error: String) { // Toast.makeText( // MyApplication.context, // "code: " + code + "error: $error, /n 账号或密码错误,请重试", // Toast.LENGTH_SHORT // ).show() } }) } ) Spacer(modifier = Modifier.height(16.dp)) TextButton( onClick = { scope.launch { snackbarHostState.showSnackbar( message = snackbarErrorText, actionLabel = snackbarActionLabel ) } }, modifier = Modifier.fillMaxWidth() ) { Text( text = stringResource(id = R.string.forgot_password), color = Color.Blue ) } } } } ) // Box(modifier = Modifier.fillMaxSize()) { // ErrorSnackbar( // snackbarHostState = snackbarHostState, // onDismiss = { snackbarHostState.currentSnackbarData?.dismiss() }, // modifier = Modifier.align(Alignment.BottomCenter) // ) // } } @Composable fun SignInContent( onSignInSubmitted: (email: String, password: String) -> Unit, ) { Column(modifier = Modifier.fillMaxWidth()) { val focusRequester = remember { FocusRequester() } val emailState = remember { PhoneState() } Email(emailState, onImeAction = { focusRequester.requestFocus() }) Spacer(modifier = Modifier.height(16.dp)) val passwordState = remember { PasswordState() } Password( label = stringResource(id = R.string.password), passwordState = passwordState, modifier = Modifier.focusRequester(focusRequester), onImeAction = { onSignInSubmitted(emailState.text, passwordState.text) } ) Spacer(modifier = Modifier.height(16.dp)) Button( onClick = { onSignInSubmitted(emailState.text, passwordState.text) }, modifier = Modifier .fillMaxWidth() .padding(vertical = 16.dp), enabled = emailState.isValid && passwordState.isValid ) { Text( text = stringResource(id = R.string.sign_in) ) } } } @ExperimentalAnimationApi @Preview @Composable fun showSignUpScreen() { JetsurveyTheme { SecondSignInScreen(navController = rememberNavController()) } }
0
Kotlin
0
1
e3d1c1a859369485ec7ef675f4e574cf32e0e01d
6,999
RichmatTuya
Apache License 2.0
kotlin-plugin/src/main/kotlin/io/github/kyay10/koncept/internal/ResolutionStages.kt
kyay10
503,864,862
false
{"Kotlin": 146089, "Java": 3672}
package io.github.kyay10.koncept.internal /* * Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ import io.github.kyay10.koncept.isNothingFunContextArgument import io.github.kyay10.koncept.utils.map import org.jetbrains.kotlin.fir.FirSession import org.jetbrains.kotlin.fir.declarations.FirCallableDeclaration import org.jetbrains.kotlin.fir.expressions.FirExpression import org.jetbrains.kotlin.fir.expressions.FirResolvable import org.jetbrains.kotlin.fir.expressions.builder.buildFunctionCall import org.jetbrains.kotlin.fir.references.builder.buildResolvedNamedReference import org.jetbrains.kotlin.fir.resolve.calls.* import org.jetbrains.kotlin.fir.symbols.ConeClassLikeLookupTag import org.jetbrains.kotlin.fir.symbols.SymbolInternals import org.jetbrains.kotlin.fir.symbols.impl.FirCallableSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirNamedFunctionSymbol import org.jetbrains.kotlin.fir.types.* import org.jetbrains.kotlin.fir.types.builder.buildResolvedTypeRef import org.jetbrains.kotlin.name.ClassId import org.jetbrains.kotlin.resolve.calls.inference.isSubtypeConstraintCompatible import org.jetbrains.kotlin.resolve.calls.inference.model.SimpleConstraintSystemConstraintPosition import org.jetbrains.kotlin.types.model.TypeSystemCommonSuperTypesContext import org.jetbrains.kotlin.utils.addToStdlib.cast import org.jetbrains.kotlin.utils.addToStdlib.ifNotEmpty private fun Candidate.prepareReceivers( argumentExtensionReceiverValue: ReceiverValue, expectedType: ConeKotlinType, context: ResolutionContext, ): ReceiverDescription { val argumentType = captureFromTypeParameterUpperBoundIfNeeded( argumentType = argumentExtensionReceiverValue.type, expectedType = expectedType, session = context.session ).let { prepareCapturedType(it, context) } return ReceiverDescription(argumentExtensionReceiverValue.receiverExpression, argumentType) } /** * interface Inv<T> * fun <Y> bar(l: Inv<Y>): Y = ... * * fun <X : Inv<out Int>> foo(x: X) { * val xr = bar(x) * } * Here we try to capture from upper bound from type parameter. * We replace type of `x` to `Inv<out Int>`(we chose supertype which contains supertype with expectedTypeConstructor) and capture from this type. * It is correct, because it is like this code: * fun <X : Inv<out Int>> foo(x: X) { * val inv: Inv<out Int> = x * val xr = bar(inv) * } * */ internal fun captureFromTypeParameterUpperBoundIfNeeded( argumentType: ConeKotlinType, expectedType: ConeKotlinType, session: FirSession ): ConeKotlinType { val expectedTypeClassId = expectedType.upperBoundIfFlexible().classId ?: return argumentType val simplifiedArgumentType = argumentType.lowerBoundIfFlexible() as? ConeTypeParameterType ?: return argumentType val typeParameterSymbol = simplifiedArgumentType.lookupTag.typeParameterSymbol val context = session.typeContext val chosenSupertype = typeParameterSymbol.resolvedBounds.map { it.coneType } .singleOrNull { it.hasSupertypeWithGivenClassId(expectedTypeClassId, context) } ?: return argumentType val capturedType = context.captureFromExpression(chosenSupertype) as ConeKotlinType? ?: return argumentType return if (argumentType is ConeDefinitelyNotNullType) { ConeDefinitelyNotNullType.create(capturedType, session.typeContext) ?: capturedType } else { capturedType } } private fun ConeKotlinType.hasSupertypeWithGivenClassId( classId: ClassId, context: TypeSystemCommonSuperTypesContext ): Boolean { return with(context) { anySuperTypeConstructor { val typeConstructor = it.typeConstructor() typeConstructor is ConeClassLikeLookupTag && typeConstructor.classId == classId } } } private class ReceiverDescription( val expression: FirExpression, val type: ConeKotlinType, ) class KonceptCheckContextReceivers(val conceptFunctions: List<FirNamedFunctionSymbol>) : ResolutionStage() { override suspend fun check(candidate: Candidate, callInfo: CallInfo, sink: CheckerSink, context: ResolutionContext) { val contextReceiverExpectedTypes = (candidate.symbol as? FirCallableSymbol<*>)?.resolvedContextReceivers?.map { candidate.substitutor.substituteOrSelf(it.typeRef.coneType) }?.takeUnless { it.isEmpty() } ?: return val receiverGroups: List<List<ImplicitReceiverValue<*>>> = context.bodyResolveComponents.towerDataElements.asReversed().mapNotNull { towerDataElement -> towerDataElement.implicitReceiver?.takeUnless { it.receiverExpression.isNothingFunContextArgument } ?.let(::listOf) ?: towerDataElement.contextReceiverGroup } val resultingContextReceiverArguments = mutableListOf<FirExpression>() for (expectedType in contextReceiverExpectedTypes) { val matchingReceivers = candidate.findClosestMatchingReceivers(expectedType, receiverGroups, context, conceptFunctions) when (matchingReceivers.size) { 0 -> { sink.reportDiagnostic(NoApplicableValueForContextReceiver(expectedType)) return } 1 -> { val matchingReceiver = matchingReceivers.single() resultingContextReceiverArguments.add(matchingReceiver.expression) candidate.system.addSubtypeConstraint( matchingReceiver.type, expectedType, SimpleConstraintSystemConstraintPosition ) } else -> { sink.reportDiagnostic(AmbiguousValuesForContextReceiverParameter(expectedType)) return } } } candidate.contextReceiverArguments = resultingContextReceiverArguments } } @OptIn(SymbolInternals::class) private fun Candidate.findClosestMatchingReceivers( expectedType: ConeKotlinType, receiverGroups: List<List<ImplicitReceiverValue<*>>>, context: ResolutionContext, conceptFunctions: List<FirNamedFunctionSymbol>, ): List<ReceiverDescription> = with(context) { for (receiverGroup in receiverGroups) { val currentResult = receiverGroup.map { prepareReceivers(it, expectedType, context) }.filter { system.isSubtypeConstraintCompatible( it.type, expectedType, SimpleConstraintSystemConstraintPosition ) } if (currentResult.isNotEmpty()) return currentResult } /*val typeParams = symbol.typeParameterSymbols!! *//*val typeParamsToTypeArguments = (0..typeParams.lastIndex).associateBy(typeParams::get) { callInfo.typeArguments[it].toConeTypeProjection().type!! } *//* val substitutor = substitutor.chain(ErrorToStarProjectionSubstitutor(session.typeContext)) val expectedType = substitutor.substituteOrSelf(expectedType.removeTypeVariableTypes(session.typeContext))*/ conceptFunctions.map { prepareReceivers(it.asReceiverValue(), expectedType, context) }.filter { val conceptFunType = it.expression.cast<FirResolvable>().candidate()?.let {candidate -> /* * It's important to extract type from argument neither from symbol, because of symbol contains * placeholder type with value 0, but argument contains type with proper literal value */ val type: ConeKotlinType = context.returnTypeCalculator.tryCalculateReturnType(candidate.symbol.fir as FirCallableDeclaration).type candidate.substitutor.substituteOrSelf(type) } ?: it.type system.isSubtypeConstraintCompatible( conceptFunType, expectedType, SimpleConstraintSystemConstraintPosition ) }.ifNotEmpty { return this } return emptyList() } internal fun FirResolvable.candidate(): Candidate? { return when (val callee = this.calleeReference) { is FirNamedReferenceWithCandidate -> return callee.candidate else -> null } } class ConceptFunctionAsReceiverValue( override val receiverExpression: FirExpression, override val type: ConeKotlinType ) : ReceiverValue context(ResolutionContext) fun FirNamedFunctionSymbol.asReceiverValue(): ConceptFunctionAsReceiverValue { val type = returnTypeCalculator.tryCalculateReturnType(this).type return ConceptFunctionAsReceiverValue(buildFunctionCall { typeRef = buildResolvedTypeRef { this.type = type } this.calleeReference = buildResolvedNamedReference { name = this@asReceiverValue.name resolvedSymbol = this@asReceiverValue } }, type) }
0
Kotlin
0
0
4e030103b72dab1f31dcea6988a78f85be06656e
8,357
koncept
Apache License 2.0
Chapter06/Activity6.01/app/src/main/java/com/example/recipebook/ViewHolder.kt
PacktWorkshops
204,445,200
false
{"Kotlin": 556387}
package com.example.recipebook import android.view.View import androidx.recyclerview.widget.RecyclerView import com.example.recipebook.model.ListItem import com.example.recipebook.model.RecipeUiModel import com.example.recipebook.model.TitleUiModel import kotlinx.android.extensions.LayoutContainer import kotlinx.android.synthetic.main.item_recipe.view.* import kotlinx.android.synthetic.main.item_title.view.* abstract class BaseViewHolder( override val containerView: View ) : RecyclerView.ViewHolder(containerView), LayoutContainer { abstract fun bindData(listItem: ListItem) } class TitleViewHolder(override val containerView: View) : BaseViewHolder(containerView) { private val titleView by lazy { containerView.title_label } override fun bindData(listItem: ListItem) { titleView.text = (listItem as TitleUiModel).title } } class RecipeViewHolder( override val containerView: View, private val onClickListener: OnClickListener ) : BaseViewHolder(containerView) { private val titleView by lazy { containerView.recipe_title } override fun bindData(listItem: ListItem) { titleView.text = (listItem as RecipeUiModel).title titleView.setOnClickListener { onClickListener.onClick(listItem) } } interface OnClickListener { fun onClick(recipe: RecipeUiModel) } }
0
Kotlin
18
9
ab42898f6debe3bc83d0f08bbb1c0b7dea959d4b
1,366
The-Android-Workshop
MIT License
app/src/main/java/com/example/myapplication/ViewPagerAdapter.kt
Timur-wq
452,668,715
false
null
package com.example.myapplication import ImageLoader import androidx.fragment.app.Fragment import androidx.fragment.app.FragmentManager import androidx.lifecycle.Lifecycle import androidx.viewpager2.adapter.FragmentStateAdapter //адаптер, осуществляющий слайдовую навигацию между разделами "Добавить", "Словарь", "Базис" class ViewPagerAdapter(fragmentManager: FragmentManager, lifecycle: Lifecycle): FragmentStateAdapter(fragmentManager, lifecycle) { override fun getItemCount(): Int { return 3 } override fun createFragment(position: Int): Fragment { return when(position){ 0 ->{ ImageLoader() } 1 ->{ Dict() } 2->{ Basis() } else ->{ Fragment() } } } }
1
Kotlin
0
0
4d585754192719a360771a4bc87c35293f8f3f89
858
Photo-eng
MIT License
app/src/main/java/com/example/mediaplayerjetpackcompose/presentation/screen/music/component/MiniMusicPlayer.kt
AlirezaNouri-77
840,851,077
false
{"Kotlin": 188385}
package com.example.mediaplayerjetpackcompose.presentation.screen.music.component import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.basicMarquee import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.navigationBarsPadding import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.pager.HorizontalPager import androidx.compose.foundation.pager.rememberPagerState import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.Card import androidx.compose.material3.CardDefaults import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.remember import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.draw.drawBehind import androidx.compose.ui.graphics.drawscope.clipRect import androidx.compose.ui.graphics.graphicsLayer import androidx.compose.ui.res.painterResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.example.mediaplayerjetpackcompose.R import com.example.mediaplayerjetpackcompose.data.util.Constant import com.example.mediaplayerjetpackcompose.data.util.convertMilliSecondToTime import com.example.mediaplayerjetpackcompose.data.util.removeFileExtension import com.example.mediaplayerjetpackcompose.domain.model.musicSection.MusicModel import com.example.mediaplayerjetpackcompose.domain.model.share.CurrentMediaState import com.example.mediaplayerjetpackcompose.presentation.screen.component.util.NoRippleEffect import com.example.mediaplayerjetpackcompose.presentation.screen.component.util.PagerHandler @Composable @OptIn(ExperimentalFoundationApi::class) fun MiniMusicPlayer( modifier: Modifier, pagerMusicList: List<MusicModel>, setCurrentPagerNumber: (Int) -> Unit, currentPagerPage: Int, currentMediaState: () -> CurrentMediaState, currentMusicPosition: () -> Long, onClick: () -> Unit, onPauseMusic: () -> Unit, onResumeMusic: () -> Unit, onMoveNextMusic: () -> Unit, onMovePreviousMusic: (Boolean) -> Unit, ) { val pagerState = rememberPagerState( initialPage = currentPagerPage, pageCount = { pagerMusicList.size }, ) PagerHandler( currentMediaState = currentMediaState, pagerMusicList = pagerMusicList, currentPagerPage = currentPagerPage, pagerState = pagerState, setCurrentPagerNumber = setCurrentPagerNumber, onMoveNextMusic = onMoveNextMusic, onMovePreviousMusic = onMovePreviousMusic, ) val reactCanvasColor = MaterialTheme.colorScheme.onPrimary val duration = remember(currentMediaState().metaData) { currentMediaState().metaData.extras?.getInt(Constant.DURATION_KEY) ?: 0 } val playAndPauseIcon = remember(currentMediaState().isPlaying) { if (currentMediaState().isPlaying) R.drawable.icon_pause_24 else R.drawable.icon_play_arrow_24 } val marqueeAnimate = remember(pagerState.isScrollInProgress) { if (pagerState.isScrollInProgress) 0 else Int.MAX_VALUE } Card( modifier = modifier .fillMaxWidth() .padding(bottom = 10.dp), onClick = { onClick.invoke() }, shape = RoundedCornerShape(topEnd = 25.dp, topStart = 25.dp), colors = CardDefaults.cardColors( containerColor = MaterialTheme.colorScheme.primaryContainer, ), elevation = CardDefaults.elevatedCardElevation( defaultElevation = 10.dp, ), interactionSource = NoRippleEffect, ) { Row( verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.SpaceAround, modifier = Modifier .navigationBarsPadding() .fillMaxWidth() .padding(horizontal = 6.dp, vertical = 5.dp), ) { ArtworkImage( modifier = Modifier .weight(0.2f, false) .size(45.dp) .clip(RoundedCornerShape(5.dp)), inset = 30f, uri = { currentMediaState().metaData.artworkUri }, ) Column( modifier = Modifier .fillMaxWidth() .weight(0.7f), verticalArrangement = Arrangement.spacedBy(5.dp, Alignment.CenterVertically), horizontalAlignment = Alignment.Start, ) { Box( modifier = Modifier .fillMaxWidth(), contentAlignment = Alignment.Center, ) { HorizontalPager( modifier = Modifier.fillMaxWidth(), state = pagerState, pageSpacing = 20.dp, beyondViewportPageCount = 2, contentPadding = PaddingValues(horizontal = 10.dp) ) { page -> Column( modifier = Modifier .fillMaxWidth(0.95f), ) { Text( text = pagerMusicList[page].name.removeFileExtension(), fontSize = 13.sp, modifier = Modifier .fillMaxWidth() .basicMarquee(iterations = marqueeAnimate, initialDelayMillis = 500), maxLines = 1, ) Text( text = pagerMusicList[page].artist, fontSize = 12.sp, modifier = Modifier .fillMaxWidth(), maxLines = 1, ) } } } Box( modifier = Modifier .fillMaxWidth() .padding(horizontal = 6.dp) .height(4.dp) .graphicsLayer { shape = RoundedCornerShape(4.dp) clip = true } .drawBehind { val size = this.size.width val progress = (currentMusicPosition() * size) / duration drawRoundRect(color = reactCanvasColor.copy(alpha = 0.1f)) clipRect( right = progress, ) { this.drawRect(color = reactCanvasColor) } }, ) } Column( modifier = Modifier .weight(0.1f), verticalArrangement = Arrangement.Center, horizontalAlignment = Alignment.CenterHorizontally, ) { IconButton( modifier = Modifier .size(50.dp), onClick = { when (currentMediaState().isPlaying) { true -> onPauseMusic.invoke() false -> onResumeMusic.invoke() } }, ) { Icon( painter = painterResource(id = playAndPauseIcon), contentDescription = "", tint = MaterialTheme.colorScheme.onPrimary, ) } Text( modifier = Modifier, text = currentMusicPosition().toInt().convertMilliSecondToTime(), fontSize = 12.sp, color = MaterialTheme.colorScheme.onPrimary, fontWeight = FontWeight.Medium, ) } } } }
0
Kotlin
0
0
3316fdf812886d2b1e8dfb88a46898979656da33
7,479
Media-Player-Compose
MIT License
test1obw-sdk-kotlin-core/src/test/kotlin/com/test1obw/api/models/StopRetrieveParamsTest.kt
quivalen
864,202,238
false
{"Kotlin": 1795677, "Shell": 2562, "Dockerfile": 399}
// File generated from our OpenAPI spec by Stainless. package com.open_transit.api.models import com.open_transit.api.models.* import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test class StopRetrieveParamsTest { @Test fun createStopRetrieveParams() { StopRetrieveParams.builder().stopId("stopID").build() } @Test fun getPathParam() { val params = StopRetrieveParams.builder().stopId("stopID").build() assertThat(params).isNotNull // path param "stopId" assertThat(params.getPathParam(0)).isEqualTo("stopID") // out-of-bound path param assertThat(params.getPathParam(1)).isEqualTo("") } }
1
Kotlin
0
0
f41096673683ec17b1d1a96fd1affa0befd7aea5
703
onebusaway-kotlin-client
Apache License 2.0
onebusaway-sdk-java-core/src/main/kotlin/com/open_transit/api/errors/OnebusawaySdkIoException.kt
OneBusAway
864,202,238
false
{"Kotlin": 1841904, "Shell": 3662, "Dockerfile": 399}
package com.open_transit.api.errors class OnebusawaySdkIoException @JvmOverloads constructor(message: String? = null, cause: Throwable? = null) : OnebusawaySdkException(message, cause)
0
Kotlin
0
0
4139f96c4d90517f472a1b2561df813ad231f904
190
java-sdk
Apache License 2.0
domain/src/main/kotlin/de/dhbw/ka/domain/valueobjects/RentalRequestResult.kt
liza-kl
429,557,945
false
{"Kotlin": 73998, "JavaScript": 29965, "HTML": 1990, "Dockerfile": 706, "CSS": 606, "Shell": 337}
package de.dhbw.ka.domain.valueobjects data class RentalRequestResult( val approved: Boolean, val reasonsOfDenial: List<String> )
0
Kotlin
0
2
f6eefb986e4bfc3c229f7a7d3a948d6fb9770626
139
ase-project
MIT License
src/main/java/challenges/cracking_coding_interview/moderate/q6_smallest_difference/QuestionC.kt
MalekKamel
342,007,920
false
{"Kotlin": 835322}
package challenges.cracking_coding_interview.moderate.q6_smallest_difference import java.util.* object QuestionC { private fun getClosestValue(array: IntArray, target: Int): Int { var low = 0 var high = array.size - 1 var mid: Int while (low <= high) { mid = low + (high - low) / 2 if (array[mid] < target) { low = mid + 1 } else if (array[mid] > target) { high = mid - 1 } else { return array[mid] } } val valueA = if (low < 0 || low >= array.size) Int.MAX_VALUE else array[low] val valueB = if (high < 0 || high >= array.size) Int.MAX_VALUE else array[high] return if (Math.abs(valueA - target) < Math.abs(valueB - target)) valueA else valueB // return closest value } fun findSmallestDifference(shorter: IntArray, longer: IntArray): Int { if (shorter.isEmpty() || longer.isEmpty()) return -1 if (shorter.size > longer.size) return findSmallestDifference(longer, shorter) Arrays.sort(shorter) var smallestDifference = Int.MAX_VALUE for (target in longer) { val closest = getClosestValue(shorter, target) smallestDifference = Math.min(smallestDifference, Math.abs(closest - target)) } return smallestDifference } @JvmStatic fun main(args: Array<String>) { val array1 = intArrayOf(1, 3, 15, 11, 2) val array2 = intArrayOf(23, 127, 234, 19, 8) val difference = findSmallestDifference(array1, array2) println(difference) } }
0
Kotlin
0
1
a465bff204ef63ecfbea5c520303ed5312ccf6e8
1,638
ProblemSolving
Apache License 2.0
app/src/main/java/com/vladimirpetrovski/currencyconverter/ui/utils/CropBitmapTransformation.kt
vladimirpetrovski
199,713,601
false
null
package com.vladimirpetrovski.currencyconverter.ui.utils import android.graphics.Bitmap import com.squareup.picasso.Transformation class CropBitmapTransformation : Transformation { override fun transform(source: Bitmap): Bitmap { val croppedBitmap = Bitmap.createBitmap( source, 0, 40, source.width, source.height - 80 ) source.recycle() return croppedBitmap } override fun key(): String { return "CropCircleTransformation()" } }
0
Kotlin
0
3
5979a2e1ccc0267d967302fc3a082b75c714b9a6
551
CurrencyConverter
The Unlicense
raft-test/src/test/kotlin/RaftServerTest.kt
dreamlike-ocean
505,124,997
false
{"Kotlin": 84864, "Java": 6524}
import io.vertx.core.CompositeFuture import io.vertx.core.Vertx import io.vertx.core.net.SocketAddress import org.junit.Assert import org.junit.Test import top.dreamlike.base.KV.ByteArrayKey import top.dreamlike.base.raft.RaftAddress import top.dreamlike.base.raft.RaftStatus import top.dreamlike.base.util.block import top.dreamlike.base.util.initJacksonMapper import top.dreamlike.configurarion.Configuration import top.dreamlike.raft.client.RaftClient import top.dreamlike.server.RaftServer class RaftServerTest { @Test fun testServer() { initJacksonMapper() val httpPort = 8080 val configurations = mutableListOf<Configuration>() val vertx = Vertx.vertx() val nodes = mapOf( "raft-0" to RaftAddress(80, "localhost"), "raft-1" to RaftAddress(81, "localhost"), "raft-2" to RaftAddress(82, "localhost"), ) for (i in (0 .. 2)) { val nodeId = "raft-$i" configurations.add( Configuration( nodeId, nodes[nodeId]!!.port, httpPort + i, mapOf(), HashMap(nodes).apply { remove(nodeId) }) ) } val servers = configurations .map { RaftServer(it)} CompositeFuture.all(servers.map(RaftServer::start)).block() Thread.sleep(2000) val leaders = servers.filter { it.raft.status == RaftStatus.lead } Assert.assertEquals(1, leaders.size) val leaderServer = leaders[0] println("leader is ${leaderServer.raft.me}") val client = RaftClient( vertx, SocketAddress.inetSocketAddress(leaderServer.configuration.httpPort, "localhost") ) val snap = client.peekRaft().block() val raft = leaderServer.raft Assert.assertEquals(raft.commitIndex, snap.raftState.commitIndex) //set测试 val key = "key1".toByteArray() val value = "value1".toByteArray() val buffer = client.set(key, value).block() val db = raft.stateMachine.db Assert.assertArrayEquals(value, db[ByteArrayKey(key)]) var dataResult = client.get(key).block() Assert.assertFalse(dataResult.hasError) Assert.assertArrayEquals(value, dataResult.value.bytes) println("set command success, the value that client gotten is ${String(dataResult.value.bytes)}") // del测试 val delRes = client.del(key).block() Assert.assertNull(db[ByteArrayKey(key)]) dataResult = client.get(key).block() Assert.assertEquals(0, dataResult.value.length()) println("after del, the value that client gotten is ${String(dataResult.value.bytes)}") } @Test fun testAddServer() { initJacksonMapper() val httpPort = 8080 val configurations = mutableListOf<Configuration>() val vertx = Vertx.vertx() val nodes = mapOf( "raft-0" to RaftAddress(80, "localhost"), "raft-1" to RaftAddress(81, "localhost"), "raft-2" to RaftAddress(82, "localhost"), ) for (i in (0..2)) { val nodeId = "raft-$i" configurations.add( Configuration( nodeId, nodes[nodeId]!!.port, httpPort + i, mapOf(), HashMap(nodes).apply { remove(nodeId) }) ) } val servers = configurations .map { RaftServer(it) } CompositeFuture.all(servers.map(RaftServer::start)).block() Thread.sleep(2000) val leaders = servers.filter { it.raft.status == RaftStatus.lead } Assert.assertEquals(1, leaders.size) val leaderServer = leaders[0] println("leader is ${leaderServer.raft.me}") val raft = leaderServer.raft Assert.assertEquals(RaftStatus.lead, raft.status) raft.addLog(SetCommandCreate("1", "123")) raft.addLog(SetCommandCreate("2", "123")) raft.addLog(SetCommandCreate("3", "123")) Thread.sleep(1000) Assert.assertArrayEquals( "123".toByteArray(), raft.stateMachine.getDirect("1".toByteArray()) ) Assert.assertArrayEquals( "123".toByteArray(), raft.stateMachine.getDirect("2".toByteArray()) ) Assert.assertArrayEquals( "123".toByteArray(), raft.stateMachine.getDirect("3".toByteArray()) ) val otherNodeConfiguration = Configuration( "raft-wait", 83, 8083, mapOf(), mapOf(), RaftAddress(leaderServer.raft.raftPort, "localhost") ) val waitRaftServer = RaftServer(otherNodeConfiguration) waitRaftServer .start().block() Thread.sleep(1000) println("leader node,peer is ${raft.peers}") val waitRaft = waitRaftServer.raft Assert.assertArrayEquals( "123".toByteArray(), waitRaft.stateMachine.getDirect("1".toByteArray()) ) Assert.assertArrayEquals( "123".toByteArray(), waitRaft.stateMachine.getDirect("2".toByteArray()) ) Assert.assertArrayEquals( "123".toByteArray(), waitRaft.stateMachine.getDirect("3".toByteArray()) ) println("read from new nodeL key is 1 ,value is ${String(waitRaft.stateMachine.getDirect("1".toByteArray())!!)}") println("wait Raft peer is ${waitRaft.peers}") val otherServer = servers .filter { it.raft.me != leaderServer.raft.me } .find { true }!! println("other Raft peer is ${otherServer.raft.peers}") } }
0
Kotlin
0
3
5b9600e859e52b1d689fe2c1c6e600b5a248aaac
5,826
raft-kt
MIT License
app/src/main/java/com/projectAnya/stunthink/data/remote/dto/nutrition/FoodDto.kt
MFachriA
646,533,160
false
null
package com.projectAnya.stunthink.data.remote.dto.nutrition import android.os.Parcelable import kotlinx.parcelize.Parcelize @Parcelize data class FoodDto( val dataGizi: NutritionDto, val image: String? ): Parcelable
0
Kotlin
0
1
3b24e2e44450dd23aaf8b67dbb066409fa4ed6e2
225
StunThink
Freetype Project License
build-logic/convention/src/main/kotlin/configurations/JavaVersion.kt
JohannesPtaszyk
695,929,733
false
{"Kotlin": 517345}
package configurations import org.gradle.api.JavaVersion val projectJavaVersion = JavaVersion.VERSION_21
7
Kotlin
0
2
3922adf99efda2494d254b97e51bda754c3b0859
107
Abonity
Apache License 2.0
buildSrc/src/main/kotlin/ApplicationConfig.kt
pitagorasampli
650,752,226
false
null
object ApplicationConfig { const val android_ds_library_id = "br.com.cogna.pegasusdesignsystemandroid" const val android_ds_showcase_app_id = "br.com.cogna.ui.pegasus_showcase" //Default Configs const val minSdk = 21 const val buildToolsVersion = "31.0.0" const val compileSdkVersion = 33 const val targetSdk = compileSdkVersion } object Releases { const val android_ds_version_code = 1 const val android_ds_version_name = "0.0.1" } object Publishing{ //Publishing Configs const val android_ds_publish_library_group_id = "com.github.pitagorasampli" const val android_ds_publish_library_artifact_id = "pegasus-design-system-android" const val android_ds_publish_release_version_name = "0.0.8-Test" }
0
Kotlin
0
0
e2dd7fa6d1f42a243c308ec2992322856657e568
757
pegasus-design-system-android
MIT License
library/src/main/java/cz/mroczis/netmonster/core/feature/config/CellLocationSource.kt
rtr-nettest
459,160,473
true
{"Kotlin": 418811}
package cz.mroczis.netmonster.core.feature.config import android.Manifest import android.telephony.CellLocation import android.telephony.PhoneStateListener import android.telephony.ServiceState import android.telephony.TelephonyManager import androidx.annotation.RequiresPermission import cz.mroczis.netmonster.core.cache.TelephonyCache import cz.mroczis.netmonster.core.feature.config.CellLocationSource.CellLocationListener import cz.mroczis.netmonster.core.util.PhoneStateListenerPort /** * Attempts to fetch fresh [CellLocation] using [CellLocationListener]. If this * approach fails then looks to cache in [TelephonyManager]. */ class CellLocationSource { /** * Registers [CellLocationListener] and awaits data. After 100 milliseconds time outs if * nothing is delivered. * * On Android O and newer directly grabs [ServiceState] from [TelephonyManager]. */ @RequiresPermission(allOf = [Manifest.permission.ACCESS_FINE_LOCATION]) @Suppress("DEPRECATION") fun get(telephonyManager: TelephonyManager, subId: Int?): CellLocation? = getFresh(telephonyManager, subId) ?: try { telephonyManager.cellLocation } catch (e : NullPointerException) { // Xiaomi Mi 10, SDK 30 throws NPE here when data are not available null } private fun getFresh(telephonyManager: TelephonyManager, subId: Int?): CellLocation? = TelephonyCache.getOrUpdate(subId, PhoneStateListener.LISTEN_CELL_LOCATION) { telephonyManager.requestSingleUpdate<CellLocation>(PhoneStateListener.LISTEN_CELL_LOCATION) { onData -> CellLocationListener(subId, onData) } } /** * Kotlin friendly PhoneStateListener that grabs [CellLocation] */ private class CellLocationListener( subId: Int?, private val simStateListener: CellLocationListener.(state: CellLocation) -> Unit ) : PhoneStateListenerPort(subId) { override fun onCellLocationChanged(location: CellLocation?) { super.onCellLocationChanged(location) if (location != null) { simStateListener.invoke(this, location) } } } }
0
null
0
4
4554151838db718c1bd9a78bf6cee3e25a210122
2,213
netmonster-core
Apache License 2.0
tabler/src/commonMain/kotlin/com/woowla/compose/icon/collections/tabler/tabler/outline/StackPop.kt
walter-juan
868,046,028
false
{"Kotlin": 20416825}
package com.woowla.compose.icon.collections.tabler.tabler.outline import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.PathFillType.Companion.NonZero import androidx.compose.ui.graphics.SolidColor import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.graphics.vector.ImageVector.Builder import androidx.compose.ui.graphics.vector.path import androidx.compose.ui.unit.dp import com.woowla.compose.icon.collections.tabler.tabler.OutlineGroup import androidx.compose.ui.graphics.StrokeCap.Companion.Round as strokeCapRound import androidx.compose.ui.graphics.StrokeJoin.Companion.Round as strokeJoinRound public val OutlineGroup.StackPop: ImageVector get() { if (_stackPop != null) { return _stackPop!! } _stackPop = Builder(name = "StackPop", defaultWidth = 24.0.dp, defaultHeight = 24.0.dp, viewportWidth = 24.0f, viewportHeight = 24.0f).apply { path(fill = SolidColor(Color(0x00000000)), stroke = SolidColor(Color(0xFF000000)), strokeLineWidth = 2.0f, strokeLineCap = strokeCapRound, strokeLineJoin = strokeJoinRound, strokeLineMiter = 4.0f, pathFillType = NonZero) { moveTo(7.0f, 9.5f) lineToRelative(-3.0f, 1.5f) lineToRelative(8.0f, 4.0f) lineToRelative(8.0f, -4.0f) lineToRelative(-3.0f, -1.5f) } path(fill = SolidColor(Color(0x00000000)), stroke = SolidColor(Color(0xFF000000)), strokeLineWidth = 2.0f, strokeLineCap = strokeCapRound, strokeLineJoin = strokeJoinRound, strokeLineMiter = 4.0f, pathFillType = NonZero) { moveTo(4.0f, 15.0f) lineToRelative(8.0f, 4.0f) lineToRelative(8.0f, -4.0f) } path(fill = SolidColor(Color(0x00000000)), stroke = SolidColor(Color(0xFF000000)), strokeLineWidth = 2.0f, strokeLineCap = strokeCapRound, strokeLineJoin = strokeJoinRound, strokeLineMiter = 4.0f, pathFillType = NonZero) { moveTo(12.0f, 11.0f) verticalLineToRelative(-7.0f) } path(fill = SolidColor(Color(0x00000000)), stroke = SolidColor(Color(0xFF000000)), strokeLineWidth = 2.0f, strokeLineCap = strokeCapRound, strokeLineJoin = strokeJoinRound, strokeLineMiter = 4.0f, pathFillType = NonZero) { moveTo(9.0f, 7.0f) lineToRelative(3.0f, -3.0f) lineToRelative(3.0f, 3.0f) } } .build() return _stackPop!! } private var _stackPop: ImageVector? = null
0
Kotlin
0
1
b037895588c2f62d069c724abe624b67c0889bf9
2,755
compose-icon-collections
MIT License
snapdifferlib/src/main/java/me/anwarshahriar/snapdifferlib/SnapDiffer.kt
AnwarShahriar
245,556,759
false
null
package me.anwarshahriar.snapdifferlib import android.content.res.Resources import android.util.Log import java.lang.reflect.Field class SnapDiffer(private val resources: Resources, private val packageName: String) { private val layoutClass = Class.forName("${packageName}.R\$layout") init { logAllToolAttributes() } private fun logAllToolAttributes() { val fields: Array<Field> = layoutClass.declaredFields fields.forEach { field -> Log.d(TAG, "Field: ${field.name}") } } companion object { const val TAG: String = "SnapDiffer" } }
1
Kotlin
0
0
2ec17b7e3cac0cfceab85c79af4ffe1253a636e0
617
SnapDiffer
MIT License
src/main/kotlin/ru/dageev/compiler/Compiler.kt
rmnn
54,289,657
false
null
package ru.dageev.compiler import org.slf4j.LoggerFactory import ru.dageev.compiler.bytecodegeneration.CompilationUnitGenerator import ru.dageev.compiler.parser.Parser import java.io.File /** * Created by dageev * on 11/26/16. */ class Compiler { companion object { val logger = LoggerFactory.getLogger(Compiler::class.java) val parser = Parser() val byteCodeGenerator = CompilationUnitGenerator() } fun compile(args: Array<String>) { if (!correctArgs(args)) { return } val program = parser.parse(args[0]) logger.info("Successfully parsed from ${args[0]}") val targetDir = createTargetDir() val classToByteCodeMap = byteCodeGenerator.generate(program) classToByteCodeMap.forEach { classToByteCode -> val classFile = File(targetDir, classToByteCode.key + ".class") classFile.writeBytes(classToByteCode.value) } logger.info("Successfully compiled ${classToByteCodeMap.size} classes to ${targetDir.absolutePath}") } private fun createTargetDir(): File { val targetDir = File("target") if (!targetDir.exists()) { targetDir.mkdirs() } return targetDir } private fun correctArgs(args: Array<String>): Boolean { if (args.isEmpty()) { logger.error("Please specify file to be compiled") return false } if (args.size > 1) { logger.error("Arguments should contains only 1 file to be compiled") return false } val filePath = args[0] if (!filePath.endsWith(suffix = ".elg")) { logger.error("Incorrect file format. Should be *.elg") return false } return true } } fun main(args: Array<String>) { Compiler().compile(args) }
0
Kotlin
0
0
ea5213229ef4037ff02665854ccd15d9f16d56a0
1,873
compiler
Apache License 2.0
app/src/main/java/com/corrot/firenotes/FirebaseRepository.kt
gitcorrot
220,007,785
false
null
package com.corrot.firenotes import android.util.Log import com.corrot.firenotes.model.Note import com.corrot.firenotes.model.User import com.corrot.firenotes.utils.Constants import com.google.android.gms.tasks.OnCompleteListener import com.google.firebase.auth.FirebaseAuth import com.google.firebase.database.FirebaseDatabase import com.google.firebase.database.ValueEventListener class FirebaseRepository { companion object { @JvmField val TAG: String = FirebaseRepository::class.java.simpleName } private var database: FirebaseDatabase = FirebaseDatabase.getInstance() private var auth: FirebaseAuth = FirebaseAuth.getInstance() private var listener: ValueEventListener? = null fun createUser(id: String, email: String?, username: String?) { val user = User(id) email?.let { user.email = it } username?.let { user.username = it } database .reference .child(Constants.USER_KEY) .child(id) .setValue(user) .addOnCompleteListener { result -> when (result.isSuccessful) { true -> Log.d(TAG, "createUser:success") false -> Log.e(TAG, "createUser:failed") } } } fun addNoteToDatabase(note: Note) { auth.uid?.let { uid -> val ref = if (note.id.isEmpty()) { database.reference .child(Constants.NOTE_KEY) .child(uid) .push() } else { database.reference .child(Constants.NOTE_KEY) .child(uid) .child(note.id) } if (note.id.isEmpty()) note.id = ref.key!! ref.setValue(note) .addOnCompleteListener { result -> when (result.isSuccessful) { true -> Log.d(TAG, "addNoteToDatabase:success") false -> Log.e(TAG, "addNoteToDatabase:failed") } } } } fun addNotesListener(listener: ValueEventListener) { this.listener = listener auth.uid?.let { uid -> database .reference .child(Constants.NOTE_KEY) .child(uid) .orderByChild("pinned") .addValueEventListener(listener) } } fun removeNoteWithId(noteId: String, listener: OnCompleteListener<Void>) { auth.uid?.let { uid -> val ref = database .reference .child(Constants.NOTE_KEY) .child(uid) .child(noteId) ref.removeValue() .addOnCompleteListener(listener) } } fun pinUpNote(note: Note, listener: OnCompleteListener<Void>) { auth.uid?.let { uid -> val ref = database .reference .child(Constants.NOTE_KEY) .child(uid) .child(note.id) .child("pinned") ref.setValue(!note.pinned) .addOnCompleteListener(listener) } } fun removeNotesListener() { // TODO: remove listener (?) // database // .reference // .child(Constants.NOTE_KEY) // .child(auth.uid!!) // .removeEventListener(listener) } }
0
Kotlin
0
0
06b075d6cf7a41668ca09ce69868d37c8cbcb920
3,474
Fire_Notes
Apache License 2.0
sam-kotlin-core/src/main/kotlin/software/elborai/api/models/InboundInternationalAchTransfer.kt
DefinitelyATestOrg
787,029,213
false
{"Kotlin": 12996764, "Shell": 3638, "Dockerfile": 366}
// File generated from our OpenAPI spec by Stainless. package software.elborai.api.models import com.fasterxml.jackson.annotation.JsonAnyGetter import com.fasterxml.jackson.annotation.JsonAnySetter import com.fasterxml.jackson.annotation.JsonCreator import com.fasterxml.jackson.annotation.JsonIgnoreProperties import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.core.JsonGenerator import com.fasterxml.jackson.core.ObjectCodec import com.fasterxml.jackson.databind.annotation.JsonDeserialize import com.fasterxml.jackson.databind.annotation.JsonSerialize import com.fasterxml.jackson.databind.JsonNode import com.fasterxml.jackson.databind.SerializerProvider import com.fasterxml.jackson.module.kotlin.jacksonTypeRef import java.time.LocalDate import java.time.OffsetDateTime import java.time.format.DateTimeFormatter import java.util.Objects import java.util.Optional import java.util.UUID import software.elborai.api.core.BaseDeserializer import software.elborai.api.core.BaseSerializer import software.elborai.api.core.getOrThrow import software.elborai.api.core.ExcludeMissing import software.elborai.api.core.JsonMissing import software.elborai.api.core.JsonValue import software.elborai.api.core.JsonNull import software.elborai.api.core.JsonField import software.elborai.api.core.Enum import software.elborai.api.core.toUnmodifiable import software.elborai.api.core.NoAutoDetect import software.elborai.api.errors.IncreaseInvalidDataException /** * An Inbound International ACH Transfer is created when an "IAT" ACH transfer is * initiated at another bank and received by Increase. There are additional fields * on this object that are not present on all Inbound ACH Transfer object. */ @JsonDeserialize(builder = InboundInternationalAchTransfer.Builder::class) @NoAutoDetect class InboundInternationalAchTransfer private constructor( private val amount: JsonField<Long>, private val destinationCountryCode: JsonField<String>, private val destinationCurrencyCode: JsonField<String>, private val foreignExchangeIndicator: JsonField<ForeignExchangeIndicator>, private val foreignExchangeReference: JsonField<String>, private val foreignExchangeReferenceIndicator: JsonField<ForeignExchangeReferenceIndicator>, private val foreignPaymentAmount: JsonField<Long>, private val foreignTraceNumber: JsonField<String>, private val internationalTransactionTypeCode: JsonField<InternationalTransactionTypeCode>, private val originatingCurrencyCode: JsonField<String>, private val originatingDepositoryFinancialInstitutionBranchCountry: JsonField<String>, private val originatingDepositoryFinancialInstitutionId: JsonField<String>, private val originatingDepositoryFinancialInstitutionIdQualifier: JsonField<OriginatingDepositoryFinancialInstitutionIdQualifier>, private val originatingDepositoryFinancialInstitutionName: JsonField<String>, private val originatorCity: JsonField<String>, private val originatorCompanyEntryDescription: JsonField<String>, private val originatorCountry: JsonField<String>, private val originatorIdentification: JsonField<String>, private val originatorName: JsonField<String>, private val originatorPostalCode: JsonField<String>, private val originatorStateOrProvince: JsonField<String>, private val originatorStreetAddress: JsonField<String>, private val paymentRelatedInformation: JsonField<String>, private val paymentRelatedInformation2: JsonField<String>, private val receiverCity: JsonField<String>, private val receiverCountry: JsonField<String>, private val receiverIdentificationNumber: JsonField<String>, private val receiverPostalCode: JsonField<String>, private val receiverStateOrProvince: JsonField<String>, private val receiverStreetAddress: JsonField<String>, private val receivingCompanyOrIndividualName: JsonField<String>, private val receivingDepositoryFinancialInstitutionCountry: JsonField<String>, private val receivingDepositoryFinancialInstitutionId: JsonField<String>, private val receivingDepositoryFinancialInstitutionIdQualifier: JsonField<ReceivingDepositoryFinancialInstitutionIdQualifier>, private val receivingDepositoryFinancialInstitutionName: JsonField<String>, private val traceNumber: JsonField<String>, private val type: JsonField<Type>, private val additionalProperties: Map<String, JsonValue>, ) { private var validated: Boolean = false private var hashCode: Int = 0 /** * The amount in the minor unit of the destination account currency. For dollars, * for example, this is cents. */ fun amount(): Long = amount.getRequired("amount") /** * The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 * country code of the destination country. */ fun destinationCountryCode(): String = destinationCountryCode.getRequired("destination_country_code") /** * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the * destination bank account. */ fun destinationCurrencyCode(): String = destinationCurrencyCode.getRequired("destination_currency_code") /** A description of how the foreign exchange rate was calculated. */ fun foreignExchangeIndicator(): ForeignExchangeIndicator = foreignExchangeIndicator.getRequired("foreign_exchange_indicator") /** * Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a * reference to a well-known rate. */ fun foreignExchangeReference(): String? = foreignExchangeReference.getNullable("foreign_exchange_reference") /** * An instruction of how to interpret the `foreign_exchange_reference` field for * this Transaction. */ fun foreignExchangeReferenceIndicator(): ForeignExchangeReferenceIndicator = foreignExchangeReferenceIndicator.getRequired("foreign_exchange_reference_indicator") /** * The amount in the minor unit of the foreign payment currency. For dollars, for * example, this is cents. */ fun foreignPaymentAmount(): Long = foreignPaymentAmount.getRequired("foreign_payment_amount") /** A reference number in the foreign banking infrastructure. */ fun foreignTraceNumber(): String? = foreignTraceNumber.getNullable("foreign_trace_number") /** The type of transfer. Set by the originator. */ fun internationalTransactionTypeCode(): InternationalTransactionTypeCode = internationalTransactionTypeCode.getRequired("international_transaction_type_code") /** * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the * originating bank account. */ fun originatingCurrencyCode(): String = originatingCurrencyCode.getRequired("originating_currency_code") /** * The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 * country code of the originating branch country. */ fun originatingDepositoryFinancialInstitutionBranchCountry(): String = originatingDepositoryFinancialInstitutionBranchCountry.getRequired("originating_depository_financial_institution_branch_country") /** * An identifier for the originating bank. One of an International Bank Account * Number (IBAN) bank identifier, SWIFT Bank Identification Code (BIC), or a * domestic identifier like a US Routing Number. */ fun originatingDepositoryFinancialInstitutionId(): String = originatingDepositoryFinancialInstitutionId.getRequired("originating_depository_financial_institution_id") /** * An instruction of how to interpret the * `originating_depository_financial_institution_id` field for this Transaction. */ fun originatingDepositoryFinancialInstitutionIdQualifier(): OriginatingDepositoryFinancialInstitutionIdQualifier = originatingDepositoryFinancialInstitutionIdQualifier.getRequired("originating_depository_financial_institution_id_qualifier") /** * The name of the originating bank. Sometimes this will refer to an American bank * and obscure the correspondent foreign bank. */ fun originatingDepositoryFinancialInstitutionName(): String = originatingDepositoryFinancialInstitutionName.getRequired("originating_depository_financial_institution_name") /** A portion of the originator address. This may be incomplete. */ fun originatorCity(): String = originatorCity.getRequired("originator_city") /** A description field set by the originator. */ fun originatorCompanyEntryDescription(): String = originatorCompanyEntryDescription.getRequired("originator_company_entry_description") /** * A portion of the originator address. The * [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 country * code of the originator country. */ fun originatorCountry(): String = originatorCountry.getRequired("originator_country") /** * An identifier for the originating company. This is generally stable across * multiple ACH transfers. */ fun originatorIdentification(): String = originatorIdentification.getRequired("originator_identification") /** Either the name of the originator or an intermediary money transmitter. */ fun originatorName(): String = originatorName.getRequired("originator_name") /** A portion of the originator address. This may be incomplete. */ fun originatorPostalCode(): String? = originatorPostalCode.getNullable("originator_postal_code") /** A portion of the originator address. This may be incomplete. */ fun originatorStateOrProvince(): String? = originatorStateOrProvince.getNullable("originator_state_or_province") /** A portion of the originator address. This may be incomplete. */ fun originatorStreetAddress(): String = originatorStreetAddress.getRequired("originator_street_address") /** A description field set by the originator. */ fun paymentRelatedInformation(): String? = paymentRelatedInformation.getNullable("payment_related_information") /** A description field set by the originator. */ fun paymentRelatedInformation2(): String? = paymentRelatedInformation2.getNullable("payment_related_information2") /** A portion of the receiver address. This may be incomplete. */ fun receiverCity(): String = receiverCity.getRequired("receiver_city") /** * A portion of the receiver address. The * [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 country * code of the receiver country. */ fun receiverCountry(): String = receiverCountry.getRequired("receiver_country") /** An identification number the originator uses for the receiver. */ fun receiverIdentificationNumber(): String? = receiverIdentificationNumber.getNullable("receiver_identification_number") /** A portion of the receiver address. This may be incomplete. */ fun receiverPostalCode(): String? = receiverPostalCode.getNullable("receiver_postal_code") /** A portion of the receiver address. This may be incomplete. */ fun receiverStateOrProvince(): String? = receiverStateOrProvince.getNullable("receiver_state_or_province") /** A portion of the receiver address. This may be incomplete. */ fun receiverStreetAddress(): String = receiverStreetAddress.getRequired("receiver_street_address") /** The name of the receiver of the transfer. This is not verified by Increase. */ fun receivingCompanyOrIndividualName(): String = receivingCompanyOrIndividualName.getRequired("receiving_company_or_individual_name") /** * The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 * country code of the receiving bank country. */ fun receivingDepositoryFinancialInstitutionCountry(): String = receivingDepositoryFinancialInstitutionCountry.getRequired("receiving_depository_financial_institution_country") /** * An identifier for the receiving bank. One of an International Bank Account * Number (IBAN) bank identifier, SWIFT Bank Identification Code (BIC), or a * domestic identifier like a US Routing Number. */ fun receivingDepositoryFinancialInstitutionId(): String = receivingDepositoryFinancialInstitutionId.getRequired("receiving_depository_financial_institution_id") /** * An instruction of how to interpret the * `receiving_depository_financial_institution_id` field for this Transaction. */ fun receivingDepositoryFinancialInstitutionIdQualifier(): ReceivingDepositoryFinancialInstitutionIdQualifier = receivingDepositoryFinancialInstitutionIdQualifier.getRequired("receiving_depository_financial_institution_id_qualifier") /** The name of the receiving bank, as set by the sending financial institution. */ fun receivingDepositoryFinancialInstitutionName(): String = receivingDepositoryFinancialInstitutionName.getRequired("receiving_depository_financial_institution_name") /** * A 15 digit number recorded in the Nacha file and available to both the * originating and receiving bank. Along with the amount, date, and originating * routing number, this can be used to identify the ACH transfer at either bank. * ACH trace numbers are not unique, but are * [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). */ fun traceNumber(): String = traceNumber.getRequired("trace_number") /** * A constant representing the object's type. For this resource it will always be * `inbound_international_ach_transfer`. */ fun type(): Type = type.getRequired("type") /** * The amount in the minor unit of the destination account currency. For dollars, * for example, this is cents. */ @JsonProperty("amount") @ExcludeMissing fun _amount() = amount /** * The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 * country code of the destination country. */ @JsonProperty("destination_country_code") @ExcludeMissing fun _destinationCountryCode() = destinationCountryCode /** * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the * destination bank account. */ @JsonProperty("destination_currency_code") @ExcludeMissing fun _destinationCurrencyCode() = destinationCurrencyCode /** A description of how the foreign exchange rate was calculated. */ @JsonProperty("foreign_exchange_indicator") @ExcludeMissing fun _foreignExchangeIndicator() = foreignExchangeIndicator /** * Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a * reference to a well-known rate. */ @JsonProperty("foreign_exchange_reference") @ExcludeMissing fun _foreignExchangeReference() = foreignExchangeReference /** * An instruction of how to interpret the `foreign_exchange_reference` field for * this Transaction. */ @JsonProperty("foreign_exchange_reference_indicator") @ExcludeMissing fun _foreignExchangeReferenceIndicator() = foreignExchangeReferenceIndicator /** * The amount in the minor unit of the foreign payment currency. For dollars, for * example, this is cents. */ @JsonProperty("foreign_payment_amount") @ExcludeMissing fun _foreignPaymentAmount() = foreignPaymentAmount /** A reference number in the foreign banking infrastructure. */ @JsonProperty("foreign_trace_number") @ExcludeMissing fun _foreignTraceNumber() = foreignTraceNumber /** The type of transfer. Set by the originator. */ @JsonProperty("international_transaction_type_code") @ExcludeMissing fun _internationalTransactionTypeCode() = internationalTransactionTypeCode /** * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the * originating bank account. */ @JsonProperty("originating_currency_code") @ExcludeMissing fun _originatingCurrencyCode() = originatingCurrencyCode /** * The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 * country code of the originating branch country. */ @JsonProperty("originating_depository_financial_institution_branch_country") @ExcludeMissing fun _originatingDepositoryFinancialInstitutionBranchCountry() = originatingDepositoryFinancialInstitutionBranchCountry /** * An identifier for the originating bank. One of an International Bank Account * Number (IBAN) bank identifier, SWIFT Bank Identification Code (BIC), or a * domestic identifier like a US Routing Number. */ @JsonProperty("originating_depository_financial_institution_id") @ExcludeMissing fun _originatingDepositoryFinancialInstitutionId() = originatingDepositoryFinancialInstitutionId /** * An instruction of how to interpret the * `originating_depository_financial_institution_id` field for this Transaction. */ @JsonProperty("originating_depository_financial_institution_id_qualifier") @ExcludeMissing fun _originatingDepositoryFinancialInstitutionIdQualifier() = originatingDepositoryFinancialInstitutionIdQualifier /** * The name of the originating bank. Sometimes this will refer to an American bank * and obscure the correspondent foreign bank. */ @JsonProperty("originating_depository_financial_institution_name") @ExcludeMissing fun _originatingDepositoryFinancialInstitutionName() = originatingDepositoryFinancialInstitutionName /** A portion of the originator address. This may be incomplete. */ @JsonProperty("originator_city") @ExcludeMissing fun _originatorCity() = originatorCity /** A description field set by the originator. */ @JsonProperty("originator_company_entry_description") @ExcludeMissing fun _originatorCompanyEntryDescription() = originatorCompanyEntryDescription /** * A portion of the originator address. The * [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 country * code of the originator country. */ @JsonProperty("originator_country") @ExcludeMissing fun _originatorCountry() = originatorCountry /** * An identifier for the originating company. This is generally stable across * multiple ACH transfers. */ @JsonProperty("originator_identification") @ExcludeMissing fun _originatorIdentification() = originatorIdentification /** Either the name of the originator or an intermediary money transmitter. */ @JsonProperty("originator_name") @ExcludeMissing fun _originatorName() = originatorName /** A portion of the originator address. This may be incomplete. */ @JsonProperty("originator_postal_code") @ExcludeMissing fun _originatorPostalCode() = originatorPostalCode /** A portion of the originator address. This may be incomplete. */ @JsonProperty("originator_state_or_province") @ExcludeMissing fun _originatorStateOrProvince() = originatorStateOrProvince /** A portion of the originator address. This may be incomplete. */ @JsonProperty("originator_street_address") @ExcludeMissing fun _originatorStreetAddress() = originatorStreetAddress /** A description field set by the originator. */ @JsonProperty("payment_related_information") @ExcludeMissing fun _paymentRelatedInformation() = paymentRelatedInformation /** A description field set by the originator. */ @JsonProperty("payment_related_information2") @ExcludeMissing fun _paymentRelatedInformation2() = paymentRelatedInformation2 /** A portion of the receiver address. This may be incomplete. */ @JsonProperty("receiver_city") @ExcludeMissing fun _receiverCity() = receiverCity /** * A portion of the receiver address. The * [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 country * code of the receiver country. */ @JsonProperty("receiver_country") @ExcludeMissing fun _receiverCountry() = receiverCountry /** An identification number the originator uses for the receiver. */ @JsonProperty("receiver_identification_number") @ExcludeMissing fun _receiverIdentificationNumber() = receiverIdentificationNumber /** A portion of the receiver address. This may be incomplete. */ @JsonProperty("receiver_postal_code") @ExcludeMissing fun _receiverPostalCode() = receiverPostalCode /** A portion of the receiver address. This may be incomplete. */ @JsonProperty("receiver_state_or_province") @ExcludeMissing fun _receiverStateOrProvince() = receiverStateOrProvince /** A portion of the receiver address. This may be incomplete. */ @JsonProperty("receiver_street_address") @ExcludeMissing fun _receiverStreetAddress() = receiverStreetAddress /** The name of the receiver of the transfer. This is not verified by Increase. */ @JsonProperty("receiving_company_or_individual_name") @ExcludeMissing fun _receivingCompanyOrIndividualName() = receivingCompanyOrIndividualName /** * The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 * country code of the receiving bank country. */ @JsonProperty("receiving_depository_financial_institution_country") @ExcludeMissing fun _receivingDepositoryFinancialInstitutionCountry() = receivingDepositoryFinancialInstitutionCountry /** * An identifier for the receiving bank. One of an International Bank Account * Number (IBAN) bank identifier, SWIFT Bank Identification Code (BIC), or a * domestic identifier like a US Routing Number. */ @JsonProperty("receiving_depository_financial_institution_id") @ExcludeMissing fun _receivingDepositoryFinancialInstitutionId() = receivingDepositoryFinancialInstitutionId /** * An instruction of how to interpret the * `receiving_depository_financial_institution_id` field for this Transaction. */ @JsonProperty("receiving_depository_financial_institution_id_qualifier") @ExcludeMissing fun _receivingDepositoryFinancialInstitutionIdQualifier() = receivingDepositoryFinancialInstitutionIdQualifier /** The name of the receiving bank, as set by the sending financial institution. */ @JsonProperty("receiving_depository_financial_institution_name") @ExcludeMissing fun _receivingDepositoryFinancialInstitutionName() = receivingDepositoryFinancialInstitutionName /** * A 15 digit number recorded in the Nacha file and available to both the * originating and receiving bank. Along with the amount, date, and originating * routing number, this can be used to identify the ACH transfer at either bank. * ACH trace numbers are not unique, but are * [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). */ @JsonProperty("trace_number") @ExcludeMissing fun _traceNumber() = traceNumber /** * A constant representing the object's type. For this resource it will always be * `inbound_international_ach_transfer`. */ @JsonProperty("type") @ExcludeMissing fun _type() = type @JsonAnyGetter @ExcludeMissing fun _additionalProperties(): Map<String, JsonValue> = additionalProperties fun validate(): InboundInternationalAchTransfer = apply { if (!validated) { amount() destinationCountryCode() destinationCurrencyCode() foreignExchangeIndicator() foreignExchangeReference() foreignExchangeReferenceIndicator() foreignPaymentAmount() foreignTraceNumber() internationalTransactionTypeCode() originatingCurrencyCode() originatingDepositoryFinancialInstitutionBranchCountry() originatingDepositoryFinancialInstitutionId() originatingDepositoryFinancialInstitutionIdQualifier() originatingDepositoryFinancialInstitutionName() originatorCity() originatorCompanyEntryDescription() originatorCountry() originatorIdentification() originatorName() originatorPostalCode() originatorStateOrProvince() originatorStreetAddress() paymentRelatedInformation() paymentRelatedInformation2() receiverCity() receiverCountry() receiverIdentificationNumber() receiverPostalCode() receiverStateOrProvince() receiverStreetAddress() receivingCompanyOrIndividualName() receivingDepositoryFinancialInstitutionCountry() receivingDepositoryFinancialInstitutionId() receivingDepositoryFinancialInstitutionIdQualifier() receivingDepositoryFinancialInstitutionName() traceNumber() type() validated = true } } fun toBuilder() = Builder().from(this) override fun equals(other: Any?): Boolean { if (this === other) { return true } return other is InboundInternationalAchTransfer && this.amount == other.amount && this.destinationCountryCode == other.destinationCountryCode && this.destinationCurrencyCode == other.destinationCurrencyCode && this.foreignExchangeIndicator == other.foreignExchangeIndicator && this.foreignExchangeReference == other.foreignExchangeReference && this.foreignExchangeReferenceIndicator == other.foreignExchangeReferenceIndicator && this.foreignPaymentAmount == other.foreignPaymentAmount && this.foreignTraceNumber == other.foreignTraceNumber && this.internationalTransactionTypeCode == other.internationalTransactionTypeCode && this.originatingCurrencyCode == other.originatingCurrencyCode && this.originatingDepositoryFinancialInstitutionBranchCountry == other.originatingDepositoryFinancialInstitutionBranchCountry && this.originatingDepositoryFinancialInstitutionId == other.originatingDepositoryFinancialInstitutionId && this.originatingDepositoryFinancialInstitutionIdQualifier == other.originatingDepositoryFinancialInstitutionIdQualifier && this.originatingDepositoryFinancialInstitutionName == other.originatingDepositoryFinancialInstitutionName && this.originatorCity == other.originatorCity && this.originatorCompanyEntryDescription == other.originatorCompanyEntryDescription && this.originatorCountry == other.originatorCountry && this.originatorIdentification == other.originatorIdentification && this.originatorName == other.originatorName && this.originatorPostalCode == other.originatorPostalCode && this.originatorStateOrProvince == other.originatorStateOrProvince && this.originatorStreetAddress == other.originatorStreetAddress && this.paymentRelatedInformation == other.paymentRelatedInformation && this.paymentRelatedInformation2 == other.paymentRelatedInformation2 && this.receiverCity == other.receiverCity && this.receiverCountry == other.receiverCountry && this.receiverIdentificationNumber == other.receiverIdentificationNumber && this.receiverPostalCode == other.receiverPostalCode && this.receiverStateOrProvince == other.receiverStateOrProvince && this.receiverStreetAddress == other.receiverStreetAddress && this.receivingCompanyOrIndividualName == other.receivingCompanyOrIndividualName && this.receivingDepositoryFinancialInstitutionCountry == other.receivingDepositoryFinancialInstitutionCountry && this.receivingDepositoryFinancialInstitutionId == other.receivingDepositoryFinancialInstitutionId && this.receivingDepositoryFinancialInstitutionIdQualifier == other.receivingDepositoryFinancialInstitutionIdQualifier && this.receivingDepositoryFinancialInstitutionName == other.receivingDepositoryFinancialInstitutionName && this.traceNumber == other.traceNumber && this.type == other.type && this.additionalProperties == other.additionalProperties } override fun hashCode(): Int { if (hashCode == 0) { hashCode = Objects.hash( amount, destinationCountryCode, destinationCurrencyCode, foreignExchangeIndicator, foreignExchangeReference, foreignExchangeReferenceIndicator, foreignPaymentAmount, foreignTraceNumber, internationalTransactionTypeCode, originatingCurrencyCode, originatingDepositoryFinancialInstitutionBranchCountry, originatingDepositoryFinancialInstitutionId, originatingDepositoryFinancialInstitutionIdQualifier, originatingDepositoryFinancialInstitutionName, originatorCity, originatorCompanyEntryDescription, originatorCountry, originatorIdentification, originatorName, originatorPostalCode, originatorStateOrProvince, originatorStreetAddress, paymentRelatedInformation, paymentRelatedInformation2, receiverCity, receiverCountry, receiverIdentificationNumber, receiverPostalCode, receiverStateOrProvince, receiverStreetAddress, receivingCompanyOrIndividualName, receivingDepositoryFinancialInstitutionCountry, receivingDepositoryFinancialInstitutionId, receivingDepositoryFinancialInstitutionIdQualifier, receivingDepositoryFinancialInstitutionName, traceNumber, type, additionalProperties, ) } return hashCode } override fun toString() = "InboundInternationalAchTransfer{amount=$amount, destinationCountryCode=$destinationCountryCode, destinationCurrencyCode=$destinationCurrencyCode, foreignExchangeIndicator=$foreignExchangeIndicator, foreignExchangeReference=$foreignExchangeReference, foreignExchangeReferenceIndicator=$foreignExchangeReferenceIndicator, foreignPaymentAmount=$foreignPaymentAmount, foreignTraceNumber=$foreignTraceNumber, internationalTransactionTypeCode=$internationalTransactionTypeCode, originatingCurrencyCode=$originatingCurrencyCode, originatingDepositoryFinancialInstitutionBranchCountry=$originatingDepositoryFinancialInstitutionBranchCountry, originatingDepositoryFinancialInstitutionId=$originatingDepositoryFinancialInstitutionId, originatingDepositoryFinancialInstitutionIdQualifier=$originatingDepositoryFinancialInstitutionIdQualifier, originatingDepositoryFinancialInstitutionName=$originatingDepositoryFinancialInstitutionName, originatorCity=$originatorCity, originatorCompanyEntryDescription=$originatorCompanyEntryDescription, originatorCountry=$originatorCountry, originatorIdentification=$originatorIdentification, originatorName=$originatorName, originatorPostalCode=$originatorPostalCode, originatorStateOrProvince=$originatorStateOrProvince, originatorStreetAddress=$originatorStreetAddress, paymentRelatedInformation=$paymentRelatedInformation, paymentRelatedInformation2=$paymentRelatedInformation2, receiverCity=$receiverCity, receiverCountry=$receiverCountry, receiverIdentificationNumber=$receiverIdentificationNumber, receiverPostalCode=$receiverPostalCode, receiverStateOrProvince=$receiverStateOrProvince, receiverStreetAddress=$receiverStreetAddress, receivingCompanyOrIndividualName=$receivingCompanyOrIndividualName, receivingDepositoryFinancialInstitutionCountry=$receivingDepositoryFinancialInstitutionCountry, receivingDepositoryFinancialInstitutionId=$receivingDepositoryFinancialInstitutionId, receivingDepositoryFinancialInstitutionIdQualifier=$receivingDepositoryFinancialInstitutionIdQualifier, receivingDepositoryFinancialInstitutionName=$receivingDepositoryFinancialInstitutionName, traceNumber=$traceNumber, type=$type, additionalProperties=$additionalProperties}" companion object { fun builder() = Builder() } class Builder { private var amount: JsonField<Long> = JsonMissing.of() private var destinationCountryCode: JsonField<String> = JsonMissing.of() private var destinationCurrencyCode: JsonField<String> = JsonMissing.of() private var foreignExchangeIndicator: JsonField<ForeignExchangeIndicator> = JsonMissing.of() private var foreignExchangeReference: JsonField<String> = JsonMissing.of() private var foreignExchangeReferenceIndicator: JsonField<ForeignExchangeReferenceIndicator> = JsonMissing.of() private var foreignPaymentAmount: JsonField<Long> = JsonMissing.of() private var foreignTraceNumber: JsonField<String> = JsonMissing.of() private var internationalTransactionTypeCode: JsonField<InternationalTransactionTypeCode> = JsonMissing.of() private var originatingCurrencyCode: JsonField<String> = JsonMissing.of() private var originatingDepositoryFinancialInstitutionBranchCountry: JsonField<String> = JsonMissing.of() private var originatingDepositoryFinancialInstitutionId: JsonField<String> = JsonMissing.of() private var originatingDepositoryFinancialInstitutionIdQualifier: JsonField<OriginatingDepositoryFinancialInstitutionIdQualifier> = JsonMissing.of() private var originatingDepositoryFinancialInstitutionName: JsonField<String> = JsonMissing.of() private var originatorCity: JsonField<String> = JsonMissing.of() private var originatorCompanyEntryDescription: JsonField<String> = JsonMissing.of() private var originatorCountry: JsonField<String> = JsonMissing.of() private var originatorIdentification: JsonField<String> = JsonMissing.of() private var originatorName: JsonField<String> = JsonMissing.of() private var originatorPostalCode: JsonField<String> = JsonMissing.of() private var originatorStateOrProvince: JsonField<String> = JsonMissing.of() private var originatorStreetAddress: JsonField<String> = JsonMissing.of() private var paymentRelatedInformation: JsonField<String> = JsonMissing.of() private var paymentRelatedInformation2: JsonField<String> = JsonMissing.of() private var receiverCity: JsonField<String> = JsonMissing.of() private var receiverCountry: JsonField<String> = JsonMissing.of() private var receiverIdentificationNumber: JsonField<String> = JsonMissing.of() private var receiverPostalCode: JsonField<String> = JsonMissing.of() private var receiverStateOrProvince: JsonField<String> = JsonMissing.of() private var receiverStreetAddress: JsonField<String> = JsonMissing.of() private var receivingCompanyOrIndividualName: JsonField<String> = JsonMissing.of() private var receivingDepositoryFinancialInstitutionCountry: JsonField<String> = JsonMissing.of() private var receivingDepositoryFinancialInstitutionId: JsonField<String> = JsonMissing.of() private var receivingDepositoryFinancialInstitutionIdQualifier: JsonField<ReceivingDepositoryFinancialInstitutionIdQualifier> = JsonMissing.of() private var receivingDepositoryFinancialInstitutionName: JsonField<String> = JsonMissing.of() private var traceNumber: JsonField<String> = JsonMissing.of() private var type: JsonField<Type> = JsonMissing.of() private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf() internal fun from(inboundInternationalAchTransfer: InboundInternationalAchTransfer) = apply { this.amount = inboundInternationalAchTransfer.amount this.destinationCountryCode = inboundInternationalAchTransfer.destinationCountryCode this.destinationCurrencyCode = inboundInternationalAchTransfer.destinationCurrencyCode this.foreignExchangeIndicator = inboundInternationalAchTransfer.foreignExchangeIndicator this.foreignExchangeReference = inboundInternationalAchTransfer.foreignExchangeReference this.foreignExchangeReferenceIndicator = inboundInternationalAchTransfer.foreignExchangeReferenceIndicator this.foreignPaymentAmount = inboundInternationalAchTransfer.foreignPaymentAmount this.foreignTraceNumber = inboundInternationalAchTransfer.foreignTraceNumber this.internationalTransactionTypeCode = inboundInternationalAchTransfer.internationalTransactionTypeCode this.originatingCurrencyCode = inboundInternationalAchTransfer.originatingCurrencyCode this.originatingDepositoryFinancialInstitutionBranchCountry = inboundInternationalAchTransfer.originatingDepositoryFinancialInstitutionBranchCountry this.originatingDepositoryFinancialInstitutionId = inboundInternationalAchTransfer.originatingDepositoryFinancialInstitutionId this.originatingDepositoryFinancialInstitutionIdQualifier = inboundInternationalAchTransfer.originatingDepositoryFinancialInstitutionIdQualifier this.originatingDepositoryFinancialInstitutionName = inboundInternationalAchTransfer.originatingDepositoryFinancialInstitutionName this.originatorCity = inboundInternationalAchTransfer.originatorCity this.originatorCompanyEntryDescription = inboundInternationalAchTransfer.originatorCompanyEntryDescription this.originatorCountry = inboundInternationalAchTransfer.originatorCountry this.originatorIdentification = inboundInternationalAchTransfer.originatorIdentification this.originatorName = inboundInternationalAchTransfer.originatorName this.originatorPostalCode = inboundInternationalAchTransfer.originatorPostalCode this.originatorStateOrProvince = inboundInternationalAchTransfer.originatorStateOrProvince this.originatorStreetAddress = inboundInternationalAchTransfer.originatorStreetAddress this.paymentRelatedInformation = inboundInternationalAchTransfer.paymentRelatedInformation this.paymentRelatedInformation2 = inboundInternationalAchTransfer.paymentRelatedInformation2 this.receiverCity = inboundInternationalAchTransfer.receiverCity this.receiverCountry = inboundInternationalAchTransfer.receiverCountry this.receiverIdentificationNumber = inboundInternationalAchTransfer.receiverIdentificationNumber this.receiverPostalCode = inboundInternationalAchTransfer.receiverPostalCode this.receiverStateOrProvince = inboundInternationalAchTransfer.receiverStateOrProvince this.receiverStreetAddress = inboundInternationalAchTransfer.receiverStreetAddress this.receivingCompanyOrIndividualName = inboundInternationalAchTransfer.receivingCompanyOrIndividualName this.receivingDepositoryFinancialInstitutionCountry = inboundInternationalAchTransfer.receivingDepositoryFinancialInstitutionCountry this.receivingDepositoryFinancialInstitutionId = inboundInternationalAchTransfer.receivingDepositoryFinancialInstitutionId this.receivingDepositoryFinancialInstitutionIdQualifier = inboundInternationalAchTransfer.receivingDepositoryFinancialInstitutionIdQualifier this.receivingDepositoryFinancialInstitutionName = inboundInternationalAchTransfer.receivingDepositoryFinancialInstitutionName this.traceNumber = inboundInternationalAchTransfer.traceNumber this.type = inboundInternationalAchTransfer.type additionalProperties(inboundInternationalAchTransfer.additionalProperties) } /** * The amount in the minor unit of the destination account currency. For dollars, * for example, this is cents. */ fun amount(amount: Long) = amount(JsonField.of(amount)) /** * The amount in the minor unit of the destination account currency. For dollars, * for example, this is cents. */ @JsonProperty("amount") @ExcludeMissing fun amount(amount: JsonField<Long>) = apply { this.amount = amount } /** * The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 * country code of the destination country. */ fun destinationCountryCode(destinationCountryCode: String) = destinationCountryCode(JsonField.of(destinationCountryCode)) /** * The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 * country code of the destination country. */ @JsonProperty("destination_country_code") @ExcludeMissing fun destinationCountryCode(destinationCountryCode: JsonField<String>) = apply { this.destinationCountryCode = destinationCountryCode } /** * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the * destination bank account. */ fun destinationCurrencyCode(destinationCurrencyCode: String) = destinationCurrencyCode(JsonField.of(destinationCurrencyCode)) /** * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the * destination bank account. */ @JsonProperty("destination_currency_code") @ExcludeMissing fun destinationCurrencyCode(destinationCurrencyCode: JsonField<String>) = apply { this.destinationCurrencyCode = destinationCurrencyCode } /** A description of how the foreign exchange rate was calculated. */ fun foreignExchangeIndicator(foreignExchangeIndicator: ForeignExchangeIndicator) = foreignExchangeIndicator(JsonField.of(foreignExchangeIndicator)) /** A description of how the foreign exchange rate was calculated. */ @JsonProperty("foreign_exchange_indicator") @ExcludeMissing fun foreignExchangeIndicator(foreignExchangeIndicator: JsonField<ForeignExchangeIndicator>) = apply { this.foreignExchangeIndicator = foreignExchangeIndicator } /** * Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a * reference to a well-known rate. */ fun foreignExchangeReference(foreignExchangeReference: String) = foreignExchangeReference(JsonField.of(foreignExchangeReference)) /** * Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a * reference to a well-known rate. */ @JsonProperty("foreign_exchange_reference") @ExcludeMissing fun foreignExchangeReference(foreignExchangeReference: JsonField<String>) = apply { this.foreignExchangeReference = foreignExchangeReference } /** * An instruction of how to interpret the `foreign_exchange_reference` field for * this Transaction. */ fun foreignExchangeReferenceIndicator(foreignExchangeReferenceIndicator: ForeignExchangeReferenceIndicator) = foreignExchangeReferenceIndicator(JsonField.of(foreignExchangeReferenceIndicator)) /** * An instruction of how to interpret the `foreign_exchange_reference` field for * this Transaction. */ @JsonProperty("foreign_exchange_reference_indicator") @ExcludeMissing fun foreignExchangeReferenceIndicator(foreignExchangeReferenceIndicator: JsonField<ForeignExchangeReferenceIndicator>) = apply { this.foreignExchangeReferenceIndicator = foreignExchangeReferenceIndicator } /** * The amount in the minor unit of the foreign payment currency. For dollars, for * example, this is cents. */ fun foreignPaymentAmount(foreignPaymentAmount: Long) = foreignPaymentAmount(JsonField.of(foreignPaymentAmount)) /** * The amount in the minor unit of the foreign payment currency. For dollars, for * example, this is cents. */ @JsonProperty("foreign_payment_amount") @ExcludeMissing fun foreignPaymentAmount(foreignPaymentAmount: JsonField<Long>) = apply { this.foreignPaymentAmount = foreignPaymentAmount } /** A reference number in the foreign banking infrastructure. */ fun foreignTraceNumber(foreignTraceNumber: String) = foreignTraceNumber(JsonField.of(foreignTraceNumber)) /** A reference number in the foreign banking infrastructure. */ @JsonProperty("foreign_trace_number") @ExcludeMissing fun foreignTraceNumber(foreignTraceNumber: JsonField<String>) = apply { this.foreignTraceNumber = foreignTraceNumber } /** The type of transfer. Set by the originator. */ fun internationalTransactionTypeCode(internationalTransactionTypeCode: InternationalTransactionTypeCode) = internationalTransactionTypeCode(JsonField.of(internationalTransactionTypeCode)) /** The type of transfer. Set by the originator. */ @JsonProperty("international_transaction_type_code") @ExcludeMissing fun internationalTransactionTypeCode(internationalTransactionTypeCode: JsonField<InternationalTransactionTypeCode>) = apply { this.internationalTransactionTypeCode = internationalTransactionTypeCode } /** * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the * originating bank account. */ fun originatingCurrencyCode(originatingCurrencyCode: String) = originatingCurrencyCode(JsonField.of(originatingCurrencyCode)) /** * The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the * originating bank account. */ @JsonProperty("originating_currency_code") @ExcludeMissing fun originatingCurrencyCode(originatingCurrencyCode: JsonField<String>) = apply { this.originatingCurrencyCode = originatingCurrencyCode } /** * The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 * country code of the originating branch country. */ fun originatingDepositoryFinancialInstitutionBranchCountry(originatingDepositoryFinancialInstitutionBranchCountry: String) = originatingDepositoryFinancialInstitutionBranchCountry(JsonField.of(originatingDepositoryFinancialInstitutionBranchCountry)) /** * The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 * country code of the originating branch country. */ @JsonProperty("originating_depository_financial_institution_branch_country") @ExcludeMissing fun originatingDepositoryFinancialInstitutionBranchCountry(originatingDepositoryFinancialInstitutionBranchCountry: JsonField<String>) = apply { this.originatingDepositoryFinancialInstitutionBranchCountry = originatingDepositoryFinancialInstitutionBranchCountry } /** * An identifier for the originating bank. One of an International Bank Account * Number (IBAN) bank identifier, SWIFT Bank Identification Code (BIC), or a * domestic identifier like a US Routing Number. */ fun originatingDepositoryFinancialInstitutionId(originatingDepositoryFinancialInstitutionId: String) = originatingDepositoryFinancialInstitutionId(JsonField.of(originatingDepositoryFinancialInstitutionId)) /** * An identifier for the originating bank. One of an International Bank Account * Number (IBAN) bank identifier, SWIFT Bank Identification Code (BIC), or a * domestic identifier like a US Routing Number. */ @JsonProperty("originating_depository_financial_institution_id") @ExcludeMissing fun originatingDepositoryFinancialInstitutionId(originatingDepositoryFinancialInstitutionId: JsonField<String>) = apply { this.originatingDepositoryFinancialInstitutionId = originatingDepositoryFinancialInstitutionId } /** * An instruction of how to interpret the * `originating_depository_financial_institution_id` field for this Transaction. */ fun originatingDepositoryFinancialInstitutionIdQualifier(originatingDepositoryFinancialInstitutionIdQualifier: OriginatingDepositoryFinancialInstitutionIdQualifier) = originatingDepositoryFinancialInstitutionIdQualifier(JsonField.of(originatingDepositoryFinancialInstitutionIdQualifier)) /** * An instruction of how to interpret the * `originating_depository_financial_institution_id` field for this Transaction. */ @JsonProperty("originating_depository_financial_institution_id_qualifier") @ExcludeMissing fun originatingDepositoryFinancialInstitutionIdQualifier(originatingDepositoryFinancialInstitutionIdQualifier: JsonField<OriginatingDepositoryFinancialInstitutionIdQualifier>) = apply { this.originatingDepositoryFinancialInstitutionIdQualifier = originatingDepositoryFinancialInstitutionIdQualifier } /** * The name of the originating bank. Sometimes this will refer to an American bank * and obscure the correspondent foreign bank. */ fun originatingDepositoryFinancialInstitutionName(originatingDepositoryFinancialInstitutionName: String) = originatingDepositoryFinancialInstitutionName(JsonField.of(originatingDepositoryFinancialInstitutionName)) /** * The name of the originating bank. Sometimes this will refer to an American bank * and obscure the correspondent foreign bank. */ @JsonProperty("originating_depository_financial_institution_name") @ExcludeMissing fun originatingDepositoryFinancialInstitutionName(originatingDepositoryFinancialInstitutionName: JsonField<String>) = apply { this.originatingDepositoryFinancialInstitutionName = originatingDepositoryFinancialInstitutionName } /** A portion of the originator address. This may be incomplete. */ fun originatorCity(originatorCity: String) = originatorCity(JsonField.of(originatorCity)) /** A portion of the originator address. This may be incomplete. */ @JsonProperty("originator_city") @ExcludeMissing fun originatorCity(originatorCity: JsonField<String>) = apply { this.originatorCity = originatorCity } /** A description field set by the originator. */ fun originatorCompanyEntryDescription(originatorCompanyEntryDescription: String) = originatorCompanyEntryDescription(JsonField.of(originatorCompanyEntryDescription)) /** A description field set by the originator. */ @JsonProperty("originator_company_entry_description") @ExcludeMissing fun originatorCompanyEntryDescription(originatorCompanyEntryDescription: JsonField<String>) = apply { this.originatorCompanyEntryDescription = originatorCompanyEntryDescription } /** * A portion of the originator address. The * [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 country * code of the originator country. */ fun originatorCountry(originatorCountry: String) = originatorCountry(JsonField.of(originatorCountry)) /** * A portion of the originator address. The * [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 country * code of the originator country. */ @JsonProperty("originator_country") @ExcludeMissing fun originatorCountry(originatorCountry: JsonField<String>) = apply { this.originatorCountry = originatorCountry } /** * An identifier for the originating company. This is generally stable across * multiple ACH transfers. */ fun originatorIdentification(originatorIdentification: String) = originatorIdentification(JsonField.of(originatorIdentification)) /** * An identifier for the originating company. This is generally stable across * multiple ACH transfers. */ @JsonProperty("originator_identification") @ExcludeMissing fun originatorIdentification(originatorIdentification: JsonField<String>) = apply { this.originatorIdentification = originatorIdentification } /** Either the name of the originator or an intermediary money transmitter. */ fun originatorName(originatorName: String) = originatorName(JsonField.of(originatorName)) /** Either the name of the originator or an intermediary money transmitter. */ @JsonProperty("originator_name") @ExcludeMissing fun originatorName(originatorName: JsonField<String>) = apply { this.originatorName = originatorName } /** A portion of the originator address. This may be incomplete. */ fun originatorPostalCode(originatorPostalCode: String) = originatorPostalCode(JsonField.of(originatorPostalCode)) /** A portion of the originator address. This may be incomplete. */ @JsonProperty("originator_postal_code") @ExcludeMissing fun originatorPostalCode(originatorPostalCode: JsonField<String>) = apply { this.originatorPostalCode = originatorPostalCode } /** A portion of the originator address. This may be incomplete. */ fun originatorStateOrProvince(originatorStateOrProvince: String) = originatorStateOrProvince(JsonField.of(originatorStateOrProvince)) /** A portion of the originator address. This may be incomplete. */ @JsonProperty("originator_state_or_province") @ExcludeMissing fun originatorStateOrProvince(originatorStateOrProvince: JsonField<String>) = apply { this.originatorStateOrProvince = originatorStateOrProvince } /** A portion of the originator address. This may be incomplete. */ fun originatorStreetAddress(originatorStreetAddress: String) = originatorStreetAddress(JsonField.of(originatorStreetAddress)) /** A portion of the originator address. This may be incomplete. */ @JsonProperty("originator_street_address") @ExcludeMissing fun originatorStreetAddress(originatorStreetAddress: JsonField<String>) = apply { this.originatorStreetAddress = originatorStreetAddress } /** A description field set by the originator. */ fun paymentRelatedInformation(paymentRelatedInformation: String) = paymentRelatedInformation(JsonField.of(paymentRelatedInformation)) /** A description field set by the originator. */ @JsonProperty("payment_related_information") @ExcludeMissing fun paymentRelatedInformation(paymentRelatedInformation: JsonField<String>) = apply { this.paymentRelatedInformation = paymentRelatedInformation } /** A description field set by the originator. */ fun paymentRelatedInformation2(paymentRelatedInformation2: String) = paymentRelatedInformation2(JsonField.of(paymentRelatedInformation2)) /** A description field set by the originator. */ @JsonProperty("payment_related_information2") @ExcludeMissing fun paymentRelatedInformation2(paymentRelatedInformation2: JsonField<String>) = apply { this.paymentRelatedInformation2 = paymentRelatedInformation2 } /** A portion of the receiver address. This may be incomplete. */ fun receiverCity(receiverCity: String) = receiverCity(JsonField.of(receiverCity)) /** A portion of the receiver address. This may be incomplete. */ @JsonProperty("receiver_city") @ExcludeMissing fun receiverCity(receiverCity: JsonField<String>) = apply { this.receiverCity = receiverCity } /** * A portion of the receiver address. The * [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 country * code of the receiver country. */ fun receiverCountry(receiverCountry: String) = receiverCountry(JsonField.of(receiverCountry)) /** * A portion of the receiver address. The * [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 country * code of the receiver country. */ @JsonProperty("receiver_country") @ExcludeMissing fun receiverCountry(receiverCountry: JsonField<String>) = apply { this.receiverCountry = receiverCountry } /** An identification number the originator uses for the receiver. */ fun receiverIdentificationNumber(receiverIdentificationNumber: String) = receiverIdentificationNumber(JsonField.of(receiverIdentificationNumber)) /** An identification number the originator uses for the receiver. */ @JsonProperty("receiver_identification_number") @ExcludeMissing fun receiverIdentificationNumber(receiverIdentificationNumber: JsonField<String>) = apply { this.receiverIdentificationNumber = receiverIdentificationNumber } /** A portion of the receiver address. This may be incomplete. */ fun receiverPostalCode(receiverPostalCode: String) = receiverPostalCode(JsonField.of(receiverPostalCode)) /** A portion of the receiver address. This may be incomplete. */ @JsonProperty("receiver_postal_code") @ExcludeMissing fun receiverPostalCode(receiverPostalCode: JsonField<String>) = apply { this.receiverPostalCode = receiverPostalCode } /** A portion of the receiver address. This may be incomplete. */ fun receiverStateOrProvince(receiverStateOrProvince: String) = receiverStateOrProvince(JsonField.of(receiverStateOrProvince)) /** A portion of the receiver address. This may be incomplete. */ @JsonProperty("receiver_state_or_province") @ExcludeMissing fun receiverStateOrProvince(receiverStateOrProvince: JsonField<String>) = apply { this.receiverStateOrProvince = receiverStateOrProvince } /** A portion of the receiver address. This may be incomplete. */ fun receiverStreetAddress(receiverStreetAddress: String) = receiverStreetAddress(JsonField.of(receiverStreetAddress)) /** A portion of the receiver address. This may be incomplete. */ @JsonProperty("receiver_street_address") @ExcludeMissing fun receiverStreetAddress(receiverStreetAddress: JsonField<String>) = apply { this.receiverStreetAddress = receiverStreetAddress } /** The name of the receiver of the transfer. This is not verified by Increase. */ fun receivingCompanyOrIndividualName(receivingCompanyOrIndividualName: String) = receivingCompanyOrIndividualName(JsonField.of(receivingCompanyOrIndividualName)) /** The name of the receiver of the transfer. This is not verified by Increase. */ @JsonProperty("receiving_company_or_individual_name") @ExcludeMissing fun receivingCompanyOrIndividualName(receivingCompanyOrIndividualName: JsonField<String>) = apply { this.receivingCompanyOrIndividualName = receivingCompanyOrIndividualName } /** * The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 * country code of the receiving bank country. */ fun receivingDepositoryFinancialInstitutionCountry(receivingDepositoryFinancialInstitutionCountry: String) = receivingDepositoryFinancialInstitutionCountry(JsonField.of(receivingDepositoryFinancialInstitutionCountry)) /** * The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 * country code of the receiving bank country. */ @JsonProperty("receiving_depository_financial_institution_country") @ExcludeMissing fun receivingDepositoryFinancialInstitutionCountry(receivingDepositoryFinancialInstitutionCountry: JsonField<String>) = apply { this.receivingDepositoryFinancialInstitutionCountry = receivingDepositoryFinancialInstitutionCountry } /** * An identifier for the receiving bank. One of an International Bank Account * Number (IBAN) bank identifier, SWIFT Bank Identification Code (BIC), or a * domestic identifier like a US Routing Number. */ fun receivingDepositoryFinancialInstitutionId(receivingDepositoryFinancialInstitutionId: String) = receivingDepositoryFinancialInstitutionId(JsonField.of(receivingDepositoryFinancialInstitutionId)) /** * An identifier for the receiving bank. One of an International Bank Account * Number (IBAN) bank identifier, SWIFT Bank Identification Code (BIC), or a * domestic identifier like a US Routing Number. */ @JsonProperty("receiving_depository_financial_institution_id") @ExcludeMissing fun receivingDepositoryFinancialInstitutionId(receivingDepositoryFinancialInstitutionId: JsonField<String>) = apply { this.receivingDepositoryFinancialInstitutionId = receivingDepositoryFinancialInstitutionId } /** * An instruction of how to interpret the * `receiving_depository_financial_institution_id` field for this Transaction. */ fun receivingDepositoryFinancialInstitutionIdQualifier(receivingDepositoryFinancialInstitutionIdQualifier: ReceivingDepositoryFinancialInstitutionIdQualifier) = receivingDepositoryFinancialInstitutionIdQualifier(JsonField.of(receivingDepositoryFinancialInstitutionIdQualifier)) /** * An instruction of how to interpret the * `receiving_depository_financial_institution_id` field for this Transaction. */ @JsonProperty("receiving_depository_financial_institution_id_qualifier") @ExcludeMissing fun receivingDepositoryFinancialInstitutionIdQualifier(receivingDepositoryFinancialInstitutionIdQualifier: JsonField<ReceivingDepositoryFinancialInstitutionIdQualifier>) = apply { this.receivingDepositoryFinancialInstitutionIdQualifier = receivingDepositoryFinancialInstitutionIdQualifier } /** The name of the receiving bank, as set by the sending financial institution. */ fun receivingDepositoryFinancialInstitutionName(receivingDepositoryFinancialInstitutionName: String) = receivingDepositoryFinancialInstitutionName(JsonField.of(receivingDepositoryFinancialInstitutionName)) /** The name of the receiving bank, as set by the sending financial institution. */ @JsonProperty("receiving_depository_financial_institution_name") @ExcludeMissing fun receivingDepositoryFinancialInstitutionName(receivingDepositoryFinancialInstitutionName: JsonField<String>) = apply { this.receivingDepositoryFinancialInstitutionName = receivingDepositoryFinancialInstitutionName } /** * A 15 digit number recorded in the Nacha file and available to both the * originating and receiving bank. Along with the amount, date, and originating * routing number, this can be used to identify the ACH transfer at either bank. * ACH trace numbers are not unique, but are * [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). */ fun traceNumber(traceNumber: String) = traceNumber(JsonField.of(traceNumber)) /** * A 15 digit number recorded in the Nacha file and available to both the * originating and receiving bank. Along with the amount, date, and originating * routing number, this can be used to identify the ACH transfer at either bank. * ACH trace numbers are not unique, but are * [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). */ @JsonProperty("trace_number") @ExcludeMissing fun traceNumber(traceNumber: JsonField<String>) = apply { this.traceNumber = traceNumber } /** * A constant representing the object's type. For this resource it will always be * `inbound_international_ach_transfer`. */ fun type(type: Type) = type(JsonField.of(type)) /** * A constant representing the object's type. For this resource it will always be * `inbound_international_ach_transfer`. */ @JsonProperty("type") @ExcludeMissing fun type(type: JsonField<Type>) = apply { this.type = type } fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply { this.additionalProperties.clear() this.additionalProperties.putAll(additionalProperties) } @JsonAnySetter fun putAdditionalProperty(key: String, value: JsonValue) = apply { this.additionalProperties.put(key, value) } fun putAllAdditionalProperties(additionalProperties: Map<String, JsonValue>) = apply { this.additionalProperties.putAll(additionalProperties) } fun build(): InboundInternationalAchTransfer = InboundInternationalAchTransfer( amount, destinationCountryCode, destinationCurrencyCode, foreignExchangeIndicator, foreignExchangeReference, foreignExchangeReferenceIndicator, foreignPaymentAmount, foreignTraceNumber, internationalTransactionTypeCode, originatingCurrencyCode, originatingDepositoryFinancialInstitutionBranchCountry, originatingDepositoryFinancialInstitutionId, originatingDepositoryFinancialInstitutionIdQualifier, originatingDepositoryFinancialInstitutionName, originatorCity, originatorCompanyEntryDescription, originatorCountry, originatorIdentification, originatorName, originatorPostalCode, originatorStateOrProvince, originatorStreetAddress, paymentRelatedInformation, paymentRelatedInformation2, receiverCity, receiverCountry, receiverIdentificationNumber, receiverPostalCode, receiverStateOrProvince, receiverStreetAddress, receivingCompanyOrIndividualName, receivingDepositoryFinancialInstitutionCountry, receivingDepositoryFinancialInstitutionId, receivingDepositoryFinancialInstitutionIdQualifier, receivingDepositoryFinancialInstitutionName, traceNumber, type, additionalProperties.toUnmodifiable(), ) } class ForeignExchangeIndicator @JsonCreator private constructor(private val value: JsonField<String>, ) : Enum { @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = value override fun equals(other: Any?): Boolean { if (this === other) { return true } return other is ForeignExchangeIndicator && this.value == other.value } override fun hashCode() = value.hashCode() override fun toString() = value.toString() companion object { val FIXED_TO_VARIABLE = ForeignExchangeIndicator(JsonField.of("fixed_to_variable")) val VARIABLE_TO_FIXED = ForeignExchangeIndicator(JsonField.of("variable_to_fixed")) val FIXED_TO_FIXED = ForeignExchangeIndicator(JsonField.of("fixed_to_fixed")) fun of(value: String) = ForeignExchangeIndicator(JsonField.of(value)) } enum class Known { FIXED_TO_VARIABLE, VARIABLE_TO_FIXED, FIXED_TO_FIXED, } enum class Value { FIXED_TO_VARIABLE, VARIABLE_TO_FIXED, FIXED_TO_FIXED, _UNKNOWN, } fun value(): Value = when (this) { FIXED_TO_VARIABLE -> Value.FIXED_TO_VARIABLE VARIABLE_TO_FIXED -> Value.VARIABLE_TO_FIXED FIXED_TO_FIXED -> Value.FIXED_TO_FIXED else -> Value._UNKNOWN } fun known(): Known = when (this) { FIXED_TO_VARIABLE -> Known.FIXED_TO_VARIABLE VARIABLE_TO_FIXED -> Known.VARIABLE_TO_FIXED FIXED_TO_FIXED -> Known.FIXED_TO_FIXED else -> throw IncreaseInvalidDataException("Unknown ForeignExchangeIndicator: $value") } fun asString(): String = _value().asStringOrThrow() } class ForeignExchangeReferenceIndicator @JsonCreator private constructor(private val value: JsonField<String>, ) : Enum { @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = value override fun equals(other: Any?): Boolean { if (this === other) { return true } return other is ForeignExchangeReferenceIndicator && this.value == other.value } override fun hashCode() = value.hashCode() override fun toString() = value.toString() companion object { val FOREIGN_EXCHANGE_RATE = ForeignExchangeReferenceIndicator(JsonField.of("foreign_exchange_rate")) val FOREIGN_EXCHANGE_REFERENCE_NUMBER = ForeignExchangeReferenceIndicator(JsonField.of("foreign_exchange_reference_number")) val BLANK = ForeignExchangeReferenceIndicator(JsonField.of("blank")) fun of(value: String) = ForeignExchangeReferenceIndicator(JsonField.of(value)) } enum class Known { FOREIGN_EXCHANGE_RATE, FOREIGN_EXCHANGE_REFERENCE_NUMBER, BLANK, } enum class Value { FOREIGN_EXCHANGE_RATE, FOREIGN_EXCHANGE_REFERENCE_NUMBER, BLANK, _UNKNOWN, } fun value(): Value = when (this) { FOREIGN_EXCHANGE_RATE -> Value.FOREIGN_EXCHANGE_RATE FOREIGN_EXCHANGE_REFERENCE_NUMBER -> Value.FOREIGN_EXCHANGE_REFERENCE_NUMBER BLANK -> Value.BLANK else -> Value._UNKNOWN } fun known(): Known = when (this) { FOREIGN_EXCHANGE_RATE -> Known.FOREIGN_EXCHANGE_RATE FOREIGN_EXCHANGE_REFERENCE_NUMBER -> Known.FOREIGN_EXCHANGE_REFERENCE_NUMBER BLANK -> Known.BLANK else -> throw IncreaseInvalidDataException("Unknown ForeignExchangeReferenceIndicator: $value") } fun asString(): String = _value().asStringOrThrow() } class InternationalTransactionTypeCode @JsonCreator private constructor(private val value: JsonField<String>, ) : Enum { @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = value override fun equals(other: Any?): Boolean { if (this === other) { return true } return other is InternationalTransactionTypeCode && this.value == other.value } override fun hashCode() = value.hashCode() override fun toString() = value.toString() companion object { val ANNUITY = InternationalTransactionTypeCode(JsonField.of("annuity")) val BUSINESS_OR_COMMERCIAL = InternationalTransactionTypeCode(JsonField.of("business_or_commercial")) val DEPOSIT = InternationalTransactionTypeCode(JsonField.of("deposit")) val LOAN = InternationalTransactionTypeCode(JsonField.of("loan")) val MISCELLANEOUS = InternationalTransactionTypeCode(JsonField.of("miscellaneous")) val MORTGAGE = InternationalTransactionTypeCode(JsonField.of("mortgage")) val PENSION = InternationalTransactionTypeCode(JsonField.of("pension")) val REMITTANCE = InternationalTransactionTypeCode(JsonField.of("remittance")) val RENT_OR_LEASE = InternationalTransactionTypeCode(JsonField.of("rent_or_lease")) val SALARY_OR_PAYROLL = InternationalTransactionTypeCode(JsonField.of("salary_or_payroll")) val TAX = InternationalTransactionTypeCode(JsonField.of("tax")) val ACCOUNTS_RECEIVABLE = InternationalTransactionTypeCode(JsonField.of("accounts_receivable")) val BACK_OFFICE_CONVERSION = InternationalTransactionTypeCode(JsonField.of("back_office_conversion")) val MACHINE_TRANSFER = InternationalTransactionTypeCode(JsonField.of("machine_transfer")) val POINT_OF_PURCHASE = InternationalTransactionTypeCode(JsonField.of("point_of_purchase")) val POINT_OF_SALE = InternationalTransactionTypeCode(JsonField.of("point_of_sale")) val REPRESENTED_CHECK = InternationalTransactionTypeCode(JsonField.of("represented_check")) val SHARED_NETWORK_TRANSACTION = InternationalTransactionTypeCode(JsonField.of("shared_network_transaction")) val TELPHONE_INITIATED = InternationalTransactionTypeCode(JsonField.of("telphone_initiated")) val INTERNET_INITIATED = InternationalTransactionTypeCode(JsonField.of("internet_initiated")) fun of(value: String) = InternationalTransactionTypeCode(JsonField.of(value)) } enum class Known { ANNUITY, BUSINESS_OR_COMMERCIAL, DEPOSIT, LOAN, MISCELLANEOUS, MORTGAGE, PENSION, REMITTANCE, RENT_OR_LEASE, SALARY_OR_PAYROLL, TAX, ACCOUNTS_RECEIVABLE, BACK_OFFICE_CONVERSION, MACHINE_TRANSFER, POINT_OF_PURCHASE, POINT_OF_SALE, REPRESENTED_CHECK, SHARED_NETWORK_TRANSACTION, TELPHONE_INITIATED, INTERNET_INITIATED, } enum class Value { ANNUITY, BUSINESS_OR_COMMERCIAL, DEPOSIT, LOAN, MISCELLANEOUS, MORTGAGE, PENSION, REMITTANCE, RENT_OR_LEASE, SALARY_OR_PAYROLL, TAX, ACCOUNTS_RECEIVABLE, BACK_OFFICE_CONVERSION, MACHINE_TRANSFER, POINT_OF_PURCHASE, POINT_OF_SALE, REPRESENTED_CHECK, SHARED_NETWORK_TRANSACTION, TELPHONE_INITIATED, INTERNET_INITIATED, _UNKNOWN, } fun value(): Value = when (this) { ANNUITY -> Value.ANNUITY BUSINESS_OR_COMMERCIAL -> Value.BUSINESS_OR_COMMERCIAL DEPOSIT -> Value.DEPOSIT LOAN -> Value.LOAN MISCELLANEOUS -> Value.MISCELLANEOUS MORTGAGE -> Value.MORTGAGE PENSION -> Value.PENSION REMITTANCE -> Value.REMITTANCE RENT_OR_LEASE -> Value.RENT_OR_LEASE SALARY_OR_PAYROLL -> Value.SALARY_OR_PAYROLL TAX -> Value.TAX ACCOUNTS_RECEIVABLE -> Value.ACCOUNTS_RECEIVABLE BACK_OFFICE_CONVERSION -> Value.BACK_OFFICE_CONVERSION MACHINE_TRANSFER -> Value.MACHINE_TRANSFER POINT_OF_PURCHASE -> Value.POINT_OF_PURCHASE POINT_OF_SALE -> Value.POINT_OF_SALE REPRESENTED_CHECK -> Value.REPRESENTED_CHECK SHARED_NETWORK_TRANSACTION -> Value.SHARED_NETWORK_TRANSACTION TELPHONE_INITIATED -> Value.TELPHONE_INITIATED INTERNET_INITIATED -> Value.INTERNET_INITIATED else -> Value._UNKNOWN } fun known(): Known = when (this) { ANNUITY -> Known.ANNUITY BUSINESS_OR_COMMERCIAL -> Known.BUSINESS_OR_COMMERCIAL DEPOSIT -> Known.DEPOSIT LOAN -> Known.LOAN MISCELLANEOUS -> Known.MISCELLANEOUS MORTGAGE -> Known.MORTGAGE PENSION -> Known.PENSION REMITTANCE -> Known.REMITTANCE RENT_OR_LEASE -> Known.RENT_OR_LEASE SALARY_OR_PAYROLL -> Known.SALARY_OR_PAYROLL TAX -> Known.TAX ACCOUNTS_RECEIVABLE -> Known.ACCOUNTS_RECEIVABLE BACK_OFFICE_CONVERSION -> Known.BACK_OFFICE_CONVERSION MACHINE_TRANSFER -> Known.MACHINE_TRANSFER POINT_OF_PURCHASE -> Known.POINT_OF_PURCHASE POINT_OF_SALE -> Known.POINT_OF_SALE REPRESENTED_CHECK -> Known.REPRESENTED_CHECK SHARED_NETWORK_TRANSACTION -> Known.SHARED_NETWORK_TRANSACTION TELPHONE_INITIATED -> Known.TELPHONE_INITIATED INTERNET_INITIATED -> Known.INTERNET_INITIATED else -> throw IncreaseInvalidDataException("Unknown InternationalTransactionTypeCode: $value") } fun asString(): String = _value().asStringOrThrow() } class OriginatingDepositoryFinancialInstitutionIdQualifier @JsonCreator private constructor(private val value: JsonField<String>, ) : Enum { @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = value override fun equals(other: Any?): Boolean { if (this === other) { return true } return other is OriginatingDepositoryFinancialInstitutionIdQualifier && this.value == other.value } override fun hashCode() = value.hashCode() override fun toString() = value.toString() companion object { val NATIONAL_CLEARING_SYSTEM_NUMBER = OriginatingDepositoryFinancialInstitutionIdQualifier(JsonField.of("national_clearing_system_number")) val BIC_CODE = OriginatingDepositoryFinancialInstitutionIdQualifier(JsonField.of("bic_code")) val IBAN = OriginatingDepositoryFinancialInstitutionIdQualifier(JsonField.of("iban")) fun of(value: String) = OriginatingDepositoryFinancialInstitutionIdQualifier(JsonField.of(value)) } enum class Known { NATIONAL_CLEARING_SYSTEM_NUMBER, BIC_CODE, IBAN, } enum class Value { NATIONAL_CLEARING_SYSTEM_NUMBER, BIC_CODE, IBAN, _UNKNOWN, } fun value(): Value = when (this) { NATIONAL_CLEARING_SYSTEM_NUMBER -> Value.NATIONAL_CLEARING_SYSTEM_NUMBER BIC_CODE -> Value.BIC_CODE IBAN -> Value.IBAN else -> Value._UNKNOWN } fun known(): Known = when (this) { NATIONAL_CLEARING_SYSTEM_NUMBER -> Known.NATIONAL_CLEARING_SYSTEM_NUMBER BIC_CODE -> Known.BIC_CODE IBAN -> Known.IBAN else -> throw IncreaseInvalidDataException("Unknown OriginatingDepositoryFinancialInstitutionIdQualifier: $value") } fun asString(): String = _value().asStringOrThrow() } class ReceivingDepositoryFinancialInstitutionIdQualifier @JsonCreator private constructor(private val value: JsonField<String>, ) : Enum { @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = value override fun equals(other: Any?): Boolean { if (this === other) { return true } return other is ReceivingDepositoryFinancialInstitutionIdQualifier && this.value == other.value } override fun hashCode() = value.hashCode() override fun toString() = value.toString() companion object { val NATIONAL_CLEARING_SYSTEM_NUMBER = ReceivingDepositoryFinancialInstitutionIdQualifier(JsonField.of("national_clearing_system_number")) val BIC_CODE = ReceivingDepositoryFinancialInstitutionIdQualifier(JsonField.of("bic_code")) val IBAN = ReceivingDepositoryFinancialInstitutionIdQualifier(JsonField.of("iban")) fun of(value: String) = ReceivingDepositoryFinancialInstitutionIdQualifier(JsonField.of(value)) } enum class Known { NATIONAL_CLEARING_SYSTEM_NUMBER, BIC_CODE, IBAN, } enum class Value { NATIONAL_CLEARING_SYSTEM_NUMBER, BIC_CODE, IBAN, _UNKNOWN, } fun value(): Value = when (this) { NATIONAL_CLEARING_SYSTEM_NUMBER -> Value.NATIONAL_CLEARING_SYSTEM_NUMBER BIC_CODE -> Value.BIC_CODE IBAN -> Value.IBAN else -> Value._UNKNOWN } fun known(): Known = when (this) { NATIONAL_CLEARING_SYSTEM_NUMBER -> Known.NATIONAL_CLEARING_SYSTEM_NUMBER BIC_CODE -> Known.BIC_CODE IBAN -> Known.IBAN else -> throw IncreaseInvalidDataException("Unknown ReceivingDepositoryFinancialInstitutionIdQualifier: $value") } fun asString(): String = _value().asStringOrThrow() } class Type @JsonCreator private constructor(private val value: JsonField<String>, ) : Enum { @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = value override fun equals(other: Any?): Boolean { if (this === other) { return true } return other is Type && this.value == other.value } override fun hashCode() = value.hashCode() override fun toString() = value.toString() companion object { val INBOUND_INTERNATIONAL_ACH_TRANSFER = Type(JsonField.of("inbound_international_ach_transfer")) fun of(value: String) = Type(JsonField.of(value)) } enum class Known { INBOUND_INTERNATIONAL_ACH_TRANSFER, } enum class Value { INBOUND_INTERNATIONAL_ACH_TRANSFER, _UNKNOWN, } fun value(): Value = when (this) { INBOUND_INTERNATIONAL_ACH_TRANSFER -> Value.INBOUND_INTERNATIONAL_ACH_TRANSFER else -> Value._UNKNOWN } fun known(): Known = when (this) { INBOUND_INTERNATIONAL_ACH_TRANSFER -> Known.INBOUND_INTERNATIONAL_ACH_TRANSFER else -> throw IncreaseInvalidDataException("Unknown Type: $value") } fun asString(): String = _value().asStringOrThrow() } }
1
Kotlin
0
0
3a5229b8bc5cf400f07efbd41e00b9cf40663f97
82,854
sam-kotlin
Apache License 2.0
gi/src/commonMain/kotlin/org/anime_game_servers/multi_proto/gi/data/activity/music_game/MusicGameSettleReq.kt
Anime-Game-Servers
642,871,918
false
{"Kotlin": 1651536}
package org.anime_game_servers.multi_proto.gi.data.activity.music_game import org.anime_game_servers.core.base.annotations.AddedIn import org.anime_game_servers.core.base.Version.GI_2_2_0 import org.anime_game_servers.core.base.Version.GI_2_7_0 import org.anime_game_servers.core.base.annotations.proto.CommandType.REQUEST import org.anime_game_servers.core.base.annotations.proto.ProtoCommand @AddedIn(GI_2_2_0) @ProtoCommand(REQUEST) internal interface MusicGameSettleReq { val combo: Int val correctHit: Int val musicBasicId: Int val score: Int @AddedIn(GI_2_7_0) val buttonList: List<Int> @AddedIn(GI_2_7_0) val delay: Int @AddedIn(GI_2_7_0) val isCustomDelay: Boolean @AddedIn(GI_2_7_0) val isCustomSpeed: Boolean @AddedIn(GI_2_7_0) val isFullCombo: Int @AddedIn(GI_2_7_0) val isSaveScore: Boolean @AddedIn(GI_2_7_0) val maxCombo: Int @AddedIn(GI_2_7_0) val noteList: List<Int> @AddedIn(GI_2_7_0) val restartTimes: Int @AddedIn(GI_2_7_0) val scoreRating: Int @AddedIn(GI_2_7_0) val speed: Float @AddedIn(GI_2_7_0) val starRating: Int @AddedIn(GI_2_7_0) val ugcGuid: Long @AddedIn(GI_2_7_0) val volume: Int }
0
Kotlin
2
6
7639afe4f546aa5bbd9b4afc9c06c17f9547c588
1,243
anime-game-multi-proto
MIT License
app/src/main/java/com/elhady/movies/domain/usecases/seeAllMedia/GetAllMediaByTypeUseCase.kt
islamelhady
301,591,032
false
{"Kotlin": 161687}
package com.elhady.movies.domain.usecases.seeAllMedia import androidx.paging.Pager import androidx.paging.PagingData import androidx.paging.map import com.elhady.movies.data.repository.MovieRepository import com.elhady.movies.data.repository.SeriesRepository import com.elhady.movies.domain.enums.AllMediaType import com.elhady.movies.domain.mappers.movie.MovieDtoMapper import com.elhady.movies.domain.mappers.series.TVShowDtoMapper import com.elhady.movies.domain.models.Media import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.map import javax.inject.Inject class GetAllMediaByTypeUseCase @Inject constructor( private val movieRepository: MovieRepository, private val seriesRepository: SeriesRepository, private val movieDtoMapper: MovieDtoMapper, private val tvShowDtoMapper: TVShowDtoMapper ) { suspend operator fun invoke(type: AllMediaType): Flow<PagingData<Media>> { return when(type){ AllMediaType.UPCOMING -> wrapper(movieRepository::getAllUpcomingMovies ,movieDtoMapper::map) AllMediaType.TRENDING -> wrapper(movieRepository::getAllTrendingMovies, movieDtoMapper::map) AllMediaType.NOW_PLAYING -> wrapper(movieRepository::getAllNowPlayingMovies, movieDtoMapper::map) AllMediaType.MYSTERY -> wrapper(movieRepository::getAllMysteryMovies, movieDtoMapper::map) AllMediaType.ADVENTURE -> wrapper(movieRepository::getAllAdventureMovies, movieDtoMapper::map) AllMediaType.LATEST -> wrapper(seriesRepository::getAllLatestTV, tvShowDtoMapper::map) AllMediaType.POPULAR -> wrapper(seriesRepository::getAllPopularTV, tvShowDtoMapper::map) AllMediaType.TOP_RATED -> wrapper(seriesRepository::getAllTopRatedTV, tvShowDtoMapper::map) } } private suspend fun <T : Any> wrapper( data: suspend () -> Pager<Int, T>, mapper: (T) -> Media, ): Flow<PagingData<Media>> { return data().flow.map { pagingData -> pagingData.map { mapper(it) } } } }
1
Kotlin
0
0
b485f85ccff0b774e6713963bedd81f2fc720db5
2,074
movie-night-v2
Apache License 2.0
src/jvmMain/kotlin/matt/prim/double/double.kt
mgroth0
532,381,102
false
null
package matt.prim.double import java.nio.ByteBuffer const val DOUBLE_BYTE_LEN = 8 fun Double.toByteArray() = ByteBuffer.allocate(DOUBLE_BYTE_LEN).putDouble(this).array() fun Double.isNaNInfiniteOrZero() = isNaN() || isInfinite() || this == 0.0
0
Kotlin
0
0
c367c9659b3a801c5a84e10cea5d9db41ed1a582
247
prim
MIT License
src/jvmMain/kotlin/matt/prim/double/double.kt
mgroth0
532,381,102
false
null
package matt.prim.double import java.nio.ByteBuffer const val DOUBLE_BYTE_LEN = 8 fun Double.toByteArray() = ByteBuffer.allocate(DOUBLE_BYTE_LEN).putDouble(this).array() fun Double.isNaNInfiniteOrZero() = isNaN() || isInfinite() || this == 0.0
0
Kotlin
0
0
c367c9659b3a801c5a84e10cea5d9db41ed1a582
247
prim
MIT License
app/src/main/java/org/fossasia/openevent/general/social/SocialLinkApi.kt
fossasia
34,847,604
false
null
package org.fossasia.openevent.general.social import io.reactivex.Flowable import retrofit2.http.GET import retrofit2.http.Path interface SocialLinkApi { @GET("events/{id}/social-links?include=event&fields[event]=id&page[size]=0") fun getSocialLinks(@Path("id") id: Long): Flowable<List<SocialLink>> }
73
null
562
1,942
e3214589f83c155e477f9e727370d7bbef8fd915
313
open-event-attendee-android
Apache License 2.0
app/src/test/java/nl/jovmit/lyrics/utils/RegistrationDataBuilder.kt
mitrejcevski
187,831,953
false
{"Kotlin": 200363, "Shell": 202}
package nl.jovmit.lyrics.utils import nl.jovmit.lyrics.main.data.user.RegistrationData class RegistrationDataBuilder { companion object { fun aRegistrationData(): RegistrationDataBuilder { return RegistrationDataBuilder() } } private var username = "username" private var password = "<PASSWORD>" private var about = "about" fun withUsername(username: String): RegistrationDataBuilder { this.username = username return this } fun withPassword(password: String): RegistrationDataBuilder { this.password = password return this } fun withAbout(about: String): RegistrationDataBuilder { this.about = about return this } fun build(): RegistrationData { return RegistrationData(username, password, about) } }
1
Kotlin
0
0
e1241d35629bf60c4e60e6744759b8064d1b0d62
847
lyrics
Apache License 2.0