Menu
  • HOME
  • TAGS

clojure.contrib.sql syntax help: Can someone give me the syntax for deleting rows from a database?

oracle,clojure,clojure-contrib

The clojure.contrib.sql is outdated and no longer maintained. You should use clojure.java.jdbc instead - see Github repository, reference documentation, and community maintained documentation. With the updated library, you don't need with-connection, you can simply say: (sql/delete! db :tableName ["column1 = ? and column2 = ?" data1 data2]) ...

How to build clojure_contrib with Clojure v 1.6?

clojure,clojure-contrib

I know, I'm giving answer to another question, but still. You don't need to build clojure-contrib. If it's some book/tutorial you are reading - grab clojure-1.3. If you are porting old project to clojure-1.6 - switch it to new modular clojure-contrib (http://dev.clojure.org/display/community/Where+Did+Clojure.Contrib+Go)....

Clojure normalize function runtime error

clojure,clojure-contrib

the + is in the wrong place in: ((math/expt x 2)+ (math/expt y 2))) should be: (+ (math/expt x 2) (math/expt y 2))) and the same for y1 as well. Since you have this correct elsewhere it looks like a simple typo. While it's very normal to see ))))))) in...

Unexpected base 64 decode result in Clojure

clojure,base64,clojure-contrib

Your toHexString needs to 0-pad for bytes that can be represented as a single hexadecimal number: (defn to-hex-string [bytes] (apply str (map #(format "%02x" %) bytes))) Your base64 input has length of 43, so it is either needs to be padded out to a multiple of 4 or decoded with...