This file contains hidden or 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
| @FunctionalInterface | |
| public interface BooleanConsumer { | |
| public void accept(boolean b); | |
| } |
This file contains hidden or 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
| <?xml version="1.0"?> | |
| <!DOCTYPE module PUBLIC | |
| "-//Puppy Crawl//DTD Check Configuration 1.3//EN" | |
| "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> | |
| <module name="Checker"> | |
| <property name="charset" value="UTF-8"/> | |
| <module name="NewlineAtEndOfFile"> | |
| <property name="lineSeparator" value="lf"/> |
This file contains hidden or 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
| # A _pythonic_ pidigts calculator for The Computer Lanaguage Benchmarks Game | |
| # Unlike the other python versions of this program, this uses python's builtin integers. | |
| # I'd argue this is the 'pythonic' way to do this, since it takes advantage of builtin types. | |
| # Derived from the C version and the Chappel version, but with more descriptive names. | |
| from itertools import count, zip_longest, islice, repeat | |
| import sys | |
| class Term(object): | |
| __slots__ = ("accumulator", "numerator", "denominator") # got2gofast! | |
| def __init__(self, accumulator, numerator, denominator): |
This file contains hidden or 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
| #!/bin/sh | |
| KOTLIN_VERSION="1.0.3" | |
| KOTLIN_COMPILER_URL="https://github.com/JetBrains/kotlin/releases/download/v${KOTLIN_VERSION}/kotlin-compiler-$KOTLIN_VERSION.zip" | |
| KOTLIN_COMPILER_HASH="37615f1d63e8500cd33c7f3e60b715263f65189d6d8f25defba78968c896dc97" # The hash of the compiler's zip-file | |
| KOTLIN_INSTALATION_DIR="$HOME/.kotlin/$KOTLIN_VERSION" | |
| if [ $# -lt 1 ]; then | |
| echo "Insufficient arguments: $#"; | |
| exit 1; |
This file contains hidden or 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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdbool.h> | |
| #include <errno.h> | |
| #include <string.h> | |
| #include <assert.h> | |
| /** | |
| * When it becomes worthwile to do a binary search for the upper bound. | |
| * |
This file contains hidden or 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
| #include <assert.h> | |
| #include <stdbool.h> | |
| #include <stddef.h> | |
| #include <stdint.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| ptrdiff_t indexOfPrime(uint64_t num); | |
| const uint64_t *findPrimes(size_t amount); |
This file contains hidden or 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
| <div data-live="true" data-autoplay="true" class="flowplayer" data-ratio="0.4167"> | |
| <video data-title="Live Stream"> | |
| <source type="application/x-mpegurl" src="http://ws.nhicdn.net/worshipstream/_definst_/mp4:NorthminsterPresbyterianChurch.stream/playlist.m3u8"> | |
| </div> |
This file contains hidden or 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
| /* | |
| * The MIT License | |
| * Copyright (c) 2016 Techcable | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is | |
| * furnished to do so, subject to the following conditions: |
This file contains hidden or 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
| from typing import Iterable | |
| from argparse import ArgumentParser | |
| from sys import exit | |
| parser = ArgumentParser(description="Parses and dencodes protobuf varints") | |
| parser.add_argument("mode", help="Whether to encode or decode") | |
| parser.add_argument("num", help="The number to decode/encode") | |
| args = parser.parse_args() |
This file contains hidden or 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
| #include <stdbool.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <errno.h> | |
| // Everyone says "oh I know about double evaluation, it's no problem" and a few months down the road, you'll be debugging the silliest problems for hours on end. | |
| #define max(a, b) ({ \ | |
| __typeof__ (a) _a = (a); \ | |
| __typeof__ (b) _b = (b); \ | |
| _a > _b ? _a : _b; \ |