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 <benchmark/benchmark.h> | |
#include <cstdint> | |
using bitcount_t = std::uint8_t; | |
template <typename itype> | |
inline itype unxorshift_new(itype x, bitcount_t bits, bitcount_t shift) | |
{ | |
do { | |
x ^= x >> shift; |
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 python3 | |
import fnmatch | |
import os | |
import sys | |
matches = [] | |
for root, dirnames, filenames in os.walk('DATA'): | |
for filename in fnmatch.filter(filenames, '*.MIS'): | |
matches.append(os.path.join(root, filename)) |
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 <stdint.h> | |
#include <stdio.h> | |
#include <inttypes.h> | |
#define REPITITIONS 1000000000 | |
// 6502 A register, C flag, and ADC instruction | |
static uint8_t a, c; | |
static void adc(uint8_t v) { | |
uint8_t a2 = a + v + c; |
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
// ... The changes made (starting at like 47) | |
template<class T, class... Types> | |
inline T (__cdecl *MC2_PROC_PTR(const std::uintptr_t address))(Types...) { | |
return reinterpret_cast<T(__cdecl *)(Types...)>(address); | |
} | |
template<class T, class... Types> | |
inline T (__cdecl *MC2_PROC_PTR_VA(const std::uintptr_t address))(Types..., ...) { | |
return reinterpret_cast<T(__cdecl *)(Types..., ...)>(address); | |
} |
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 "Example.hpp" | |
static Example::vTable Example_vtable = { | |
&Example::impl_00, | |
}; | |
Example::Example() : vtable(&Example_vtable) { } | |
void Example::impl_00() { | |
// Do Stuff Here |
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 <iostream> | |
#include <SDL.h> | |
#include <SDL_opengl.h> | |
int main(int argc, char * argv[]) { | |
if (SDL_Init(SDL_INIT_VIDEO)) { | |
std::cerr << "Error In Init" << std::endl; | |
return 1; | |
} | |
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
@import AppKit; | |
#include <SDL2/SDL.h> | |
#include <SDL2/SDL_syswm.h> | |
void update_SDL_Window_NSWindow(SDL_Window *win) { | |
SDL_SysWMinfo wmi; | |
SDL_VERSION(&wmi.version); | |
if (SDL_GetWindowWMInfo(win, &wmi)) { | |
switch (wmi.subsystem) { | |
case SDL_SYSWM_COCOA: |
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
Change-Id: I6e1503652e61683a16312c74f46b79d28c880848 | |
diff --git a/src/widgets/widgets/qlabel.cpp b/src/widgets/widgets/qlabel.cpp | |
index 83e94c4..80957e6 100644 | |
--- a/qtbase/src/widgets/widgets/qlabel.cpp | |
+++ b/qtbase/src/widgets/widgets/qlabel.cpp | |
@@ -1076,14 +1076,16 @@ void QLabel::paintEvent(QPaintEvent *) | |
if (d->pixmap && !d->pixmap->isNull()) { | |
QPixmap pix; | |
if (d->scaledcontents) { |
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
public class Hooked { | |
public Hooked() { | |
} | |
/** | |
* Silently place a call to the custom hook, does not return any information. | |
* |