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 random | |
s = list(range(1,10)) | |
while s[0]/(s[1]*10+s[2])+s[3]/(s[4]*10+s[5])+s[6]/(s[7]*10+s[8]) != 1: | |
random.shuffle(s) | |
print(s) |
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/fontforge | |
if ($argc !=2) | |
Print("Usage: ", $0, " fontname") | |
Quit() | |
else | |
Open($1) | |
endif | |
SelectAll() |
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
if [ -s $prefix/grubenv ]; then | |
load_env | |
fi | |
if [ "${next_entry}" ] ; then | |
set default="${next_entry}" | |
set next_entry= | |
save_env next_entry | |
set boot_once=true | |
else | |
set default="${saved_entry}" |
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/perl -w | |
# 作者: 洪朝貴 http://www.cyut.edu.tw/~ckhung/, 2001. | |
# 趙惟倫 <[email protected]>, 2012. | |
# 功能: 讓使用者下象棋的程式. 純粹只是版面安排及棋子移動; | |
# 沒有電腦下棋的功能. | |
# 需求: 系統內應有 ncurses 程式庫, 及 perl 的 curses 模組. | |
# 操作說明: 用方向鍵移動遊標, 用空間棒撿起/放下棋子, | |
# 按 s 將目前盤面存檔. 所存檔案, 下次可作為命令列參數 | |
# 其他: 在彩色終端機上可顯示彩色 (例如 cxterm-color 或 linux | |
# console); 在黑白終端機上 (例如 MS Windows 的 telnet) |
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/gmake -sf | |
#modified after jserv's Makefile.qsort from | |
#http://blog.linux.org.tw/~jserv/archives/002035.html | |
gt = $(shell if [ $1 -gt $2 ] ; then echo TRUE; fi) | |
lt = $(shell if [ $1 -lt $2 ] ; then echo TRUE; fi) | |
le = $(shell if [ $1 -le $2 ] ; then echo TRUE; fi) | |
define qsort | |
$(if $(call le,$(words $1),1),$1, \ | |
$(call qsort, \ |
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/wish | |
# @(#)tk4gram, v1.2 2000-02-26 Bluebat | |
set Program Tk4gram | |
set Version 1.2 | |
set Data $Program.dat | |
set Font {Lucida 12 bold} | |
set F {Lucida 10} | |
#====================== arguments ========================= | |
for {set x 0} {$x < $argc} {incr x} { | |
switch -- [lindex $argv $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
#!/usr/bin/python | |
#coding:utf-8 | |
import sys, string, telnetlib, gettext | |
from qt import * | |
gettext.install("topbox") | |
chrBegin = "*" | |
chrEnd = chr(252) | |
chrBroadcast = chr(32) |
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
PARAMETERS p1, p2, p3, p4, p5, p6 | |
SET TALK OFF | |
SET DELETED ON | |
SET EXACT ON | |
SET ESCAPE OFF | |
SET EXCLUSIVE ON | |
SET CENTURY ON | |
SET REPROCESS TO AUTOMATIC | |
SET RESOURCE OFF | |
SET STATUS OFF |