commit stringlengths 40 40 | subject stringlengths 4 1.73k | repos stringlengths 5 127k | old_file stringlengths 2 751 | new_file stringlengths 2 751 | new_contents stringlengths 1 8.98k | old_contents stringlengths 0 6.59k | license stringclasses 13
values | lang stringclasses 23
values |
|---|---|---|---|---|---|---|---|---|
f00bfe822e8b2b51ec0c300270843828d87b0bdd | Make `ReexpandMacrosAction` dumb-aware | intellij-rust/intellij-rust,Undin/intellij-rust,intellij-rust/intellij-rust,intellij-rust/intellij-rust,Undin/intellij-rust,intellij-rust/intellij-rust,intellij-rust/intellij-rust,Undin/intellij-rust,Undin/intellij-rust,intellij-rust/intellij-rust,Undin/intellij-rust,Undin/intellij-rust | src/main/kotlin/org/rust/lang/core/macros/ReexpandMacrosAction.kt | src/main/kotlin/org/rust/lang/core/macros/ReexpandMacrosAction.kt | /*
* Use of this source code is governed by the MIT license that can be
* found in the LICENSE file.
*/
package org.rust.lang.core.macros
import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.project.DumbAware
class ReexpandMacrosActio... | /*
* Use of this source code is governed by the MIT license that can be
* found in the LICENSE file.
*/
package org.rust.lang.core.macros
import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
class ReexpandMacrosAction : AnAction() {
override fun actionPerfor... | mit | Kotlin |
2c1871afe60ba52a3acfb6ffb6fd5715b8acd0c2 | Introduce a BuildUtils utility class for SDK version checks | GDG-Nantes/devfest-android,GDG-Nantes/devfest-android,GDG-Nantes/devfest-android,GDG-Nantes/devfest-android | app/src/main/kotlin/com/gdgnantes/devfest/android/util/BuildUtils.kt | app/src/main/kotlin/com/gdgnantes/devfest/android/util/BuildUtils.kt | package com.gdgnantes.devfest.android.util
import android.os.Build
object BuildUtils {
fun hasO() = Build.VERSION.SDK_INT >= Build.VERSION_CODES.O
} | apache-2.0 | Kotlin | |
bf3afd66532c304dc73cf856a1146183eb0e524c | add bezier helper | angcyo/RLibrary,angcyo/RLibrary | uiview/src/main/java/com/angcyo/uiview/helper/BezierHelper.kt | uiview/src/main/java/com/angcyo/uiview/helper/BezierHelper.kt | package com.angcyo.uiview.helper
import android.graphics.PointF
/**
* Copyright (C) 2016,深圳市红鸟网络科技股份有限公司 All rights reserved.
* 项目名称:
* 类的描述:三阶贝塞尔曲线
* 创建人员:Robi
* 创建时间:2017/12/14 08:51
* 修改人员:Robi
* 修改时间:2017/12/14 08:51
* 修改备注:
* Version: 1.0.0
*/
class BezierPointHelper(private val startPoint: PointF /*曲线... | apache-2.0 | Kotlin | |
91e0ef4868c1138e16b3f47b7aab449bcc97c2ce | Add test for ERC-67 containing gas | walleth/kethereum | erc67/src/test/java/org/kethereum/erc67/TheERC67.kt | erc67/src/test/java/org/kethereum/erc67/TheERC67.kt | package org.kethereum.erc67
import org.assertj.core.api.Assertions.assertThat
import org.junit.Test
import org.kethereum.model.Address
import java.math.BigDecimal
import java.math.BigInteger
class TheERC67 {
@Test
fun basicToERC67Works() {
assertThat(Address("0x00AB42").toERC67String()).isEqualTo("et... | package org.kethereum.erc67
import org.assertj.core.api.Assertions.assertThat
import org.junit.Test
import org.kethereum.model.Address
import java.math.BigDecimal
import java.math.BigInteger
class TheERC67 {
@Test
fun basicToERC67Works() {
assertThat(Address("0x00AB42").toERC67String()).isEqualTo("et... | mit | Kotlin |
1a6974d4a36b77172a1767d1fcd83a24412a327d | refactor Add line break. | toastkidjp/Yobidashi_kt,toastkidjp/Jitte,toastkidjp/Yobidashi_kt,toastkidjp/Jitte | app/src/main/java/jp/toastkid/yobidashi/analytics/LogSender.kt | app/src/main/java/jp/toastkid/yobidashi/analytics/LogSender.kt | package jp.toastkid.yobidashi.analytics
import android.content.Context
import android.os.Bundle
import com.google.firebase.analytics.FirebaseAnalytics
import jp.toastkid.yobidashi.BuildConfig
/**
* Analytics logger wrapper.
*
* @param context Initialize with [Context]
* @author toastkidjp
*/
class LogSender(co... | package jp.toastkid.yobidashi.analytics
import android.content.Context
import android.os.Bundle
import com.google.firebase.analytics.FirebaseAnalytics
import jp.toastkid.yobidashi.BuildConfig
/**
* Analytics logger wrapper.
*
* @param context Initialize with [Context]
* @author toastkidjp
*/
class LogSender(co... | epl-1.0 | Kotlin |
78624fea15357cfa45c420af0f5c1120da67effa | Handle MW error message and change pageId from Long to Int | wikimedia/apps-android-wikipedia,wikimedia/apps-android-wikipedia,wikimedia/apps-android-wikipedia,dbrant/apps-android-wikipedia,dbrant/apps-android-wikipedia,wikimedia/apps-android-wikipedia,dbrant/apps-android-wikipedia,dbrant/apps-android-wikipedia,dbrant/apps-android-wikipedia | app/src/main/java/org/wikipedia/commons/ImageTagsProvider.kt | app/src/main/java/org/wikipedia/commons/ImageTagsProvider.kt | package org.wikipedia.commons
import io.reactivex.Observable
import io.reactivex.schedulers.Schedulers
import org.wikipedia.dataclient.Service
import org.wikipedia.dataclient.ServiceFactory
import org.wikipedia.dataclient.WikiSite
import org.wikipedia.dataclient.wikidata.Claims
import org.wikipedia.dataclient.wikidata... | package org.wikipedia.commons
import io.reactivex.Observable
import io.reactivex.schedulers.Schedulers
import org.wikipedia.dataclient.Service
import org.wikipedia.dataclient.ServiceFactory
import org.wikipedia.dataclient.WikiSite
import java.util.*
object ImageTagsProvider {
fun getImageTagsObservable(pageId: Lo... | apache-2.0 | Kotlin |
9a8268895c2370a9b70c56dfdb91db3158805e46 | Remove unused 'stack' WS packet | xSke/Pxls,xSke/Pxls,xSke/Pxls,xSke/Pxls | src/main/java/space/pxls/server/SocketPackets.kt | src/main/java/space/pxls/server/SocketPackets.kt | package space.pxls.server
import space.pxls.auth.AuthService
data class ClientPlace(val type: String, val x: Int, val y: Int, val color: Int)
data class ClientPlaceMaybe(val x: Int, val y: Int, val color: Int)
data class ClientCaptcha(val token: String)
data class ClientAdminCooldownOverride(val override: Boolean)
da... | package space.pxls.server
import space.pxls.auth.AuthService
data class ClientPlace(val type: String, val x: Int, val y: Int, val color: Int)
data class ClientPlaceMaybe(val x: Int, val y: Int, val color: Int)
data class ClientCaptcha(val token: String)
data class ClientAdminCooldownOverride(val override: Boolean)
da... | mit | Kotlin |
67bd38ea691d5e956ab31e921d70063fdb7c3a0f | Disable this test for now. | ethauvin/kobalt,evanchooly/kobalt,evanchooly/kobalt,ethauvin/kobalt,ethauvin/kobalt,cbeust/kobalt,cbeust/kobalt,evanchooly/kobalt,ethauvin/kobalt,evanchooly/kobalt,cbeust/kobalt | src/test/kotlin/com/beust/kobalt/ResourceTest.kt | src/test/kotlin/com/beust/kobalt/ResourceTest.kt | package com.beust.kobalt
import org.testng.Assert
import org.testng.annotations.Test
import java.util.Properties
@Test(enabled = false)
public class ResourceTest {
val fileName = "kobalt.properties"
fun shouldLoadResources() {
val properties = Properties()
val res = ClassLoader.getSystemResou... | package com.beust.kobalt
import org.testng.Assert
import org.testng.annotations.Test
import java.util.Properties
@Test
public class ResourceTest {
val fileName = "kobalt.properties"
fun shouldLoadResources() {
val properties = Properties()
val res = ClassLoader.getSystemResource(fileName)
... | apache-2.0 | Kotlin |
5d8be7194953fe064fa93a23804b0d6765985354 | Make a constructor for Term taking Cursor as its argument | FarbodSalamat-Zadeh/TimetableApp,FarbodSalamat-Zadeh/TimetableApp | app/src/main/java/com/satsumasoftware/timetable/framework/Term.kt | app/src/main/java/com/satsumasoftware/timetable/framework/Term.kt | package com.satsumasoftware.timetable.framework
import android.database.Cursor
import com.satsumasoftware.timetable.db.TermsSchema
import org.threeten.bp.LocalDate
class Term(val id: Int, val timetableId: Int, val name: String, val startDate: LocalDate,
val endDate: LocalDate) {
constructor(cursor: Cu... | package com.satsumasoftware.timetable.framework
import org.threeten.bp.LocalDate
class Term(val id: Int, val timetableId: Int, val name: String, val startDate: LocalDate,
val endDate: LocalDate)
| apache-2.0 | Kotlin |
a8529e28ca6ab1e346ed77e51f1c0dd45791fe2a | refactor #605 Safe delete 'makeCalendar'. | toastkidjp/Jitte,toastkidjp/Jitte,toastkidjp/Yobidashi_kt,toastkidjp/Yobidashi_kt | app/src/main/java/jp/toastkid/yobidashi/libs/intent/IntentFactory.kt | app/src/main/java/jp/toastkid/yobidashi/libs/intent/IntentFactory.kt | package jp.toastkid.yobidashi.libs.intent
import android.annotation.TargetApi
import android.content.Intent
import android.net.Uri
import android.os.Build
/**
* Common [android.content.Intent] factory.
*
* @author toastkidjp
*/
object IntentFactory {
/**
* Make launching Google Play intent.
*
... | package jp.toastkid.yobidashi.libs.intent
import android.annotation.TargetApi
import android.content.Intent
import android.net.Uri
import android.os.Build
import android.provider.CalendarContract
/**
* Common [android.content.Intent] factory.
*
* @author toastkidjp
*/
object IntentFactory {
/**
* Make l... | epl-1.0 | Kotlin |
a166dc88462c888d3910fb0e26e6058c1b491a76 | update mediaoption class | clappr/clappr-android,clappr/clappr-android | clappr/src/main/kotlin/io/clappr/player/components/MediaOption.kt | clappr/src/main/kotlin/io/clappr/player/components/MediaOption.kt | package io.clappr.player.components
data class MediaOption(val name: String, val type: MediaOptionType, val raw: Any?, val info: Map<String, Any>?)
enum class MediaOptionType {
SUBTITLE,
AUDIO
} | package io.clappr.player.components
/**
* Created by fernando on 5/15/17.
*/
class MediaOption {
} | bsd-3-clause | Kotlin |
b546cf620858cefda9c2fb4c3993e3c674abdafc | Bump firebase-bom version | Adventech/sabbath-school-android-2,Adventech/sabbath-school-android-2,Adventech/sabbath-school-android-2 | buildSrc/src/main/kotlin/dependencies/Versions.kt | buildSrc/src/main/kotlin/dependencies/Versions.kt | package dependencies
object Versions {
const val COROUTINES = "1.4.3"
const val MATERIAL = "1.3.0"
const val DESUGAR = "1.1.1"
object AndroidX {
const val APPCOMPAT = "1.2.0"
const val RECYCLER_VIEW = "1.1.0"
const val LIFECYCLE = "2.3.0"
const val LIFECYCLE_KTX = "2.4... | package dependencies
object Versions {
const val COROUTINES = "1.4.3"
const val MATERIAL = "1.3.0"
const val DESUGAR = "1.1.1"
object AndroidX {
const val APPCOMPAT = "1.2.0"
const val RECYCLER_VIEW = "1.1.0"
const val LIFECYCLE = "2.3.0"
const val LIFECYCLE_KTX = "2.4... | mit | Kotlin |
774ac8e7563cb8dc4905f64b1fdcd31dc1c66aa1 | Update a `java.util.regex.Pattern` return type to match Java | google/xplat,google/xplat,google/xplat,google/xplat | j2kt/jre/java/native/java/util/regex/Pattern.kt | j2kt/jre/java/native/java/util/regex/Pattern.kt | /*
* Copyright 2022 Google Inc.
*
* 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 w... | /*
* Copyright 2022 Google Inc.
*
* 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 w... | apache-2.0 | Kotlin |
c056a3382d6bde51e227e0e1f24ba40a9fa00c19 | Add ENTIRE instruction field | kvakil/venus,kvakil/venus,kvakil/venus | src/main/kotlin/riscv/InstructionField.kt | src/main/kotlin/riscv/InstructionField.kt | package venus.riscv
/** Masks to get specific fields from RV32 instruction formats */
enum class InstructionField(val mask: Int) {
/* requires .toInt() as per KT-4749 */
/* ktlint-disable no-multi-spaces */
ENTIRE (0b11111111111111111111111111111111.toInt()),
OPCODE (0b0000000... | package venus.riscv
/** Masks to get specific fields from RV32 instruction formats */
enum class InstructionField(val mask: Int) {
/* requires .toInt() as per KT-4749 */
/* ktlint-disable no-multi-spaces */
OPCODE (0b00000000000000000000000001111111.toInt()),
RD (0b0000000... | mit | Kotlin |
9536b54854dd97e07d53d18caa3ffd0ab6888afb | Build fix | Cognifide/gradle-aem-plugin,Cognifide/gradle-aem-plugin | src/main/kotlin/com/cognifide/gradle/aem/common/utils/Utils.kt | src/main/kotlin/com/cognifide/gradle/aem/common/utils/Utils.kt | package com.cognifide.gradle.aem.common.utils
import org.apache.commons.lang3.StringUtils
import java.io.File
object Utils {
fun mapOfNonNullValues(vararg entries: Pair<String, String?>): Map<String, String> {
return mutableMapOf<String, String>().apply {
for ((k, v) in entries) {
... | package com.cognifide.gradle.aem.common.utils
import org.apache.commons.lang3.StringUtils
import java.io.File
object Utils {
fun mapOfNonNullValues(vararg entries: Pair<String, String?>): Map<String, String> {
return mutableMapOf<String, String>().apply {
for ((k, v) in entries) {
... | apache-2.0 | Kotlin |
0beadc95a7caf81d01e67d64deb0e2720ee56f6c | Add custom comment span | wordpress-mobile/AztecEditor-Android,wordpress-mobile/AztecEditor-Android,wordpress-mobile/AztecEditor-Android | aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecCommentSpan.kt | aztec/src/main/kotlin/org/wordpress/aztec/spans/AztecCommentSpan.kt | package org.wordpress.aztec.spans
import android.content.Context
import android.text.style.ImageSpan
import android.text.style.ParagraphStyle
import android.view.View
import android.widget.Toast
internal class AztecCommentSpan(html: StringBuilder, context: Context, drawable: Int) : ImageSpan(context, drawable), Parag... | mpl-2.0 | Kotlin | |
f1f470ae6968f0e9b2f148162c302ed93f9c6e55 | Create DelayTeleporter | Homes-MinecraftServerMod/Homes,Homes-MinecraftServerMod/Homes | src/main/kotlin/com/masahirosaito/spigot/homes/DelayTeleporter.kt | src/main/kotlin/com/masahirosaito/spigot/homes/DelayTeleporter.kt | package com.masahirosaito.spigot.homes
import com.masahirosaito.spigot.homes.exceptions.AlreadyExecutTeleportException
import com.masahirosaito.spigot.homes.exceptions.CanNotFindOnlinePlayerException
import com.masahirosaito.spigot.homes.strings.TeleportStrings
import org.bukkit.Location
import org.bukkit.entity.Playe... | apache-2.0 | Kotlin | |
8aa0bdc1b1af482e4f45b9f548153296ce1b3c3f | Add disassembler for load instructions | kvakil/venus,kvakil/venus,kvakil/venus | src/main/kotlin/venus/riscv/insts/dsl/disasms/LoadDisassembler.kt | src/main/kotlin/venus/riscv/insts/dsl/disasms/LoadDisassembler.kt | package venus.riscv.insts.dsl.disasms
import venus.riscv.InstructionField
import venus.riscv.MachineCode
import venus.riscv.insts.dsl.Instruction
import venus.riscv.insts.dsl.impls.signExtend
object LoadDisassembler : InstructionDisassembler {
override fun invoke(mcode: MachineCode): String {
val name = I... | mit | Kotlin | |
902007ca898e960a979e583f8501ed3d49ef04e8 | Use Chrome’s user agent instead of Googlebot when fetching content via the default OkHttpClient. | chimbori/crux,chimbori/crux | src/main/kotlin/com/chimbori/crux/common/OkHttpExtensions.kt | src/main/kotlin/com/chimbori/crux/common/OkHttpExtensions.kt | package com.chimbori.crux.common
import com.chimbori.crux.Resource
import java.io.IOException
import java.net.UnknownHostException
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import okhttp3.HttpUrl
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import org.jso... | package com.chimbori.crux.common
import com.chimbori.crux.Resource
import java.io.IOException
import java.net.UnknownHostException
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import okhttp3.HttpUrl
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import org.jso... | apache-2.0 | Kotlin |
72307786ce605ee45bb2491f1073c6e2afb75052 | Disable experimental warning | PEXPlugins/PermissionsEx,PEXPlugins/PermissionsEx,PEXPlugins/PermissionsEx | buildSrc/build.gradle.kts | buildSrc/build.gradle.kts | /*
* PermissionsEx
* Copyright (C) zml and PermissionsEx contributors
*
* 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 re... | /*
* PermissionsEx
* Copyright (C) zml and PermissionsEx contributors
*
* 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 re... | apache-2.0 | Kotlin |
a70542e808e4b0694188e5bd950c577ca216daaf | Fix sprite migration | kkorolyov/Pancake,kkorolyov/Pancake | killstreek/src/main/kotlin/dev/kkorolyov/killstreek/media/Sprite.kt | killstreek/src/main/kotlin/dev/kkorolyov/killstreek/media/Sprite.kt | package dev.kkorolyov.killstreek.media
import dev.kkorolyov.pancake.platform.math.Vector
import dev.kkorolyov.pancake.platform.media.Animated
import dev.kkorolyov.pancake.platform.media.CompositeImage
import dev.kkorolyov.pancake.platform.media.Renderable
import javafx.scene.canvas.GraphicsContext
/**
* A dynamic im... | package dev.kkorolyov.killstreek.media
import dev.kkorolyov.pancake.platform.math.Vector
import dev.kkorolyov.pancake.platform.media.Animated
import dev.kkorolyov.pancake.platform.media.CompositeImage
import dev.kkorolyov.pancake.platform.media.Renderable
import javafx.scene.canvas.GraphicsContext
/**
* A dynamic im... | bsd-3-clause | Kotlin |
9ff5eda9f3dfcc0fc298910feb97333991529e54 | Add internal modifier to Ignored tag | raniejade/kspec | kspec-core/src/main/kotlin/io/polymorphicpanda/kspec/tag/Ignored.kt | kspec-core/src/main/kotlin/io/polymorphicpanda/kspec/tag/Ignored.kt | package io.polymorphicpanda.kspec.tag
/**
* @author Ranie Jade Ramiso
*/
internal class Ignored(name: String, val reason: String): Tag(name) {
}
| package io.polymorphicpanda.kspec.tag
/**
* @author Ranie Jade Ramiso
*/
class Ignored(name: String, val reason: String): Tag(name) {
}
| mit | Kotlin |
c42478ad15947994d44724392c754f680731b74a | Clean up tab/tab_list/ViewHolder.kt. | toastkidjp/Yobidashi_kt,toastkidjp/Yobidashi_kt,toastkidjp/Jitte,toastkidjp/Jitte | app/src/main/java/jp/toastkid/yobidashi/tab/tab_list/ViewHolder.kt | app/src/main/java/jp/toastkid/yobidashi/tab/tab_list/ViewHolder.kt | package jp.toastkid.yobidashi.tab.tab_list
import android.graphics.Color
import android.support.annotation.ColorInt
import android.support.v7.widget.RecyclerView
import android.view.View
import jp.toastkid.yobidashi.R
import jp.toastkid.yobidashi.databinding.ItemTabListBinding
import jp.toastkid.yobidashi.libs.ImageLo... | package jp.toastkid.yobidashi.tab.tab_list
import android.graphics.Color
import android.support.v7.widget.RecyclerView
import android.view.View
import jp.toastkid.yobidashi.R
import jp.toastkid.yobidashi.databinding.ItemTabListBinding
import jp.toastkid.yobidashi.libs.ImageLoader
import jp.toastkid.yobidashi.libs.pref... | epl-1.0 | Kotlin |
fb4e3f9c62e25057bfcd872ad72b7de55f2b7fe2 | refactor #894 Extract folder-name to constant. | toastkidjp/Yobidashi_kt,toastkidjp/Yobidashi_kt | number/src/main/java/jp/toastkid/number/factory/GameFileProvider.kt | number/src/main/java/jp/toastkid/number/factory/GameFileProvider.kt | /*
* Copyright (c) 2022 toastkidjp.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompany this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html.
*/
package jp... | /*
* Copyright (c) 2022 toastkidjp.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompany this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html.
*/
package jp... | epl-1.0 | Kotlin |
f9553e6b485dd27f219ac44808fc954a31845765 | Bump the version. | SpineEventEngine/base,SpineEventEngine/base,SpineEventEngine/base | version.gradle.kts | version.gradle.kts | /*
* Copyright 2021, TeamDev. All rights reserved.
*
* 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
*
* Redistribution and use in source... | /*
* Copyright 2021, TeamDev. All rights reserved.
*
* 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
*
* Redistribution and use in source... | apache-2.0 | Kotlin |
0df7662bc9a3544ce9bdc43b19ffbad0011beb3d | Bump version | SpineEventEngine/base,SpineEventEngine/base,SpineEventEngine/base | version.gradle.kts | version.gradle.kts | /*
* Copyright 2021, TeamDev. All rights reserved.
*
* 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
*
* Redistribution and use in source... | /*
* Copyright 2021, TeamDev. All rights reserved.
*
* 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
*
* Redistribution and use in source... | apache-2.0 | Kotlin |
cd520bd0a708a563ef7c804f7122e4a30122d01c | Improve JebExecException api | aleksey-zhidkov/jeb-k | src/main/kotlin/jeb/JebExecException.kt | src/main/kotlin/jeb/JebExecException.kt | package jeb
import java.io.IOException
class JebExecException(
public val cmd: String,
public val stdout: String,
public val stderr: String,
public val returnCode: Int,
cause: Throwable? = null) : IOException("Could not execute $cmd", cause)
| package jeb
import java.io.IOException
class JebExecException(
val cmd: String,
val stdout: String,
val stderr: String,
val returnCode: Int,
cause: Throwable? = null) : IOException("Could not execute $cmd")
| apache-2.0 | Kotlin |
62e851210160880664b284813a3ad589c41503bb | Solve problem 2023 | fredyw/leetcode,fredyw/leetcode,fredyw/leetcode,fredyw/leetcode | src/main/kotlin/leetcode/Problem2023.kt | src/main/kotlin/leetcode/Problem2023.kt | package leetcode
/**
* https://leetcode.com/problems/number-of-pairs-of-strings-with-concatenation-equal-to-target/
*/
class Problem2023 {
fun numOfPairs(nums: Array<String>, target: String): Int {
var answer = 0
for ((index1, num1) in nums.withIndex()) {
for ((index2, num2) in nums.w... | package leetcode
/**
* https://leetcode.com/problems/number-of-pairs-of-strings-with-concatenation-equal-to-target/
*/
class Problem2023 {
fun numOfPairs(nums: Array<String>, target: String): Int {
// TODO
return 0;
}
}
fun main() {
val prob = Problem2023()
println(prob.numOfPairs(ar... | mit | Kotlin |
7de3ec9c5ebc38bcd95b2032410b9b472cc72916 | Solve problem 2186 | fredyw/leetcode,fredyw/leetcode,fredyw/leetcode,fredyw/leetcode | src/main/kotlin/leetcode/Problem2186.kt | src/main/kotlin/leetcode/Problem2186.kt | package leetcode
import kotlin.math.abs
/**
* https://leetcode.com/problems/minimum-number-of-steps-to-make-two-strings-anagram-ii/
*/
class Problem2186 {
fun minSteps(s: String, t: String): Int {
val sCounts = IntArray(26)
for (c in s) {
sCounts[c - 'a']++
}
var tCou... | package leetcode
/**
* https://leetcode.com/problems/minimum-number-of-steps-to-make-two-strings-anagram-ii/
*/
class Problem2186 {
fun minSteps(s: String, t: String): Int {
TODO()
}
}
fun main() {
val prob = Problem2186()
println(prob.minSteps("leetcode", "coats")) // 7
println(prob.min... | mit | Kotlin |
eda54f87fa75dc51f032cbc01f563fe82375f906 | Print day number | rnelson/adventofcode,rnelson/adventofcode,rnelson/adventofcode,rnelson/adventofcode | advent2018/src/main/kotlin/com/github/rnelson/adventofcode/Main.kt | advent2018/src/main/kotlin/com/github/rnelson/adventofcode/Main.kt | package com.github.rnelson.adventofcode
import kotlin.reflect.full.createInstance
fun main(args: Array<String>) {
if (args.count() != 1) {
println("usage: advent2018 <day number>")
System.exit(1)
}
val className = "com.github.rnelson.adventofcode.days.Day${args[0]}"
val day = Class.fo... | package com.github.rnelson.adventofcode
import kotlin.reflect.full.createInstance
fun main(args: Array<String>) {
if (args.count() != 1) {
println("usage: advent2018 <day number>")
System.exit(1)
}
val className = "com.github.rnelson.adventofcode.days.Day${args[0]}"
val day = Class.fo... | mit | Kotlin |
9806bc0370a49657db76247d0d652b6c745960bf | add autoplay to playback | clappr/clappr-android,clappr/clappr-android | player/src/main/kotlin/com/globo/clappr/components/Playback.kt | player/src/main/kotlin/com/globo/clappr/components/Playback.kt | package com.globo.clappr.components
import com.globo.clappr.base.UIObject
import com.globo.clappr.base.NamedType
import com.globo.clappr.base.Options
import kotlin.reflect.companionObjectInstance
interface PlaybackSupportInterface: NamedType {
fun supportsSource(source: String, mimeType: String? = null): Boolean
... | package com.globo.clappr.components
import com.globo.clappr.base.UIObject
import com.globo.clappr.base.NamedType
import com.globo.clappr.base.Options
import kotlin.reflect.companionObjectInstance
interface PlaybackSupportInterface: NamedType {
fun supportsSource(source: String, mimeType: String? = null): Boolean
... | bsd-3-clause | Kotlin |
55fd604b15b64c2fc4c44ab5819f367fa582574b | Add some Settings extensions for ease of use | gradle/gradle-script-kotlin,robinverduijn/gradle,robinverduijn/gradle,gradle/gradle,blindpirate/gradle,blindpirate/gradle,blindpirate/gradle,gradle/gradle,gradle/gradle,robinverduijn/gradle,blindpirate/gradle,gradle/gradle,blindpirate/gradle,robinverduijn/gradle,blindpirate/gradle,gradle/gradle,robinverduijn/gradle,rob... | provider/src/main/kotlin/org/gradle/kotlin/dsl/SettingsExtensions.kt | provider/src/main/kotlin/org/gradle/kotlin/dsl/SettingsExtensions.kt | /*
* Copyright 2017 the original author or authors.
*
* 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 applica... | apache-2.0 | Kotlin | |
a850983b8838f10fbceca58e9b6171837674d8ac | Add missing stdlib dep to service registry annotations | hzsweers/CatchUp,hzsweers/CatchUp,hzsweers/CatchUp,hzsweers/CatchUp | service-registry/service-registry-annotations/build.gradle.kts | service-registry/service-registry-annotations/build.gradle.kts | /*
* Copyright (c) 2018 Zac Sweers
*
* 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... | /*
* Copyright (c) 2018 Zac Sweers
*
* 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... | apache-2.0 | Kotlin |
ed592dc6dd01e246fa84a2d3f41af01f4b47796f | Remove unnecessary escaping to `artifactPattern` regex. | fwcd/kotlin-language-server,fwcd/kotlin-language-server,fwcd/kotlin-language-server | src/main/kotlin/org/javacs/kt/classpath/gradleDependencyResolver.kt | src/main/kotlin/org/javacs/kt/classpath/gradleDependencyResolver.kt | package org.javacs.kt.classpath
import org.javacs.kt.LOG
import org.javacs.kt.util.firstNonNull
import org.javacs.kt.util.tryResolving
import org.javacs.kt.util.execAndReadStdout
import org.javacs.kt.util.KotlinLSException
import java.io.File
import java.nio.file.FileSystems
import java.nio.file.Files
import java.nio.... | package org.javacs.kt.classpath
import org.javacs.kt.LOG
import org.javacs.kt.util.firstNonNull
import org.javacs.kt.util.tryResolving
import org.javacs.kt.util.execAndReadStdout
import org.javacs.kt.util.KotlinLSException
import java.io.File
import java.nio.file.FileSystems
import java.nio.file.Files
import java.nio.... | mit | Kotlin |
dba0611cda8c3fe68d12ede1ec215e86f62623ad | Add method to simplify watching an EditText | jguerinet/Suitcase,jguerinet/android-utils,jguerinet/Suitcase,jguerinet/android-utils | ui/src/main/java/com/guerinet/suitcase/ui/extensions/EditTextExt.kt | ui/src/main/java/com/guerinet/suitcase/ui/extensions/EditTextExt.kt | /*
* Copyright 2016-2018 Julien Guerinet
*
* 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 a... | apache-2.0 | Kotlin | |
274754ddaeb2b5fdff0672b4919ca68a303d7114 | Add BasicExample | joffrey-bion/hashcode-utils | src/test/java/org/hildan/hashcode/utils/examples/basic/BasicExample.kt | src/test/java/org/hildan/hashcode/utils/examples/basic/BasicExample.kt | package org.hildan.hashcode.utils.examples.basic
import kotlinx.coroutines.runBlocking
import org.hildan.hashcode.utils.parser.HCParser
import org.hildan.hashcode.utils.parser.context.ParsingContext
import org.hildan.hashcode.utils.runner.HCRunner
import org.hildan.hashcode.utils.solver.HCSolver
import java.util.Array... | mit | Kotlin | |
940836dcb294341aa946030448b054fa695d57b6 | refactor #412 Safe delete 'suggestions'. | toastkidjp/Yobidashi_kt,toastkidjp/Yobidashi_kt | app/src/main/java/jp/toastkid/yobidashi/search/suggestion/Adapter.kt | app/src/main/java/jp/toastkid/yobidashi/search/suggestion/Adapter.kt | package jp.toastkid.yobidashi.search.suggestion
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.annotation.LayoutRes
import androidx.databinding.DataBindingUtil
import androidx.recyclerview.widget.ListAdapter
import jp.toastkid.lib.view.list.CommonItemCallback
import jp.toastkid.yobida... | package jp.toastkid.yobidashi.search.suggestion
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.annotation.LayoutRes
import androidx.databinding.DataBindingUtil
import androidx.recyclerview.widget.ListAdapter
import jp.toastkid.lib.view.list.CommonItemCallback
import jp.toastkid.yobida... | epl-1.0 | Kotlin |
52708de544ab12c6ebe3bbd7c4d132d671755ebc | refactor #511 Implement TableConverter's test. | toastkidjp/Jitte,toastkidjp/Yobidashi_kt,toastkidjp/Yobidashi_kt,toastkidjp/Jitte | app/src/test/java/jp/toastkid/yobidashi/editor/TableConverterTest.kt | app/src/test/java/jp/toastkid/yobidashi/editor/TableConverterTest.kt | /*
* Copyright (c) 2021 toastkidjp.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompany this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html.
*/
package jp... | epl-1.0 | Kotlin | |
44200b05053557e83883c618696f9b705aebe4d5 | Include more information when a path is not for a directory or a file. | charleskorn/batect,charleskorn/batect,charleskorn/batect,charleskorn/batect,charleskorn/batect | app/src/main/kotlin/batect/config/io/PathResolver.kt | app/src/main/kotlin/batect/config/io/PathResolver.kt | /*
Copyright 2017 Charles Korn.
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 w... | /*
Copyright 2017 Charles Korn.
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 w... | apache-2.0 | Kotlin |
26d85708e209bbdbd4e1cde0d19b01977137aa73 | Remove unused companion functions Emitter | DanielMartinus/Konfetti | konfetti-core/src/main/java/nl/dionsegijn/konfetti_core/emitter/EmitterConfig.kt | konfetti-core/src/main/java/nl/dionsegijn/konfetti_core/emitter/EmitterConfig.kt | package nl.dionsegijn.konfetti_core.emitter
import java.util.concurrent.TimeUnit
data class Emitter(
val duration: Long,
val timeUnit: TimeUnit = TimeUnit.MILLISECONDS
) {
fun max(amount: Int): EmitterConfig = EmitterConfig(this).max(amount)
fun perSecond(amount: Int): EmitterConfig = EmitterConfig(t... | package nl.dionsegijn.konfetti_core.emitter
import java.util.concurrent.TimeUnit
data class Emitter(
val duration: Long,
val timeUnit: TimeUnit = TimeUnit.MILLISECONDS
) {
fun max(amount: Int): EmitterConfig = EmitterConfig(this).max(amount)
fun perSecond(amount: Int): EmitterConfig = EmitterConfig(t... | isc | Kotlin |
580efd68df531a90d463c5adbb7d1f75ec46f858 | Add a fix for nullable LiveData default | bubenheimer/androidrxutil,bubenheimer/androidrxutil | src/main/java/org/bubenheimer/android/livedata/LiveDataUtils.kt | src/main/java/org/bubenheimer/android/livedata/LiveDataUtils.kt | /*
* Copyright (c) 2015-2019 Uli Bubenheimer
*
* 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... | /*
* Copyright (c) 2015-2019 Uli Bubenheimer
*
* 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... | apache-2.0 | Kotlin |
fbc21ffc508eb92073a3fa0bd0705a43ce010403 | Add cache mechanism for meta-services | lapis-mc/minecraft-versioning | src/main/kotlin/com/lapismc/minecraft/versioning/CachedMetaService.kt | src/main/kotlin/com/lapismc/minecraft/versioning/CachedMetaService.kt | package com.lapismc.minecraft.versioning
/**
* Provides cached access to a meta-service.
* Repeat requests will be retrieved from cache
* instead of performing another possibly expensive request.
* @param service Underlying service that performs the requests.
*/
class CachedMetaService(private val service: MetaSe... | mit | Kotlin | |
36b2e769d3f4350de61087ed611dd846ee843702 | UPDATE version code and name from device | costular/kotlin-android-utils,costular/kotlin-android-utils | kotlin-utils/src/main/java/com/costular/kotlin_utils/versions/VersionExtensions.kt | kotlin-utils/src/main/java/com/costular/kotlin_utils/versions/VersionExtensions.kt | package com.costular.kotlin_utils.versions
import android.content.Context
/**
* Created by costular on 14/08/17.
*/
fun Context.getVersionCode(): Int = packageManager.getPackageInfo(packageName, 0).versionCode
fun Context.getVersionName(): String = packageManager.getPackageInfo(packageName, 0).versionName
| apache-2.0 | Kotlin | |
7b502a53a7e68f68d8ffdde7db1b50619194d1f3 | Update import Unconfined to Dispatchers.Unconfined | nickbutcher/plaid,nickbutcher/plaid,nickbutcher/plaid,nickbutcher/plaid | test_shared/src/main/java/io/plaidapp/test/shared/FakeAppInjection.kt | test_shared/src/main/java/io/plaidapp/test/shared/FakeAppInjection.kt | /*
* Copyright 2018 Google, Inc.
*
* 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... | /*
* Copyright 2018 Google, Inc.
*
* 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... | apache-2.0 | Kotlin |
2c2dfdeaf316d1eb8d80ab09d40d5ac53792e18b | Update build.gradle.kts | awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,a... | kotlin/services/sqs/build.gradle.kts | kotlin/services/sqs/build.gradle.kts | import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.5.31"
id("io.gitlab.arturbosch.detekt").version("1.16.0-RC1")
application
}
group = "me.scmacdon"
version = "1.0-SNAPSHOT"
buildscript {
repositories {
jcenter()
}
}
repositories {
mavenCentral()... | import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.5.31"
id("io.gitlab.arturbosch.detekt").version("1.16.0-RC1")
application
}
group = "me.scmacdon"
version = "1.0-SNAPSHOT"
buildscript {
repositories {
jcenter()
}
}
repositories {
mavenCentral()... | apache-2.0 | Kotlin |
05e4e25c10b219a002b46689755bcb8c3b96a9bf | refactor #559 Remove unused line separator. | toastkidjp/Jitte,toastkidjp/Yobidashi_kt,toastkidjp/Yobidashi_kt,toastkidjp/Jitte | lib/src/main/java/jp/toastkid/lib/view/RightSwipeActionAttachment.kt | lib/src/main/java/jp/toastkid/lib/view/RightSwipeActionAttachment.kt | package jp.toastkid.lib.view
import androidx.recyclerview.widget.ItemTouchHelper
import androidx.recyclerview.widget.RecyclerView
/**
* Attach right bound swipe action.
*
* @author toastkidjp
*/
class RightSwipeActionAttachment {
/**
* Attach action to passed [RecyclerView].
*
* @param recycle... | package jp.toastkid.lib.view
import androidx.recyclerview.widget.ItemTouchHelper
import androidx.recyclerview.widget.RecyclerView
/**
* Attach right bound swipe action.
*
* @author toastkidjp
*/
class RightSwipeActionAttachment {
/**
* Attach action to passed [RecyclerView].
*
* @param recycle... | epl-1.0 | Kotlin |
7234b64b905ff148d96fb2da1e73f9f91722bc57 | Test cleanup. | milos85vasic/Decorator,milos85vasic/Decorator | Decorator/src/test/kotlin/net/milosvasic/decorator/DecoratorTest.kt | Decorator/src/test/kotlin/net/milosvasic/decorator/DecoratorTest.kt | package net.milosvasic.decorator
import net.milosvasic.decorator.data.DataBuilder
import net.milosvasic.logger.SimpleLogger
import net.milosvasic.logger.VariantsConfiguration
import org.junit.Test
class DecoratorTest {
@Test
fun testDecorator() {
val logger = SimpleLogger(VariantsConfiguration(BuildC... | package net.milosvasic.decorator
import net.milosvasic.decorator.data.DataBuilder
import net.milosvasic.logger.SimpleLogger
import net.milosvasic.logger.VariantsConfiguration
import org.junit.Test
class DecoratorTest {
@Test
fun testDecorator() {
val logger = SimpleLogger(VariantsConfiguration(BuildC... | apache-2.0 | Kotlin |
5a83fbde95f5532c3d34cf1349b43eb57a569e41 | Clear list of folders in drawer when switching accounts | cketti/k-9,cketti/k-9,cketti/k-9,k9mail/k-9,k9mail/k-9,cketti/k-9,k9mail/k-9 | app/ui/legacy/src/main/java/com/fsck/k9/ui/folders/FoldersViewModel.kt | app/ui/legacy/src/main/java/com/fsck/k9/ui/folders/FoldersViewModel.kt | package com.fsck.k9.ui.folders
import androidx.lifecycle.LiveData
import androidx.lifecycle.MediatorLiveData
import androidx.lifecycle.ViewModel
import com.fsck.k9.Account
import com.fsck.k9.mailstore.DisplayFolder
class FoldersViewModel(private val foldersLiveDataFactory: FoldersLiveDataFactory) : ViewModel() {
... | package com.fsck.k9.ui.folders
import androidx.lifecycle.LiveData
import androidx.lifecycle.MediatorLiveData
import androidx.lifecycle.ViewModel
import com.fsck.k9.Account
import com.fsck.k9.mailstore.DisplayFolder
class FoldersViewModel(private val foldersLiveDataFactory: FoldersLiveDataFactory) : ViewModel() {
... | apache-2.0 | Kotlin |
dbab5e7f38159cab07456bd1f8b14f3cb1097fb6 | Check for null views | hzsweers/CatchUp,hzsweers/CatchUp,hzsweers/CatchUp,hzsweers/CatchUp | app/src/main/kotlin/io/sweers/catchup/ui/base/BaseController.kt | app/src/main/kotlin/io/sweers/catchup/ui/base/BaseController.kt | /*
* Copyright (c) 2018 Zac Sweers
*
* 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... | /*
* Copyright (c) 2018 Zac Sweers
*
* 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... | apache-2.0 | Kotlin |
6f84719637289506512194a5884d785c28fcbf2c | Add ActionBar extensions | LouisCAD/Splitties,LouisCAD/Splitties,LouisCAD/Splitties | appcompat-views/src/main/java/splitties/appcompatviews/ActionBar.kt | appcompat-views/src/main/java/splitties/appcompatviews/ActionBar.kt | /*
* Copyright (c) 2018. Louis Cognault Ayeva Derman
*
* 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 ... | apache-2.0 | Kotlin | |
c2f4231f32e9665fc4afc188ec3eaf7e76f5f5bc | Fix unsafe cast | jguerinet/Suitcase,jguerinet/android-utils,jguerinet/android-utils,jguerinet/Suitcase | ui/src/main/java/com/guerinet/suitcase/ui/CustomDurationViewPager.kt | ui/src/main/java/com/guerinet/suitcase/ui/CustomDurationViewPager.kt | /*
* Copyright 2016-2019 Julien Guerinet
*
* 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 a... | /*
* Copyright 2016-2019 Julien Guerinet
*
* 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 a... | apache-2.0 | Kotlin |
0caac4cbb309859301871d5f1b6cc5dc2b329907 | Fix shared-compiler publication so it could be used without excluding of transitive dependencies | ligee/kotlin-jupyter | jupyter-lib/shared-compiler/build.gradle.kts | jupyter-lib/shared-compiler/build.gradle.kts | import build.CreateResourcesTask
plugins {
id("ru.ileasile.kotlin.publisher")
kotlin("jvm")
kotlin("plugin.serialization")
}
repositories {
mavenCentral()
}
dependencies {
// Internal dependencies
api(projects.api)
api(projects.lib)
api(projects.commonDependencies)
// Standard de... | import build.CreateResourcesTask
plugins {
id("ru.ileasile.kotlin.publisher")
kotlin("jvm")
kotlin("plugin.serialization")
}
repositories {
mavenCentral()
}
dependencies {
// Internal dependencies
api(projects.api)
api(projects.lib)
api(projects.commonDependencies)
// Standard de... | apache-2.0 | Kotlin |
00b287200cf9ccc6d000b11af59952476468b577 | Add startPadding and endPadding | LouisCAD/Splitties,LouisCAD/Splitties,LouisCAD/Splitties | modules/views/src/androidMain/kotlin/splitties/views/Padding.kt | modules/views/src/androidMain/kotlin/splitties/views/Padding.kt | /*
* Copyright 2019 Louis Cognault Ayeva Derman. Use of this source code is governed by the Apache 2.0 license.
*/
package splitties.views
import android.os.Build.VERSION.SDK_INT
import android.view.View
import androidx.annotation.Px
import splitties.dimensions.dip
import kotlin.DeprecationLevel.HIDDEN
inline var ... | /*
* Copyright 2019 Louis Cognault Ayeva Derman. Use of this source code is governed by the Apache 2.0 license.
*/
package splitties.views
import android.view.View
import androidx.annotation.Px
import splitties.dimensions.dip
import kotlin.DeprecationLevel.HIDDEN
inline var View.padding: Int
@Deprecated(NO_GET... | apache-2.0 | Kotlin |
e8e95683e7aff8ee7674a16be3479e3735123cc9 | Add docu fo multi let not null | stupacki/MultiFunctions | multi-functions/src/main/kotlin/io/multifunctions/MultiLetCheckNull.kt | multi-functions/src/main/kotlin/io/multifunctions/MultiLetCheckNull.kt | @file:Suppress("UNCHECKED_CAST")
package io.multifunctions
import io.multifunctions.models.Hepta
import io.multifunctions.models.Hexa
import io.multifunctions.models.Penta
import io.multifunctions.models.Quad
/**
* Calls the specified function [block] with `this` value as its arguments and returns its result when n... | @file:Suppress("UNCHECKED_CAST")
package io.multifunctions
import io.multifunctions.models.Hepta
import io.multifunctions.models.Hexa
import io.multifunctions.models.Penta
import io.multifunctions.models.Quad
inline infix fun <A, B, R> Pair<A?, B?>.letCheckNull(transform: (A, B) -> R): R? =
when (null) {
... | apache-2.0 | Kotlin |
bc90aaafa2f3b7512e4e058a42d5400c54d336ae | Rename FollowShowCall params | chrisbanes/tivi,chrisbanes/tivi | calls/src/main/java/app/tivi/calls/FollowShowCall.kt | calls/src/main/java/app/tivi/calls/FollowShowCall.kt | /*
* Copyright 2018 Google, Inc.
*
* 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... | /*
* Copyright 2018 Google, Inc.
*
* 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... | apache-2.0 | Kotlin |
4b3bdbd2793341ab4120599b9f011506f497229b | Add knowit slack | yngvark/snippets,yngvark/snippets,yngvark/snippets,yngvark/snippets | pc-init/src/main/kotlin/com/yngvark/pc_init/process/WebPagesProcess.kt | pc-init/src/main/kotlin/com/yngvark/pc_init/process/WebPagesProcess.kt | package com.yngvark.pc_init.process
import com.yngvark.pc_init.robot.RobotHelper
import com.yngvark.pc_init.secretGetter
import java.awt.event.KeyEvent
class WebPagesProcess(private val robot: RobotHelper) {
fun run() {
println("Process: ${javaClass.simpleName}")
robot.pressAndRelease(KeyEvent.VK... | package com.yngvark.pc_init.process
import com.yngvark.pc_init.robot.RobotHelper
import com.yngvark.pc_init.secretGetter
import java.awt.event.KeyEvent
class WebPagesProcess(private val robot: RobotHelper) {
fun run() {
println("Process: ${javaClass.simpleName}")
robot.pressAndRelease(KeyEvent.VK... | unlicense | Kotlin |
11fafacf1c3655b6327ae7402740adc406fcf468 | remove never used code | YiiGuxing/TranslationPlugin,YiiGuxing/TranslationPlugin | src/main/kotlin/cn/yiiguxing/plugin/translate/action/actions.kt | src/main/kotlin/cn/yiiguxing/plugin/translate/action/actions.kt | package cn.yiiguxing.plugin.translate.action
import cn.yiiguxing.plugin.translate.util.Settings
import com.intellij.openapi.actionSystem.ActionPlaces
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.CommonDataKeys
import com.intellij.openapi.editor.Editor
val AnActionEve... | package cn.yiiguxing.plugin.translate.action
import cn.yiiguxing.plugin.translate.util.Settings
import com.intellij.openapi.actionSystem.ActionPlaces
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.CommonDataKeys
import com.intellij.openapi.editor.Editor
val AnActionEve... | mit | Kotlin |
bdb7e831eb4bfb816ff2a79cc05b9827cd56c906 | fix xml filter reader | bmunzenb/feed-buddy | src/main/kotlin/com/munzenberger/feed/source/XMLFilterReader.kt | src/main/kotlin/com/munzenberger/feed/source/XMLFilterReader.kt | package com.munzenberger.feed.source
import java.io.FilterReader
import java.io.Reader
import java.lang.UnsupportedOperationException
class XMLFilterReader(inReader: Reader, private val encoding: String) : FilterReader(inReader) {
companion object {
private const val BYTE_ORDER_MARK = '\uFEFF'
p... | package com.munzenberger.feed.source
import java.io.FilterReader
import java.io.Reader
import java.lang.UnsupportedOperationException
class XMLFilterReader(inReader: Reader, private val encoding: String) : FilterReader(inReader) {
companion object {
private const val BYTE_ORDER_MARK = '\uFEFF'
p... | apache-2.0 | Kotlin |
d750ed2ff69e1ef431a2ed821ca2fb0ff725cffb | test added | ligee/kotlin-jupyter | src/test/kotlin/org/jetbrains/kotlin/jupyter/test/replTests.kt | src/test/kotlin/org/jetbrains/kotlin/jupyter/test/replTests.kt | package org.jetbrains.kotlin.jupyter.test
import org.jetbrains.kotlin.jupyter.ReplForJupyter
import org.junit.Assert
import org.junit.Before
import org.junit.Test
class ReplTest{
var repl = ReplForJupyter()
@Before
fun SetUp(){
repl = ReplForJupyter(classpath)
}
@Test
fun TestRepl()... | package org.jetbrains.kotlin.jupyter.test
import org.jetbrains.kotlin.jupyter.ReplForJupyter
import org.junit.Assert
import org.junit.Before
import org.junit.Test
class ReplTest{
var repl = ReplForJupyter()
@Before
fun SetUp(){
repl = ReplForJupyter(classpath)
}
@Test
fun TestRepl()... | apache-2.0 | Kotlin |
bc286ab70babf5f6c01631f3cd20be1a89c45ee2 | Fix warnings from usage of @Experimental and @UseExperimental | Kotlin/kotlinx-cli | core/build.gradle.kts | core/build.gradle.kts | plugins {
kotlin("multiplatform")
}
kotlin {
infra {
target("macosX64")
target("linuxX64")
target("mingwX64")
}
js {
compilations.all {
kotlinOptions {
sourceMap = true
moduleKind = "umd"
metaInfo = true
... | plugins {
kotlin("multiplatform")
}
kotlin {
infra {
target("macosX64")
target("linuxX64")
target("mingwX64")
}
js {
compilations.all {
kotlinOptions {
sourceMap = true
moduleKind = "umd"
metaInfo = true
... | apache-2.0 | Kotlin |
d486a012b8ec5b7ecb1ce2823d2560f7021bd32e | add step text wrapper | StepicOrg/stepik-android,StepicOrg/stepik-android,StepicOrg/stepic-android,StepicOrg/stepik-android,StepicOrg/stepic-android,StepicOrg/stepic-android | app/src/main/java/org/stepic/droid/ui/custom/StepTextWrapper.kt | app/src/main/java/org/stepic/droid/ui/custom/StepTextWrapper.kt | package org.stepic.droid.ui.custom
import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import org.stepic.droid.R
import org.stepik.android.model.Step
import javax.inject.Inject
class StepTextWrapper
@Inject
constructor(
private val context: ... | apache-2.0 | Kotlin | |
36a6de6cbdb6230a9e85bb9dbcdbcf59ac5ac0eb | Bump com.github.johnrengelman.shadow from 5.2.0 to 7.1.2 | camdenorrb/KPortals | build.gradle.kts | build.gradle.kts | import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
idea
kotlin("jvm") version "1.6.21"
id("com.github.johnrengelman.shadow") version "7.1.2"
}
group = "me.camdenorrb"
version = "2.0.0"
repositories {
mavenCentral()
... | import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
idea
kotlin("jvm") version "1.6.21"
id("com.github.johnrengelman.shadow") version "5.2.0"
}
group = "me.camdenorrb"
version = "2.0.0"
repositories {
mavenCentral()
... | mit | Kotlin |
f38bac2d49f6f382fe7006d7368df0c988e2580c | Bump org.shipkit.shipkit-auto-version from 1.1.0 to 1.1.1 | MinimallyCorrect/DefaultsPlugin,MinimallyCorrect/DefaultsPlugin | build.gradle.kts | build.gradle.kts | buildscript {
repositories { jcenter() }
dependencies { classpath("org.minimallycorrect.gradle:DefaultsPlugin:0.1.3") }
}
plugins {
id("java-gradle-plugin")
id("maven-publish")
id("com.gradle.plugin-publish") version "0.12.0"
id("com.jfrog.bintray") version "1.8.5"
id("org.shipkit.shipkit-auto-version") version ... | buildscript {
repositories { jcenter() }
dependencies { classpath("org.minimallycorrect.gradle:DefaultsPlugin:0.1.3") }
}
plugins {
id("java-gradle-plugin")
id("maven-publish")
id("com.gradle.plugin-publish") version "0.12.0"
id("com.jfrog.bintray") version "1.8.5"
id("org.shipkit.shipkit-auto-version") version ... | mit | Kotlin |
73b241da091fb80c36344b2b146bf7cd9cb998c1 | fix gradle build | satahippy/mailru-cloud-client | build.gradle.kts | build.gradle.kts | import org.gradle.api.tasks.bundling.Jar
group = "com.github.satahippy"
version = "0.1.1.RELEASE"
buildscript {
extra["kotlinVersion"] = "1.1.4"
extra["junitVersion"] = "4.12"
extra["retrofitVersion"] = "2.3.0"
repositories {
mavenCentral()
}
dependencies {
classpath("org.jetb... | import org.gradle.api.tasks.bundling.Jar
group = "com.github.satahippy"
version = "0.1.0.RELEASE"
buildscript {
extra["kotlinVersion"] = "1.1.4"
extra["junitVersion"] = "4.12"
extra["retrofitVersion"] = "2.3.0"
repositories {
mavenCentral()
}
dependencies {
classpath("org.jetb... | bsd-2-clause | Kotlin |
088be260b6727ba82167fe58cb1ee4410a6920b2 | bump gradle-download-task to 4.0.2 (#27329) | hammerandchisel/react-native,arthuralee/react-native,arthuralee/react-native,javache/react-native,myntra/react-native,pandiaraj44/react-native,facebook/react-native,facebook/react-native,exponentjs/react-native,exponent/react-native,pandiaraj44/react-native,facebook/react-native,arthuralee/react-native,exponentjs/react... | build.gradle.kts | build.gradle.kts | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
buildscript {
repositories {
mavenLocal()
google()
jcenter()
}
dependencies {
classpath... | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
buildscript {
repositories {
mavenLocal()
google()
jcenter()
}
dependencies {
classpath... | mit | Kotlin |
2c00dd2b6cf9f3c8d2f240af7ab668f8cafbe105 | Set the `archiveBaseName` correctly for the library so the jar filename continues to be stable. | chimbori/crux,chimbori/crux | build.gradle.kts | build.gradle.kts | import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm").version("1.6.20")
id("com.vanniktech.maven.publish") version ("0.19.0")
}
repositories {
mavenCentral()
}
buildscript {
extra["kotlinVersion"] = "1.6.20"
repositories {
mavenCentral()
}
dependencies {
classpath(kotli... | import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm").version("1.6.20")
id("com.vanniktech.maven.publish") version ("0.19.0")
}
repositories {
mavenCentral()
}
buildscript {
extra["kotlinVersion"] = "1.6.20"
repositories {
mavenCentral()
}
dependencies {
classpath(kotli... | apache-2.0 | Kotlin |
eff0f3d0ee9701a75f008706da353caac19ac4da | Add PluginScope (Beta) | BjoernPetersen/JMusicBot | src/main/kotlin/net/bjoernpetersen/musicbot/api/plugin/PluginScope.kt | src/main/kotlin/net/bjoernpetersen/musicbot/api/plugin/PluginScope.kt | package net.bjoernpetersen.musicbot.api.plugin
import com.google.common.annotations.Beta
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.SupervisorJob
import kotlin.coroutines.CoroutineContext
@Beta
class PluginScop... | mit | Kotlin | |
2f8f70fca9824e3bdb36f2839af701d241ad28f4 | optimize getKeyHash | WindSekirun/RichUtilsKt,WindSekirun/RichUtilsKt | RichUtils/src/main/java/pyxis/uzuki/live/richutilskt/utils/RKeyHash.kt | RichUtils/src/main/java/pyxis/uzuki/live/richutilskt/utils/RKeyHash.kt | @file:JvmName("RichUtils")
@file:JvmMultifileClass
package pyxis.uzuki.live.richutilskt.utils
import android.annotation.SuppressLint
import android.content.Context
import android.content.pm.PackageManager
import android.util.Base64
import java.security.MessageDigest
/**
* get key hash of application
*
* it will h... | @file:JvmName("RichUtils")
@file:JvmMultifileClass
package pyxis.uzuki.live.richutilskt.utils
import android.annotation.SuppressLint
import android.content.Context
import android.content.pm.PackageManager
import android.util.Base64
import android.util.Log
import java.security.MessageDigest
/**
* get key hash of app... | apache-2.0 | Kotlin |
0cb7b7663c816483d2ed6820bf9a2efeecb3a88d | Change Injector's Jvm declaration | nickbutcher/plaid,nickbutcher/plaid,nickbutcher/plaid,nickbutcher/plaid | app/src/main/java/io/plaidapp/dagger/Injector.kt | app/src/main/java/io/plaidapp/dagger/Injector.kt | /*
* Copyright 2018 Google, Inc.
*
* 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... | /*
* Copyright 2018 Google, Inc.
*
* 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... | apache-2.0 | Kotlin |
bc7f25eb52faff068debc60fca2609c75ba625c9 | make it less aggressive | blastrock/kaqui | app/src/main/java/org/kaqui/FadeOverlay.kt | app/src/main/java/org/kaqui/FadeOverlay.kt | package org.kaqui
import android.animation.TimeAnimator
import android.content.Context
import android.graphics.*
import android.view.View
import kotlin.math.max
import kotlin.math.pow
class FadeOverlay(context: Context) : View(context) {
companion object {
const val radiusGradientTime = 200 // ms
... | package org.kaqui
import android.animation.TimeAnimator
import android.content.Context
import android.graphics.*
import android.view.View
import kotlin.math.max
import kotlin.math.pow
class FadeOverlay(context: Context) : View(context) {
companion object {
const val radiusGradientTime = 200 // ms
... | mit | Kotlin |
16daa9528d45ca7ed6e97c5e16e651210ab12614 | Fix docs from ScopeExt.kt | InsertKoinIO/koin,InsertKoinIO/koin,InsertKoinIO/koin | core/koin-core/src/commonMain/kotlin/org/koin/core/scope/ScopeExt.kt | core/koin-core/src/commonMain/kotlin/org/koin/core/scope/ScopeExt.kt | /*
* Copyright 2017-2021 the original author or authors.
*
* 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 ap... | apache-2.0 | Kotlin | |
c57704f354907dc63d05eaae6858a2e1f61b35cb | test bind service to container. | InsideZhou/Instep | core/src/test/kotlin/instep/servicecontainer/ServiceContainerTest.kt | core/src/test/kotlin/instep/servicecontainer/ServiceContainerTest.kt | package instep.servicecontainer
import instep.Instep
import org.testng.annotations.Test
interface ServiceTest
class ServiceTestImplA : ServiceTest
class ServiceTestImplB : ServiceTest
object ServiceContainerTest {
@Test
fun bind() {
Instep.bind(ServiceTest::class.java, ServiceTestImplA())
Ins... | bsd-2-clause | Kotlin | |
48c3827c4fb2ccc1f879902beeda31a492f9ca60 | Remove unused companion object. | toastkidjp/Yobidashi_kt,toastkidjp/Yobidashi_kt,toastkidjp/Jitte,toastkidjp/Jitte | app/src/main/java/jp/toastkid/yobidashi/search/apps/AppModule.kt | app/src/main/java/jp/toastkid/yobidashi/search/apps/AppModule.kt | /*
* Copyright (c) 2018 toastkidjp.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompany this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html.
*/
package jp.... | /*
* Copyright (c) 2018 toastkidjp.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompany this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html.
*/
package jp.... | epl-1.0 | Kotlin |
a9d12b27dc2264b60c015464af027420d2f5c6e1 | add test for code options | StepicOrg/stepic-android,StepicOrg/stepik-android,StepicOrg/stepik-android,StepicOrg/stepik-android,StepicOrg/stepic-android,StepicOrg/stepic-android | app/src/test/java/org/stepic/droid/model/code/CodeOptionsTest.kt | app/src/test/java/org/stepic/droid/model/code/CodeOptionsTest.kt | package org.stepic.droid.model.code
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
import org.stepic.droid.testUtils.TestingGsonProvider
import org.stepic.droid.testUtils.assertThatObjectParcelable
@RunWith(RobolectricTestRunner::class)
class... | package org.stepic.droid.model.code
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
import org.stepic.droid.testUtils.assertThatObjectParcelable
@RunWith(RobolectricTestRunner::class)
class CodeOptionsTest {
@Test
fun simpleCodeOptions_success() {
va... | apache-2.0 | Kotlin |
7bac26285135fc6e8df97e57fb95ada74854aaad | Add missing client builders | ktorio/ktor,ktorio/ktor,ktorio/ktor,ktorio/ktor | ktor-client/ktor-client-core/src/io/ktor/client/request/builders.kt | ktor-client/ktor-client-core/src/io/ktor/client/request/builders.kt | package io.ktor.client.request
import io.ktor.client.*
import io.ktor.client.call.*
import io.ktor.client.utils.*
import io.ktor.http.*
import java.net.*
suspend inline fun <reified T> HttpClient.request(
builder: HttpRequestBuilder = HttpRequestBuilder()
): T = call(builder).receive()
suspend inline fun <r... | package io.ktor.client.request
import io.ktor.client.*
import io.ktor.client.call.*
import io.ktor.client.utils.*
import io.ktor.http.*
import java.net.*
suspend inline fun <reified T> HttpClient.request(
builder: HttpRequestBuilder = HttpRequestBuilder()
): T = call(builder).receive()
suspend inline fun <r... | apache-2.0 | Kotlin |
45483a2bb714a0bc2fb89c033ebfbf882ba13c2c | apply -> let | takuji31/Koreference | koreference/src/main/java/jp/takuji31/koreference/KoreferenceProperty.kt | koreference/src/main/java/jp/takuji31/koreference/KoreferenceProperty.kt | package jp.takuji31.koreference;
import android.content.SharedPreferences
import jp.takuji31.koreference.converter.ValueConverter
import jp.takuji31.koreference.type.Preference
import kotlin.properties.ReadWriteProperty
import kotlin.reflect.KProperty
/**
* Created by takuji on 2015/08/08.
*/
abstract class Korefer... | package jp.takuji31.koreference;
import android.content.SharedPreferences
import jp.takuji31.koreference.converter.ValueConverter
import jp.takuji31.koreference.type.Preference
import kotlin.properties.ReadWriteProperty
import kotlin.reflect.KProperty
/**
* Created by takuji on 2015/08/08.
*/
abstract class Korefer... | apache-2.0 | Kotlin |
7f376849c62cb12a97e0d9f84b139c329f36f506 | Fix failing test | thatJavaNerd/JRAW,thatJavaNerd/JRAW,Saketme/JRAW,thatJavaNerd/JRAW,Saketme/JRAW,Saketme/JRAW | lib/src/test/kotlin/net/dean/jraw/test/integration/InboxReferenceTest.kt | lib/src/test/kotlin/net/dean/jraw/test/integration/InboxReferenceTest.kt | package net.dean.jraw.test.integration
import com.winterbe.expekt.should
import net.dean.jraw.test.TestConfig.reddit
import net.dean.jraw.test.randomName
import org.jetbrains.spek.api.Spek
import org.jetbrains.spek.api.dsl.describe
import org.jetbrains.spek.api.dsl.it
class InboxReferenceTest : Spek({
val inbox =... | package net.dean.jraw.test.integration
import com.winterbe.expekt.should
import net.dean.jraw.test.TestConfig.reddit
import net.dean.jraw.test.randomName
import org.jetbrains.spek.api.Spek
import org.jetbrains.spek.api.dsl.describe
import org.jetbrains.spek.api.dsl.it
class InboxReferenceTest : Spek({
val inbox =... | mit | Kotlin |
53a2c999a701b0fbc96d420fb2d69e428892b3d4 | Add PrimitiveResources | LouisCAD/Splitties,LouisCAD/Splitties,LouisCAD/Splitties | resources/src/main/java/splitties/resources/PrimitiveResources.kt | resources/src/main/java/splitties/resources/PrimitiveResources.kt | /*
* Copyright (c) 2018. Louis Cognault Ayeva Derman
*
* 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 ... | apache-2.0 | Kotlin | |
06a42c94ab019d6901bac3fc0aed1c6329ce2131 | Update MaxFrequencyBarrier.kt | elifarley/kotlin-examples,elifarley/kotlin-misc-lib,elifarley/kotlin-misc-lib,elifarley/kotlin-examples | src/com/github/elifarley/kotlin/cuncurrent/MaxFrequencyBarrier.kt | src/com/github/elifarley/kotlin/cuncurrent/MaxFrequencyBarrier.kt | package com.orgecc.concurrent
class MaxFrequencyBarrier
private constructor (itemsPerSecond: Double) {
val millisStep: Int
init {
millisStep = (1000 / itemsPerSecond).toInt()
}
fun await(itemCount: Int = 1) = MaxFrequencyBarrier.await(millisStep, itemCount)
companion object {
f... | package com.orgecc.concurrent
class MaxFrequencyBarrier
private constructor (itemsPerSecond: Double) {
val millisStep: Int
init {
millisStep = (1000 / itemsPerSecond).toInt()
}
fun await(itemCount: Int = 1) = MaxFrequencyBarrier.await(millisStep, itemCount)
companion object {
f... | mit | Kotlin |
048281775f02822eeac770c808d959c4e5c2e003 | Fix AtFileType returning incorrect name | minecraft-dev/MinecraftDev,DemonWav/MinecraftDevIntelliJ,minecraft-dev/MinecraftDev,DemonWav/MinecraftDevIntelliJ,DemonWav/IntelliJBukkitSupport,minecraft-dev/MinecraftDev,DemonWav/MinecraftDevIntelliJ | src/main/kotlin/com/demonwav/mcdev/platform/mcp/at/AtFileType.kt | src/main/kotlin/com/demonwav/mcdev/platform/mcp/at/AtFileType.kt | /*
* Minecraft Dev for IntelliJ
*
* https://minecraftdev.org
*
* Copyright (c) 2019 minecraft-dev
*
* MIT License
*/
package com.demonwav.mcdev.platform.mcp.at
import com.demonwav.mcdev.asset.PlatformAssets
import com.intellij.openapi.fileTypes.LanguageFileType
object AtFileType : LanguageFileType(AtLanguage... | /*
* Minecraft Dev for IntelliJ
*
* https://minecraftdev.org
*
* Copyright (c) 2019 minecraft-dev
*
* MIT License
*/
package com.demonwav.mcdev.platform.mcp.at
import com.demonwav.mcdev.asset.PlatformAssets
import com.intellij.openapi.fileTypes.LanguageFileType
object AtFileType : LanguageFileType(AtLanguage... | mit | Kotlin |
02f977dc01ef9832cb661406707bdb7a7219852c | Use activity context to inflate leakcanary toast | square/leakcanary,square/leakcanary,square/leakcanary | leakcanary-android-core/src/main/java/leakcanary/ToastEventListener.kt | leakcanary-android-core/src/main/java/leakcanary/ToastEventListener.kt | package leakcanary
import android.animation.Animator
import android.animation.AnimatorListenerAdapter
import android.view.Gravity
import android.view.LayoutInflater
import android.view.View
import android.widget.Toast
import com.squareup.leakcanary.core.R
import java.util.concurrent.CountDownLatch
import java.util.con... | package leakcanary
import android.animation.Animator
import android.animation.AnimatorListenerAdapter
import android.view.Gravity
import android.view.LayoutInflater
import android.view.View
import android.widget.Toast
import com.squareup.leakcanary.core.R
import java.util.concurrent.CountDownLatch
import java.util.con... | apache-2.0 | Kotlin |
5595358a7ed3b7b9bdcf5b22b50c6fec677aafff | update Boolean+Extension.kt | fengzhizi715/SAF-Kotlin-Utils,fengzhizi715/SAF-Kotlin-Utils | saf-kotlin-ext/src/main/java/com/safframework/ext/Boolean+Extension.kt | saf-kotlin-ext/src/main/java/com/safframework/ext/Boolean+Extension.kt | package com.safframework.ext
/**
*
* @FileName:
* com.safframework.ext.Booleans.java
* @author: Tony Shen
* @date: 2018-04-19 00:35
* @version V1.0 <描述当前版本功能>
*/
infix fun <T> Boolean.then(value: T?) = if (this) value else null
fun <T> Boolean.then(value: T?, default: T) = if (this) value else default... | package com.safframework.ext
/**
*
* @FileName:
* com.safframework.ext.Booleans.java
* @author: Tony Shen
* @date: 2018-04-19 00:35
* @version V1.0 <描述当前版本功能>
*/
infix fun <T> Boolean.then(value: T?) = if (this) value else null
inline fun <T> Boolean.then(function: () -> T, default: T) = if (this) fun... | apache-2.0 | Kotlin |
2eb9c376bc8eac2bb8bdbc5923e92ff2ed9ba51f | make sure the details() has proper output in RbServiceError (#2799) | wikimedia/apps-android-wikipedia,wikimedia/apps-android-wikipedia,wikimedia/apps-android-wikipedia,wikimedia/apps-android-wikipedia | app/src/main/java/org/wikipedia/dataclient/restbase/RbServiceError.kt | app/src/main/java/org/wikipedia/dataclient/restbase/RbServiceError.kt | package org.wikipedia.dataclient.restbase
import org.wikipedia.dataclient.ServiceError
import org.wikipedia.json.GsonUtil
class RbServiceError : ServiceError {
private val type: String? = null
private val detail: String? = null
private val method: String? = null
private val uri: String? = null
o... | package org.wikipedia.dataclient.restbase
import org.wikipedia.dataclient.ServiceError
import org.wikipedia.json.GsonUtil
class RbServiceError : ServiceError {
override val title: String = ""
override val details: String = ""
private val type: String? = null
private val detail: String? = null
pri... | apache-2.0 | Kotlin |
ad42a5d9c351b5d50b1833cc4700096de71d6e07 | Apply fix from PR #61 (issue #59) | npryce/hamkrest,npryce/hamkrest | src/main/kotlin/com/natpryce/hamkrest/describe.kt | src/main/kotlin/com/natpryce/hamkrest/describe.kt | package com.natpryce.hamkrest
import java.util.ServiceLoader
/**
* Formats [v] to be included in a description. Strings are delimited with quotes and elements of tuples, ranges,
* iterable collections and maps are (recursively) described. A null reference is described as `null`.
* For anything else, the result o... | package com.natpryce.hamkrest
import java.util.ServiceLoader
/**
* Formats [v] to be included in a description. Strings are delimited with quotes and elements of tuples, ranges,
* iterable collections and maps are (recursively) described. A null reference is described as `null`.
* For anything else, the result o... | apache-2.0 | Kotlin |
d8d4573727b3a5b56f841188cf7bfae2bc710a32 | add ignore annotation | yyYank/Kebab,yyYank/Kebab | src/test/kotlin/KebabTest.kt | src/test/kotlin/KebabTest.kt | package kebab.junit4
import kotlin.properties.Delegates
import kebab.Browser
import kebab.Configuration
import kebab.configuration
import org.junit.After
import org.junit.Test
import org.junit.Assert.*
import org.junit.Before
import org.junit.Ignore
import org.junit.runner.RunWith
import org.openqa.selenium.By
import ... | package kebab.junit4
import kotlin.properties.Delegates
import kebab.Browser
import kebab.Configuration
import kebab.configuration
import org.junit.After
import org.junit.Test
import org.junit.Assert.*
import org.junit.Before
import org.junit.runner.RunWith
import org.openqa.selenium.By
import org.openqa.selenium.WebD... | apache-2.0 | Kotlin |
12f12629aea2d326970f99b5e6f0ae5e091cf638 | refactor #575 Extract ad unit ID to constants. | toastkidjp/Yobidashi_kt,toastkidjp/Jitte,toastkidjp/Yobidashi_kt,toastkidjp/Jitte | app/src/main/java/jp/toastkid/yobidashi/libs/ad/AdViewFactory.kt | app/src/main/java/jp/toastkid/yobidashi/libs/ad/AdViewFactory.kt | /*
* Copyright (c) 2019 toastkidjp.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompany this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html.
*/
package jp.... | /*
* Copyright (c) 2019 toastkidjp.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompany this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html.
*/
package jp.... | epl-1.0 | Kotlin |
b857985dd879a6c4c4b701a8c1b006b5032ec7d1 | simplify line separator addition | allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/int... | plugins/git4idea/src/git4idea/ignore/GitIgnoredFileContentProvider.kt | plugins/git4idea/src/git4idea/ignore/GitIgnoredFileContentProvider.kt | // Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package git4idea.ignore
import com.intellij.openapi.project.Project
import com.intellij.openapi.vcs.VcsKey
import com.intellij.openapi.vcs.changes.IgnoredFileContentProvider
impo... | // Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package git4idea.ignore
import com.intellij.openapi.project.Project
import com.intellij.openapi.vcs.VcsKey
import com.intellij.openapi.vcs.changes.IgnoredFileContentProvider
impo... | apache-2.0 | Kotlin |
e36075020e8a8a412a254c7571e8d6062ab7ea4c | Fix a typo in comments for ValueSource (#206) | ajalt/clikt,ajalt/clikt | clikt/src/commonMain/kotlin/com/github/ajalt/clikt/sources/ValueSource.kt | clikt/src/commonMain/kotlin/com/github/ajalt/clikt/sources/ValueSource.kt | package com.github.ajalt.clikt.sources
import com.github.ajalt.clikt.core.Context
import com.github.ajalt.clikt.parameters.options.Option
import com.github.ajalt.clikt.parameters.options.longestName
import com.github.ajalt.clikt.parameters.options.splitOptionPrefix
@ExperimentalValueSourceApi
interface ValueSource {
... | package com.github.ajalt.clikt.sources
import com.github.ajalt.clikt.core.Context
import com.github.ajalt.clikt.parameters.options.Option
import com.github.ajalt.clikt.parameters.options.longestName
import com.github.ajalt.clikt.parameters.options.splitOptionPrefix
@ExperimentalValueSourceApi
interface ValueSource {
... | apache-2.0 | Kotlin |
124d4074cd74cc7a6f21b10b47a02084fe7f2a61 | Update pydroid | pyamsoft/zaptorch,pyamsoft/zaptorch | app/src/main/java/com/pyamsoft/zaptorch/ZapTorchViewModelFactory.kt | app/src/main/java/com/pyamsoft/zaptorch/ZapTorchViewModelFactory.kt | /*
* Copyright 2020 Peter Kenji Yamanaka
*
* 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 a... | /*
* Copyright 2020 Peter Kenji Yamanaka
*
* 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 a... | apache-2.0 | Kotlin |
16a71eca23cf28a7aad2171dad184a5e6bcdf79c | Use NettyServerBuilder instead of ServerBuilder and set keepalive policy. | orbit/orbit,orbit/orbit | src/orbit-server/src/main/kotlin/orbit/server/service/GrpcEndpoint.kt | src/orbit-server/src/main/kotlin/orbit/server/service/GrpcEndpoint.kt | /*
Copyright (C) 2015 - 2019 Electronic Arts Inc. All rights reserved.
This file is part of the Orbit Project <https://www.orbit.cloud>.
See license in LICENSE.
*/
package orbit.server.service
import io.grpc.Server
import io.grpc.ServerBuilder
import io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder
import m... | /*
Copyright (C) 2015 - 2019 Electronic Arts Inc. All rights reserved.
This file is part of the Orbit Project <https://www.orbit.cloud>.
See license in LICENSE.
*/
package orbit.server.service
import io.grpc.Server
import io.grpc.ServerBuilder
import mu.KotlinLogging
import orbit.server.mesh.LocalServerInfo
cla... | bsd-3-clause | Kotlin |
5096c119ab731dee1a1ef52dc36998272d34d875 | Use start UNDISPATCHED intead of yield after launch | luxons/seven-wonders,luxons/seven-wonders,luxons/seven-wonders | sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/sagas/Sagas.kt | sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/redux/sagas/Sagas.kt | package org.luxons.sevenwonders.ui.redux.sagas
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.launch
import org.luxons.sevenwonders.client.SevenWondersClient
import org.luxons.sevenwonders.client.SevenWondersSession
import org.luxons.sevenwonders.ui.redux.RequestChooseName
import org.luxons.sevenwo... | package org.luxons.sevenwonders.ui.redux.sagas
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.launch
import kotlinx.coroutines.yield
import org.luxons.sevenwonders.client.SevenWondersClient
import org.luxons.sevenwonders.client.SevenWondersSession
import org.luxons.sevenwonders.ui.redux.RequestChoo... | mit | Kotlin |
0491590da07bea69328cca93925a80fbf1c6ed66 | Rename edit interaction to addRemoveVideos to be more clear about its purpose | vimeo/vimeo-networking-java,vimeo/vimeo-networking-java,vimeo/vimeo-networking-java | models/src/main/java/com/vimeo/networking2/FolderInteractions.kt | models/src/main/java/com/vimeo/networking2/FolderInteractions.kt | package com.vimeo.networking2
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
/**
* The interactions for a folder.
*
* @param addRemoveVideos The interaction used to determine if the user can add to or remove videos from the folder.
* @param addSubfolder The interaction used to add a subfolder ... | package com.vimeo.networking2
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
/**
* The interactions for a folder.
*
* @param addSubfolder The interaction used to add a subfolder as well as determine capability for adding subfolders.
* @param deleteVideo The interaction that shows whether the u... | mit | Kotlin |
94ce4240f2ec1c0e76950467ecbc698b74a66a47 | Create store get state test | Reduks/Reduks | src/test/java/com/reduks/reduks/StoreTest.kt | src/test/java/com/reduks/reduks/StoreTest.kt | package com.reduks.reduks
import com.reduks.reduks.repository.FakeActions
import com.reduks.reduks.repository.FakeData
import com.reduks.reduks.repository.FakeState
import com.reduks.reduks.subscription.Subscriber
import com.reduks.reduks.subscription.Subscription
import org.jetbrains.spek.api.Spek
import org.jetbrain... | package com.reduks.reduks
import com.reduks.reduks.repository.FakeActions
import com.reduks.reduks.repository.FakeData
import com.reduks.reduks.repository.FakeState
import com.reduks.reduks.subscription.Subscriber
import com.reduks.reduks.subscription.Subscription
import org.jetbrains.spek.api.Spek
import org.jetbrain... | mit | Kotlin |
c7e8c78e0f424ffdeddb58f8bd3856c4d98da4ee | fix test | loxal/muctool,loxal/muctool,loxal/muctool,loxal/muctool | src/test/kotlin/net/loxal/muctool/AppTest.kt | src/test/kotlin/net/loxal/muctool/AppTest.kt | /*
* Copyright 2017 Alexander Orlov <alexander.orlov@loxal.net>. All rights reserved.
*/
package net.loxal.muctool
import org.jetbrains.ktor.application.Application
import org.jetbrains.ktor.http.HttpMethod
import org.jetbrains.ktor.http.HttpStatusCode
import org.jetbrains.ktor.testing.handleRequest
import org.jetb... | /*
* Copyright 2017 Alexander Orlov <alexander.orlov@loxal.net>. All rights reserved.
*/
package net.loxal.muctool
import org.jetbrains.ktor.application.Application
import org.jetbrains.ktor.http.HttpMethod
import org.jetbrains.ktor.http.HttpStatusCode
import org.jetbrains.ktor.testing.handleRequest
import org.jetb... | agpl-3.0 | Kotlin |
f0eb7aa4caa29fea5a60e9d2006d3b525aad9d1a | Add SimpleMountable | facebook/litho,facebook/litho,facebook/litho,facebook/litho,facebook/litho,facebook/litho | litho-core-kotlin/src/main/kotlin/com/facebook/litho/SimpleMountable.kt | litho-core-kotlin/src/main/kotlin/com/facebook/litho/SimpleMountable.kt | /*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* 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 appl... | apache-2.0 | Kotlin | |
1863a93bd777880cd35f2637c9a9ef73ee916b1b | Remove unnecessary constructor keyword | Turbo87/intellij-rust,ThoseGrapefruits/intellij-rust,ujpv/intellij-rust,d9n/intellij-rust,himikof/intellij-rust,Undin/intellij-rust,alygin/intellij-rust,himikof/intellij-rust,ujpv/intellij-rust,d9n/intellij-rust,himikof/intellij-rust,alygin/intellij-rust,d9n/intellij-rust,intellij-rust/intellij-rust,himikof/intellij-ru... | src/org/rust/lang/codestyle/RustCodeStyleSettings.kt | src/org/rust/lang/codestyle/RustCodeStyleSettings.kt | package org.rust.lang.codestyle
import com.intellij.psi.codeStyle.CodeStyleSettings
import com.intellij.psi.codeStyle.CustomCodeStyleSettings
class RustCodeStyleSettings(container: CodeStyleSettings) :
CustomCodeStyleSettings(RustCodeStyleSettings::class.java.simpleName, container)
| package org.rust.lang.codestyle
import com.intellij.psi.codeStyle.CodeStyleSettings
import com.intellij.psi.codeStyle.CustomCodeStyleSettings
class RustCodeStyleSettings constructor(container: CodeStyleSettings) :
CustomCodeStyleSettings(RustCodeStyleSettings::class.java.simpleName, container)
| mit | Kotlin |
01c25a7280189a3a58d4c14ef1f34a6afb580db5 | reduce crash test | jankotek/mapdb,jankotek/MapDB,jankotek/mapdb,jankotek/MapDB | src/test/java/org/mapdb/crash/WALChannelCrashTest.kt | src/test/java/org/mapdb/crash/WALChannelCrashTest.kt | package org.mapdb.crash
import org.junit.Test
import java.io.*
import java.nio.ByteBuffer
import java.nio.channels.FileChannel
import java.nio.file.StandardOpenOption
import org.junit.Assert.*
import org.mapdb.DataIO
import org.mapdb.TT
/**
* Created by jan on 3/16/16.
*/
class WALChannelCrashTest: CrashJVM(){
... | package org.mapdb.crash
import org.junit.Test
import java.io.*
import java.nio.ByteBuffer
import java.nio.channels.FileChannel
import java.nio.file.StandardOpenOption
import org.junit.Assert.*
import org.mapdb.DataIO
import org.mapdb.crash.CrashJVM
/**
* Created by jan on 3/16/16.
*/
class WALChannelCrashTest: Cras... | apache-2.0 | Kotlin |
97cacea60a825b5044379d25a9c14fccf4e00995 | Set JavalinVue.resourceJarClass field to be java Class<*> (#1200) | tipsy/javalin,tipsy/javalin,tipsy/javalin,tipsy/javalin | javalin/src/main/java/io/javalin/plugin/rendering/vue/JavalinVue.kt | javalin/src/main/java/io/javalin/plugin/rendering/vue/JavalinVue.kt | /*
* Javalin - https://javalin.io
* Copyright 2017 David Åse
* Licensed under Apache 2.0: https://github.com/tipsy/javalin/blob/master/LICENSE
*/
package io.javalin.plugin.rendering.vue
import io.javalin.http.Context
import io.javalin.http.staticfiles.Location
import io.javalin.http.util.ContextUtil.isLocalhost
i... | /*
* Javalin - https://javalin.io
* Copyright 2017 David Åse
* Licensed under Apache 2.0: https://github.com/tipsy/javalin/blob/master/LICENSE
*/
package io.javalin.plugin.rendering.vue
import io.javalin.http.Context
import io.javalin.http.staticfiles.Location
import io.javalin.http.util.ContextUtil.isLocalhost
i... | apache-2.0 | Kotlin |
61d8963d55e471ea61e4f1fb8085c5f1ab0ecf44 | Enhance ping command | mrkirby153/KirBot | src/main/kotlin/me/mrkirby153/KirBot/command/executors/msc/CommandPing.kt | src/main/kotlin/me/mrkirby153/KirBot/command/executors/msc/CommandPing.kt | package me.mrkirby153.KirBot.command.executors.msc
import me.mrkirby153.KirBot.Bot
import me.mrkirby153.KirBot.command.BaseCommand
import me.mrkirby153.KirBot.command.Command
import me.mrkirby153.KirBot.command.args.CommandContext
import me.mrkirby153.KirBot.user.Clearance
import me.mrkirby153.KirBot.utils.Context
imp... | package me.mrkirby153.KirBot.command.executors.msc
import me.mrkirby153.KirBot.command.BaseCommand
import me.mrkirby153.KirBot.command.Command
import me.mrkirby153.KirBot.command.args.CommandContext
import me.mrkirby153.KirBot.utils.Context
import me.mrkirby153.kcutils.Time
@Command(name = "ping")
class CommandPing :... | mit | Kotlin |
1c865880223384419966a39a60fd4a2d52263e2d | Clean Fragment sample | FireZenk/Kartographer | sample/src/main/java/org/firezenk/kartographer/pages/page2/Page2.kt | sample/src/main/java/org/firezenk/kartographer/pages/page2/Page2.kt | package org.firezenk.kartographer.pages.page2
import android.os.Bundle
import android.support.v4.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import kotlinx.android.synthetic.main.page_view.*
import org.firezenk.kartographer.R
import org.firezenk.kartographer.S... | package org.firezenk.kartographer.pages.page2
import android.os.Bundle
import android.support.v4.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import kotlinx.android.synthetic.main.page_view.*
import org.firezenk.kartographer.R
import org.firezenk.kartographer.S... | mit | Kotlin |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.