CLICK ME
yes, even hidden code blocks!
print("hello world!")
{ | |
"scripts": { | |
"watch": "webpack serve --config webpack.dev.config.js", | |
"build": "webpack --config webpack.prod.config.js", | |
} | |
} |
#include <stdio.h> | |
static int SEED = 0; | |
static int hash[] = {208,34,231,213,32,248,233,56,161,78,24,140,71,48,140,254,245,255,247,247,40, | |
185,248,251,245,28,124,204,204,76,36,1,107,28,234,163,202,224,245,128,167,204, | |
9,92,217,54,239,174,173,102,193,189,190,121,100,108,167,44,43,77,180,204,8,81, | |
70,223,11,38,24,254,210,210,177,32,81,195,243,125,8,169,112,32,97,53,195,13, | |
203,9,47,104,125,117,114,124,165,203,181,235,193,206,70,180,174,0,167,181,41, | |
164,30,116,127,198,245,146,87,224,149,206,57,4,192,210,65,210,129,240,178,105, |
With Magnum and EnTT. An adaptation of ecs_pong which is example material for Flecs, another ECS framework, developed as a learning exercise of both Magnum, EnTT and ECS in general. Runs at a solid 60 fps, can you believe it?
There are NOTE
markings left in the code to highlight various differences and things I struggled with and would have liked to have done.
cmake_minimum_required(VERSION 3.1) | |
project(nbody) | |
# Add module path in case this is project root | |
if(PROJECT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) | |
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/../../modules/" ${CMAKE_MODULE_PATH}) | |
endif() | |
find_package(Magnum REQUIRED |
using System; | |
public static class CantorPairUtility { | |
public static int CantorPair(int x, int y) { | |
return (((x + y) * (x + y + 1)) / 2) + y; | |
} | |
public static void ReverseCantorPair(int cantor, out int x, out int y) { | |
var t = (int) Math.Floor((-1 + Math.Sqrt(1 + 8 * cantor)) / 2); |
Why?
This:
.action {
@extend .ml-3;
}
ul.tree, ul.tree ul { | |
list-style: none; | |
margin: 0; | |
padding: 0; | |
} | |
ul.tree ul { | |
margin-left: 10px; | |
} | |
ul.tree li { | |
margin: 0; |
.my-items-list { | |
@include make-row(); | |
&__item { | |
@include make-col-ready(); | |
@include media-breakpoint-up(xs) { | |
@include make-col(12); | |
} | |
@include media-breakpoint-up(sm) { |