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
\documentclass{article} | |
\begin{document} | |
\begin{tabular}[]{ r r r r r r r r } | |
to the power & $^{^-1}$ & $^{^-2}$ & $^{^-3}$ & $^{^-4}$ & $^{^-5}$ & $^{^-6}$ & \ldots{}\\[.5em] | |
2 & $\frac{1}{2}$ & $\frac{1}{4}$ & $\frac{1}{8}$ & $\frac{1}{16}$ & $\frac{1}{32}$ & $\frac{1}{64}$ & \ldots{}\\[1em] | |
3 & $\frac{1}{3}$ & $\frac{1}{9}$ & $\frac{1}{27}$ & $\frac{1}{81}$ & $\frac{1}{243}$ & $\frac{1}{729}$ &\\[1ex] | |
\ldots{} & & & & & &\\[2ex] | |
10 & $\frac{1}{10}$ & $\frac{1}{100}$ & $\frac{1}{1000}$ & \ldots{} & & &\\ | |
\end{tabular} |
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
-- do | |
-- sqlite3 roundTrip.db < createRoundTripDb.sql | |
-- then open roundTrip.db from sqlJsRoundTrip.html | |
-- you may need to press the load db button, or you may not | |
-- sql.js is available at https://github.com/kripken/sql.js/ | |
PRAGMA foreign_keys=OFF; | |
BEGIN TRANSACTION; | |
CREATE TABLE t | |
( | |
f1 TEXT |
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
# This is a quick hack | |
# | |
# we rely on | |
# 1. SELECT being upper case | |
# 2. SELECT prefixed with at least 4 spaces, or ~~~\nSELECT, | |
# to induce <code> tag | |
# 3. no embedded semi colons in, for eg comments | |
# 4. semi colon not on the same line as it's SELECT | |
# | |
# error reporting leaves *a lot* to be desired |
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
/* | |
angle.cpp | |
compute angle given sine and cosine | |
*/ | |
#include <cmath> | |
#include <cstdio> | |
#include <cassert> |
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
SELECT '/* | |
results | |
initial string "abcdefghijklmnopqrst" of length ' || length('abcdefghijklmnopqrst'); -- 20 | |
SELECT '3 letters starting with 6th =' || substr('abcdefghijklmnopqrst', 6, 3); -- fgh | |
SELECT ' | |
2 ways of selecting 3 letters starting 6th from the end'; | |
SELECT substr('abcdefghijklmnopqrst', -6, 3); -- opq |
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
@echo off | |
goto main | |
My installation of pandoc didn't have the advertised templates or the | |
advertised directory they were meant to be in, which is a nuisance if | |
you need to modify them. This batch file should do the job. | |
:main | |
pandoc -v | grep "fault user" | sed "s/^[^:]*: *\(.*\)/\1/" > genT_tmpfile | |
set /p PANDOC_USER_DIR=<genT_tmpfile |
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
package require Tk | |
proc minmal {w} { | |
global minimalStatus | |
set curFile [fileDialog $w] | |
if {$curFile eq "" } { | |
set minimalStatus {no file specified} | |
return | |
} |
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
package require Tk | |
package require sqlite3 | |
source "dbedit.tcl" | |
# open example.db or create if absent | |
# dbhandle is how we access the db | |
set dbName ":memory:" | |
sqlite3 dbhandle $dbName | |
# set up sql to create & populate table |
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
@echo off | |
goto main | |
This is a quick hack, should be easy to port | |
to linux but I'm still looking for a usable | |
systemd free distro so haven't done it | |
we rely on | |
1. SELECT being upper case |