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
"Vim で BOM を付けるには | |
:se fenc=utf-8 bomb | |
"vimの改行コードをLF(unix)に変更する | |
set fileformat=unix |
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
<?php | |
// simplenote-export.txtのパス | |
$simplenoteExportFilePath = "simplenote-export.txt"; | |
// テキストファイルの読み込み | |
$fp = fopen($simplenoteExportFilePath,"r"); | |
$readedText = array(); | |
while(!feof($fp)){ |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
function ConvertStringToPAnsiChar(str:string):PAnsiChar; | |
var | |
p:PAnsiChar; | |
begin | |
GetMem(p, Length(string) + 1); | |
System.AnsiStrings.StrPCopy(p, str); | |
Result := p; | |
end; |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Program | |
{ | |
class Program | |
{ |
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
@echo off | |
IF "%PROCESSOR_ARCHITECTURE%" == "AMD64" ( | |
set PROGRAM_FILES="Program Files (x86)" | |
) ELSE IF "%PROCESSOR_ARCHITECTURE%" == "x86" ( | |
set PROGRAM_FILES="Program Files" | |
) | |
echo %PROGRAM_FILES:"=% | |
pause |
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
public string DeleteDoubleQuote(string value) { | |
if (value.Substring(0, 1) != @"""") { return value; } | |
if (value.Substring(value.Length - 1) != @"""") { return value; } | |
value = value.Substring(1); // 開始位置の「"」を削除 | |
value = value.Remove(value.Length - 1); // 終了位置の「"」を削除 | |
return value; | |
} |
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
using IniParser; | |
using IniParser.Model; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ReadIniFileKey | |
{ |
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
private void MakeIniFile(object sender, EventArgs e) | |
{ | |
string path = "SAMPLE.ini"; | |
var iniData = new IniData(); | |
iniData.Configuration.AssigmentSpacer = ""; | |
var section = new SectionData("SAMPLE"); | |
iniData.Sections.Add(section); | |
using (var sw = new StreamWriter(path, false)) | |
{ |
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
# タスクスケジューラにタスクを登録します。 | |
# Register ScheduledTask | |
# friday,sunday, AP3:00 | |
$Trigger = New-ScheduledTaskTrigger -Weekly -DaysOfWeek Sunday,Friday -At "03:00:00" | |
# execute sample.exe | |
$Action = New-SCheduledTaskAction -Execute "D:\sample.exe" | |
Register-ScheduledTask -TaskPath "\Sample" -TaskName "test" -User "SYSTEM" -RunLevel Highest -Trigger $Trigger -Action $Action |
OlderNewer