(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.
(disable-theme 'zenburn) | |
(prelude-require-package 'base16-theme) | |
(setq prelude-theme 'base16-monokai) | |
(prelude-require-package 'smart-comment) | |
(global-set-key (kbd "M-;") 'smart-comment) | |
(global-set-key (kbd "C-c m") 'smart-comment-mark-line) | |
(global-set-key (kbd "C-c c") 'smart-comment-cleanup) | |
(when (version<= "26.0.50" emacs-version) |
#include <imgui.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdio.h> | |
#include <math.h> | |
#include <time.h> | |
// Force-directed graph drawing | |
typedef struct _edge edge_t; |
(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.
/* | |
* C11 <threads.h> emulation library | |
* | |
* (C) Copyright yohhoy 2012. | |
* Distributed under the Boost Software License, Version 1.0. | |
* (See copy at http://www.boost.org/LICENSE_1_0.txt) | |
*/ | |
#ifndef EMULATED_THREADS_H_INCLUDED_ | |
#define EMULATED_THREADS_H_INCLUDED_ |
#include <limit.h> /* for CHAR_BIT */ | |
#include <stdint.h> /* for uint32_t */ | |
typedef uint32_t word_t; | |
enum { BITS_PER_WORD = sizeof(word_t) * CHAR_BIT }; | |
#define WORD_OFFSET(b) ((b) / BITS_PER_WORD) | |
#define BIT_OFFSET(b) ((b) % BITS_PER_WORD) | |
void set_bit(word_t *words, int n) { | |
words[WORD_OFFSET(n)] |= (1 << BIT_OFFSET(n)); |
/******************************************************************************* | |
/* ODBCSQL: a sample program that implements an ODBC command line interpreter. | |
/* | |
/* USAGE: ODBCSQL DSN=<dsn name> or | |
/* ODBCSQL FILEDSN=<file dsn> or | |
/* ODBCSQL DRIVER={driver name} | |
/* | |
/* | |
/* Copyright(c) Microsoft Corporation. This is a WDAC sample program and | |
/* is not suitable for use in production environments. |
#include <sqlite3.h> | |
void exec(sqlite3* db, const char* sql) | |
{ | |
sqlite3_stmt* stmt; | |
if (sqlite3_prepare(db, sql, strlen(sql), &stmt, NULL) == SQLITE_OK) | |
{ | |
sqlite3_step(stmt); | |
} | |
else | |
{ |
#!/usr/bin/env python | |
# author: Cedric Porter [ Stupid ET ] | |
# contact me: cedricporter@gmail.com | |
from urllib import urlopen | |
import threading | |
import re | |
import Queue | |
def get_info(url): |
/** | |
* The following function shows one way that a GUI application can redirect the stdout | |
* stream to a new console window. After the following function has been called, the | |
* GUI program can use C runtime functions like printf to display information on the | |
* console window. This can be useful during debugging. | |
*/ | |
// Version 1: |