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 <algorithm> | |
using namespace std; | |
void cube(int& l) { | |
l = l * l * l; | |
} | |
int main() { |
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 <algorithm> | |
#include <iterator> | |
#include <array> | |
using namespace std; | |
void cube(int& l) { | |
l = l * l * l; | |
} |
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 <vector> | |
#include <iterator> | |
#include <algorithm> | |
#include <fstream> | |
using namespace std; | |
vector<int> get_evens(const vector<int>& nums) { | |
vector<int> results; |
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> | |
using namespace std; | |
class Student { | |
//private: | |
string name; | |
double gpa; | |
public: |
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 "Student.h" | |
using namespace std; | |
Student::Student(string theName, double theGpa) : name(theName), gpa(-1) { | |
set_gpa(theGpa); | |
} | |
// accessor |
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 <iterator> | |
#include <algorithm> | |
#include "Roster.h" | |
Roster::Roster() { } | |
void Roster::add(Student& student) { | |
students.push_back(student); | |
} |
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
// based on code taken from | |
// http://en.cppreference.com/w/cpp/regex/regex_iterator#Example, | |
// last access 10/22/2016 | |
#include <regex> | |
#include <iostream> | |
using namespace std; | |
int main() { | |
// some words to pick apart |
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 <iterator> | |
#include <random> | |
#include <chrono> | |
using namespace std; | |
#ifndef LSEARCH_UTILS_H | |
#define LSEARCH_UTILS_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 <fstream> | |
#include <cstdlib> // for rand | |
#include "utils.h" | |
using namespace std; | |
/** | |
* NOTE: You may add other headers | |
* as well as your own functions |
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
(ns file-upload.handler | |
(:require [compojure.core :refer :all] | |
[compojure.route :as route] | |
[ring.middleware.defaults :refer [wrap-defaults site-defaults]] | |
[ring.middleware.params :refer [wrap-params]] | |
[ring.middleware.multipart-params :refer [wrap-multipart-params]] | |
[ring.middleware.reload :refer [wrap-reload]] | |
[ring.adapter.jetty :refer [run-jetty]] | |
[hiccup.core :refer [html]])) |
OlderNewer