Modified version of this demonstration showing how to dynamically modify groups.
This file contains 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
[package] | |
name = "specs-roguelike" | |
version = "0.1.0" | |
authors = ["youCodeThings"] | |
edition = "2018" | |
[dependencies] | |
tcod = "0.13" | |
specs = "0.14.0" |
This file contains 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
[package] | |
name = "quiz" | |
version = "0.1.0" | |
authors = ["andrew <[email protected]>"] | |
[dependencies] |
This file contains 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
// JS calling Rust | |
var addon = require('../native'); | |
console.log(addon.hello()); | |
// -> "hello node" | |
console.log(addon.adder(1,2)); | |
// -> 3 | |
console.log(addon.objAdder({a: 2, b: 5})); |
This file contains 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
[package] | |
name = "snake_game" | |
version = "0.1.0" | |
authors = ["youcodethings <[email protected]>"] | |
[dependencies] | |
piston = "0.36.0" | |
piston2d-graphics = "0.26.0" | |
pistoncore-glutin_window = "0.45.0" | |
piston2d-opengl_graphics = "0.52.0" |
This file contains 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
#... Previous module up here ... | |
defmodule Solution do | |
#... Your code will live here | |
end |
Remake of this example using NetworkVizJS.
This example shows how easy it is to create a graph that changes dynamically.
This file contains 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
var screen = document.getElementById("screen"); | |
var player = document.getElementById("player"); | |
var height = 400, | |
width = 500, | |
playerHeight = 50, | |
playerWidth = 50; | |
// Add width and height to the screen. | |
screen.style.width = width; |
This file contains 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
<svg id="screen"> | |
<line x1="0" y1="400" x2="500" y2="400" stroke="green" stroke-width="4" /> | |
<rect id="player" width="50" height="50" /> | |
</svg> |
This file contains 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
package main | |
import ( | |
"fmt" | |
"net/http" | |
"reflect" | |
"runtime" | |
) | |
func hello(w http.ResponseWriter, r *http.Request) { |