def subsets_with_sums_equal(reference_value, array) subsets_with_sums_less_than_or_equal = subsets_with_sum_less_than_or_equal(reference_value, array) subsets_adding_up_to_reference_value = subsets_with_sums_less_than_or_equal.inject([]) do |accumulator, subset| accumulator << subset if subset.inject(0){|sum, value| sum+value} == reference_value accumulator end subsets_adding_up_to_reference
Yesod is a Haskell web framework for productive development of type-safe, RESTful, high performance web applications. March 17, 2011By Michael SnoymanView source on Github Ever since the first set of Warp benchmarks went live, people have been curious to see how Warp compares against non-Haskell web servers. Instead of simply throwing together some benchmarks on our local systems, Greg Weber, Matt
A hash function takes an item of a given type and generates an integer hash value within a given range. The input items can be anything: strings, compiled shader programs, files, even directories. The same input always generates the same hash value, and a good hash function tends to generate different hash values when given different inputs. A hash function has no awareness of “other” items in the
Using Solarized colors with vim, Eclipse, and Ubuntu Guides We discovered Solarized by Ethan Schoonover and instantly fell in love with its "precision colors for machines and people." Having read up on its properties and unique features we decided to try to make our Ubuntu systems use it as extensively as possible. Solarized is a sixteen color palette (eight monotones, eight accent colors) designe
There has been an interesting thread on Reddit with the title “DAE [Does Anyone Else] think CoffeeScript is ridiculously overrated?” [via @k33g_org]. This post provides some perspective on that opinion. CoffeeScript is a modern version of JavaScript: Check out its excellent website for a quick overview of what it looks like. Completely new syntax: CoffeeScript comes with its own syntax that looks
In the Front-End Engineering community, long-standing assumptions about the life of a page are being challenged as full-page refreshes and traditional Ajax patterns are replaced with Ajax Navigation and client-side frameworks like Backbone and SproutCore. While these new technologies enable greater performance and code re-use, the benefits come at a cost – added complexity. With these new patterns
This post isn’t really about the Maybe Monad of course. It is more focused on the State Monad, but I have a weakness for alliteration. What do space suits nuclear waste containers romantic conquests monsters macros containers conversations have in common? They’ve all been used as metaphors for monads. Last time I looked, the Haskell wiki listed 29 tutorials on the subject, and that is where all th
Everything I Ever Learned About JVM Performance Tuning @Twitter The document outlines JVM performance tuning strategies, with a focus on reducing latency caused primarily by garbage collection. It covers various areas of optimization including memory footprint, lock contention, CPU usage, and I/O tuning, while highlighting the drawbacks of heavy frameworks like Thrift. Key strategies involve caref
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く