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.Security.Cryptography; | |
using System.Text; | |
namespace ConsoleApp | |
{ | |
class Program | |
{ | |
class ECDsaHelper | |
{ | |
public CngAlgorithm Algorithm { get; set; } |
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
## coding challenge: count words in Moby Dick | |
the book "Moby Dick" | |
by Herman Melville | |
describes an epic battle of a gloomy captain against his personal nemesis, | |
the white whale. | |
you can find the full text | |
for Herman Melville’s “Moby Dick” | |
as a **text 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
$path = "C:\Setups" | |
$url = "http://www.dotpdn.com/files/Paint.NET.3.5.11.Install.zip" | |
md $path | |
$pieces = $url.Split("/") | |
$fileName = $pieces[$pieces.Count-1] | |
$unzipped = "$path\$fileName" | |
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
Set-ExecutionPolicy RemoteSigned | |
$mongoDbPath = "C:\MongoDB" | |
$mongoDbConfigPath = "$mongoDbPath\mongod.cfg" | |
$url = "http://downloads.mongodb.org/win32/mongodb-win32-x86_64-2008plus-2.4.9.zip" | |
$zipFile = "$mongoDbPath\mongo.zip" | |
$unzippedFolderContent ="$mongoDbPath\mongodb-win32-x86_64-2008plus-2.4.9" | |
if ((Test-Path -path $mongoDbPath) -eq $True) | |
{ |
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
<?xml version="1.0"?> | |
<configuration> | |
<system.web> | |
<compilation debug="true" targetFramework="4.0" /> | |
<httpHandlers> | |
<add verb="GET,HEAD" | |
path="*.css,*.js,*.xml,*.txt,*.swf,*.jpg,*.jpeg,*.gif,*.png,*.bmp,*.ico,*.pdf,*.xls,*.doc,*.ppt,*.xlsx,*.docx,*.pptx,*.swf,*.zip,*.rar" | |
type="System.Web.StaticFileHandler" /> |
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
namespace DogmaticWcf.Web.Controllers | |
{ | |
public class HomeController : Controller | |
{ | |
private readonly IMyService _service; | |
public HomeController(IMyService service) | |
{ | |
_service = service; | |
} |
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
namespace DogmaticWcf.Web | |
{ | |
public class ServiceInstaller : IWindsorInstaller | |
{ | |
public void Install(IWindsorContainer container, IConfigurationStore store) | |
{ | |
container.AddFacility<WcfFacility>(); | |
container.Register( | |
Component.For<IMyService>() | |
.AsWcfClient( |
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
static void Main() | |
{ | |
if (Environment.UserInteractive) | |
{ | |
Bootstrapper.Initialize(); | |
Console.WriteLine("Server ready..."); | |
Console.ReadLine(); | |
} | |
else | |
{ |
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
namespace DogmaticWcf.Server.Services | |
{ | |
public class MyService : IMyService | |
{ | |
public string DoSomething(MyDto data) | |
{ | |
return string.Format("I did something at {0} with {1}", DateTime.Now, data.MyProperty); | |
} | |
} | |
} |
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
namespace DogmaticWcf.Server.Contracts | |
{ | |
[ServiceContract] | |
public interface IMyService | |
{ | |
[OperationContract] | |
string DoSomething(MyDto data); | |
} | |
[DataContract] |
NewerOlder