Skip to content

Instantly share code, notes, and snippets.

View IlyaHalsky's full-sized avatar
🎯
Focusing

Ilya Kachalsky IlyaHalsky

🎯
Focusing
View GitHub Profile
uses
SysUtils, StrUtils;
const
pr=124991;
type
List=^u;
u=record
key:Integer;
public class ArrayQueueADT {
private Object[] elements = new Object[10];
private int end = 5;
private int start = 5;
private int size = 0;
public static void enqueue(ArrayQueueADT queue, Object element) {
assert element != null;
ensureCapacity(queue,queue.size+1);
queue.elements[queue.end] = element;
import java.io.*;
import java.util.StringTokenizer;
/**
* Created by Ilya239 on 29.03.2016.
*/
public class FastScanner {
BufferedReader br;
StringTokenizer st;
import java.util.ArrayList;
public class Main {
public static void main(String[] args) {
System.out.println(distance(0, 0, 3, 0, 1, 3.5, 2, 3.5, 10, 0.5));
}
public static double distance(double ax0, double ay0, double bx0, double by0, double r0, double ax1, double ay1, double bx1, double by1, double r1) {
if (intersects(ax0, ay0, bx0, by0, ax1, ay1, bx1, by1)) {
package com.company;
import java.util.function.Function;
/**
* Created by ilya2 on 02.03.2017.
*/
public class Meh {
public static void main(String[] args) {
new Meh().run();
// Paw: List[Access[P]], where P is Orig, used in filters
def resetFilters(defaultModelRegistry: DefaultModelRegistry, accesses: List[Access[_ <: Product]]): Context ⇒ Context = {
val lambdas =
for {
access ← accesses
} yield {
val initValue = access.initialValue
val srcId = ToPrimaryKey(initValue)
val accessCl = initValue.getClass.getName
val default = defaultModelRegistry.get(accessCl).create(srcId)
def resetAction: State ⇒ State = {
if (errorMap.nonEmpty) PrintColored("r")(s"Warning: This list $listUniqueName contains columns with same srcIds: $errorMap")
val columns: List[Access[ReactColumnSetting]] = getColumns.map(col ⇒ columnSettingsMap(col.columnSrcId + listUniqueName))
val resetColumnsAction: List[State ⇒ State] =
for {
col ← columns
} yield {
val init = col.initialValue
col.updatingLens.get.set(init.copy(
displayOrder = None,
### fix sbt notes:
bloop
Among these efforts we find organizations like Stripe or Wix working on better Scala support for Bazel or
Twitter getting excellent Scala support in Pants, and individuals like Jan Christopher Vogt or Li Haoyi working on cbt and mill respectively.
vovapolu/sbt-big-project -- faster sbt by extra caching
lihaoyi/mill -- sbt alternative
@assemble class ByPKAssemble extends Assemble {
def byPKRequestWithSrcToItemSrcId(
key: SrcId,
rq: Each[DepInnerRequest]
): Values[(ByPkItemSrcId, InnerByPKRequest)] =
if(!rq.request.isInstanceOf[ByPKRequest]) Nil else {
val brq = rq.request.asInstanceOf[ByPKRequest]
List(brq.itemSrcId → InnerByPKRequest(rq, brq.className))
}
}
package ee.cone.core.c4security.depviews
import com.typesafe.scalalogging.{LazyLogging, Logger}
import ee.cone.c4actor.BranchProtocol.BranchResult
import ee.cone.c4actor.QProtocol.{Firstborn, TxRef}
import ee.cone.c4actor.Types.SrcId
import ee.cone.c4actor._
import ee.cone.c4actor.dep.DepTypes.DepRequest
import ee.cone.c4actor.dep._
import ee.cone.c4actor.dep.reponse.filter.DepCommonResponseForwardApp