Skip to content

Instantly share code, notes, and snippets.

#pragma once
template <typename T>
constexpr uint64_t as_unsigned(T value) {
// static_assert(std::is_integral_v<T>);
union {
std::remove_reference_t<T> value;
uint64_t unsigned_value;
} u = {value};
return u.unsigned_value;
Mode 🟢 🗘🟢 🔴 🗘🔴 🟡
🟢 Overall Classic rings Rings+Waveform Mini-Elements Mini-Elements+Exciter Easter egg
🔴 Waveform/Exciter Square/Bow Impulse train/Blow Sawtooth/Strike
🟡 Hold on strum No hold (default) Hold
🗘🟢 Chord table Classic Jon Butler's Joe McMullen's
@qiemem
qiemem / curves.ipynb
Created November 1, 2020 16:45
Stages curves
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
observer> print __dump
globals [G]
interfaceGlobals []
turtles-own [WHO COLOR HEADING XCOR YCOR SHAPE LABEL LABEL-COLOR BREED HIDDEN? SIZE PEN-SIZE PEN-MODE]
patches-own [PXCOR PYCOR PCOLOR PLABEL PLABEL-COLOR]
links-own [END1 END2 COLOR LABEL LABEL-COLOR HIDDEN? BREED THICKNESS SHAPE TIE-MODE]
breeds
link-breeds
procedure WITH-LOCAL:[BAR X]{OTPL}:
@qiemem
qiemem / netlogo-intellij.md
Last active November 7, 2016 18:28
NetLogo Intellij instructions
  1. Open build.sbt in the root NetLogo repository. Add the following lines right after line 118:
    managedDirectory := baseDirectory.value / "../lib_idea",
    retrieveManaged := true,
  1. In a terminal, navigate to the root NetLogo repository. Run ./sbt netlogo/update
  2. Run cp $(find lib_idea -name '*.jar') lib_idea
  3. Run rm -rf lib_idea/bundles lib_idea/jars
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// (C) Uri Wilensky. https://github.com/NetLogo/NetLogo
package org.nlogo.headless
/**
Important Note:
LanguageTests (CommandTests and ReporterTests) now support testing stack traces directly.
Don't add any more tests here; add them there instead.
Here is an example from CommandTasks:
> last test:testOnly
[warn] javaOptions will be ignored, fork is set to false
[debug] Running TaskDef(org.nlogo.headless.TestExtensionStackTraces, org.scalatest.tools.Framework$$anon$1@23eac35f, false, [SuiteSelector])
java.lang.NoClassDefFoundError: org/scalatest/events/SeeStackDepthException$
at org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:379)
at org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:502)
at sbt.TestRunner.runTest$1(TestFramework.scala:76)
at sbt.TestRunner.run(TestFramework.scala:85)
at sbt.TestFramework$$anon$2$$anonfun$$init$$1$$anonfun$apply$8.apply(TestFramework.scala:202)
at sbt.TestFramework$$anon$2$$anonfun$$init$$1$$anonfun$apply$8.apply(TestFramework.scala:202)
java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: argument type mismatch
at ChildModel.waitFor(ChildModel.java:295)
at ChildModel.runUISafely(ChildModel.java:253)
at GUIChildModel.<init>(GUIChildModel.scala:21)
at LevelSpace$LoadModel.perform(LevelSpace.java:208)
at org.nlogo.prim._extern.perform(_extern.java:41)
at org.nlogo.nvm.Context.stepConcurrent(Context.java:91)
at org.nlogo.nvm.ConcurrentJob.step(ConcurrentJob.java:82)
at org.nlogo.job.JobThread.org$nlogo$job$JobThread$$runPrimaryJobs(JobThread.scala:143)
at org.nlogo.job.JobThread$$anonfun$run$1.apply$mcV$sp(JobThread.scala:78)
> netlogo/console
[warn] Credentials file /home/bryan/.bintray/.credentials does not exist
[info] Starting scala interpreter...
[info]
Welcome to Scala version 2.11.7 (OpenJDK 64-Bit Server VM, Java 1.8.0_66-internal).
Type in expressions to have them evaluated.
Type :help for more information.
scala> val ws = org.nlogo.headless.HeadlessWorkspace.newInstance
ws: org.nlogo.headless.HeadlessWorkspace = org.nlogo.headless.HeadlessWorkspace@2eafe9cd