Instance | Branch |
---|
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); |
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
- They are the people who get things done. Effective Engineers produce results.
namespace Helpers | |
{ | |
///<summary> | |
/// Reduce mvvm boilerplate | |
/// | |
/// Usage: | |
/// public class MyViewModel : Bindable { | |
/// // Now this property supports INotifyPropertyChanged | |
/// public string MyProperty | |
/// { |
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 | |
{ |
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; | |
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
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:
- Overview of all rules with a quick example
- Each rule called out with examples of do's and don'ts
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:
- Overview of all rules with a quick example
- Each rule called out with examples of do's and don'ts