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
(define panel #(5 3 0 0 7 0 0 0 0 | |
6 0 0 1 9 5 0 0 0 | |
0 9 8 0 0 0 0 6 0 | |
8 0 0 0 6 0 0 0 3 | |
4 0 0 8 0 3 0 0 1 | |
7 0 0 0 2 0 0 0 6 | |
0 6 0 0 0 0 2 8 0 | |
0 0 0 4 1 9 0 0 5 |
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
import _root_.scala.util.Random | |
def lifeGameIterator(stride:Int) = new Iterator[Array[Array[Boolean]]] { | |
private def pathFilter(num : Int) = num | |
private def prevFilter(num : Int) = if(num == 0) stride - 1 else num - 1 | |
private def nextFilter(num : Int) = if(num == stride - 1) 0 else num + 1 | |
private def cellArriveGetter(xFilter:(Int)=>Int, yFilter: (Int)=>Int) | |
(cells:Array[Array[Boolean]], x:Int, y:Int) = cells(yFilter(y))(xFilter(x)) | |
private val _isArriveGetter = List( |
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
<?xml version="1.0" encoding="utf-8"?> | |
<TabHost xmlns:android="http://schemas.android.com/apk/res/android" | |
android:id="@android:id/tabhost" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent" | |
> | |
<RelativeLayout | |
android:layout_width="fill_parent" |
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
"for gosh_complete | |
"別バッファからinfo画面を操作するためのキーマップ | |
nmap <C-K> <Plug>(gosh_info_row_up) | |
nmap <C-J> <Plug>(gosh_info_row_down) | |
nmap <C-C> <Plug>(gosh_info_close) | |
"現在バッファと関連するシンボルをuniteで検索する | |
nmap gi <Plug>(gosh_info_start_search) | |
"カーソル位置のテキストを初期入力として、現在バッファと関連するシンボルを検索する | |
nmap gk <Plug>(gosh_info_start_search_with_cur_keyword) |
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
(use gauche.generator) | |
(use gauche.lazy) | |
(define-syntax chain | |
(syntax-rules () | |
((_ ls proc)(proc ls)) | |
((_ ls proc x ...) | |
(begin (chain ls proc) | |
(chain ls x ...))))) |
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
(use gauche.parseopt) | |
(use gauche.uvector) | |
(use gauche.net) | |
(define (usage) | |
(print "Usage: gosh wol.scm [-m|--mac=<mac-addr>]") | |
(print "Example: gosh wol.scm -m=1a-2b-3c-4d-5e-6f") | |
) | |
(define (main args) |
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
function g:window_resize_mode() | |
echo 'window resize mode' | |
while 1 | |
let ch = getchar() | |
if ch == 104 " 104 = h | |
execute '2wincmd <' | |
elseif ch == 106 " 106 = j | |
execute "2wincmd -" | |
elseif ch == 107 " 107 = k |
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
csaw2012reversing: file format elf64-x86-64 | |
Disassembly of section .init: | |
0000000000400460 <_init>: | |
400460: 48 83 ec 08 sub $0x8,%rsp | |
400464: e8 93 00 00 00 callq 4004fc <call_gmon_start> | |
400469: e8 22 01 00 00 callq 400590 <frame_dummy> |
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 <GL/glc.h> | |
#include <GL/glut.h> | |
int main(int argc, char** argv) | |
{ | |
GLint ctx; | |
glutInit(&argc, argv); |
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
diff --git src/load.c src/load.c | |
index 39a08ba..41fdfa2 100644 | |
--- src/load.c | |
+++ src/load.c | |
@@ -202,8 +202,11 @@ static ScmObj load_after(ScmObj *args, int nargs, void *data) | |
/* C-continuation of the loading */ | |
static ScmObj load_cc(ScmObj result, void **data) | |
{ | |
+ ScmObj read_proc = SCM_UNDEFINED; | |
+ SCM_BIND_PROC(read_proc, "read", Scm_GaucheInternalModule()); |
OlderNewer