SQLite3 Cheat Sheet
Download from: http://www.sqlite.org/download.html
Getting Started: http://www.sqlite.org/sqlite.html
| /******************************************************************************* | |
| * | |
| * A minimal Forth compiler in C | |
| * By Leif Bruder <leifbruder@gmail.com> http://defineanswer42.wordpress.com | |
| * Release 2014-04-04 | |
| * | |
| * Based on Richard W.M. Jones' excellent Jonesforth sources/tutorial | |
| * | |
| * PUBLIC DOMAIN | |
| * |
| (* | |
| Some time ago I found this tutorial about writing a small VM in c. | |
| http://blog.felixangell.com/blog/virtual-machine-in-c | |
| Here's something similar in OCaml. Nothing super fancy and a lot of room for improvements. | |
| But it's a start :) | |
| *) | |
| open Core.Std | |
| type registers = { | |
| mutable a: int; |
| #!/usr/bin/env ruby -rubygems | |
| # Shamir's Secret Sharing Scheme with m-of-n rule for 128-bit numbers. | |
| # Author: Oleg Andreev <[email protected]> | |
| # | |
| # * Deterministic, extensible algorithm: every combination of secret and threshold produces exactly the same shares on each run. More shares can be generated without invalidating the first ones. | |
| # * This algorithm splits and restores 128-bit secrets with up to 16 shares and up to 16 shares threshold. | |
| # * Secret is a binary 16-byte string below ffffffffffffffffffffffffffffff61. | |
| # * Shares are 17-byte binary strings with first byte indicating threshold and share index (these are necessary for recovery). | |
| # | |
| # See also: https://en.wikipedia.org/wiki/Shamir%27s_Secret_Sharing |
| #lang racket | |
| (require compatibility/defmacro | |
| racket/stxparam) | |
| (define-syntax-parameter current-define-multis (make-hash)) | |
| (define-syntax-parameter current-define-multi-fns (make-hash)) | |
| (define-macro (define-multi name) | |
| (let ([current-define-multis (syntax-parameter-value #'current-define-multis)] |
| # Set the gaudy prompt. | |
| # ^O puts terminal back into default text mode for every prompt, | |
| # preventing random glyphs. | |
| resetterm="\[\017\]" | |
| # \[ and \] prevent the shell from counting these characters | |
| # against the line length. |
| // To compile with gcc: (tested on Ubuntu 14.04 64bit): | |
| // g++ sdl2_opengl.cpp -lSDL2 -lGL | |
| // To compile with msvc: (tested on Windows 7 64bit) | |
| // cl sdl2_opengl.cpp /I C:\sdl2path\include /link C:\path\SDL2.lib C:\path\SDL2main.lib /SUBSYSTEM:CONSOLE /NODEFAULTLIB:libcmtd.lib opengl32.lib | |
| #include <stdio.h> | |
| #include <stdint.h> | |
| #include <assert.h> | |
| #include <SDL2/SDL.h> | |
| #include <SDL2/SDL_opengl.h> |
SQLite3 Cheat Sheet
Download from: http://www.sqlite.org/download.html
Getting Started: http://www.sqlite.org/sqlite.html
| <div id="app"> | |
| {{ message }} | |
| <button v-on:click="increment">+</button> | |
| <button v-on:click="decrement">-</button> | |
| </div> |
I hereby claim:
To claim this, I am signing this object: