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
describe("In the project details page", function () { | |
var TestTools = require('./TestTools'), | |
Navigation = require('./Navigation'), | |
ptor; | |
beforeEach(function () { | |
TestTools.resetTestData(); | |
ptor = protractor.getInstance(); | |
ptor.get('/ebo/#/projects/excecutive-education'); |
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 TestTools = { | |
// some other helpers | |
// ... | |
clickDropdownOptionWithGivenValue: function ( | |
selectId, optionValue) { | |
element(by.css('#' + selectId)).click(); | |
return element( | |
by.xpath( |
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 berlin_clock.t-core | |
(:use midje.sweet) | |
(:use [berlin_clock.core])) | |
(use '[clojure.string :only (join)]) | |
(facts "about Berlin Clock" | |
(facts "seconds lamp" | |
(fact "It turns on for one second (Y)" | |
(show "00:00:00") => (join "\n" |
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 berlin_clock.core) | |
(use '[clojure.string :only (join split)]) | |
(defn show [time] | |
(let | |
[[h m s] (map #(Integer. %) (split time #":")) | |
turn-on-red (fn [num-lamps] (repeat num-lamps "R")) |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
find . -name *.mp4 -print0 | xargs -0 rm |
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
git push origin --delete <branch-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
(ns dna) | |
(def dna-nucleotides #{\A, \T, \C, \G}) | |
(def nucleotides (conj dna-nucleotides \U)) | |
(defn nucleotide-counts [strand] | |
(let | |
[counted-nucleotides | |
(zipmap dna-nucleotides (repeat (count dna-nucleotides) 0)) |
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 dna) | |
(defn hamming-distance [strand1 strand2] | |
(reduce | |
+ | |
(map | |
(fn [base1 base2] | |
(if (= base1 base2) 0 1)) | |
strand1 | |
strand2))) |
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 phone) | |
(defn extract-digits [phone-number] | |
(let | |
[digits (filter #(Character/isDigit %) phone-number) | |
digits-length (count digits)] | |
(cond | |
(= digits-length 10) digits | |
(and (= digits-length 11) | |
(= (first digits) \1)) (rest digits) |