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
//! @author @Queequeg @Alan | |
//! @date 4 Oct,2014. | |
//! | |
//! Exercise 9.45: | |
//! Write a funtion that takes a string representing a name and two other | |
//! strings representing a prefix, such as “Mr.” or “Ms.” and a suffix, | |
//! such as “Jr.” or “III”. Using iterators and the insert and append functions, | |
//! generate and return a new string with the suffix and prefix added to the | |
//! given name. | |
//! |
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
/** | |
***************************************************************************** | |
* @file main.c | |
* @author Yue Wang 12027710 | |
* @version V1.0.0 | |
* @date 22-May-2013 | |
* @brief For the Assignment 5, 159.270 Hardware Oriented Programming. | |
**************************************************************************** | |
*/ | |
/* Includes ------------------------------------------------------------------*/ |
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
//! | |
//! @author Yue Wang | |
//! @date 15 Oct 2014 | |
//! @note for a question on SO: | |
//! http://stackoverflow.com/questions/26353067/how-to-recursively-compare-vectors/26359781#26359781 | |
//! | |
#include <iostream> | |
#include <vector> | |
#include <algorithm> |
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
//Lisp interpreter in 90 lines of C++ | |
//I've enjoyed reading Peter Norvig's recent articles on Lisp. He implements a Scheme interpreter in 90 lines of Python in the first, and develops it further in the second. | |
//Just for fun I wondered if I could write one in C++. My goals would be | |
//1. A Lisp interpreter that would complete Peter's Lis.py test cases correctly... | |
//2. ...in no more than 90 lines of C++. | |
//Although I've been thinking about this for a few weeks, as I write this I have not written a line of the code. I'm pretty sure I will achieve 1, and 2 will be... a piece of cake! |
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 <string> | |
#include <unordered_set> | |
#include <vector> | |
using namespace std; | |
class Solution | |
{ | |
//! O(n) |
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
dialog.h | |
/** | |
***************************************************************************** | |
* @file dialog.h | |
* @author Yue Wang 12027710 | |
* @version V1.0.0 | |
* @date 03-June-2013 | |
* @brief For the Assignment 6, 159.270 Hardware Oriented Programming. | |
**************************************************************************** | |
*/ |
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
/** | |
***************************************************************************** | |
* @file FTP_server.c | |
* @author Yue Wang 12027710 | |
* @version V1.0.0 | |
* @date 15-Oct-2013 | |
* @brief 159.334 Assignment 1 | |
**************************************************************************** | |
*/ | |
#include <windows.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
//! | |
//! @author Yue Wang | |
//! @date 13 11 2014 | |
//! | |
//! @ex 41.01 | |
//! (a) share data between two threads. | |
//! (b) use mutex to avoid data race. | |
//! | |
// to compile (on linux) : | |
// g++ -std=c++11 -Wall ex41_01.cpp -pthread |
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 <thread> | |
#include <mutex> | |
struct ThreadTest | |
{ | |
ThreadTest(): | |
t1{[this]{ print(1);} }, | |
t2{[this]{ print(2);} } | |
{} |
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 <thread> | |
#include <mutex> | |
#include <vector> | |
struct ThreadTest | |
{ | |
ThreadTest(): | |
threads_vector{10} | |
{ |
OlderNewer