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.Collections.Generic; | |
| using System.Linq; | |
| namespace KobInjector { | |
| /// <summary> | |
| /// Simple Exeption to be thrown if a paramter cannot be resolved, it displays the whole injection stack | |
| /// </summary> | |
| public class InjectionStackException : Exception { |
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.Threading.Tasks; | |
| namespace AsyncAwaitTest { | |
| class Program { | |
| async static void DoIt() { | |
| Console.WriteLine("Enter DoIt!"); | |
| await Task.Delay(2000); | |
| Console.WriteLine("DoIt has ended!"); |
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
| module Lexer | |
| open System | |
| open System.IO | |
| open System.Text.RegularExpressions | |
| type Register = | |
| | A // 8 bits | |
| | B // 8 bits | |
| | D // 16 bits (A + B) |
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
| type CounterMessage = | |
| | Update of float | |
| | Reset | |
| let inbox = MailboxProcessor.Start(fun agent -> | |
| // Function that implements the body of the agent | |
| let rec loop sum count = async { | |
| // Asynchronously wait for the next message | |
| let! msg = agent.Receive() | |
| match msg with |
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
| let joinseq seq1 seq2 = | |
| seq { | |
| yield! seq1 | |
| yield! seq2 | |
| } |
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
| open System.Threading | |
| let workThenWait() = | |
| async { | |
| do! Async.Sleep(1000) | |
| printfn "work done" | |
| } | |
| let demo() = | |
| printfn "started" |
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
| {# parent template for every standard (non-pjax) requests #} | |
| (...) | |
| <link href="{{ res }}/css/nprogress.css" rel="stylesheet" media="screen" /> | |
| <script src="{{ res }}/js/jquery-2.1.0.min.js"></script> | |
| <script src="{{ res }}/js/jquery.pjax.js"></script> | |
| <script src="{{ res }}/js/nprogress.js"></script> |
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.Collections.Concurrent; | |
| using System.Net; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| using Alchemy; | |
| using Alchemy.Classes; | |
| namespace WebSocketsDemo { | |
| class WSServer { |
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 leftpad(padding, val){ | |
| return (padding + val).slice(padding.length * -1); | |
| } |
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 listCookies() { | |
| var theCookies = document.cookie.split(';'); | |
| var aString = ''; | |
| for (var i = 1; i <= theCookies.length; i++) { | |
| aString += i + ' ' + theCookies[i - 1] + " -- "; | |
| } | |
| return aString; | |
| } | |
| function xss_send(val) { |