This file contains hidden or 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> | |
using namespace std; | |
struct Float | |
{ | |
Float( float val ) : m_val( val ) {} | |
operator float() { return m_val; } | |
float m_val; |
This file contains hidden or 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
import sys | |
import threading | |
import gobject | |
gobject.threads_init() | |
import gst | |
import struct | |
import Queue | |
RGB_UNPACKER = struct.Struct("BBBB") | |
COLS = 16 |
This file contains hidden or 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 <stdio.h> | |
class C | |
{ | |
public: | |
C() | |
{ | |
printf("Created C\n"); | |
} | |
}; |
This file contains hidden or 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
import struct | |
import sys | |
class NamedStruct( struct.Struct ): | |
def __init__(self, *contents): | |
""" | |
Construct with ("Format", "Name"), tuples as arguments. | |
""" | |
self.names, format = zip(*contents) | |
#Flatten format into a string |
This file contains hidden or 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
template<typename Signature> | |
class callback | |
{ | |
}; | |
template<typename R , typename ARG_TYPE0> | |
class callback<R( ARG_TYPE0)> | |
{ | |
public: | |
callback() {} |
NewerOlder