---
IndentCaseLabels: 'true'
IndentWidth: '4'
...
void foo(void) {
---
IndentCaseLabels: 'true'
IndentWidth: '4'
...
void foo(void) {
All atomic operations are guaranteed to be atomic within themselves (the | |
combination of two atomic operations is not atomic as a whole!) and to be | |
visible in the total order in which they appear on the timeline of the | |
execution stream. That means no atomic operation can, under any circumstances, | |
be reordered, but other memory operations might very well be. Compilers (and | |
CPUs) routinely do such reordering as an optimization. | |
It also means the compiler must use whatever instructions are necessary to | |
guarantee that an atomic operation executing at any time will see the results | |
of each and every other atomic operation, possibly on another processor core | |
(but not necessarily other operations), that were executed before. |
(interpreter) Running memcheck: underscore | |
==26617== Memcheck, a memory error detector | |
==26617== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. | |
==26617== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info | |
==26617== Command: chaos /root/chaos/tests/underscore.kaos | |
==26617== | |
1 | |
2 | |
3 |
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1); | |
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 8); | |
glEnable(GL_MULTISAMPLE); |
/* | |
* ████████╗ ██████╗ ██████╗ ██╗ ██╗ ██╗██╗████████╗ | |
* ╚══██╔══╝██╔═══██╗██╔═══██╗██║ ██║ ██╔╝██║╚══██╔══╝ | |
* ██║ ██║ ██║██║ ██║██║ █████╔╝ ██║ ██║ | |
* ██║ ██║ ██║██║ ██║██║ ██╔═██╗ ██║ ██║ | |
* ██║ ╚██████╔╝╚██████╔╝███████╗██║ ██╗██║ ██║ | |
* ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ | |
* | |
* Alex Belanger (nitrix) | |
* https://github.com/nitrix/toolkit |
package main | |
import ( | |
"fmt" | |
"image" | |
"image/color" | |
"time" | |
) | |
func main() { |
func triangularNumberOf(n int) int { | |
return n * (n + 1) / 2 | |
} | |
func reverseTriangularNumberOf(sum int) int { | |
n := (math.Sqrt(8 * float64(sum) + 1) - 1) / 2 | |
return int(math.Ceil(n)) | |
} |
# Docker Compose | |
# Runs a docker command of your choice from anywhere. | |
# | |
# Usage: dc <command> | |
dc() { | |
docker-compose --project-directory ~/Documents/Repos/workspace -f ~/Documents/Repos/workspace/docker-compose.yml $@ | |
} | |
# Docker Compose Restart. | |
# Restart a container by name. |
; Turn nasm into 16-bit mode | |
BITS 16 | |
; Set origin address | |
ORG 0x7C00 | |
; MEMORY LAYOUT | |
; 0x0000 - 0x0500 Interrupt Vector Table, BIOS Data Area | |
; 0x0500 - 0x7C00 Stack (growing down) | |
; 0x7C00 - 0x7E00 First stage bootloader | |
; 0x7E00 - 0xFFFF Free for use! |
dc() { | |
docker-compose --project-directory ~/Documents/Repos/ws-development -f ~/Documents/Repos/ws-development/docker-compose.yml $@ | |
} | |
# Docker compose restart | |
dcr() { | |
dc kill "$1" | |
dc up -d "$1" | |
} |