This folder, attic, contains code fragments. Like most attics, this attic needs a good cleaning. Some fragments are from the usual places on the web, cplusplus.com, stackoverflow, etc. Some fragments are DIY code written in class. Some fragments are as-is as found on the web while others are heavily modified to make work or add functionality. So…
Switch branches/tags
Nothing to show
Clone or download
CaptGreg
Latest commit 559b22a Oct 16, 2018
Permalink
Failed to load latest commit information.
Cpp11-ThreadPool-master first commit Mar 26, 2015
coroutine coroutine sample code using C++11 features Oct 9, 2018
libpstreams add libpstreams + polish Makefile for fastforward on matrix May 18, 2015
mandelbrot throw out some attic junk Sep 4, 2015
modern-cpp-features Anthony Calandra's summary of new features in C++ 11, 14, and 17 Dec 19, 2017
opencl fix : in file names for opencl/opencl-web/VexCL: Vector expression te… Feb 6, 2016
openmp openmp slides Nov 13, 2017
parallel-pgm throw out some attic junk Sep 4, 2015
queuelockfree update lock free queue to latest May 2018 concurrent queue, move thre… May 30, 2018
queues first commit Mar 26, 2015
stl more stl resources, make note of 'stl/STL Algorithms in Action - Mich… Nov 12, 2016
threading-concurrency_in_action first commit Mar 26, 2015
threading clean up some trheading examples May 2, 2018
threadpool a c++14 thread pool Sep 8, 2017
webserver first commit Mar 26, 2015
02programming.pdf bash colors, pragma info, weakptr examples Dec 28, 2015
2d-array.cpp clean up chrono code Feb 29, 2016
2d-vector.cpp replace endl + std::endl with "\n" Feb 11, 2016
345-outline.txt 345-outline.txt: add some second half of the course elements Jul 9, 2017
An Easy Math Trick Nobody Will Show You-B-Xo2SHJiYE.mkv worth watching -->An Easy Math Trick Nobody Will Show You-B-Xo2SHJiYE… Sep 23, 2017
C++11.pdf first commit Mar 26, 2015
C++11_Swansea.pdf first commit Mar 26, 2015
C++11_smart_ptrs.pdf add C++11_smart_ptrs.pdf and clone-move.cpp Oct 14, 2015
Cpp11-ThreadPool-master.zip first commit Mar 26, 2015
DuffsDevice.cpp more Duff's Device code Feb 9, 2017
GoingParallelWithC++11-sc2013-prog105.pdf first commit Mar 26, 2015
Makefile Merge https://github.com/CaptGreg/SenecaOOP345-attic Jul 11, 2018
Mesh.h tidy some stuff up Apr 5, 2017
README.md tweek Jun 20, 2017
Shader.h tidy some stuff up Apr 5, 2017
Shader1.frag glVAO_VBO move shaders to inline std::string varaibles Dec 10, 2015
Shader1.vert glVAO_VBO move shaders to inline std::string varaibles Dec 10, 2015
Shader2.frag glVAO_VBO move shaders to inline std::string varaibles Dec 10, 2015
Shader2.vert glVAO_VBO move shaders to inline std::string varaibles Dec 10, 2015
ThinkingInC++-PracticalProgramming-PriorityQueues.txt add priority q + more vectorization Apr 23, 2015
UnixProgrammingFAQ.txt first commit Mar 26, 2015
Xlib-example.c some xlib examples Jul 20, 2015
aa.py finally sort out packaged_task does NOT thread Sep 4, 2015
aa2.py finally sort out packaged_task does NOT thread Sep 4, 2015
abc-h20.cpp replace endl + std::endl with "\n" Feb 11, 2016
abc.cpp first commit Mar 26, 2015
access.cpp replace endl + std::endl with "\n" Feb 11, 2016
alarmkill.cpp add signal, setjmp, alarm examples Apr 14, 2015
alarmsetjmp.cpp first commit Mar 26, 2015
alarmsig.cpp add signal, setjmp, alarm examples Apr 14, 2015
alarmthrow.cpp add signal, setjmp, alarm examples Apr 14, 2015
algorithm-r5.cpp rule-of-5 trace for push_back, emplace_back, for loop, iterator for l… Jul 4, 2017
all_of.cpp play around with the all_of example from cplusplus.com Jul 7, 2015
aossoa.cpp aossoa.cpp improve comment Jul 15, 2015
asan-BreakingAddressSanitizer.pdf asan programs address sanitization samples May 22, 2017
asan-ModernOverflowTargets.pdf asan programs address sanitization samples May 22, 2017
asan-atc12-final39.pdf asan programs address sanitization samples May 22, 2017
asan-global-buffer-overflow.cpp asan programs address sanitization samples May 22, 2017
asan-heap-buffer-overflow.cpp asan programs address sanitization samples May 22, 2017
asan-heap-use-after-free.cpp asan programs address sanitization samples May 22, 2017
asan-stack-buffer-overflow.cpp asan programs address sanitization samples May 22, 2017
asmlist.cpp tweak Oct 21, 2015
async.cpp replace endl + std::endl with "\n" Feb 11, 2016
asyncGB.cpp first commit Mar 26, 2015
atexit-on_exit.cpp tidy some stuff up Apr 5, 2017
atexit.cpp wrap globals in a namespace Jul 7, 2015
atomic.h atomic.h: assembler atomic operations from /usr/src/linux-headers-4.1… May 21, 2018
avconv.sh bash scripts for making .mp4 video and down-sampling w/Lanczos filtering Jul 27, 2015
bash-color.sh bash colors, pragma info, weakptr examples Dec 28, 2015
bash-menu.sh bash colors, pragma info, weakptr examples Dec 28, 2015
beeper.cpp beeper.cpp - simple discreet event simulation - simulate sometging th… Mar 22, 2016
binarysearch.cpp rework stringstream+string thread code, add thread bekery algorithm Apr 3, 2016
bind.cpp replace endl + std::endl with "\n" Feb 11, 2016
bit-twos-complement.pdf a terrific two's compliment arithmetic bit-wise description Nov 25, 2017
bitops.cpp disable sync between cout and wcout Oct 30, 2017
bitprint.cpp bitprint command line arguments Dec 21, 2017
bits.cpp replace endl + std::endl with "\n" Feb 11, 2016
bitshift.cpp add bit rotation Apr 13, 2017
bitshift2.cpp replace endl + std::endl with "\n" Feb 11, 2016
bitshiftsigned.cpp replace endl + std::endl with "\n" Feb 11, 2016
bool.cpp first commit Mar 26, 2015
boolean-ops.cpp print OR,AND,XOR tables Oct 17, 2016
boost-popen.cpp replace endl + std::endl with "\n" Feb 11, 2016
c++11_concurrency.pdf first commit Mar 26, 2015
c-namespace.c a student said C99 support namspece - Let's see: c-namespace.c Sep 16, 2015
call-stack1.cpp replace endl + std::endl with "\n" Feb 11, 2016
call-stack2.cpp change include headers to c++ from c Jan 23, 2016
call-stack3.cpp change include headers to c++ from c Jan 23, 2016
callbacks.cpp replace endl + std::endl with "\n" Feb 11, 2016
camera.cpp replace endl + std::endl with "\n" Feb 11, 2016
canny.cpp first commit Mar 26, 2015
capture_by_value.cpp replace endl + std::endl with "\n" Feb 11, 2016
cast.cpp replace endl + std::endl with "\n" Feb 11, 2016
char_string.cpp replace endl + std::endl with "\n" Feb 11, 2016
charstar.cpp replace endl + std::endl with "\n" Feb 11, 2016
chinese.cpp disable sync between cout and wcout Oct 30, 2017
cin-woes.cpp first commit Mar 26, 2015
cirq.cpp replace endl + std::endl with "\n" Feb 11, 2016
clambda.c first commit Mar 26, 2015
clang++-defines.sh add some OpenCL files Apr 20, 2015
clang.cpp first commit Mar 26, 2015
clean tweak Oct 19, 2015
clean.sh tweak Oct 19, 2015
clocks.cpp replace UNIX usleep call with a C++11 chrono DIY usleep Apr 17, 2016
clone-ex.cpp more tidying Apr 16, 2015
clone-move.cpp tweak Oct 19, 2015
clone-simple.cpp tidy some stuff up Apr 5, 2017
clone-unique_ptr.cpp multiple-inheritance clone using unique_ptr Jan 8, 2018
clone-why.cpp more tidying Apr 1, 2015
clone.cpp add more clone functions using smart pointers Aug 7, 2017
cmdq.cpp first commit Mar 26, 2015
comma.cpp add another comma example: cout << (1,2,3) << n; Jan 24, 2017
compassocaggreg.cpp replace endl + std::endl with "\n" Feb 11, 2016
compilers.txt first commit Mar 26, 2015
condition_variable.cpp first commit Mar 26, 2015
containers.cpp restore cilk May 14, 2015
copyelision.cpp replace endl + std::endl with "\n" Feb 11, 2016
core.cpp tidy Oct 24, 2015
coroutines.cpp tidy Mar 13, 2016
cow.cpp add cow -copy on write stl example May 13, 2015
cpp14-auto-lambda.cpp add c++14 auto lambda paramater example Apr 23, 2016
cpp14.cpp c++14 lambda with auto parameters Sep 16, 2016
cpp17_language.pdf C++ reference cards from Bartlomiej Filipek, http://www.bfilipek.com Dec 4, 2017
cpp17detail.pdf C++ reference cards from Bartlomiej Filipek, http://www.bfilipek.com Dec 4, 2017
cpp2011_.pdf first commit Mar 26, 2015
cpp_smart_pointers_ref.pdf C++ reference cards from Bartlomiej Filipek, http://www.bfilipek.com Dec 4, 2017
csv-parse.cpp parse a srring-delimiter delimited string Jun 4, 2018
csv-subst.cpp csv field substitute using C++17 Oct 26, 2017
csvreader.cpp used c++11 move inplace of 'clear()' Nov 16, 2016
ctor.cpp tweak Oct 21, 2015
ctor_throw.cpp improve DIY new/delete verbose message Sep 12, 2016
ctormove-better.cpp change buffer size from 'int' to 'size_t' for allocating more than 32… May 28, 2015
ctormove-hotpotato.cpp tidy ctormove-hotpotato.cpp Nov 18, 2015
ctormove.cpp change buffer size from 'int' to 'size_t' for allocating more than 32… May 28, 2015
curses-box.cpp replace UNIX usleep call with a C++11 chrono DIY usleep Apr 17, 2016
curses-progress.cpp replace UNIX usleep call with a C++11 chrono DIY usleep Apr 17, 2016
cv_wait_forGB.cpp first commit Mar 26, 2015
cycle.h first commit Mar 26, 2015
cycleclock.h first commit Mar 26, 2015
date.cpp date.cpp - date rountines Oct 12, 2015
delete.cpp delete.cpp - experiment with a DIY new/delete, recover from a delete … Mar 13, 2016
deque.cpp tidy some stuff up Apr 5, 2017
dot.cpp add C++17 (or is it C++11) filesystem path separator Jan 3, 2018
doubly.cpp replace endl + std::endl with "\n" Feb 11, 2016
dp-composite1.cpp first commit Mar 26, 2015
dp-composite2.cpp replace endl + std::endl with "\n" Feb 11, 2016
dp-composite3.cpp replace endl + std::endl with "\n" Feb 11, 2016
dp-composite4.cpp first commit Mar 26, 2015
dtor-virtual.cpp fix tabs May 11, 2018
dualinc.cpp add template-simple.cpp + tidy README.md Oct 1, 2015
duffs-device.cpp tidy some stuff up Apr 5, 2017
dynamic2D.cpp replace endl + std::endl with "\n" Feb 11, 2016
echoargs.cpp tweak ocl_c+11.cpp, add ocl_header.cpp ocl_ker_q.cpp oclvecadd.cpp May 26, 2015
embedded-C-In-Cars.pdf guidelines for writing embedded C applications for cars Jan 21, 2016
emplace.cpp add dtor prints to emplace example. Jan 2, 2018
enum-namespace.cpp tidy enum-namespace.cpp Sep 29, 2015
enum.cpp tidy some stuff up Apr 5, 2017
exception.cpp replace endl + std::endl with "\n" Feb 11, 2016
exceptions.cpp first commit Mar 26, 2015
exit.cpp exit.cpp - illustrate atexit, on_exit, and SIGABRT, SIGUSR1, SIGUSR2 … Sep 10, 2015
explicit.cpp explicit class operations Feb 11, 2016
externconst.cpp example on how to set up 'extern const' variables in a .h file and us… Feb 7, 2017
externconst.h example on how to set up 'extern const' variables in a .h file and us… Feb 7, 2017
externconstMain.cpp example on how to set up 'extern const' variables in a .h file and us… Feb 7, 2017
f-pt.cpp first commit Mar 26, 2015
fastforward.cpp cleanup rule-of-five, port to C++14 (breaks C++11) May 14, 2018
fd.cpp replace open(file,0) with open(file,O_RDONLY) Apr 15, 2018
ffmpeg.sh finally sort out packaged_task does NOT thread Sep 4, 2015
fftw-cycle.h first commit Mar 26, 2015
fifo.cpp tweak fifo.cpp Sep 2, 2018
filecopy.cpp tidy some stuff up Apr 5, 2017
filedesc.cpp first commit Mar 26, 2015
filesize.cpp first commit Mar 26, 2015
fill.cpp first commit Mar 26, 2015
find_contours.cpp first commit Mar 26, 2015
forward.cpp better std::forward (template r-value parm) example Jan 23, 2016
forward2.cpp some perfect forwarding ... Aug 16, 2015
forward3.cpp tidy Nov 18, 2015
friend.cpp a friend example from the web. Aug 17, 2017
funcobj101.cpp replace endl + std::endl with "\n" Feb 11, 2016
funcptr-more.cpp tweaks Oct 13, 2015
funcptr.cpp typo Sep 26, 2017
function-bad.cpp replace endl + std::endl with "\n" Feb 11, 2016
function_wrapper.cpp replace endl + std::endl with "\n" Feb 11, 2016
functiontemplate.cpp tweaks Oct 13, 2015
functor-varargs.cpp first commit Mar 26, 2015
functor.cpp replace endl + std::endl with "\n" Feb 11, 2016
future.cpp fix syntax error (source code from http://en.cppreference.com/w/cpp/t… May 8, 2017
futureGB.cpp first commit Mar 26, 2015
g++-defines.sh add some OpenCL files Apr 20, 2015
gcc-defines.sh add some OpenCL files Apr 20, 2015
generic_interface.cpp generic_interface.cpp - make it work with function objects. Feb 29, 2016
getRSS.c getRSS.c - how much memory does a unix process use? Sep 9, 2015
getaddrinfo_a.cpp replace endl + std::endl with "\n" Feb 11, 2016
git-checkout.sh add git-checkout.sh - script to checkout a file Oct 7, 2015
git-clone.sh add git-clone.sh May 19, 2015
git-pull.sh vectorization.cpp update Apr 24, 2015
git-push.sh vectorization.cpp update Apr 24, 2015
gl3ctx.cpp replace endl + std::endl with "\n" Feb 11, 2016
glContext-master.zip first commit Mar 26, 2015
glVAO_VBO.cpp add reference to opengl tutorials Apr 30, 2018
glx3.cpp a glx 3.0 example Sep 16, 2016
gpm.tar.xz gpm.tar.xz: gpm macro from 60's Sep 28, 2015
graph-dijkstra.cpp priority queue simulation + shortest-path dijkstra graph + stl examples May 17, 2015
hello-complicated.cpp replace endl + std::endl with "\n" Feb 11, 2016
hexdump.cpp make compile warning free: sprinkle const, convert char* to void*, co… Jun 29, 2018
hough.cpp replace endl + std::endl with "\n" Feb 11, 2016
i++-c-code.c port i++.cpp to i++-c-code.c, improve hello-complicated.cpp + chinese… May 25, 2015
i++.cpp port i++.cpp to i++-c-code.c, improve hello-complicated.cpp + chinese… May 25, 2015
i++test.cpp replace endl + std::endl with "\n" Feb 11, 2016
inc.cpp tidy some stuff up Apr 5, 2017
inheritance.cpp tidy some stuff up Apr 5, 2017
instructionset.cpp first commit Mar 26, 2015
iter-array.cpp iterator begin(a)/end(a) operating on an array a[].. Feb 13, 2018
iter-diy.cpp replace endl + std::endl with "\n" Feb 11, 2016
iterator-.cpp improvements Feb 28, 2016
iterator.cpp replace endl + std::endl with "\n" Feb 11, 2016
iterator2index.cpp Q. iterator difference is what type? - A. - long Jul 5, 2017
iterator_deque.cpp 345 course outline (in progress), measure max memory that can be allo… Jun 15, 2017
iterator_list.cpp improvements Feb 28, 2016
j++.cpp tidy some stuff up Apr 5, 2017
jsoncpp.cpp first commit Mar 26, 2015
knapsack.cpp knapsack graph algorithm May 26, 2016
lambda-book.cpp replace endl + std::endl with "\n" Feb 11, 2016
lambda-ex.cpp add some OpenCL files Apr 20, 2015
lambda-sort.cpp replace endl + std::endl with "\n" Feb 11, 2016
lambda-syntax.cpp replace endl + std::endl with "\n" Feb 11, 2016
lambda.cpp replace endl + std::endl with "\n" Feb 11, 2016
lambda.png first commit Mar 26, 2015
lambda_functor.cpp replace endl + std::endl with "\n" Feb 11, 2016
linux-lock-core.cpp tidy Oct 24, 2015
list.cpp first commit Mar 26, 2015
listinsert.cpp replace endl + std::endl with "\n" Feb 11, 2016
listsimple.cpp replace endl + std::endl with "\n" Feb 11, 2016
listsort.cpp first commit Mar 26, 2015
ll-cirq.cpp replace endl + std::endl with "\n" Feb 11, 2016
ll-doubly.cpp replace endl + std::endl with "\n" Feb 11, 2016
ll-persistence.cpp replace endl + std::endl with "\n" Feb 11, 2016
ll-xor-survey.cpp replace endl + std::endl with "\n" Feb 11, 2016
ll-xor.cpp replace endl + std::endl with "\n" Feb 11, 2016
ll.cpp replace endl + std::endl with "\n" Feb 11, 2016
ll2-problem.cpp replace endl + std::endl with "\n" Feb 11, 2016
ll2.cpp replace endl + std::endl with "\n" Feb 11, 2016
ll3.cpp replace endl + std::endl with "\n" Feb 11, 2016
ll4.cpp replace endl + std::endl with "\n" Feb 11, 2016
ll5.cpp replace endl + std::endl with "\n" Feb 11, 2016
ll6.cpp replace endl + std::endl with "\n" Feb 11, 2016
ll7.cpp replace endl + std::endl with "\n" Feb 11, 2016
ll8.cpp replace endl + std::endl with "\n" Feb 11, 2016
ll9.cpp replace endl + std::endl with "\n" Feb 11, 2016
llp-count.cpp first commit Mar 26, 2015
llp-pop.cpp replace endl + std::endl with "\n" Feb 11, 2016
llp-print.cpp first commit Mar 26, 2015
llp-push.cpp first commit Mar 26, 2015
llp-test.cpp first commit Mar 26, 2015
llp.dat first commit Mar 26, 2015
llp.h first commit Mar 26, 2015
longdouble.c long double sizes 32/64-bit c/c++ Jan 24, 2017
longdouble.cpp long double sizes 32/64-bit c/c++ Jan 24, 2017
longjmp.cpp replace endl + std::endl with "\n" Feb 11, 2016
love.cpp Port of the Christopher Strachey's Loveletters program (1952). Dec 27, 2017
lr-value-template.cpp fiddle with lr-value-template.cpp Jun 12, 2015
ls-dates.cpp first commit Mar 26, 2015
lx.cpp replace endl + std::endl with "\n" Feb 11, 2016
lx.h first commit Mar 26, 2015
macro.cpp add MAX macro with ++ side-effects, solve with macro defined lambda MAX Jul 25, 2017
main-fo-lambda.cpp tweak Jul 4, 2017
make-all.sh more fluff May 12, 2015
make.pdf bash colors, pragma info, weakptr examples Dec 28, 2015
mandelbrotset1.sh bash colors, pragma info, weakptr examples Dec 28, 2015
map-go.cpp There is some buzz going around claiming 'GO' is popular because of h… Jul 21, 2018
map-reduce.cpp adjust reduce, map-reduce, and tranform-reduce examples to run non-pa… Jul 4, 2018
map.cpp fix typo and improve comment Apr 19, 2017
max-mem.cpp tweeks Jun 20, 2017
mem.sh mem.sh - show memory used by an app Sep 9, 2015
mencoder.sh bash scripts for making .mp4 video and down-sampling w/Lanczos filtering Jul 27, 2015
mi-1.cpp replace endl + std::endl with "\n" Feb 11, 2016
mi-1a.cpp tidy some stuff up Apr 5, 2017
mi-2.cpp replace endl + std::endl with "\n" Feb 11, 2016
mi-3.cpp replace endl + std::endl with "\n" Feb 11, 2016
mi-4.cpp replace endl + std::endl with "\n" Feb 11, 2016
mi-5.cpp replace endl + std::endl with "\n" Feb 11, 2016
mi-6.cpp replace endl + std::endl with "\n" Feb 11, 2016
mi-7.cpp replace endl + std::endl with "\n" Feb 11, 2016
mi-8.cpp replace endl + std::endl with "\n" Feb 11, 2016
mi-diamond.cpp replace endl + std::endl with "\n" Feb 11, 2016
mi-h19.cpp first commit Mar 26, 2015
mi-jmp-printf.tar.gz first commit Mar 26, 2015
mi-x.cpp first commit Mar 26, 2015
modernc++.cpp improvements Feb 28, 2016
moments.cpp first commit Mar 26, 2015
move.cpp add another example to move.cpp Nov 5, 2015
moveGB.cpp tweeks Jun 20, 2017
moveGB2.cpp tidy some stuff up Apr 5, 2017
moveSimple.cpp first commit Mar 26, 2015
move_memblock.cpp replace endl + std::endl with "\n" Feb 11, 2016
move_operator.cpp first commit Mar 26, 2015
mutex-lock_guard.cpp first commit Mar 26, 2015
mutex-try_lock_for.cpp first commit Mar 26, 2015
mutex-try_lock_until.cpp first commit Mar 26, 2015
mutex-unique_lock.cpp first commit Mar 26, 2015
mutexGB.cpp first commit Mar 26, 2015
myPrintf.cpp first commit Mar 26, 2015
nested-loop.cpp tidy Mar 13, 2016
new-delete.cpp tweak new/delete operator overlaod example May 8, 2017
nullptr.cpp tidy some stuff up Apr 5, 2017
nullptrsegfault.cpp minor cleanup Jun 24, 2015
ocl_c++11-base.cpp bare bones opencl 1.2 CL/cl.hpp ocl_c++11-base.cpp - won't compile wi… Oct 16, 2018
ocl_c++11.cpp add details for a non ocl config May 2, 2018
ocl_header.cpp add threading/little-book-of-semiphores May 26, 2015
ocl_ker_q.cpp bash colors, pragma info, weakptr examples Dec 28, 2015
ocldemo.cpp replace endl + std::endl with "\n" Feb 11, 2016
ocldemo2.cpp add OpenCL + 'minor improvements' Apr 11, 2015
ocllistdev.c 1. Fix \n in print statements. 2. Add some memory size queries. Apr 13, 2016
oclvecadd.cpp replace endl + std::endl with "\n" Feb 11, 2016
omp.cpp first commit Mar 26, 2015
omp2.cpp first commit Mar 26, 2015
operatorGB.cpp replace endl + std::endl with "\n" Feb 11, 2016
packaged_task.cpp finally sort out packaged_task does NOT thread Sep 4, 2015
pair.cpp replace endl + std::endl with "\n" Feb 11, 2016
pathfind.cpp fix Makefile - was trying to compile Makefile along with the source f… May 26, 2016
pemrose.py finally sort out packaged_task does NOT thread Sep 4, 2015
permute.cpp add std::shuffle method to premute Jul 5, 2017
pimpl.cpp tweak pimpl.cpp Sep 10, 2015
pimpl_unique_ptr.cpp add some prints Dec 27, 2017
pipe-size.c set pipe/fifo buffer size Apr 11, 2018
pipe-size.sh script for running pipe-size.c Apr 14, 2018
pointers.cpp first commit Mar 26, 2015
policies.cpp try C++17 par execution std::reduce - not luck <execution> header nei… Aug 7, 2018
pool.cpp replace endl + std::endl with "\n" Feb 11, 2016
popen.cpp first commit Mar 26, 2015
pq1.cpp replace endl + std::endl with "\n" Feb 11, 2016
pq10-sim.cpp tidy Mar 13, 2016
pq2.cpp replace endl + std::endl with "\n" Feb 11, 2016
pq3.cpp tidy Mar 13, 2016
pq4.cpp add priority q + more vectorization Apr 23, 2015
pq5.cpp replace endl + std::endl with "\n" Feb 11, 2016
pq6.cpp add priority q + more vectorization Apr 23, 2015
pq7.cpp replace endl + std::endl with "\n" Feb 11, 2016
pq8.cpp add priority q + more vectorization Apr 23, 2015
pq9-icecream.cpp tidy Mar 13, 2016
pq9.cpp tidy Mar 13, 2016
pragma.txt bash colors, pragma info, weakptr examples Dec 28, 2015
prePostInc.cpp first commit Mar 26, 2015
promise-barrier.cpp tidy some stuff up Apr 5, 2017
promise-set_value_at_thread_exit.cpp play with setting multiple promise values - not successful Jun 20, 2017
promise.cpp improvements Feb 28, 2016
promise2.cpp improvements Feb 28, 2016
pthread.c first commit Mar 26, 2015
ptrdot.cpp tidy some stuff up Apr 5, 2017
ptrtomember.cpp add - * / operators Oct 5, 2016
q.cpp replace endl + std::endl with "\n" Feb 11, 2016
q2.cpp replace endl + std::endl with "\n" Feb 11, 2016
quadratic.cpp first commit Mar 26, 2015
queue.h first commit Mar 26, 2015
queuesimple.cpp replace endl + std::endl with "\n" Feb 11, 2016
queuesimple.h first commit Mar 26, 2015
r-literal.cpp disable sync between cout and wcout Oct 30, 2017
r5-min.cpp add reinterpret_cast in leau of c-style cast Oct 10, 2017
random-number.cpp modern C++ random numbers Jul 5, 2017
random.cpp 345 course outline (in progress), measure max memory that can be allo… Jun 15, 2017
range-based-for.cpp tweak Oct 20, 2015
readdir.cpp UNIX/Linux directory(folder) read code Nov 1, 2016
reduce.cpp adjust reduce, map-reduce, and tranform-reduce examples to run non-pa… Jul 4, 2018
ref.cpp replace endl + std::endl with "\n" Feb 11, 2016
reference_wrapper.cpp replace endl + std::endl with "\n" Feb 11, 2016
reference_wrapper_vector.cpp replace endl + std::endl with "\n" Feb 11, 2016
references-are-pointers.cpp format Jul 9, 2017
resize.sh finally sort out packaged_task does NOT thread Sep 4, 2015
rl-value.cpp tweak Oct 21, 2015
rof5-14.cpp tweeks Jun 20, 2017
ruleof3.cpp tweak Jun 27, 2017
ruleof35.cpp tweeks Jun 20, 2017
ruleof5.cpp explore a rhs constructor Sep 20, 2017
rvalue.cpp replace endl + std::endl with "\n" Feb 11, 2016
rvalue2.cpp first commit Mar 26, 2015
setjmp.cpp tidy some stuff up Apr 5, 2017
setjmp2.cpp first commit Mar 26, 2015
setw.cpp replace endl + std::endl with "\n" Feb 11, 2016
shared_futureGB.cpp first commit Mar 26, 2015
sig-1.cpp change setjmp.h to csetjmp, signal.h to csignal Jan 23, 2016
sig-alive.cpp tidy some stuff up Apr 5, 2017
signalslot.cpp replace endl + std::endl with "\n" Feb 11, 2016
signed-unsigned.cpp tidy Nov 23, 2015
size_t.cpp demonstrate the importance of proper use of 'size_t', pitfalls of inc… Nov 30, 2016
sizeof.cpp add streamsize Apr 22, 2017
sizeof2.cpp downsize the buffer size in sizeof2.cpp Aug 4, 2017
sizeof3.cpp replace endl + std::endl with "\n" Feb 11, 2016
sizeof4.cpp tidy some stuff up Apr 5, 2017
sizeof5.cpp replace endl + std::endl with "\n" Feb 11, 2016
sizeof6.cpp replace endl + std::endl with "\n" Feb 11, 2016
sleep_forGB.cpp replace endl + std::endl with "\n" Feb 11, 2016
snippet_7.c first commit Mar 26, 2015
sort-bubble.cpp replace endl + std::endl with "\n" Feb 11, 2016
sorted-arrays.cpp tidy some stuff up Apr 5, 2017
sorts.cpp rework stringstream+string thread code, add thread bekery algorithm Apr 3, 2016
sp-thread-safe.cpp thread safe shared_ptr + thread-promise-future examples Dec 17, 2016
sp0.cpp better sp0 -> ... -> sp9 shared pointer sequence of programs Nov 11, 2015
sp1.cpp tweek shared pointer example. Fix assignment operator example in sp6.cpp Jul 19, 2016
sp10.cpp add shared pointer file sp10.cpp Jan 21, 2016
sp2.cpp better sp0 -> ... -> sp9 shared pointer sequence of programs Nov 11, 2015
sp3.cpp better sp0 -> ... -> sp9 shared pointer sequence of programs Nov 11, 2015
sp4.cpp better sp0 -> ... -> sp9 shared pointer sequence of programs Nov 11, 2015
sp5.cpp better sp0 -> ... -> sp9 shared pointer sequence of programs Nov 11, 2015
sp6.cpp tweek shared pointer example. Fix assignment operator example in sp6.cpp Jul 19, 2016
sp7.cpp fix assignmant operator Nov 9, 2016
sp8.cpp add delete 1. mv ctor + 2. mv = op in sp8.cpp DIY smart pointer example Jul 11, 2018
sp9.cpp replace endl + std::endl with "\n" Feb 11, 2016
specials-ex4.cpp first commit Mar 26, 2015
specials-ex6.cpp first commit Mar 26, 2015
split.cpp string_view (C++17) split, shorten class Timer in timer.h Oct 16, 2018
splitstring.cpp factor code to clean it up Oct 28, 2017
stack-344a.cpp first commit Mar 26, 2015
stack-344b.cpp first commit Mar 26, 2015
stack-344c.cpp first commit Mar 26, 2015
stack-array.cpp replace endl + std::endl with "\n" Feb 11, 2016
stack-array.h first commit Mar 26, 2015
stack-template.cpp replace endl + std::endl with "\n" Feb 11, 2016
stack.cpp first commit Mar 26, 2015
stack.h first commit Mar 26, 2015
stacksimple.cpp replace endl + std::endl with "\n" Feb 11, 2016
stacksimple.h first commit Mar 26, 2015
stacktrace.h callstack code + fascinating in++ code + const-volatile exploratory code Dec 2, 2015
static-member.cpp static-member.cpp - how to set up a static data class member Oct 7, 2015
stdcopy.cpp prune a method that generated same code as another method Dec 8, 2017
stl-algo.cpp replace endl + std::endl with "\n" Feb 11, 2016
stl-base.cpp tidy Dec 8, 2015
stl-calc-deque.cpp replace endl + std::endl with "\n" Feb 11, 2016
stl-calc-list.cpp replace endl + std::endl with "\n" Feb 11, 2016
stl-calc-stack.cpp replace endl + std::endl with "\n" Feb 11, 2016
stl-calc-vector.cpp replace endl + std::endl with "\n" Feb 11, 2016
stl-calc.cpp replace endl + std::endl with "\n" Feb 11, 2016
stl-calc2.cpp replace endl + std::endl with "\n" Feb 11, 2016
stl-calc3.cpp replace endl + std::endl with "\n" Feb 11, 2016
stl-calc4.cpp replace endl + std::endl with "\n" Feb 11, 2016
stl-iterator-list.cpp replace endl + std::endl with "\n" Feb 11, 2016
stl-iterator.cpp replace endl + std::endl with "\n" Feb 11, 2016
stl-iterator2.cpp replace endl + std::endl with "\n" Feb 11, 2016
stl-iterator3.cpp replace endl + std::endl with "\n" Feb 11, 2016
stl-iterators.cpp replace endl + std::endl with "\n" Feb 11, 2016
stl-q+a.txt first commit Mar 26, 2015
stl-queue.cpp cplusplus.com queue example + funcptr-more.cpp typo Oct 6, 2015
stl-stack.cpp replace endl + std::endl with "\n" Feb 11, 2016
stl-vector.cpp replace endl + std::endl with "\n" Feb 11, 2016
stlbase.cpp range-based for with inherited stl base class Apr 17, 2016
str-namespace.cpp replace endl + std::endl with "\n" Feb 11, 2016
string-iterator.cpp minor cleanup Jun 24, 2015
string.cpp replace endl + std::endl with "\n" Feb 11, 2016
stringdiy.cpp replace endl + std::endl with "\n" Feb 11, 2016
stringstream.cpp first commit Mar 26, 2015
strtok.cpp first commit Mar 26, 2015
struct-template.cpp first commit Mar 26, 2015
swap.cpp replace endl + std::endl with "\n" Feb 11, 2016
template-recursion.cpp first commit Mar 26, 2015
template-simple.cpp replace endl + std::endl with "\n" Feb 11, 2016
template.cpp replace endl + std::endl with "\n" Feb 11, 2016
term-colors.cpp first commit Mar 26, 2015
terminate-exit.cpp add terminate experimets - Can destructors be called as part of an ex… Apr 21, 2017
testEOF.cpp first commit Mar 26, 2015
testtc.cpp replace endl + std::endl with "\n" Feb 11, 2016
thread-accumulate.cpp replace endl + std::endl with "\n" Feb 11, 2016
thread-bakery.cpp clean up bakery, add thread_local example May 2, 2018
thread-busy.cpp replace endl + std::endl with "\n" Feb 11, 2016
thread-class.cpp first commit Mar 26, 2015
thread-conqueue.cpp rework stringstream+string thread code, add thread bekery algorithm Apr 3, 2016
thread-cores.cpp first commit Mar 26, 2015
thread-detach.cpp first commit Mar 26, 2015
thread-for-async.cpp minor fixes Jul 20, 2018
thread-for-thread-args.cpp minor fixes Jul 20, 2018
thread-for-thread.cpp minor fixes Jul 20, 2018
thread-hardware_concurrency.cpp tweak Jul 19, 2017
thread-local.cpp tweeks May 2, 2018
thread-max-count.cpp tidy some stuff up Apr 5, 2017
thread-mbox.cpp polish thread mail box Mar 3, 2016
thread-member-function.cpp replace endl + std::endl with "\n" Feb 11, 2016
thread-pc-simple.cpp simplify producer-consumer example May 16, 2018
thread-pipeline.cpp a simple thread pipeline with condition_variable barrier code May 8, 2017
thread-poison.cpp 345 course outline (in progress), measure max memory that can be allo… Jun 15, 2017
thread-policy.cpp tweak Jul 19, 2017
thread-pool.cpp pound on some thread code Jun 24, 2015
thread-producer_consumer.cpp convert thread-producer-consumer.cpp to move semantics Mar 3, 2016
thread-promise-future.cpp thread safe shared_ptr + thread-promise-future examples Dec 17, 2016
thread-rope.cpp first commit Mar 26, 2015
thread-schedule.cpp tidy some stuff up Apr 5, 2017
thread-semaphore.cpp fix comment Jul 30, 2016
thread_atomic_compare_exchange_weak.cpp lock free queue examples Jul 8, 2015
thread_condition_variable.cpp ... May 20, 2015
thread_id_lambdaGB.cpp replace endl + std::endl with "\n" Feb 11, 2016
thread_yield.cpp try a simple thread pool to see the thread speed + overhaed in ocl_c++11 May 20, 2015
threadbuf.cpp first commit Mar 26, 2015
threading-async-algo.cpp first commit Mar 26, 2015
threading-async.cpp first commit Mar 26, 2015
threading-pc.cpp replace endl + std::endl with "\n" Feb 11, 2016
threading.zip first commit Mar 26, 2015
threading101-.cpp tweak Jul 19, 2017
threading101.sh first commit Mar 26, 2015
threading101a.cpp scabble cout output via this_thread.yield calls Mar 22, 2016
threading101b.cpp scabble cout output via this_thread.yield calls Mar 22, 2016
threading101c.cpp scabble cout output via this_thread.yield calls Mar 22, 2016
threading101d.cpp scabble cout output via this_thread.yield calls Mar 22, 2016
threading101e.cpp scabble cout output via this_thread.yield calls Mar 22, 2016
threading101f.cpp scabble cout output via this_thread.yield calls Mar 22, 2016
threading101g.cpp scabble cout output via this_thread.yield calls Mar 22, 2016
threading101h.cpp scabble cout output via this_thread.yield calls Mar 22, 2016
threading101j.cpp finally sort out packaged_task does NOT thread Sep 4, 2015
threading201.sh first commit Mar 26, 2015
threading201a.cpp first commit Mar 26, 2015
threading201b.cpp improvements Feb 28, 2016
threading301.sh first commit Mar 26, 2015
threading301a.cpp replace endl + std::endl with "\n" Feb 11, 2016
threading301b.cpp replace endl + std::endl with "\n" Feb 11, 2016
threading301c.cpp improvements Feb 28, 2016
threading301d.cpp replace endl + std::endl with "\n" Feb 11, 2016
threading301e.cpp fiddle with packaged_task example Feb 12, 2016
threading401.sh first commit Mar 26, 2015
threading401a.cpp fix typo in comment Jul 10, 2015
threads-34_master-native-handout.pdf first commit Mar 26, 2015
threadsafe-queue.h convert thread-producer-consumer.cpp to move semantics Mar 3, 2016
threadsafeq.cpp rework stringstream+string thread code, add thread bekery algorithm Apr 3, 2016
threadsafequeue.cpp rework stringstream+string thread code, add thread bekery algorithm Apr 3, 2016
threadsafequeue.h pound on some thread code Jun 24, 2015
timer.h string_view (C++17) split, shorten class Timer in timer.h Oct 16, 2018
timer_create.cpp first commit Mar 26, 2015
tp-packaged_task.cpp thread pool Jun 20, 2016
tp-packaged_task.h thread pool Jun 20, 2016
tp.cpp thread pool Jun 20, 2016
transform_reduce.cpp adjust reduce, map-reduce, and tranform-reduce examples to run non-pa… Jul 4, 2018
tree.cpp first commit Mar 26, 2015
trim.cpp tidy Mar 13, 2016
trythrowcatch.cpp clean up chrono code Feb 29, 2016
twoscompliment.cpp add alternative method for printbit Aug 17, 2017
typedef.cpp replace endl + std::endl with "\n" Feb 11, 2016
typeid.cpp tweeks Jun 20, 2017
union-member.cpp cat unions have member functions? Nov 25, 2017
unique_ptr-vec.cpp rework stringstream+string thread code, add thread bekery algorithm Apr 3, 2016
unique_ptr.cpp convert sort code to function templates, tidy unique_ptr.cpp Mar 13, 2016
unsigned-warning.cpp improvements Feb 28, 2016
valarray-matmul.cpp replace endl + std::endl with "\n" Feb 11, 2016
valarray-matrix.cpp replace endl + std::endl with "\n" Feb 11, 2016
valarray.cpp fix clang++ error with valarray.cpp Apr 24, 2015
variadic.cpp replace endl + std::endl with "\n" Feb 11, 2016
variadic_templates.cpp replace endl + std::endl with "\n" Feb 11, 2016
vec-emplace-push.cpp compare emplace_back(move(...)) vs push_back(move(...)) Nov 24, 2015
vectorchar1.cpp replace endl + std::endl with "\n" Feb 11, 2016
vectorchar2.cpp replace endl + std::endl with "\n" Feb 11, 2016
vectorchar3.cpp replace endl + std::endl with "\n" Feb 11, 2016
vectorchar4.cpp replace endl + std::endl with "\n" Feb 11, 2016
vectorctor.cpp track who (ctr, cp ctor, mv ctor) made what in vector ctor code using… May 28, 2018
vectorization.cpp vectorization.cpp update Apr 24, 2015
volatile.cpp callstack code + fascinating in++ code + const-volatile exploratory code Dec 2, 2015
w4-map.cpp Workshop 4 is a key-value workshop. KV pairs can be achieved with a s… Oct 10, 2017
w4-pair.cpp Workshop 4 is a key-value workshop. KV pairs can be achieved with a s… Oct 10, 2017
w4-struct.cpp Workshop 4 is a key-value workshop. KV pairs can be achieved with a s… Oct 10, 2017
wcat.cpp a wide character version of the cat unix command Nov 25, 2017
wchar-argv.cpp disable sync between cout and wcout Oct 30, 2017
wcout.cpp disable sync between cout and wcout Oct 30, 2017
weak-ptr-sutter.cpp rework stringstream+string thread code, add thread bekery algorithm Apr 3, 2016
weakptr-expired.cpp add more weakptr code Feb 12, 2016
weakptr-tree.cpp replace endl + std::endl with "\n" Feb 11, 2016
weakptr.cpp tidy some stuff up Apr 5, 2017
weakptr0.cpp rename weakptr.cpp to weakptr0.cpp because there is a 'weakptr' folde… Feb 28, 2016
weakptr1.cpp replace endl + std::endl with "\n" Feb 11, 2016
weakptr2.cpp bash colors, pragma info, weakptr examples Dec 28, 2015
weakptr3.cpp bash colors, pragma info, weakptr examples Dec 28, 2015
weakptr4.cpp format src Feb 11, 2016
weakptr5.cpp replace endl + std::endl with "\n" Feb 11, 2016
weakptr6.cpp tidy Mar 13, 2016
wfilestream.cpp disable sync between cout and wcout Oct 30, 2017
words.cpp python and C++ word index program Jun 24, 2017
words.py python and C++ word index program Jun 24, 2017
xiexie-meiwenti.cpp disable sync between cout and wcout Oct 30, 2017
xlib-tutorial.tar.gz some xlib examples Jul 20, 2015
xlib.cpp some xlib examples Jul 20, 2015
xorfile-threaded.cpp threaded version of xorfile.cpp Apr 17, 2018
xorfile.cpp add bit rotate to bitshift.cpp + tweak xorfile.cpp Apr 19, 2017
zombie_T_jessica_Bookcover.pdf zombie book cover created by Jessica Taylor Turner, a Seneca Arts stu… Oct 12, 2015
zombie_T_jessica_Bookcover.png .png: zombie book cover created by Jessica Taylor Turner, a Seneca Ar… Oct 12, 2015

README.md

This folder, attic, contains code fragments.

Like most attics, this attic needs a good cleaning.

Some fragments are from the usual places on the web, cplusplus.com, stackoverflow, etc.

Some fragments are DIY code written in class.

Some fragments are as-is as found on the web while others are heavily modified to make work or add functionality.

Some fragments are useful, some are not.

Most fragments work, some don't.

Notable Useful Fragments

fastforward.cpp - a summary of OOP345.

funcptr.cpp - examples of the many ways of passing function names to other functions: direct call, c-style function pointer, c++-style function pointer, function object (functor), lambda, bind examples of interesting functions to pass function to: thread, async, packaged_task

sp?.cpp - smart pointer resources

mi-*.cpp - multiple inheritance resources, clone+diamond problem

template-simple.cpp - simple example of class and function template

theading?01?.cpp - threading101?.cpp - basic threading, mutexes - threading201?.cpp - futures and promises - threading301?.cpp - async, packaged_task - threading401?.cpp - how things were done before async + packaged task

thread-*.cpp - cool thread code, such as thread pools

ll*.cpp - linked list code

cirq.cpp - circular linked list or q

moveSimple.cpp - move semantics

stl-calc-*.cpp - postfix calculator using stl stack, list, vector, deque containers

vectorchar*.cpp - how to make a string class based on std::vector

dp-composite*.cpp - composite (tree) design pattern code

alarmsetjmp.cpp + setjmp*.cpp - use alarm and setjmp to do interesting things

swap.cpp - swapping data in place (without using a temporary) using xor and add operators.

asmlist.cpp - how to generate an in-line assembler listing of the code generated by the compiler

popen.cpp - how to start up a pipe to a program and read the output from the program

ocl_c++11.cpp - how to run a minimal OpenCL program on a GPU using C++11 features

folder threading-concurrency_in_action - pdf and sample code from Concurancy in Action book