This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Artie - Artie Server | |
| # | |
| # Real-time messaging service | |
| description "artie" | |
| start on filesystem | |
| stop on runlevel S | |
| respawn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package ecc.dashboard.persistent.repository; | |
| import java.lang.reflect.Field; | |
| import java.util.Arrays; | |
| import java.util.Collections; | |
| import java.util.Date; | |
| import java.util.List; | |
| import java.util.Map; | |
| import java.util.Map.Entry; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Cloud Foundry 2012.02.03 Beta | |
| * Copyright (c) [2009-2012] VMware, Inc. All Rights Reserved. | |
| * | |
| * This product is licensed to you under the Apache License, Version 2.0 (the "License"). | |
| * You may not use this product except in compliance with the License. | |
| * | |
| * This product includes a number of subcomponents with | |
| * separate copyright notices and license terms. Your use of these | |
| * subcomponents is subject to the terms and conditions of the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).ready(function () { | |
| var $input = $('#testcemo'); | |
| $input.typeahead({ | |
| source: function (query, process) { | |
| return $.getJSON('/mybackoffice/demo/user', { query: query }, function (data) { | |
| var val = $input.data("typeahead-ajax-val"), | |
| id = $input.data("typeahead-ajax-id"), | |
| mapped = {}, | |
| labels = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| If you don't care about the return value of the IIFE, it could also be any of the following: | |
| !function(){}(); // => true | |
| ~function(){}(); // => -1 | |
| +function(){}(); // => NaN | |
| -function(){}(); // => NaN | |
| Let's explore this a bit more. | |
| // module1.js | |
| (function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Extend the Underscore object with the following methods */ | |
| // Rate limit ensures a function is never called more than every [rate]ms | |
| // Unlike underscore's _.throttle function, function calls are queued so that | |
| // requests are never lost and simply deferred until some other time | |
| // | |
| // Parameters | |
| // * func - function to rate limit | |
| // * rate - minimum time to wait between function calls | |
| // * async - if async is true, we won't wait (rate) for the function to complete before queueing the next request |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.yammer.dropwizard.validation; | |
| import com.google.common.base.Joiner; | |
| import com.google.common.collect.*; | |
| import org.hibernate.validator.internal.engine.ConstraintValidatorFactoryImpl; | |
| import javax.validation.*; | |
| import javax.validation.groups.Default; | |
| import java.util.Set; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Override | |
| public ServletContainer getJerseyContainer(DropwizardResourceConfig resourceConfig, | |
| MyServiceConfig serviceConfig) { | |
| // I like having a root module, but you can use as many as you like | |
| final Injector injector = Guice.createInjector(new MyServiceModule(serviceConfig)); | |
| return new GuiceContainer(injector) { | |
| @Override | |
| public ResourceConfig getDefaultResourceConfig(Map<String,Object> props, WebConfig webConfig) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.helloworld.resources; | |
| import javax.jws.WebMethod; | |
| @javax.jws.WebService( | |
| name = "AddNumbersPortType", | |
| serviceName = "AddNumbersService", | |
| targetNamespace = "http://duke.example.org") | |
| @javax.jws.soap.SOAPBinding( | |
| style = javax.jws.soap.SOAPBinding.Style.DOCUMENT, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.List; | |
| import java.util.Set; | |
| import javax.servlet.http.HttpServletRequest; | |
| import org.codehaus.jackson.map.Module; | |
| import org.junit.After; | |
| import org.junit.Before; | |
| import com.google.common.collect.Lists; |