Skip to content

Instantly share code, notes, and snippets.

enum { BMAX = 32, BCUT = BMAX / 2, BHEIGHT = 6 };
typedef uint8_t BIndex;
struct BNode {
BIndex length;
Key keys[BMAX];
union {
BNode *children[BMAX];
Value values[BMAX];
@kousu
kousu / README
Last active May 13, 2016 10:40
Cs350 OS161 Install scripts
If you're on Archlinux you shouuuuld just be able to drop these two files in a dir by themselves, chmod +x them, and run "install.sh".
If you're on a different Unix you can probably adapt this without too much effort to your system, especially the part about .
If you're not in Winter 2015 you probably need to tweak update.sh.
Sorry for the poor documentation and poor testing! And also the almost complete lack of error handling!
Hopefully this helps someone else in the future! this represents 13 hours of my life!
Tip: make your empty dir a git repo so that then you can just do
```
git clean -df && git clean -xfd
@chrislongo
chrislongo / gdbinit
Created August 14, 2012 17:50 — forked from CocoaBeans/gdbinit
.gdbinit - A user-friendly gdb configuration file
# INSTALL INSTRUCTIONS: save as ~/.gdbinit
#
# DESCRIPTION: A user-friendly gdb configuration file.
#
# REVISION : 7.3 (16/04/2010)
#
# CONTRIBUTORS: mammon_, elaine, pusillus, mong, zhang le, l0kit,
# truthix the cyberpunk, fG!, gln
#
# FEEDBACK: https://www.reverse-engineering.net
@dansimau
dansimau / .gitignore
Created May 20, 2012 23:52 — forked from urschrei/mkflask.sh
Bootstrap a Flask project on Ubuntu Precise, with Puppet, Vagrant and Fabric. (For latest version, see https://github.com/dansimau/flask-bootstrap)
*~
*.pyc
.vagrant
venv
#!/usr/bin/env python
#
# Converts any integer into a base [BASE] number. I have chosen 62
# as it is meant to represent the integers using all the alphanumeric
# characters, [no special characters] = {0..9}, {A..Z}, {a..z}
#
# I plan on using this to shorten the representation of possibly long ids,
# a la url shortenters
#
#!/usr/bin/env python
"""Solution for project euler problem #12.
Based on:
http://stackoverflow.com/questions/571488/project-euler-12-in-python/571526#571526
"""
def ndiv(n, prime_factors):
"""Return number of divisors of `n`.