- Author
draftcode
- Date
2011-11-11T13:18:07+09:00
- ID
289a0136-0c1c-11e1-a06b-040ccee352e6
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
#!/usr/bin/env gosh | |
(use srfi-1) | |
(use srfi-13) | |
(define (even-odd-map f-even f-odd lis) | |
(if (null? lis) | |
'() | |
(cons (f-odd (car lis)) | |
(cons (f-even (cadr lis)) |
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
class Test { | |
int var = 42; | |
void variableScope() { | |
switch (var) { | |
case 42: | |
int a = 1; | |
case 43: | |
// a is visible. | |
a = 2; | |
} |
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
# -*- coding: utf-8 -*- | |
from __future__ import division, absolute_import, print_function, unicode_literals | |
def indicate_last(gen): | |
saved_e = None | |
prev_value = next(gen) | |
value = None | |
while True: | |
if saved_e is not None: | |
raise saved_e |
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
#include <stdio.h> | |
#include <stdbool.h> | |
#include <stdlib.h> | |
typedef struct _node { | |
char c; | |
struct _node *tr; | |
struct _node *next; | |
} node; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#pragma pack(8) | |
struct shape_vtbl; | |
typedef struct { | |
double x, y; | |
struct shape_vtbl *shape_vtbl; | |
} SHAPE; |
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
#!/usr/bin/gawk -f | |
# $ echo 'a[1] = b[1]' | ./test.awk pattern='.\\[[[:digit:]]\\]' | |
# a[1] | |
# b[1] | |
{ | |
s = $0 | |
while (match(s, pattern)) { | |
print substr(s, RSTART, RLENGTH) | |
s = substr(s, RSTART+RLENGTH) | |
} |
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
xrrtest: xrrtest.cpp | |
${CXX} -lX11 -lXinerama -lXrandr -o xrrtest xrrtest.cpp |
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
require "rake/clean" | |
$OUTPUT = File.basename(File.expand_path("..", __FILE__)) | |
$OUTPUTDIR = "out" | |
$TEX = "platex" | |
$TEXFLAGS = "" | |
$DVIPDF = "dvipdfmx" | |
$DVIPDFFLAGS = "" | |
$BIBTEX = "pbibtex" |
こっから取ってきた。
http://www.tex.ac.uk/tex-archive/macros/latex/contrib/beamer/doc/beameruserguide.pdf
\frame{\tableofcontents}
\section{Something}
NewerOlder