Version 3, 29 June 2007
Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Version 3, 29 June 2007
Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
#!/bin/bash | |
# A filthy bash script to fetch a timetable from myUNSW | |
# Add your credentials here | |
USERNAME="" | |
PASSWORD="" | |
MYUNSW="https://ssologin.unsw.edu.au/cas/login?service=https%3A%2F%2Fmy.unsw.edu.au%2Famserver%2FUI%2FLogin%3Fmodule%3DISISWSSO%26IDToken1%3D" | |
TIMETABLE="https://my.unsw.edu.au/active/studentTimetable/timetable.xml" |
# This is the weirdest shit I have ever seen in Python. | |
# If you call this on a list of directories containing only .cpp files, it's fine. | |
# If any of the directories contain .c files, there are instant errors!! | |
# E.g: | |
# Traceback (most recent call last): | |
# File "<stdin>", line 1, in <module> | |
# File "python_wtf.py", line 18, in get_objects | |
# objects.extend([c_filter(x) for x in c_files]) | |
# File "python_wtf.py", line 18, in <listcomp> | |
# objects.extend([c_filter(x) for x in c_files]) |
#!/usr/bin/env python | |
x = """#!/usr/bin/env python | |
x = {0} | |
# These comments make up 40% of this quine. | |
print(x.format('"'*3 + x + '"'*3))""" | |
# These comments make up 40% of this quine. | |
print(x.format('"'*3 + x + '"'*3)) |
enum LinkedList | |
{ | |
Node(int, ~LinkedList), | |
Nil | |
} | |
impl LinkedList | |
{ | |
fn push_front(&mut self, x: int) | |
{ |
I hereby claim:
To claim this, I am signing this object:
// Enter a string of the form: | |
// # 1 "filenameiswaytoolong.cpp" | |
// You should get a segfault. | |
#include <stdio.h> | |
int main() { | |
int num; | |
char buffer[16]; | |
char trailing[16]; |
-- Recursive and Dynamic Programming solutions to the recurrence N(k) = 2N(k - 3) + N(k - 2) | |
compute_rec :: Int -> Int | |
compute_rec 0 = 0 | |
compute_rec 1 = 0 | |
compute_rec 2 = 2 | |
compute_rec k = 2 * (compute_rec (k - 3)) + (compute_rec (k - 2)) | |
compute :: Int -> Int | |
compute k = cache !! k | |
where |
fn stuff() { | |
// Split the path into its components, and make each component a path. | |
let simple_map = |comp: &str| -> Pattern { | |
Pattern::simple_pattern(comp) | |
}; | |
let glob_map = |comp: &str| -> Pattern { | |
Pattern::glob_pattern(comp) | |
}; | |
let map_fn = match prelude { |