Skip to content

Instantly share code, notes, and snippets.

@JamesBremner
JamesBremner / TID168.json
Created May 5, 2015 17:54
TID168 test input
{
"CompanyID": 1,
"numberOfModes": 3,
"numberOfShaftDivisions": 20,
"numberOfShellDivisions": 20,
"numberOfEndDiskDivisions": 20,
"BeltWidth": 1600,
"BeltThickness": 10,
"BeltSpeed": 4,
"LaggingThickness": 12,
@JamesBremner
JamesBremner / TID162.json
Created May 5, 2015 18:19
TID162_Input_JSON
{"AppliedLoad":{"Design":{"T1":"403500","T2":"297000"},"Max":{"T1":"403500","T2":"297000"},"Run":{"T1":"403500","T2":"297000"}},"ApproachAngle":"1.5707963267948966","BeltSpeed":"4","BeltThickness":"10","BeltWidth":"1600","CompanyID":"0","LaggingThickness":"12","WrapAngle":"3.141592653589793","bearing":{"dynamicCapacity":"2200000"},"centerDisk":{"innerDiameter":"500","number":"2","outerDiameter":"996","width":"10"},"endDisk":{"centerDiameter":"0","centerWidth":"0","diskInnerDiameter":"555","diskInnerWidth":"70","hubInnerDiameter":"355","hubInnerWidth":"70","hubOuterDiameter":"555","hubOuterWidth":"70","material":{"E":"209000","itemNumber":"PM00000050","nu":"0.3","sB0":"490","yieldStrength":"350"},"notchFactorCenter":"0","notchFactorInner":"0","notchFactorOuter":"2","tipDiameter":"996","tipWidth":"15","useCenter":"false"},"lockingAssembly":{"DerateTorque":"true","InnerDiameter":"280","Item":"0","Manufacturer":"Ringfeder","MaxBendingMoment":"38440","Model":"7012","OuterDiameter":"355","PressureOnHub":"111","Torq
@JamesBremner
JamesBremner / TID162-2.json
Created May 5, 2015 18:32
TID162 causes crash
{
"CompanyID": "0",
"numberOfModes": 11,
"numberOfShaftDivisions": 20,
"numberOfShellDivisions": 20,
"numberOfEndDiskDivisions": 20,
"BeltWidth": 1600,
"BeltThickness": 10,
"LaggingThickness": 12,
"BeltSpeed": 4,
@JamesBremner
JamesBremner / dijkstra_time.cpp
Created June 9, 2015 14:30
cluster_dijkstra
#include <boost/config.hpp>
#include <iostream>
#include <fstream>
#include <boost/graph/graph_traits.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/dijkstra_shortest_paths.hpp>
#include <boost/property_map/property_map.hpp>
using namespace boost;
@JamesBremner
JamesBremner / so36086098.cpp
Created March 25, 2016 12:51
Implementation of stackoverflow answer http://stackoverflow.com/a/36086098/16582
// Implementation of stackoverflow answer http://stackoverflow.com/a/36086098/16582
#include <iostream>
using namespace std;
class cList
{
public:
@JamesBremner
JamesBremner / so36222891.cpp
Last active March 25, 2016 17:42
Parse CSV
// Example program
#include <iostream>
#include <string>
#include <vector>
#include <string>
#include <sstream>
void ParseCSV(
std::vector< std::string >& output,
const std::string& csv )
/** A test program for a continuous busy loop timer
For discussion see http://stackoverflow.com/q/40320926/16582
*/
#include <windows.h>
#include <iostream>
#include <chrono>
#include <thread>
#include <nana/gui.hpp>
namespace nana
{
namespace plot
{
class plot;
class trace
{
@JamesBremner
JamesBremner / theBank.cpp
Created October 13, 2017 13:49
Bank Accounts for Jamie S
#include <iostream>
#include <vector>
#include <string>
using namespace std;
class Account
{
public:
string name;
bool type;