- Mac OSX El Capitan 10.11.1
- mono 4.2.1
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
//================================================================================ | |
// 共通 | |
//================================================================================ | |
type EmailAddress = | |
{ EAValue: string } | |
type SurfaceAddress = | |
{ SAValue: string } | |
type Customer = |
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
'目的の要素を選択 | |
Sub Main() | |
Application.OnTime Now + TimeSerial(0, 0, 2), "GetSub" | |
End Sub |
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
' ADODB のインメモリ レコードセットを Access 非連結フォームのレコードソースに | |
' セットするサンプル コード。 | |
' 下記をコピペでテストする場合は、運送会社テーブルから表形式フォームをオート | |
' フォームで作成して、フォームのレコードソース プロパティを削除すると多少楽。 | |
Option Compare Database | |
Option Explicit | |
Private Sub Form_Load() | |
' インメモリ レコードセットをフォームのレコードソースにセットします。 |
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
module HelloExcelSplit | |
open ExcelDna.Integration | |
let splitIndex (group: int) (total: int): seq<seq<int>> = | |
let d = total / group | |
let m = total % group | |
let counts = seq { for i in 0 .. group - 1 do yield d + if i < m then 1 else 0 } | |
let (_, xs) = Seq.fold (fun (a, xs) x -> (a + x, Seq.append xs (Seq.singleton (seq { a .. a + x - 1 })))) (0, Seq.empty) counts | |
xs |
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
kansuuji <- function(x) { | |
# 漢字から数値へのマッピング | |
# 万未満の位 | |
map_low <- c( | |
〇 = 0, 一 = 1, 二 = 2, 三 = 3, 四 = 4, | |
五 = 5, 六 = 6, 七 = 7, 八 = 8, 九 = 9, | |
十 = 10, 百 = 100, 千 = 1000 | |
) | |
# 万以上の位 | |
map_up <- c( |
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 python | |
# coding: utf-8 | |
''' | |
auto switch keyboard between different applications | |
if you want to change the app list, modify the var 'ignore_list' | |
一定要用系统自带的 python, 用 brew 或其他方式安装的 python 不能识别 AppKit 等模块,花了很长时间在 pyobjc 的文档中看到这样一句话: | |
The system version of Python (``/usr/bin/python``) includes a copy of | |
PyObjC starting at MacOSX 10.5 ("Leopard"). Installing other versions |
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
Option Explicit | |
Public Sub Initialize(args() As Variant) | |
' | |
End Sub |
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
au FileType qf call AdjustWindowHeight(3, 10) | |
function! AdjustWindowHeight(minheight, maxheight) | |
let l = 1 | |
let n_lines = 0 | |
let w_width = winwidth(0) | |
while l <= line('$') | |
" number to float for division | |
let l_len = strlen(getline(l)) + 0.0 | |
let line_width = l_len/w_width | |
let n_lines += float2nr(ceil(line_width)) |
OlderNewer