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
| The 7 Ways to Wash Dishes and the Case for Message-driven Reactive Systems | |
| https://www.typesafe.com/blog/the-case-for-message-driven | |
| How does a relational database work | |
| http://coding-geek.com/how-databases-work/ | |
| The world beyond batch: Streaming 101 | |
| https://beta.oreilly.com/ideas/the-world-beyond-batch-streaming-101 |
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
| CREATE PROCEDURE [DB].[PassNullParameterToStoredProcedure] (@Started DateTime = NULL) | |
| AS | |
| BEGIN | |
| DECLARE @Data TABLE( Started DateTime NOT NULL) | |
| INSERT INTO @Data (Started) | |
| VALUES ('2015-01-01T00:00:00'), ('2015-01-02T00:00:00'), ('2015-01-03T00:00:00') | |
| SELECT * FROM @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
| var _numBuckets = 24; | |
| var start = 1000; | |
| var end = 5000; | |
| var _width = 150; | |
| var _height = 40; | |
| var _margin = { | |
| top: 1, | |
| right: 1, | |
| bottom: 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
| # --------------------------------------------------------------- | |
| # Hello assembly! | |
| # Compile: gcc -o helloassembly -nostdlib helloassembly.s | |
| # Tested on Ubuntu 14 (x64) | |
| # --------------------------------------------------------------- | |
| .global _start | |
| .text | |
| _start: |
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
| public class CustomScope : IDisposable | |
| { | |
| private readonly State originalState; | |
| public CustomScope(State state) | |
| { | |
| this.originalState = GlobalSingleton.State; | |
| GlobalSingleton.State = state; | |
| } |
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
| var originalTrigger = App.events.trigger; | |
| App.events.trigger = function () { | |
| console.log("Event Triggered:"); | |
| console.log(arguments); | |
| originalTrigger.apply(this, Array.prototype.slice.call(arguments)); | |
| }; |
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
| public static class BoolExtensions | |
| { | |
| [MethodImpl(MethodImplOptions.AggressiveInlining)] | |
| [DebuggerStepThrough] | |
| public static bool AnyTrue(this IEnumerable<bool> bools) | |
| { | |
| return bools.Aggregate((a, b) => (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
| public static class Program | |
| { | |
| public static void Main() | |
| { | |
| int value = 576; | |
| byte[] bytes = new byte[4]; | |
| bytes[0] = (byte)(value >> 24); | |
| bytes[1] = (byte)(value >> 16); | |
| bytes[2] = (byte)(value >> 8); | |
| bytes[3] = (byte)value; |
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
| // Find the index of the smallest value. | |
| // Linear search | |
| var findIndexOfSmallest = function(arr) { | |
| if (!arr.length) { return -1; } | |
| var lowIdx = 0; | |
| for (var i = 0; i < arr.length; i++) { | |
| if (arr[i] < arr[lowIdx]) { lowIdx = i; } | |
| } | |
| return lowIdx; |
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
| var isNull = null; | |
| console.log(isNull); | |
| console.assert(isNull); | |
| var isUndefined; | |
| console.log(isUndefined); | |
| console.assert(isUndefined); | |
| var isZero = 0; | |
| console.log(isZero); |
NewerOlder