repo_name
stringlengths
6
97
path
stringlengths
3
341
text
stringlengths
8
1.02M
tommay/spudoku-android
scala/external/src/main/scala/net/tommay/sudoku/TrickySet.scala
package net.tommay.sudoku case class TrickySet ( name: String, common: Stream[Int], // XXX Set? rest: Stream[Int], // XXX Set? eliminate: Stream[Int], checkNeeded: Stream[Set[Int]]) // True to check an "inverted" TrickySet, where we scan the coincident // rows and columns for needed digits rather than c...
tommay/spudoku-android
scala/external/src/main/scala/net/tommay/sudoku/Solver.scala
<reponame>tommay/spudoku-android package net.tommay.sudoku import scala.util.Random case class Solver ( options: SolverOptions, rnd: Option[Random], puzzle: Puzzle, unknowns: Stream[Unknown], // steps is consed in reverse order. It is reversed when // constructing a Solution. steps: List[Step], heuri...
tommay/spudoku-android
scala/external/src/main/scala/net/tommay/sudoku/Util.scala
<filename>scala/external/src/main/scala/net/tommay/sudoku/Util.scala package net.tommay.sudoku import scala.util.Random object Util { // Slice an list up into sub-lists of n elements, and return the // sub-lists in a list. def slices[T](n: Int, list: Iterable[T]) : List[Iterable[T]] = { list.grouped(n).toL...
tommay/spudoku-android
scala/external/src/main/scala/net/tommay/sudoku/Solution.scala
package net.tommay.sudoku case class Solution( puzzle: Puzzle, steps: Iterable[Step])
tommay/spudoku-android
scala/external/src/main/scala/net/tommay/sudoku/EasyPeasy.scala
package net.tommay.sudoku // Each Stripe has three ExclusionSet rows or columns. It has a Set // of all column numbers in the Stripe, and a Stream of the three // ExclusionSets. To find an EasyPeasy, count the occurences of each // digit in the entire Stripe. For each digit with two occurences, // check for an Excl...
tommay/spudoku-android
scala/external/src/main/scala/net/tommay/sudoku/HinterForJava.scala
package net.tommay.sudoku // Provide a "getHint" function intended to be called from Java // that does all the heavy lifting like Random creation and dredging // information out of the Solution in Scala. object HinterForJava { def getHint(randomSeed: Int, puzzleString: String) : Option[Hint] = { // Heuristics a...
tommay/spudoku-android
scala/external/src/main/scala/net/tommay/sudoku/Heuristic.scala
<filename>scala/external/src/main/scala/net/tommay/sudoku/Heuristic.scala package net.tommay.sudoku // XXX grok Enumeration. object Heuristic extends Enumeration { val EasyPeasy, MissingOne, MissingTwo, Needed, Forced, Tricky, // These are not heuristics, they're just used to type Next a...
tommay/spudoku-android
scala/external/src/main/scala/net/tommay/sudoku/Puzzle.scala
package net.tommay.sudoku // cellNumber -> Digit // XXX this should be private, all construction via Puzzle.methods. // All a Puzzle has is a Map from cellNumbers to the Digit placed at // that cellNumber. case class Puzzle( placed : Map[Int, Int] = Map.empty) { type Digit = Int // For when we need to iterat...
tommay/spudoku-android
scala/external/src/main/scala/net/tommay/sudoku/Step.scala
package net.tommay.sudoku case class Step( puzzle: Puzzle, tjpe: Heuristic.Value, placementOption: Option[Placement] = None, cells: Iterable[Int] = List.empty)
tommay/spudoku-android
scala/external/src/main/scala/net/tommay/sudoku/Next.scala
package net.tommay.sudoku case class Next( tjpe: Heuristic.Value, placement: Placement, cells: Iterable[Int])
tommay/spudoku-android
scala/external/src/main/scala/net/tommay/sudoku/SolverOptions.scala
<reponame>tommay/spudoku-android<gh_stars>0 package net.tommay.sudoku // EasyPeasy: An easy pattern to spot visually. where two rows or columns // in a 3-stripe contain a digit and there is only one place in the // remaining column where it can go. This is a subset of Needed, but is // easy to spot. // MissingO...
keyno63/scalikejdbc
scalikejdbc-core/src/main/scala/scalikejdbc/OneToOneSQL.scala
<reponame>keyno63/scalikejdbc<gh_stars>0 package scalikejdbc import scala.collection.mutable.LinkedHashMap import scala.collection.compat._ private[scalikejdbc] trait OneToOneExtractor[A, B, E <: WithExtractor, Z] extends SQL[Z, E] with RelationalSQLResultSetOperations[Z] { private[scalikejdbc] def extractOne:...
keyno63/scalikejdbc
scalikejdbc-streams/src/main/scala/scalikejdbc/streams/DatabaseSubscription.scala
package scalikejdbc.streams import java.util.concurrent.atomic.{ AtomicBoolean, AtomicLong } import org.reactivestreams.{ Subscriber, Subscription } import scalikejdbc._ import scala.concurrent.Promise import scala.util.{ Failure, Success } import scala.util.control.NonFatal /** * A DatabaseSubscription represents...
keyno63/scalikejdbc
scalikejdbc-core/src/main/scala/scalikejdbc/OneToManies2SQL.scala
package scalikejdbc import scala.collection.mutable.LinkedHashMap import scala.collection.compat._ private[scalikejdbc] trait OneToManies2Extractor[ A, B1, B2, E <: WithExtractor, Z ] extends SQL[Z, E] with RelationalSQLResultSetOperations[Z] { private[scalikejdbc] def extractOne: WrappedResultSet => A...
keyno63/scalikejdbc
scalikejdbc-syntax-support-macro/src/main/scala-3/scalikejdbc/autoConstruct.scala
package scalikejdbc import scala.quoted._ import java.sql.ResultSet import language.`3.0` object autoConstruct { def applyResultName_impl[A]( rs: Expr[WrappedResultSet], rn: Expr[ResultName[A]], excludes: Expr[Seq[String]] )(using quotes: Quotes)(using t: Type[A]): Expr[A] = { import quotes.reflec...
keyno63/scalikejdbc
scalikejdbc-interpolation/src/main/scala-3/scalikejdbc/SelectDynamicMacro.scala
package scalikejdbc import scalikejdbc.interpolation.SQLSyntax import scala.quoted.* trait SelectDynamicMacro[A] { self: SQLSyntaxSupportFeature#SQLSyntaxProvider[A] => inline def selectDynamic(inline name: String): SQLSyntax = select[A](self, name) inline def select[E]( ref: SQLSyntaxSupportFeature#SQ...
keyno63/scalikejdbc
project/GenerateOneToManies.scala
<reponame>keyno63/scalikejdbc object GenerateOneToManies { def apply(n: Int): String = { val A = "A" val B = "B" val tparams = (1 to n).map(B + _) val bs = tparams.mkString(", ") val seq = tparams.map("scala.collection.Seq[" + _ + "]").mkString(", ") val extractTo = "extractTo" val extrac...
kipsigman/async-web-service-clients
build.sbt
import Dependencies._ name := "async-web-service-clients" lazy val commonSettings = Seq( scalaVersion := "2.11.8", organization := "kipsigman", licenses += ("Apache-2.0", url("https://github.com/kipsigman/async-web-service-clients/blob/master/LICENSE")), homepage := Some(url("https://github.com/kipsigman/asyn...
kipsigman/async-web-service-clients
web-service-client/src/main/scala/kipsigman/ws/client/RestWebServiceClient.scala
package kipsigman.ws.client import scala.concurrent.ExecutionContext import scala.concurrent.Future import org.slf4j.LoggerFactory import com.ning.http.client.Response import dispatch._ import play.api.http._ import play.api.libs.json._ /** * Base trait for an asyncronous Scala RESTful web service client. * Cont...
kipsigman/async-web-service-clients
google-api-clients/src/main/scala/kipsigman/ws/google/youtube/YouTubeVideo.scala
package kipsigman.ws.google.youtube import java.util.Date import java.util.TimeZone import java.text.SimpleDateFormat import play.api.libs.functional.syntax._ import play.api.libs.json._ import play.api.libs.json.Reads._ case class YouTubeVideo( id: String, publishedAt: Date, title: String, descriptio...
kipsigman/async-web-service-clients
salesforce-api-client/src/test/scala/kipsigman/ws/salesforce/ContractSpec.scala
<gh_stars>1-10 package kipsigman.ws.salesforce import org.scalatest.Matchers import org.scalatest.WordSpec import play.api.libs.json._ class ContractSpec extends WordSpec with Matchers with SampleData { "selectFields" should { "return the correct representations" in { Contract.selectFields shouldBe Seq(...
kipsigman/async-web-service-clients
salesforce-api-client/src/test/scala/kipsigman/ws/salesforce/OpportunityContactRoleSpec.scala
package kipsigman.ws.salesforce import OpportunityContactRole.Role; import org.scalatest.Matchers import org.scalatest.WordSpec import play.api.libs.json._ class OpportunityContactRoleSpec extends WordSpec with Matchers with SampleData { "JSON deserialization" should { "read valid JSON" in { sampleOpp...
kipsigman/async-web-service-clients
salesforce-api-client/src/test/scala/kipsigman/ws/salesforce/SampleData.scala
package kipsigman.ws.salesforce import scala.io.Source import play.api.libs.json._ trait SampleData { protected val sampleAccountJson = Json.parse(Source.fromURL(getClass.getResource("/account.json")).getLines().mkString) protected val sampleAccount: Account = { sampleAccountJson.as[Account] } protecte...
kipsigman/async-web-service-clients
salesforce-api-client/src/it/scala/kipsigman/ws/salesforce/SalesforceApiClientReadsIntegrationSpec.scala
<gh_stars>1-10 package kipsigman.ws.salesforce import java.time._ import org.scalatest.time._ import org.scalatest.WordSpec import OpportunityContactRole.Role import Product._ class SalesforceApiClientReadsIntegrationSpec extends SalesforceApiClientIntegrationSpec { // "bad accessInfo" should { // "return ...
kipsigman/async-web-service-clients
google-api-clients/src/main/scala/kipsigman/ws/google/GoogleApiClient.scala
package kipsigman.ws.google import scala.concurrent.ExecutionContext import scala.concurrent.Future import com.typesafe.config.Config import dispatch.Req import dispatch.url import play.api.http.HttpVerbs import play.api.libs.json._ import play.api.libs.json.Reads._ import play.api.libs.functional.syntax._ import ...
kipsigman/async-web-service-clients
google-api-clients/src/main/scala/kipsigman/ws/google/analytics/AnalyticsApiClient.scala
<filename>google-api-clients/src/main/scala/kipsigman/ws/google/analytics/AnalyticsApiClient.scala package kipsigman.ws.google.analytics import java.io.File import java.time.LocalDate import java.time.format.DateTimeFormatter import javax.inject.Inject import javax.inject.Singleton import scala.collection.JavaConvers...
kipsigman/async-web-service-clients
salesforce-api-client/src/test/scala/kipsigman/ws/salesforce/OpportunitySpec.scala
<gh_stars>1-10 package kipsigman.ws.salesforce import java.time._ import java.time.format.DateTimeFormatter import java.util.Calendar import OpportunityContactRole.Role import Product._ import org.scalatest.Matchers import org.scalatest.WordSpec import play.api.libs.json._ class OpportunitySpec extends WordSpec wi...
kipsigman/async-web-service-clients
salesforce-api-client/src/test/scala/kipsigman/ws/salesforce/ProductSpec.scala
<reponame>kipsigman/async-web-service-clients<gh_stars>1-10 package kipsigman.ws.salesforce import org.scalatest.Matchers import org.scalatest.WordSpec import play.api.libs.json._ import OpportunityContactRole.Role import Product._ class ProductSpec extends WordSpec with Matchers with SampleData { "JSON deseriali...
kipsigman/async-web-service-clients
google-api-clients/src/main/scala/kipsigman/ws/google/youtube/YouTubeApiClient.scala
package kipsigman.ws.google.youtube import javax.inject.Inject import javax.inject.Singleton import scala.concurrent.ExecutionContext import scala.concurrent.Future import com.typesafe.config.Config import kipsigman.ws.google.GoogleApiClient import kipsigman.ws.google.Page /** * Google YouTube API client. * Docu...
kipsigman/async-web-service-clients
google-api-clients/src/test/scala/kipsigman/ws/google/youtube/YouTubeVideoSpec.scala
package kipsigman.ws.google.youtube import java.util.Date import org.scalatest.Matchers import org.scalatest.WordSpec class YouTubeVideoSpec extends WordSpec with Matchers { val video = YouTubeVideo( "27IaHM1u6bg", new Date(), "Introduction to Case Classes", "A walkthrough on how to use Scala Case ...
kipsigman/async-web-service-clients
salesforce-api-client/src/it/scala/kipsigman/ws/salesforce/SalesforceApiClientIntegrationSpec.scala
package kipsigman.ws.salesforce import scala.concurrent._ import scala.concurrent.duration._ import scala.concurrent.ExecutionContext import com.typesafe.config._ import org.scalatest.concurrent.ScalaFutures import org.scalatest.Matchers import org.scalatest.time._ import org.scalatest.WordSpec import org.slf4j.Log...
kipsigman/async-web-service-clients
salesforce-api-client/src/main/scala/kipsigman/ws/salesforce/SalesforceService.scala
<filename>salesforce-api-client/src/main/scala/kipsigman/ws/salesforce/SalesforceService.scala package kipsigman.ws.salesforce import java.time.LocalDate import scala.concurrent.Future import OpportunityContactRole.Role /** * Interface for Salesforce access. */ trait SalesforceService { def findAccountById(id:...
kipsigman/async-web-service-clients
salesforce-api-client/src/main/scala/kipsigman/ws/salesforce/SalesforceApiClient.scala
<reponame>kipsigman/async-web-service-clients package kipsigman.ws.salesforce import java.time._ import java.time.format.DateTimeFormatter import java.util.concurrent.ExecutionException import javax.inject.{ Inject, Singleton } import scala.concurrent.ExecutionContext import scala.concurrent.Future import org.slf4j...
kipsigman/async-web-service-clients
google-api-clients/src/it/scala/kipsigman/ws/google/youtube/YouTubeApiClientIntegrationSpec.scala
<filename>google-api-clients/src/it/scala/kipsigman/ws/google/youtube/YouTubeApiClientIntegrationSpec.scala package kipsigman.ws.google.youtube import org.scalatest.Finders import org.scalatest.Matchers import org.scalatest.WordSpec import org.scalatest.concurrent.ScalaFutures import org.scalatest.time.Millis import o...
kipsigman/async-web-service-clients
google-api-clients/src/test/scala/kipsigman/ws/google/analytics/AnalyticsApiClientSpec.scala
package kipsigman.ws.google.analytics import java.time.LocalDate import org.scalatest.Matchers import org.scalatest.WordSpec class AnalyticsApiClientSpec extends WordSpec with Matchers { "Date.fromLocalDate" should { "format a LocalDate using ISO" in { val localDate = LocalDate.of(2016, 1, 28) Dat...
kipsigman/async-web-service-clients
salesforce-api-client/src/main/scala/kipsigman/ws/salesforce/actor/SalesforceActorService.scala
<reponame>kipsigman/async-web-service-clients package kipsigman.ws.salesforce.actor import java.time.LocalDate import javax.inject.{ Inject, Singleton } import scala.concurrent.ExecutionContext import scala.concurrent.Future import scala.concurrent.duration.DurationInt import akka.actor.ActorSystem import akka.patte...
kipsigman/async-web-service-clients
salesforce-api-client/src/test/scala/kipsigman/ws/salesforce/SalesforceConfigSpec.scala
package kipsigman.ws.salesforce import org.scalatest.Matchers import org.scalatest.WordSpec import com.typesafe.config._ class SalesforceConfigSpec extends WordSpec with Matchers with SampleData { val config = ConfigFactory.load() val sfc = new SalesforceConfig(config) "properties" should { "match app/li...
kipsigman/async-web-service-clients
salesforce-api-client/src/test/scala/kipsigman/ws/salesforce/OpportunityLineItemSpec.scala
<filename>salesforce-api-client/src/test/scala/kipsigman/ws/salesforce/OpportunityLineItemSpec.scala package kipsigman.ws.salesforce import org.scalatest.Matchers import org.scalatest.WordSpec import play.api.libs.json._ import Product._ class OpportunityLineItemSpec extends WordSpec with Matchers with SampleData { ...
kipsigman/async-web-service-clients
salesforce-api-client/src/main/scala/kipsigman/ws/salesforce/Models.scala
<reponame>kipsigman/async-web-service-clients package kipsigman.ws.salesforce import java.time._ import java.util.Date import play.api.data.validation.ValidationError import play.api.libs.functional.syntax._ import play.api.libs.json._ import play.api.libs.json.Reads._ trait SalesforceEntity { def id: Option[Stri...
kipsigman/async-web-service-clients
salesforce-api-client/src/test/scala/kipsigman/ws/salesforce/ContactSpec.scala
package kipsigman.ws.salesforce import org.scalatest.Matchers import org.scalatest.WordSpec import play.api.libs.json._ class ContactSpec extends WordSpec with Matchers with SampleData { "selectFields" should { "return the correct representations" in { Contact.selectFields shouldBe Seq("Id", "Account.Id...
kipsigman/async-web-service-clients
salesforce-api-client/src/test/scala/kipsigman/ws/salesforce/AccountSpec.scala
<reponame>kipsigman/async-web-service-clients<gh_stars>1-10 package kipsigman.ws.salesforce import org.scalatest.Matchers import org.scalatest.WordSpec import play.api.libs.json._ class AccountSpec extends WordSpec with Matchers with SampleData { "JSON deserialization" should { "read valid JSON" in { sa...
kipsigman/async-web-service-clients
salesforce-api-client/src/main/scala/kipsigman/ws/salesforce/actor/SalesforceActor.scala
<reponame>kipsigman/async-web-service-clients package kipsigman.ws.salesforce.actor import scala.concurrent._ import scala.concurrent.duration._ import scala.language.existentials import akka.pattern.{ ask, pipe } import akka.actor._ import com.typesafe.config.Config import kipsigman.ws.salesforce._ private[actor] o...
kipsigman/async-web-service-clients
salesforce-api-client/src/it/scala/kipsigman/ws/salesforce/SalesforceApiClientWritesIntegrationSpec.scala
package kipsigman.ws.salesforce import org.scalatest.time._ import org.scalatest.WordSpec import OpportunityContactRole.Role class SalesforceApiClientWritesIntegrationSpec extends SalesforceApiClientIntegrationSpec { private def cleanupData = { client.saveObjectStringField[Account](sampleAccount.id.get, "Type...
kipsigman/async-web-service-clients
web-service-client/src/test/scala/kipsigman/ws/client/RestWebServiceClientSpec.scala
<gh_stars>1-10 package kipsigman.ws.client import scala.concurrent.ExecutionContext import dispatch._ import org.mockito.Mockito.when import org.scalatest.Matchers import org.scalatest.WordSpec import org.scalatest.mock.MockitoSugar import org.slf4j.LoggerFactory import play.api.http._ import play.api.libs.json._ ...
kipsigman/async-web-service-clients
project/Dependencies.scala
import sbt._ object Dependencies { lazy val playVersion = "2.5.3" lazy val akkaVersion = "2.4.4" lazy val akka = Seq( "com.typesafe.akka" %% "akka-actor" % akkaVersion ) lazy val di = Seq( "javax.inject" % "javax.inject" % "1", "com.google.inject" % "guice" % "4.0" ) lazy val play = Seq...
hmrc/currency-conversion
test/uk/gov/hmrc/currencyconversion/connectors/HODConnectorSpec.scala
<filename>test/uk/gov/hmrc/currencyconversion/connectors/HODConnectorSpec.scala /* * 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://...
hmrc/currency-conversion
app/uk/gov/hmrc/currencyconversion/models/ExchangeRateObject.scala
/* * 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/currency-conversion
test/uk/gov/hmrc/currencyconversion/controllers/ExchangeRateControllerSpec.scala
/* * 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/currency-conversion
app/uk/gov/hmrc/currencyconversion/repositories/ConversionRatePeriodJson.scala
/* * 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/currency-conversion
app/uk/gov/hmrc/currencyconversion/services/ExchangeRateService.scala
/* * 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/currency-conversion
app/uk/gov/hmrc/currencyconversion/connectors/HttpDate.scala
/* * 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/currency-conversion
build.sbt
import TestPhases.oneForkedJvmPerTest import scoverage.ScoverageKeys import uk.gov.hmrc.DefaultBuildSettings.addTestReportOption import uk.gov.hmrc.sbtdistributables.SbtDistributablesPlugin.publishingSettings import scala.util.matching.Regex val appName = "currency-conversion" lazy val microservice = Project(appName...
hmrc/currency-conversion
app/uk/gov/hmrc/currencyconversion/config/DesCircuitBreakerProvider.scala
<gh_stars>0 /* * 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 applica...
hmrc/currency-conversion
app/uk/gov/hmrc/currencyconversion/connectors/HODConnector.scala
/* * 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/currency-conversion
test/uk/gov/hmrc/currencyconversion/workers/XrsExchangeRateRequestWorkerSpec.scala
<gh_stars>0 /* * 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 applica...
hmrc/currency-conversion
app/uk/gov/hmrc/currencyconversion/workers/XrsExchangeRateRequestWorker.scala
<reponame>hmrc/currency-conversion<gh_stars>0 /* * 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....
hmrc/currency-conversion
app/uk/gov/hmrc/currencyconversion/models/ExchangeRate.scala
<filename>app/uk/gov/hmrc/currencyconversion/models/ExchangeRate.scala /* * 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.apach...
hmrc/currency-conversion
project/AppDependencies.scala
<gh_stars>0 import play.core.PlayVersion import play.sbt.PlayImport._ import sbt.Keys.libraryDependencies import sbt._ object AppDependencies { val compile = Seq( ws, "uk.gov.hmrc" %% "bootstrap-backend-play-28" % "5.11.0", "uk.gov.hmrc.mongo" %% "hmrc-mongo-play-28" % "0.52.0", "org....
hmrc/currency-conversion
app/uk/gov/hmrc/currencyconversion/repositories/ExchangeRateRepository.scala
<reponame>hmrc/currency-conversion<gh_stars>0 /* * 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....
lorandszakacs/pbkdf2-scala
src/test/scala/io/github/nremond/legacy/LegacySecureHashSpec.scala
<gh_stars>0 /** * Copyright 2013 <NAME> * * 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...
lorandszakacs/pbkdf2-scala
src/test/scala/io/github/nremond/SecureHashSpecification.scala
<reponame>lorandszakacs/pbkdf2-scala package io.github.nremond import io.github.nremond.SecureHash._ import org.scalacheck.Prop.{ BooleanOperators, forAll } import org.scalacheck.{ Gen, Properties } object SecureHashSpecification extends Properties("SecureHash") { val iterationsGen = Gen.chooseNum(10000, 30000) ...
lorandszakacs/pbkdf2-scala
src/test/scala/io/github/nremond/SecureHashSpec.scala
<reponame>lorandszakacs/pbkdf2-scala /** * Copyright 2012-2014 <NAME> (@nremond) * * 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...
lorandszakacs/pbkdf2-scala
src/test/scala/io/github/nremond/PBKDF2Spec.scala
/** * Copyright 2013 <NAME> * * 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...
lorandszakacs/pbkdf2-scala
src/main/scala/io/github/nremond/SecureHash.scala
<gh_stars>0 /** * Copyright 2012-2014 <NAME> (@nremond) * * 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 applicab...
lorandszakacs/pbkdf2-scala
src/main/scala/io/github/nremond/legacy/SecureHash.scala
<reponame>lorandszakacs/pbkdf2-scala<gh_stars>0 /** * Copyright 2012-2014 <NAME> (@nremond) * * 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/...
lorandszakacs/pbkdf2-scala
src/main/scala/io/github/nremond/package.scala
<gh_stars>0 package io.github package object nremond { def toHex(buff: Array[Byte]): String = { val bi = new java.math.BigInteger(1, buff) val hex = bi.toString(16) val paddingLength = (buff.length * 2) - hex.size if (paddingLength > 0) ("0" * paddingLength) + hex else hex } def...
lorandszakacs/pbkdf2-scala
project/plugins.sbt
<filename>project/plugins.sbt resolvers += Classpaths.sbtPluginReleases addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.2.2") addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.1") addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.4") addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.11") addSbtPlugin("org...
sadhen/cmark-scala
build.sbt
enablePlugins(ScalaNativePlugin) name := "cmark-scala" version := "0.1.0-SNAPSHOT" organization := "tech.sparse" scalaVersion := "2.11.12"
sadhen/cmark-scala
src/main/scala/cmark/cmark.scala
package cmark import scala.scalanative.native._ @link("cmark") @extern object cmark { /** Convert 'text' (assumed to be a UTF-8 encoded string with length * 'len') from CommonMark Markdown to HTML, returning a null-terminated, * UTF-8-encoded string. It is the caller's responsibility * to free the retur...
sadhen/cmark-scala
src/main/scala/cmark/Node.scala
package cmark import scala.scalanative.native._ /** * ## Node */ @link("cmark") @extern object Node { /** Creates a new node of type 'type'. Note that the node may have * other required properties, which it is the caller's responsibility * to assign. */ @name("cmark_node_new") def create(nodeTy...
sadhen/cmark-scala
src/main/scala/cmark/Parser.scala
package cmark import scala.scalanative.native._ import scala.scalanative.native.stdio.FILE /** * ## Parsing * * Simple interface: * * val document = Parser.parseDocument(c"Hello *world*", 13, Options.Default) * * Streaming interface: * * val parser = Parser.create(Options.Default) * Parser.f...
krutipandya/hello-world
src/main/scala/hello/HelloConfig.scala
<filename>src/main/scala/hello/HelloConfig.scala package hello import org.springframework.context.annotation.{Configuration, ComponentScan} import org.springframework.boot.autoconfigure.EnableAutoConfiguration import org.springframework.boot; import org.springframework.web.bind.annotation.RequestMapping; import org.s...
bopopescu/onlineAggregationOnSparkV2
sql/core/src/main/scala/org/apache/spark/sql/OnlineAggregationUtils.scala
<gh_stars>1-10 /* * Incremental calculation for variance. */ package org.apache.spark.sql object commonMath { def CNDF(x: Double): Double = { var mX = x val neg = if (mX < 0d) 1 else 0 if (neg == 1) mX = mX * -1d val k = 1d / (1d + 0.2316419 * mX) var y = ((((1.330274429 * k - 1.82125597...
streamline-eu/dynamic-flink
flink-libraries/flink-cep-scala/src/main/scala/org/apache/flink/cep/scala/pattern/Pattern.scala
/* * 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 ...
streamline-eu/dynamic-flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/aggregate/ProcTimeBoundedRangeOver.scala
/* * 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 ...
streamline-eu/dynamic-flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/calcite/FlinkTypeFactory.scala
<filename>flink-libraries/flink-table/src/main/scala/org/apache/flink/table/calcite/FlinkTypeFactory.scala /* * 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 owne...
streamline-eu/dynamic-flink
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/scala/batch/table/stringexpr/AggregationsStringExpressionTest.scala
<filename>flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/scala/batch/table/stringexpr/AggregationsStringExpressionTest.scala /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additiona...
streamline-eu/dynamic-flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/dataset/BatchTableSourceScan.scala
<filename>flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/dataset/BatchTableSourceScan.scala /* * 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...
streamline-eu/dynamic-flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/TimeModeIndicatorFunctions.scala
/* * 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 ...
streamline-eu/dynamic-flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/expressions/ExpressionParser.scala
/* * 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 ...
streamline-eu/dynamic-flink
flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/WindowedStream.scala
/* * 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 ...
streamline-eu/dynamic-flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/PhysicalTableSourceScan.scala
/* * 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 ...
streamline-eu/dynamic-flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/windows.scala
/* * 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 ...
streamline-eu/dynamic-flink
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/TableEnvironmentTest.scala
<reponame>streamline-eu/dynamic-flink /* * 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...
streamline-eu/dynamic-flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/aggfunctions/AvgAggFunction.scala
/* * 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 ...
streamline-eu/dynamic-flink
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/expressions/TemporalTypesTest.scala
<filename>flink-libraries/flink-table/src/test/scala/org/apache/flink/table/expressions/TemporalTypesTest.scala /* * 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...
streamline-eu/dynamic-flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/aggfunctions/SumWithRetractAggFunction.scala
/* * 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 ...
streamline-eu/dynamic-flink
flink-runtime/src/test/scala/org/apache/flink/runtime/jobmanager/JobManagerRegistrationTest.scala
<reponame>streamline-eu/dynamic-flink /* * 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...
streamline-eu/dynamic-flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/rules/dataSet/DataSetSingleRowJoinRule.scala
/* * 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 ...
streamline-eu/dynamic-flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/expressions/call.scala
<gh_stars>1-10 /* * 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 * "...
streamline-eu/dynamic-flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/aggregate/GeneratedAggregations.scala
<filename>flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/aggregate/GeneratedAggregations.scala /* * 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...
streamline-eu/dynamic-flink
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/scala/batch/sql/AggregationsITCase.scala
<gh_stars>0 /* * 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 * "Lic...
streamline-eu/dynamic-flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/AggregateFunction.scala
/* * 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 ...
streamline-eu/dynamic-flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/Types.scala
<gh_stars>0 /* * 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 * "Lic...
streamline-eu/dynamic-flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/aggfunctions/CountAggFunction.scala
/* * 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 ...
streamline-eu/dynamic-flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/datastream/DataStreamValues.scala
/* * 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 ...
streamline-eu/dynamic-flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/rules/datastream/DataStreamLogicalWindowAggregateRule.scala
/* * 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 ...
streamline-eu/dynamic-flink
flink-runtime/src/test/scala/org/apache/flink/runtime/testingUtils/TestingTaskManager.scala
<filename>flink-runtime/src/test/scala/org/apache/flink/runtime/testingUtils/TestingTaskManager.scala<gh_stars>10-100 /* * 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 cop...
streamline-eu/dynamic-flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/logical/FlinkLogicalAggregate.scala
/* * 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 ...
streamline-eu/dynamic-flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/dataset/BatchScan.scala
<filename>flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/dataset/BatchScan.scala /* * 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 ...