Javier Neira's Library tagged → View Popular
Java is Pass-by-Value, Dammit! - Scott Stanchfield
-
In Java, Objects are
passed by reference, and primitives are passed by value. -
However,
Objects are not passed by reference. A correct statement would be
Object references are passed by value. - 3 more annotations...
The Haskell 98 Library Report: List Utilities
-
- mapAccumL f s l
applies f to an accumulating "state" parameter s
and to each element of l in turn.
mapAccumR
is similar to mapAccumL except that the list
is processed from right-to-left rather than left-to-right.
- mapAccumL f s l
-
The unfoldr function is a "dual" to foldr: while foldr reduces a list
to a summary value, unfoldr builds a list from a seed value. For
example:
The Haskell 98 Library Report: Arrays
-- A rectangular subarray
subArray :: (Ix a) => (a,a) -> Array a b -> Array a b
subArray bnds = ixmap bnds (\i->i)
-- A row of a matrix
row :: (Ix a, Ix b) => a -> Array (a,b) c -> Array b c
row i x = ixmap (l',u') (\j->(i,j)) x where ((_,l'),(_,u')) = bounds x
-
16.2 Incremental Array Updates
The operator (//) takes an array and a list of pairs and returns
an array identical to the left argument except that it has
been updated by the associations in the right argument. (As with
the array function, the indices in the association list must
be unique for the updated elements to be defined.) For example,
if m is a 1-origin, n by n matrix, then
m//[((i,i), 0) | i <- [1..n]] is the same matrix, except with
the diagonal zeroed. -
-- A rectangular subarray
subArray :: (Ix a) => (a,a) -> Array a b -> Array a b
subArray bnds = ixmap bnds (\i->i)
-- A row of a matrix
row :: (Ix a, Ix b) => a -> Array (a,b) c -> Array b c
row i x = ixmap (l',u') (\j->(i,j)) x where ((_,l'),(_,u')) = bounds x
-- Diagonal of a matrix (assumed to be square)
diag :: (Ix a) => Array (a,a) b -> Array a b
diag x = ixmap (l,u) (\i->(i,i)) x
where
((l,_),(u,_)) = bounds x
-- Projection of first components of an array of pairs
firstArray :: (Ix a) => Array a (b,c) -> Array a b
firstArray = fmap (\(x,y)->x)
HtmlUnit - Welcome to HtmlUnit
HtmlUnit is a "GUI-Less browser for Java programs". It models HTML documents and provides an API that allows you to invoke pages, fill out forms, click links, etc... just like you do in your "normal" browser.
It has fairly good JavaScript support (which is constantly improving) and is able to work even with quite complex AJAX libraries, simulating either Firefox or Internet Explorer depending on the configuration you want to use.
It is typically used for testing purposes or to retrieve information from web sites.
HtmlUnit is not a generic unit testing framework. It is specifically a way to simulate a browser for testing purposes and is intended to be used within another testing framework such as JUnit or TestNG. Refer to the document "Getting Started with HtmlUnit" for an introduction.
HtmlUnit is used as the underlying "browser" by different Open Source tools like Canoo WebTest, JWebUnit, WebDriver, JSFUnit, Celerity, ...
HtmlUnit was originally written by Mike Bowler of Gargoyle Software and is released under the Apache 2 license. Since then, it has received many contributions from other developers, and would not be where it is today without their assistance.
Selected Tags
Related Tags
Sponsored Links
Top Contributors
Groups interested in reference
-
Reference for wedding-web
Items: 49 | Visits: 224
Created by: Hexy Hwang
-
Web Design for Organizations (LIS590LWL)
We go through so many websi...
Items: 36 | Visits: 163
Created by: E Barney
Diigo is about better ways to research, share and collaborate on information. Learn more »
Join Diigo
