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
{ | |
entry: { | |
pageA: "path/to/pageA_entry.js", | |
pageB: "path/to/pageB_entry.js", | |
vendor: "path/to/vendor_entry.js", | |
}, | |
//.. other configuration not relevant here | |
plugins: [ |
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
$items = [1, 2, 3, 4]; | |
$itemToDelete = 3; | |
$itemsWithout3 = array_values(array_diff($items, [$itemToDelete])); | |
//$itemsWithout3 => [1, 2, 4] |
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
(ns clojure-noob.meta-exercises | |
(:gen-class)) | |
(def word-count (atom {})) | |
(defn set-words [m words] | |
(reduce (fn [m word] | |
(if (contains? m word) | |
(update-in m [word] inc) | |
(assoc m word 1))) |
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
name := """minimal-scala""" | |
version := "1.0" | |
scalaVersion := "2.11.7" | |
libraryDependencies += "com.typesafe.play" %% "play-json" % "2.5.13" |
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
Backbone.View = (function(View) { | |
return View.extend({ | |
constructor: function(options) { | |
this.options = _.defaults(options, _.clone(this.options)); | |
View.apply(this, arguments); | |
} | |
}); | |
})(Backbone.View); |
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
<?php | |
$list = new MyListContainingClass(); | |
$list->add("stuff", "more", "yeah", "woo"); | |
$list->remove("more", "yeah"); |