Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
// Store an horizontal line (x1, y) --> (x2, y) | |
void line(int x1, int x2, int y) | |
{ | |
Color c; | |
c.r = lastColor.r; | |
c.g = lastColor.g; | |
c.b = lastColor.b; | |
for (int x = x1; x <= x2; x++) | |
{ | |
Vertex v; |
/* | |
I've wrapped Makoto Matsumoto and Takuji Nishimura's code in a namespace | |
so it's better encapsulated. Now you can have multiple random number generators | |
and they won't stomp all over eachother's state. | |
If you want to use this as a substitute for Math.random(), use the random() | |
method like so: | |
var m = new MersenneTwister(); |
--- | |
layout: specification | |
title: 2020-NOV-15 128-bit integer specification | |
date: 2020-01-14 | |
activation: 2020-NOV-15 | |
version: 1.0 | |
author: Tobias Ruck | |
--- | |
# Summary |
#include <iostream> | |
#include <bitset> | |
int main() | |
{ | |
union | |
{ | |
float input; // assumes sizeof(float) == sizeof(int) | |
int output; | |
} data; |
// Simple example code to load a Wav file and play it with WASAPI | |
// This is NOT complete Wav loading code. It is a barebones example | |
// that makes a lot of assumptions, see the assert() calls for details | |
// | |
// References: | |
// http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html | |
// Handmade Hero Day 138: Loading WAV Files | |
#include <windows.h> |
#include <iostream> | |
class A { | |
protected: | |
// public: | |
int key = 1; | |
double key2 = 20.1; | |
int key3 = 123454654; | |
}; |
REM Open new Chrome instance with two tabs | |
REM Thanks to https://stackoverflow.com/a/46488816/65545 | |
start chrome --new-window "https://www.facebook.com" "https://www.microsoft.com" | |
REM Open new Chrome instance with single tab | |
start chrome --new-window "https://www.google.com" |
<?php | |
$in = ">?)8'1<$9'\"8526,03(-##4#030(3:>+0/%,'!& 8#%?5\"6-"; | |
$out = ""; | |
$chars = str_split($in); | |
var_dump(count($chars)); | |
foreach ($chars as $char) { | |
$bin = decbin(ord($char)); | |
$bin = substr($bin, 0 -5); | |
$out .= $bin; | |
} |
<?php | |
function test1S(array $parameters) : void{ | |
$newParameters = []; | |
foreach ($parameters as $parameter) { //special case, ~~~ | |
$s = $parameter; | |
$l = strlen($s); | |
$currentPos = 0; | |
while ($currentPos < $l) { |