Sounds like you might be able to model it as a knapsack problem with
budgets as weights and scores as values.
For a little intuition into what will happen, consider a greedy
algorithm to solve the knapsack. Assuming that the individual budgets
are relatively small compared to the total budget the
Actually looks like Stuart ended up doing a non-SNAPSHOT release of
0.1.0 after the announcement based on the github README.
On Sun, Jan 26, 2014 at 1:19 PM, Michael Klishin
wrote:
>
> 2014-01-27 Mimmo Cosenza
>
>> You could clone and deploy it yourself into clojars. The only caveat is to
>> giv
You can also use as-> in 1.5+
(-> 2
(+ 2)
(as-> x (* 1 x 3)))
I like this a bit more than the (#()) approach, personally
On Sat, Jan 18, 2014 at 12:07 AM, Alex Baranosky
wrote:
> What I think is the interesting part of the question is the inclusion of the
> word "idiomatic". I'm not sur
Not sure if it is exactly what you are looking for, but that looks fairly
similar to how string interpolation works:
https://github.com/clojure/core.incubator/blob/master/src/main/clojure/clojure/core/strint.clj
Maybe you can somehow make that work for you?
On Tue, Feb 19, 2013 at 1:35 PM, AtKa
I think cond-> would work well
https://github.com/clojure/clojure/blob/master/changes.md#24-new-threading-macros
On Mon, Feb 11, 2013 at 3:10 PM, JvJ wrote:
> I'm writing a simple game engine in Clojure, and each game object supplies
> its own unique update function, which takes the original o
Just got a chance to test it from clojurescript and seems to work (only
tested the examples from the docstring). Guess that is the nice part of
macros working from clojure.
Cheers
2013/2/8 Jordan Berg
> That is pretty cool, hadn't seen that before.
>
>
> 2013/2/8 David S
t;
> On Feb 8, 2013, at 1:56 PM, Jordan Berg wrote:
>
> js* is used internally in cljs to implement some operators and the
> interpolation helps there. I don't think js* is really meant to be used
> too much outside of core. Any reason to not just use str?
>
> (def x
js* is used internally in cljs to implement some operators and the
interpolation helps there. I don't think js* is really meant to be used
too much outside of core. Any reason to not just use str?
(def x "david")
(str "hello " x)
2013/2/8
> Why does ClojureScript support string interpolatio
You use this-as:
(this-as thisname
(whatever thisname))
where you name this what you want with thisname
Cheers
On Fri, Jan 25, 2013 at 1:46 PM, Ari wrote:
> Additionally, ".each()" is another option --
>
> (defn listen-to-links
> [links]
> (.each links
> (fn [idx, el]
>
I find this to be useful:
cljs.user> (nil? (.-key (js-obj)))
true
I like not having to use undefined? for this
On Tue, Jan 15, 2013 at 1:08 AM, Frank Siebenlist <
frank.siebenl...@gmail.com> wrote:
> ClojureScript:cljs.user> (def a nil)
> nil
> ClojureScript:cljs.user> (def b)
>
> ClojureScrip
On Sun, Dec 9, 2012 at 4:45 PM, mond wrote:
> ; I have these records defined
>
> (defrecord Customer [firstName lastName emailAddress deliveryAddress
> invoiceAddress])
> (defrecord Address [street number town postcode])
>
This looks fine
>
> ; I have this small sample data
> (def customers
>
If you do decide you are interested in a non-Jquery solution, I think that
you could probably combine a few animated zippys[1] to get the same
functionality as an accordion with a little additional CLJS code.
[1]
http://closure-library.googlecode.com/svn/docs/class_goog_ui_AnimatedZippy.html
On
It would be straightforward in clojurescript as well. Google provides a
bunch of different tooltips in the closure library:
http://closure-library.googlecode.com/svn/docs/class_goog_ui_Tooltip.html
http://closure-library.googlecode.com/svn/docs/class_goog_ui_AdvancedTooltip.html
http://closure-
Hi,
You should be using == for comparison between numbers.
(for [a [0 1] b [0 1]
:when (not (== 0 a b))]
[a b])
has the same results between clojure and clojurescript.
Cheers,
Jordan
On Wed, Feb 29, 2012 at 5:36 PM, Benjamin Peter wrote:
> Hello,
>
> when I was trying to port
I changed the curl command in the bootstrap script locally to download
r1376 since the day google released it, and I haven't had a problem since.
Not sure if there is an official reason for not switching over yet though.
Jordan
On Tue, Dec 20, 2011 at 9:42 AM, Dave Sann wrote:
> Hi all,
>
> Do
15 matches
Mail list logo