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 getAlphabet() { | |
return 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split(''); | |
} | |
function hasLetterFn(str) { | |
str = str.toUpperCase(); | |
return function (isPangram, letter) { | |
return isPangram && (str.indexOf(letter) > -1); | |
} |
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
CodeMirror.defineMode("mustache", function (config, parserConfig) { | |
var mustacheOverlay = { | |
token: function (stream, state) { | |
if (stream.match("{{")) { | |
while ((ch = stream.next()) != null) | |
if (ch == "}" && stream.next() == "}") break; | |
return "mustache"; | |
} | |
while (stream.next() != null && !stream.match("{{", false)) {} | |
return null; |
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 Base | |
attr_accessor :configuration | |
def initialize(configuration) | |
@configuration = configuration | |
end | |
def do_a_thing() | |
# specifying the parenthesis below resolves your problem | |
configuration = configuration() + 1 |
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
<?php defined('SYSPATH') or die('No direct access allowed.'); | |
/** | |
* AJAX Helper | |
* | |
* @author Sergei Gladkovskiy <[email protected]> | |
* @author Luke Morton | |
*/ | |
class AJAX { | |
/** |
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
Open your console. | |
<script src="event-source.js"></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
<?php | |
require_once('MustacheLambda.php'); // Ensure feature/higher-order-sections branch !! | |
class MyMustache extends Mustache { | |
public function name() | |
{ | |
return "Luke"; | |
} |