Skip to content

Instantly share code, notes, and snippets.

View dested's full-sized avatar
🕛
Code

Salvatore dested

🕛
Code
View GitHub Profile
/*! *****************************************************************************
Copyright (C) Microsoft. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
function Evaluate(method, parameters) {
var instructionsOld = method.Instructions;
var stack = new Array(method.MaxStack);
var locals = new Array(method.LocalCount);
// var True = this.True;
// var False = this.False;
var lastStack;
var tempQ;
var tempIndex1;
var tempParameters;
@dested
dested / dotgame.js
Last active December 7, 2017 22:03
const width = 7;
const height = 7;
let grid = new Array(width * height);
const WALL = 0;
const DOT = 1;
const EMPTY = 2;
for (let x = 0; x < width; x++) {
for (let y = 0; y < height; y++) {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Color Sorter</title>
<style>
body {
background-color: black;
flex: 1;
display: flex;;
let a = 1;
if (a == 1) {
let a = 2;
console.log(a);
}
console.log(a);
let b = 1;
if (a == 1) {
let b = b;
type restParam<R> = ((...a: any[]) => R);
type oneParam<A, R> = ((a: A) => R);
type twoParam<A, B, R> = ((a: A, b: B) => R);
type threeParam<A, B, C, R> = ((a: A, b: B, c: C) => R);
type composeFn = (
(() => () => void) &
//1 param, 5 composes
export enum MemberActionOptions {
DoThis,
DoThat,
OtherThing
}
export type MemberAction = {
type: MemberActionOptions.DoThis,
thisThing: number,
} | {
var locker = new object();
long count1 = 0,count2=0;
Task.Run(() =>{while (true)lock (locker)count1++;});
Task.Run(() =>{while (true)lock (locker)count2++;});
Task.Run(() =>{while (true)Console.WriteLine(" Diff :" + (count1 - count2));});
Console.ReadLine();
public class ServerGame : Game
{
public override void MakePlayer()
{
MainPlayer = new ServerPlayer();
}
public void Tick()
{
MainPlayer.ServerThing();//Unavailable without casting
//actual inputs
var t0 = process.hrtime();
var m = new Uint8Array(30*60*60*5);
for (var c = 0; c < m.length; c++)m[c] = Math.random() * 32 | 0;
var mk = [];