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
local List = {} | |
package.loaded["List"] = List | |
List.__index = List | |
function List:new() | |
self = {} | |
self._arr = {} | |
setmetatable(self, List) | |
return self |
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
#include <stdlib.h> | |
#include <assert.h> | |
#include "person.h" | |
#include "employee.h" | |
#include "iperson.h" | |
// Private helper function declaration. | |
static void check_salary(double salary); | |
static char* _name(void *self); | |
static void _set_name(void *self, char *name); |
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
#include <assert.h> | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include "queue.h" | |
queue_declare(int); | |
int main(void) | |
{ | |
bool failed = false; |
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
#!/usr/bin/env python | |
############################################################################## | |
# fetchForeclosureData.py # | |
# # | |
# Requirements # | |
# # | |
# - Python 3 # | |
# - Selenium package for Python # | |
# - The web driver for Chrome # |
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
/* Author: Michael Chen; License: MIT */ | |
const fs = require('fs'); | |
const path = require('path'); | |
const puppeteer = require('puppeteer'); | |
const delay = function (ms) { | |
return new Promise(function (resolve) { | |
setTimeout(resolve, ms); | |
}); | |
}; |
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
# Detect underlying system. | |
ifeq ($(OS),Windows_NT) | |
detected_OS := Windows | |
else | |
detected_OS := $(shell sh -c 'uname -s 2>/dev/null || echo not') | |
endif | |
export detected_OS | |
# Set default C compiler. |
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
#include <assert.h> | |
#include <stdbool.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include "animal.h" | |
#include "dog.h" | |
#include "duck.h" | |
#include "tiger.h" | |
struct animal { |
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
#!/bin/sh | |
# deploy2win - Deploy a MSYS2 executable to native Windows environment | |
# | |
# Copyright (c) 2020, Michelle Chen. Licensed under MIT. | |
target="$1" | |
# Check whether `$target` is an executable. |
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
/* jmdict2sqlite.groovy - Load JMdict into a SQLite database. | |
Copyright (c) 2020 Michael Chen. | |
Licensed under MIT. | |
Copy JMdict_e to the same path of the script. | |
Then, run it with the following command: | |
$ groovy -cp path/to/sqlite-jdbc-3.30.1.jar -DentityExpansionLimit=1000000 jmdict2sqlite.groovy |
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
/* | |
YahooFinanceCrawler | |
Version: 1.0 | |
Copyright: 2018, Michael Chen; Apache 2.0. | |
System Requirments: | |
- JDK 8 | |
- Selenium Java package and its dependencies. | |
- MgntUtils |
NewerOlder