- Set up a new project directory called “DomQuiz”
- Initialize a git repo
- Set up an html5 file named index.html
- Write a paragraph element with an id of “question”
- Write an input text field with an id of “answer”
- Add a button with an id of “submit”
- commit
- Add a script tag to execute an external js file named dom_quiz.js
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
| import sys.db.Manager; | |
| import sys.db.Types; | |
| @:id(id) | |
| class User extends sys.db.Object { | |
| public var id : SId; | |
| public var name : SString<32>; | |
| } | |
| class Test |
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
| var input = require('input'); | |
| exports.numberguess = function(player){ | |
| var randomNumber = Math.ceil(Math.random() * 10); | |
| input( player, 'Think of a number between 1 and 10 (q to quit)', function( guess, guesser, repeat ) { | |
| if ( guess == 'q'){ | |
| return; | |
| } | |
| if ( +guess !== randomNumber ) { | |
| if (+guess < randomNumber ) { | |
| guesser.sendMessage('Too low - guess again'); |
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
| var utils = require('utils'); | |
| var last_deathstar_tnt_location; | |
| exports.deathstar = function deathstar(){ | |
| var pointer = new Drone(); | |
| pointer.fwd(10).left(3).sphere0(blocks.stone,4).fwd(2).right(2).up(3); | |
| var tnt_location_json = { world: pointer.world, | |
| x: pointer.x, | |
| y: pointer.y, | |
| z: pointer.z, |
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
| var bldg = function(floors) { | |
| var i, | |
| eyeball1, | |
| eyeball2; | |
| if ( typeof(floors) == 'undefined' ) { | |
| floors = 10; | |
| } | |
| this.down(1).fwd(15) | |
| .chkpt('myskyscraper'); |
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
| var bkGameMode = org.bukkit.GameMode; | |
| var bkItemStack = org.bukkit.inventory.ItemStack; | |
| var bkMaterial = org.bukkit.Material; | |
| var bkSnowball = org.bukkit.entity.Snowball; | |
| exports.giveRandomWeapon = function giveRandomWeapon(player) { | |
| // function giveRandomWeapon = function(player) { | |
| var weapons = [ | |
| 'IRON_SWORD', | |
| 'STONE_SWORD', |
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
| #!/bin/bash | |
| echo "Current Version is `/usr/bin/haxe -help | sed -n '1p'`" |
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
| Page.all(function(err:NodeErr, records:Array<Page>){ | |
| if(err != null) throw err; | |
| for(page in pages){ | |
| trace(page); | |
| } | |
| }) |
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
| var randomNumbers = [{ num : 604}, | |
| { num : 4664}, | |
| { num : 1717}, | |
| { num : 1098}, | |
| { num : 4053}, | |
| { num : 1112}, | |
| { num : 2965}, | |
| { num : 1877}, | |
| { num : 715}, | |
| { num : 2951}, |
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
| var combine = require('stream-combiner'); | |
| var split = require('split'); | |
| var through = require('through'); | |
| var zlib = require('zlib'); | |
| module.exports = function () { | |
| var genreInfo; | |
| function write(buf) { |