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() | |
| { | |
| CreateWebHostBuilder(new string[] { "" }).Build().Run(); | |
| } | |
| public static IWebHostBuilder CreateWebHostBuilder(string[] args) => | |
| WebHost.CreateDefaultBuilder(args) | |
| .UseStartup<Startup>(); |
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
| #AND | |
| <b:if cond='data:blog.pageType == "index"'> | |
| <b:if cond='data:blog.searchQuery'> | |
| <!--search_page AND index_page--> | |
| </b:if> | |
| </b:if> | |
| #OR |
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
| (function () { | |
| 'use strict'; | |
| var sinon = require('sinon'); | |
| var keys = ['closest', 'addClass', 'children', 'parent', 'find', 'html', | |
| 'remove', 'text', 'ready', 'unveil', 'removeAttr', 'removeClass', 'scroll', | |
| 'val', 'height', 'css', 'delay', 'queue', 'dequeue', 'attr']; | |
| function JQueryStub (args) { | |
| var self = this; |
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
| // Use a prepared statement for all the INSERTs | |
| PreparedStatement prepared = session.Prepare("INSERT INTO sometable (column1, column2) VALUES (?, ?)"); | |
| // Create a list to hold in flight requests | |
| var requestList = new List<Task>(); | |
| // Assume you have some collection of data that needs to be inserted | |
| foreach(var data in dataToInsert) | |
| { | |
| // Provide data values to be inserted with our prepared statement for this piece of data |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> |
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
| .csharpcode, .csharpcode pre | |
| { | |
| font-size: small; | |
| color: black; | |
| font-family: Consolas, "Courier New", Courier, Monospace; | |
| background-color: #ffffff; | |
| /*white-space: pre;*/ | |
| } | |
| .csharpcode pre { margin: 0em; } |
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
| const local = document.getElementById('local'); | |
| const remote = document.getElementById('remote'); | |
| const callBtn = document.getElementById('call'); | |
| let localStream = null; | |
| let pc1; | |
| let pc2; | |
| navigator.mediaDevices.getUserMedia({ audio: true, video: true }) | |
| .then(stream => { | |
| local.srcObject = stream; |
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
| function createBoard(n: number) { | |
| let board = []; | |
| for (let i = 0; i < n; i++) { | |
| board[i] = []; | |
| for (let j = 0; j < n; j++) { | |
| board[i][j] = 'x'; | |
| } | |
| } | |
| board; |
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
| using System; | |
| using System.Buffers; | |
| using System.Collections.Concurrent; | |
| using System.Collections.Generic; | |
| using System.Globalization; | |
| using System.Linq; | |
| using System.Net; | |
| using System.Net.Http; | |
| using System.Threading; | |
| using System.Threading.Tasks; |
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() | |
| { | |
| Mapper.Reset(); | |
| Mapper.Initialize(cofig => | |
| { | |
| cofig.CreateMap<Event, EventDTO>(); // maps message and event id | |
| cofig.CreateMap<EventLog, EventDTO>(); // maps system id and user id | |
| cofig.CreateMap<EventLog, IEnumerable<EventDTO>>() | |
| .ConvertUsing<EventLogConverter>(); // creates collection of dto |