Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fornext1119
fornext1119 / 0_reuse_code.js
Created March 5, 2016 04:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

ヤコビの反復法

use constant N => 3;

my @a = ([9,2,1,1],[2,8,-2,1],[-1,-2,7,-2],[1,-1,-2,6]);
my @b = (20,16,8,17);
my @c = (0,0,0,0);

# ヤコビ反復法
jacobi(\@a, \@b, \@c);
@fornext1119
fornext1119 / DeleteNames.bas
Created September 9, 2013 02:10
Excel の 名前定義 を 一括削除
Public Sub DeleteNames()
For Each nm In ActiveWorkbook.Names
Debug.Print nm.Name
nm.Delete
Next
End Sub

Project Euler を はじめから

4ヶ月もほったらかしになってたので、 復習がてら Problem 1 からやってみる。

F #

初項a、公差d の等差数列の初項から第n項 (末項 l=a+(n-1)d) までの和Snは...

let sn a lim =
  let n = lim / a in
  let l = a   * n in

Access で Oracle に ODBC 接続したときの文字化け

HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OraClient11g_home1\NLS_LANG

JAPANESE_JAPAN.JA16SJIS

を設定する

JA16EUC, AL16UTF8 だと ODBCエラーになって接続できなかった

@fornext1119
fornext1119 / gist:5441435
Created April 23, 2013 07:10
ファイルの更新日付を変更する
Set fs = CreateObject("Scripting.FileSystemObject")
file = WScript.Arguments(0)
If WScript.Arguments.Count > 1 Then
dt = CDate(WScript.Arguments(1))
Else
dt = Now
End If
With CreateObject("Shell.Application")
With .NameSpace(fs.GetParentFolderName(file))