This file contains hidden or 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
/* | |
* Sample code to test what happens when a debugger sets a breakpoint. | |
* | |
* Written for #WeekendDevPuzzle dated 2022-01-15 | |
* https://twitter.com/amodm/status/1482206401103818756 | |
* | |
* Steps to execute this: | |
* # compile program | |
* gcc -o testdebugcrash testdebugcrash.c | |
* # run program |
This file contains hidden or 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
Download the data from https://www.kaggle.com/cityofLA/los-angeles-traffic-collision-data/downloads/traffic-collision-data-from-2010-to-present.csv/24 | |
Write a program to read the above data into memory in two formats: | |
1. Object oriented - for every record | |
2. Columnar format - a separate array for every attribute | |
Once the data set has been read into memory, the program should ask for a zip code. | |
After getting that input, the program should output the number of collisions that happened in that zipcode two times (along with time taken to process): | |
1. Using the object oriented in-memory store |
This file contains hidden or 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
// Hotlink: https://rawgit.com/amodm/09a3350ec3162b8fe27d76bc24cca373/raw/6bce576080dba78ef49fddbbda28f2e421b2caea/jsfiddle-logger.js | |
// | |
// You may need to call initJsFiddleLogger() explicitly | |
// | |
const existingConsoleLog = console && console.log; | |
const jsFiddleLogger = function(message) { | |
if (existingConsoleLog) { | |
existingConsoleLog(message); | |
} | |
if (typeof message === 'object') { |
NewerOlder