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
package smks.controls; | |
import flixel.ui.FlxAnalog; | |
import smks.player.Player; | |
/** | |
* @author Shaun Stone (SMKS) <[email protected]> | |
* @shaunmstone | |
*/ | |
class JoystickControls | |
{ |
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
package com.particles; | |
import flixel.effects.particles.FlxEmitter; | |
import flixel.effects.particles.FlxParticle; | |
import flixel.FlxG; | |
import flixel.group.FlxTypedGroup; | |
import flixel.system.FlxCollisionType; | |
import flixel.util.FlxRandom; | |
/** |
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
fetch('http://opencanvas.co.uk/ocl/api/actors?date=12-11-2016') | |
.then(function(res) { | |
return res.json(); | |
}) | |
.then(function(json) { | |
console.log(json); | |
}); |
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
const monthlyRent = 600; | |
const monthlyFoodCosts = 420.5; | |
const monthlyElectricBill = 45; | |
const monthlyGymMemberShip = 38; | |
const monthlySpotifyMemberShip = 15; | |
let costsOutstanding = 1118.5; | |
const payExpense = (expenseAmount) => { | |
return new Promise((resolve, reject) => { |
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
// this has to be today's date. | |
const dateToday = '12-11-2016'; | |
fetch('http://opencanvas.co.uk/ocl/api/fruits?date=' + dateToday) | |
.then(function(res) { | |
return res.json(); | |
}) | |
.then(function(json) { | |
const fruits = json.fruits; | |
for (let index in fruits) { |
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
// Number Formatter | |
var communityPoints = 35000000.00; | |
var ukFormatter = new Intl.NumberFormat('en-uk'); | |
var formattedNumber = ukFormatter.format(communityPoints); | |
console.log(formattedNumber); | |
// Currency formatter | |
var houseMaterialCosts = 120457.46; | |
var currencyFormatter = new Intl.NumberFormat('en-GB', { style: 'currency', currency: 'GBP' }); | |
var formattedCosts = currencyFormatter.format(houseMaterialCosts); |
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 formElement = document.createElement('form'); | |
formElement.setAttribute('method','post'); | |
formElement.setAttribute('action','login.php'); | |
var usernameField = document.createElement('input'); | |
usernameField.setAttribute('type','text'); | |
usernameField.setAttribute('name','username'); | |
var passwordField = document.createElement('input'); | |
passwordField.setAttribute('type','password'); |
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
/** | |
* | |
* Incorrect Context | |
* | |
*/ | |
class Greeter { | |
constructor(name) { | |
this.name = name; | |
} |
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
const batman = {firstName: 'Bruce', lastName: 'Wayne'}; | |
const superman = {firstName: 'Clark', lastName: 'Kent'}; | |
function speak(quote, location) { | |
console.log(this); | |
console.log(this.firstName + ' ' + this.lastName + ' ' + 'says ' + quote + ' from ' + location); | |
}; | |
// Apply for Array | |
speak.apply(batman, ["'It's not who I am underneath, but what I do that defines me'", "Gotham City"]); |
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
#! /usr/bin/env node | |
const mason = require('commander'); | |
const { version } = require('./package.json'); | |
const console = require('console'); | |
// commands | |
const create = require('./commands/create'); | |
const setup = require('./commands/setup'); |
OlderNewer