This file contains hidden or 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
[Environment]::GetFolderPath([Environment+SpecialFolder]::Desktop) |
This file contains hidden or 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
var next_action = null; | |
// next_action = 'tweet'; | |
var text = T.text; | |
var pattern = '\n'; | |
var j = text.indexOf(pattern, T.range.loc + T.range.len ); | |
var i = text.lastIndexOf(pattern, T.range.loc - 1); | |
i = (i === -1) ? 0 : i + pattern.length; | |
j = (j === -1) ? text.length : j + 1; |
This file contains hidden or 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
# Python 最速文法 | |
# 参考 | |
# みんなのPython 第3版 | |
# [python] 年末大感謝祭!初心者脱出のためのPythonTipsを50個紹介 | |
# http://kwatch.houkagoteatime.net/blog/2013/12/07/python-tips/ | |
# エンコード指定 |
This file contains hidden or 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
; Function: 32bit環境か64bit環境かを判別し、異なるEXEを実行する | |
; NOTICE: 32bit環境でビルドしてください | |
#NoEnv | |
SetWorkingDir %A_ScriptDir% | |
GetNativeSystemInfo() ; OS の種類を取得 | |
{ | |
VarSetCapacity(si,44) | |
DllCall("GetNativeSystemInfo", "uint", &si) | |
if ErrorLevel |
This file contains hidden or 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
-- ハイフンを2つ書くと1行コメントになる | |
--[[ | |
複数行コメント | |
複数行コメント | |
複数行コメント | |
]] | |
-- 標準出力への改行付き出力 | |
print("Hello, world!") |
This file contains hidden or 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
XmlSerializer serializer = new XmlSerializer(typeof(RecordInfo)); | |
RecordInfo record2 = new RecordInfo(); | |
using (FileStream fs = new FileStream(GetXMLFilePath(), FileMode.Open)) | |
{ | |
record2 = serializer.Deserialize(fs) as RecordInfo; | |
// XML からオブジェクトが復元されている | |
} |
This file contains hidden or 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
Dim CB as Object | |
Set CB = new DataObject | |
With CB | |
.SetText "セットしたい文字列" | |
.PutInClipboard 'クリップボードに反映する | |
End With |
This file contains hidden or 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
string charCode = "304C"; | |
int charCode16 = Convert.ToInt32(charCode,16); // 16進数文字列 -> 数値 | |
char c = Convert.ToChar(charCode16); // 数値(文字コード) -> 文字 | |
string newChar = c.ToString(); // "が" という「文字列」 |
This file contains hidden or 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
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" projectname.csproj /t:build |
This file contains hidden or 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
using System; | |
using System.Linq; | |
namespace SampleParams | |
{ | |
class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
Console.WriteLine("Sum={0}",Sum(1,2,3,4,5)); |
NewerOlder