http://w140.com/tekwiki/wiki/Phosphor
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
VAR = foobar => Assign value to variable when qmake is run | |
$$VAR => QMake variable's value at the time qmake is run | |
$${VAR} => QMake variable's value at the time qmake is run (identical but enclosed to separate from surrounding text) | |
$(VAR) => Contents of an Environment variable at the time Makefile (not qmake) is run | |
$$(VAR) =>Contents of an Environment variable at the time qmake (not Makefile) is run |
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
class FrequencyDoubler | |
{ | |
public: | |
FrequencyDoubler() { | |
coeffs = ReSampler::makeHilbert(1001); | |
length = coeffs.size(); | |
history.resize(length); | |
centerTap = length / 2; | |
currentIndex = length - 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
"quince" | |
"apple" | |
"bananna" | |
"cherry" | |
"" |
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
Mr Mrs | |
Ms | |
Miss | |
Dr | |
Herr | |
Monsieur | |
Hr | |
Frau | |
- | |
A V M |
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
#ifndef UGLYPLOT_H | |
#define UGLYPLOT_H | |
#include <iostream> | |
#include <cmath> | |
class UglyPlot | |
{ | |
public: | |
static void plot(const double* p, int length) |
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
// pick a good fft size for fftw (of the form 2^a * 3^b * 5^c * 7^d * [1|11|13] ) | |
int selectFFTSize(int n) | |
{ | |
int s = 1; | |
for(int ef : {1, 11, 13}) { | |
for(int d = 1 ; d <= n; d *= 7) { | |
for(int c = 1; c <= n; c *= 5) { | |
for(int b = 1; b <= n; b *= 3) { |
https://herbsutter.com/2008/01/01/gotw-88-a-candidate-for-the-most-important-const/
Q: what about this (see below ) ? ... because I do shit like this all the time:
(for const Suburb& suburb : thing.getSuburbList())
{
}
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
// in Widget A, residing in some other layout, but part of the same window as widget B | |
// someBox is a widget somewhere in widgetA | |
void WidgetA::resizeEvent(QResizeEvent *event) | |
{ | |
widgetB->setBoxYPos(someBox->mapTo(this->window(), someBox->rect().topLeft()).y()); | |
QWidget::resizeEvent(event); | |
} | |
// in widget B, which has a member QVBoxLayout* mainLayout |
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 <QDragEnterEvent> | |
#include "dragdropfilter.h" | |
bool DragDropFilter::eventFilter(QObject* obj, QEvent* event) | |
{ | |
auto w = qobject_cast<QWidget*>(obj); | |
if(w == nullptr) { | |
return true; | |
} |
NewerOlder