Skip to content

Instantly share code, notes, and snippets.

<style>
.ngkc_custom-donation-activ,
.ngkc_standard_dontation_active {
background-color: #6b2217 !important;
color: #f8edda !important;
background-image: none !important;
font-weight: 550 !important;
}
</style>
/**
* При событии formSubmit берёт шаблон документа и заменяет все переменные (строки между << и >>) на то что
* пришло с формы и ложит это в папку с названием МЕСЯЦ.ГОД (если не существует то создаёт новую папку)
* @param formSubmitE документация https://developers.google.com/apps-script/guides/triggers/events#form-submit
*/
function autoFillDocFromForm(formSubmitE) {
const patternOpenSymbols = '<<';
const patternCloseSymbols = '>>';
const arraySplitSymbol = ", "; // Некоторые поляи на формах имеют множественный выбор, склеиваем их в одну строку через этот символ
const timestamp = new Date();
[error] [LWJGL] GLFW_PLATFORM_ERROR error
[error] Description : WGL: Failed to make context current: The requested resource is in use.
[error] Stacktrace :
[error] org.lwjgl.glfw.GLFW.glfwMakeContextCurrent(GLFW.java:4492)
[error] zio3d.core.glfw.GLFW$Live$$anon$1.$anonfun$makeContextCurrent$1(GLFW.scala:155)
[error] scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
[error] zio.internal.FiberContext.evaluateNow(FiberContext.scala:386)
[error] zio.internal.FiberContext.$anonfun$evaluateLater$1(FiberContext.scala:661)
[error] java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
@kell18
kell18 / .zshrc
Created September 22, 2019 10:04
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/kell18/.oh-my-zsh"
export LANG=ru_RU.UTF-8
export LC_CTYPE=ru_RU.UTF-8
# Set name of the theme to load --- if set to "random", it will

Правила поведения в чате

Приветствуется:

  • Быть вежливым и учтивым
  • Уважать чужие мнения

Не приветствуется:

  • Агрессивное и пассивно-аггресивное поведение, например "Куда тебе в политику, у тебя ещё пух на губах ..." или более грубое "Зачем открывать рот если не знаешь?". Исключения:
  • Упоминание едра, путина могут сопровождаться пренебрежительным тоном*
def maxRun(a: Array[Int]): Int = if (a.length < 2) a.length else {
val (totalMaxRun, (prevRun, _)) = a.tail.foldLeft(1 -> (1, a.head)) {
case ((maxRun, (currRun, prevNum)), currNum) if Math.abs(currNum - prevNum) == 1 =>
Math.max(maxRun, currRun + 1) -> (currRun + 1, currNum)
// currNum doesn't belongs to currRun
case ((maxRun, (currRun, prevNum)), currNum) => Math.max(maxRun, currRun) -> (1, currNum)
}
Math.max(totalMaxRun, prevRun)
}
sealed trait Slice extends Product with Serializable {
def length: Int
}
object Slice {
def empty: Slice = EmptySlice
}
case class HalfSlice(num: Int, ind: Int) extends Slice {
override def length = 1
}
class T extends WordSpec with FridaDefaultJsonProtocol with Directives with SprayJsonSupport with Matchers with ScalatestRouteTest {
import scala.concurrent.ExecutionContext.Implicits.global
Kamon.addReporter(new InfluxDBReporter(Kamon.config()))
private val log = LoggerFactory.getLogger(getClass.getName)
val futureFunc: Future[Int] = Future(123)
val eHandler = ExceptionHandler {
[error] java.lang.NoSuchMethodError: scala.reflect.api.Internals$ReificationSupportApi.SyntacticTypeApplied()Lscala/reflect/api/Internals$Reifi$$$$9694e45bc19be932a29ce44fb2993611$$$$ppliedExtractor;
[error] at tapir.generic.FormCodecMacros$.$anonfun$generateForCaseClass$1(FormCodecDerivation.scala:24)
[error] at scala.collection.immutable.List.map(List.scala:286)
[error] at tapir.generic.FormCodecMacros$.generateForCaseClass(FormCodecDerivation.scala:23)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.lang.reflect.Method.invoke(Method.java:498)
[error] at scala.reflect.macros.runtime.JavaReflectionRuntimes$JavaReflectionResolvers.$anonfun$resolveJavaReflectionRuntime$4(JavaReflectionRuntimes.scala:46)
[error] at scal