If you are using Google Guice to manage your object dependencies then you may find a situation where you have a constructor that has parameters required from Guice and some parameters from the calling code.
For example, suppose you are creating a Book which requires a BookService and a name when it is created:
class Book { Book(BookService bookService, String name) { ... } }
In this case we want the BookService to be injected by Guice, but the name to be supplied by the calling code.
Guice provides something called an AssistedAnnotation that can help in this situation.

Find the position of an element with JavaScript
Quirksmode provides a nice findPos() function to find the absolute position of an element on a page.
If you need to find the position of the element relative to the viewport then you will also need to know the page’s current scroll position, which I found over at Stack Overflow.
Read More »