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
cmake_minimum_required(VERSION 3.19) | |
project(foo) | |
add_library(foo_lib STATIC | |
FooLib.c | |
) | |
add_executable(foo_app Foo.c | |
) |
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
diff --git a/tests/test_AudioLoading.cpp b/tests/test_AudioLoading.cpp | |
index ea4bf54a..0aa9fd59 100644 | |
--- a/tests/test_AudioLoading.cpp | |
+++ b/tests/test_AudioLoading.cpp | |
@@ -23,6 +23,9 @@ BOOST_AUTO_TEST_CASE(testBufferIsPlaying) { | |
sound.play(); | |
BOOST_REQUIRE(sound.isPlaying() == true); | |
+ sound.play(); | |
+ BOOST_REQUIRE(sound.isPlaying() == true); |
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
'use strict'; | |
let fs = require ('fs') | |
let EventEmitter = require ('events') | |
class FileTail extends EventEmitter { | |
constructor(fileName, options) { | |
super(); | |
this.readBytes = 0; | |
let self = this; |
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
function fup | |
scp $argv <<<SSH Destination goes here>>> | |
echo <<<Public Domain goes here>>>/(basename $argv) | xclip -i -selection PRIMARY | |
end |
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
import httplib, json, sys, re | |
def get_module_errors( connection, module ): | |
connection.request( 'GET', '/w/api.php?action=paraminfo&format=json&modules=%s' % module ) | |
resp = connection.getresponse() | |
data = json.loads(resp.read()) | |
errors = {} | |
for error in data['paraminfo']['modules'][0]['errors']: | |
errors[error['code']] = error['info'] | |
return errors |
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
# coding=utf-8 | |
Te = 0 | |
Tr = 1 | |
Tw = 2 | |
def gen_row(size, row = 0): | |
return [Te] * (size-1 if row%2 else size) | |
def gen_board(size): | |
f = lambda x: gen_row(size, x) |
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
javascript:(function(){function c(){var e=document.createElement("link");e.setAttribute("type","text/css");e.setAttribute("rel","stylesheet");e.setAttribute("href",f);e.setAttribute("class",l);document.body.appendChild(e)}function h(){var e=document.getElementsByClassName(l);for(var t=0;t<e.length;t++){document.body.removeChild(e[t])}}function p(){var e=document.createElement("div");e.setAttribute("class",a);document.body.appendChild(e);setTimeout(function(){document.body.removeChild(e)},100)}function d(e){return{height:e.offsetHeight,width:e.offsetWidth}}function v(i){var s=d(i);return s.height>e&&s.height<n&&s.width>t&&s.width<r}function m(e){var t=e;var n=0;while(!!t){n+=t.offsetTop;t=t.offsetParent}return n}function g(){var e=document.documentElement;if(!!window.innerWidth){return window.innerHeight}else if(e&&!isNaN(e.clientHeight)){return e.clientHeight}return 0}function y(){if(window.pageYOffset){return window.pageYOffset}return Math.max(document.documentElement.scrollTop,document.body.scrollTop)}funct |
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 |
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
['x','y','z'].forEach((function(d) { | |
this.movement[d] += (this.moveTarget[d] - this.movement[d]) * dt; | |
}).bind(this)); |
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
[1 0 0 0 | |
0 1 0 0 | |
0 0 1 0 | |
x y z 1] |
NewerOlder