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
@setlocal | |
@set "PROMPT=%0> " | |
@call :"%1" | |
@endlocal | |
@exit /b | |
:"" | |
:"package" | |
for %%I in (386 amd64) do call :package1 windows %%I .exe | |
for %%I in (386 amd64) do call :package1 linux %%I |
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
package main | |
import ( | |
"context" | |
"database/sql" | |
"fmt" | |
_ "github.com/denisenkom/go-mssqldb" | |
) |
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
Imports System.Data.SqlClient | |
Public Class MSSQLDB | |
Implements IDisposable | |
'*** for example *** | |
'Using conn As New MSSQLDB("Initial Catalog=...;Data Source=taiyodenki;Server=...;UID=...;PWD=...") | |
' Using res = conn.Query("SELECT * FROM T_FOO") | |
' While res.Read() | |
' Console.WriteLine("Serial={0}", res.GetInt32(0)) |
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
package nodos | |
import ( | |
"fmt" | |
"time" | |
) | |
var clockmark = []rune{'-', '\u2216', '|', '/'} | |
func Progress() func() { |
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
package main | |
import ( | |
"os" | |
"unsafe" | |
"errors" | |
"golang.org/x/sys/windows" | |
"golang.org/x/xerrors" | |
) |
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
// +build ignore | |
package main | |
import ( | |
"fmt" | |
"os" | |
"golang.org/x/sys/windows" | |
) |
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
# check.ps1 | |
$v = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($Args[0]) | |
if( $v ){ | |
Write-Host("FileVersion(StringFileInfo)=",$v.FileVersion) | |
Write-Host(" FileMajorPart(FixedFileInfo)=",$v.FileMajorPart) | |
Write-Host(" FileMinorPart(FixedFileInfo)=",$v.FileMinorPart) | |
Write-Host(" FileBuildPart(FixedFileInfo)=",$v.FileBuildPart) | |
Write-Host(" FilePrivatePart(FixedFileInfo)=",$v.FilePrivatePart) | |
Write-Host("ProductVersion(StringFileInfo)=",$v.ProductVersion) |
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
package dos | |
import ( | |
"syscall" | |
"unsafe" | |
) | |
const ( | |
verBuildNumber = 0x0000004 | |
verMajorVersion = 0x0000002 |
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
; S式の中から、未宣言の変数を検索する | |
; vars - 宣言済み変数のリスト | |
; s-exp - S式 | |
; returns | |
; 未宣言の変数のリスト | |
(defun strictsub (vars s-exp / warnings word add-warn test-var call-self eval-rest) | |
(setq warnings nil) | |
(setq add-warn (lambda (x) | |
(setq warnings (cons x warnings)) |
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
Imports System.Runtime.CompilerServices | |
Module DictExtension | |
<Extension()> | |
Public Function GetOr(Of K, V)(ByVal dict As IDictionary(Of K, V), key As K, ByVal f As Func(Of V)) As V | |
Dim val As V = Nothing | |
If Not dict.TryGetValue(key, val) Then | |
val = f() | |
dict.Add(key, val) | |
End If |