This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MOVED TO GITHUB PAGE https://github.com/peheje/JsonSerializerSwift |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: [Previous](@previous) | |
// Created by Peter Helstrup Jensen on 06-07-2015 | |
// Copyright (c) 2015 Peter Helstrup Jensen. All rights reserved. | |
// | |
// This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public | |
// License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later | |
// version. | |
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied | |
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const http = require("http"); | |
const NanoTimer = require("nanotimer"); // Documentation: https://github.com/Krb686/nanotimer | |
function getNanoTime() { | |
const t = process.hrtime(); // Documentation: https://nodejs.org/api/process.html#process_process_hrtime_time | |
return t[0] * 1e9 + t[1]; // [seconds, nanoseconds] | |
} | |
const options = { | |
hostname: '127.0.0.1', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Seems to not work in Chrome browser. | |
; Tuborg clamps | |
<+<!8::SendInput {Raw}{ | |
<+<!9::SendInput {Raw}} | |
; Brackets | |
<!8::SendInput {Raw}[ | |
<!9::SendInput {Raw}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import kotlinx.coroutines.experimental.CommonPool | |
import kotlinx.coroutines.experimental.launch | |
import kotlinx.coroutines.experimental.runBlocking | |
import kotlinx.coroutines.experimental.sync.Mutex | |
import java.util.* | |
import kotlin.system.measureTimeMillis | |
// BY peheje@github | |
fun stringToIntArray(str: String): IntArray { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyautogui | |
import time | |
time.sleep(2) | |
def record(): | |
while True: | |
currentMouseX, currentMouseY = pyautogui.position() | |
print("(" + str(currentMouseX) + "," + str(currentMouseY) + ")") | |
time.sleep(3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.Exception | |
import java.nio.ByteBuffer | |
import java.security.MessageDigest | |
import java.util.* | |
import kotlin.math.abs | |
fun main() { | |
val filterSize = 1_000_000 | |
val numberOfEntries = 100_000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import kotlin.random.Random | |
import kotlin.system.measureTimeMillis | |
fun main() { | |
val basicJob = BasicJob() | |
val delayedJob = DelayedJob(basicJob, 1000) | |
val measuredAndDelayedJob = MeasuredJob(delayedJob) | |
val measuredDelayedAndSynchronizedJob = SynchronizedJob(measuredAndDelayedJob, "lock") | |
measuredDelayedAndSynchronizedJob.run() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from mindstorms import MSHub, Motor, MotorPair, ColorSensor, DistanceSensor, App | |
from mindstorms.control import wait_for_seconds, wait_until, Timer | |
from mindstorms.operator import greater_than, greater_than_or_equal_to, less_than, less_than_or_equal_to, equal_to, not_equal_to | |
import math | |
hub = MSHub() | |
motors = MotorPair('E', 'A') | |
roll_target = 89 | |
kp = 15.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://atlas.wolfram.com/01/01/ | |
let on = 1uy | |
let off = 0uy | |
let print xs = | |
for x in xs do if x = on then printf "X" else printf " " | |
printf "\n" | |
let rule0 p _ r = (p + r) % 2uy | |
let rule51 _ q _ = (on + q) % 2uy |
OlderNewer