A more commonly used feature are bindings, which are sort of pluggable
(or rather overridable) dynamic vars.
http://stackoverflow.com/questions/1523240/let-vs-binding-in-clojure
In short you declare a variable as dynamic and then use some binding around
the function-call.
Sort of a reusable
It says Criterium ran four batches of 60 samples in each (it tries to make
the jvm då garbage collection etc between each such batch).
In total, 240 samples (ie timed test runs).
The statistics are better looked up at wikipedia, but lower quartile here
means the 2.5% of the 240 samples (0.025 *
In IE the network parts only work in IE10 or better. The EventSource
polyfill does support IE8 or better, but doesn't send cookies along for IE8
or 9 and the cookies are used for authentication. I haven't bothered with
working around that.
-Gijs
On Saturday, June 14, 2014 6:22:33 AM UTC+2,
Hi,
You can use expresso https://github.com/clojure-numerics/expresso for
this:
(use 'numeric.expresso.core)
(def e (ex (+ 8 a (* 9 (+ 2 b)) 2)))
;= (+ 8 a (* 9 (+ 2 b)) 2)
This expression can now be manipulated by expresso to
simplify it, solve it, etc.
you can substitute a and b for its values
I want to convert a time specified with a TZ datababse timezone such as
America/Caracas into a UTC date-time but I can only find in clj-time
from-time-zone and to-time-zone allowing the zone to be specified as a
string. I want:
(t/some-utc-func (t/date-time 1967 7 31 6 30) (t/time-zone-for-id
This is not quite to your exact specification, but should help you to write
what you want:
user (defn to-utc [dt]
(t/to-time-zone dt (t/time-zone-for-offset 0)))
#'user/to-utc
user (to-utc (t/from-time-zone (t/date-time 1967 7 31 6 30)
(t/time-zone-for-id America/Caracas)))
#DateTime
On 14/06/2014 16:12, Stephen Gilardi wrote:
This is not quite to your exact specification, but should help you to
write what you want:
user (defn to-utc [dt]
(t/to-time-zone dt (t/time-zone-for-offset 0)))
#'user/to-utc
user (to-utc (t/from-time-zone (t/date-time 1967 7 31 6 30)
You're welcome.
As another small refinement, I noticed that there's a var for the utc timezone:
(t/time-zone-for-offset 0)
can be replaced with
t/utc
--Steve
On Jun 14, 2014, at 12:49 PM, gvim gvi...@gmail.com wrote:
On 14/06/2014 16:12, Stephen Gilardi wrote:
This is not
On 14/06/2014 17:59, Stephen Gilardi wrote:
You're welcome.
As another small refinement, I noticed that there's a var for the utc
timezone:
(t/time-zone-for-offset 0)
can be replaced with
t/utc
I tried t/utc in place of your function but it didn't produce the
desired result.
gvim
--
Thanks for the kind words, everyone! It's great to hear that people are
using Instaparse to get things done.
--
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
Agreed - thanks Mark!
If anyone is able to share the query languages you're using (the language's
grammar more than the implementation), I'd be very interested (and
grateful).
I'm always struggling to create reports for our non-technical staff which
are flexible enough to be useful but don't
Always test private functions through public ones. They have to use them.
Private stuff should appear during refactoring phase.
On Thursday, June 12, 2014 10:44:21 AM UTC+2, Hussein B. wrote:
Hi,
I like to use (defn-) when it comes to internal implementation functions.
But since they
2014-06-14 20:49 GMT+04:00 gvim gvi...@gmail.com:
Can't think why it's not baked into the library, though, as it must be a
common requirement.
Feel free to submit a pull request and a few tests. The clj-time
maintainers are responsive
and the library is primarily driven by user feedback at
metrics-clojure [1] is a Clojure interace to Coda Hale's Metrics library
[2]. If you are not sure
why collecting metrics about your app is valuable, take a moment and watch
[3].
Release notes:
https://github.com/sjl/metrics-clojure/blob/master/ChangeLog.md#changes-between-20x-and-210
1.
On 14/06/2014 21:59, Michael Klishin wrote:
2014-06-14 20:49 GMT+04:00 gvim gvi...@gmail.com
mailto:gvi...@gmail.com:
Can't think why it's not baked into the library, though, as it must
be a common requirement.
Feel free to submit a pull request and a few tests. The clj-time
This one took me a few minutes to see what I was doing wrong:
~~~
user= (def m (atom {:x 1 :y 2}))
#'user/m
;; Later on ...
user= (get m :x)
nil
;; What?? `:x` isn't a key in `m`? But I *know* it is...
;; Sanity check, for comparison:
user= (get {:a 1 :b 2} :c); Right; `:c` is not a key in
Hey Devin,
You had asked to see some code. Here is a little, to give a feel for the
“top level” without digging into the plumbing.
Let's say you want an authentication UI that lets you enter a 6-digit code
with a keypad and asterisk indicators showing how many digits have been
keyed. Here is
Seems unlikely:
http://dev.clojure.org/jira/browse/CLJ-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=34820#comment-34820
I would write my own get variant, or use something like Dynalint
https://github.com/frenchy64/dynalint.
Thanks,
Ambrose
On Sun,
18 matches
Mail list logo