Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
#include <time.h> // Robert Nystrom | |
#include <stdio.h> // @munificentbob | |
#include <stdlib.h> // for Ginny | |
#define r return // 2008-2019 | |
#define l(a, b, c, d) for (i y=a;y\ | |
<b; y++) for (int x = c; x < d; x++) | |
typedef int i;const i H=40;const i W | |
=80;i m[40][80];i g(i x){r rand()%x; | |
}void cave(i s){i w=g(10)+5;i h=g(6) | |
+3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u |
#include "imgui.h" | |
#include "imgui_impl_sdl.h" | |
#include "imgui_impl_opengl3.h" | |
#include <stdio.h> | |
#include <SDL.h> | |
#include <GL/gl3w.h> | |
#include <string> | |
#include <iostream> | |
//A simple "analog" monophonic synthesizer! |
A list of useful commands for the FFmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
// ... | |
static int32_t* | |
get_indentation_marks(Application_Links *app, Partition *part, Buffer_Summary *buffer, Cpp_Token_Array tokens, int32_t line_start, int32_t line_end, bool32 exact_align, int32_t tab_width){ | |
int32_t indent_mark_count = line_end - line_start; | |
int32_t *indent_marks = push_array(part, int32_t, indent_mark_count); | |
// Shift the array so line_index works correctly. | |
indent_marks -= line_start; | |
// NOTE: TLD modifications begin here |
For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.
After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft
{1: {'answers': [{'answer': 'here is the answer', | |
'bestof_question': [], | |
'created': datetime.datetime(2017, 8, 19, 2, 41, 58), | |
'id': 1, | |
'updated': datetime.datetime(2017, 8, 19, 2, 41, 58)}], | |
'bestanswer': None, | |
'created': datetime.datetime(2017, 8, 19, 2, 41, 58), | |
'id': 1, | |
'statusid': {'Name': 'Example', 'id': 1}, | |
'tags': [], |
type CacheInterface interface { | |
Get(key string) ([]byte, error) | |
Set(key string, value interface{}) error | |
} | |
// Cache implements CacheInterface. | |
type Cache struct { | |
// wrap redis pool connection | |
// or whatever you need | |
} |
# LVDB - LLOOGG Memory DB | |
# Copyriht (C) 2009 Salvatore Sanfilippo <[email protected]> | |
# All Rights Reserved | |
# TODO | |
# - cron with cleanup of timedout clients, automatic dump | |
# - the dump should use array startsearch to write it line by line | |
# and may just use gets to read element by element and load the whole state. | |
# - 'help','stopserver','saveandstopserver','save','load','reset','keys' commands. | |
# - ttl with milliseconds resolution 'ttl a 1000'. Check ttl in dump! |
package main | |
import ( | |
"context" | |
"log" | |
"net/http" | |
"os" | |
"os/signal" | |
"time" | |
) |