Skip to content

Instantly share code, notes, and snippets.

View Git Aliases
[alias]
co = checkout
# New branch
nb = checkout origin -b
# Push new branch
pnb = push -u origin HEAD
# Log Graph
View gist:e0ab2d186eb9066eb2fb70e6f9fe82b2
1. type Foo = struct { X | Int, Float, Array[X]}
2. type Foo = struct {X ; Int, Float, Array[X]}
3. type Foo = Struct[X; Int, Float, Array[X]]
4. type Foo = struct [X; Int, Float, Array[X]]
5. type Foo = struct X, Y { Int, Y, Array[X] }
1. type Foo = struct {
X |
Int,
Float,
@archer884
archer884 / blackmagic.rs
Created Aug 19, 2016 — forked from huonw/blackmagic.rs
do-while loops in Rust
View blackmagic.rs
while {
let x = foo();
bar(x);
x != 0
} {}
@archer884
archer884 / playground.rs
Created Aug 17, 2016 — forked from anonymous/playground.rs
Rust code shared from the playground
View playground.rs
use std::io::{self};
use std::result;
type KKResults <T> = Result <T, KKError>;
#[derive(Debug)]
enum KKError {
Io(io::Error),
}
View Insert Statement
/Closes the window and commits the order to the database
private void btnComplete_Click(object sender, EventArgs e)
{
using(var conn = new OleDbConnection(Utilities.CONNECTION_STRING))
{
OleDbCommand cmd = new OleDbCommand
("INSERT INTO tblOrders ([OrdersProducts],[OrdersSoldTo],[OrdersTotalPrice])Values(@Products,@Clients,@TotalCost)");
cmd.Connection = conn;
conn.Open();
if (conn.State == ConnectionState.Open)
View gist:f34ebb1686410eefaa9f
using System;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
var propertyValue = GetValidDecimalInput();
var propertyTax = PropertyAssessment(propertyValue) * 0.0064m;
@archer884
archer884 / DateCorrector.cs
Last active Aug 29, 2015
Comments for YuEnDee
View DateCorrector.cs
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
namespace EasyChallenge188_Dates
{
class Program
{
View vms_analysis.fsx
open System
module Decimal =
let Zero = 0M
let One = 1M
let ceil (d: decimal): decimal = System.Math.Ceiling(d)
let floor (d: decimal): decimal = System.Math.Floor(d)