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
// PlotLod has internal state, so keep it in your eframe app or somewhere else static | |
let lod = PlotLod(&file.large_data_set, 0.0, 10.0); | |
// and assign lod to Self somewhere | |
// ####### | |
// ####### | |
// down in the drawing department, i have something like this | |
egui::plot::Plot::new("Current") | |
.show(ui, |plot_ui| { |
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
[[noreturn]] void backtraceAbort(int skip) noexcept | |
{ | |
#ifdef SDL2WRAP_ENABLE_BACKTRACE_ABORT | |
std::fprintf(stderr, "Trying to Print Backtrace. \nThis might fail and crash, but after this point abort() is called anyway\n"); | |
// caller might also ask to be skipped | |
// we do not want to print backtrace_abort hence +1 | |
// also, dont use any c++ stuff as we might be trying to do things from near-death. | |
// honestly, calling malloc here is a stretch | |
skip += 1; | |
void* buffer[SDL2WRAP_BT_SIZE]; |
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
// released as CC0 | |
// Public Domain | |
#ifndef _ptrclass_h | |
#define _ptrclass_h | |
#include <memory> | |
/** | |
* \brief Parent struct that helps enforcing NoCopy rules | |
*/ |
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 "SDL.h" | |
#include <stdio.h> | |
#define SAMPLE_COUNT 4096 | |
#define CHANNEL_COUNT 2 | |
#define AUDIO_BUFFER_SIZE CHANNEL_COUNT*SAMPLE_COUNT | |
#define AUDIO_BUFFER_BYTES sizeof(short)*AUDIO_BUFFER_SIZE | |
int main(int argc, char** argv) | |
{ |
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
#!/usr/bin/env python2 | |
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org) | |
# The author disclaims copyright to this source code. | |
import sys | |
import struct | |
import socket | |
import time | |
import select |