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
package org.jetbrains.plugins.scala.lang.parser.parsing.builder import com.intellij.lang.PsiBuilder import collection.mutable.Stack import org.jetbrains.plugins.scala.lang.parser.util.ParserUtils import com.intellij.lang.impl.PsiBuilderAdapter import com.intellij.openapi.util.text.StringUtil import org.jetbrains.plugi...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/lang/parser/parsing/builder/ScalaPsiBuilderImpl.scala
Scala
apache-2.0
1,770
/* * 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/amls-frontend
test/views/declaration/who_is_registering_this_updateSpec.scala
Scala
apache-2.0
3,036
package org.scaladebugger.api.profiles.java.requests.vm import java.util.concurrent.atomic.AtomicBoolean import org.scaladebugger.api.profiles.java.JavaDebugProfile import org.scaladebugger.api.virtualmachines.DummyScalaVirtualMachine import org.scaladebugger.test.helpers.ParallelMockFunSpec import test.{ApiConstants,...
ensime/scala-debugger
scala-debugger-api/src/it/scala/org/scaladebugger/api/profiles/java/requests/vm/JavaVMDeathRequestIntegrationSpec.scala
Scala
apache-2.0
1,471
/** * Copyright 2015 ICT. * * 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 ...
DataSysLab/netflow
common/src/main/scala/cn/ac/ict/acs/netflow/util/NetFlowUncaughtExceptionHandler.scala
Scala
apache-2.0
1,817
/* * 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 ...
tophua/spark1.52
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/TungstenAggregate.scala
Scala
apache-2.0
6,254
package cakesolutions.kafka import java.util.concurrent.TimeUnit import cakesolutions.kafka.TypesafeConfigExtensions._ import com.typesafe.config.Config import org.apache.kafka.clients.consumer.OffsetAndMetadata import org.apache.kafka.clients.producer.{Callback, ProducerConfig, ProducerRecord, RecordMetadata, KafkaP...
simonsouter/scala-kafka-client
client/src/main/scala/cakesolutions/kafka/KafkaProducer.scala
Scala
mit
11,514
package com.twitter.finatra.http.tests.integration.startup import com.twitter.finagle.http.Request import com.twitter.finatra.http.routing.HttpRouter import com.twitter.finatra.http.EmbeddedHttpServer import com.twitter.finatra.http.{Controller, HttpServer} import com.twitter.inject.Test class HttpServerStartupIntegr...
syamantm/finatra
http/src/test/scala/com/twitter/finatra/http/tests/integration/startup/HttpServerStartupIntegrationTest.scala
Scala
apache-2.0
1,798
package com.github.yoskhdia.sqscala case class MessageId(id: String)
yoskhdia/sqscala
src/main/scala/com/github/yoskhdia/sqscala/MessageId.scala
Scala
mit
70
/* Webscripter - a simple html creator Copyright (C) 2010 Davide Inglima 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 (at you...
BackupTheBerlios/webscripter
src/net/limacat/webscripter/Reader.scala
Scala
agpl-3.0
5,266
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ package lagom import sbt._ import sbtunidoc.BaseUnidocPlugin import sbtunidoc.GenJavadocPlugin import sbtunidoc.JavaUnidocPlugin import sbtunidoc.ScalaUnidocPlugin import sbtunidoc.BaseUnidocPlugin.autoImport._ import sbtunidoc.JavaUnidocPlugin.autoIm...
lagom/lagom
project/Doc.scala
Scala
apache-2.0
9,003
package at.logic.gapt.formats.tptp import at.logic.gapt.expr.{ Bottom, FOLFormula } import at.logic.gapt.expr.hol.{ univclosure, CNFn, CNFp } import at.logic.gapt.proofs.{ Sequent, FOLClause } import at.logic.gapt.proofs.sketch.{ SketchAxiom, SketchInference, RefutationSketch } import scala.collection.mutable class ...
loewenheim/gapt
src/main/scala/at/logic/gapt/formats/tptp/tptpProofParser.scala
Scala
gpl-3.0
5,329
package offGridOrcs final case class Vec3(x: Double, y: Double, z: Double) { def r = x def g = y def b = z def +(other: Vec3) = Vec3(x + other.x, y + other.y, z + other.z) def -(other: Vec3) = Vec3(x - other.x, y - other.y, z - other.z) def *(other: Vec3) = Vec3(x * other.x, y * other.y, z...
dcecile/off-grid-orcs
src/Vec3.scala
Scala
mit
1,162
/* * Copyright © 2015 Lukas Rosenthaler, Benjamin Geer, Ivan Subotic, * Tobias Schweizer, André Kilchenmann, and Sepideh Alassi. * This file is part of Knora. * Knora 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 So...
nie-ine/Knora
webapi/src/it/scala/org/knora/webapi/ITKnoraFakeSpec.scala
Scala
agpl-3.0
2,716
package com.benkolera.slick.joda import java.sql.Timestamp import scala.util.parsing.combinator.RegexParsers case class InstantRangeParser[A:Instant]( f:Timestamp => InfiniteInstant[A] ) extends RegexParsers { def pinf = "infinity".r ^^ { _ => PosInfinity[A]() } def ninf = "-infinity".r ^^ { _ => NegInfinity[A]...
benkolera/scala-slick-extras
src/main/scala/joda/InstantRangeParser.scala
Scala
mit
2,222
/* * 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/amls-frontend
test/views/notifications/v4m0/revocation_reasonsSpec.scala
Scala
apache-2.0
2,310
package me.rexim.issuestant.mock import scala.collection.mutable.ListBuffer import scala.util._ import org.http4s._ import org.http4s.client._ import scalaz.concurrent._ import scalaz.stream._ import scodec.bits._ // TODO(#55): Make ETagLogging less stateful // // Something like // ```scala // val (requests, respo...
tsoding/Issuestant
src/test/scala/me/rexim/mock/EtagLogging.scala
Scala
mit
1,128
/* * 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 ...
tillrohrmann/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/runtime/stream/sql/StreamFileSystemITCaseBase.scala
Scala
apache-2.0
2,039
/* * 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 ...
rmetzger/flink
flink-runtime/src/test/scala/org/apache/flink/runtime/testingUtils/TestingUtils.scala
Scala
apache-2.0
5,938
package eu.shiftforward.Elements import eu.shiftforward.{Bus, Wire} import scala.collection.mutable.ArrayBuffer trait OptimizedControlFlow extends ControlFlow { override def mux(a: Wire, b: Wire, s: Wire) = { val output = new Wire def action() { val inputA = a.getSignal val inputB = b.getSignal...
hugoferreira/from-zero-to-computer
src/main/scala/eu/shiftforward/Elements/OptimizedElements.scala
Scala
mit
2,429
package odfi.server.manager.modules.run import org.odfi.wsb.fwapp.SiteApp import org.odfi.indesign.core.harvest.HarvestedResource class SiteAppClass[T <: SiteApp](cl: Class[T]) extends HarvestedResource { def getId = cl.getCanonicalName }
richnou/odfi-manager
server/src/main/scala/odfi/server/manager/modules/run/SiteAppClass.scala
Scala
lgpl-3.0
248
package fastparsers.tools /** * Created by Eric on 10.04.14. see http://stackoverflow.com/questions/5260298/how-can-i-obtain-the-default-value-for-a-type-in-scala http://missingfaktor.blogspot.ch/2011/08/emulating-cs-default-keyword-in-scala.html */ class Default[+A](val default: A) trait LowerPriorityImplicit...
begeric/FastParsers
FastParsers/src/main/scala/fastparsers/tools/DefaultValue.scala
Scala
mit
1,143
/* * 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...
liquidarmour/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600/v3/B935.scala
Scala
apache-2.0
1,219
package dao.organization import javax.inject.Inject import javax.inject.Singleton import dao.ColumnTypeMappings import dao.organization.table.{CourseTables, OrganizationTables} import dao.quiz.QuizDAO import dao.user.UserDAO import dao.user.table.UserTables import models._ import models.organization.{Course, Course2Q...
kristiankime/calc-tutor
app/dao/organization/CourseDAO.scala
Scala
mit
5,026
/* * 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 ...
nchammas/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CTESubstitution.scala
Scala
apache-2.0
11,247
package dotty.tools.scaladoc import scala.scalajs.js import scala.scalajs.js.annotation.JSGlobalScope @js.native @JSGlobalScope object CodeSnippetsGlobals extends js.Object { val scastie: Scastie = js.native val scastieConfiguration: String = js.native }
dotty-staging/dotty
scaladoc-js/common/src/code-snippets/CodeSnippetsGlobals.scala
Scala
apache-2.0
260
// code-examples/BasicOOP/scoping/private-type-wont-compile.scala // WON'T COMPILE package scopeA { class PrivateClass1(private[PrivateClass1] val privateField1: Int) { private[PrivateClass1] val privateField2 = 1 def equalFields(other: PrivateClass1) = (privateField1 == other.privateField1) && ...
XClouded/t4f-core
scala/src/tmp/BasicOOP/scoping/private-type-wont-compile.scala
Scala
apache-2.0
1,025
//https://www.hackerrank.com/challenges/valid-bst import java.io._; object Solution { class Node(v: Byte) { var value: Byte = v; var left: Node = null; var right: Node = null; } def main(args: Array[String]) { var T: Byte = readLine().toByte; f...
havelessbemore/hackerrank
functional_programming/functional_structures/valid-bst.scala
Scala
mit
1,803
/* * Copyright 2012-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
planet42/Laika
io/src/test/scala/laika/render/epub/HTMLNavRendererSpec.scala
Scala
apache-2.0
7,123
package ch4 import org.learningconcurrency._ /** * Future 它是一个容器类型,代表一个代码最终会返回的T类型结果。不过,代码可能会出错或执行超时, * 所以当Future完成时,它有可能完全没有被成功执行,这时它会代表一个异常 * Future 表示一个可能还没有实际完成的异步任务的结果, * 针对这个结果可以添加 Callback 以便在任务执行成功或失败后做出对应的操作 */ object FuturesComputation extends App { /** * Computation计算 * Futures 执行计算 * 1,首...
tophua/spark1.52
examples/src/main/scala/scalaDemo/threadConcurrency/ch4/Futures.scala
Scala
apache-2.0
16,735
/* * 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 ...
practice-vishnoi/dev-spark-1
core/src/main/scala/org/apache/spark/rdd/HadoopRDD.scala
Scala
apache-2.0
17,728
package org.apache.mesos.chronos.scheduler.state import org.apache.mesos.chronos.scheduler.jobs._ import org.specs2.mock._ import org.specs2.mutable._ class PersistenceStoreSpec extends SpecificationWithJUnit with Mockito { "MesosStatePersistenceStore" should { "Writing and reading ScheduledBasedJob a job wor...
vixns/chronos
src/test/scala/org/apache/mesos/chronos/scheduler/state/PersistenceStoreSpec.scala
Scala
apache-2.0
2,078
object Solution { def main(args: Array[String]) { val Array(n, m) = readLine.split(" ").map(_.toInt) val nums = (1 to n).map(_ => BigInt(readLine, 2)) val counts = for { i <- 0 until nums.size j <- i + 1 until nums.size } yield (nums(i) | nums(j)).bitCount val maxCount = counts.max ...
advancedxy/hackerrank
algorithms/warmup/ACMICPCTeam.scala
Scala
mit
424
import akka.actor.{ActorLogging, Actor} class CSVWriter extends Actor with ActorLogging { def receive = { case "read" => log.info(s"read line from queue and write it to file") // loop and read html files in src folder // Create HTMLfile model for each file, with attribute : html, text, etc ...
dgkris/XPathExtractor
XPathExtractor/src/main/scala/com/dgkris/xpathextractor/actors/CSVWriter.scala
Scala
mit
391
package is.hail.expr.ir import is.hail.TestUtils._ import is.hail.expr.ir.TestUtils.IRCall import is.hail.types.virtual.{TArray, TBoolean, TCall, TInt32} import is.hail.variant._ import is.hail.{ExecStrategy, HailSuite} import org.testng.annotations.{DataProvider, Test} class CallFunctionsSuite extends HailSuite { ...
hail-is/hail
hail/src/test/scala/is/hail/expr/ir/CallFunctionsSuite.scala
Scala
mit
4,149
package org.map import org.scalatest.{BeforeAndAfter, FunSuite, Matchers} class MapTests extends FunSuite with Matchers with BeforeAndAfter { var map: Map = Nil before { map = new Map } test("create a new empty map") { map.size shouldBe 0 map.isEmpty shouldBe true } ...
Alex-Diez/Scala-TDD-Katas
old-katas/map-kata/day-1/src/test/scala/org/map/MapTests.scala
Scala
mit
1,242
package org.bitcoins.core.p2p import org.bitcoins.crypto.DoubleSha256Digest import org.bitcoins.testkitcore.gen.p2p.DataMessageGenerator import org.bitcoins.testkitcore.util.BitcoinSUnitTest class GetDataMessageTest extends BitcoinSUnitTest { it must "have serialization symmetry" in { forAll(DataMessageGenerat...
bitcoin-s/bitcoin-s
core-test/src/test/scala/org/bitcoins/core/p2p/GetDataMessageTest.scala
Scala
mit
982
package org.apache.mesos.chronos.scheduler.config import java.net.InetSocketAddress import org.rogach.scallop.ScallopConf /** * Configuration values that may be parsed from a YAML file. * @author Florian Leibert (flo@leibert.de) */ trait SchedulerConfiguration extends ScallopConf { lazy val master = opt[Strin...
rickfast/chronos
src/main/scala/org/apache/mesos/chronos/scheduler/config/SchedulerConfiguration.scala
Scala
apache-2.0
6,706
package com.obecto.gattakka.genetics.operators import com.obecto.gattakka.IndividualDescriptor trait SelectionStrategy { def selectBest(from: Seq[IndividualDescriptor]): IndividualDescriptor def selectWorst(from: Seq[IndividualDescriptor]): IndividualDescriptor }
obecto/gattakka
src/main/scala/com/obecto/gattakka/genetics/operators/SelectionStrategy.scala
Scala
mit
270
/* NSC -- new Scala compiler * Copyright 2007-2013 LAMP/EPFL * @author Pedro Furlanetto */ package reflectdoc package tools package nsc package doc package html package page import doc.model._ class ReferenceIndex(letter: Char, index: doc.Index, universe: Universe) extends HtmlPage { def path = List("index-"+...
VladUreche/reflectdoc
components/core/src/reflectdoc/tools/nsc/doc/html/page/ReferenceIndex.scala
Scala
bsd-3-clause
1,580
package com.typesafe.slick.docs import scala.concurrent.ExecutionContext.Implicits.global import slick.jdbc.H2Profile.api._ import slick.jdbc.H2Profile object CodeGenerator extends App { val uri = "#slick.db.default" val profile = "slick.jdbc.H2Profile" val jdbcDriver = "org.h2.Driver" val url = "jdbc:postgre...
AtkinsChang/slick
slick/src/sphinx/code/CodeGenerator.scala
Scala
bsd-2-clause
2,531
package com.gu.pandomainauth import com.amazonaws.auth.{DefaultAWSCredentialsProviderChain, AWSCredentialsProvider} import com.amazonaws.regions.{Regions, Region} import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.duration._ import scala.language.postfixOps import akka.actor.{ActorRef, ...
m4tx/pan-domain-authentication
pan-domain-auth-core/src/main/scala/com/gu/pandomainauth/PanDomainAuth.scala
Scala
apache-2.0
2,861
package org.openurp.edu.eams.teach.grade.course.service import org.openurp.base.Semester import org.openurp.edu.base.Project import org.openurp.edu.eams.teach.grade.lesson.model.GradeInputSwitch trait GradeInputSwitchService { def getSwitch(project: Project, semester: Semester): GradeInputSwitch def getOpene...
openurp/edu-eams-webapp
grade/src/main/scala/org/openurp/edu/eams/teach/grade/course/service/GradeInputSwitchService.scala
Scala
gpl-3.0
367
package com.sfxcode.sapphire.core.demo.form.controller import com.sfxcode.sapphire.core.controller.ViewController import com.sfxcode.sapphire.core.value.{FXBeanAdapter, KeyBindings} import com.sfxcode.sapphire.core.demo.form.model.Person import com.sfxcode.sapphire.core.Includes._ class FormController extends ViewCo...
swhgoon/sapphire-demo
form/src/main/scala/com/sfxcode/sapphire/core/demo/form/controller/FormController.scala
Scala
apache-2.0
1,026
import scala.reflect.runtime.universe._ import scala.reflect.runtime.{currentMirror => cm} import scala.tools.reflect.{ToolBox, ToolBoxError} import scala.tools.reflect.Eval object Test extends App { object Extractor { def unapply(x: Int): Option[Int] = Some(x) } val extractor = reify { 2 match { case Extracto...
scala/scala
test/files/run/idempotency-extractors.scala
Scala
apache-2.0
734
/* * 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 ...
Zhangshunyu/incubator-carbondata
integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/filterexpr/CountStarTestCase.scala
Scala
apache-2.0
2,630
package edu.berkeley.velox.datamodel.api.operation import scala.concurrent.Future import edu.berkeley.velox.datamodel.ResultSet trait Operation { def execute() : Future[ResultSet] }
pbailis/fast-tpcc-repo
core/src/main/scala/edu/berkeley/velox/frontend/api/operation/Operation.scala
Scala
apache-2.0
186
package com.plasmaconduit.edge import io.netty.channel.nio.NioEventLoopGroup object EdgeEventLoop { val loop = new NioEventLoopGroup() }
plasmaconduit/edge
src/main/scala/com/plasmaconduit/edge/EdgeEventLoop.scala
Scala
mit
143
package com.todesking.platebuilder trait Distributions { import DSL.GeneratorSyntax def dirichlet[I <: String](param: Var[Type.Vec[I, Type.Real]]): Generator[Type.Vec[I, Type.Real]] = stochastic"Dirichlet($param)" def categorical[I <: String](param: Var[Type.Vec[I, Type.Real]]): Generator[Type.Category[I]]...
todesking/platebuilder
core/src/main/scala/Distributions.scala
Scala
mit
472
type op = PartialFunction[Char, (Int, Int) => Int] val operators:List[op] = List( {case '+' => (x ,y) => x+y}, {case '-' => (x,y) => /*start*/x-y/*end*/} ) //Int
ilinum/intellij-scala
testdata/typeInference/bugs5/SCL6091.scala
Scala
apache-2.0
162
package io.boontadata.spark.job1 import com.datastax.spark.connector.streaming._ import com.datastax.spark.connector.SomeColumns import kafka.serializer.StringDecoder import org.apache.spark.streaming._ import org.apache.spark.streaming.kafka._ import org.apache.spark.SparkConf class IotEvent( val messageId: String...
boontadata/boontadata-streams
code/spark/master/code/StreamingJob.scala
Scala
mit
3,626
/* * Copyright 2015 2lemetry, 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...
m2mIO/mqtt-loadtest
src/main/scala/io/m2m/mqtt/WebServer.scala
Scala
apache-2.0
1,873
/* * MIT License * * Copyright (c) 2018 Gonçalo Marques * * 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, ...
gonmarques/slick-repo
src/main/scala/com/byteslounge/slickrepo/annotation/postPersist.scala
Scala
mit
1,270
package com.blinkbox.books.slick import com.codahale.metrics.health.HealthCheck import com.codahale.metrics.health.HealthCheck.Result import scala.slick.jdbc.{GetResult, StaticQuery} import scala.util.control.NonFatal class DatabaseHealthCheck[DB <: DatabaseSupport](db: DB#Database) extends HealthCheck { override ...
blinkboxbooks/common-slick.scala
src/main/scala/com/blinkbox/books/slick/DatabaseHealthCheck.scala
Scala
mit
593
package aoc.day16 import io.IO object Part2 extends App { /* --- Part Two --- As you're about to send the thank you note, something in the MFCSAM's instructions catches your eye. Apparently, it has an outdated retroencabulator, and so the output from the machine isn't exact values - some of them indicate range...
GuillaumeDD/AdventOfCode2015
src/main/scala/aoc/day16/Part2.scala
Scala
gpl-3.0
1,743
package im.actor.push import akka.actor.{ ActorSystem, Props } import akka.event.Logging import akka.http.scaladsl._ import akka.http.scaladsl.server.Directives._ import akka.stream.ActorMaterializer import com.spingo.op_rabbit._ import im.actor.push.resource.{ MessageResource, SubscriptionResource } import org.flyway...
actorapp/actor-push
push-server/src/main/scala/im/actor/push/PushServer.scala
Scala
apache-2.0
1,836
package com.sksamuel.elastic4s import org.elasticsearch.search.highlight.HighlightBuilder /** @author Stephen Samuel */ trait HighlightDsl { implicit def string2highlightfield(name: String) = new HighlightDefinition(name) def highlight = new HighlightExpectsField class HighlightExpectsField { def field(na...
maxcom/elastic4s
src/main/scala/com/sksamuel/elastic4s/highlighting.scala
Scala
apache-2.0
2,903
object Test extends App { import scala.collection.generic.CanBuildFrom val cbf = implicitly[CanBuildFrom[Nothing, Nothing, Array[Nothing]]] println(cbf().result.getClass) println(new Array[Nothing](0).getClass) println(Array[Nothing]().getClass) }
felixmulder/scala
test/files/run/t5923b/Test.scala
Scala
bsd-3-clause
257
/** * 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"); yo...
ollie314/kafka
core/src/test/scala/integration/kafka/api/DelegationTokenEndToEndAuthorizationTest.scala
Scala
apache-2.0
4,242
/* * Copyright 2017 Kailuo Wang * * 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 ...
kailuowang/mainecoon
laws/src/main/scala/mainecoon/laws/ApplyKLaws.scala
Scala
apache-2.0
1,384
/** * Generated by apidoc - http://www.apidoc.me * Service version: 0.11.20 * apidoc:0.11.21 http://www.apidoc.me/bryzek/apidoc-common/0.11.20/play_2_x_json */ package com.bryzek.apidoc.common.v0.models { case class Audit( createdAt: _root_.org.joda.time.DateTime, createdBy: com.bryzek.apidoc.common.v0.m...
movio/movio-apidoc-generator
generated/app/BryzekApidocCommonV0Models.scala
Scala
mit
6,513
package is.hail.expr.ir.functions import is.hail.annotations.{Region, StagedRegionValueBuilder} import is.hail.asm4s._ import is.hail.expr.ir.{EmitMethodBuilder, _} import is.hail.{asm4s, types} import is.hail.types.physical._ import is.hail.types.physical.stypes.concrete.{SCanonicalLocusPointer, SCanonicalLocusPointe...
danking/hail
hail/src/main/scala/is/hail/expr/ir/functions/LocusFunctions.scala
Scala
mit
20,629
import scala.reflect.runtime.universe._ import scala.reflect.runtime.{currentMirror => cm} class Bean { @JavaAnnotationWithNestedEnum_1(JavaAnnotationWithNestedEnum_1.Value.VALUE) def value = 1 } object Test extends dotty.runtime.LegacyApp { println(cm.staticClass("Bean").isCaseClass) println(typeOf[Bean].dec...
folone/dotty
tests/pending/run/t6548/Test_2.scala
Scala
bsd-3-clause
356
/* * Copyright (c) 2021, salesforce.com, inc. * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ package com.krux.hyperion.resource import com.krux.hyperion.aws.{AdpEmrConfiguration, AdpR...
realstraw/hyperion
core/src/main/scala/com/krux/hyperion/resource/EmrConfiguration.scala
Scala
bsd-3-clause
1,902
package im.actor.server.persist import im.actor.server.model.Sex import slick.driver.PostgresDriver.api._ object SexColumnType { implicit val sexColumnType = MappedColumnType.base[Sex, Int](_.toInt, Sex.fromInt) }
ljshj/actor-platform
actor-server/actor-persist/src/main/scala/im/actor/server/persist/SexColumnType.scala
Scala
mit
222
/* Copyright (C) 2008-2014 University of Massachusetts Amherst. This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible) http://factorie.cs.umass.edu, http://github.com/factorie Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with...
patverga/factorie
src/main/scala/cc/factorie/app/nlp/Document.scala
Scala
apache-2.0
15,957
/* * 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 ...
pronix/spark
sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveQlSuite.scala
Scala
apache-2.0
8,209
/* * Copyright 2018 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/worldpay-downloader
test/unit/controllers/ConsoleControllerSpec.scala
Scala
apache-2.0
2,391
// P24 Lotto: Draw N different random numbers from the set 1..M. import util.Random // The obvious answer is P23.f1(n, (1 to m).toList) // Let's use "distinct" for a different solution def f1[T](n: Int, m: Int): List[Int] = Stream.continually(1 + Random.nextInt(m)).distinct.take(n).toList
pavelfatin/ninety-nine
scala/P24.scala
Scala
gpl-3.0
293
/* * Copyright 2016-2018 Michal Harish, michal.harish@gmail.com * * 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 u...
amient/affinity
examples/example-range-lookups/src/test/scala/io/amient/affinity/example/ExampleBank.scala
Scala
apache-2.0
3,978
package org.jetbrains.plugins.scala.worksheet.ui import java.util.regex.Pattern import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer import com.intellij.openapi.command.WriteCommandAction import com.intellij.openapi.editor.{Editor, LogicalPosition} import com.intellij.openapi.module.Module import com.intellij.op...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/worksheet/ui/WorksheetIncrementalEditorPrinter.scala
Scala
apache-2.0
17,518
package com.teambytes.awsleader.test.util import akka.actor.Props class SeqRefsFactor(props: List[Props]) { private var index = 0 def next(batchSize: Int):Props = { assert(batchSize == 10) next() } def next():Props = { val actorRef = props(index) index += 1 actorRef } }
grahamar/aws-leader-election
src/multi-jvm/scala/com/teambytes/awsleader/test/util/SeqRefsFactor.scala
Scala
apache-2.0
305
package com.olvind package mui object MuiTypeMapper extends TypeMapper { val typeT = Normal("T").generic("T") val typeTJs = Normal("T").genericJs("T") def apply(compName: CompName, fieldName: PropName, typeString: String): Type = { def is(s: String) = fieldName.value.toLowerCase contains s.toLowerCa...
chandu0101/scalajs-react-components
gen/src/main/scala/com/olvind/mui/MuiTypeMapper.scala
Scala
apache-2.0
7,723
package com.eevolution.context.dictionary.domain.model import ai.x.play.json.Jsonx import com.eevolution.context.dictionary.api.{ActiveEnabled, DomainModel, Identifiable, Traceable} import org.joda.time.DateTime /** * Copyright (C) 2003-2017, e-Evolution Consultants S.A. , http://www.e-evolution.com * This progra...
adempiere/ADReactiveSystem
dictionary-api/src/main/scala/com/eevolution/context/dictionary/domain/model/ProcessParameterTrl.scala
Scala
gpl-3.0
3,485
/** * 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...
haosdent/spark-hbase
src/test/scala/org/apache/hbase/spark/HBaseSuite.scala
Scala
apache-2.0
2,135
/* Copyright 2009-2018 EPFL, Lausanne */ package inox package solvers package theories import utils._ trait TheoryEncoder extends transformers.ProgramTransformer { self => val targetProgram: Program { val trees: sourceProgram.trees.type } lazy val trees: sourceProgram.trees.type = sourceProgram.trees } trait Si...
romac/inox
src/main/scala/inox/solvers/theories/TheoryEncoder.scala
Scala
apache-2.0
939
/* * Copyright 2013 Maurício Linhares * * Maurício Linhares licenses this file to you 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 ...
dripower/postgresql-async
db-async-common/src/main/scala/com/github/mauricio/async/db/general/ArrayRowData.scala
Scala
apache-2.0
1,377
package com.peterpotts.logging trait SLF4JLevelLogger { val logger: org.slf4j.Logger def enabled: Boolean def log(message: String) def log(message: String, error: Throwable) } trait SLF4JTraceLogger extends SLF4JLevelLogger { def enabled = logger.isTraceEnabled def log(message: String) = logger.trace(...
peterpotts/logging
src/main/scala/com/peterpotts/logging/SLF4JLevelLogger.scala
Scala
mit
1,280
/* * 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 ...
maropu/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/UnsafeRowUtils.scala
Scala
apache-2.0
3,844
package com.github.jt.api.swagger import org.scalatra.ScalatraServlet import org.scalatra.swagger.{Swagger, ApiInfo, JacksonSwaggerBase} /** * Setup Swagger */ class SwaggerServlet extends ScalatraServlet with JacksonSwaggerBase { implicit val swagger = SwaggerSetup.swagger } object SwaggerSetup { private val ...
joeytsai/scalatra-starter
src/main/scala/com/github/jt/api/swagger/SwaggerServlet.scala
Scala
apache-2.0
603
package funsets /** * 2. Purely Functional Sets. */ object FunSets { /** * We represent a set by its characteristic function, i.e. * its `contains` predicate. */ type Set = Int => Boolean /** * Indicates whether a set contains a given element. */ def contains(s: Set, elem: Int): Boolean = s(...
matticala/functional-programming-principles-in-scala
week2-funsets/src/main/scala/funsets/FunSets.scala
Scala
apache-2.0
1,993
package filodb.kafka import scala.concurrent.Await import scala.concurrent.duration._ import com.typesafe.config.ConfigFactory import monix.execution.Scheduler import filodb.coordinator.{FilodbSettings, IngestionStreamFactory, StoreFactory} import filodb.core.memstore.SomeData import filodb.core.store.IngestionConfi...
tuplejump/FiloDB
kafka/src/main/scala/filodb/kafka/TestConsumer.scala
Scala
apache-2.0
3,419
/* * 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/test/scala/uk/gov/hmrc/ct/computations/CP666Spec.scala
Scala
apache-2.0
1,371
package core.raytracing import core.main._, core.pieces._, core.shapes.dim0._, core.shapes.dim1._, core.shapes.dim2._, core.shapes.forces._, core.forces._ import wrapper._ object TraceNil extends Trace { val head = null val tail = this def render(s: Surface) {} }
radiotech/FlatLand
src/core/raytracing/TraceNil.scala
Scala
mit
271
/* * Copyright 2013-2015 James Shade * * 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...
jamesshade/time
src/test/scala/org/shade/time/TimePackageSpec.scala
Scala
apache-2.0
1,025
package org.jetbrains.plugins.scala.failed.typeInference import org.jetbrains.plugins.scala.PerfCycleTests import org.jetbrains.plugins.scala.base.libraryLoaders.{ScalaZCoreLoader, Specs2Loader, ThirdPartyLibraryLoader} import org.jetbrains.plugins.scala.lang.typeInference.TypeInferenceTestBase import org.junit.experi...
loskutov/intellij-scala
test/org/jetbrains/plugins/scala/failed/typeInference/Specs2ToScalaCheckImplicitTest.scala
Scala
apache-2.0
1,117
package de.tu_berlin.impro3.flink.spatio_temporal_dynamics.io import de.tu_berlin.impro3.flink.spatio_temporal_dynamics._ import model.Tweet import parsers.JaxParser import org.apache.flink.api.common.io.DelimitedInputFormat import annotation.tailrec class JaxInputFormat extends DelimitedInputFormat[Tweet] { val ...
joroKr21/spatio-temporal-dynamics
impro3-ws14-flink/src/main/scala/de/tu_berlin/impro3/flink/spatio_temporal_dynamics/io/JaxInputFormat.scala
Scala
apache-2.0
683
/* * Copyright 2015 ligaDATA * * 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 ...
traytonwhite/Kamanja
trunk/Pmml/PmmlCompiler/src/main/scala/com/ligadata/pmml/transforms/xmltoraw/common/PmmlNodeGeneratorDispatcher.scala
Scala
apache-2.0
4,684
/* * 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 ...
guoxiaolongzte/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/jsonExpressions.scala
Scala
apache-2.0
27,737
package com.rackspace.prefs.model import scala.slick.driver.JdbcDriver.simple._ object DBTables { class ResourceTypes(tag: Tag) extends Table[(String, String, String)](tag, "RESOURCE_TYPES") { def slug = column[String]("SLUG", O.PrimaryKey) def name = column[String]("NAME") def identifier = column[St...
ChandraAddala/preferences-service
src/main/scala/com/rackspace/prefs/model/DBTables.scala
Scala
apache-2.0
1,502
package com.gx.factorykit /** * Copyright 2017 josephguan * * 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...
josephguan/scala-design-patterns
creational/factory-kit/src/main/scala/com/gx/factorykit/Weapon.scala
Scala
apache-2.0
863
/* * 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 ...
indhub/mxnet
scala-package/core/src/test/scala/org/apache/mxnet/OperatorSuite.scala
Scala
apache-2.0
38,523
package bhoot import javax.servlet.http._ import Utils._ import UtilsServlet._ object Admin { val errorStr = "{success:false}" def postPurge (request:Request, response:HttpServletResponse):String = { val keyIn = request.getParamOpt("key").getOrElse("") println(keyIn) if (keyIn == "pluckAll") { ...
hrj/tdash
framework/src/main/scala/admin.scala
Scala
gpl-3.0
2,184
package filodb.standalone import scala.collection.JavaConverters._ import scala.concurrent.duration._ import akka.actor.ActorRef import akka.remote.testkit.{MultiNodeConfig, MultiNodeSpec} import akka.testkit.ImplicitSender import com.softwaremill.sttp._ import com.softwaremill.sttp.akkahttp.AkkaHttpBackend import com...
tuplejump/FiloDB
standalone/src/multi-jvm/scala/filodb/standalone/StandaloneMultiJvmSpec.scala
Scala
apache-2.0
10,268
package aws.daleks.eager import com.amazonaws.auth.AWSCredentialsProvider import com.amazonaws.regions.Region import scala.collection.JavaConverters._ import com.amazonaws.services.sqs.AmazonSQSClient import com.amazonaws.services.sqs.model.DeleteQueueRequest import aws.daleks.util.Humid class EagerSQSDalek(implicit ...
ggallego/aws-daleks
src/main/scala/aws/daleks/eager/EagerSQSDalek.scala
Scala
apache-2.0
702
package org.niohiki.quark.util import java.awt.Graphics2D import java.awt.geom.AffineTransform import org.niohiki.quark.core.BBox import org.niohiki.quark.core.Collidable import org.niohiki.quark.core.Environment import org.niohiki.quark.core.Renderable import org.niohiki.quark.core.Spatial class Image(im...
niohiki/quark
quark-src/org/niohiki/quark/util/Image.scala
Scala
gpl-3.0
1,186
package knot.core.emitters import knot.core._ import knot.core.cell.Cell import knot.core.dispatch.Dispatcher trait CellContext { def isStarted: Boolean def stop(): Unit def error(cause: Throwable): Unit def sender: EmitterAdapter def become(behavior: Cell.Behavior): Unit def unbecome(): Unit imp...
defvar/knot
knot-core/src/main/scala/knot/core/emitters/CellContext.scala
Scala
mit
629
/* * 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 ...
hengyicai/OnlineAggregationUCAS
sql/core/src/main/scala/org/apache/spark/sql/jdbc/jdbc.scala
Scala
apache-2.0
7,698
/** * Copyright 2015 Otto (GmbH & Co KG) * * 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...
christianrichter/schedoscope
schedoscope-core/src/main/scala/org/schedoscope/scheduler/messages/Messages.scala
Scala
apache-2.0
12,630
// // MessagePack for Java // // 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...
xuwei-k/msgpack-java
msgpack-core/src/test/scala/org/msgpack/core/MessageUnpackerTest.scala
Scala
apache-2.0
27,833
import collection._ object Test extends App { def compare(s1: String, s2: String) { assert(s1 == s2, s1 + "\\nvs.\\n" + s2) } compare(List(1, 2, 3, 4).aggregate(new java.lang.StringBuffer)(_ append _, _ append _).toString, "1234") compare(List(1, 2, 3, 4).par.aggregate(new java.lang.StringBuffer)(_...
felixmulder/scala
test/files/run/t6467.scala
Scala
bsd-3-clause
619