(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.
using System; | |
using System.Runtime.InteropServices; | |
// ReSharper disable SuspiciousTypeConversion.Global | |
// ReSharper disable InconsistentNaming | |
namespace VideoPlayerController | |
{ | |
/// <summary> | |
/// Controls audio using the Windows CoreAudio API | |
/// from: http://stackoverflow.com/questions/14306048/controling-volume-mixer |
import Darwin | |
enum Signal: Int32 { | |
case HUP = 1 | |
case INT = 2 | |
case QUIT = 3 | |
case ABRT = 6 | |
case KILL = 9 | |
case ALRM = 14 | |
case TERM = 15 |
#include <iostream> | |
#include <cstdio> | |
#include <cmath> | |
#include "string.h" | |
#include "mem.h" | |
//Wav Header | |
struct wav_header_t | |
{ | |
char chunkID[4]; //"RIFF" = 0x46464952 |
/* | |
GNU GENERAL PUBLIC LICENSE | |
Version 3, 29 June 2007 | |
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> | |
Everyone is permitted to copy and distribute verbatim copies | |
of this license document, but changing it is not allowed. | |
Preamble |
# Some of this adapted from BoppreH's answer here:http://stackoverflow.com/questions/9817531/applying-low-level-keyboard-hooks-with-python-and-setwindowshookexa | |
import ctypes | |
from ctypes import wintypes | |
from collections import namedtuple | |
KeyEvents=namedtuple("KeyEvents",(['event_type', 'key_code', | |
'scan_code', 'alt_pressed', | |
'time'])) | |
handlers=[] |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
def reading(sensor): | |
import time | |
import RPi.GPIO as GPIO | |
GPIO.setwarnings(False) | |
GPIO.setmode(GPIO.BOARD) | |
TRIG = 11 |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charst='utf-8'> | |
<title>TEST</title> | |
<script src="//code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script> | |
<style> | |
.box { | |
background: #000000; | |
display: none; |
(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.
Original: "Callbacks are imperative, promises are functional: Node's biggest missed opportunity" by James Coglan
Translated by Yuta Okamoto (@okapies)
package main | |
import ( | |
"log" | |
"myserver" | |
"net/http" | |
) | |
const addr = "localhost:12345" |