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
# download the package | |
Write-Host "Downloading $url to $file" | |
$cred = get-credential | |
$proxy = New-Object System.Net.WebProxy("proxyserver") | |
$proxy.credentials = $cred.GetNetworkCredential(); | |
$downloader = new-object System.Net.WebClient | |
$downloader.proxy = $proxy | |
$downloader.DownloadFile($url, $file) |
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
# variables | |
$url = "http://packages.nuget.org/v1/Package/Download/Chocolatey/0.9.8.4" | |
$chocTempDir = Join-Path $env:TEMP "chocolatey" | |
$tempDir = Join-Path $chocTempDir "chocInstall" | |
if (![System.IO.Directory]::Exists($tempDir)) {[System.IO.Directory]::CreateDirectory($tempDir)} | |
$file = Join-Path $tempDir "chocolatey.zip" | |
# download the package | |
Write-Host "Downloading $url to $file" | |
$downloader = new-object System.Net.WebClient |
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
Option Strict Off | |
Imports System.Data.SqlServerCe | |
Imports System.IO | |
Module Module1 | |
Sub Main() | |
CreateDatabase() | |
CreateTables() |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Data.SqlServerCe; | |
namespace SimpleDataC | |
{ | |
class Program | |
{ |
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 EasyHttp.Infrastructure; | |
using Machine.Specifications; | |
namespace EasyHttp.Specs.Specs | |
{ | |
public class When_baseuri_is_null_and_query_is_null | |
{ | |
Establish context = () => | |
{ | |
uriComposer = new UriComposer(); |
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
Imports System.Dynamic | |
Module Module1 | |
Sub Main() | |
Dim c2 As Object = New C |
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
Module Module1 | |
Sub Main() | |
Dim s = New subclass | |
s.test() | |
Console.ReadLine() | |
End Sub | |
Public Interface IInterface | |
Sub test() |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ConsoleApplication1 | |
{ | |
class Program | |
{ |
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
internal static class Container | |
{ | |
private static class PerType<T> | |
{ | |
public static ILog Log; | |
} | |
public static ILog GetOrAdd<T>() | |
{ | |
var log = PerType<T>.Log; |
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; | |
using System.Collections.Generic; | |
namespace OrderPackages | |
{ | |
public class PackagesSorter:IComparer<string> | |
{ | |
private static readonly char LevelSeperator = ".".ToCharArray()[0]; | |
private const string PreRelease = "-pre"; |
OlderNewer