Skip to content

Instantly share code, notes, and snippets.

@kencoba
kencoba / CFD.scala
Created February 3, 2014 03:01
CFD法を学ぶ、第4回「ソフトウェアテスト技法ドリル」勉強会 ref: http://qiita.com/kencoba/items/958e7673e922fb3902b6
// [CFD法を学ぶ、第4回「ソフトウェアテスト技法ドリル」勉強会](http://softest.cocolog-nifty.com/blog/2011/04/cfd4-28d6.html)
object 買い物合計金額 extends Enumeration {
type 買い物合計金額 = Value
val v2000円以上,その他 = Value
}
object カード持参 extends Enumeration {
type カード持参 = Value
val 持参している,持参していない = Value
}
@kencoba
kencoba / file0.txt
Created February 4, 2014 05:58
曜日を調べるのが面倒。 ref: http://qiita.com/kencoba/items/e2b96f208097bd0e50ba
(defun format-specific-day (ymd)
"insert month,day and day of the week"
(interactive "syyyy-mm-dd: ")
(when (string-match "^\\([0-9]+\\)-\\([0-9]+\\)-\\([0-9]+\\)$" ymd)
(let ((yy (string-to-number (match-string 1 ymd)))
(mm (string-to-number (match-string 2 ymd)))
(dd (string-to-number (match-string 3 ymd))))
(insert (format-time-string "%m月%d日(%a)"
(encode-time 0 0 0 dd mm yy nil 0))))))
(defun slime-complete-delay-restoration ()
(if (fboundp 'make-local-hook) (make-local-hook 'pre-command-hook))
(add-hook 'pre-command-hook
'slime-complete-maybe-restore-window-configuration))
;;; Stuff only available in XEmacs
(slime-defun-if-undefined add-local-hook (hook function &optional append)
(if (fboundp 'make-local-hook) (make-local-hook hook))
(add-hook hook function append t))
(setq inferior-lisp-program "C:\\usr\\ccl\\wx86cl64")
; SLIME 2013-11-17
CL-USER> (ql:quickload :integral)
To load "integral":
Load 1 ASDF system:
integral
; Loading "integral"
(:INTEGRAL)
CL-USER> (import 'integral:connect-toplevel)
T
@kencoba
kencoba / データ抽出
Created March 20, 2014 09:23
複数Excelブックの、特定シート、特定列を全部マージする ref: http://qiita.com/kencoba/items/8f5c35a874bda4b00fcd
Option Explicit
Sub データ抽出()
Dim bkInput As Workbook
Set bkInput = ThisWorkbook
Dim shtInput As Worksheet
Set shtInput = bkInput.Sheets(1)
Dim bkOutput As Workbook
Set bkOutput = Workbooks.Add
shtInput.Copy Before:=bkOutput.Sheets(1)
(define-event f.enter)
(define-event f.exit)
(define-event b.enter)
(define-event b.exit)
(define-event c.open)
(define-event c.close)
Option Explicit
Private cPC As Range ' ProgramCounter
Private cCR As Range ' CommandRegister
Private cAR As Range ' AddressRegister
Private cAA As Range ' AccumulatorA
Private cAB As Range ' AccumulatorB
Sub Init()
Set cPC = Worksheets(1).Cells(2, 4)
Set cCR = Worksheets(1).Cells(2, 5)
@kencoba
kencoba / Definition
Created April 2, 2014 01:49
[SyncStitch]プロセスの逐次合成 ref: http://qiita.com/kencoba/items/fb650eb1bee05660266b
(define-event a)
(define-event b)
(define-event c)
@kencoba
kencoba / deadlock
Created April 2, 2014 09:07
[SyncStitch]deadlock検査の実験 ref: http://qiita.com/kencoba/items/711fa72e4dd1224b5379
; [masaterukの日記](http://d.hatena.ne.jp/masateruk/20130813/1376398968)
; Definitions
(define-channel sch (x) '((0) (1)))
(define-channel rch (x) '((0) (1)))
; SYS
(define-process Sender
(! rch (0)
(? sch (x) (= x 0)