Ever wondered how the timetabling algorithm of NUSMods works? Read on to find out.
Firstly start let's define the data representation of a Lesson
:
Lesson = {
ClassNo: string,
DayText: string,
## Directory structure: | |
## dir | |
## |-- gen_runes.py | |
## |-- graphics.py | |
## |-- PyGif.py | |
## +-- runes.py | |
## Put submissions in the same directory as this file. | |
## Make sure there are no other .py files besides | |
## the submissions and the whitelisted files |
var script = document.createElement('script'); | |
script.src = '//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js'; | |
script.onload = function () { | |
// Do something | |
} | |
document.getElementsByTagName('head')[0].appendChild(script); |
'use strict'; | |
var gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
var webserver = require('gulp-webserver'); | |
gulp.task('sass', function () { | |
return gulp.src('./sass/**/*.scss') | |
.pipe(sass().on('error', sass.logError)) | |
.pipe(gulp.dest('./css')); |
#/usr/bin/sh | |
for f in *.webm; do | |
mv -- "$f" "${f%.webm}.mp4" | |
done |
{ | |
":)": "๐", | |
":-)": "๐", | |
"(:": "๐", | |
":D": "๐", | |
":-D": "๐", | |
"=D": "๐", | |
"=-D": "๐", | |
":')": "๐", | |
":'-)": "๐", |
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would
// Name animater | |
var name = 'Yang.Shun.Tay.'; | |
setInterval(function () { | |
name = name.substring(1) + name.charAt(0); | |
var flags = (1 << 0) | (1 << 1); | |
MtpApiManager.invokeApi('account.updateProfile', { | |
flags: flags, | |
first_name: name, | |
last_name: '' |