repo_name stringlengths 7 81 | path stringlengths 4 242 | copies stringclasses 95
values | size stringlengths 1 6 | content stringlengths 3 991k | license stringclasses 15
values |
|---|---|---|---|---|---|
mopsalarm/Pr0 | app/src/main/java/kotterknife/Kotterknife.kt | 1 | 865 | package kotterknife
import android.app.Activity
import android.view.View
import kotlin.properties.ReadOnlyProperty
import kotlin.reflect.KProperty
fun <V : View> Activity.bindView(id: Int): ReadOnlyProperty<Activity, V> = Lazy { _: Any?, desc ->
findViewById<V>(id) ?: viewNotFound(id, desc)
}
private fun viewNo... | mit |
if710/if710.github.io | 2019-08-28/Threads/app/src/main/java/br/ufpe/cin/android/threads/ThreadViewPost.kt | 1 | 1256 | package br.ufpe.cin.android.threads
import android.app.Activity
import android.graphics.Bitmap
import android.graphics.BitmapFactory
import android.os.Bundle
import android.widget.Toast
import kotlinx.android.synthetic.main.threads.*
class ThreadViewPost : Activity() {
private var mBitmap: Bitmap? = null
priv... | mit |
Mithrandir21/Duopoints | app/src/main/java/com/duopoints/android/fragments/relprofile/RelationshipProfilePresenter.kt | 1 | 5546 | package com.duopoints.android.fragments.relprofile
import com.duopoints.android.Calls
import com.duopoints.android.fragments.base.BasePresenter
import com.duopoints.android.logistics.SessionManager
import com.duopoints.android.rest.models.composites.CompositeRelationship
import com.duopoints.android.rest.models.enums.... | gpl-3.0 |
if710/if710.github.io | 2019-10-02/SystemServices/app/src/main/java/br/ufpe/cin/android/systemservices/alarm/AlarmLogReceiver.kt | 1 | 451 | package br.ufpe.cin.android.systemservices.alarm
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.util.Log
import java.text.DateFormat
import java.util.Date
class AlarmLogReceiver : BroadcastReceiver() {
override fun onReceive(context: Context,... | mit |
lfkdsk/JustDB | src/utils/parsertools/combinators/tree/OneOrMore.kt | 1 | 712 | package utils.parsertools.combinators.tree
import utils.parsertools.ast.AstList
import utils.parsertools.ast.AstNode
import utils.parsertools.combinators.Bnf
import utils.parsertools.combinators.Element
import utils.parsertools.lex.Lexer
/**
* Created by liufengkai on 2017/4/24.
*/
class OneOrMore(private val pars... | apache-2.0 |
google/modernstorage | storage/src/androidTest/java/com/google/modernstorage/storage/TestingActivity.kt | 1 | 1399 | /*
* Copyright 2021 Google LLC
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... | apache-2.0 |
lukashaertel/megal-vm | src/main/kotlin/org/softlang/util/Lists.kt | 1 | 868 | package org.softlang.util
/**
* Skips [num] elements in the list.
*/
fun <E> List<E>.skip(num: Int) = subList(num, size)
/**
* Returns the tail of the list.
*/
fun <E> List<E>.tail() = skip(1)
/**
* Constructs a list from the first element and a list of remaining elements.
*/
infix fun <E> E.then(list: List<E>... | mit |
dafi/photoshelf | core/src/main/java/com/ternaryop/photoshelf/adapter/SelectionArray.kt | 1 | 1274 | package com.ternaryop.photoshelf.adapter
import android.util.SparseBooleanArray
/**
* Created by dave on 13/04/16.
* Hold selection index state
*/
open class SelectionArray : Selection {
private val items = SparseBooleanArray()
override val itemCount: Int
get() = items.size()
override val sel... | mit |
andrei-heidelbacher/metanalysis | chronolens-core/src/test/kotlin/org/chronolens/core/repository/TransactionTest.kt | 1 | 2001 | /*
* Copyright 2018-2021 Andrei Heidelbacher <andrei.heidelbacher@gmail.com>
*
* 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
*
* Un... | apache-2.0 |
apollo-rsps/apollo | game/plugin/cmd/test/BankCommandTests.kt | 1 | 812 | import io.mockk.verify
import org.apollo.game.command.Command
import org.apollo.game.model.World
import org.apollo.game.model.entity.Player
import org.apollo.game.model.entity.setting.PrivilegeLevel
import org.apollo.game.plugin.testing.junit.ApolloTestingExtension
import org.apollo.game.plugin.testing.junit.api.annota... | isc |
viniciussoares/ribot-android-boilerplate-kotlin | app/src/main/kotlin/uk/co/ribot/androidboilerplate/ui/base/Presenter.kt | 1 | 299 | package uk.co.ribot.androidboilerplate.ui.base
/**
* Every presenter in the app must either implement this interface or extend BasePresenter
* indicating the MvpView type that wants to be attached with.
*/
interface Presenter<in V : MvpView> {
fun attachView(view: V)
fun detachView()
}
| apache-2.0 |
chibatching/Kotpref | kotpref/src/main/kotlin/com/chibatching/kotpref/pref/StringSetPref.kt | 1 | 8490 | package com.chibatching.kotpref.pref
import android.annotation.SuppressLint
import android.annotation.TargetApi
import android.os.Build
import android.os.SystemClock
import com.chibatching.kotpref.KotprefModel
import com.chibatching.kotpref.execute
import kotlin.reflect.KProperty
/**
* Delegate string set shared pre... | apache-2.0 |
nemerosa/ontrack | ontrack-extension-oidc/src/main/java/net/nemerosa/ontrack/extension/oidc/OIDCExtensionFeature.kt | 1 | 595 | package net.nemerosa.ontrack.extension.oidc
import net.nemerosa.ontrack.extension.casc.CascExtensionFeature
import net.nemerosa.ontrack.extension.support.AbstractExtensionFeature
import net.nemerosa.ontrack.model.extension.ExtensionFeatureOptions
import org.springframework.stereotype.Component
@Component
class OIDCEx... | mit |
nemerosa/ontrack | ontrack-extension-general/src/main/java/net/nemerosa/ontrack/extension/general/PreviousPromotionRequiredException.kt | 1 | 655 | package net.nemerosa.ontrack.extension.general
import net.nemerosa.ontrack.model.exceptions.InputException
import net.nemerosa.ontrack.model.structure.ProjectEntity
import net.nemerosa.ontrack.model.structure.PromotionLevel
class PreviousPromotionRequiredException(
previousPromotion: PromotionLevel,
p... | mit |
rsiebert/TVHClient | app/src/main/java/org/tvheadend/tvhclient/util/worker/RecordingNotificationWorker.kt | 1 | 2026 | package org.tvheadend.tvhclient.util.worker
import android.app.PendingIntent
import android.content.Context
import android.content.Intent
import androidx.core.app.NotificationManagerCompat
import androidx.work.Worker
import androidx.work.WorkerParameters
import org.tvheadend.tvhclient.R
import org.tvheadend.tvhclient.... | gpl-3.0 |
rubixhacker/Kontact | kontact/src/main/kotlin/com/hackedcube/kontact/ContactUtils.kt | 1 | 4119 | @file:JvmName("ContactUtils")
package com.hackedcube.kontact
import android.content.Context
import android.database.Cursor
import android.net.Uri
import android.provider.ContactsContract
fun Context.queryAllContacts(): List<Kontact> {
contentResolver.query(ContactsContract.Contacts.CONTENT_URI, null,... | apache-2.0 |
olonho/carkot | server/src/main/java/clInterface/executor/Sonar.kt | 1 | 2359 | package clInterface.executor
import SonarRequest
import objects.Car
import objects.Environment
import java.net.ConnectException
import java.util.*
import java.util.concurrent.TimeUnit
class Sonar : CommandExecutor {
private val SONAR_REGEX = Regex("sonar [0-9]{1,10}")
override fun execute(command: String) {... | mit |
BOINC/boinc | android/BOINC/app/src/test/java/edu/berkeley/boinc/rpc/TransferParcelableTest.kt | 4 | 1580 | /*
* This file is part of BOINC.
* http://boinc.berkeley.edu
* Copyright (C) 2020 University of California
*
* BOINC is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation,
* either version 3 of the Lic... | lgpl-3.0 |
genobis/tornadofx | src/main/java/tornadofx/Async.kt | 1 | 14271 | package tornadofx
import com.sun.javafx.tk.Toolkit
import javafx.application.Platform
import javafx.beans.property.*
import javafx.beans.value.ChangeListener
import javafx.beans.value.ObservableValue
import javafx.concurrent.Task
import javafx.scene.Node
import javafx.scene.control.Labeled
import javafx.scene.control.... | apache-2.0 |
d9n/intellij-rust | src/test/kotlin/org/rust/ide/inspections/RsMissingElseInspectionTest.kt | 1 | 2651 | package org.rust.ide.inspections
/**
* Tests for Missing Else inspection.
*/
class RsMissingElseInspectionTest : RsInspectionsTestBase(RsMissingElseInspection()) {
fun testSimple() = checkByText("""
fn main() {
if true {
}<warning descr="Suspicious if. Did you mean `else if`?"> i... | mit |
gdomingues/keural | src/test/kotlin/br/com/germanno/keural/KeuralManagerTest.kt | 1 | 1883 | package br.com.germanno.keural
import br.com.germanno.keural.activation_functions.HyperbolicTangent
import org.junit.Assert
import org.junit.Test
/**
* @author Germanno Domingues - germanno.domingues@gmail.com
* @since 1/30/17 3:10 AM
*/
class KeuralManagerTest {
private val wordsDatabase = arrayOf(
... | mit |
olonho/carkot | translator/src/test/kotlin/tests/nested_classes/nested_classes.kt | 1 | 327 |
class Outer() {
class Nested(var i: Int) {
fun test(): Int {
this.i = 5
return this.i
}
}
}
fun nested_test_1(k: Int): Int {
val j = Outer.Nested(k - 1)
j.i = k
return j.i
}
fun nested_test_2(k: Int): Int {
val j = Outer.Nested(k - 1)
return j.t... | mit |
hewking/HUILibrary | app/src/main/java/com/hewking/custom/SectionSeekBar.kt | 1 | 8139 | package com.hewking.custom
import android.animation.ValueAnimator
import android.content.Context
import android.graphics.Canvas
import android.graphics.Color
import android.graphics.Paint
import android.graphics.RectF
import android.util.AttributeSet
import android.util.Log
import android.view.MotionEvent
i... | mit |
DemonWav/IntelliJBukkitSupport | src/main/kotlin/toml/TomlStringValueInsertionHandler.kt | 1 | 1866 | /*
* Minecraft Dev for IntelliJ
*
* https://minecraftdev.org
*
* Copyright (c) 2021 minecraft-dev
*
* MIT License
*/
package com.demonwav.mcdev.toml
import com.intellij.codeInsight.completion.InsertHandler
import com.intellij.codeInsight.completion.InsertionContext
import com.intellij.codeInsight.lookup.Looku... | mit |
REBOOTERS/AndroidAnimationExercise | imitate/src/main/java/com/engineer/imitate/ui/fragments/di/DaggerHelper.kt | 1 | 2385 | package com.engineer.imitate.ui.fragments.di
import dagger.Component
import dagger.Module
import dagger.Provides
import javax.inject.Inject
@Component(modules = [NetworkModule::class])
interface ApplicationComponent {
fun inject(diFragment: DIFragment)
}
class LoginViewModel @Inject constructor(
private va... | apache-2.0 |
axelrindle/Broadcaster-Plugin | src/main/kotlin/de/axelrindle/broadcaster/model/MessageMapper.kt | 1 | 2435 | package de.axelrindle.broadcaster.model
import de.axelrindle.broadcaster.plugin
import org.bukkit.configuration.ConfigurationSection
import java.io.File
import java.util.*
/**
* Utility class for mapping entries in the `messages.yml` file to [Message] objects.
*/
object MessageMapper {
/**
* Defines suppo... | mit |
npryce/hamkrest | src/test/kotlin/com/natpryce/hamkrest/assertion/assert_tests.kt | 1 | 535 | package com.natpryce.hamkrest.assertion
import com.natpryce.hamkrest.equalTo
import com.natpryce.hamkrest.matches
import org.junit.Test
import kotlin.text.RegexOption.DOT_MATCHES_ALL
import kotlin.text.RegexOption.MULTILINE
class AssertOutput {
@Test
fun produces_ide_friendly_error_message() {
try {
... | apache-2.0 |
Ribesg/anko | dsl/static/src/common/viewChildrenSequences.kt | 1 | 3829 | /*
* Copyright 2015 JetBrains s.r.o.
*
* 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 |
android/health-samples | health-connect/HealthConnectSample/app/src/main/java/com/example/healthconnectsample/presentation/navigation/DrawerItem.kt | 1 | 2251 | /*
* Copyright 2022 The Android Open Source Project
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | apache-2.0 |
wikimedia/apps-android-wikipedia | app/src/main/java/org/wikipedia/page/Namespace.kt | 1 | 5426 | package org.wikipedia.page
import org.wikipedia.dataclient.WikiSite
import org.wikipedia.language.AppLanguageLookUpTable
import org.wikipedia.model.EnumCode
import org.wikipedia.model.EnumCodeMap
import org.wikipedia.staticdata.*
import java.util.*
/** An enumeration describing the different possible namespace codes.... | apache-2.0 |
wikimedia/apps-android-wikipedia | app/src/main/java/org/wikipedia/edit/richtext/SuperscriptSpanEx.kt | 1 | 581 | package org.wikipedia.edit.richtext
import android.text.TextPaint
import android.text.style.MetricAffectingSpan
class SuperscriptSpanEx(override var start: Int, override var syntaxRule: SyntaxRule) :
MetricAffectingSpan(), SpanExtents {
override var end = 0
override fun updateDrawState(tp: TextPaint)... | apache-2.0 |
vanita5/twittnuker | twittnuker/src/main/kotlin/de/vanita5/twittnuker/adapter/ParcelableUserListsAdapter.kt | 1 | 5072 | /*
* Twittnuker - Twitter client for Android
*
* Copyright (C) 2013-2017 vanita5 <mail@vanit.as>
*
* This program incorporates a modified version of Twidere.
* Copyright (C) 2012-2017 Mariotaku Lee <mariotaku.lee@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the... | gpl-3.0 |
Popalay/Cardme | presentation/src/main/kotlin/com/popalay/cardme/utils/extensions/CommonExt.kt | 1 | 4406 | package com.popalay.cardme.utils.extensions
import android.arch.lifecycle.ViewModelProvider
import android.arch.lifecycle.ViewModelProviders
import android.content.ComponentName
import android.content.Context
import android.content.Intent
import android.databinding.DataBindingUtil
import android.databinding.ViewDataBi... | apache-2.0 |
stripe/stripe-android | paymentsheet/src/androidTest/java/com/stripe/android/paymentsheet/utils/MockPaymentMethodsFactory.kt | 1 | 2169 | package com.stripe.android.paymentsheet.utils
import com.stripe.android.paymentsheet.forms.PaymentMethodRequirements
import com.stripe.android.ui.core.R
import com.stripe.android.ui.core.elements.LayoutSpec
import com.stripe.android.ui.core.forms.resources.LpmRepository
object MockPaymentMethodsFactory {
fun cre... | mit |
hannesa2/owncloud-android | owncloudApp/src/main/java/com/owncloud/android/presentation/ui/sharing/fragments/EditPrivateShareFragment.kt | 2 | 18776 | /**
* ownCloud Android client application
*
* @author masensio
* @author David A. Velasco
* @author Christian Schabesberger
* @author David González Verdugo
* Copyright (C) 2020 ownCloud GmbH.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Publ... | gpl-2.0 |
vimeo/vimeo-networking-java | model-generator/integrations/models-input/src/main/java/com/vimeo/networking2/functions/PrivateFunctionContainer.kt | 1 | 133 | package com.vimeo.networking2.functions
class PrivateFunctionContainer {
private fun privateFunction(): String = "Hello World"
} | mit |
kittinunf/Fuel | fuel/src/main/kotlin/com/github/kittinunf/fuel/toolbox/HttpClient.kt | 1 | 13359 | package com.github.kittinunf.fuel.toolbox
import com.github.kittinunf.fuel.core.Client
import com.github.kittinunf.fuel.core.FuelError
import com.github.kittinunf.fuel.core.FuelManager
import com.github.kittinunf.fuel.core.HeaderName
import com.github.kittinunf.fuel.core.Headers
import com.github.kittinunf.fuel.core.M... | mit |
exponent/exponent | android/versioned-abis/expoview-abi43_0_0/src/main/java/abi43_0_0/expo/modules/sharing/SharingPackage.kt | 2 | 252 | package abi43_0_0.expo.modules.sharing
import android.content.Context
import abi43_0_0.expo.modules.core.BasePackage
class SharingPackage : BasePackage() {
override fun createExportedModules(context: Context) =
listOf(SharingModule(context))
}
| bsd-3-clause |
satamas/fortran-plugin | src/main/kotlin/org/jetbrains/fortran/ide/actions/FortranCreateFileAction.kt | 1 | 1251 | package org.jetbrains.fortran.ide.actions
import com.intellij.ide.actions.CreateFileFromTemplateAction
import com.intellij.ide.actions.CreateFileFromTemplateDialog
import com.intellij.openapi.project.DumbAware
import com.intellij.openapi.project.Project
import com.intellij.psi.PsiDirectory
import org.jetbrains.fortran... | apache-2.0 |
TeamWizardry/LibrarianLib | modules/glitter/src/test/kotlin/com/teamwizardry/librarianlib/glitter/test/systems/ForwardFacingSystem.kt | 1 | 2271 | package com.teamwizardry.librarianlib.glitter.test.systems
import com.teamwizardry.librarianlib.glitter.bindings.ConstantBinding
import com.teamwizardry.librarianlib.glitter.modules.BasicPhysicsUpdateModule
import com.teamwizardry.librarianlib.glitter.modules.SpriteRenderModule
import net.minecraft.entity.Entity
impor... | lgpl-3.0 |
jorjoluiso/QuijoteLui | src/main/kotlin/com/quijotelui/model/RetencionDetalle.kt | 1 | 1111 | package com.quijotelui.model
import org.hibernate.annotations.Immutable
import java.math.BigDecimal
import javax.persistence.Column
import javax.persistence.Entity
import javax.persistence.Id
import javax.persistence.Table
@Entity
@Immutable
@Table(name = "v_ele_retenciones_detalle")
class RetencionDetalle {
@I... | gpl-3.0 |
androidx/androidx | hilt/integration-tests/workerapp/src/androidTest/java/androidx/hilt/integration/workerapp/SimpleTest.kt | 3 | 2960 | /*
* Copyright 2020 The Android Open Source Project
*
* 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 |
androidx/androidx | room/room-compiler/src/main/kotlin/androidx/room/parser/expansion/ProjectionExpander.kt | 3 | 10104 | /*
* Copyright 2020 The Android Open Source Project
*
* 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 |
stoyicker/dinger | app/src/main/kotlin/app/entryscreen/login/TinderLoginCoordinator.kt | 1 | 1224 | package app.entryscreen.login
import domain.login.TinderLoginUseCase
import io.reactivex.Scheduler
import io.reactivex.observers.DisposableCompletableObserver
import reporter.CrashReporter
internal class TinderLoginCoordinator(
private val view: TinderLoginView,
private val asyncExecutionScheduler: Scheduler,... | mit |
androidx/androidx | appcompat/appcompat/src/androidTest/java/androidx/appcompat/app/NightModeRtlTestUtilsRegressionTestCase.kt | 3 | 3580 | /*
* Copyright 2020 The Android Open Source Project
*
* 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 |
noemus/kotlin-eclipse | kotlin-eclipse-ui-test/testData/wordSelection/selectPrevious/NonTraversableElement/1.kt | 2 | 75 | val property: String <selection><caret>=</selection> "Non-traversable test" | apache-2.0 |
bsmr-java/lwjgl3 | modules/templates/src/main/kotlin/org/lwjgl/opengl/templates/INTEL_performance_query.kt | 1 | 5820 | /*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
*/
package org.lwjgl.opengl.templates
import org.lwjgl.generator.*
import org.lwjgl.opengl.*
val INTEL_performance_query = "INTELPerformanceQuery".nativeClassGL("INTEL_performance_query", postfix = INTEL) {
documentation =
... | bsd-3-clause |
groupon/kmond | src/main/kotlin/com/groupon/aint/kmond/output/LoggingHandler.kt | 1 | 1158 | /**
* Copyright 2015 Groupon 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... | apache-2.0 |
coffeemakr/OST | lib/sbb/src/main/java/ch/unstable/lib/sbb/auth/AuthInterceptor.kt | 1 | 2278 | package ch.unstable.lib.sbb.auth
import android.util.Base64
import okhttp3.Interceptor
import okhttp3.Request
import okhttp3.Response
import okhttp3.internal.Util.UTF_8
import java.text.SimpleDateFormat
import java.util.*
import javax.crypto.Mac
import javax.crypto.spec.SecretKeySpec
class AuthInterceptor(private va... | gpl-3.0 |
google/android-auto-companion-android | trustagent/tests/unit/src/com/google/android/libraries/car/trustagent/AssociationManagerMissingBluetoothPermissionsTest.kt | 1 | 3859 | // Copyright 2022 Google LLC
//
// 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 ... | apache-2.0 |
EmmyLua/IntelliJ-EmmyLua | src/main/java/com/tang/intellij/lua/debugger/emmy/value/LuaXValue.kt | 2 | 6458 | /*
* Copyright (c) 2017. tangzx(love.tangzx@qq.com)
*
* 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 l... | apache-2.0 |
wordpress-mobile/AztecEditor-Android | wordpress-shortcodes/src/main/java/org/wordpress/aztec/plugins/shortcodes/VideoShortcodePlugin.kt | 1 | 4304 | package org.wordpress.aztec.plugins.shortcodes
import org.wordpress.aztec.plugins.shortcodes.extensions.ATTRIBUTE_VIDEOPRESS_HIDDEN_ID
import org.wordpress.aztec.plugins.shortcodes.extensions.ATTRIBUTE_VIDEOPRESS_HIDDEN_SRC
import org.wordpress.aztec.plugins.html2visual.IHtmlPreprocessor
import org.wordpress.aztec.plu... | mpl-2.0 |
jonashao/next-kotlin | app/src/main/java/com/junnanhao/next/data/SongsDataSource.kt | 1 | 467 | package com.junnanhao.next.data
import android.support.annotation.NonNull
import com.junnanhao.next.data.model.Song
import io.reactivex.Observable
/**
* Created by Jonas on 2017/5/29.
* music data source
*/
interface SongsDataSource {
fun isInitialized(): Boolean
fun scanMusic(): Observable<List<Song>>
... | apache-2.0 |
VKCOM/vk-android-sdk | api/src/main/java/com/vk/sdk/api/groups/dto/GroupsGroupFullSection.kt | 1 | 3592 | /**
* The MIT License (MIT)
*
* Copyright (c) 2019 vk.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy... | mit |
hpedrorodrigues/GZMD | app/src/main/kotlin/com/hpedrorodrigues/gzmd/constant/PreferenceKey.kt | 1 | 899 | /*
* Copyright 2016 Pedro Rodrigues
*
* 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 agree... | apache-2.0 |
TCA-Team/TumCampusApp | app/src/main/java/de/tum/in/tumcampusapp/component/tumui/lectures/adapter/LectureListSelectionAdapter.kt | 1 | 2049 | package de.tum.`in`.tumcampusapp.component.tumui.lectures.adapter
import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.BaseAdapter
import android.widget.CheckBox
import android.widget.CompoundButton
import de.tum.`in`.tumcampusa... | gpl-3.0 |
jk1/pmd-kotlin | src/test/resources/org/jetbrains/pmdkotlin/ignoreIdentifiersAndLiteralsTest/IgnoreIdentifiers2.kt | 1 | 389 | fun sum(a : Int, b : Int): Int {
return a + b
}
fun factorial20() : Int {
var res = 1
for (n in (1..20)) {
res *= n
}
return res
// it's another comment
}
fun my(first : Double, second : Char, f : Int) {
var third = 2 * f;
var forth = 3 * first;
val fifth = 100 * 9 * 3423 *... | apache-2.0 |
PoweRGbg/AndroidAPS | app/src/main/java/info/nightscout/androidaps/plugins/constraints/versionChecker/VersionCheckerUtils.kt | 2 | 4879 | package info.nightscout.androidaps.plugins.constraints.versionChecker
import android.content.Context
import android.net.ConnectivityManager
import info.nightscout.androidaps.BuildConfig
import info.nightscout.androidaps.MainApp
import info.nightscout.androidaps.R
import info.nightscout.androidaps.logging.L
import info... | agpl-3.0 |
westnordost/osmagent | app/src/main/java/de/westnordost/streetcomplete/view/StreetSideSelectPuzzle.kt | 1 | 5017 | package de.westnordost.streetcomplete.view
import android.content.Context
import android.graphics.Bitmap
import android.graphics.Matrix
import android.graphics.Shader
import android.graphics.drawable.BitmapDrawable
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import andr... | gpl-3.0 |
StepicOrg/stepic-android | app/src/main/java/org/stepik/android/presentation/magic_links/MagicLinkPresenter.kt | 2 | 1365 | package org.stepik.android.presentation.magic_links
import io.reactivex.Scheduler
import io.reactivex.rxkotlin.plusAssign
import io.reactivex.rxkotlin.subscribeBy
import org.stepic.droid.di.qualifiers.BackgroundScheduler
import org.stepic.droid.di.qualifiers.MainScheduler
import org.stepik.android.domain.magic_links.i... | apache-2.0 |
jiaminglu/kotlin-native | backend.native/tests/codegen/innerClass/simple.kt | 1 | 159 | class Outer {
inner class Inner {
fun box() = "OK"
}
}
fun box() = Outer().Inner().box()
fun main(args: Array<String>)
{
println(box())
} | apache-2.0 |
marius-m/racer_test | core/src/main/java/lt/markmerkk/app/mvp/interactors/NetworkEventProviderClientImpl.kt | 1 | 1335 | package lt.markmerkk.app.mvp.interactors
import com.badlogic.gdx.Gdx
import lt.markmerkk.app.mvp.NetworkEventProvider
import lt.markmerkk.app.network.events.EventPlayersPosition
import lt.markmerkk.app.network.events.EventPlayersRegister
import lt.markmerkk.app.network.events.NetworkEvent
import org.slf4j.LoggerFactor... | apache-2.0 |
anrelic/Anci-OSS | test/src/main/kotlin/su/jfdev/test/immutability/SuiteBuilder.kt | 1 | 567 | package su.jfdev.test.immutability
import com.google.common.collect.ImmutableSet.*
import su.jfdev.test.immutability.Immutability.*
class SuiteBuilder<T> {
private val sub: Builder<Immutability<T>> = builder()
infix fun append(immutability: Immutability<T>) = apply {
sub.add(immutability)
}
... | mit |
FelixKlauke/mercantor | core/src/main/kotlin/de/d3adspace/mercantor/core/MercantorFactory.kt | 1 | 336 | package de.d3adspace.mercantor.core
import de.d3adspace.mercantor.core.service.ServiceRepositoryImpl
/**
* @author Felix Klauke <info@felix-klauke.de>
*/
object MercantorFactory {
fun createMercantor(): Mercantor {
val serviceRepository = ServiceRepositoryImpl()
return MercantorImpl(serviceRepo... | mit |
Commit451/GitLabAndroid | app/src/main/java/com/commit451/gitlab/model/api/Todo.kt | 2 | 1464 | package com.commit451.gitlab.model.api
import android.os.Parcelable
import androidx.annotation.StringDef
import com.squareup.moshi.Json
import kotlinx.android.parcel.Parcelize
import java.util.Date
/**
* Todos. Not processing Target, since it is different depending on what the type is, which
* makes it not play nic... | apache-2.0 |
divinespear/jpa-schema-gradle-plugin | src/main/kotlin/io/github/divinespear/plugin/plugin.kt | 1 | 2062 | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | apache-2.0 |
Exaltead/SceneClassifier | SceneClassifier/app/src/main/java/com/exaltead/sceneclassifier/extraction/constants.kt | 1 | 351 | package com.exaltead.sceneclassifier.extraction
import android.media.AudioFormat
import android.media.AudioFormat.CHANNEL_IN_MONO
const val SAMPLING_RATE = 44100
const val SAMPLE_DURATION = 1
const val SAMPLE_MAX_LENGHT = SAMPLING_RATE * SAMPLE_DURATION
const val CHANNELS = CHANNEL_IN_MONO
const val AUDIO_ENCODING = ... | gpl-3.0 |
MKA-Nigeria/MKAN-Report-Android | videos_module/src/main/java/com/abdulmujibaliu/koutube/fragments/videos/VideosContracts.kt | 1 | 705 | package com.abdulmujibaliu.koutube.fragments.videos
import com.abdulmujibaliu.koutube.data.models.PlayListItemsResult
import com.abdulmujibaliu.koutube.data.models.YoutubeVideo
import com.aliumujib.mkanapps.coremodule.basemvpcontracts.BaseContracts
/**
* Created by aliumujib on 25/02/2018.
*/
interface VideosContra... | mit |
itsmortoncornelius/example-wifi-direct | app/src/main/java/de/handler/mobile/wifivideo/WifiP2pDeviceRecyclerViewAdapter.kt | 1 | 1657 | package de.handler.mobile.wifivideo
import android.net.wifi.p2p.WifiP2pDevice
import android.support.v7.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import de.handler.mobile.wifivideo.DeviceListFragment.OnListFragmentIntera... | apache-2.0 |
Heiner1/AndroidAPS | app/src/main/java/info/nightscout/androidaps/activities/HistoryBrowseActivity.kt | 1 | 17892 | package info.nightscout.androidaps.activities
import android.annotation.SuppressLint
import android.content.Context
import android.os.Bundle
import android.util.DisplayMetrics
import android.view.ViewGroup
import android.widget.LinearLayout
import android.widget.RelativeLayout
import android.widget.TextView
import com... | agpl-3.0 |
kvakil/venus | src/main/kotlin/venus/riscv/InstructionField.kt | 1 | 544 | package venus.riscv
/** Describes how to get fields from RV32 instruction formats */
enum class InstructionField(val lo: Int, val hi: Int) {
ENTIRE(0, 32),
OPCODE(0, 7),
RD(7, 12),
FUNCT3(12, 15),
RS1(15, 20),
RS2(20, 25),
FUNCT7(25, 32),
IMM_11_0(20, 32),
IMM_4_0(7, 12),
IMM_11... | mit |
MKA-Nigeria/MKAN-Report-Android | videos_module/src/main/java/com/abdulmujibaliu/koutube/adapters/VideoTabsAdapter.kt | 1 | 976 | package com.abdulmujibaliu.koutube.adapters
import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v4.app.FragmentPagerAdapter
import com.abdulmujibaliu.koutube.fragments.playlists.PlaylistsFragment
import com.abdulmujibaliu.koutube.fragments.videos.VideosFragment
... | mit |
Deanveloper/SlaK | src/main/kotlin/com/deanveloper/slak/event/channel/ChannelUnarchiveEvent.kt | 1 | 308 | package com.deanveloper.slak.event.channel
import com.deanveloper.slak.channel.Channel
import java.time.LocalDateTime
class ChannelUnarchiveEvent(channel: Channel, ts: LocalDateTime) : ChannelEvent {
override val type = "channel_unarchive"
override val channel = channel
override val ts = ts
}
| mit |
Heiner1/AndroidAPS | automation/src/main/java/info/nightscout/androidaps/plugins/general/automation/triggers/TriggerDummy.kt | 1 | 1084 | package info.nightscout.androidaps.plugins.general.automation.triggers
import com.google.common.base.Optional
import dagger.android.HasAndroidInjector
import org.json.JSONObject
// Used for instantiation of other triggers only
class TriggerDummy(injector: HasAndroidInjector, val shouldRun: Boolean = false) : Trigger(... | agpl-3.0 |
auth0/Auth0.Android | auth0/src/test/java/com/auth0/android/util/AuthenticationAPIMockServer.kt | 1 | 5102 | package com.auth0.android.util
import okhttp3.mockwebserver.MockResponse
import java.nio.file.Files
import java.nio.file.Paths
internal class AuthenticationAPIMockServer : APIMockServer() {
fun willReturnSuccessfulChangePassword(): AuthenticationAPIMockServer {
server.enqueue(responseWithJSON("NOT REALLY... | mit |
Unpublished/AmazeFileManager | app/src/main/java/com/amaze/filemanager/filesystem/compressed/extractcontents/helpers/AbstractCompressedTarArchiveExtractor.kt | 2 | 2456 | /*
* Copyright (C) 2014-2021 Arpit Khurana <arpitkh96@gmail.com>, Vishal Nehra <vishalmeham2@gmail.com>,
* Emmanuel Messulam<emmanuelbendavid@gmail.com>, Raymond Lai <airwave209gt at gmail.com> and Contributors.
*
* This file is part of Amaze File Manager.
*
* Amaze File Manager is free software: you can redistri... | gpl-3.0 |
Maccimo/intellij-community | plugins/kotlin/idea/src/org/jetbrains/kotlin/idea/intentions/branchedTransformations/BranchedFoldingUtils.kt | 3 | 11446 | // Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.kotlin.idea.intentions.branchedTransformations
import org.jetbrains.kotlin.cfg.WhenChecker
import org.jetbrains.kotlin.diagnostics.Errors... | apache-2.0 |
marklogic/java-client-api | ml-development-tools/src/test/kotlin/com/marklogic/client/test/dbfunction/fntestconf.kt | 1 | 6616 | /*
* Copyright (c) 2020 MarkLogic Corporation
*
* 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 |
onoderis/failchat | src/main/kotlin/failchat/chat/ChatClientCallbacks.kt | 2 | 210 | package failchat.chat
class ChatClientCallbacks(
val onChatMessage: (ChatMessage) -> Unit,
val onStatusUpdate: (StatusUpdate) -> Unit,
val onChatMessageDeleted: (ChatMessage) -> Unit
)
| gpl-3.0 |
lcmatrix/betting-game | src/main/kotlin/de/bettinggame/application/Games.kt | 1 | 1568 | package de.bettinggame.application
import de.bettinggame.domain.GameRepository
import de.bettinggame.domain.Game
import de.bettinggame.domain.Location
import de.bettinggame.domain.TournamentLevel
import org.springframework.context.i18n.LocaleContextHolder
import org.springframework.stereotype.Service
import java.time.... | apache-2.0 |
blindpirate/gradle | subprojects/configuration-cache/src/main/kotlin/org/gradle/configurationcache/ConfigurationCacheAwareLocalComponentProvider.kt | 1 | 1267 | /*
* Copyright 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 applica... | apache-2.0 |
AcornUI/Acorn | acornui-core/src/main/kotlin/com/acornui/graphic/Hsv.kt | 1 | 1539 | package com.acornui.graphic
import kotlinx.serialization.*
import kotlinx.serialization.builtins.*
import kotlinx.serialization.descriptors.*
import kotlinx.serialization.encoding.*
import kotlin.math.abs
/**
* Hue saturation value
*/
@Serializable(with = HsvSerializer::class)
data class Hsv(
val h: Double = 0.0,... | apache-2.0 |
wordpress-mobile/WordPress-Android | WordPress/src/main/java/org/wordpress/android/push/NotificationType.kt | 1 | 679 | package org.wordpress.android.push
enum class NotificationType {
COMMENT,
LIKE,
COMMENT_LIKE,
AUTOMATTCHER,
FOLLOW,
REBLOG,
BADGE_RESET,
NOTE_DELETE,
TEST_NOTE,
ZENDESK,
UNKNOWN_NOTE,
AUTHENTICATION,
GROUP_NOTIFICATION,
ACTIONS_RESULT,
ACTIONS_PROGRESS,
P... | gpl-2.0 |
wordpress-mobile/WordPress-Android | WordPress/src/main/java/org/wordpress/android/ui/mysite/cards/quickstart/QuickStartCardViewHolder.kt | 1 | 5925 | package org.wordpress.android.ui.mysite.cards.quickstart
import android.animation.ObjectAnimator
import android.content.res.ColorStateList
import android.graphics.Paint
import android.view.View
import android.view.ViewGroup
import android.widget.ProgressBar
import androidx.appcompat.widget.PopupMenu
import androidx.co... | gpl-2.0 |
wordpress-mobile/WordPress-Android | WordPress/src/main/java/org/wordpress/android/ui/posts/editor/media/AddExistingMediaToPostUseCase.kt | 1 | 1301 | package org.wordpress.android.ui.posts.editor.media
import dagger.Reusable
import org.wordpress.android.fluxc.model.SiteModel
import org.wordpress.android.ui.posts.editor.EditorTracker
import javax.inject.Inject
enum class AddExistingMediaSource {
WP_MEDIA_LIBRARY,
STOCK_PHOTO_LIBRARY
}
/**
* Loads existing... | gpl-2.0 |
mdaniel/intellij-community | platform/vcs-log/impl/src/com/intellij/vcs/log/impl/VcsLogContentUtil.kt | 3 | 5659 | // Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.vcs.log.impl
import com.intellij.openapi.project.Project
import com.intellij.openapi.ui.MessageType
import com.intellij.openapi.util.NlsContexts
import com.intellij.openapi.vcs.... | apache-2.0 |
ingokegel/intellij-community | plugins/kotlin/code-insight/api/src/org/jetbrains/kotlin/idea/codeinsight/api/classic/quickfixes/QuickFixesPsiBasedFactory.kt | 5 | 2784 | // Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.kotlin.idea.codeinsight.api.classic.quickfixes
import com.intellij.codeInsight.intention.IntentionAction
import com.intellij.psi.PsiElement
import kotlin.reflect.KClass
import... | apache-2.0 |
ingokegel/intellij-community | platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/BuildContextImpl.kt | 1 | 14006 | // Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
@file:Suppress("ReplaceJavaStaticMethodWithKotlinAnalog")
package org.jetbrains.intellij.build.impl
import com.intellij.openapi.util.io.FileUtilRt
import com.intellij.openapi.util.text.Strings
impo... | apache-2.0 |
ingokegel/intellij-community | plugins/kotlin/idea/tests/testData/intentions/addMissingClassKeyword/enum.kt | 13 | 53 | enum Foo<caret>(val s: String) {
A("a"), B("b")
} | apache-2.0 |
sys1yagi/longest-streak-android | app/src/main/java/com/sys1yagi/longeststreakandroid/tool/LongestStreakCounter.kt | 1 | 1928 | package com.sys1yagi.longeststreakandroid.tool
import android.util.Log
import com.sys1yagi.longeststreakandroid.db.OrmaDatabase
import com.sys1yagi.longeststreakandroid.model.Event
import java.util.*
class LongestStreakCounter {
val a = Calendar.getInstance()
val b = Calendar.getInstance()
fun count(dat... | mit |
leksak/kilobyte | src/main/kotlin/kilobyte/common/instruction/parametrizedroutines/ParametrizedInstructionRoutines.kt | 1 | 18467 | package kilobyte.common.instruction.parametrizedroutines
import com.google.common.base.Preconditions.checkArgument
import kilobyte.common.extensions.*
import kilobyte.common.hardware.RegisterFile
import kilobyte.common.instruction.DecompiledInstruction
import kilobyte.common.instruction.Format
import kilobyte.common.i... | mit |
komunumo/komunumo-backend | src/main/kotlin/ch/komunumo/server/Main.kt | 1 | 4023 | /*
* Komunumo – Open Source Community Manager
* Copyright (C) 2017 Java User Group Switzerland
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
... | agpl-3.0 |
carltonwhitehead/crispy-fish | library/src/main/kotlin/org/coner/crispyfish/filetype/ecf/NotEventControlFileException.kt | 1 | 182 | package org.coner.crispyfish.filetype.ecf
import java.io.File
class NotEventControlFileException(file: File) : IllegalArgumentException(
"File is not an ecf file: $file"
)
| gpl-2.0 |
JavaEden/Orchid-Core | OrchidCore/src/main/kotlin/com/eden/orchid/impl/relations/PageRelation.kt | 3 | 1087 | package com.eden.orchid.impl.relations
import com.eden.orchid.api.OrchidContext
import com.eden.orchid.api.options.Relation
import com.eden.orchid.api.options.annotations.Description
import com.eden.orchid.api.options.annotations.Option
import com.eden.orchid.api.theme.pages.OrchidPage
import javax.inject.Inject
cla... | mit |
icela/FriceEngine | src/org/frice/obj/button/ImageButton.kt | 1 | 1128 | package org.frice.obj.button
import org.frice.event.MOUSE_PRESSED
import org.frice.event.OnMouseEvent
import org.frice.platform.FriceImage
import org.frice.platform.owner.ImageOwner
import org.frice.resource.image.ImageResource
import org.frice.util.shape.FShapeQuad
import java.util.function.Consumer
/**
* Created b... | agpl-3.0 |
iMeiji/Daily | app/src/main/java/com/meiji/daily/data/local/dao/ZhuanlanDao.kt | 1 | 774 | package com.meiji.daily.data.local.dao
/**
* Created by Meiji on 2017/11/28.
*/
import android.arch.persistence.room.Dao
import android.arch.persistence.room.Insert
import android.arch.persistence.room.OnConflictStrategy
import android.arch.persistence.room.Query
import com.meiji.daily.bean.ZhuanlanBean
import io... | apache-2.0 |
jtlalka/imager | src/main/kotlin/net/tlalka/imager/core/GeoCalculator.kt | 1 | 962 | package net.tlalka.imager.core
import net.tlalka.imager.data.GeoImage
import net.tlalka.imager.utils.GeoUtils
class GeoCalculator {
fun calculate(i1: GeoImage, i2: GeoImage) {
val distance = GeoUtils.distanceInM(i1.latitude, i1.longitude, i2.latitude, i2.longitude)
val direction = GeoUtils.bearin... | mit |
GunoH/intellij-community | plugins/toml/core/src/test/kotlin/org/toml/ide/intentions/TomlIntentionTestBase.kt | 2 | 3586 | /*
* Use of this source code is governed by the MIT license that can be
* found in the LICENSE file.
*/
package org.toml.ide.intentions
import com.intellij.codeInsight.intention.IntentionAction
import com.intellij.codeInsight.intention.IntentionActionDelegate
import com.intellij.codeInsight.intention.impl.preview.... | apache-2.0 |
GunoH/intellij-community | plugins/kotlin/completion/testData/handlers/basic/AddLabelToReturn.kt | 4 | 92 | // FIR_COMPARISON
val v: Boolean = run {
return<caret> true
}
// ELEMENT: "return@run" | apache-2.0 |
GunoH/intellij-community | plugins/kotlin/base/project-structure/src/org/jetbrains/kotlin/idea/base/projectStructure/IDELanguageSettingsProvider.kt | 7 | 2162 | // Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.kotlin.idea.base.projectStructure
import com.intellij.openapi.project.Project
import org.jetbrains.annotations.ApiStatus
import org.jetbrains.kotlin.analyzer.LanguageSettingsPr... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.