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 System.Threading.Tasks | |
{ | |
public static class DelegateInvokeAsyncExtension | |
{ | |
public static Task<TResult> InvokeAsync<TResult>( | |
this Func<TResult> function, | |
AsyncCallback callback = null, | |
object state = null, |
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
// You can compile this code with csc.exe or any C# supported shell. | |
/* | |
* Copyright (c) 2016 ClouDeveloper | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining | |
* a copy of this software and associated documentation files (the "Software"), | |
* to deal in the Software without restriction, including without limitation | |
* the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
* and/or sell copies of the Software, and to permit persons to whom the Software |
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
<Query Kind="Program" /> | |
// https://msdn.microsoft.com/en-us/library/hh873130%28v=vs.140%29.aspx | |
void Main() | |
{ | |
MyWebClient webClient = new MyWebClient(); | |
string baseDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), "bootstrapDownloads"); | |
if (!Directory.Exists(baseDir)) Directory.CreateDirectory(baseDir); |
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
// Copyright (c) Microsoft. All rights reserved. | |
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | |
'use strict'; | |
var Protocol = require('azure-iot-device-amqp').AmqpWs; | |
// Uncomment one of these transports and then change it in fromConnectionString to test other transports | |
// var Protocol = require('azure-iot-device-amqp').AmqpWs; | |
// var Protocol = require('azure-iot-device-http').Http; | |
// var Protocol = require('azure-iot-device-mqtt').Mqtt; |
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.IO; | |
using System.Threading.Tasks; | |
// Compatible with .NET Framework 4 Client Profile & legacy C# compiler. | |
namespace ClouDeveloper | |
{ | |
public static class FileSystemWatch | |
{ | |
public const string DefaultFilter = |
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
<Query Kind="Program"> | |
<Connection> | |
<ID>bea78312-0e65-4c9e-8db4-e64dea24514e</ID> | |
<Persist>true</Persist> | |
<Server>(localdb)\hubk</Server> | |
<Database>PointSaving</Database> | |
<ShowServer>true</ShowServer> | |
</Connection> | |
<NuGetReference>Autofac.WebApi2</NuGetReference> | |
<NuGetReference>Microsoft.AspNet.WebApi.OwinSelfHost</NuGetReference> |
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 TheCompany.Something.Api.Repositories; | |
using TheCompany.Something.Data; | |
using TheCompany.Something.Data.Models; | |
using Machine.Fakes; | |
using Machine.Specifications; | |
using Microsoft.EntityFrameworkCore; | |
using System; | |
using System.Threading; | |
using System.Threading.Tasks; |
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 OpenCvSharp; | |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.IO; | |
using static OpenCvSharp.Cv2; | |
using static System.Math; | |
namespace ReceiptScannerCSharp | |
{ |
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 | |
pushd "%~dp0" | |
cls | |
echo This script allows you to easily turn on or off Windows Hypervisor settings at once. This script is useful when you want to use Hyper-V or Docker for Windows with other hypervisors. | |
echo. | |
net session >nul 2>&1 | |
if not %errorLevel% == 0 ( | |
echo To run this script, you must run it as a user with administrative privileges. |
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 | |
pushd "%~dp0" | |
cls | |
echo This script allows you to run docker daemon. | |
echo. | |
net session >nul 2>&1 | |
if not %errorLevel% == 0 ( | |
echo To run this script, you must run it as a user with administrative privileges. |
OlderNewer