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
def my_method(a,b) | |
a+b | |
end | |
require 'test/unit' | |
class MyMethodTest < Test::Unit::TestCase | |
def test_zeroes | |
assert_equal(0, my_method(0, 0)) | |
end |
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
{ | |
"nodes": [ | |
{ | |
"id": 0, //Identifier | |
"x": 646, // Node x coordinates | |
"y": 122, // Node y coordinates | |
"label": "Start", // Mark the start graph's | |
"symbolType": "diamond", // Shape node's | |
"color": "red", // Color node's, | |
"text": "The text of the node" |
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
import Steering from "./steering.js"; | |
import Vector2 from 'phaser/src/math/Vector2' | |
export default class PatrollingLeftRight extends Steering { | |
constructor (owner, ownerSpeed= 80, force = 1) { | |
super(owner, force); | |
this.ownerSpeed = ownerSpeed; | |
this.lastX = owner.x; | |
this.currentDist = 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
import EasyStar from "easystarjs"; | |
import tilemapPng from '../assets/tileset/Dungeon_Tileset.png' | |
import dungeonRoomJson from '../assets/dungeon_room.json' | |
import auroraSpriteSheet from '../assets/sprites/characters/aurora.png' | |
import punkSpriteSheet from '../assets/sprites/characters/punk.png' | |
import blueSpriteSheet from '../assets/sprites/characters/blue.png' | |
import yellowSpriteSheet from '../assets/sprites/characters/yellow.png' | |
import greenSpriteSheet from '../assets/sprites/characters/green.png' | |
import slimeSpriteSheet from '../assets/sprites/characters/slime.png' |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- add mocha css, to show results --> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mocha/3.2.0/mocha.css"> | |
<!-- add mocha framework code --> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/mocha/3.2.0/mocha.js"></script> | |
<script> | |
mocha.setup('bdd'); // minimal setup | |
</script> |
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
morseDictionary = {{'0','-----'},{'1','.----'},{'2','..---'},{'3','...--'},... | |
{'4','....-'},{'5','.....'},{'6','-....'},{'7','--...'},... | |
{'8','---..'},{'9','----.'},... | |
{'a','.-'},{'b','-...'},{'c','-.-.'},{'d','-..'},... | |
{'e','.'},{'f','..-.'},{'g','--.'},{'h','....'},... | |
{'i','..'},{'j','.---'},{'k','-.-'},{'l','.-..'},... | |
{'m','--'},{'n','-.'},{'o','---'},{'p','.--.'},... | |
{'q','--.-'},{'r','.-.'},{'s','...'},{'t','-'},... | |
{'u','..-'},{'v','...-'},{'w','.--'},{'x','-..-'},... | |
{'y','-.--'},{'z','--..'}} |
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
function [output] = addText(image, text) | |
red_data = image(:,:,1); | |
text = strcat(num2str(length(text), '%03.f'), text); | |
binary_data = dec2bin(text)'; | |
data_to_encode = str2num(binary_data(:)); | |
for i = 1:length(data_to_encode) | |
red_data(i) = bitset(red_data(i), 1, data_to_encode(i)); | |
end | |
output = image; | |
output(:,:,1) = red_data; |
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
function [output] = addText(input, text) | |
red_data = input(:,:,1); | |
text = strcat(num2str(length(text), '%03.f'), text); | |
binary_data = dec2bin(text)'; | |
data_to_encode = str2num(binary_data(:)); | |
for i = 1:length(data_to_encode) | |
red_data(i) = bitset(red_data(i), 1, data_to_encode(i)); | |
end | |
output = input; | |
output(:,:,1) = red_data; |
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
.wrapper { | |
margin: 15px; | |
} | |
.row { | |
display: flex; | |
flex-direction: row; | |
flex-wrap: wrap; | |
width: 100%; | |
} |
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
a-scene | |
a-box color="#4CC3D9" position=("-1 0.5 -3") rotation=("0 45 0") | |
a-sphere color="#EF2D5E" position=("0 1.25 -5") radius="1.25" | |
a-cylinder color="#FFC65D" height="1.5" position=("1 0.75 -3") radius="0.5" | |
a-plane color="#7BC8A4" height="4" position=("0 0 -4") rotation=("-90 0 0") width="4" | |
a-sky color="#ECECEC" |
NewerOlder