Download and install version 4.01 for windows: http://www.ocamlpro.com/pub/ocpwin/ocpwin-builds/ocpwin64/20160113/ocpwin64-20160113-4.01.0+ocp1-full-mingw64.exe
var randomNumbers = [42, 12, 88, 62, 63, 56, 1, 77, 88, 97, 97, 20, 45, 91, 62, 2, 15, 31, 59, 5] | |
randomNumbers | |
func 💩Sort(arr: Int[]) -> Int[] { | |
var array = arr.copy() | |
// Private function to check whether or not the array is sorted | |
func isSorted (arr: Int[]) -> Bool { |
public class ReturnPartialIfAjaxAttribute : ActionFilterAttribute | |
{ | |
private readonly string partialViewName; | |
public ReturnPartialIfAjaxAttribute(string partialViewName) | |
{ | |
this.partialViewName = partialViewName; | |
} | |
public override void OnActionExecuted(ActionExecutedContext filterContext) |
<div ng-app="videoApp" ng-controller="VideoController"> | |
<table> | |
<thead> | |
<th>Title</th> | |
<th>Length</th> | |
<th></th> | |
</thead> | |
<tbody> | |
<tr data-id="{{video.Id}}" ng-repeat="video in videos"> |
Update: there's an easier way to do this. Check out my new gist instead.
How I set up my Windows 10 machine for Node development. Time to complete: about 2 hours on a fast connection.
- Bash, not Windows shell
#! /bin/bash | |
# HEADS UP! Make sure to use '*' or a valid hostname for the FDQN prompt | |
echo 01 > ca.srl | |
openssl genrsa -des3 -out ca-key.pem | |
openssl req -new -x509 -days 365 -key ca-key.pem -out ca.pem | |
openssl genrsa -des3 -out server-key.pem | |
openssl req -new -key server-key.pem -out server.csr |
#include <Windows.h> | |
#include "../../API/RainmeterAPI.h" | |
struct ACCENTPOLICY { | |
int nAccentState; | |
int nFlags; | |
int nColor; | |
int nAnimationId; | |
}; | |
struct WINCOMPATTRDATA { |
With the release of Node 6.0.0, the surface of code that needs transpilation to use ES6 features has been reduced very dramatically.
This is what my current workflow looks like to set up a minimalistic and fast microservice using micro and async
+ await
.
This is a proposal for a lightning talk at the Reactive 2016 conference. If you like this, star the Gist.
In regular websites, it is common to send multiple events to track user clicks. Single Page Applications change the way you look at metrics. This is a talk about a simple pattern we created at Globo.com to manage a metrics layer for http://globoplay.globo.com. The talk will cover how to track user flow using Google Analytics and other services. We solved the challenge of tying metrics and components, keeping information across pages and having global data. Also some React, React Router and React Side Effects concepts like context, higher order components, history state will be covered.
function mapValues(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
result[key] = fn(obj[key], key); | |
return result; | |
}, {}); | |
} | |
function pick(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
if (fn(obj[key])) { |