Skip to content

Instantly share code, notes, and snippets.

View warren30815's full-sized avatar

Jordan Hsu warren30815

View GitHub Profile
@fschr
fschr / vector_combinations.cpp
Created October 12, 2016 19:54
kinda fast std::vector combinations function c++
#include <stdint.h>
#include <stdlib.h>
#include <vector>
#define uint32 uint32_t
std::vector<std::vector<uint32>> combinations(std::vector<uint32> src, uint32 r) {
std::vector<std::vector<uint32>> cs;
if (r == 1) {
for (auto i = 0; i < src.size(); i++) {
@abdullah
abdullah / selend.js
Last active April 30, 2024 11:00
Selection End Event
let selectionEndTimeout = null,
event = new Event('selectionEnd');
document.addEventListener('selectionEnd', function (evt/*event*/) {
console.log("End selection!")
}, false);
[
"mouseup",