This file contains hidden or 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 "juan.h" | |
using namespace std; | |
myClass * theClass; | |
int main() { | |
// define the size of the array we want. | |
int theSize = 10; |
This file contains hidden or 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 "juan.h" | |
//define the constructor | |
myClass::myClass(int theSize) : | |
arraySize(theSize) | |
{} | |
//define constructor | |
myClass::~myClass() | |
{} |
This file contains hidden or 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
convert 01.png -gravity North -pointsize 20 -annotate +0+5 '05/01/16' 01-label.png | |
convert 02.png -gravity North -pointsize 20 -annotate +0+5 '15/01/16' 02-label.png | |
convert 03.png -gravity North -pointsize 20 -annotate +0+5 '01/02/16' 03-label.png | |
convert 04.png -gravity North -pointsize 20 -annotate +0+5 '15/02/16' 04-label.png | |
convert 05.png -gravity North -pointsize 20 -annotate +0+5 '01/03/16' 05-label.png | |
convert 06.png -gravity North -pointsize 20 -annotate +0+5 '15/03/16' 06-label.png | |
convert 07.png -gravity North -pointsize 20 -annotate +0+5 '01/04/16' 07-label.png |
This file contains hidden or 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
## edit-date-from-filename Rscript | |
#!/usr/bin/env Rscript | |
fileName = commandArgs(trailingOnly = TRUE) | |
# Check is image file | |
CheckIsImage <- function(file) { | |
acceptedExts <- c("jpg", "JPEG") | |
if (tools::file_ext(file) %in% acceptedExts) { | |
message("File processing...") | |
} else { |
This file contains hidden or 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
## Increment Function Test | |
# R doesn't have an `increment operator` like `++` in C++ | |
# However, we can implement one; but, is it faster than just writing out x <- x + 1? | |
inc <- function(x) {eval.parent(substitute(x <- x + 1))} | |
# Test One (function) | |
TestOne <- function() { | |
x = 1 |
This file contains hidden or 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
// | |
// main.cpp | |
// Random | |
// | |
// Created by Jack Olney on 22/03/2016. | |
// Copyright © 2016 Jack Olney. All rights reserved. | |
// | |
#include <iostream> | |
#include <random> |
This file contains hidden or 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 <iomanip> | |
#include <iostream> | |
#include <vector> | |
#include "euler.h" | |
#include "parameters.h" | |
#include "initial.h" | |
// R-stuff | |
#include <Rdefines.h> | |
#include <stdio.h> |
This file contains hidden or 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 <typeinfo> | |
#include <vector> | |
using namespace std; | |
struct OutOfRange{}; | |
int ConvertInt(const unsigned long int TheUnsignedLong) { | |
const int DesiredOutput = static_cast<int>(TheUnsignedLong); |
This file contains hidden or 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
if(theRng->Sample(0.8)) // 80% agree to start ART | |
if(theRng->Sample(0.8)) // 80% are linked to ART | |
new ArtInitiation(thePerson,GetTime()); // Initiate ART immediately | |
else | |
thePerson->SetInCareState(false,GetTime()); // Person lost from care | |
else | |
SchedulePreArtCd4Test(thePerson); // Schedule CD4 test |