Skip to content

Instantly share code, notes, and snippets.

if (persistentProperty.isArray()) {
T[] c = (T[]) wrapper.getProperty(persistentProperty);
if ((tok = jp.nextToken()) == JsonToken.START_ARRAY) {
int i = 0;
while ((tok = jp.nextToken()) != JsonToken.END_ARRAY) {
Object cval = jp.readValueAs(persistentProperty.getComponentType());
c[i] = (T) cval;
i++;
}
@jhiemer
jhiemer / object.js
Last active December 20, 2015 13:29
{ "_id" : ObjectId( "51fb7ec5a0ee0a30df2c2332" ),
"_class" : "de.model.NotificationTimetable",
"name" : "Timetable Test",
"onTime" : [
[
true,
false,
false,
false,
false,
@Query("{ service: ?0, validFrom : { $gte : Date(?2) }, operatingSystem : ?3, location : ?4 }")
public List<Tariff> findByServiceAndValidFromAndOperatingSystemAndLocation(long id, long timestamp, String operatingSystem, String location);
var alertChannel = "alertChannel";
$scope.alerts = [];
$rootScope.$on(alertChannel, function(event, data) {
$scope.alerts.push(data);
$timeout(function(data) {
if ($scope.alerts.length > 0) {
$scope.closeAlert(0);
}
java.lang.IllegalArgumentException: The current page number cannot be greater or equal to the total number of pages!
at org.springframework.util.Assert.isTrue(Assert.java:65) ~[spring-core-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.springframework.hateoas.PagedResources$PageMetadata.<init>(PagedResources.java:207) ~[spring-hateoas-0.8.0.BUILD-SNAPSHOT.jar:na]
at org.springframework.data.web.PagedResourcesAssembler.asPageMetadata(PagedResourcesAssembler.java:162) ~[spring-data-commons-1.6.0.BUILD-SNAPSHOT.jar:na]
at org.springframework.data.web.PagedResourcesAssembler.createResource(PagedResourcesAssembler.java:124) ~[spring-data-commons-1.6.0.BUILD-SNAPSHOT.jar:na]
at org.springframework.data.web.PagedResourcesAssembler.toResource(PagedResourcesAssembler.java:92) ~[spring-data-commons-1.6.0.BUILD-SNAPSHOT.jar:na]
at org.springframework.data.rest.webmvc.AbstractRepositoryRestController.entitiesToResources(AbstractRepositoryRestController.java:227) ~[spring-data-rest-webmvc-2.0.0.BUILD-SNAPSHOT.jar:na]
at
org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoSuchMethodError: org.springframework.data.repository.support.Repositories.getRepositoryFor(Ljava/lang/Class;)Lorg/springframework/data/repository/CrudRepository;
at org.springframework.web.servlet.DispatcherServlet.triggerAfterCompletionWithError(DispatcherServlet.java:1259) ~[spring-webmvc-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945) ~[spring-webmvc-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856) ~[spring-webmvc-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936) [spring-webmvc-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827) [spring-webmvc-3.2.3.RELEASE.jar:3.2.3.RELEASE]
at javax.servlet.http.Ht
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repositoryExporterHandlerAdapter' defined in class de.cloudscale.config.CustomRepositoryRestMvcConfiguration: Invocation of init method failed; nested exception is java.lang.NoSuchFieldError: INSTANCE
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455) ~[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) ~[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) ~[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) ~[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springfr
GregorianCalendar gregorianCalendar = new GregorianCalendar(TimeZone.getTimeZone("UTC"));
gregorianCalendar.add(GregorianCalendar.SECOND, -1 * gregorianCalendar.get(GregorianCalendar.SECOND));
=> Tue Jul 23 12:14:00 CEST 2013
Hourly: 5 */1 * * (each hour at hour:05)
Daily: 5 0 * * * (each day at 00:05am)
Weekly: 5 0 * * 1 (each Monday at 00:05am)
Montly: 5 0 * * * (each Month at 00:05am)
Restangular.one('project/search/findByCustomer', '').get({ id : customerId, limit : 8 }).then(function (data) {
$scope.projects = data.content;
});