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 Enter-Using-Undisposable($receiver, [scriptblock]$body, [scriptblock]$finally) { | |
try { | |
return $receiver | % { & $body } | |
} | |
finally { | |
& $finally | |
} | |
} | |
function Enter-Using-Excel([scriptblock]$block) { |
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 ExampleTest; | |
interface | |
uses | |
DUnitX.TestFramework; | |
type | |
[TestFixture] | |
TMyTestObject = class(TObject) |
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
// OK | |
IEnexArraycollection = interface(ICollection<TArray<integer>>) | |
function Op: TEnexExtOps<TArray<integer>>; | |
end; | |
// NG | |
IEnexArrayCollection<T> = interface(ICollection<TArray<T>>) | |
function Op: TEnexExtOps<TArray<T>>; | |
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
program RecGenerics; | |
uses | |
System.SysUtils; | |
type | |
IHogeClass<T> = interface; | |
TTest<T> = record | |
Value: T; |
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
procedure MyForm.AfterConstruction; | |
var | |
expr: TExpressionItem; | |
begin | |
inherited; | |
BindList2 := TBindControlList.Create(Self); | |
BindList2.SourceComponent := AdapterBindSource1; | |
BindList2.SourceMemberName := 'ColorsName1'; |
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
[o][230]Command aliases not defined when hosting | |
[c][229]Bitwise operators -band, -bor and -bxor | |
[o][228]Invalid expression stops all further processing of input | |
[c][227]Implement subexpression operator $(...) | |
[c][226]CSV cmdlets support; Escape character support | |
[o][225]Single quoted string doesn't allow escaped single quotes | |
[c][224]Get-Member fix; Introduction of Select-Object cmdlet; Refactoring | |
[c][223]Split-Path cmdlet | |
[c][222]Environment provider | |
[o][221]SessionStateProxy.GetVariable should return the actual object for value types |
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 Sample; | |
interface | |
uses | |
SysUtils, Classes, FMX.Controls; | |
type | |
// 名前決定するためのイベント |
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
defmodule Option do | |
defmodule None, do: defstruct [] | |
defmodule Some, do: defstruct [:value] | |
def none(), do: %None{} | |
def some(x), do: %Some{ value: x } | |
end | |
defprotocol FunctorSpec do | |
@type t :: term |
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 test(){ | |
get-pscallstack | select -skip 1 -first 1 | %{ | |
if ([io.path]::GetExtension($_.ScriptName) -eq ".psm1") { | |
if (test-path "$($_.ScriptName).config") { | |
[xml](Get-Content "$($_.ScriptName).config") | |
} | |
elseif (test-path "$($_.ScriptName).json") { | |
[string]::join('', (Get-Content "$($_.ScriptName).json")) | ConvertFrom-Json | |
} | |
else { |
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
<?xml version="1.0" ?> | |
<configuration> | |
<appSettings> | |
<add key="AAA"> | |
<sets> | |
<add key="AAA_1" value="値1" /> | |
<add key="AAA_2" value="値2" /> | |
<add key="AAA_3" value="値3" /> | |
</sets> | |
</add> |