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
| unit MyInfo; | |
| interface | |
| type | |
| TMyInfo = class | |
| private | |
| FName: string; | |
| FAge: integer; | |
| public |
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.Collections.Generic; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Runtime.Serialization.Json; | |
| using System.Text; | |
| namespace Sample | |
| { | |
| public static class DataSerializerSample |
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
| # タスクスケジューラにタスクを登録します。 | |
| # 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 |
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
| 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 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 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 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
| 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 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
| @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 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.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace Program | |
| { | |
| class Program | |
| { |
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 ConvertStringToPAnsiChar(str:string):PAnsiChar; | |
| var | |
| p:PAnsiChar; | |
| begin | |
| GetMem(p, Length(string) + 1); | |
| System.AnsiStrings.StrPCopy(p, str); | |
| Result := p; | |
| end; |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
NewerOlder