Skip to content

Instantly share code, notes, and snippets.

View adamanthil's full-sized avatar
I may be slow to respond.

Andrew Bender adamanthil

I may be slow to respond.
View GitHub Profile
@adamanthil
adamanthil / load-json.as
Last active August 29, 2015 14:05
Loads some JSON into a dynamic text field
import flash.events.Event
import flash.net.URLLoader;
import flash.net.URLRequest;
var loader:URLLoader = new URLLoader();
var request:URLRequest = new URLRequest();
request.contentType = "application/json";
request.url="http://jsonip.com/";
loader.load(request);
@adamanthil
adamanthil / csvtojson-large-file-issue.js
Created August 13, 2014 03:28
The following javascript should stop triggering events before running through the entire sample csv file using the csvtojson module. See issue: https://github.com/Keyang/node-csvtojson/issues/28
var importIndex = 0;
var csvConverter = new Converter({ constructResult:false });
var fileStream = fs.createReadStream('large-csv-sample.csv');
csvConverter.on('record_parsed',function(rowObj, rowArray, rowIndex){
var rowId = rowArray[0];
var fileNum = rowArray[1];
importIndex++;
console.log(rowId, importIndex);
@adamanthil
adamanthil / large-csv-sample.csv
Created August 13, 2014 03:09
Sample CSV File that does not trigger 'record_parsed' events for all rows when using the csvtojson library. See issue: https://github.com/Keyang/node-csvtojson/issues/28
ID Number
0157181 8002
0157741 6523
0158106 11339
0158685 1246589927
0159044 10240
0159470 6320
0161143 1246588356
0161144 1246589434
0162198 9277