Derived from: https://github.com/PortAudio/portaudio/wiki/UsingTheGitRepository
Official Git reference: https://www.git-scm.com/docs/
| // Template-based Coroutine continuation idea by Ross Bencina <rossb@audiomulch.com> May 2014. | |
| // see: https://groups.google.com/forum/#!topic/comp.lang.c++.moderated/ryhWI6cX3Ko | |
| #include <iostream> | |
| class MyCoroutine { | |
| typedef MyCoroutine this_t; | |
| typedef bool (this_t::*coroutine_fn_t) (); | |
| coroutine_fn_t next_; |
| // Template-based async method continuation idea by Ross Bencina <rossb@audiomulch.com> May 2014. | |
| // see: https://groups.google.com/forum/#!topic/comp.lang.c++.moderated/ryhWI6cX3Ko | |
| #include <iostream> | |
| #include <list> | |
| typedef void (*async_callback_fn_t)(void*); | |
| struct PendingSimulatedTaskCallback{ | |
| async_callback_fn_t simulatedAsyncCallbackFn_; |
| /// Inheriting Types From Template Base Class | |
| /// ========================================= | |
| /// | |
| /// I put together this comparison of various methods of looking up types in | |
| /// a base class template after noticing that my code would compile correctly | |
| /// in MSVC but break in clang and gcc. | |
| /// | |
| /// Having reviewed the various cases, my conclusion is that MSVC is very | |
| /// permissive in looking up names in base class templates. It doesn't | |
| /// implement the correct C++ dependent name lookup rules. |
| # see https://lists.columbia.edu/pipermail/music-dsp/2015-November/000424.html | |
| # psd derivation due to Ethan Duni | |
| import numpy as np | |
| from numpy.fft import fft, fftfreq | |
| import matplotlib.pyplot as plt | |
| N = 16384*2*2*2*2*2 # FFT size | |
| y = (np.random.random(N) * 2) - 1 # ~U(-1,1) | |
| r = np.random.random(N) # ~U(0,1) |
| # Symbolic integration of [(1 - x^a)^b * e^iwx] dx from -1 to 1 | |
| # see discussion on music-dsp mailing list | |
| # "Re: [music-dsp] a family of simple polynomial windows and waveforms" | |
| from math import factorial | |
| from copy import deepcopy | |
| import string | |
| # binomial coefficient nCk | |
| def binomial(n, k): |
| // These are reduced test cases derived from a work-in-progress (non-production) code base. | |
| // Can you spot the bugs that PVS-Studio found? | |
| #include <atomic> | |
| #include "catch.hpp" | |
| /////////////////////////////////////////////////////////////////////////////// | |
| // Bug #1 |
| #include <iostream> | |
| // **Current Solution: Part 1 - send() function** | |
| // This is the easy part. | |
| // First, a type-level enum helper | |
| template<typename EnumClass, EnumClass X> | |
| struct EnumValue { |
| class Foo{ | |
| template<typename X> | |
| void foo() | |
| { | |
| } | |
| template<> | |
| void foo<int>() // error: explicit specialization of 'foo' in class scope | |
| { |
Derived from: https://github.com/PortAudio/portaudio/wiki/UsingTheGitRepository
Official Git reference: https://www.git-scm.com/docs/
Standard computer screens reliably give me a headache, with prolonged use, nausea and a migraine. Here's the setup that works for me:
I use VSCode in Windows 10 with a Boox Mira Pro monitor in Speed Mode. I may have changed some settings, here is how my Mira control panel is set is set: