Skip to content

Instantly share code, notes, and snippets.

@honda0510
honda0510 / table.html
Last active January 14, 2018 02:40
入れ子テーブル with Bootstrap
<table class="table table-bordered table-striped">
<tr>
<td>cell</td>
<td class="has-table">
<table class="table table-bordered table-striped inner-table">
<col class="first">
<col>
<tr class="first">
<td>cell-11</td>
<td>cell-12</td>
@honda0510
honda0510 / defineProperty.ts
Created August 5, 2017 07:37
JavaScript: プロパティへの値代入時の処理を変更する
class Greeter {
constructor(private _greeting: string) {
}
get greeting() {
return this._greeting;
}
set greeting(value: string) {
this._greeting = value;
}
}
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>Study English</title>
<style>
#questions {
display: none;
}
</style>
@honda0510
honda0510 / Sample.scala
Created July 19, 2015 01:26
implicit programming
import java.util.Date
import org.joda.time.format.DateTimeFormat
// 暗黙のクラス
class Sample1 {
def sample = {
"Gunma".hello // => Hello, Gunma
}
@honda0510
honda0510 / vi.scpt
Created August 7, 2014 15:27
Vim で開く
on run argv
tell application "Terminal"
activate
do script "vi " & item 1 of argv in front window
end tell
end run
@honda0510
honda0510 / Vagrantfile
Created July 6, 2014 09:52
vagrantでhttpdサーバの起動がうまくいかない
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "centos64_gihyo"
config.vm.network :private_network, ip:"192.168.33.10"
@honda0510
honda0510 / ShowRepoUrl.js
Created March 13, 2014 00:32
WindowsエクスプローラのステータスバーにSVNリポジトリのURLを表示
var wsh_shell = new ActiveXObject('WScript.Shell');
var fso = new ActiveXObject('Scripting.FileSystemObject');
var windows = getWindows();
var temp_path = getTempPath();
var repo_url;
// エクスプローラのステータスバーにリポジトリのURLを表示
for ( var i = 0, n = windows.count, w; i < n; i++ ) {
w = windows(i);
@honda0510
honda0510 / BSTree.cls.vba
Last active January 3, 2016 20:39
VBAで二分探索木
Option Explicit
Private Root As TreeNode
Private Values() As String
Public Sub Add(v As String)
Dim n As TreeNode
If Root Is Nothing Then
Set Root = New TreeNode
@honda0510
honda0510 / Module1.bas
Created January 10, 2014 02:40
VBAからIEの画像を画像URLを用いずにダウンロードする方法 http://www.moug.net/faq/viewtopic.php?t=68257
Option Explicit
' 参照設定
' Microsoft WinHTTP Services, version 5.1
' Microsoft VBScript Regular Expressions 5.5
' Microsoft ActiveX Data Objects 2.x Library
Private reg As New VBScript_RegExp_55.RegExp
Sub test()
@honda0510
honda0510 / Module1.bas
Created March 31, 2013 01:40
『マージソート』 ~ 車輪の再発明シリーズ ~ http://www.moug.net/faq/viewtopic.php?t=66006
Option Explicit
' マージソート
Function MergeSort(List) As Variant
Dim Lists As Variant
If ArrayCount(List) <= 1 Then
MergeSort = List
Else
Lists = Bisect(List) ' 配列を2分する