Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block JarkoDubbeldam

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:57430846438be59f15f68a8d6ddeeea4
// Eagerly performs nullchecks.
public static IEnumerable<TResult> ZipNew<TFirst, TSecond, TResult>(
this IEnumerable<TFirst> first,
IEnumerable<TSecond> second,
Func<TFirst, TSecond, TResult> resultSelector) {
if(first == null) throw new ArgumentNullException(nameof(first));
if(second == null) throw new ArgumentNullException(nameof(second));
if(resultSelector == null) throw new ArgumentNullException(nameof(resultSelector));
return ZipNewInternal(first, second, resultSelector);
View gist:0caf0fc86715da0ff915ed8d6d877716
public bool TryGetValue(TKey key, out TValue value) { // key is hier input, value is waar de output in komt.
int i = FindEntry(key); // Probeer de key te vinden.
if (i >= 0) { // Als die er is, succes!
value = entries[i].value; // Assign de waarde naar value, de output.
return true; // En return true om aan te geven dat het gelukt is.
} // Zo niet:
value = default(TValue); // De compiler vindt dat we per se hier iets in moeten vullen. We hebben de waarde niet gevonden, dus maar default.
return false; // Return false om aan te geven dat het niet gelukt is.
JarkoDubbeldam / eating.cs
Created Nov 21, 2018
How much did Eater eat
View eating.cs
public interface IEatable {
bool Eat();
public class Wateringhole : IEatable {
public bool Eat() {
// Always eat 1, so don't need to return anything.
// Whatever
return true;
View IPS pageviews
data <- read_csv("~/traffic_2018-Jun-20_2018-Oct-18.csv")
data <- data %>%
mutate(Week = lubridate::isoweek(date),
JarkoDubbeldam / output.txt
Created Mar 19, 2018
Comparison of data.table::fread with and without file:///
View output.txt
With a dataset of 16,592,802 rows (0.683GB):
Unit: seconds
expr min lq mean median uq max neval
fread("file") 14.51960 14.68574 18.82770 18.23437 22.39358 24.57221 10
fread("file:///file") 15.98431 16.19990 19.78759 17.80094 20.29927 36.96590 10
You can’t perform that action at this time.