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; | |
namespace Test | |
{ | |
public class Program | |
{ | |
public static void Main() | |
{ | |
Console.WriteLine("Hello, world!"); | |
} |
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 class Sample : ISample | |
{ | |
public Sample() { } | |
public Sample(string str) | |
{ | |
this.StringProperty = str; | |
} | |
public string StringProperty { get; set; } | |
public void CallMethod() |
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 | |
setlocal | |
set ExePolicy=RemoteSigned | |
for /f "usebackq tokens=*" %%i in (`powershell.exe -Command "Get-ExecutionPolicy"`) do @set Result=%%i | |
echo ExecutionPolicyは%Result%です。 | |
powershell Set-ExecutionPolicy %ExePolicy% | |
echo ExcutionPolicyを%ExePolicy%に変更しました。 |
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 static class XElementExtensions | |
{ | |
public static string GetSingleElementValue(this XElement element, params XName[] names) | |
{ | |
if (names.Length < 1) | |
{ | |
return string.Empty; | |
} | |
if (names.Length == 1) | |
{ |
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.Data; | |
using FirebirdSql.Data.FirebirdClient; | |
namespace FirebirdTest | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var connectionBuilder = new FbConnectionStringBuilder(); |
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
/// <summary> | |
/// IISUtility | |
/// </summary> | |
public class IisUtility | |
{ | |
/// <summary> | |
/// IISへのSite登録 | |
/// </summary> | |
/// <param name="inf"></param> | |
/// <returns></returns> |
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 Form1() { | |
InitializeComponent(); | |
SessionEndingEventHandler sessionEndHandler = (sender, e) => { | |
if (e.Reason == SessionEndReasons.SystemShutdown) { | |
if (MessageBox.Show("シャットダウンしようとしています。\n\n本当にいいですか?", "質問", MessageBoxButtons.YesNo) == DialogResult.Yes) { | |
e.Cancel = true; | |
} | |
} | |
}; | |
SystemEvents.SessionEnding += sessionEndHandler; |
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
#nat descriptor backward-compatibility 1 | |
#save | |
#restart |
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
$path = "HKLM:\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters"; | |
Set-ItemProperty -path $path -name "LayerDriver JPN" -type string -value "kbd106.dll" | |
Set-ItemProperty -path $path -name "OverrideKeyboardIdentifier" -type string -value "PCAT_106KEY" | |
Set-ItemProperty -path $path -name "OverrideKeyboardSubtype" -type DWord -value 2 | |
Set-ItemProperty -path $path -name "OverrideKeyboardType" -type DWord -value 7 | |
Get-ItemProperty $path |
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
dism /online /enable-feature ` | |
/featurename:IIS-WebServerRole ` | |
/featurename:IIS-WebServer ` | |
/featurename:IIS-CommonHttpFeatures ` | |
/featurename:IIS-StaticContent ` | |
/featurename:IIS-DefaultDocument ` | |
/featurename:IIS-DirectoryBrowsing ` | |
/featurename:IIS-HttpErrors ` | |
/featurename:IIS-HttpRedirect ` | |
/featurename:IIS-ApplicationDevelopment ` |
OlderNewer