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<cstdio> | |
using namespace std; | |
class Base | |
{ | |
public: | |
virtual ~Base() {} | |
}; |
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
==30959== 12 bytes in 1 blocks are definitely lost in loss record 13 of 237 | |
==30959== at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) | |
==30959== by 0x476ED6: Orion::DCS_UpdateComponents(Orion::ComponentManager&, Orion::update_stage_t) (DCS.cpp:660) | |
==30959== by 0x42E098: Unit::DCS::DCS_UpdateComponents() (Unit_DCS.h:589) | |
==30959== by 0x5F8BD8: Test::Suite::do_run(Test::Output*, bool) (suite.cpp:179) | |
==30959== by 0x5F8C9E: Test::Suite::do_run(Test::Output*, bool) (suite.cpp:199) | |
==30959== by 0x5F8D45: Test::Suite::run(Test::Output&, bool) (suite.cpp:89) | |
==30959== by 0x408C52: main (OrionTest.cpp:294) |
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
/* | |
Compiler extensions made portable | |
Usage: | |
In MSVC, attributes must be on declarations in addition to prototypes. | |
Use _ATTRIBUTES to conditionally declare them, depending on compiler. | |
// Prototype | |
EXT_warn_unused_result EXT_force_inline int SomeFunc( void ); |
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
; | |
; compilation-mode improvements | |
; | |
(defun compilation-custom-hook () | |
(visual-line-mode 1)) | |
(add-hook 'compilation-mode-hook 'compilation-custom-hook) | |
(defun sludge-recompile-quietly () | |
"Re-compile without changing the window configuration." | |
(interactive) |
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
int Orion::Stricmp( const char *s1, const char *s2 ) | |
{ | |
const char *p1 = s1; | |
const char *p2 = s2; | |
int result = 0; | |
if ( p1 == p2 ) | |
return result; | |
while (!result) | |
{ |
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
void ImgPremultiply( void ) | |
{ | |
Assert( surface[0].GetNumChannels() == 4 ); | |
Uint8 *channels = surface[0].GetChannels(); | |
for ( Uint32 i = 0; i < surface[0].GetPixelCount(); ++i ) | |
{ | |
Uint8 *p = &(channels[i*4]); | |
p[0] = Uint8(p[0] * (p[3] / 255.0f)); | |
p[1] = Uint8(p[1] * (p[3] / 255.0f)); |
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
Uint32 mask = 0; | |
switch ( numChannels ) | |
{ | |
case 1: | |
mask = 0xFF000000; | |
break; | |
case 2: | |
mask = 0xFFFF0000; | |
break; | |
case 3: |
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 <nfd.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
/* this test should compile on all supported platforms */ | |
int main( void ) | |
{ | |
nfdchar_t *outPath = 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
@claypot_app.get('/event/<product_id:int>/<event_names>') | |
@claypot_app.get('/event/<product_id:int>/<event_names>/start_date/<start_date>') | |
@claypot_app.get('/event/<product_id:int>/<event_names>/date_range/<start_date>/<end_date>') | |
def get_event(product_id, event_names, start_date=None, end_date=None): | |
""" | |
break down the values for every key for a list of events | |
sample usage: | |
http://localhost/claypot/event/1/hwstats,event2,empty_event/start_date/2014-01-01 |
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 "ofxLightFactory.h" | |
#include "lighthardware.h" | |
void lightApp::setup() { | |
count = 0; | |
ofSetFrameRate(40); | |
dmxController.universe.connect(0); |
OlderNewer