Reid Draper @reiddraper
We'll be using a tool called redbug, which is an abstraction and safety layer of Erlang's built-in dbg tracing facilities. You can follow along at home:
// Basic XMPP bot example for HipChat using node.js | |
// To use: | |
// 1. Set config variables | |
// 2. Run `node hipchat_bot.js` | |
// 3. Send a message like "!weather 94085" in the room with the bot | |
var request = require('request'); // github.com/mikeal/request | |
var sys = require('sys'); | |
var util = require('util'); |
=== modified file doap/schema/doap.rdf | |
--- doap/schema/doap.rdf 2009-06-25 16:32:08 +0000 | |
+++ doap/schema/doap.rdf 2010-07-30 14:41:53 +0000 | |
@@ -390,6 +390,19 @@ | |
<rdfs:domain rdf:resource="http://usefulinc.com/ns/doap#Project" /> | |
</rdf:Property> | |
+<rdf:Property rdf:about="http://usefulinc.com/ns/doap#dependency"> | |
+ <rdfs:isDefinedBy rdf:resource="http://usefulinc.com/ns/doap#" /> | |
+ <rdfs:label xml:lang="en">dependency</rdfs:label> |
#!/bin/sh | |
# Shell script to install your public key on a remote machine | |
# Takes the remote machine name as an argument. | |
# Obviously, the remote machine must accept password authentication, | |
# or one of the other keys in your ssh-agent, for this to work. | |
# | |
# http://www.devthought.com/2009/09/19/get-ssh-copy-id-in-mac-os-x/ | |
# |
defmodule Enex do | |
defmacro map enum, clauses do | |
fnc = {:fn, [], [clauses]} | |
quote do: Enum.map(unquote(enum), unquote(fnc)) | |
end | |
defmacro reduce enum, acc, clauses do | |
fnc = {:fn, [], [clauses]} | |
quote do: Enum.reduce(unquote(enum), unquote(acc), unquote(fnc)) | |
end |
// the advanced handler will allow to postpone for a given time. | |
// instead of using the java.lang.Thread class, the new class is java.lang.Runnable class | |
android.os.Handler.Handler | |
android.os.Message | |
java.lang.Runnable | |
Handler msgHandler = new Handler() { | |
@Override |
private AtomicReferenceArray<Thread> consumerWorker; | |
@Override | |
public void block() throws InterruptedException { | |
boolean parked=false; | |
for(int index=0;index<consumer;index++) | |
{ | |
if(consumerWorker.get(index)==null && consumerWorker.compareAndSet(index, null, Thread.currentThread())) |
defmodule MyStream do | |
def mutate(enum, user_acc, user) do | |
step = fn val, _acc -> {:suspend, val} end | |
next = &Enumerable.reduce(enum, &1, step) | |
&do_mutate([], user_acc, user, next, &1, &2) | |
end | |
defp do_mutate(values, user_acc, user, next, {:suspend, acc}, fun) do | |
{:suspended, acc, &do_mutate(values, user_acc, user, next, &1, fun)} | |
end |
package com.example.models; | |
import android.database.ContentObserver; | |
import android.database.Cursor; | |
import android.os.Handler; | |
import android.os.Looper; | |
import java.io.Closeable; | |
import java.util.concurrent.atomic.AtomicReference; |
Inspired by VividDreams' topic: "Mythical Creatures A-Z" | |
source: http://www.animationsource.org/board/japanese-mythical-creatures-t14593.html | |
A | |
* Abumi-guchi - a furry creature formed from the stirrup of a mounted military commander | |
* Abura-akago - an infant ghost who licks the oil out of andon lamps | |
* Abura-bō - a spook fire from Shiga Prefecture, in which the shape of a monk can often be seen | |
* Abura-sumashi - a spirit who lives on a mountain pass in Kumamoto Prefecture | |
* Akabeko - a red cow involved in the construction of Enzō-ji in Yanaizu, Fukushima |
We'll be using a tool called redbug, which is an abstraction and safety layer of Erlang's built-in dbg tracing facilities. You can follow along at home: