Skip to content

Instantly share code, notes, and snippets.

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)
@archer884
archer884 / DateCorrector.cs
Last active August 29, 2015 14:09
Comments for YuEnDee
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
namespace EasyChallenge188_Dates
{
class Program
{
using System;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
var propertyValue = GetValidDecimalInput();
var propertyTax = PropertyAssessment(propertyValue) * 0.0064m;
/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)
@archer884
archer884 / playground.rs
Created August 17, 2016 04:07 — forked from anonymous/playground.rs
Rust code shared from the playground
use std::io::{self};
use std::result;
type KKResults <T> = Result <T, KKError>;
#[derive(Debug)]
enum KKError {
Io(io::Error),
}
@archer884
archer884 / blackmagic.rs
Created August 19, 2016 20:51 — forked from huonw/blackmagic.rs
do-while loops in Rust
while {
let x = foo();
bar(x);
x != 0
} {}
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,
[alias]
co = checkout
# New branch
nb = checkout origin -b
# Push new branch
pnb = push -u origin HEAD
# Log Graph