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 class User implements Serializable { | |
private static final long serialVersionUID = 2L; | |
private Long userId; | |
private String username; | |
private String password; | |
private String firstName; | |
private String lastName; | |
private String email; |
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
/* Create a new date from a Julian date. | |
@param jd (number) the Julian date to convert | |
@return (CDate) the equivalent date */ | |
fromJD: function(jd) { | |
// Jean Meeus algorithm, "Astronomical Algorithms", 1991 | |
var z = Math.floor(jd + 0.5); | |
var a = Math.floor((z - 1867216.25) / 36524.25); | |
a = z + 1 + a - Math.floor(a / 4); | |
var b = a + 1524; | |
var c = Math.floor((b - 122.1) / 365.25); |
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
toJD: function(year, month, day) { | |
var date = this._validate(year, month, day, | |
$.calendars.local.invalidDate || $.calendars.regional[''].invalidDate); | |
year = date.year(); | |
month = date.month(); | |
day = date.day(); | |
if (year < 0) { year++; } // No year zero | |
// Jean Meeus algorithm, "Astronomical Algorithms", 1991 | |
if (month < 3) { | |
month += 12; |
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
function (year, month, day) { | |
var date = this._validate(year, month, day, $.calendars.local.invalidDate); | |
var index = (12 * (date.year() - 1)) + date.month() - 16260; | |
var mcjdn = date.day() + ummalqura_dat[index - 1] - 1; | |
return mcjdn + 2400000 - 0.5; // Modified Chronological Julian Day Number (MCJDN) | |
} | |
var ummalqura_dat = [ | |
28607, 28636, 28665, 28695, 28724, 28754, 28783, 28813, 28843, 28872, 28901, 28931, 28960, 28990, 29019, 29049, 29078, 29108, 29137, 29167, | |
29196, 29226, 29255, 29285, 29315, 29345, 29375, 29404, 29434, 29463, 29492, 29522, 29551, 29580, 29610, 29640, 29669, 29699, 29729, 29759, |
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
/* | |
Create a new date from a Julian date. | |
@param jd (number) the Julian date to convert | |
@return (CDate) the equivalent date | |
*/ | |
function (jd) { | |
var mcjdn = jd - 2400000 + 0.5; // Modified Chronological Julian Day Number (MCJDN) | |
// the MCJDN's of the start of the lunations in the Umm al-Qura calendar | |
// are stored in the 'ummalqura_dat' array | |
var index = 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
package com.ttdev; | |
import org.apache.cxf.tools.wsdlto.WSDLToJava; | |
public class ClientCodeGenerator { | |
public static void main(String[] args) { | |
WSDLToJava.main(new String[] { | |
"-client", | |
"-d", "src/test/java", | |
"-p", "http://ttdev.com/cs=com.ttdev.cs.client", |
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
@Bean | |
public ServletRegistrationBean webservices() { | |
final ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new CXFServlet(),"/service/*"); | |
servletRegistrationBean.setLoadOnStartup(1); | |
return servletRegistrationBean; | |
} |
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
/** | |
* To support Akka | |
* | |
* @return | |
*/ | |
@Configuration | |
protected static class AkkaConfiguration { | |
// The application context is needed to initialize the Akka Spring | |
// Extension | |
@Autowired |
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 tk.aalkhodiry.client.akka; | |
import org.springframework.context.ApplicationContext; | |
import org.springframework.stereotype.Component; | |
import akka.actor.Extension; | |
import akka.actor.Props; | |
/** | |
* Extension to tell Akka how to create beans via Spring. |
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 tk.aalkhodiry.client.akka; | |
import org.springframework.context.ApplicationContext; | |
import akka.actor.Actor; | |
import akka.actor.IndirectActorProducer; | |
/** | |
* An actor producer that lets Spring create the Actor instances. | |
*/ |
OlderNewer