->
Marks the start of info on a "plan node"- Work from the leaves to the root to understand what happened first
(cost=0.00..5.04 rows=101 width=0)
(cost=
#!/bin/sh | |
# This script runs queries that interrogate vacuuming config and statistics. | |
set -e | |
function execute_query() { | |
local query="$1" | |
"$psql_cmd" "$database_url" -c "$query" | |
} |
#include <iostream> | |
#include <bitset> | |
static uint8_t rev(uint8_t v) { | |
uint8_t s = 8 * sizeof(v); // bit size; must be power of 2 | |
uint8_t mask = ~0; | |
while ((s >>= 1) > 0) { | |
mask ^= (mask << s); | |
v = ((v >> s) & mask) | ((v << s) & ~mask); | |
} |
#!/usr/bin/osascript -l JavaScript | |
// Update these with your chosen themes for Apple Terminal | |
const TERMINAL_DARK_THEME_NAME = "YourDarkTheme" | |
const TERMINAL_LIGHT_THEME_NAME = "YourLightTheme" | |
const app = Application.currentApplication() | |
app.includeStandardAdditions = true | |
const SysEvents = Application("System Events") |
// run with node --harmony | |
(() => { | |
'use strict' | |
function zip(... arrays) { | |
return arrays[0].map(function(_,i){ | |
return arrays.map(function(array){return array[i]}) | |
}); | |
} |
{ | |
// See https://go.microsoft.com/fwlink/?LinkId=733558 | |
// for the documentation about the tasks.json format | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "Build", | |
"type": "shell", | |
"command": "cargo build", | |
"group": { |
trait Animal { | |
fn make_sound(&self); | |
} | |
struct Dog {} | |
impl Animal for Dog { | |
fn make_sound(&self) { | |
println!("My signature bark!"); | |
} |
# Basic CMake project | |
cmake_minimum_required(VERSION 2.8.11) | |
# Name the project after the exercise | |
project(omptryout CXX) | |
set(OpenMP_CXX_FLAGS "-Xpreprocessor -fopenmp -I/usr/local/opt/libomp/include") | |
set(OpenMP_CXX_LIB_NAMES "omp") | |
set(OpenMP_omp_LIBRARY "/usr/local/opt/libomp/lib/libomp.dylib") | |
find_package(OpenMP REQUIRED) |
// clang++ -std=c++11 -o range range.cpp && ./range | |
// Based on http://stackoverflow.com/questions/7185437/is-there-a-range-class-in-c11-for-use-with-range-based-for-loops | |
// However https://en.wikipedia.org/wiki/Generator_%28computer_programming%29#C.2B.2B is a way simpler example | |
#include <iostream> | |
template <class T> | |
class RangeClass { | |
public: |
# Basic CMake project | |
cmake_minimum_required(VERSION 2.8.11) | |
# Name the project after the exercise | |
project(moving CXX) | |
set(CMAKE_CXX_FLAGS "-std=c++17 -Wall -Werror") | |
add_executable(moving moving.cpp) |