Skip to content

Instantly share code, notes, and snippets.

View wawiesel's full-sized avatar

William A. Wieselquist wawiesel

  • Oak Ridge National Laboratory
  • Oak Ridge, Tennessee
View GitHub Profile
module variant_m
use iso_c_binding
type variant
!type(C_PTR) :: instance
end type
interface static_cast
module procedure static_cast_c_int
module procedure static_cast_c_float
class Table;
class Row {
size_t b_col;
const std::vector<std::string>* b_fmt;
Table* b_table;
std::vector<std::string> b_entries;
public:
Row(const std::vector<std::string>* fmt, Table* table)
: b_col(0)
, b_fmt(fmt)
@wawiesel
wawiesel / switch_on_strings_with_compile_time_hash.cc
Last active July 21, 2017 06:04
An example of a switch on strings using a compile time hash
// This is a demonstration of using a COMPILE-TIME hash to do a
// switch statement with a string to answer this question.
//
// https://stackoverflow.com/questions/4165131/c-c-switch-for-non-integers
//
// It is based on the StackOverflow question:
// https://stackoverflow.com/questions/2111667/compile-time-string-hashing
//
// And the solution
// https://stackoverflow.com/questions/2111667/compile-time-string-hashing/23683218#23683218
@wawiesel
wawiesel / read_write_access_to_github.sh
Created December 17, 2017 19:35
read/write access to github from anywhere
#make sure your access is https in your git config file
vi .git/config
[remote "origin"]
url = https://wawiesel@github.com/wawiesel/BootsOnTheGround.git
fetch = +refs/heads/*:refs/remotes/origin/*
#store passwords globally in a cache
git config --global credential.helper store
#create a personal access token https://github.com/settings/tokens
<?xml version="1.0" encoding="UTF-8"?>
<TEI
xmlns="http://www.tei-c.org/ns/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd">
<teiHeader xml:lang="en">
<fileDesc>
<titleStmt>
<title level="a" type="main" coords="1,105.53,75.81,400.94,12.18">The random ray method applied to fixed source transport problems</title>
<funder ref="#_KWyyfrX">