Consider this blog post model:
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
#! /usr/bin/env python | |
import cv2 | |
import numpy as np | |
import pymeanshift as pms | |
from blobs.BlobResult import CBlobResult | |
from blobs.Blob import CBlob # Note: This must be imported in order to destroy blobs and use other methods |
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
module InventoryItems(Command(..), Event(..), handle) where | |
import Data.Maybe(isJust) | |
type Id = String | |
type Name = String | |
type Amount = Int | |
data Command = CreateInventoryItem Id | |
| RenameInventoryItem Id Name |
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
exception ItemAlreadyExists of string | |
exception ItemNotFound of string | |
exception DomainError of string | |
type Command = | |
| CreateInventoryItem of Id: int | |
| RenameInventoryItem of Id: int * Name: string | |
| RemoveItemsFromInventory of Id: int * Amount: int | |
| AddItemsToInventory of Id: int * Amount: int | |
| DeactivateInventoryItem of Id: int |
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 Events | |
type Projection<'ev, 'state, 'out> = | |
{ foldState : 'ev -> 'state -> 'state | |
; projection : 'state -> 'out | |
; emptyState : 'state | |
} | |
module Projections = | |
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; | |
using System.Linq; | |
using static System.Console; | |
using static System.Globalization.CultureInfo; | |
static class Program | |
{ | |
static void Main() | |
{ | |
var count = 5; |
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; | |
using System.Data.SQLite; | |
namespace StringInterpolationSQL | |
{ | |
class Program | |
{ | |
private static SQLiteConnection connection; | |
static void Main(string[] args) | |
{ |
Coding practices are a source of a lot of arguments among programmers. Coding standards, to some degree, help us to put certain questions to bed and resolve stylistic debates. No coding standard makes everyone happy. (And even their existence is sure to make some unhappy.) What follows are the standards we put together on the Core team, which have become the general coding standard for all programming teams on new code development. We’ve tried to balance the need for creating a common, recognizable and readable code base with not unduly burdening the programmer with minor code formatting concerns.