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
[2014-11-08T21:07:20.579+0000] [glassfish 4.0] [SEVERE] [AS-WEB-CORE-00108] [javax.enterprise.web.core] [tid: _ThreadID=209 _ThreadName=admin-listener(8)] [timeMillis: 1415480840579] [levelValue: 1000] [[ | |
ContainerBase.addChild: start: | |
org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: java.lang.ExceptionInInitializerError | |
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5864) | |
at com.sun.enterprise.web.WebModule.start(WebModule.java:691) | |
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1041) | |
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:1024) | |
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:747) | |
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2278) | |
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1924) |
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
find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g' |
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
(ns hipstr.validators.user-validator | |
(:require [noir.validation :as v] | |
[validateur.validation :refer :all])) | |
(defn validate-signup [signup] | |
"Validates teh incoming map of values from our signup form, | |
and returns a set of error messages for any invalid key. | |
Expects signup to have :username, :email, and :password." | |
(let [v (validation-set | |
(presence-of #{:email :password} |
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
(ns hipstr.validators.user-validator | |
(:require [noir.validation :as v] | |
[validateur.validation :refer :all])) | |
(def email-validator | |
(validation-set | |
(validate-with-predicate :email | |
#(v/is-email? (:email %)) | |
:message-fn (fn [validation-map] | |
(if (v/has-value? (:email validation-map)) |
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
(ns hipstr.test.validators.user-validator-test | |
(:require [hipstr.validators.user-validator :as uv]) | |
(:use clojure.test)) | |
(defn validate-email [email] | |
"Validates the provided email for us, and returns the | |
set of validation messages for the email, if any." | |
(:email (uv/email-validator {:email email}))) | |
(defn validate-username [username] |
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
(ns hipstr.validators.user-validator | |
(:require [noir.validation :as v] | |
[validateur.validation :refer :all])) | |
(def email-blank-msg | |
"Email is a required field") | |
(def email-format-msg | |
"The email's format is incorrect") |
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
(ns ward.mergesort | |
(:refer-clojure :exclude [merge])) | |
(defn merge | |
"Merges two sorted lists into a single sorted list." | |
[right left] | |
(flatten (loop [r right, l left, results []] | |
(let [rhead (first r) | |
lhead (first l)] | |
(cond (nil? rhead) (conj results l) |
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
(ns ward.applied-mergesort | |
(:refer-clojure :exclude [merge])) | |
(defn merge | |
"Merges two sorted lists into a single sorted list." | |
[right left] | |
(flatten (loop [r right, l left, results []] | |
(let [rhead (first r) | |
lhead (first l)] | |
(cond (nil? rhead) (conj results l) |
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
(ns ward.index-of) | |
(defn index-of | |
"Returns the first index where needle is found in haystack. | |
Returns -1 if the needle is not found in haystack." | |
[needle haystack] | |
(loop [n needle h haystack index 0] | |
(let [n-length (count n) | |
h-length (count h)] | |
(cond |
OlderNewer