Skip to content

Instantly share code, notes, and snippets.

@delta4d
delta4d / noisepage.diff
Created November 11, 2020 02:45
NoisePage on Virtual Env
diff --git a/src/execution/util/vector_util.cpp b/src/execution/util/vector_util.cpp
index 340091ea..a1fea15b 100644
--- a/src/execution/util/vector_util.cpp
+++ b/src/execution/util/vector_util.cpp
@@ -107,7 +107,11 @@ uint32_t VectorUtil::ByteVectorToSelectionVector(const uint8_t *byte_vector, con
auto idx = _mm_set1_epi16(0);
for (; i + 8 <= num_bytes; i += 8) {
const auto word = *reinterpret_cast<const uint64_t *>(byte_vector + i);
+#ifdef __BMI2__
const auto mask = _pext_u64(word, 0x202020202020202);
@delta4d
delta4d / 0_reuse_code.js
Created September 14, 2017 08:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@delta4d
delta4d / Sublime Text 3 Build 3103 License Key - CRACK
Created July 5, 2017 03:29
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
#include <ncurses.h>
#include <string.h>
char menus[10][100];
int read_menu() {
int n = 0;
char *p = NULL;
while (fgets(menus[n], sizeof(*menus), stdin)) {
if (p = strchr(menus[n], '\n')) *p = '\0';
@delta4d
delta4d / web-servers.md
Created December 12, 2016 09:34 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@delta4d
delta4d / README.md
Last active August 29, 2015 14:26 — forked from mattsears/README.md
Todo.rb: A simple command-line TODO manager written in Ruby

Todo.rb

Todo.rb is a simple command-line tool for managing todos. It's minimal, straightforward, and you can use it with your favorite text editor.

Getting Started

Todo.rb doesn't require any third-party gems so you can copy the file anywhere and use it as long as it's executable:

@delta4d
delta4d / list_test
Created December 29, 2014 15:36
list_test.txt
23220 28302 22492 5517 30489 11337 16942 22356 28118 22819 14514 27597 31379 15791 12033 20549 23870 12983 4366 7663 29451 26158 17487 5756 24761 27750 17438 24299 12824 29060 23902 23715 4808 7984 19809 26815 1091 2705 18441 19881 13597 15992 10542 17130 23947 13787 21824 23360 17699 23174 3374 6385 21986 23565 14726 7264 24691 29445 28893 8414 30126 25715 15729 15298 31072 22917 26125 4540 21066 24448 15917 30310 23404 9210 16739 10780 31363 16713 32249 10766 32720 12091 4824 18067 13083 11272 17576 29633 12792 12676 28217 2106 841 19097 20514 24136 1028 23797 936 2861 4406 15104 5345 8372
17
4625 2073 11532 20097 2273 20084 27862 7373 8768 28117 25469 29885 14342 24575 19910 25038 8781 27898 8872 20974 24285 1209 5725 23612 19688 23545 21433 25872 20728 20588 24507 17211 29989 22551 23394 19088 22923 32760 6081 24483 2299 15853 12374 30928 1521 6609
12
12415 9158 29160 463 19623 39 24189 31272 24465 12486 30921 28169 26079 31055 2327 2722 1484 7582 24614 18629 21429 9263 24527 25335 16345 7382 30439 2912
// unsigned
template <class T> inline T fastin() {
register char c = 0;
register T a = 0;
while (c < '0' || c > '9') c = getchar();
while ('0' <= c && c <= '9') a = a * 10 + c - '0', c = getchar();
return a;
}
// signed
@delta4d
delta4d / textips.md
Last active December 27, 2015 08:59
tex tips maybe..

some problems when I use latex, solution may work, but probably not the best

cross reference

\label{marker}: name a marker
\ref{marker}: ref a marker
@delta4d
delta4d / chdir.sh
Last active December 15, 2015 22:59
#!/usr/bin/env tcsh
# description: change dir based on .s
# with any arguments to go back
# TODO there is some problems with heredoc
set pd=
set cc=
while ( 0 == 0 )
if ( -d .s ) break