How to override the default port on 3000?

2014-02-25 Thread action
I do like this:
#lein new compojure-app guestbook
#cd guestbook
#lein ring server

The server runs on port 3000 by default. 
But how to override the default port?
Such as runs on port 80?

thinks


-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How to override the default port on 3000?

2014-02-26 Thread action
It's ok! Think you for all the answer!

在 2014年2月25日星期二UTC+8下午10时21分05秒,action写道:
>
> I do like this:
> #lein new compojure-app guestbook
> #cd guestbook
> #lein ring server
>
> The server runs on port 3000 by default. 
> But how to override the default port?
> Such as runs on port 80?
>
> thinks
>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


mongodb driver for clojure?

2014-02-28 Thread action
Monger, and any other popular driver?

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: mongodb driver for clojure?

2014-02-28 Thread action
Think you.

在 2014年3月1日星期六UTC+8上午3时44分19秒,Sean Corfield写道:
>
> On Feb 28, 2014, at 7:29 AM, action > 
> wrote:
>
> Monger, and any other popular driver?
>
>
> CongoMongo -- but see this thread: 
> https://groups.google.com/forum/#!topic/clojure/JOREq-Jl1Ns
>
> Sean Corfield -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
>
> "Perfection is the enemy of the good."
> -- Gustave Flaubert, French realist novelist (1821-1880)
>
>
>  
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


I want to get sha1 of a string

2014-03-01 Thread action
do like this:
(ns clojurewerkz.support.hashing
  (:require [clojurewerkz.support.internal :as i])
  (:import [com.google.common.hash Hashing HashFunction HashCode]))
but:
FileNotFoundException Could not locate clojurewerkz/support__init.class or 
cloju
rewerkz/support.clj on classpath:   clojure.lang.RT.load (RT.java:443)
how to set the dependencies, or other solution?

Think you


-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: I want to get sha1 of a string

2014-03-02 Thread action
ok,think you!

在 2014年3月2日星期日UTC+8上午12时28分25秒,JPH写道:
>
> I've had good experiences with https://github.com/xsc/pandect. 
>
> You can also use Java interop like this: 
> https://gist.github.com/prasincs/827272 
>
> JPH 
>
>
> On 03/02/2014 12:26 AM, action wrote: 
> > do like this: 
> > (ns clojurewerkz.support.hashing 
> >   (:require [clojurewerkz.support.internal :as i]) 
> >   (:import [com.google.common.hash Hashing HashFunction HashCode])) 
> > but: 
> > FileNotFoundException Could not locate clojurewerkz/support__init.class 
> or 
> > cloju 
> > rewerkz/support.clj on classpath:   clojure.lang.RT.load (RT.java:443) 
> > how to set the dependencies, or other solution? 
> > 
> > Think you 
> > 
> > 
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


I want to parse the POST body twice.

2014-03-02 Thread action
I want to parse the POST body twice,
but in the second place:
org.xml.sax.SAXParseException: Premature end of file.
How should I clone the body render for the second parse?

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: I want to parse the POST body twice.

2014-03-02 Thread action
how to use slurp?
first:
(slurp body)
and second reuse:
 (slurp body)

在 2014年3月3日星期一UTC+8上午12时44分09秒,James Reeves写道:
>
> Depending on how large the input is, you could either read it all into 
> memory (e.g. with slurp or similar), or dump it to a temporary file.
>
> - James
>
>
> On 2 March 2014 16:18, action > wrote:
>
>> I want to parse the POST body twice,
>> but in the second place:
>> org.xml.sax.SAXParseException: Premature end of file.
>> How should I clone the body render for the second parse?
>>  
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Programming clojure second Edition

2014-02-03 Thread action
(defn index-filter [pred coll]
  (when pred 
(for [[idx elt] (indexed coll) :when (pred elt)] idx)))

(index-filter #{\a \b} "abcdef") 
-> (0 1)

but I don't know why use "when pred" in the code, 
and why "(index-filter {\a \b} "abcdef")" doesn't work?

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Programming clojure second Edition

2014-02-03 Thread action
I got it, Think you very much!

在 2014年2月4日星期二UTC+8上午2时01分50秒,Justin Smith写道:
>
> if pred is false or nil (the two cases "when" would rule out), it would be 
> an error to apply it to an argument
>
> #{\a \b} is a literal set syntax, containing keys \a and \b. {\a \b} is a 
> literal hash-map syntax, with one key \a mapped to the value \b. As far as 
> index-filter is concerned, it only selects \a, since that is the only key 
> you can match.
>
> On Monday, February 3, 2014 7:57:55 AM UTC-8, Jim foo.bar wrote:
>>
>> a vector is a function of its indices 
>> a map is a function of its keys 
>> a set is a function of its elements 
>>
>> does this help at all? 
>>
>> Jim 
>>
>>
>>
>> On 03/02/14 15:29, action wrote: 
>> > (defn index-filter [pred coll] 
>> >   (when pred 
>> > (for [[idx elt] (indexed coll) :when (pred elt)] idx))) 
>> > 
>> > (index-filter #{\a \b} "abcdef") 
>> > -> (0 1) 
>> > 
>> > but I don't know why use "when pred" in the code, 
>> > and why "(index-filter {\a \b} "abcdef")" doesn't work? 
>> > -- 
>> > You received this message because you are subscribed to the Google 
>> > Groups "Clojure" group. 
>> > To post to this group, send email to clo...@googlegroups.com 
>> > Note that posts from new members are moderated - please be patient 
>> > with your first post. 
>> > To unsubscribe from this group, send email to 
>> > clojure+u...@googlegroups.com 
>> > For more options, visit this group at 
>> > http://groups.google.com/group/clojure?hl=en 
>> > --- 
>> > You received this message because you are subscribed to the Google 
>> > Groups "Clojure" group. 
>> > To unsubscribe from this group and stop receiving emails from it, send 
>> > an email to clojure+u...@googlegroups.com. 
>> > For more options, visit https://groups.google.com/groups/opt_out. 
>>
>>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.