This file contains hidden or 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
// IMPLEMENTED (X) or MISSING ( ) FEATURES, (N/A) if not needed in this language: | |
// | |
// (X) Basic navigation prompts: route (re)calculated (with distance and time support), turns, roundabouts, u-turns, straight/follow, arrival | |
// (X) Announce nearby point names (destination / intermediate / GPX waypoint / favorites / POI) | |
// (X) Attention prompts: SPEED_CAMERA; SPEED_LIMIT; BORDER_CONTROL; RAILWAY; TRAFFIC_CALMING; TOLL_BOOTH; STOP; PEDESTRIAN; MAXIMUM; TUNNEL | |
// (X) Other prompts: gps lost, off route, back to route | |
// (X) Street name and prepositions (onto / on / to) and street destination (toward) support | |
// (X) Distance unit support (meters / feet / yard) | |
// (N/A) Special grammar: (please specify which) | |
// (X) Support announcing highway exits |
This file contains hidden or 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
/**** combination (n choose k) encoder / decoder **** | |
* * | |
* a k-combination {c1,...,ck} of {0,1,...,n-1} can * | |
* be encoded as C(c1,1) + C(c2,2) + ... + C(ck,k). * | |
* * | |
****************************************************/ | |
#include <stdio.h> | |
#include <assert.h> |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
static void | |
hanoi(unsigned char n) | |
{ | |
void *s[32]; | |
char p[3] = "ABC", t; | |
if (n >= 32) n = 31; |
This file contains hidden or 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
\input luaotfload.sty | |
\input luatypezh | |
\input zr/verb | |
\font\tenmib=cmmib10 \font\sevenmib=cmmib7 \font\fivemib=cmmib5 | |
\baselineskip=14pt \everydisplay{\baselineskip=12pt\relax} | |
\verbatimindent=2em | |
% % % |
This file contains hidden or 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
#!/usr/bin/python3 | |
def make_pi(p): | |
n = len(p) | |
pi = [0] * n | |
i = 0 | |
for j in range(1, n): | |
while i > 0 and p[i] != p[j]: | |
i = pi[i-1] | |
if p[i] == p[j]: |
This file contains hidden or 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
% Verbatim typesetting | |
\catcode`@=11 | |
\def\uncatcodespecials{\begingroup | |
\def\do##1{\catcode`\noexpand##1=12 }% | |
\edef\next{\endgroup\dospecials}\next} | |
\let\verbfont=\tentt | |
\def\nohyphenation{\hyphenchar\font\m@ne} |
This file contains hidden or 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
char*f(char*s){char*t;int n;for(t=s;*t;t++)if(*t==']')break; | |
else if(*t>>4==3){for(n=*(s=t++)-48;*t>>4==3;n=n*10+(*t++-48)); | |
if(*t=='[')for(s=t+1;n--;t=f(s));else for(t--;s<=t;putchar(*s++));} | |
else putchar(*t);return t;}int main(int c,char**v){f(v[1]);} |
This file contains hidden or 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
#!/bin/bash | |
size="3300x2550" # 11" x 8" | |
# size="3508x2480" # 297mm x 210mm | |
cvtopts="+append -adaptive-resize $size -gravity center -extent $size -set density 300 -unsharp 0x5+0.3+0" | |
if [[ ! -z $1 ]]; then | |
N=$1 | |
elif [[ $PWD =~ FILE([0-9]+) ]]; then |
This file contains hidden or 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
unbind C-b | |
bind-key C-a send-prefix | |
set -g prefix C-a | |
set -g mouse on | |
set -g set-titles on | |
set -g status off | |
set -g escape-time 100 | |
setw -g mode-keys vi |
This file contains hidden or 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
#include "hash.h" | |
#include <assert.h> | |
void **hash_find(void **base, size_t n, void *key, | |
size_t hash, int (*equal)(const void *, const void *)) | |
{ | |
void **p, **q, **end; | |
p = q = base + hash % n; | |
end = base + n; |
NewerOlder