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
| db.createCollection("Folders"); | |
| db.Folders.ensureIndex({ "UserId": 1 }); | |
| db.Folders.insert({ "UserId": 1 }); | |
| db.Folders.find(); | |
| db.Folders.update({ "UserId": 1 }, { $set: { "Folders.A": { "Name": "A" } } }); |
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
| { | |
| "AccountId" : new BinData(3, "HUS1wBo9bUG33nsC/OLBTQ=="), | |
| "AdministratorId" : new BinData(3, "AAAAAAAAAAAAAAAAAAAAAA=="), | |
| "GroupMembers" : [{ | |
| "GroupId" : new BinData(3, "AAKaDg9ChUClP6Le3bf7Mw=="), | |
| "GroupMemberId" : new BinData(3, "AAKaDg9ChUClP6Le3bf7Mw=="), | |
| "Phone" : { | |
| "Valid" : true, | |
| "Number" : "+46000000000", | |
| "Country" : { |
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
| // Compile with: C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe /r:System.Drawing.dll /out:ImageSize.exe ImageSize.cs | |
| // Use: ImageSize.exe MyImage.png | |
| namespace ConsoleApplication1 | |
| { | |
| public static class Program | |
| { | |
| public static void Main(string[] arguments) | |
| { | |
| var image = new System.Drawing.Bitmap(arguments[0]); |
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
| <%@ Page Language="C#" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %> | |
| <%= CurrentDateTime %> |
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
| namespace PriceCalculator | |
| { | |
| using System; | |
| public static class Program | |
| { | |
| public static void Main() | |
| { | |
| do | |
| { |
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
| void Main() | |
| { | |
| var tuples = new[] | |
| { | |
| new Tuple<char, int, int>('z', 2, 3), | |
| new Tuple<char, int, int>('y', 4, 5) | |
| }; | |
| foreach (var tuple in tuples) | |
| { |
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
| [ServiceContract] | |
| public interface IRegistrator | |
| { | |
| [OperationContract] | |
| RegisterResponse Register(RegisterRequest request); | |
| } |
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
| 1) Customer calls /messages/send | |
| 2) API sends a request via WCF to send the message | |
| 3) Application server starts the send message process and returns the process id | |
| 4) API returns the process id in it's response | |
| 5) Application server generates a batch to be sent | |
| 6) Application server sends off a message to the billing server | |
| 7) Billing server creates order and pays for it and responds to the application server | |
| 8) Application server sends off the batch to the message server and starts polling message server for status changes | |
| 9) Messsage server sends the message |
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
| namespace ConsoleApplication7 | |
| { | |
| using System; | |
| public class Program | |
| { | |
| public static void Main() | |
| { | |
| AppDomain.CurrentDomain.UnhandledException += HandleUnhandledException; |
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
| void Main() | |
| { | |
| var animals = new Animal[] { new Cat(), new Dog() }; | |
| MakeSound makeSound; | |
| foreach (var animal in animals) | |
| { | |
| makeSound = animal.MakeSound; | |