Stronger
my scattered Development notes
Friday, 23 October 2015
Inject the value of an Static Variable
Assuming you have a class like this:
Add these lines to your spring context file to inject the value of "staticTestValue"
labels:
Java
Wednesday, 10 December 2014
Responsive Design: Include @media queries as mixins using LESS
I have to includ the @media queries as a seperate file and sections before.
That was very circumstantial and took a long time to find and redefine each elemnt to display properly on Mobile Devices.
Since LESS has included the support of mixins, it is very comfortable to define such queries.
All you need is:
Step 1: Define your preferred Breakpoints as Variables
Step 2: Include the queries inside the main element
That was very circumstantial and took a long time to find and redefine each elemnt to display properly on Mobile Devices.
Since LESS has included the support of mixins, it is very comfortable to define such queries.
All you need is:
- Define your preferred Breakpoints as Variables
- Include the queries inside the main element
Step 1: Define your preferred Breakpoints as Variables
Step 2: Include the queries inside the main element
labels:
CSS
Wednesday, 8 January 2014
nice HTML HR (horizontal rule) with CSS
here is a sample of creating a horizontal rule with only CSS commands without using an Image. The point here is to define a DIV element with same settings as HR and rotate and put it over the HR.
your page with look like here:
your page with look like here:
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
and here is the code:
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
labels:
CSS
Wednesday, 26 June 2013
Schedule a Method to run later
If you do not want to run a method in the normal application process flow, you can use ScheduledExecutorService to run it later. This sample code executes the "myFunction" 5 Seconds later.
labels:
Java
Tuesday, 4 December 2012
JAXB : IllegalAnnotationExceptions - Class has two properties of the same name
just developing a test jaxb application and wanted to let getters and setters be created automatically with Lombok.
As I was attempting to assign annotations of private field members, got this exception:
Exception in thread "main" com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
Class has two properties of the same name "name"
this problem is related to the following location:
at public java.lang.String de.domain.jaxbtest.model.Book.getName()
at de.domain.jaxbtest.model.Book
at private java.util.List de.domain.jaxbtest.model.Bookstore.bookList
at de.domain.jaxbtest.model.Bookstore
As I was attempting to assign annotations of private field members, got this exception:
Exception in thread "main" com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
Class has two properties of the same name "name"
this problem is related to the following location:
at public java.lang.String de.domain.jaxbtest.model.Book.getName()
at de.domain.jaxbtest.model.Book
at private java.util.List de.domain.jaxbtest.model.Bookstore.bookList
at de.domain.jaxbtest.model.Bookstore
the solution was easy as just adding @XmlAccessorType(XmlAccessType.FIELD) to defined class:
labels:
Java
Tuesday, 27 November 2012
Wait for an AJAX call to complete with Selenium 2 WebDriver
here is a sample to use this method:
labels:
Java
Friday, 23 November 2012
JSF - Show content only if Messages is empty
<h:panelgroup rendered="#{facesContext.validationFailed or empty facesContext.messageList}">
. . .
</h:panelgroup>
. . .
</h:panelgroup>
labels:
Java
Subscribe to:
Posts (Atom)