Since it's impossible to find one concise source anywhere, as far as I can tell:
ISO C++ Standard | Value |
---|---|
1998/2003 | 199711L |
2011 | 201103L |
2014 | 201402L |
2017 | 201703L |
#! /bin/bash | |
# source for most of this information: https://stackoverflow.com/a/58852167/2712525 | |
set -e | |
error() { | |
echo "failed!" | |
exit 1 | |
} |
(* 2019-06-07: Added nohup and output redirection to fix a bug with "Open Terminal here" feature. | |
Thanks to @fools-mate for bringing the issue to my attention. *) | |
on alfred_script(q) | |
do shell script "cd ~; nohup /Applications/kitty.app/Contents/MacOS/kitty /bin/bash -c \"source ~/.bashrc && " & q & ";/bin/bash\" > /dev/null 2>&1 &" | |
end alfred_script |
/* | |
* File: sockets.h | |
* Author: Will Eccles | |
* Date: 2020-03-12 | |
* | |
* 1. Description | |
* | |
* This header attempts to make it easy to use sockets across platforms, | |
* for both Windows and POSIX systems. While Winsock is often somewhat | |
* compatible with Berkeley sockets, it is not strictly compatible, |
/* Compile with -DUSE_READLINE and -lreadline to use readline for input. */ | |
#include <arpa/inet.h> | |
#include <errno.h> | |
#include <poll.h> | |
#include <signal.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/socket.h> |
#ifndef ONE_OF_H | |
#define ONE_OF_H | |
#include <tuple> | |
#include <utility> | |
template <class... T> | |
struct one_of { | |
std::tuple<T...> t; | |
constexpr one_of(T&&... values) : t{std::forward<T>(values)...} {} |
#include <stdbool.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <string.h> | |
#define STX 0x02 | |
#define ETX 0x03 | |
int main(int argc, char** argv) { | |
FILE* src = NULL; |
// TODO concepts/constraints/SFINAE to keep T as FP | |
// TODO make this more robust than the very basics | |
template <class T> | |
class KahanSum { | |
public: | |
KahanSum() : sum_{}, err_{} {} | |
KahanSum(T init) : sum_{init}, err_{} {} | |
constexpr KahanSum& Add(T val) { |
#include <stdio.h> | |
#define $x ,x | |
#define $i ,i | |
#define eval int | |
#define read scanf | |
#define $scanfpat "%d", & | |
#define $(x) ,(x) | |
#define $open ( | |
#define $close ) | |
#define do { |
/* | |
* Basic register map implementation in C++. Makes reading/writing registers | |
* safer, should be just as efficient as doing things the old fashioned way. | |
* The setup is a little ugly, but such is life. It was never going to be pretty | |
* anyway. | |
* | |
* Requires C++20, though that could be changed with a little SFINAE trickery. | |
* | |
* Example code uses GPIO peripherals on an AM3358. | |
* |