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
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) |
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.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
namespace EasyChallenge188_Dates | |
{ | |
class Program | |
{ |
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; | |
namespace ConsoleApplication2 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var propertyValue = GetValidDecimalInput(); | |
var propertyTax = PropertyAssessment(propertyValue) * 0.0064m; |
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
/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) |
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
use std::io::{self}; | |
use std::result; | |
type KKResults <T> = Result <T, KKError>; | |
#[derive(Debug)] | |
enum KKError { | |
Io(io::Error), | |
} |
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
while { | |
let x = foo(); | |
bar(x); | |
x != 0 | |
} {} | |
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
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, |
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
[alias] | |
co = checkout | |
# New branch | |
nb = checkout origin -b | |
# Push new branch | |
pnb = push -u origin HEAD | |
# Log Graph |