Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍👩‍👧
Finding inspirations...

Heiswayi Nrird heiswayi

👨‍👩‍👧
Finding inspirations...
View GitHub Profile
@heiswayi
heiswayi / LargestTriangleThreeBuckets.cs
Created Aug 22, 2019 — forked from DanielWJudge/LargestTriangleThreeBuckets.cs
Largest-Triangle-Three Bucket Downsampling Graphs in C#
View LargestTriangleThreeBuckets.cs
public static IEnumerable<Tuple<double, double>> LargestTriangleThreeBuckets(List<Tuple<double, double>> data, int threshold)
{
int dataLength = data.Count;
if (threshold >= dataLength || threshold == 0)
return data; // Nothing to do
List<Tuple<double, double>> sampled = new List<Tuple<double, double>>(threshold);
// Bucket size. Leave room for start and end data points
double every = (double)(dataLength - 2) / (threshold - 2);
@heiswayi
heiswayi / gist:7775ec456f2e98b739a6c556a19e0cb1
Created Apr 26, 2018 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions
View gist:7775ec456f2e98b739a6c556a19e0cb1

Branching

Quick Legend

Instance Branch Description, Instructions, Notes
View Effective_Engineer.md

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@heiswayi
heiswayi / Bindable.cs
Created Jun 5, 2016 — forked from btshft/Bindable.cs
Bindable class to reduce boilerplate code in mvvm (implement INotifyPropertyChanged)
View Bindable.cs
namespace Helpers
{
///<summary>
/// Reduce mvvm boilerplate
///
/// Usage:
/// public class MyViewModel : Bindable {
/// // Now this property supports INotifyPropertyChanged
/// public string MyProperty
/// {
@heiswayi
heiswayi / FocusExtension.cs
Created Jun 5, 2016 — forked from chuckdee68/FocusExtension.cs
FocusExtension - Focusing Controls in View from ViewModel using MVVM principles
View FocusExtension.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
namespace Supporting
{
@heiswayi
heiswayi / gist:34d0de1ddfa72fb53e7e
Created Oct 14, 2015 — forked from jwoschitz/gist:1129249
Brute force implementation / C#
View gist:34d0de1ddfa72fb53e7e
class Program
{
#region Private variables
// the secret password which we will try to find via brute force
private static string password = "p123";
private static string result;
private static bool isMatched = false;
@heiswayi
heiswayi / privacy-policy.md
Last active Aug 8, 2018 — forked from maddisondesigns/cookie-policy.md
eCommerce Terms & Conditions and Privacy Templates
View privacy-policy.md

Privacy Policy

1. We respect your privacy

Business Name respects your right to privacy and this policy sets out how we collect and treat your personal information. “Personal information” is information we hold which is identifiable as being about you.

2. What personal information we collect

@heiswayi
heiswayi / html-style-guide.md
Created Sep 23, 2015 — forked from ryansechrest/html-style-guide.md
HTML style guide with coding standards and best practices.
View html-style-guide.md

HTML Style Guide

All rules and guidelines in this document apply to HTML files.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Icon Legend:

· Space, Tab, Enter/Return

@heiswayi
heiswayi / css-style-guide.md
Created Sep 23, 2015 — forked from fleishmanhillard/css-style-guide.md
CSS style guide with coding standards and best practices.
View css-style-guide.md

CSS Style Guide

All rules and guidelines in this document apply to css/scss files unless otherwise noted.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Most sections are broken up into two parts:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts
@heiswayi
heiswayi / php-style-guide.md
Created Sep 23, 2015 — forked from ryansechrest/php-style-guide.md
PHP style guide with coding standards and best practices.
View php-style-guide.md

PHP Style Guide

All rules and guidelines in this document apply to PHP files unless otherwise noted. References to PHP/HTML files can be interpreted as files that primarily contain HTML, but use PHP for templating purposes.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Most sections are broken up into two parts:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts
You can’t perform that action at this time.