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
foreach (var item in items.ToList()) | |
{ | |
items.Remove(item); | |
} |
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 Function GetSwapNumber(ByVal session As ISession, ByVal instrument As Instrument) As String | |
Dim swapNumber As String = String.Empty | |
Dim crit As DetachedCriteria = DeCrit.UniqueSwapAssignmentByInstrumentId(instrument) | |
Dim swapAssignments As IList(Of SwapAssignment) | |
Dim newSession As ISession = session.GetSession(EntityMode.Poco) | |
swapAssignments = crit.GetExecutableCriteria(newSession).List(Of SwapAssignment)() | |
For Each swap As SwapAssignment In swapAssignments | |
If (swap.Swap IsNot Nothing) Then |
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
$uacRegPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" | |
$uacRegValue = "EnableLUA" | |
$uacEnabled = $false | |
# http://msdn.microsoft.com/en-us/library/windows/desktop/ms724832(v=vs.85).aspx | |
$osVersion = [Environment]::OSVersion.Version | |
if ($osVersion -ge [Version]'6.0') | |
{ | |
$uacRegSetting = Get-ItemProperty -Path $uacRegPath | |
try { |
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
$exe = 'git'; | |
if($exe.EndsWith('.exe') -or $exe.EndsWith('.bat')) { $exe = $exe.Substring(0, $exe.Length - 4)}; (ls env:\path).Value.split(';') | %{ if( test-path "$_\$exe.exe" ) { ls "$_\$exe.exe" }; if( test-path "$_\$exe.bat" ) { ls "$_\$exe.bat" }; } | %{ if($_.FullName.EndsWith('.exe') -or $_.FullName.EndsWith('.bat')) { $_.FullName } } |
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
Bind<IJob>().ToMethod(context => new SyncWithMeetingsJob(context.Kernel, interval: TimeSpan.FromMinutes(Config.GetConfigurationSettings().MeetingsMinutesBetweenUpdates), timeout: TimeSpan.FromMinutes(20))).InSingletonScope(); |
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
cmd /C "webpicmdline\webpicmdline.exe /AcceptEula /SuppressReboot /Products:WindowsInstaller31" | |
cmd /C "webpicmdline\webpicmdline.exe /AcceptEula /SuppressReboot /Products:WindowsInstaller45" | |
# Powershell | |
cmd /C "webpicmdline\webpicmdline.exe /AcceptEula /SuppressReboot /Products:PowerShell" | |
cmd /C "webpicmdline\webpicmdline.exe /AcceptEula /SuppressReboot /Products:PowerShell2" | |
# .NET | |
cmd /C "webpicmdline\webpicmdline.exe /AcceptEula /SuppressReboot /Products:NETFramework20SP2" | |
cmd /C "webpicmdline\webpicmdline.exe /AcceptEula /SuppressReboot /Products:NETFramework35" |
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
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" | |
$psFileFullPath = Join-Path $toolsDir "ps1crash.ps1" | |
Install-BinFile ` | |
-Name ps1crash ` | |
-Path "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell.exe" ` | |
-Command "-NoProfile -ExecutionPolicy unrestricted -Command `"&'$psFileFullPath' %*`"" |
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 SomeClass { | |
public void SomeMethod() { | |
this.Log().Info(() => "Here is a log message with params which can be in Razor Views as well: '{0}'".FormatWith(typeof(SomeClass).Name)); | |
} | |
} |
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 | |
SET DIR=%~dp0% | |
@PowerShell -NoProfile -ExecutionPolicy unrestricted -Command "& '%DIR%setup.ps1' %*" | |
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
xcopy code_drop\nuget\*.nupkg somewhere\Packages /r /i /c /h /k /e /y |