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
;; 選択範囲をコメントアウト&その後ろにコメントアウトした物をペースト | |
(defun comment-out-and-paste () | |
(interactive) | |
(save-excursion | |
(kill-ring-save (region-beginning) (region-end)) | |
(comment-region (region-beginning) (region-end)) | |
(goto-char (region-end)) | |
(insert "\n\n") | |
(yank) | |
)) |
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
;; 選択範囲をコメントアウト&その後ろにコメントアウトした物をペースト | |
;; とりあえずのもの | |
(defun comment-out-and-paste () | |
(interactive) | |
(save-excursion | |
(kill-ring-save (region-beginning) (region-end)) | |
(comment-region (region-beginning) (region-end)) | |
(goto-char (region-end)) | |
(move-end-of-line 1) | |
(insert "\n") |
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/zsh | |
# UVa pdf files download script | |
# http://icpcres.ecs.baylor.edu/onlinejudge/ | |
start=${1:-101} # 最初の問題 | |
num=${2:-1} # ダウンロードしたい問題数(省略時は1つ) | |
cdir=$(pwd) | |
savedir=${3:-.} | |
vol=$(( $start / 100 )) |
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
;; insert "- " with nesting | |
;; for clmemo users | |
(defun change-log-insert-list() | |
(interactive) | |
(let* ((end-point (point)) | |
(start-point (- end-point 2)) | |
(str (buffer-substring start-point end-point))) | |
(if (string-equal "- " str) | |
(delete-backward-char 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
;; とりあえずのプログラム | |
(defun mf-cp-current-buffer () | |
(interactive) | |
(let* ((filename (buffer-file-name)) | |
(local-prj-root "/path/to/prj/root") | |
;;filenameからlocal-prjを除いたもの | |
(local-file-path-from-root (substring filename | |
(length local-prj-root) | |
(length filename))) | |
(mf-prj-root "/Volumes/mount-name")) |
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
/* http://d.hatena.ne.jp/yaotti/20090330/1238391711 */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
/* structure inside queue like atoms of a list */ | |
typedef struct atom_t{ |
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> | |
#define STACKSIZE 256 | |
typedef struct { | |
int *nums; | |
size_t len; |
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
# Makefile | |
bintree: bintree.c queue.c | |
gcc bintree.c queue.c |
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
random-tree: random-tree.c queue.c stack.c | |
gcc random-tree.c queue.c stack.c |
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> | |
#include "bintree.h" | |
#include "Bplustree.h" | |
int main(void) | |
{ |