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
| /* | |
| * Register error provider that shows message on failed requests | |
| * or redirects to login page on unauthenticated requests | |
| */ | |
| $httpProvider.interceptors.push(function($q, $rootScope, $location, $log, alertsService) { | |
| return { | |
| 'responseError' : function(rejection) { | |
| if (!rejection.config.ignoreAuthModule) { | |
| switch (rejection.status) { |
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
| #! /bin/bash | |
| set -e | |
| trap 'previous_command=$this_command; this_command=$BASH_COMMAND' DEBUG | |
| trap 'echo FAILED COMMAND: $previous_command' EXIT | |
| #------------------------------------------------------------------------------------------- | |
| # This script will download packages for, configure, build and install a GCC cross-compiler. | |
| # Customize the variables (INSTALL_PATH, TARGET, etc.) to your liking before running. | |
| # If you get an error and need to resume the script from some point in the middle, | |
| # just delete/comment the preceding lines before running it again. |
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 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. | |
| */ |
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 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 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
| /** | |
| * To support Akka | |
| * | |
| * @return | |
| */ | |
| @Configuration | |
| protected static class AkkaConfiguration { | |
| // The application context is needed to initialize the Akka Spring | |
| // Extension | |
| @Autowired |
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
| @Bean | |
| public ServletRegistrationBean webservices() { | |
| final ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new CXFServlet(),"/service/*"); | |
| servletRegistrationBean.setLoadOnStartup(1); | |
| return servletRegistrationBean; | |
| } |
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.Map; | |
| import org.apache.commons.logging.Log; | |
| import org.apache.commons.logging.LogFactory; | |
| import org.apache.cxf.binding.soap.Soap11; | |
| import org.apache.cxf.binding.soap.Soap12; | |
| import org.apache.cxf.binding.soap.SoapMessage; | |
| import org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor; |
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.alkhodiry.mb.rest.filters; | |
| import java.io.IOException; | |
| import javax.servlet.FilterChain; | |
| import javax.servlet.ServletException; | |
| import javax.servlet.http.HttpServletRequest; | |
| import javax.servlet.http.HttpServletResponse; | |
| import org.apache.commons.logging.Log; |
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.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 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
| /* | |
| 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; |