Generated using http://github.com/rbuckton/grammarkdown
SourceCharacter ::
any Unicode code point
InputElementDiv ::
WhiteSpace
LineTerminator
Comment
(function(baldrick){ | |
oldlogger = baldrick.prototype.log | |
baldrick.prototype.log = function(message,element,event) { | |
oldlogger(message,element,event) | |
if(console){ | |
console.log(message); | |
if(element){ | |
console.log('Trigger Element:'); | |
console.log(element); | |
} |
import core.sync.mutex : Mutex; | |
import core.thread : Thread, Fiber; | |
/** | |
* chan allows messaging between threads without having to deal with locks, similar to how chan works in golang | |
*/ | |
shared | |
class chan(T) { | |
Mutex lock; | |
private bool closed_; bool closed() {synchronized (lock) {return closed_;}} void Close() { synchronized(lock) { closed_ = true; } } |
module traits; | |
import traits_impl; | |
import std.typecons; | |
void main() { | |
MyInt i = 0x34342343; | |
writebytes(i); | |
writebytes2(1); |
#!/bin/bash | |
# from: https://lars.st0ne.at/blog/switch%20between%20windows%20within%20the%20same%20application | |
# get id of the focused window | |
active_win_id=$(xprop -root | grep '^_NET_ACTIVE_W' | awk -F'# 0x' '{print $2}') | |
if [ "$active_win_id" = "0" ]; then | |
active_win_id="" | |
fi | |
# get window manager class of current window |
#define _WIN32_WINNT 0x0500 | |
#include <windows.h> | |
#include <windowsx.h> | |
#include <GL/gl.h> | |
#include <GL/glu.h> | |
#include <dwmapi.h> | |
#pragma comment (lib, "opengl32.lib") |
// originally from here: http://stackoverflow.com/questions/9363491/how-to-make-transparent-window-on-linux | |
/*------------------------------------------------------------------------ | |
* A demonstration of OpenGL in a ARGB window | |
* => support for composited window transparency | |
* | |
* (c) 2011 by Wolfgang 'datenwolf' Draxinger | |
* See me at comp.graphics.api.opengl and StackOverflow.com | |
* License agreement: This source code is provided "as is". You | |
* can use this source code however you want for your own personal |
Generated using http://github.com/rbuckton/grammarkdown
SourceCharacter ::
any Unicode code point
InputElementDiv ::
WhiteSpace
LineTerminator
Comment
https://github.com/darylrowland/react-native-remote-push | |
https://facebook.github.io/react-native/docs/pushnotificationios.html | |
Pubnub can also do realtime chat, but it's a relatively expensive service. | |
The node.js server can be augmented with socket.io and function as a real-time chat server. | |
Amazon SNS https://aws.amazon.com/sns/ | |
https://aws.amazon.com/sns/pricing/ (faily cheap and works for all platforms, plus we'd get tech support at the loft) |
type ( | |
// BuoyCondition contains information for an individual station. | |
BuoyCondition struct { | |
WindSpeed float64 `bson:"wind_speed_milehour"` | |
WindDirection int `bson:"wind_direction_degnorth"` | |
WindGust float64 `bson:"gust_wind_speed_milehour"` | |
} | |
// BuoyLocation contains the buoy's location. | |
BuoyLocation struct { |