ListLogLogPlot[
{{{2^16, 0.017},
{2^17, 0.039},
{2^18, 0.091},
{2^19, 0.236},
{2^20, 0.631},
{2^21, 1.745},
{2^22, 5.034},
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
// Toggle the `if constexpr` at line 382 to switch between stable_map and std::unordered_multimap | |
#include <assert.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <functional> | |
#include <memory> | |
#include <unordered_map> |
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
#define WIN32_LEAN_AND_MEAN | |
#define _CRT_SECURE_NO_WARNINGS | |
#define _SCL_SECURE_NO_WARNINGS | |
#include <Windows.h> | |
#include <cstdio> | |
#include <utility> | |
#include <string> | |
#include <vector> |
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
require('protectenv')() | |
local ffi = require('ffi') | |
local complex = require('complex') | |
local png = require('png') | |
local wlen = 4 | |
local wnum = 2*math.pi / wlen | |
local map = ffi.new('complex_t[512][512]') |
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
local png = {} | |
local ffi = require('ffi') | |
local libpng = ffi.load('libpng16.dll') | |
ffi.cdef[[ | |
typedef struct png_control *png_controlp; | |
typedef struct | |
{ |
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 <stdio.h> | |
#include <stdint.h> | |
#include <time.h> | |
template<typename Fn> | |
void measure(Fn fn) { | |
clock_t c1 = clock(); | |
fn(); | |
clock_t c2 = clock(); | |
printf("time: %7.3lf\n", (c2 - c1) / (double)CLOCKS_PER_SEC); |
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
module STList ( | |
STList, | |
STListPtr, | |
new, | |
prepend, | |
append, | |
mark, | |
pop, | |
popUntil, | |
foldr, |
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
/*****************************************************************************\ | |
* * | |
* windows.h - Windows functions, types, and definitions * | |
* * | |
* Version 3.10 * | |
* * | |
* Copyright (c) 1985-1992, Microsoft Corp. All rights reserved. * | |
* * | |
******************************************************************************* | |
* |
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 "controller.hpp" | |
#include "modelfilter.hpp" | |
namespace controller | |
{ | |
vector< quantity, 2 > targetpos = { 0.0_m, 0.0_m }; | |
void update() | |
{ | |
vector< quantity, 2 > posdiff = targetpos - modelfilter::ballpos; |
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
local modname = ... | |
local index = package.modtable(modname) | |
local ffi = require('ffi') | |
local databuffer = require('databuffer') | |
local filestorage = require('rsbin.filestorage') | |
local fileopenmode = require('rsbin.fileopenmode') | |
local storagestream = require('rsbin.storagestream') | |
local pngreader = require('rsbin.pngreader') | |
local pngwriter = require('rsbin.pngwriter') | |
local bitmapformat = require('rsbin.bitmapformat') |
NewerOlder