Skip to content

Instantly share code, notes, and snippets.

Sean Connelly SeanConnelly

View GitHub Profile
@SeanConnelly
SeanConnelly / csvreader.md
Last active Nov 5, 2018
CSV file reader for Cache and IRIR
View csvreader.md

CSV File Reader for Cache and IRIS

Loads RFC 4180 compliant CSV into a data reader object.

How to use:

Create an instance of the Cogs.Lib.Csv.Reader class and load the raw CSV using either LoadFile(), LoadStream() or LoadString(), see Test methods for examples.

Use the .Next() method to load each record.

View AOC.2017.JS
// Day 3 Part 1
console.log((function (input) {
let [x,y]=[0,0];
let [inc,dir,mem]=[1,1,1];
for (;;) {
for (let i=1;i<inc+1;i++) {
mem++;
x = (dir===1) ? x+1 : (dir===3) ? x-1 : x;
y = (dir===2) ? y+1 : (dir===4) ? y-1 : y;
if (mem===input) return Math.abs(x) + Math.abs(y)
View AOC.Y2017.cls
Class AOC.Y2017 Extends %RegisteredObject
{
/*
ADVENT OF CODE 2017
Built With...
_
@SeanConnelly
SeanConnelly / coercion.js
Created Sep 14, 2017
Functions for testing JavaScript coercion
View coercion.js
module.export = [
function() { return 0 == 0 },
function() { return 0 == '0' },
function() { return 0 == [0] },
function() { return 0 == [] },
function() { return 0 == {} },
function() { return 0 == '' },
function() { return 0 == null },
function() { return 0 == [null] },
function() { return 0 == undefined },
@SeanConnelly
SeanConnelly / dualack.xml
Created Jul 6, 2017
Ensemble Dual ACK Example
View dualack.xml
<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="25" zv="Cache for Windows (x86-64) 2014.1.1 (Build 702U)" ts="2017-07-06 10:00:27">
<Class name="Examples.DeferredHL7.CustomProcess">
<ClassType>persistent</ClassType>
<Super>Ens.BusinessProcess</Super>
<TimeChanged>64470,35796.396505</TimeChanged>
<TimeCreated>64470,32347.921948</TimeCreated>
<Method name="OnRequest">
<FormalSpec>pRequest:Ens.Request,*pResponse:Ens.Response</FormalSpec>
View gist:a5c603399109bcaca9d196a0d19be205
Class ITPlanet.Task2 [ Abstract ]
{
ClassMethod Main() As %String
{
q $lg("ê°L")
}
}
You can’t perform that action at this time.