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
val isAllStarQualified = { | |
// 45 Advanced points accumulated within last 36 months | |
// OR | |
// has 3 All Star points within last 36 months | |
// OR | |
// has any All Star points AND 10 Advanced points within last 12 months | |
if (thisDivision == WsdcDivision.ALL_STAR) { | |
val maybeAdvPointsInPast3Years = maybePrevDivisionInfo.map { | |
advDivInfo => divisionInfoPlacements2(advDivInfo) | |
.filter(_.points > 0) |
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
define(["jquery", "t5/core/events", "t5/core/zone", "t5/core/ajax", "underscore"], function($, events, zone, ajax, _) { | |
return function(messages) { | |
var dialogTemplate = '<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">' + | |
'<div class="modal-dialog">' + | |
'<div class="modal-content">' + | |
'<div class="modal-header">' + | |
'<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>' + | |
'<h3 class="modal-title" id="exampleModalLabel">' + messages.title + '</h3>' + | |
'</div>' + | |
'<div class="modal-body"><p class="lead">' + messages.text + '</p><p class="text-danger">{{errorMessage}}</p>' + |
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.xdance.services | |
import spray.can.Http | |
import spray.http._ | |
import spray.json.JsonFormat | |
import spray.json.DefaultJsonProtocol | |
import spray.httpx.SprayJsonSupport | |
import spray.client.pipelining._ | |
import scala.concurrent._ | |
import scala.collection.JavaConversions._ |
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
public List<ContestEntrance> retrieveRankedList ( Contest contest, ContestSignupRole role ) { | |
if ( !contest.isRandomPartnered () ) | |
throw new IllegalArgumentException ( "only applicable for random-partnered contests" ); | |
final List<ContestEntrance> list = new ArrayList<ContestEntrance> (); | |
final List<ContestRound> reverseRoundsList = new ArrayList<ContestRound> ( contest.getRounds () ); | |
Collections.reverse ( reverseRoundsList ); | |
for ( final ContestRound round : reverseRoundsList ) { | |
if ( !( round.isScored () || round.isFinished () ) ) |
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.xdance.misc; | |
import java.io.*; | |
import java.util.List; | |
import org.apache.tapestry5.grid.GridDataSource; | |
import org.apache.tapestry5.grid.SortConstraint; | |
import org.hibernate.Criteria; | |
import org.hibernate.Session; | |
import org.hibernate.criterion.*; |
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
(ns com.myapp.tapestry.serviceregistry | |
(:import (org.apache.tapestry5.ioc ObjectLocator))) | |
(def ^:dynamic ^ObjectLocator *tapestry-registry-ref* (promise)) | |
(defn init-registry [^ObjectLocator registry] | |
"Must be called during service initialization to set up Tapestry registry object" | |
(deliver *tapestry-registry-ref* registry)) | |
(defmacro with-tapestry-services [service-bindings & body] |
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 my.app.components; | |
import org.apache.tapestry5.*; | |
import org.apache.tapestry5.annotations.*; | |
import org.apache.tapestry5.corelib.base.AbstractField; | |
import org.apache.tapestry5.internal.util.Holder; | |
import org.apache.tapestry5.ioc.Messages; | |
import org.apache.tapestry5.ioc.annotations.Inject; | |
import org.apache.tapestry5.json.JSONArray; | |
import org.apache.tapestry5.json.JSONObject; |
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
/** | |
* Example of mixin usage | |
*/ | |
public class Example { | |
/** | |
* provide suggestions list | |
*/ | |
List<?> onCompletionsRequestedFromAccountLookupField ( String partial ) { | |
List<?> list = hibernateSession.createCriteria ( MyAccountType.class ) |
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
/** | |
* Pre-requisites: | |
* - add <Set name="forwarded">true</Set> to jetty.xml connector configuration section | |
* - set RequestHeader set X-Forwarded-Proto "https" env=HTTPS in apache configuration | |
*/ | |
/* extend BaseURLSourceImpl */ | |
public class ForwardedBaseURLSourceImpl extends BaseURLSourceImpl { | |
private final Request request; |
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 my.package.mixins; | |
import org.apache.commons.lang3.StringUtils; | |
import org.apache.tapestry5.*; | |
import org.apache.tapestry5.annotations.Environmental; | |
import org.apache.tapestry5.annotations.Import; | |
import org.apache.tapestry5.annotations.InjectContainer; | |
import org.apache.tapestry5.annotations.Parameter; | |
import org.apache.tapestry5.corelib.base.AbstractComponentEventLink; | |
import org.apache.tapestry5.corelib.components.ActionLink; |