code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
enum Foo[A] { case Bar extends Foo[Int] }
som-snytt/dotty
tests/run/i6677/Enum_1.scala
Scala
apache-2.0
44
package com.codexica.s3crate.filetree.history.snapshotstore.s3 import java.io.ByteArrayInputStream import org.scalamock.specs2.MockFactory import org.jets3t.service.utils.ServiceUtils import org.apache.commons.io.FileUtils import java.util.Random import com.codexica.common.SafeLogSpecification /** * @author Josh Alb...
joshalbrecht/s3crate
src/test/scala/com/codexica/s3crate/filetree/history/snapshotstore/s3/S3BlobWriterSpec.scala
Scala
mit
2,152
package snare import logger.LoggerFactory import scala.concurrent.ops.spawn import com.mongodb.{BasicDBObject, Mongo} import snare.tools.UUIDIdentitity._ import java.util.UUID import snare.tools.Implicits._ import snare.storage._ /** * The Snare main class * * @author Xavier Llora * @date Jan 25, 2010 at 7:30:48 ...
xllora/Snare
src/main/scala/Snare.scala
Scala
bsd-3-clause
6,395
package org.jetbrains.plugins.scala.testingSupport.scalatest.scala2_12.scalatest3_0_4 import org.jetbrains.plugins.scala.SlowTests import org.jetbrains.plugins.scala.testingSupport.scalatest.SpecialCharactersTest import org.junit.experimental.categories.Category /** * @author Roman.Shein * @since 10.03.2017 */ @Ca...
triplequote/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/testingSupport/scalatest/scala2_12/scalatest3_0_4/Scalatest2_12_3_0_4_SpecialCharactersTest.scala
Scala
apache-2.0
462
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2002-2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://www.scala-lang.org/ ** ** /____/\\___/_/...
som-snytt/scala-xml
src/main/scala/scala/xml/dtd/ContentModelParser.scala
Scala
bsd-3-clause
4,080
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distribute...
wvlet/airframe
examples/src/main/scala/wvlet/airframe/examples/di/DI_02_ConstructorInjection.scala
Scala
apache-2.0
1,449
package extruder.cats import cats.data.EitherT import cats.effect.ExitCase.{Completed, Error} import cats.effect._ import cats.syntax.either._ import cats.syntax.flatMap._ import cats.syntax.functor._ import cats.{Eval, Monad, MonadError} import extruder.core.{ExtruderErrors, ValidationErrorsToThrowable} import extrud...
janstenpickle/extruder
cats-effect/src/main/scala/extruder/cats/effect/package.scala
Scala
mit
5,612
package com.cds.learnscala.extractors object PatternMatch { case class User(firstName: String, lastName: String, score: Int) def advance(xs: List[User]) = xs match { case User(_, _, score1) :: User(_, _, score2) :: _ => score1 - score2 case _ => 0 } def main(args: Array[String]) { } }
anancds/scala-project
learn-scala/src/main/scala/com/cds/learnscala/extractors/PatternMatch.scala
Scala
mit
310
package uk.gov.gds.ier.transaction.shared /** * Variant of Scala Either class tailored for Mustache limitations, specifically confirmation page. * * Mustache conditions work well only with Options or booleans, not Either; Mustache cannot * interpret properly LeftProjection/RightProjection used internally by Either...
michaeldfallen/ier-frontend
app/uk/gov/gds/ier/transaction/shared/ConfirmationMustacheCommon.scala
Scala
mit
896
/* * Copyright 2016 The BigDL 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 applicable law or agr...
intel-analytics/BigDL
scala/dllib/src/main/scala/com/intel/analytics/bigdl/dllib/utils/tf/loaders/DecodeRaw.scala
Scala
apache-2.0
1,399
package org.eigengo.sbtmdrw import java.io.File import org.pegdown.{LinkRenderer, ToHtmlSerializer, Extensions, PegDownProcessor} import scala.io.Source import sbt.{Logger, State} import scala.util.Try class MarkdownRewriter(source: File, renderer: MarkdownRenderer) { val sourceCharacters = Source.fromFile(source)....
eigengo/sbt-mdrw
src/main/scala/org/eigengo/sbtmdrw/MarkdownRewriter.scala
Scala
apache-2.0
645
package org.nexbook.performance.app import com.typesafe.config.Config import org.nexbook.app.{AppConfig, OrderBookApp} import org.nexbook.fix.FixMessageHandler import org.nexbook.performance.PerformanceTest import org.nexbook.performance.result.ResultLogger import org.nexbook.testutils.FixMessageProvider import org.sl...
milczarekIT/nexbook
src/test/scala/org/nexbook/performance/app/OrderBookAppPerformanceTest.scala
Scala
apache-2.0
5,158
package com.dongxiguo.zeroLog.context import language.experimental.macros final class CurrentLine (val get: Int) extends AnyVal object CurrentLine { final def currentLine_impl(c: scala.reflect.macros.Context) = { import c.universe._ val lineExpr = c.Expr(Literal(Constant(c.enclosingPosition.line))) rei...
jasoncao/zero-log
context/src/main/scala/com/dongxiguo/zeroLog/context/CurrentLine.scala
Scala
apache-2.0
473
package synthesis // dummy object APAInputSyntaxTree /** Provides several methods to deal with input terms. * * @author Mikaël Mayer */ object APAInputTerm { def partitionInteger(l: List[APAInputTerm]): (List[Int], List[APAInputTerm]) = l match { case Nil => (Nil, Nil) case (APAInputCombination(n, Nil):...
epfl-lara/comfusy
src/main/scala/APAInputSyntaxTree.scala
Scala
bsd-2-clause
30,642
/* * Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com> */ package play.it.http.parsing import play.api.libs.iteratee.Enumerator import play.api.libs.json.{ Json, JsError } import play.api.mvc.Results.BadRequest import play.api.mvc.{ BodyParser, BodyParsers } import play.api.test._ object JsonBodyParse...
jyotikamboj/container
pf-framework/src/play-integration-test/src/test/scala/play/it/http/parsing/JsonBodyParserSpec.scala
Scala
mit
3,796
/* Copyright 2017-19, Emmanouil Antonios Platanios. 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 * * Unless ...
eaplatanios/tensorflow_scala
modules/api/src/main/scala/org/platanios/tensorflow/api/ops/Gradients.scala
Scala
apache-2.0
34,913
package drt.shared.dates import upickle.default.{ReadWriter, macroRW} case class LocalDate(year: Int, month: Int, day: Int) extends DateLike { override val timeZone: String = "Europe/London" } case object LocalDate { implicit val rw: ReadWriter[LocalDate] = macroRW def parse: String => Option[LocalDate] = Da...
UKHomeOffice/drt-scalajs-spa-exploration
shared/src/main/scala/drt/shared/dates/LocalDate.scala
Scala
apache-2.0
383
class Test { def test(b: Base): Unit = b match { case Base_1(Some(_)) => case Base_2(Nested_1(_)) => case Base_2(Nested_2(_)) => } }
loskutov/intellij-scala
testdata/scalacTests/pos/t9630/t9630b.scala
Scala
apache-2.0
150
/* * 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 ...
bowenli86/flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/calcite/PreValidateReWriter.scala
Scala
apache-2.0
8,294
/* * Copyright 2018 Vladimir Konstantinov * * 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 ...
oxy-development/korro
src/main/scala/com/github/illfaku/korro/dto/ws/WsHandshakeResponse.scala
Scala
apache-2.0
836
package scala package reflect package internal package tpe import scala.collection.{ mutable } import util.{ Statistics, TriState } import scala.annotation.tailrec trait TypeComparers { self: SymbolTable => import definitions._ import TypesStats._ private final val LogPendingSubTypesThreshold = TypeConstants...
felixmulder/scala
src/reflect/scala/reflect/internal/tpe/TypeComparers.scala
Scala
bsd-3-clause
26,607
package almhirt.herder.herdingdogs import scalaz.Validation.FlatMap._ import akka.actor._ import almhirt.common._ import almhirt.context._ import almhirt.akkax.ComponentId import almhirt.herder._ import almhirt.problem.{ Severity } import akka.actor.ActorRef object RejectedCommandsHerdingDog { import com.typesafe....
chridou/almhirt
almhirt-core/src/main/scala/almhirt/herder/herdingdogs/RejectedCommandsHerdingDog.scala
Scala
apache-2.0
2,177
package io.getquill import io.getquill.context.Context // Testing we are passing type params explicitly into AsyncContext, otherwise // this file will fail to compile trait BaseExtensions { val context: Context[PostgresDialect, _] } trait AsyncExtensions extends BaseExtensions { override val context: PostgresAs...
getquill/quill
quill-async-postgres/src/test/scala/io/getquill/TypeParamExtensionTest.scala
Scala
apache-2.0
336
package org.jetbrains.plugins.scala package lang package psi package api package toplevel import javax.swing.Icon import com.intellij.extapi.psi.StubBasedPsiElementBase import com.intellij.navigation.ItemPresentation import com.intellij.openapi.editor.colors.TextAttributesKey import com.intellij.psi._ import com.inte...
loskutov/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/api/toplevel/ScNamedElement.scala
Scala
apache-2.0
4,151
package eventstore package cluster import org.joda.time.{ DateTimeZone, DateTime } import org.joda.time.format.{ DateTimeFormat => JodaFormat, DateTimeFormatter } import spray.json._ import scala.util.{ Failure, Try, Success } object ClusterProtocol extends DefaultJsonProtocol { implicit object UuidFormat extends J...
pawelkaczor/EventStore.JVM
src/main/scala/eventstore/cluster/ClusterProtocol.scala
Scala
bsd-3-clause
5,222
package view import java.util.Date import org.specs2.mutable._ import service.RequestCache import model.Account import service.SystemSettingsService.SystemSettings import twirl.api.Html class AvatarImageProviderSpec extends Specification { implicit val context = app.Context("", None, "", null) "getAvatarImageH...
loveshell/gitbucket
src/test/scala/view/AvatarImageProviderSpec.scala
Scala
apache-2.0
4,358
package object scalaFP extends Base
aaronvargo/scalaFP
base/src/main/scala/package.scala
Scala
bsd-3-clause
36
package org.jetbrains.plugins.cbt.settings import com.intellij.openapi.externalSystem.service.settings.{AbstractExternalProjectSettingsControl, AbstractExternalSystemConfigurable} import com.intellij.openapi.externalSystem.util.{ExternalSystemSettingsControl, PaintAwarePanel} import com.intellij.openapi.project.Projec...
triplequote/intellij-scala
cbt/src/org/jetbrains/plugins/cbt/settings/CbtExternalSystemConfigurable.scala
Scala
apache-2.0
1,637
package com.twitter.example import java.net.InetSocketAddress import org.apache.thrift.protocol.TBinaryProtocol import com.twitter.finagle.builder.ClientBuilder import com.twitter.finagle.Service import com.twitter.finagle.thrift.{ThriftClientFramedCodec, ThriftClientRequest} import thrift.EchoService object EchoCl...
twitter/iago
examples/echo/src/main/scala/com/twitter/example/EchoClient.scala
Scala
apache-2.0
1,098
package com.github.j5ik2o.wicket.pages import org.apache.wicket.ajax.AjaxRequestTarget import org.apache.wicket.ajax.markup.html.AjaxFallbackLink import org.apache.wicket.markup.html.basic.Label import org.apache.wicket.model.Model class AjaxCounterPage extends BasePage { val model = new Model[java.lang.Integer]()...
j5ik2o/scala-wicket-sample
application/src/main/scala/com/github/j5ik2o/wicket/pages/AjaxCounterPage.scala
Scala
mit
787
package fpgatidbits.dma import Chisel._ import fpgatidbits.ocm._ class RespDeinterleaverIF(numPipes: Int, p: MemReqParams) extends Bundle { // interleaved responses in val rspIn = Decoupled(new GenericMemoryResponse(p)).flip // deinterleaved responses out val rspOut = Vec.fill(numPipes) {Decoupled(new Generic...
maltanar/fpga-tidbits
src/main/scala/fpgatidbits/dma/RespDeinterleaver.scala
Scala
bsd-2-clause
2,393
/* Copyright 2009 David Hall, Daniel Ramage 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 writi...
MLnick/scalanlp-core
data/src/test/scala/scalanlp/serialization/TypedCompanionTest.scala
Scala
apache-2.0
2,960
package circlepuzzles.geometry import circlepuzzles.math.FixedPoint /** * Angles that can specify rotations. * @param radians Value of the angle in radians. Must be in the range [0,2*pi). */ class Angle(val radians: FixedPoint) { /** * The sine of this angle. * @return `sin(radians)`. */ def sin...
wkretschmer/CirclePuzzles
src/main/scala/circlepuzzles/geometry/Angle.scala
Scala
mit
2,603
/* * 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 may ...
LantaoJin/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/SparkSqlParserSuite.scala
Scala
apache-2.0
16,577
package org.tearne.crosser.config import java.nio.file.Path import scala.util.Try import org.slf4j.LoggerFactory import com.typesafe.config.{ConfigFactory => TypesafeConfigFactory} import java.net.URL import scala.io.Source import com.typesafe.config.{Config => TypesafeConfig} object ConfigFactory { val log = Logger...
tearne/Crosser
src/main/scala/org/tearne/crosser/config/ConfigFactory.scala
Scala
apache-2.0
1,005
package dotty.tools.dotc package core package tasty import dotty.tools.tasty.{TastyBuffer, TastyReader} import TastyBuffer.NameRef import Contexts._, Decorators._ import Names.{Name, TermName} import StdNames.nme import TastyUnpickler._ import util.Spans.offsetToInt import printing.Highlighting._ /** Reads the packa...
som-snytt/dotty
compiler/src/dotty/tools/dotc/core/tasty/TastyClassName.scala
Scala
apache-2.0
1,828
package io.taig.android.soap.operation import android.content.{ Intent, SharedPreferences } import android.os.Bundle import cats.syntax.either._ import io.circe.Decoder import io.circe.parser._ sealed trait reader[C] { def container: C def read[V: Decoder]( key: String ): Option[V] } object reader { @in...
Taig/Soap
src/main/scala/io/taig/android/soap/operation/reader.scala
Scala
mit
1,165
package org.scalaide.core.internal.formatter import org.eclipse.jdt.internal.corext.fix.CodeFormatFix import org.eclipse.jdt.core.ICompilationUnit import org.eclipse.jdt.core.refactoring.CompilationUnitChange import org.eclipse.jdt.ui.cleanup.ICleanUpFix import org.eclipse.jface.text.Document import org.eclipse.jface....
scala-ide/scala-ide
org.scala-ide.sdt.core/src/org/scalaide/core/internal/formatter/ScalaFormatterCleanUpProvider.scala
Scala
bsd-3-clause
1,534
/* * 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 may ...
eljefe6a/kafka
core/src/test/scala/unit/kafka/cluster/BrokerEndPointTest.scala
Scala
apache-2.0
5,366
package com.thinkbiganalytics.spark.metadata import com.thinkbiganalytics.spark.SparkContextService import com.thinkbiganalytics.spark.dataprofiler.Profiler import com.thinkbiganalytics.spark.rest.model.TransformResponse import org.apache.spark.sql.{DataFrame, SQLContext} import org.slf4j.LoggerFactory /** Wraps a tr...
rashidaligee/kylo
integrations/spark/spark-shell-client/spark-shell-client-v2/src/main/scala/com/thinkbiganalytics/spark/metadata/TransformScript20.scala
Scala
apache-2.0
2,270
/* * Copyright 2016 Dennis Vriend * * 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 t...
dnvriend/intro-to-akka-streams
src/test/scala/com/github/dnvriend/streams/stage/simple/FilterStageTest.scala
Scala
apache-2.0
1,429
package bazooka.server.service import com.google.inject._ import com.google.gwt.user.client.rpc._ import com.google.gwt.user.server.rpc._ @Singleton class BazookaRemoteServiceServlet extends RemoteServiceServlet { @Inject private var injector: Injector = _ override def processCall(payload: String) = { try {...
tiagofernandez/bazooka
src/main/scala/bazooka/server/servlet/BazookaRemoteServiceServlet.scala
Scala
mit
888
/* * Licensed to The Apereo Foundation under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional * information regarding copyright ownership. * * The Apereo Foundation licenses this file to you under the Apache License, * Version 2.0, (the "License"); you ma...
equella/Equella
Source/Plugins/Core/com.equella.core/scalasrc/com/tle/web/controls/universal/handlers/fileupload/details/DetailsPage.scala
Scala
apache-2.0
2,750
package ore.models.project import scala.language.higherKinds import java.time.{Instant, OffsetDateTime, ZoneOffset} import java.util.Locale import ore.data.project.{Category, FlagReason, ProjectNamespace} import ore.db._ import ore.db.access._ import ore.db.impl.OrePostgresDriver.api._ import ore.db.impl.common._ im...
SpongePowered/Ore
models/src/main/scala/ore/models/project/Project.scala
Scala
mit
12,017
package scala.pickling.json.list.t.`new` import org.scalatest.FunSuite import scala.pickling._, scala.pickling.Defaults._, json._ class JsonListTNewTest extends FunSuite { test("main") { val pickle = List(1, 2, 3).pickle assert(pickle.toString === """ |JSONPickle({ | "tpe": "scala.collection.im...
eed3si9n/pickling-historical
core/src/test/scala/pickling/run/json-list-t-new.scala
Scala
bsd-3-clause
821
/* * (c) Copyright 2014 LinkedIn Corp. 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 * * Unless required by ...
linkedin/RookBoom
web/src/main/scala/com/linkedin/rookboom/web/dust/loader/TemplateLoader.scala
Scala
apache-2.0
857
package com.eclipsesource.schema import com.eclipsesource.schema.drafts.Version7 import com.eclipsesource.schema.test.JsonSpec import org.specs2.mutable.Specification class ConstSpec extends Specification with JsonSpec { "const draft7" in { import Version7._ implicit val validator = SchemaValidator(Some(Ve...
eclipsesource/play-json-schema-validator
src/test/scala/com/eclipsesource/schema/ConstSpec.scala
Scala
apache-2.0
368
package revenueAnalysis import org.apache.spark.SparkConf import org.apache.spark.SparkContext import org.joda.time.DateTime import org.apache.spark.sql.functions._ import org.apache.spark.sql.{ UserDefinedFunction, DataFrame, SQLContext, GroupedData } import java.lang.Math import java.util.concurrent.TimeUnit object...
PredictionIO/open-academy
KellyPeterson/revenueAnalysis/src/main/scala/revenueAnalysis/dataToParquet.scala
Scala
apache-2.0
4,198
/* * Copyright 2021 HM Revenue & Customs * * 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...
hmrc/ct-calculations
src/main/scala/uk/gov/hmrc/ct/accounts/frs102/boxes/AC121.scala
Scala
apache-2.0
1,673
/* * Copyright 2017 HM Revenue & Customs * * 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...
hmrc/api-gateway
app/uk/gov/hmrc/apigateway/connector/impl/MicroserviceAuditConnector.scala
Scala
apache-2.0
1,002
package io.github.meln1k.vkApi.models.wall import play.api.libs.json.Json case class PostId(post_id: Long) object PostId { implicit val postIdReads = Json.reads[PostId] }
meln1k/vk-scala-api
src/main/scala/io/github/meln1k/vkApi/models/wall/PostId.scala
Scala
apache-2.0
177
/* * 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 may ...
Intel-bigdata/OAP
oap-native-sql/core/src/main/scala/com/intel/oap/expression/ColumnarBinaryOperator.scala
Scala
apache-2.0
17,856
package domala import org.seasar.doma package object jdbc { // Alias of Doma type type SqlLogType = doma.jdbc.SqlLogType object SqlLogType { val RAW = doma.jdbc.SqlLogType.RAW val FORMATTED = doma.jdbc.SqlLogType.FORMATTED val NONE = doma.jdbc.SqlLogType.NONE } type Naming = doma.jdbc.Naming ...
bakenezumi/domala
core/src/main/scala/domala/jdbc/package.scala
Scala
apache-2.0
724
package com.arcusys.valamis.model /** When to do randomization of child activities */ object ScopeType extends Enumeration { type ScopeType = Value val Instance = Value("instance") val Site = Value("site") val Page = Value("page") val Player = Value("player") }
ViLPy/Valamis
valamis-core/src/main/scala/com/arcusys/valamis/model/ScopeType.scala
Scala
lgpl-3.0
272
package skinny.validator import org.scalatest._ class ErrorsSpec extends FlatSpec with Matchers { behavior of "Errors" it should "be available" in { val instance = new Errors(Map()) instance should not be null } }
seratch/skinny-framework
validator/src/test/scala/skinny/validator/ErrorsSpec.scala
Scala
mit
233
/** * 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 may...
vkroz/kafka
core/src/main/scala/kafka/server/ReplicaManager.scala
Scala
apache-2.0
45,229
/** * Copyright (C) 2019 Orbeon, Inc. * * This program 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 * 2.1 of the License, or (at your option) any later version. * * This program i...
orbeon/orbeon-forms
form-runner/jvm/src/db/scala/org/orbeon/oxf/fr/persistence/test/SearchTest.scala
Scala
lgpl-2.1
2,860
package org.genericConfig.admin.models.config import org.genericConfig.admin.controllers.websocket.WebClient import org.genericConfig.admin.models.CommonFunction import org.genericConfig.admin.models.common.ConfigIdHashNotExist import org.genericConfig.admin.shared.Actions import org.genericConfig.admin.shared.config....
gennadij/admin
server/test/org/genericConfig/admin/models/config/DeleteConfigWithDefectIdSpecs.scala
Scala
apache-2.0
2,123
/** Copyright (C) 2012 Edge System Design, LLC. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later...
edge-sys-design/simple-radio
tests/src/main/scala/Tests.scala
Scala
gpl-2.0
1,441
package ca.uqam.euler.nicolas /** * Starting with the number 1 and moving to the right * in a clockwise direction a 5 by 5 spiral is formed * as follows: * * 21 22 23 24 25 * 20 7 8 9 10 * 19 6 1 2 11 * 18 5 4 3 12 * 17 16 15 14 13 * * It can be verified that the sum of the numbers on the * diagon...
nicolaspayette/project-euler
src/main/scala/ca/uqam/euler/nicolas/Problem028.scala
Scala
mit
1,702
/** * 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 may...
dchenbecker/kafka-sbt
core/src/main/scala/kafka/utils/ZkUtils.scala
Scala
apache-2.0
32,076
package com.arcusys.learn.liferay.update import com.arcusys.learn.liferay.LiferayClasses.LUpgradeProcess class DBUpdater220 extends LUpgradeProcess with SQLRunner { override def getThreshold = 220 override def doUpgrade() { System.out.println("Updating to 2.2") // update tincan table columns length ...
ViLPy/Valamis
learn-portlet/src/main/scala/com/arcusys/learn/liferay/update/DBUpdater220.scala
Scala
lgpl-3.0
10,313
package util import javax.crypto.SecretKeyFactory import javax.crypto.spec.PBEKeySpec import org.joda.time.DateTime /** * パスワード暗号化の共通クラス. */ object PasswordDigestUtil { /** * Hash文字列作成. * @param passwordStr ユーザ入力パスワード文字列 * @param timeStamp パスワード用日時 * @return Hash化文字列 */ def createHashPassword(p...
nemuzuka/vss-kanban
src/main/scala/util/PasswordDigestUtil.scala
Scala
mit
854
/* * Copyright 2016 The BigDL 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 applicable law or agr...
zhangxiaoli73/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/models/InceptionSpec.scala
Scala
apache-2.0
9,135
/** Copyright 2015 TappingStone, 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 ...
nvoron23/PredictionIO
data/src/main/scala/io/prediction/data/storage/elasticsearch/StorageClient.scala
Scala
apache-2.0
1,569
/* * Copyright (C) 2012 Pavel Fatin <http://pavelfatin.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * ...
pavelfatin/toyfs
src/main/scala/com/pavelfatin/fs/manager/Step.scala
Scala
gpl-3.0
808
package app.agent import app.server.ProbeSummaryResponse import app.ui.BigSpinner import im.mange.jetboot._ import im.mange.jetpac._ case class ChecksSummaryAgent() extends Renderable { private val holder = div(Some("checksSummary")).classes("hidden").styles(marginTop("5px")) def render = holder.render def req...
alltonp/reprobate
src/main/scala/app/agent/ChecksSummaryAgent.scala
Scala
apache-2.0
566
class Position(val foo: Int) extends AnyVal { def orElse(that: Position) = if (foo != 0) this else that }
som-snytt/dotty
tests/pos/vcif.scala
Scala
apache-2.0
112
import slick.driver.JdbcProfile import scala.concurrent.{Future, Await} import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.duration.Duration import slick.backend.{DatabaseConfig, StaticDatabaseConfig} @StaticDatabaseConfig("#tsql") object TypedSQL extends App { val dc = DatabaseConfig...
nafg/slick
samples/slick-plainsql/src/main/scala/TypedSQL.scala
Scala
bsd-2-clause
764
package org.jetbrains.plugins.scala.lang.psi.stubs.index import com.intellij.openapi.project.Project import com.intellij.psi.search.GlobalSearchScope import com.intellij.psi.stubs.StringStubIndexExtension import org.jetbrains.plugins.scala.finder.ScalaSourceFilterScope import org.jetbrains.plugins.scala.lang.psi.api.t...
LPTK/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/stubs/index/ScImplicitObjectKey.scala
Scala
apache-2.0
763
trait V { // ok // error: java.lang.IllegalArgumentException: Could not find proxy for val f: Function1 in List(value f, value v, trait V, package <empty>, package <root>) (currentOwner= value <local V$class> ) val v = { val f = (x: Int) => x + 1; f(2) } // ok // assertion failed: // Trying to access the...
scala/scala
test/files/pos/trait_fields_owners.scala
Scala
apache-2.0
690
/* * Copyright 2001-2013 Artima, 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 agre...
SRGOM/scalatest
scalatest-test/src/test/scala/org/scalatest/path/FunSpecSpec.scala
Scala
apache-2.0
45,423
// Generated by <a href="http://scalaxb.org/">scalaxb</a>. package xmlschema import masked.scalaxb /** Part 1 version: Id: structures.xsd,v 1.2 2004/01/15 11:34:25 ht Exp Part 2 version: Id: datatypes.xsd,v 1.3 2004/01/23 18:11:13 ht Exp */ /** This type is extended by almost all schema type...
eed3si9n/scalaxb
cli/src_managed/xmlschema/xmlschema.scala
Scala
mit
33,431
package c1.w6 object numberOfQueens extends App { def queens(n: Int): Set[List[Int]] = { def placeQueen(row: Int): Set[List[Int]] = { if (row == 0) Set(Nil) else { for { candidate <- placeQueen(row - 1) // create all rows N col <- 0 until n // for each column if...
lwo/lwo.github.io
src/main/scala/c1/w6/numberOfQueens.scala
Scala
gpl-3.0
982
package com.github.j5ik2o.reactive.redis.pool import java.util.UUID import akka.NotUsed import akka.stream.scaladsl.Flow import com.github.j5ik2o.reactive.redis.command.CommandRequestBase import com.github.j5ik2o.reactive.redis.{ PeerConfig, RedisConnection } import io.github.andrebeat.pool.Lease import monix.eval.Ta...
j5ik2o/reactive-redis
pool-scala/src/main/scala/com/github/j5ik2o/reactive/redis/pool/ScalaPoolConnection.scala
Scala
mit
965
package org.stanoq.crawler import java.util.Collections import java.util.concurrent.{ConcurrentHashMap, TimeUnit} import akka.actor.ActorSystem import akka.event.Logging import org.jsoup.nodes.Document import org.jsoup.{Connection, HttpStatusException, Jsoup} import org.stanoq.crawler.model.{ConfigProperties, Page} ...
olka/stanoq
src/main/scala/org/stanoq/crawler/Crawler.scala
Scala
mit
2,620
package lib sealed abstract class SessionAttribute(val key: String) object SessionAttribute { case object LoginUser extends SessionAttribute("login_user") case object Ref extends SessionAttribute("ref") case object UploadPolicy extends SessionAttribute("upload_policy") case object ResetPasswordToken extends S...
atware/sharedocs
src/main/scala/lib/SessionAttribute.scala
Scala
mit
361
package org.jetbrains.plugins.scala.failed.annotator import com.intellij.lang.annotation.AnnotationHolder import com.intellij.psi.{PsiErrorElement, PsiReference} import org.jetbrains.plugins.scala.annotator.AnnotatorHolderMock import org.jetbrains.plugins.scala.annotator.quickfix.ReportHighlightingErrorQuickFix import...
ilinum/intellij-scala
test/org/jetbrains/plugins/scala/failed/annotator/OverloadingTest.scala
Scala
apache-2.0
5,378
package net.mm.composer import com.twitter.finatra.{Controller, ResponseBuilder} import com.twitter.logging.Logger import com.twitter.util.Future import net.mm.composer.properties.Property import net.mm.composer.relations.RelationJsonComposer trait CompositionResponseBuilder { self: Controller => protected def r...
mosche/finatra-composition-proxy
composition-proxy/src/main/scala/net/mm/composer/CompositionResponseBuilder.scala
Scala
mit
851
/* * 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 ...
zhangminglei/flink
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/descriptors/DescriptorTestBase.scala
Scala
apache-2.0
4,122
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distribute...
wvlet/airframe
airframe-di/src/test/scala-2/wvlet/airframe/legacy/AssistedInjectionTest.scala
Scala
apache-2.0
1,904
package io.hydrosphere.mist.jobs.resolvers import java.nio.file.{Files, Paths} import akka.http.scaladsl.model.{HttpRequest, HttpResponse} import akka.stream.scaladsl.Flow import org.apache.commons.codec.digest.DigestUtils import org.scalatest.{FunSuite, Matchers} import scala.concurrent.duration.Duration import sca...
KineticCookie/mist
src/test/scala/io/hydrosphere/mist/jobs/resolvers/MavenArtifactResolverTest.scala
Scala
apache-2.0
3,236
package com.mesosphere.http import cats.instances.list._ import cats.instances.try_._ import cats.syntax.traverse._ import scala.util.Success import scala.util.Try object CompoundMediaTypeParser { def parse(s: String): Try[CompoundMediaType] = { s.split(',').toList.filterNot(_.trim.isEmpty) match { case ...
dcos/cosmos
cosmos-common/src/main/scala/com/mesosphere/http/CompoundMediaTypeParser.scala
Scala
apache-2.0
2,196
/* Copyright 2010 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 applicable law or...
markusgumbel/dshl7
core/src/main/scala/net/gumbix/hl7dsl/DSL/SupplyDSL.scala
Scala
apache-2.0
1,263
package decoupledwithfactory trait MessageProvider { def getMessage: String }
BBK-PiJ-2015-67/sdp-portfolio
exercises/week02/di-scala/src/decoupledwithfactory/MessageProvider.scala
Scala
unlicense
80
/* * Copyright 2017 Datamountaineer. * * 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...
datamountaineer/stream-reactor
kafka-connect-elastic6/src/main/scala/com/datamountaineer/streamreactor/connect/elastic6/TransformAndExtractPK.scala
Scala
apache-2.0
5,351
package sativum import peapod.Task abstract class Dag { lazy val name: String = this.getClass.getName protected val sativum: Sativum var endpoints: List[Task[_]] = Nil protected val waitTime = 60000 def endpoint (t: Task[_]) = { endpoints = endpoints :+ t } /** * Returns back if all peas in th...
teachingmachines/sativum
src/main/scala/sativum/Dag.scala
Scala
mit
840
package breeze.linalg import breeze.benchmark.{MyRunner, BreezeBenchmark} import breeze.linalg.operators.DenseVectorSupportMethods import spire.syntax.cfor._ /** * Created by dlwh on 8/14/15. */ class DenseAxpyBenchmark extends BreezeBenchmark { assert(usingNatives) val dv, dv2 = DenseVector.rand(5) def tim...
wstcpyt/breeze
benchmark/src/main/scala/breeze/linalg/DenseAxpyBenchmark.scala
Scala
apache-2.0
1,470
/** * 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 may...
sebadiaz/kafka
core/src/main/scala/kafka/network/SocketServer.scala
Scala
apache-2.0
35,445
package leo.modules.output.logger import leo.modules.output.Output /** * Simple implementation of the [[Logging]] trait * with message logging to System.err (FD 1). * * The verbosity (logging level threshold) is set * by the `v` flag from the command-line arguments. * @see [[leo.Configuration]] */ object Out e...
lex-lex/Leo-III
src/main/scala/leo/modules/output/logger/Out.scala
Scala
bsd-3-clause
1,293
package dx.core.languages.wdl import wdlTools.types.{TypedAbstractSyntax => TAT, WdlTypes} case class Bundle(primaryCallable: Option[TAT.Callable], allCallables: Map[String, TAT.Callable], typeAliases: Map[String, WdlTypes.T])
dnanexus-rnd/dxWDL
src/main/scala/dx/core/languages/wdl/Bundle.scala
Scala
apache-2.0
265
package com.openquant.quoter.quotedb import org.specs2.specification.Scope import java.io.File trait TempDBScope extends Scope { val tmpPath = File.createTempFile("quoteDB_tests_", ".db") tmpPath.deleteOnExit() val quoteDB = QuoteDB(s"sqlite://$tmpPath") }
openquant/quoter
src/test/scala/com/larroy/quoter/quotedb/TempDBScope.scala
Scala
lgpl-3.0
265
/* * Accio is a platform to launch computer science experiments. * Copyright (C) 2016-2018 Vincent Primault <v.primault@ucl.ac.uk> * * Accio is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version...
privamov/accio
accio/java/fr/cnrs/liris/util/reflect/ScalaType.scala
Scala
gpl-3.0
1,876
/******************************************************************************* Copyright (c) 2013, S-Core. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. *********************************************************************...
daejunpark/jsaf
src/kr/ac/kaist/jsaf/analysis/typing/models/AbsProperty.scala
Scala
bsd-3-clause
830
/* * sbt * Copyright 2011 - 2018, Lightbend, Inc. * Copyright 2008 - 2010, Mark Harrah * Licensed under Apache License 2.0 (see LICENSE) */ package testpkg import java.io.{ InputStream, OutputStream, PrintStream } import java.util.concurrent.{ LinkedBlockingQueue, TimeUnit, TimeoutException } import sbt.internal...
sbt/sbt
server-test/src/test/scala/testpkg/ClientTest.scala
Scala
apache-2.0
4,149
1 case class Values(ds: Double*) object MatchValues { def main(args: Array[String]) { val vals = Values(1.5, -2.3, 4.5) println(vals match { case Values(ds@_*) => /*start*/(0.0 /: ds)(_ + _)/*end*/ // wrong errors here }) } } //Double
ilinum/intellij-scala
testdata/typeInference/bugs5/SCL3123.scala
Scala
apache-2.0
259
case class i1() extends AnyRef
lampepfl/dotty
tests/pos/i5001.scala
Scala
apache-2.0
31
/** * Copyright (c) 2012 Petr Kozelek <petr.kozelek@gmail.com> * * The full copyright and license information is presented * in the file LICENSE that was distributed with this source code. */ package mql.model.semantic trait SqlExpression extends SqlConvertible
footcha/MQL
src/main/scala/mql/model/semantic/SqlExpression.scala
Scala
bsd-3-clause
267
package mesosphere.marathon import java.net.InetSocketAddress import java.util import com.google.inject.Module import com.twitter.common.quantity.{ Amount, Time } import com.twitter.common.zookeeper.ZooKeeperClient import mesosphere.chaos.App import mesosphere.chaos.http.{ HttpModule, HttpService } import mesosphere....
ss75710541/marathon
src/main/scala/mesosphere/marathon/Main.scala
Scala
apache-2.0
5,929
package org.jetbrains.plugins.scala package lang package psi package stubs package elements import com.intellij.lang.ASTNode import com.intellij.psi.PsiElement import com.intellij.psi.stubs.{IndexSink, StubElement, StubInputStream, StubOutputStream} import com.intellij.util.io.StringRef._ import org.jetbrains.plugins....
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/stubs/elements/ScPackagingElementType.scala
Scala
apache-2.0
2,424