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
apply plugin: SyncPomPlugin | |
class SyncPomPlugin implements Plugin<Project> { | |
void apply(Project project) { | |
project.task('to-pom', type: ToPomTask).dependsOn('eclipse') | |
} | |
} | |
class ToPomTask extends DefaultTask { | |
def ToPomTask() { |
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 prompt { | |
(Get-Host).UI.RawUI.WindowTitle = "PwoerShell - $pwd" | |
$name = (new-object "IO.FileInfo" $pwd.ProviderPath).name | |
"PS ${name}> " | |
} | |
function path { $env:path.split(";", [StringSplitOptions]::RemoveEmptyEntries) } | |
function set-env([string]$key, [string]$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
import java.io.File; | |
import java.util.HashMap; | |
import java.util.Map; | |
import org.junit.Test; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.chrome.ChromeDriver; | |
import org.openqa.selenium.chrome.ChromeDriverService; | |
import org.openqa.selenium.remote.DesiredCapabilities; |
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
package org.thymeleaf.processor.ext; | |
import java.util.List; | |
import java.util.Map; | |
import org.thymeleaf.Arguments; | |
import org.thymeleaf.dom.Element; | |
import org.thymeleaf.dom.Node; | |
import org.thymeleaf.dom.ext.ElementGrouping; | |
import org.thymeleaf.dom.ext.ElementWalker; |
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 Project1; | |
uses | |
TestClass in 'TestClass.pas'; | |
{$APPTYPE CONSOLE} | |
type | |
TMethodTable = packed record | |
Count: smallint; |
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 Project1; | |
uses | |
Sysutils; | |
{$APPTYPE CONSOLE} | |
type | |
TMethodWithParam = procedure (arg: integer) of object; | |
TMethodWithParam2 = procedure (arg1, arg2: integer) of object; |
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 o() { | |
$i = 20 | |
function fun_i() { return $i } | |
return fun_i | |
} |
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($v) { $v } | |
test $(if ($true) { "A" } else { "B" }) |
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
$selectedFile = | |
$(this) | |
.map(function(i, elem) { return elem.files; }) | |
.first() |
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 static IDictionary<TK, TV> EnumToMap<TEnum>() { | |
return EnumToMap(typeof(TEnum)); | |
} | |
public static IDictionary<TK, TV> EnumToMap(params Type[] enumTypes) { | |
return | |
enumTypes | |
.SelectMany(enumType => { | |
Enum.GetValues(enumType) | |
.Select(v => new { Key = Enum.GetName(enumType, Value = (TV)v }); |