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
| <?php | |
| use Respect\Http\Hypermedia as hy; | |
| //All synopses from movies featuring Will Smith as an actor. | |
| hy::with("netflix", "http://api.netflix.com/") | |
| ->with("schema", "http://schemas.netflix.com/") | |
| ->get("netflix/catalog/people", array('term' => 'Will Smith')) | |
| ->rel("schema/catalog/person/filmography") | |
| ->rel("schema/catalog/titles/synopsis")->send(); |
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.mao.jaxb.util; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.io.OutputStream; | |
| import java.lang.annotation.Annotation; | |
| import java.lang.reflect.Type; | |
| import javax.ws.rs.WebApplicationException; | |
| import javax.ws.rs.core.MediaType; | |
| import javax.ws.rs.core.MultivaluedMap; |
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
| /** | |
| * DateUtils getRelativeTimeSpanString methods which cares about time zone | |
| * @param date date for which you want time ago | |
| * @param timeZone time zone in which is date | |
| * @return time ago string | |
| */ | |
| public static String timeAgoFromDate(Date date, TimeZone timeZone) { | |
| TimeZone defaultTimeZone = TimeZone.getDefault(); | |
| TimeZone.setDefault(timeZone); |
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
| <?php | |
| /* | |
| * Copyright 2008 Google Inc. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * |
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
| using System.Runtime.CompilerServices; | |
| [assembly: InternalsVisibleTo("StandardSample.Tests")] |
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
| #!/usr/bin/env bash | |
| service=$1 | |
| if [ "`uname`" == "Darwin" ] && ! [ -x "$(command -v chrome-cli)" ]; then | |
| brew install chrome-cli | |
| fi | |
| docker-compose kill $service | |
| docker-compose rm -f $service |
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
| # | |
| # Run `make ENVIRONMENT=machinename` to override the default | |
| # | |
| ENVIRONMENT=default | |
| TLS_VERIFY=$(shell docker-machine env $(ENVIRONMENT) | grep 'DOCKER_TLS_VERIFY=".*"' | cut -d\" -f2) | |
| HOST=$(shell docker-machine env $(ENVIRONMENT) | grep 'DOCKER_HOST=".*"' | cut -d\" -f2) | |
| CERT_PATH=$(shell docker-machine env $(ENVIRONMENT) | grep 'DOCKER_CERT_PATH=".*"' | cut -d\" -f2) | |
| MACHINE_NAME=$(shell docker-machine env $(ENVIRONMENT) | grep 'DOCKER_MACHINE_NAME=".*"' | cut -d\" -f2) | |
| export DOCKER_MACHINE_NAME=$(MACHINE_NAME) |
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
| <?php | |
| /** | |
| * SplClassLoader implementation that implements the technical interoperability | |
| * standards for PHP 5.3 namespaces and class names. | |
| * | |
| * http://groups.google.com/group/php-standards/web/final-proposal | |
| * | |
| * // Example which loads classes for the Doctrine Common package in the | |
| * // Doctrine\Common namespace. |
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
| { | |
| "_links": { | |
| "self": { "href": "/orders" }, | |
| "next": { "href": "/orders?page=2" }, | |
| "find": { "href": "/orders{?id}", "templated": true } | |
| }, | |
| "_embedded": { | |
| "orders": [{ | |
| "_links": { | |
| "self": { "href": "/orders/123" }, |
OlderNewer