version_is detects whether the current dir POM (or the whole Git project POM files) match the specified version.
This can be useful as a sanity check after a merge (where POM versions could have silently changed to a non-desired value).
| fibonacci :: (Ord a, Num a) => a -> [a] | |
| fibonacci limit = _fibonacci limit [1,2] | |
| _fibonacci :: (Ord a, Num a) => a -> [a] -> [a] | |
| _fibonacci limit x | |
| | sum < limit = _fibonacci limit (x++[sum]) | |
| | otherwise = x | |
| where x1x2 = drop ((length x)-2) x | |
| sum = ((head x1x2)+(last x1x2)) |
| foldl (+) 0 (filter (\n -> n `mod` 3 == 0 || n `mod` 5 == 0) [1..999]) |
| foobarqix n = take n [ _substitute x | x <- [1..] ] | |
| _substitute value = __substitute value "" [(3,"Foo"),(5,"Bar"),(7,"Qix")] | |
| __substitute value "" [] = show value | |
| __substitute value replacement [] = replacement | |
| __substitute value replacement multiples = | |
| let multiple = fst (head multiples) | |
| string = snd (head multiples) | |
| rest = tail multiples in |
| def balance(chars: List[Char]): Boolean = { | |
| val result:(Boolean, Int) = chars.foldLeft((true, 0))((tuple:(Boolean, Int), char:Char) => { | |
| val count = balanceCount(tuple._2, char) | |
| (tuple._1 && count >= 0, count) | |
| }) | |
| result._1 && result._2 == 0 | |
| } | |
| private def balanceCount(previousCount: Int, char: Char) : Int = { | |
| char match { |
| (fn mysteryFunction [s] | |
| ((fn append [mySeq acc] | |
| (let [beginning (butlast mySeq)] | |
| (if (= beginning nil) | |
| (conj acc (first mySeq)) | |
| (append beginning (conj acc (last mySeq))) | |
| ) | |
| ) | |
| ) s []) | |
| ) |
| define( ['jquery', 'underscore', 'async', 'moment', 'Handlebars'], | |
| function($, _, async, moment, Handlebars) { | |
| var crossOriginFeedParserUrl = function(limit, feedUrl) { | |
| return document.location.protocol + | |
| '//ajax.googleapis.com/ajax/services/feed/load?v=1.0&num='+ | |
| limit+ | |
| '&callback=?&q=' + | |
| encodeURIComponent(feedUrl); | |
| }, |
| CREATE (p:PATIENT {firstName:"Robert", lastName:"Patraque"}) RETURN p; | |
| CREATE (p:PATIENT {firstName:"Chantale", lastName:"Tristoune"}) RETURN p; | |
| CREATE (s:SYMPTOM {name:"Écoulement nasal"}) RETURN s; | |
| CREATE (s:SYMPTOM {name:"Fièvre"}) RETURN s; | |
| CREATE (s:SYMPTOM {name:"Éructations"}) RETURN s; | |
| CREATE (s:SYMPTOM {name:"Flatulences"}) RETURN s; | |
| CREATE (s:SYMPTOM {name:"Vomissement"}) RETURN s; |
| Example CREATE (flo:CONTACT {name: 'Florent'}) RETURN flo; | |
| CREATE (eric:CONTACT {name: 'Eric'}) RETURN eric; | |
| CREATE (jb:CONTACT {name: 'Jean-Baptiste'}) RETURN jb; | |
| CREATE (samuel:CONTACT {name: 'Samuel'}) RETURN samuel; | |
| CREATE (meta:COMPANY {name: 'Metaboli'}) RETURN meta; | |
| CREATE (lt:COMPANY {name: 'Lateral Thoughts'}) RETURN lt; | |
| // -- Florent worked for Metaboli | |
| MATCH (flo:CONTACT), (meta:COMPANY) |