This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-01-09
Channels
- # beginners (38)
- # boot (160)
- # cider (143)
- # cljs-dev (62)
- # cljsjs (2)
- # cljsrn (3)
- # clojure (278)
- # clojure-austin (8)
- # clojure-brasil (5)
- # clojure-greece (2)
- # clojure-italy (11)
- # clojure-russia (188)
- # clojure-sg (2)
- # clojure-spec (118)
- # clojure-uk (103)
- # clojurescript (87)
- # core-async (8)
- # cryogen (2)
- # cursive (12)
- # datomic (119)
- # emacs (13)
- # hoplon (4)
- # immutant (12)
- # off-topic (12)
- # om (54)
- # om-next (5)
- # onyx (1)
- # pedestal (2)
- # portland-or (2)
- # re-frame (58)
- # reagent (18)
- # ring-swagger (18)
- # rum (4)
- # spacemacs (4)
- # specter (3)
- # untangled (65)
- # yada (25)
where objectNumber
is (s/def ::objectNumber (s/and string? #(re-matches #"[A-Z]{2}-[A-Z]-\d{1,4}" %)))
but now I see this error message :
Assert failed: cat expects k1 p1 k2 p2..., where ks are keywords
(c/and (even? (count key-pred-forms)) (every? keyword? keys)), compiling:(paintings2/api_get.clj:94:8)
anyone a tip or a hint how I can tell that the args are a collection of objectNumbers ?
but now I see this message : No value supplied for key: (s/merge :basic/artObject :image/object)
of course :
(s/fdef fetch-paintings-and-images-front-page
(s/cat :args (s/coll-of ::objectNumber))
:ret (s/and :basic/artObject :image/object))
it should look like this:
(s/fdef fetch-paintings-and-images-front-page
:args (s/cat :args (s/coll-of ::objectNumber))
:ret (s/and :basic/artObject :image/object))
hey all, I am working on a function that processes a csv
file. It looks like this:
(defn read-and-insert [upload-id rdr]
(let [[header & rows] (csv/read-csv rdr)]
(doseq [row rows]
(let [row-id (create-row upload-id)]
(doseq [[key value] (map vector header row)]
(create-cell row-id key value))))))
I use clojure's core csv reader. I am running into an issue with the above and how it is parsing my csv file. My problem is that I am having trouble debugging the above code. I believe it is lazy, which means that I cannot just put print statements in it. If this is the case, what is a a solid approach to debugging the above code?doseq
realizes the sequence(s) its given
That sounds right, but I am not sure how to do that at the moment. I was hoping there was a manual way until I learn protorepl better.
that is what I was hoping. I will give it another try, but it did not seem to output anything. Just wanted to know that it is possible and not me missing something basic
I am trying to do a list in Reagent that when you click item, the subitems are dynamically fetch from server. I can't seem to get handle on how to give id to on-click event. I am trying to use atoms but it seems that the atom does not have any value when the on-click event is triggered. . Piece of code that I am working on is here http://pastebin.com/EGZD3Ewc
@hl2zip is the problem (create-row upload-id) ? you're passing in the same id for every row. just guessing, cuz the code you have pasted above looks fine to me. the only unknowns are the a) return value of csv/read-csv b) return value of create-row and c) return value of create-cell. if the bug is in one of those three, we wont be able to help.