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
/* * 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...
lresende/incubator-toree
kernel-api/src/main/scala/org/apache/toree/dependencies/CoursierDependencyDownloader.scala
Scala
apache-2.0
14,556
package com.eevolution.context.dictionary.infrastructure.repository import java.util.UUID import com.eevolution.context.dictionary.domain._ import com.eevolution.context.dictionary.domain.model.FieldGroupTrl import com.eevolution.context.dictionary.infrastructure.db.DbContext._ import com.eevolution.utils.PaginatedSe...
adempiere/ADReactiveSystem
dictionary-impl/src/main/scala/com/eevolution/context/dictionary/infrastructure/repository/FieldGroupTrlRepository.scala
Scala
gpl-3.0
2,987
/* Copyright (c) 2014 by 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 required by applicable law or agreed to in writing, so...
RPGOne/Skynet
xgboost-master/jvm-packages/xgboost4j-spark/src/test/scala/ml/dmlc/xgboost4j/scala/spark/XGBoostSparkPipelinePersistence.scala
Scala
bsd-3-clause
4,624
package com.github.sstone.amqp import akka.actor.{Props, Actor, ActorSystem} import com.github.sstone.amqp.Amqp._ import com.rabbitmq.client.ConnectionFactory import scala.concurrent.duration._ object Test1 extends App { implicit val system = ActorSystem("mySystem") // create an AMQP connection val conn = syst...
gawkermedia/amqp-client
src/test/scala/com/github.sstone/amqp/Test1.scala
Scala
mit
1,488
/* * IP4S/src/main/scala/core//IPLcore.scala * * Copyright (C) 2017 K.Takeuchi * * A class that implements the core function of this wrapper. * This class has main functions of reading, writing and displaying images. */ package ip4s package core import javax.imageio.ImageIO import java.awt.image.BufferedImage im...
lrf141/IP4S
src/main/scala/core/IPLcore.scala
Scala
mit
1,501
object A { sealed trait Expr[+T] final case class FooExpr() extends Expr[1 | 2] object Test { def foo[T](x: Expr[T]): T = x match { case x: FooExpr => 3 // error } val x: 1 | 2 = foo(FooExpr()) } } object B { trait C trait D extends C trait E extends C trait F extends C tr...
dotty-staging/dotty
tests/neg/gadt-lhs-union.scala
Scala
apache-2.0
609
package org.tribbloid.spookystuff /** * Created by peng on 2/21/15. */ package object entity { type SortKey = Key with SortKeyHelper type HiddenKey = Key with HiddenKeyHelper }
chenUT/spookystuff
core/src/main/scala/org/tribbloid/spookystuff/entity/package.scala
Scala
apache-2.0
186
package org.scalaideaextension.compilation import com.intellij.openapi.compiler.CompileContext /** * extension scripts extending this trait will automatically * be informed about compilation events of projects * * @author kostas.kougios * Date: 22/07/14 */ trait ProjectCompilationListener { def succ...
kostaskougios/scala-idea-extensions
src/org/scalaideaextension/compilation/ProjectCompilationListener.scala
Scala
apache-2.0
351
package com.danielasfregola.twitter4s.entities.streaming.common import com.danielasfregola.twitter4s.entities.streaming.CommonStreamingMessage /** These events contain an id field indicating the user ID and a collection of * withheld_in_countries uppercase two-letter country codes. * For more information see * ...
DanielaSfregola/twitter4s
src/main/scala/com/danielasfregola/twitter4s/entities/streaming/common/UserWithheldNotice.scala
Scala
apache-2.0
725
/* * 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 ...
mkolod/incubator-spark
core/src/main/scala/org/apache/spark/util/Utils.scala
Scala
apache-2.0
29,360
package service import model.Profile._ import profile.simple._ import model.Activity trait ActivityService { def getActivitiesByUser(activityUserName: String, isPublic: Boolean)(implicit s: Session): List[Activity] = Activities .innerJoin(Repositories).on((t1, t2) => t1.byRepository(t2.userName, t2.repos...
mqshen/gitbucketTest
src/main/scala/service/ActivityService.scala
Scala
apache-2.0
9,512
package org.powlab.jeye.decode.processor.wide import scala.collection.mutable.ArrayBuffer import org.powlab.jeye.core.Opcodes.OPCODES import org.powlab.jeye.core.Opcodes.OPCODE_IINC import org.powlab.jeye.core.Opcodes.OPCODE_WIDE import org.powlab.jeye.decode.RuntimeOpcode import org.powlab.jeye.utils.DecodeUtils impo...
powlab/jeye
src/main/scala/org/powlab/jeye/decode/processor/wide/WideOpcodeInformator.scala
Scala
apache-2.0
1,158
/** * This file is part of SensApp [ http://sensapp.modelbased.net ] * * Copyright (C) 2011- SINTEF ICT * Contact: SINTEF ICT <nicolas.ferry@sintef.no> * * Module: net.modelbased.sensapp * * SensApp is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public L...
SINTEF-9012/sensapp
net.modelbased.sensapp.system.pfe2012/src/main/scala/net/modelbased/sensapp/system/pfe2012/Distribution.scala
Scala
lgpl-3.0
2,503
/** * Created by nperez on 7/15/16. */ package com.nico.runner import com.nico.ClusterPublisher.ClusterPublisherApp import com.nico.DistributedSubscriber.DistributedSubscriberApp import scala.concurrent.Future import scala.concurrent.ExecutionContext.Implicits.global object Runner extends App { //val json...
anicolaspp/distributd-transaction-processor
ClusterRunner/src/main/scala/Runner.scala
Scala
mit
578
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.scaladsl.testkit import akka.Done import akka.persistence.query.Offset import akka.stream.Materializer import akka.stream.scaladsl.{ Flow, Sink, Source } import com.lightbend.internal.broker.TaggedOffsetTopicProdu...
rstento/lagom
testkit/scaladsl/src/main/scala/com/lightbend/lagom/scaladsl/testkit/TestTopicComponents.scala
Scala
apache-2.0
4,027
package com.bwsw.tstreamstransactionserver.options import java.util.Properties class OptionHelper(properties: Properties) { def checkPropertyOnExistence(property: String)(classType: Class[_]): String = { Option(properties.getProperty(property)) .getOrElse(throw new NoSuchElementException( s"No pro...
bwsw/tstreams-transaction-server
src/main/scala/com/bwsw/tstreamstransactionserver/options/OptionHelper.scala
Scala
apache-2.0
916
/* * Copyright 2001-2017 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...
scalatest/scalatest
dotty/scalactic/src/main/scala/org/scalactic/source/TypeInfo.scala
Scala
apache-2.0
998
/* * 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 ...
ueshin/apache-flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/util/aggregation.scala
Scala
apache-2.0
5,174
package eu.timepit.refined.shapeless.typeable import eu.timepit.refined.W import eu.timepit.refined.api.{Refined, RefinedTypeOps} import eu.timepit.refined.string.MatchesRegex import eu.timepit.refined.types.numeric.PosInt import org.scalacheck.Prop._ import org.scalacheck.Properties import shapeless.Typeable class T...
fthomas/refined
modules/shapeless/shared/src/test/scala/eu/timepit/refined/shapeless/typeable/TypeableSpec.scala
Scala
mit
1,537
package scalaz.validations import org.joda.time.DateTime import org.scalatest.{FlatSpec, Matchers} import scalaz._ import com.scalaz.model.{Destination, Trip} import com.scalaz.validation._ class ValidationSpec extends FlatSpec with Matchers { private val fromDate = new DateTime("2015-02-03T14:15:00.000+08:00") ...
rvijayan/scalaz-validations-example
src/test/scala/scalaz/validations/ValidationSpec.scala
Scala
mit
1,523
/* * 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 ...
sryza/spark
core/src/main/scala/org/apache/spark/util/random/Pseudorandom.scala
Scala
apache-2.0
962
package com.seanshubin.todo.application.domain import org.scalatest.FunSuite /* test-driven-003 Once we got the JettyRunnerTest working, we tried to wire it into the entry point This made us notice that JettyRunner depends on a port, so now we have to add code that configures the port Although you can see more settin...
SeanShubin/todo-application
domain/src/test/scala/com/seanshubin/todo/application/domain/CommandLineArgumentsValidatorTest.scala
Scala
unlicense
3,659
package scuff.concurrent import org.junit._, Assert._ import scala.concurrent.duration._ import scala.util.Try import scuff.Numbers class TestFailureBackoff { def fibonnaciBackoff(maxBackoff: FiniteDuration) = Numbers.fibonacci.view.dropWhile(_ < 2).map(_.seconds).takeWhile(_ <= maxBackoff) private var erro...
nilskp/scuff
src/test/scala/scuff/concurrent/TestFailureTracker.scala
Scala
mit
2,015
package me.invkrh.cmdchat.util /** * Created with IntelliJ IDEA. * User: invkrh * Date: 4/7/15 * Time: 9:29 PM */ trait Display { def getPrompt(name: String) = { s"me ($name) > " } // cursor in the next line def response(txt: String, prompt: String = "") = { print(s"\\n[ $txt ]\\n\\n" + prompt)...
invkrh/akka-spray-playground
cmdchat/src/main/scala/me/invkrh/cmdchat/util/Display.scala
Scala
mit
655
package api.dto import com.wordnik.swagger.annotations.{ApiModel, ApiModelProperty} import spray.json.DefaultJsonProtocol import scala.annotation.meta.field @ApiModel(description = "Prediction enqueue for potential tweets") case class PredictionDto( @(ApiModelProperty @field)(required = true, val...
twitterist/backend
src/main/scala/api/dto/PredictionDto.scala
Scala
mit
660
/* ,i::, :;;;;;;; ;:,,::;. 1ft1;::;1tL t1;::;1, :;::; _____ __ ___ __ fCLff ;:: tfLLC / ___/ / |/ /____ _ _____ / /_ CLft11 :,, i1tffLi \\__ \\ ____ / /|_/ ...
S-Mach/aeondb
src/test/scala/s_mach/aeondb/AeonMapFutureTest.scala
Scala
apache-2.0
3,653
/* * Copyright (c) 2014-2018 by The Monix Project Developers. * See the project homepage at: https://monix.io * * 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...
Wogan/monix
monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/SearchByOrderOperator.scala
Scala
apache-2.0
3,171
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs // Licence: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.core import akka.actor._ import com.google.common.io.ByteStreams import java.io.{ File, IOException } import java.util.jar.JarFile import org.ensime.api._ class DocResolv...
d1egoaz/ensime-sbt
src/sbt-test/sbt-ensime/ensime-server/core/src/main/scala/org/ensime/core/DocResolver.scala
Scala
apache-2.0
6,584
package liang.don.dzviewer.log.java import liang.don.dzviewer.log.{LogLevel, LoggerInterface} /** * File Logger using Java I/O libraries. * * @author Don Liang * @Version 0.1.2, 16/09/2011 */ trait FileLogger extends LoggerInterface { override def log(message: String) { // TODO } override def log(mes...
dl2k84/DeepZoomViewer
src/liang/don/dzviewer/log/java/FileLogger.scala
Scala
mit
484
/* * Copyright 2011-2022 GatlingCorp (https://gatling.io) * * 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 appli...
gatling/gatling
gatling-http/src/main/scala/io/gatling/http/check/body/HttpBodySubstringCheckMaterializer.scala
Scala
apache-2.0
1,190
/* * 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 ...
Dax1n/spark-core
core/src/test/scala/org/apache/spark/scheduler/PoolSuite.scala
Scala
apache-2.0
8,220
/* * NodeImpl.scala * (Cord) * * Copyright (c) 2015-2020 Hanns Holger Rutz. * * This software is published under the GNU Lesser General Public License v2.1+ * * * For further information, please contact Hanns Holger Rutz at * contact@sciss.de */ package de.sciss.cord package impl import scala.collectio...
Sciss/Cord
src/main/scala/de/sciss/cord/impl/NodeImpl.scala
Scala
lgpl-2.1
997
package scalydomain import java.io.File import java.util.concurrent.{BlockingQueue, LinkedBlockingQueue} import scala.concurrent._ import scala.concurrent.duration._ import scala.collection.JavaConversions._ import scala.collection.mutable.SortedSet import scala.io.Source import scala.math.pow import scala.util.matchi...
anelson/scalydomain
generate/main.scala
Scala
apache-2.0
6,171
/* * Copyright (c) 2012-2017 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apach...
snowplow/iglu
0-common/scala-core/src/main/scala/com.snowplowanalytics.iglu/core/typeclasses/NormalizeData.scala
Scala
apache-2.0
1,089
package pamflet import com.tristanhunt.knockoff._ trait IdentifiedHeaders extends Discounter { self: TextWriter => def headerText( spans : Seq[Span] ) : String = { val stringWriter = new java.io.StringWriter spans.map( self.spanToText(_)(stringWriter) ) stringWriter.toString } override def headerToX...
n8han/pamflet
knockoff/src/main/scala/headers.scala
Scala
lgpl-3.0
1,502
package com.ee.assets.transformers import org.specs2.mutable.Specification class CommonRootNamerTest extends Specification { "common root namer" should { "name" in { pending("coming..") } } }
edeustace/assets-loader
plugin/test/com/ee/assets/transformers/CommonRootNamerTest.scala
Scala
mit
215
/* * Copyright 2014 Commonwealth Computer Research, 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 applica...
kevinwheeler/geomesa
geomesa-core/src/main/scala/org/locationtech/geomesa/core/index/FilterHelper.scala
Scala
apache-2.0
10,263
/* * 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 ...
pgandhi999/spark
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/ResourceRequestHelper.scala
Scala
apache-2.0
9,652
/* * Copyright (C) 2012 The Regents of The University California. * 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/LICENS...
sameeragarwal/blinkdb_dev
src/main/scala/shark/memstore2/column/ComplexColumnBuilder.scala
Scala
apache-2.0
2,598
package mesosphere.marathon.upgrade import mesosphere.marathon.state.AppDefinition.VersionInfo import mesosphere.marathon.state.{ AppDefinition, Group, Timestamp } import org.slf4j.LoggerFactory /** * Tools related to app/group versioning. */ object GroupVersioningUtil { private[this] val log = LoggerFactory.ge...
timcharper/marathon
src/main/scala/mesosphere/marathon/upgrade/GroupVersioningUtil.scala
Scala
apache-2.0
2,386
/* * Copyright 2015 Netflix, 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 t...
gorcz/atlas
atlas-chart/src/main/scala/com/netflix/atlas/chart/Notice.scala
Scala
apache-2.0
825
package com.github.rnowling.bps.datagenerator.spark import com.github.rnowling.bps.datagenerator.datamodels.{Store,Customer,PurchasingProfile,Transaction} import com.github.rnowling.bps.datagenerator.{DataLoader,StoreGenerator,CustomerGenerator,PurchasingProfileGenerator,TransactionGenerator} import com.github.rnowlin...
rnowling/bigpetstore-data-generator
spark_driver/src/main/scala/com/github/rnowling/bps/datagenerator/spark/Driver.scala
Scala
apache-2.0
6,464
package mimir.util import org.apache.spark.sql.Row import mimir.algebra._ import mimir.provenance.Provenance import java.sql.SQLException import java.util.Calendar import java.sql.Date import java.sql.Timestamp import org.apache.spark.sql.DataFrame import mimir.exec.spark.RAToSpark import scala.reflect.runtime.univers...
UBOdin/mimir
src/main/scala/mimir/util/SparkUtils.scala
Scala
apache-2.0
11,792
/* Copyright 2012 Denis Bardadym 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 ...
Khalith-Basha/demo
src/main/scala/code/snippet/MyMenu.scala
Scala
apache-2.0
2,018
package services import java.util import config.ApplicationConfig import connectors.GameConnector import exceptions.ServerNotRespondingException import handlers.ServerRequestHandler import helpers.TestSpec import models.UserModel import org.mockito.ArgumentMatchers import org.mockito.Mockito._ import org.slf4j.Logger...
jameshforster/ToL-Scout-Plugin
src/test/scala/services/UserServiceSpec.scala
Scala
apache-2.0
3,535
/* * Copyright 2016 org.NLP4L * * 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...
fubuki/nlp4l
app/org/nlp4l/lucene/SchemaLoader.scala
Scala
apache-2.0
8,112
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package org.scalajs.testsuite.javalib.util im...
scala-js/scala-js
test-suite/shared/src/test/scala/org/scalajs/testsuite/javalib/util/CollectionsOnCollectionsTest.scala
Scala
apache-2.0
5,372
package com.softwaremill.bootzooka.email.application import java.io.{ByteArrayInputStream, ByteArrayOutputStream} import java.util.{Date, Properties} import javax.activation.{DataHandler, DataSource} import javax.mail.internet.{InternetAddress, MimeBodyPart, MimeMessage, MimeMultipart} import javax.mail.{Address, Mess...
aywengo/bootzooka
backend/src/main/scala/com/softwaremill/bootzooka/email/application/SmtpEmailSender.scala
Scala
apache-2.0
5,345
/* * 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 ...
shivangi1015/incubator-carbondata
integration/spark2/src/test/scala/org/apache/spark/carbondata/restructure/vectorreader/ChangeDataTypeTestCases.scala
Scala
apache-2.0
7,486
package org.wartremover package contrib.warts import scala.concurrent.Future object DiscardedFuture extends WartTraverser { val message: String = """andThen discards the return value of callback. |To chain the result of Future to other Future, use flatMap. |""".stripMargin def apply(u: WartUnive...
wartremover/wartremover-contrib
core/src/main/scala/wartremover/contrib/warts/DiscardedFuture.scala
Scala
apache-2.0
1,188
/* * 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...
wangyixiaohuihui/spark2-annotation
project/MimaBuild.scala
Scala
apache-2.0
4,017
package org.json4s /** * Do not use any type hints. */ case object NoTypeHints extends TypeHints { val hints: List[Class[_]] = Nil def hintFor(clazz: Class[_]) = None def classFor(hint: String, parent: Class[_]) = None override def shouldExtractHints(clazz: Class[_]) = false }
xuwei-k/json4s
core/src/main/scala/org/json4s/NoTypeHints.scala
Scala
apache-2.0
289
/* * Copyright 2001-2014 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...
scalatest/scalatest
jvm/scalatest-test/src/test/scala/org/scalatest/matchers/dsl/ResultOfAllElementsOfApplicationSpec.scala
Scala
apache-2.0
1,524
package com.sksamuel.scrimage.filter import com.sksamuel.scrimage.BufferedOpFilter /** @author Stephen Samuel */ class RGBFilter(r: Double = 0, g: Double = 0, b: Double = 0) extends BufferedOpFilter { require(r <= 1) require(g <= 1) require(b <= 1) val op = new thirdparty.jhlabs.image.RGBAdjustFilter() op.s...
carlosFattor/scrimage
scrimage-filters/src/main/scala/com/sksamuel/scrimage/filter/RGBFilter.scala
Scala
apache-2.0
511
package domain.kanban import domain.{ Entity, Enum, EnumEntry, ValueObject } import domain.user.{ User, UserAuthority, UserId } /** * かんばんドメイン. * @param kanbanId かんばんID * @param configuration かんばん構成情報 * @param joinedUsers 参加ユーザ */ case class Kanban( kanbanId: Option[KanbanId], configuration: KanbanConfig...
nemuzuka/vss-kanban
src/main/scala/domain/kanban/Kanban.scala
Scala
mit
4,446
package db import com.bryzek.apidoc.common.v0.models.{Audit, ReferenceGuid} import anorm._ import anorm.JodaParameterMetaData._ import org.joda.time.DateTime import java.util.UUID object AuditsDao { def query(tableName: String) = { Seq( queryCreation(tableName), s"${tableName}.updated_at", s"...
Seanstoppable/apidoc
api/app/db/AuditsDao.scala
Scala
mit
1,983
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala package reflect ...
lrytz/scala
src/reflect/scala/reflect/internal/Internals.scala
Scala
apache-2.0
12,628
package controllers import play.api.Play.current import play.api.cache.Cache import play.api.mvc._ import scala.xml.NodeSeq import models._ import models.dao._ object Feeds extends Controller { val feedGen = new FeedGenerator(DAOFactory.itemDAO) def latest = Action { implicit request => FeedStatsHelper.incr...
aspectcg15/play-app
app/controllers/Feeds.scala
Scala
gpl-3.0
513
// Copyright (C) 2016 IBM Corp. All Rights Reserved. // See the LICENCE.txt file distributed with this work for additional // information regarding copyright ownership. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may ob...
kane77/watson-scala-wrapper
src/main/scala/com/ibm/watson/developer_cloud/concept_insights/v2/model/Concepts.scala
Scala
apache-2.0
1,495
package free import mu.ListInstr._ object ListMuExample { def main(args: Array[String]) { val xs = cons(1, cons(2, cons(3, cons(4, cons(5, nil))))) val vs = cons(6, cons(7, cons(8, cons(9, cons(10, nil))))) print(show(xs)) print(" -- Start list") println() print(show(map(xs)(_ + 2))) p...
YoEight/psug-free
src/main/scala/free/ListMuExample.scala
Scala
mit
910
/** * This file is part of mycollab-web. * * mycollab-web 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. * * mycollab-web is d...
maduhu/mycollab
mycollab-web/src/main/scala/com/esofthead/mycollab/module/user/accountsettings/view/parameters/BillingScreenData.scala
Scala
agpl-3.0
1,136
/* * Copyright 2022 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/vat-registration-frontend
test/views/returns/ReturnFrequencyViewSpec.scala
Scala
apache-2.0
3,302
package com.programmaticallyspeaking.ncd.infra import scala.language.implicitConversions object BetterOption { implicit def option2Better[A](opt: Option[A]): BetterOption[A] = new BetterOption[A](opt) class BetterOption[A](opt: Option[A]) { def toEither(msg: => String): Either[String, A] = opt match { ...
provegard/ncdbg
src/main/scala/com/programmaticallyspeaking/ncd/infra/BetterOption.scala
Scala
bsd-3-clause
388
import xml.Node object Test extends App { val body: Node = <elem>hi</elem> println ((body: AnyRef, "foo") match { case (node: Node, "bar") => "bye" case (ser: Serializable, "foo") => "hi" }) println ((body, "foo") match { case (node: Node, "bar") => "bye" case (ser: Serializable...
som-snytt/dotty
tests/pending/run/t4124.scala
Scala
apache-2.0
616
/* * 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...
travisbrown/scalatest
src/test/scala/org/scalatest/ShouldBeASymbolSpec.scala
Scala
apache-2.0
13,696
import sbt.Keys._ import sbt._ import uk.gov.hmrc.DefaultBuildSettings._ import uk.gov.hmrc.PublishingSettings._ import uk.gov.hmrc.{ShellPrompt, SbtBuildInfo} object HmrcBuild extends Build { import de.heikoseeberger.sbtheader.AutomateHeaderPlugin import uk.gov.hmrc.DefaultBuildSettings._ import uk.gov.hmrc.Pub...
nicf82/accessibility-driver
project/HmrcBuild.scala
Scala
apache-2.0
2,730
package org.elasticmq.rest.sqs import org.elasticmq.actor.reply._ import org.elasticmq.msg.ClearQueue import org.elasticmq.rest.sqs.Action.PurgeQueue import org.elasticmq.rest.sqs.Constants._ import org.elasticmq.rest.sqs.directives.ElasticMQDirectives trait PurgeQueueDirectives { this: ElasticMQDirectives with Queue...
adamw/elasticmq
rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs/PurgeQueueDirectives.scala
Scala
apache-2.0
771
import _root_.io.gatling.core.scenario.Simulation import ch.qos.logback.classic.{Level, LoggerContext} import io.gatling.core.Predef._ import io.gatling.http.Predef._ import org.slf4j.LoggerFactory import scala.concurrent.duration._ /** * Performance test for the Classe entity. */ class ClasseGatlingTest extends Si...
israeleriston/scientific-week
backend-java/src/test/gatling/simulations/ClasseGatlingTest.scala
Scala
mit
3,372
/* * Copyright (c) 2014 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org...
guardian/snowplow
3-enrich/scala-hadoop-shred/src/test/scala/com.snowplowanalytics.snowplow.enrich.hadoop/shredder/TypeHierarchySpec.scala
Scala
apache-2.0
2,268
/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not use this fi...
wangcy6/storm_app
Elasticsearch/elasticsearch-hadoop-master/spark/core/main/scala/org/elasticsearch/spark/serialization/ReflectionUtils.scala
Scala
apache-2.0
4,764
def a = {} def foo = { def b = {} println(this./* offset: 4 */a) println(this./* resolved: false */b) }
ilinum/intellij-scala
testdata/resolve2/inheritance/this/element/Function.scala
Scala
apache-2.0
111
/* * 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 ...
pgandhi999/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/SQLExecution.scala
Scala
apache-2.0
7,016
package org.dohrm.toolkit.context import com.github.tototoshi.slick.GenericJodaSupport import org.dohrm.toolkit.actor.response.{ExceptionError, Error} import slick.driver.JdbcProfile import slick.jdbc.JdbcBackend.DatabaseDef /** * @author michaeldohr * @since 29/05/16 */ trait JdbcConfig { val jodaSupport: G...
dohr-michael/storyline
src/main/scala/org/dohrm/toolkit/context/JdbcContext.scala
Scala
mit
658
package org.scalajs.testinterface import language.experimental.macros /** Dummy object to get the right shadowing for 2.10 / 2.11 cross compilation */ private object Compat210 { object blackbox { // scalastyle:ignore type Context = scala.reflect.macros.Context } } import Compat210._ object TestUtils { imp...
jmnarloch/scala-js
stubs/src/main/scala/org/scalajs/testinterface/TestUtils.scala
Scala
bsd-3-clause
1,330
/* * Copyright 2017 PayPal * * 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 ...
akara/squbs
squbs-zkcluster/src/main/scala/org/squbs/cluster/package.scala
Scala
apache-2.0
3,991
package io.github.quark.resolver import java.util.concurrent.atomic.AtomicReference import akka.http.scaladsl.server.PathMatcher.Matched import io.github.quark.resolver.ServiceResolver._ import akka.http.scaladsl.server.PathMatchers.{Remaining, Segment, Slash} import io.github.quark.stage.PipelineStage.Input trait S...
burakkose/Quark
src/main/scala/io/github/quark/resolver/ServiceResolver.scala
Scala
apache-2.0
922
package com.circusoc.simplesite.members import java.sql.{Connection, DriverManager} import com.circusoc.simplesite._ import com.circusoc.simplesite.users.AuthenticatedUser import com.circusoc.simplesite.users.permissions.{CanEditTagsPermission, CanUpdateMembers} import org.codemonkey.simplejavamail.Email import org.d...
ririw/circusoc-backend
src/test/scala/com/circusoc/simplesite/members/MemberSpec.scala
Scala
agpl-3.0
6,385
package com.trafigura.chess object PrintLayoutsForTestCase extends App { val pieces = List(King, King, Queen, Bishop, Rook, Knight) val chessVariants = new ChessLayouts(false, 9, 6, pieces :_*) println(s"Test case is to find all layouts for $pieces on 9x6 deck") private val layouts = chessVariants.findLayouts....
dobrynya/chepila
src/main/scala/com/trafigura/chess/Tests.scala
Scala
apache-2.0
1,689
package scorex.api.http import javax.ws.rs.Path import akka.actor.ActorRefFactory import akka.http.scaladsl.model.StatusCodes import akka.http.scaladsl.server.Route import io.swagger.annotations._ import play.api.libs.json.Json import scorex.app.Application import scorex.crypto.encode.Base58 @Path("/wallet") @Api(va...
B83YPoj/Waves
src/main/scala/scorex/api/http/WalletApiRoute.scala
Scala
apache-2.0
1,301
/* * 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 ...
wangmiao1981/spark
external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/consumer/InternalKafkaConsumerPool.scala
Scala
apache-2.0
9,245
import javax.servlet.ServletContext import _root_.akka.actor.{ActorSystem, Props} import com.naughtyzombie.recipesearch._ import com.naughtyzombie.recipesearch.actor.{EsActor, EsIndexer} import com.naughtyzombie.recipesearch.controller.{ElasticSearchController, FileController, GreetingController} import org.scalatra._...
pram/recipesearch
server/src/main/scala/ScalatraBootstrap.scala
Scala
mit
1,026
package com.karasiq.bootstrap4.navbar import scala.language.postfixOps import com.karasiq.bootstrap.context.JSRenderingContext import com.karasiq.bootstrap.jquery.BootstrapJQueryContext trait JSNavigationBars { self: JSRenderingContext with NavigationBars with BootstrapJQueryContext⇒ implicit class JSNavigation(na...
Karasiq/scalajs-bootstrap
library-v4/js/src/main/scala/com/karasiq/bootstrap4/navbar/JSNavigationBars.scala
Scala
mit
794
package mr.merc.unit import scala.Option.option2Iterable import scala.util.Random import mr.merc.map.hex.TerrainHex import mr.merc.map.objects.{House, MapObject, WoodenBridge} import mr.merc.map.terrain._ import mr.merc.map.terrain.TerrainKind._ import DefenceType._ import SoldierState._ import mr.merc.unit.SoldierTyp...
RenualdMarch/merc
src/main/scala/mr/merc/unit/Attack.scala
Scala
gpl-3.0
9,497
/* * Wire * Copyright (C) 2016 Wire Swiss GmbH * * 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. * * This progr...
wireapp/wire-android-sync-engine
zmessaging/src/main/scala/com/waz/service/GenericMessageService.scala
Scala
gpl-3.0
3,716
/** * Copyright 2015 Mohiva Organisation (license at mohiva dot 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 req...
cemcatik/play-silhouette
silhouette-testkit/app/com/mohiva/play/silhouette/test/Fakes.scala
Scala
apache-2.0
7,539
package com.github.dronegator.nlp.vocabulary.ToolMiniLanguage import akka.NotUsed import akka.stream.scaladsl._ import com.github.dronegator.nlp.component.tokenizer.Tokenizer._ import com.github.dronegator.nlp.utils._ import com.github.dronegator.nlp.vocabulary.Vocabulary import com.github.dronegator.nlp.vocabulary.Vo...
dronegator/nlp
akka-utils/src/main/scala/com/github/dronegator/nlp/vocabulary/ToolMiniLanguage/ExamplesComponent.scala
Scala
apache-2.0
6,455
/* * scala-swing (https://www.scala-lang.org) * * Copyright EPFL, Lightbend, Inc., contributors * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala...
scala/scala-swing
src/main/scala/scala/swing/TabbedPane.scala
Scala
apache-2.0
5,107
/* * Copyright 2013 Steve Vickers * * 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 ...
fehmicansaglam/reactivemongo-extensions
bson/src/main/scala/dsl/criteria/Expression.scala
Scala
apache-2.0
5,119
/* * 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...
scalatest/scalatest
jvm/scalatest-test/src/test/scala/org/scalatest/ParallelTestExecutionParallelSuiteExamples.scala
Scala
apache-2.0
14,743
// // $Id$ // // Wiggle - a 2D game development library - http://code.google.com/p/wiggle/ // Copyright 2008-2010 Michael Bayne // Distributed under the "Simplified BSD License" in LICENSE.txt package wiggle.util /** * Represents an activity performed bit by bit every frame. Tasks can be composed in sequence or in ...
zdevzee/wiggle
src/main/scala/wiggle/util/Task.scala
Scala
bsd-3-clause
3,734
import org.scalatest._ import java.net._ import java.io._ class BootstrapSuite extends ParseSuite { var dir = new File(new File(System.getProperty("sbt.paths.tests.source")).getAbsolutePath) def isProjectRoot(dir: File) = dir != null && new File(dir.getAbsolutePath + File.separatorChar + "project" + File.separator...
smarter/scalameta
tests/src/test/scala/parser/BootstrapSuite.scala
Scala
bsd-3-clause
3,620
package org.scalacoin.script.control import org.scalatest.{MustMatchers, FlatSpec} /** * Created by chris on 1/8/16. */ class ControlOperationsFactoryTest extends FlatSpec with MustMatchers with ControlOperationsFactory { "ControlOperationsFactory" must "match a string with a control operation" in { fromStri...
TomMcCabe/scalacoin
src/test/scala/org/scalacoin/script/control/ControlOperationsFactoryTest.scala
Scala
mit
663
/* * Copyright (c) 2014-2020 by The Monix Project Developers. * See the project homepage at: https://monix.io * * 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...
alexandru/monifu
monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ZipWithIndexOperator.scala
Scala
apache-2.0
1,378
package ch.ninecode.cim import java.io.File import org.apache.spark.sql.SparkSession class CIMSparkSuite extends ch.ninecode.SparkSuite { val FILE_DEPOT = "data/" // test file names val FILENAME: String = s"${FILE_DEPOT}RealGrid/CGMES_v2.4.15_RealGridTestConfiguration_EQ_v2.xml" // number of elemen...
derrickoswald/CIMScala
CIMReader/src/test/scala/ch/ninecode/cim/CIMSparkSuite.scala
Scala
mit
2,279
package me.arcticlight.animations import me.arcticlight.animations.ScalaTween._ import me.arcticlight.animations.ScalaTween.DefaultInterpolations._ import org.scalatest._ import org.scalatest.junit.JUnitRunner import org.junit.runner.RunWith @RunWith(classOf[JUnitRunner]) class TweenSpec extends FlatSpec with Matcher...
ArcticLight/ScalaTween
src/test/scala/me/arcticlight/animations/TweenSpec.scala
Scala
mit
2,995
package models.domain.redis import play.api.libs.json._ import scala.Some /** * @author kamekoopa */ class Informations(val informations: Seq[Information]) object Informations { import scala.language.implicitConversions implicit def informationsToSeq(informations: Informations) = informations.informations de...
kamekoopa/redis-miruo
app/models/domain/redis/Informations.scala
Scala
apache-2.0
856
/* * Copyright 2009-2010 LinkedIn, 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 ...
linkedin-sna/norbert
network/src/main/scala/com/linkedin/norbert/network/server/MessageHandlerRegistryComponent.scala
Scala
apache-2.0
2,886
package com.arcusys.learn.liferay.update.version300 import com.arcusys.learn.liferay.LiferayClasses.LUpgradeProcess import com.arcusys.learn.liferay.update.SlickDBContext import com.arcusys.learn.liferay.update.version300.migrations.CertificateMemberMigration import com.arcusys.valamis.web.configuration.ioc.Configurat...
igor-borisov/valamis
learn-portlet/src/main/scala/com/arcusys/learn/liferay/update/version300/DBUpdater3002.scala
Scala
gpl-3.0
655
/** * (c) Copyright 2012 WibiData, Inc. * * See the NOTICE file distributed with this work for additional * information regarding copyright ownership. * * 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...
kijiproject/fake-hbase
src/test/scala/org/kiji/testing/fakehtable/TestFakeHBase.scala
Scala
apache-2.0
3,022
/* * Copyright 2014 http4s.org * * 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 i...
http4s/http4s
server/shared/src/test/scala/org/http4s/server/middleware/ThrottleSuite.scala
Scala
apache-2.0
4,843