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
enum class YourKeys | |
{ | |
A, | |
B, | |
Subtract | |
}; | |
using keymap_t = std::unordered_map<std::string, YourKeys>; | |
const keymap_t g_theKeysDukeTheKeys = | |
{ |
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
/* | |
CALICO | |
OpenGL Renderer Primitives | |
The MIT License (MIT) | |
Copyright (C) 2007-2014 Samuel Villarreal | |
Copyright (C) 2016 James Haley |
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 (mw, $) { | |
var imgMap = []; | |
var displayModal = function (magLink, imgInfo) { | |
// display the modal | |
$('.dw-img-modal').css('display', 'block'); | |
// set image properties | |
var modalImg = $('.dw-img-modal-img'); | |
modalImg.attr('src', imgInfo['thumburl' ]); |
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 <initializer_list> | |
#include <type_traits> | |
using namespace std; | |
template<typename EnumType> | |
class FlagSet | |
{ | |
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
/** assumes q1 is a normalised quaternion */ | |
public void set(Quat4d q1) { | |
double test = q1.x*q1.y + q1.z*q1.w; | |
if (test > 0.499) { // singularity at north pole | |
heading = 2 * atan2(q1.x,q1.w); | |
attitude = Math.PI/2; | |
bank = 0; | |
return; | |
} |
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 () { | |
var db = new PrometheusDB(); | |
if(!db.connect("live")) { | |
Console.println("Error: could not connect to database"); | |
return; | |
} | |
var peopleIDs = LazyVecMap.FromCSV("namefixids.csv"); | |
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
// | |
// CS 4143 | |
// Final Project | |
// James Haley | |
// | |
// Geometric primitives for BSPGEN | |
// | |
#include "math.h" | |
#include "geometry.h" |
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
// | |
// CS 4143 | |
// Final Project | |
// James Haley | |
// | |
// BSP Generation code | |
// | |
#include <stdlib.h> | |
#include <iostream.h> |
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
with ins_coverage_type as ( | |
select IP.id, | |
case | |
when exists ( | |
select * | |
from insurance_coverage IC | |
inner join insurance_policies IIP on IC.INSURANCE_POLICY_ID = IIP.id | |
inner join TAX_ENTITIES ITE on IIP.TAX_ENTITY_ID = ITE.ID | |
where IC.person_id = IP.id and | |
IIP.TAX_ENTITY_ID not in (3300, 3804, 5459, 5717, 3345, 4469, 3592, 135, 2590, |
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
wchar_t *print_as_wide(const char* mbstr) | |
{ | |
mbstate_t state = mbstate_t(); | |
size_t len = 1 + mbsrtowcs(NULL, &mbstr, 0, &state); | |
wchar_t *wstr = new wchar_t [len]; | |
mbsrtowcs(&wstr[0], &mbstr, len, &state); | |
wstr[len-1] = 0; | |
return wstr; | |
} |
NewerOlder