Go or Weiqi, Weichi (simplified Chinese: 围棋; traditional Chinese: 圍棋; pinyin: wéiqí) is an abstract strategy board game for two players in which the aim is to surround more territory than the opponent. The game was invented in China more than 2,500 years ago and is believed to be the oldest board game continuously played to the present day.
import { Octokit } from "https://cdn.skypack.dev/@octokit/core?dts"; | |
import { Kind, parse, visit } from "https://cdn.skypack.dev/graphql?dts"; | |
interface PaginationItem { | |
location: string; | |
cursorVariableName: string; | |
} | |
const extractPaginatedItems = (query: string): PaginationItem[] => { | |
const ast = parse(query, { noLocation: true }); |
- Async testing
- Using the runner:
If you include
-P
on the command line,Runner
will pass aDistributor
to theSuite
s you specify with-s
.Runner
will set up a thread pool to execute anySuite
s passed to theDistributor
'sput
method in parallel. TraitSuite
's implementation ofrunNestedSuites
will place any nestedSuite
s into thisDistributor
. Thus, if you have aSuite
of tests that must be executed sequentially, you should overriderunNestedSuites
as described in the documentation forDistributor
.
> The -P
option may optionally be appended with a number (e.g. "-P10
" -- no intervening space) to specify the number of threads to be created in the thread pool. If no number (or 0) is specified, the number of threads will be decided based on the num
#!/usr/bin/env deno run --allow-read --allow-net | |
import getopts from "https://cdn.skypack.dev/getopts"; | |
import { request } from "https://cdn.skypack.dev/@octokit/request"; | |
import { create, getNumericDate } from "https://deno.land/x/djwt/mod.ts"; | |
const opts = getopts(Deno.args); | |
const { _, appId, installationId, privateKey, ...params } = opts as any; | |
const endpoint = _.join(" "); |
Why care about keyboards?
- an input device you interact with for many hours a day
- choose your
weapontools! personalize your equipment
SELECT DISTINCT | |
a.column AS a_column, | |
b.column AS b_column | |
FROM | |
a FULL JOIN b | |
ON a.column = b.column | |
WHERE | |
a.column IS NULL OR | |
b.column IS NULL |
Some of these practices might be based on wrong assumptions and I'm not aware of it, so I would appreciate any feedback.
-
avoiding some dependency conflicts:
- install sbt-explicit-dependencies globally in your
~/.sbt/{0.13,1.0}/plugins/plugins.sbt
- run
undeclaredCompileDependencies
and make the obvious missing dependencies explicit by adding them tolibraryDependencies
of each sub-project - (optionally) run
unusedCompileDependencies
and remove some obvious unused libraries. This has false positives, so; reload; Test/compile
after each change and ultimately run all tests to see that it didn't break anything - (optionally) add
undeclaredCompileDependenciesTest
to the CI pipeline, so that it will fail if you have some undeclared dependencies
- install sbt-explicit-dependencies globally in your
-
keeping dependencies up to date and resolving conflicts:
- install sbt-updates globally in your `~/.sbt/{0.13,1.0}/plugins/plugins.
/* This object contains some generic collections ops that can be useful for filtering */ | |
object CollectionOps { | |
implicit class IteratorOps[V](val iterator: Iterator[V]) extends AnyVal { | |
/* Similar to the Stream's .groupBy, but assuming that groups are contiguous. Another difference is that it returns the key corresponding to each group. */ | |
// NOTE: The original iterator should be discarded after calling this method | |
def contiguousGroupBy[K](getKey: V => K): Iterator[(K, Seq[V])] = new Iterator[(K, Seq[V])] { | |
/* The definition is very straightforward: we keep the `rest` of values and on each `.next()` call bite off the longest prefix with the same key */ |
I hereby claim:
- I am laughedelic on github.
- I am aalekhinera7 (https://keybase.io/aalekhinera7) on keybase.
- I have a public key ASCPt2YV_CQSKdMib-02pGklxFn_qBnDhvWmC_2QweXWLwo
To claim this, I am signing this object:
Exception in thread "main" java.util.concurrent.TimeoutException: Futures timed out after [5 seconds] | |
at scala.concurrent.impl.Promise$DefaultPromise.ready(Promise.scala:255) | |
at scala.concurrent.impl.Promise$DefaultPromise.result(Promise.scala:259) | |
at scala.concurrent.Await$.$anonfun$result$1(package.scala:215) | |
at scala.concurrent.BlockContext$DefaultBlockContext$.blockOn(BlockContext.scala:53) | |
at scala.concurrent.Await$.result(package.scala:142) | |
at org.ensime.lsp.ensime.EnsimeLanguageServer.$anonfun$hoverRequest$6(EnsimeLanguageServer.scala:392) | |
at scala.Option.map(Option.scala:146) | |
at org.ensime.lsp.ensime.EnsimeLanguageServer.hoverRequest(EnsimeLanguageServer.scala:392) | |
at org.ensime.lsp.core.LanguageServer$ResponseHandler$$anonfun$buildHandler$1.applyOrElse(LanguageServer.scala:54) |