(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
<html lang="en"> | |
<head> | |
<title> | |
title of the page | |
</title> | |
<link rel="stylesheet" type="text/css" href="/stylesheets/style.css"> | |
</head> | |
<body> | |
<h1> | |
title of the post |
# Thanks to @danger89 and @Ilothar for updating the gist. | |
# Set the name and the supported language of the project | |
project(hello-world C CXX) | |
# Set the minimum version of cmake required to build this project | |
cmake_minimum_required(VERSION 3.10) | |
# Use the package PkgConfig to detect GTK+ headers/library files | |
find_package(PkgConfig REQUIRED) | |
pkg_check_modules(GTK REQUIRED gtkmm-3.0) |
var Wav = function(opt_params){ | |
/** | |
* @private | |
*/ | |
this._sampleRate = opt_params && opt_params.sampleRate ? opt_params.sampleRate : 44100; | |
/** | |
* @private | |
*/ |
/* | |
* A simple libpng example program | |
* http://zarb.org/~gc/html/libpng.html | |
* | |
* Modified by Yoshimasa Niwa to make it much simpler | |
* and support all defined color_type. | |
* | |
* To build, use the next instruction on OS X. | |
* $ brew install libpng | |
* $ clang -lz -lpng16 libpng_test.c |
char * strautocat(char **buffer, const char *str1) //char **buffer, const char *format, vargs? Ive done this before | |
{ | |
assert(str1 != NULL); assert(buffer != NULL); | |
if(*buffer == NULL){*buffer = (char *)calloc(sizeof(char)*DEFAULT_STRING_LENGTH,sizeof(char));} | |
size_t allocated_size, required_size; | |
allocated_size = malloc_usable_size(*buffer); | |
required_size = strlen(str1)+strlen(*buffer)+1; | |
while(required_size > allocated_size) |
#source: http://en.literateprograms.org/Quicksort_(Python) | |
def qsort1(list): | |
"""Quicksort using list comprehensions""" | |
if list == []: | |
return [] | |
else: | |
pivot = list[0] | |
lesser = qsort1([x for x in list[1:] if x < pivot]) | |
greater = qsort1([x for x in list[1:] if x >= pivot]) | |
return lesser + [pivot] + greater |
package eval | |
import scala.reflect.runtime.currentMirror | |
import scala.tools.reflect.ToolBox | |
import java.io.File | |
object Eval { | |
def apply[A](string: String): A = { | |
val toolbox = currentMirror.mkToolBox() |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
class Nodes { | |
init(data:Int, next_node:Int) { | |
var data = data | |
var next_node = next_node | |
} | |
func GetData() ->Int { | |
return Nodes.data | |
} | |
func GetNext() ->Int { | |
return Nodes.next_node |
#---------------------------------------------------------------# | |
# This script manually goes through youtube and collects all # | |
# of your viewing history into a convenient text file. This # | |
# might take about 30min to an hour, depending on your # | |
# computer's RAM, processing speed, and internet connection. # | |
# Note that this program requires the splinter module to work. # | |
# Run 'pip install splinter' to get it. # | |
#---------------------------------------------------------------# | |
print "Making sure you're not using python 3..." | |
from splinter import Browser |