This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class BaseElement extends HTMLElement { | |
dirty: boolean = true; | |
root: ShadowRoot; | |
constructor(hideInternals: boolean = true) { | |
super(); | |
this.root = this.attachShadow({ mode: hideInternals ? 'closed' : 'open' }); | |
const observer = new MutationObserver(() => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>loop over array</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <chrono> | |
#include <iostream> | |
#include <random> | |
#include <string> | |
using namespace std; | |
using namespace std::chrono; | |
int main() { | |
int playerGuess = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate rand; | |
extern crate amethyst; | |
use amethyst::{Application, Event, State, Trans, VirtualKeyCode, WindowEvent}; | |
use amethyst::asset_manager::AssetManager; | |
use amethyst::config::Element; | |
use amethyst::ecs::{World, Join, VecStorage, Component, RunArg, System, Entity}; | |
use amethyst::ecs::components::{Mesh, LocalTransform, Texture, Transform, Renderable}; | |
use amethyst::gfx_device::DisplayConfig; |