This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// g++ main.cpp -std=gnu++0x | |
#include <vector> | |
#include <memory> // shared_ptr | |
template <class T> | |
class Base | |
{ | |
public: | |
Base(T value) | |
:m_value(value) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// g++ main2.cpp -std=gnu++0x | |
#include <vector> | |
#include <memory> // shared_ptr | |
template <class T> | |
class Base | |
{ | |
public: | |
Base(T value) | |
:m_value(value) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <vector> | |
template <class T> | |
class Foo | |
{ | |
public: | |
void bar() | |
{ | |
typename std::vector<T>::const_iterator it; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdint.h> | |
#include <stdio.h> | |
#include <cstring> | |
#include <fstream> | |
#include <map> | |
#include <arpa/inet.h> | |
uint32_t* load_code(char *file, uint32_t &filesize) | |
{ | |
uint32_t *p_code = NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn kill-process [process-channel] | |
(send process-channel (fn [a] "stop"))) | |
(defn engine-loop [channel state process-list] | |
(loop [my-state state | |
my-process-list process-list] | |
(await channel) | |
(let [channel-value (deref channel)] | |
(do | |
(send channel (fn [a] "idle")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn start-process-by-agent [process-agent] | |
(send-off process-agent (fn [process-data] "running"))) | |
(defn stop-process-by-agent [process-agent] | |
(send-off process-agent (fn [process-data] "stopped"))) | |
(defn init [wfe-id] | |
(println "initiating wfe") | |
(println "TODO: load unfinished processes") | |
(agent (hash-map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Char | |
type Tape = [Char] | |
type Machine = (Tape, Tape) | |
type Operation = Machine → IO (Machine) | |
type Operations = [Operation] | |
raise = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
struct CallbackNoArg | |
{ | |
}; | |
class CallbackBase | |
{ | |
public: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <utils/event/signal.h> | |
#include <iostream> | |
class MySlot | |
{ | |
public: | |
void slot() | |
{ | |
std::cout << "foo" << std::endl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AbstractSocket | |
{ | |
public: | |
AbstractSocket() | |
:m_i(0) | |
{ | |
} | |
virtual void connect_to_host() | |
{ |
OlderNewer