This file contains 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 comprase.ofertaDeCompra; | |
import java.util.Date; | |
import java.util.List; | |
import javax.ejb.EJB; | |
import coffee.annotation.Action; | |
import coffee.annotation.Parameter; | |
import coffee.annotation.WebResource; |
This file contains 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.lang.reflect.ParameterizedType; | |
import java.lang.reflect.Type; | |
import java.util.ArrayList; | |
import java.util.Collection; | |
import java.util.Iterator; | |
import com.google.gson.Gson; | |
import com.google.gson.JsonArray; | |
import com.google.gson.JsonDeserializationContext; | |
import com.google.gson.JsonDeserializer; |
This file contains 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 static com.unimondes.dsl.DateDsl.*; | |
import static com.unimondes.dsl.DateDsl.Months.*; | |
import static org.junit.Assert.assertEquals; | |
import java.util.Calendar; | |
import java.util.Date; | |
import java.util.GregorianCalendar; | |
import org.joda.time.DateTime; | |
import org.junit.Test; |
This file contains 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.contaazul.api.pub.client | |
import scala.util.Random | |
class Character( | |
var name: String, | |
var lastName: String = "No Name") { | |
val location = new Location | |
var health = 100 | |
} |
This file contains 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
#!/bin/bash | |
# | |
# autotunning.sh | |
# Constants | |
TWO_GIGABYTES="2056772" | |
# Variables | |
# Utils |
This file contains 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
#!/bin/sh | |
# domain-configure-slave.sh | |
# Configure the host as slave for a specific master domain | |
# usage: domain-configure-slave.sh <myslavename> <masterip> | |
. `dirname $0`/domain-configure.sh | |
configure_domain(){ | |
sed -i -e 's/remote host="[0-9\.]*" port/remote host="'$1'" port/' $HOST_XML | |
sed -i -e 's/<.*local\/.*>/<remote host="'$1'" port="9999" security-realm="ManagementRealm"\/>/' $HOST_XML |
This file contains 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 layr.routing.service; | |
import layr.engine.RequestContext; | |
import layr.routing.api.Configuration; | |
import layr.routing.api.Response; | |
import layr.routing.api.RouteMethod; | |
import layr.routing.exceptions.NotFoundException; | |
import layr.routing.exceptions.RoutingException; | |
import layr.routing.exceptions.UnhandledException; |
This file contains 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 layr.routing; | |
import static org.junit.Assert.assertEquals; | |
import java.util.HashSet; | |
import java.util.Set; | |
import layr.routing.exceptions.UnhandledException; | |
import layr.routing.service.BusinessRoutingLifeCycle; | |
import layr.routing.service.LifeCycle; |
This file contains 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 layr.routing.api.ResponseBuilder._ | |
import layr.routing.api._ | |
@WebResource("home") | |
class HomeResource { | |
@GET | |
def renderHome():Response = | |
renderTemplate( "home.xhtml" ) | |
.set("user", new User( true )) |
This file contains 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
@WebServlet(name="myServlet", urlPatterns={"/auctionservice"}, asyncSupported=true) | |
public class MyServlet extends HttpServlet { | |
// track bid prices | |
public void doGet(HttpServletRequest request, HttpServletResponse response) { | |
AsyncContext aCtx = request.startAsync(request, response); | |
// This could be a cluser-wide cache. | |
ServletContext appScope = request.getServletContext(); | |
Map<String, List<AsyncContext>> aucWatchers = (Map<String, List<AsyncContext>>)appScope.getAttribute("aucWatchers"); | |
List<AsyncContext> watchers = (List<AsyncContext>)aucWatchers.get(request.getParameter("auctionId")); |
OlderNewer