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
/* | |
Question: | |
Use the following code to implement a TaskRunner. | |
A TaskRunner takes a "task" function, and executes it. | |
The "task" function takes a "done" callback function which will be invoked when the task completes execution. |
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
/etc/php/7.0/fpm/conf.d/10-opcache.ini, | |
/etc/php/7.0/fpm/conf.d/10-pdo.ini, | |
/etc/php/7.0/fpm/conf.d/15-xml.ini, | |
/etc/php/7.0/fpm/conf.d/20-apcu.ini, | |
/etc/php/7.0/fpm/conf.d/20-apcu_bc.ini, | |
/etc/php/7.0/fpm/conf.d/20-calendar.ini, | |
/etc/php/7.0/fpm/conf.d/20-ctype.ini, | |
/etc/php/7.0/fpm/conf.d/20-curl.ini, | |
/etc/php/7.0/fpm/conf.d/20-dom.ini, |
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
{% set value = (value is null ? field.default : value) %} | |
{% if exists %} | |
<div class="form-field grid vertical"> | |
<div class="form-label"> | |
<label>{{ field.label|tu }}</label> | |
</div> | |
<div class="form-data form-uploads-wrapper"> | |
<div id="grav-dropzone" class="dropzone"></div> | |
<span>{{ value|join("\n") }}</span> |
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
// FOUNDATION FOR APPS TEMPLATE GULPFILE | |
// ------------------------------------- | |
// This file processes all of the assets in the "client" folder, combines them with the Foundation for Apps assets, and outputs the finished files in the "build" folder as a finished app. | |
// 1. LIBRARIES | |
// - - - - - - - - - - - - - - - | |
var $ = require('gulp-load-plugins')(); | |
var argv = require('yargs').argv; | |
var gulp = require('gulp'); |
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 change a | |
# put your code here! | |
b = a.split("") | |
c = "abcdefghijklmnopqrstuvwxyz" | |
d = c.split("") | |
e = Hash.new | |
e = d.each {|x| e[x] = 0} | |
b.each {|x| | |
if b.include?(x) && d.include?(x) |
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
class Sleigh | |
def authenticate(name, password) | |
# TODO | |
access = false | |
users = {"Santa Claus": "Ho Ho Ho!"} | |
if users[name] == "#{password}" | |
access = true | |
end | |
return access |
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
class Account | |
attr_reader :name, :balance | |
def initialize(name, balance=100) | |
@name = name | |
@balance = balance | |
end | |
private | |
def pin | |
@pin = 1234 |