View baseservice.executeSQL()
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
<cffunction name="executeSQL" returntype="any" access="public" output="false"> | |
<cfargument name="SQL" type="string" required="true" /> | |
<cfargument name="parameters" default="#structNew()#" /> | |
<cfargument name="types" default="#structNew()#" /> | |
<cfargument name="cachedWithin" required="false" /> | |
<cfset var query = 0 /> | |
<cfset var result = 0 /> | |
<cfset var generatedSQL = '/model/generatedSQL/' /> | |
<cfparam name="variables.datasource" default="#variables.defaultDSN#" /> |
View gist:768347
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
(! 543)-> cake test | |
Var *db* not marked :dynamic true, setting to :dynamic. You should fix this before next release! | |
Var *debug* not marked :dynamic true, setting to :dynamic. You should fix this before next release! | |
WARNING: distinct already refers to: #'clojure.core/distinct in namespace: clojureql.test, being replaced by: #'clojureql.core/distinct | |
WARNING: conj! already refers to: #'clojure.core/conj! in namespace: clojureql.test, being replaced by: #'clojureql.core/conj! | |
WARNING: compile already refers to: #'clojure.core/compile in namespace: clojureql.test, being replaced by: #'clojureql.core/compile | |
WARNING: drop already refers to: #'clojure.core/drop in namespace: clojureql.test, being replaced by: #'clojureql.core/drop | |
WARNING: take already refers to: #'clojure.core/take in namespace: clojureql.test, being replaced by: #'clojureql.core/take | |
WARNING: sort already refers to: #'clojure.core/sort in namespace: clojureql.test, being replaced by: #'clojureql.core/sort | |
WARNING: disj! already refers to: #'clo |
View gist:1204829
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
;; src/beta3/trial.clj: | |
(ns beta3.trial) | |
(defrecord TrialRecord [first last]) | |
;; src/beta3/core.clj: | |
(ns beta3.core | |
;; fails if this require is removed: | |
(:require beta3.trial) | |
(:import beta3.trial.TrialRecord)) |
View gist:1304756
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
(defn- wildcard-filter | |
"Given a regex, return a FilenameFilter that matches." | |
[re] | |
(reify java.io.FilenameFilter | |
(accept [_ dir name] (not (nil? (re-find re name)))))) | |
(defn- directory-list | |
"Given a directory and a regex, return a sorted seq of matching filenames." | |
[dir re] | |
(sort (.list (clojure.java.io/file dir) (wildcard-filter re)))) |
View gist:1617493
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
routes = [ | |
{ "/email/bounced/:email" = "/user/email_event/email/:email/event/bounced", hint = "Mark an email address as bounced." }, | |
{ "/email/updated/:email" = "/user/email_event/email/:email/event/updated", hint = "Mark an email address as updated." }, | |
{ "/email/validated/:email" = "/user/email_event/email/:email/event/validated", hint = "Mark an email address as validated." }, | |
{ "/email/:email" = "/user/email/email/:email", hint = "Return the status of an email address." }, | |
{ "/routes" = "/auth/routes", hint = "Returns the available routes." }, | |
{ "/user/:id" = "/user/view/id/:id", hint = "Return information about a user." }, | |
{ "/active" = "/site/active", hint = "Return the active site IDs." }, | |
{ "*" = "/main/default" } | |
] |
View gist:2223662
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
(defproject monads "1.0.0-SNAPSHOT" | |
:description "FIXME: write description" | |
:repositories [["sonatype-snapshots" "https://oss.sonatype.org/content/repositories/snapshots/"]] | |
:dependencies [[org.clojure/clojure "1.3.0"] | |
[org.clojure/algo.monads "0.1.3-SNAPSHOT"]]) |
View gist:8232204
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
<cfscript> | |
writeOutput("closure? " & isClosure(function() { return "yes"; })); | |
writeOutput("function? " & isCustomFunction(function() { return "no"; })); | |
</cfscript> |
View gist:8285619
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
<cfprocessingdirective pageencoding="utf-8"> | |
<cfoutput> | |
#replaceNoCase("LİELİELİELİE....","E","a very long string to replace E","all")# | |
</cfoutput> |
View async_pmap.clj
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 async-example.core | |
(:require [clojure.core.async :refer [chan go >! <!!]]) | |
(:gen-class)) | |
(defn my-pmap [f col] | |
(let [chans (repeatedly (count col) chan)] | |
(doseq [[c e] (map vector chans col)] | |
(go (>! c (f e)))) | |
(map <!! chans))) |
View gist:8f62615233244820c8db
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 example | |
(:require [reagent.core :as r :refer [atom]] | |
[reagent.cursor :as c])) | |
(defn input [prompt val] | |
[:div | |
prompt | |
[:input {:value @val | |
:on-change #(reset! val (.-target.value %))}]]) |
OlderNewer