directory layout
./hello_app.erl
./ebin
./hello.app
code
| #include <v8.h> | |
| #include <node.h> | |
| #include <node_events.h> | |
| #include <boost/thread.hpp> | |
| #include <boost/bind.hpp> | |
| #include <iostream> | |
| using namespace node; | |
| using namespace v8; |
| #include <v8.h> | |
| #include <node.h> | |
| #include <node_events.h> | |
| #include <c-client-src/zookeeper.h> | |
| #include <iostream> | |
| using namespace node; | |
| using namespace v8; |
| var ctx = new webkitAudioContext(); | |
| var startTime = 0; | |
| function playSound(buffer) { | |
| var src = ctx.createBufferSource(); | |
| src.buffer = buffer; | |
| src.looping = false; | |
| src.connect(ctx.destination); | |
| src.noteOn(startTime); |
| $ node-waf clean configure build | |
| 'clean' finished successfully (0.014s) | |
| Setting srcdir to : /Users/jan/Projects/node.js/nodekeeper2 | |
| Setting blddir to : /Users/jan/Projects/node.js/nodekeeper2/build | |
| Checking for program g++ or c++ : /usr/bin/g++ | |
| Checking for program cpp : /usr/bin/cpp | |
| Checking for program ar : /usr/bin/ar | |
| Checking for program ranlib : /usr/bin/ranlib | |
| Checking for g++ : ok | |
| Checking for node path : ok /Users/jan/.node_libraries |
| UJAM.Node = SC.Object.extend({ | |
| parentNode: null, | |
| childNodes: [], | |
| childsDidChange: function () { | |
| alert('child nodes changed'); | |
| }.observes('childNodes'), | |
| addChild: function (node) { | |
| this.childNodes.push(node); |
| static std::string timePointAsString(const std::chrono::system_clock::time_point& tp) { | |
| std::time_t t = std::chrono::system_clock::to_time_t(tp); | |
| std::string ts = std::ctime(&t); | |
| ts.resize(ts.size()-1); | |
| return ts; | |
| } |
| short parity(unsigned long x) { | |
| short result = 0; | |
| while (x) { | |
| result ^= 1 | |
| x &= (x - 1); | |
| } | |
| return result; | |
| } |
| #include <iostream> | |
| #include <vector> | |
| #include <algorithm> | |
| #include <cassert> | |
| template <typename T> | |
| void swap(T& vec, std::size_t a, std::size_t b); | |
| constexpr std::size_t firstChild(std::size_t i); |
This is not intended to be comprehensive or authoritative, just free online resources I've found valuable while learning more about Erlang.