Skip to content

Instantly share code, notes, and snippets.

View tamago324's full-sized avatar
⌨️
Enjoy Keeb!

tamago324 tamago324

⌨️
Enjoy Keeb!
  • japan
View GitHub Profile
@tamago324
tamago324 / git-lesson.md
Created September 28, 2017 02:32 — forked from yatemmma/git-lesson.md
git初心者への道 - お仕事で困らないレベルまでググっとします。

git初心者への道

まずやってみよう - コミットする、ログを見る、差分を見る

初登場するコマンド: init, add, commit, log, config, status, diff

@tamago324
tamago324 / string_format.vb
Created September 28, 2017 04:11
String.Formatを使って、文字列に当てはめる
Dim x As String, y As String
x = "Hello"
y = "world"
Console.WriteLine(String.Format("{0} {1}", x, y)) ' Hello world
@tamago324
tamago324 / .vimrc
Last active September 29, 2017 22:20
TOML syntax
call dein#add('cespare/vim-toml')
@tamago324
tamago324 / transaction.vb
Created October 4, 2017 05:03
VB.net transaction
Dim con As System.Data.SqlClient.SqlConnection = Nothing
Dim tran As System.Data.SqlClient.SqlTransaction = Nothing
Try
Dim serverName As String = "localhost" ' 例) 192.168.0.173
Dim dbName As String = "testdb"
Dim userId As String = "sa"
@tamago324
tamago324 / font-style.css
Created October 4, 2017 05:12
はてなブログのフォントを設定
/* フォント */
body {
font-family: Maven Pro,Helvetica,Arial,ヒラギノ角ゴ Pro W3,Hiragino Kaku Gothic Pro,メイリオ,Meiryo,MS\ Pゴシック,MS PGothic,sans-serif;
}
@tamago324
tamago324 / isExists.vba
Created October 4, 2017 05:20
フォルダが存在しているか - VBA
If Dir("C:\temp", vbDirectory) <> "" Then
Workbooks.Open "C:\temp"
Else
MsgBox "C:\temp" & vbCrLf & "が存在しません"
End If
@tamago324
tamago324 / Form1.vb
Created October 5, 2017 02:52
裏で重い処理をしておく - VB.net
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim form2 As Form2 = New Form2
form2.Show()
End Sub
End Class
@tamago324
tamago324 / Module1.vb
Last active October 5, 2017 03:01
XMLを読み込む
Imports System.Xml
Module Module1
Sub Main()
Console.WriteLine("Start!")
' XMLを扱うためのオブジェクト
Dim xmlDoc As New XmlDocument()
@tamago324
tamago324 / datetime_time_property.py
Created October 9, 2017 13:36
Pythonのdatetime.timeのソースでのプロパティの記述
# Read-only field accessors
@property
def hour(self):
"""hour (0-23)"""
return self._hour
@tamago324
tamago324 / nlp100_2015_04.py
Created October 22, 2017 03:28
04. 元素記号
#!/usr/bin/env python
s = 'Hi He Lied Because Boron Could Not Oxidize Fluorine. New Nations Might Also Sign Peace Security Clause. Arthur King Can.'
result = {}
# enumerate()でループの回数を取得する
for i, elem in enumerate(s.split(), start=1):
# 指定番号かどうか
if {i} & {1, 5, 6, 7, 8, 9, 15, 16, 19}: