text:
import { AzureRmWebAppDeploymentProvider } from './AzureRmWebAppDeploymentProvider';
import tl = require('azure-pipelines-task-lib/task');
var webCommonUtility = require('webdeployment-common-v2/utility.js');

export class WindowsWebAppWarDeployProvider extends AzureRmWebAppDeploymentProvider{

    private zipDeploymentID: string;

    public async DeployWebAppStep() {
        let deploymentMethodtelemetry = '{"deploymentMethod":"War Deploy"}';
        console.log("##vso[telemetry.publish area=TaskDeploymentMethod;feature=AzureWebAppDeployment]" + deploymentMethodtelemetry);

        tl.debug("Initiated deployment via kudu service for webapp war package : "+ this.taskParams.Package.getPath());

        await this.kuduServiceUtility.warmpUp();

        var warName = webCommonUtility.getFileNameFromPath(this.taskParams.Package.getPath(), ".war");

        this.zipDeploymentID = await this.kuduServiceUtility.deployUsingWarDeploy(this.taskParams.Package.getPath(),
            { slotName: this.appService.getSlot() }, warName);

        await this.PostDeploymentStep();
    }

    public async UpdateDeploymentStatus(isDeploymentSuccess: boolean) {
        if(this.kuduServiceUtility) {
            await super.UpdateDeploymentStatus(isDeploymentSuccess);
            if(this.zipDeploymentID && this.activeDeploymentID && isDeploymentSuccess) {
                await this.kuduServiceUtility.postZipDeployOperation(this.zipDeploymentID, this.activeDeploymentID);
            }
        }
    }
}


text:
layout: post
category: article
title: J'ai un vieux telephone
date: 2014-04-08 21:05:48
published: true
lang: fr
cover: nokia-3310.jpg
tags: opinion, fr
---
## J'ai un téléphone de merde et je vous emmerde
READMORE

Je suis assis à une table, j'ai mal à la tête, cette salle est pleine à craquer, tout le monde parle, je veux sortir.
Tout à coup mon téléphone sonne, je sors mon vieux nokia 3310 de ma poche : "Ecoute je te rappelle plus tard, je ne suis pas disponible..."

Une fois que j'ai remis mon téléphone dans ma poche, un grand silence.
Quel calme enfin ... Mais les gens me regardent tous comme s'ils avaient vu un fantôme.
Un convive plus courageux que les autres finit par briser le silence :  "T'as pas de smartphone ? Mais pourtant, tu es dans les nouvelles technologies...", un autre reprend "Comment peux-tu développer ou utiliser des applis si tu n'as pas de smartphone?" ensuite un flot venant de toute part: "Mais tu es complétement deconnecté", "Il faut vraiment que tu passes dans le 21ème siecle", "Mais c'est tout naze un vieux téléphone, tu ne peux même pas faire de photo"
Je lève la main et je dis "J'ai un téléphone de merde et je vous emmerde...".
Je repère dans l'assistance un mec avec un T-shirt "sauvons la forêt vierge" et un I-phone 5s dans la main.
Je m'approche de lui en parlant de plus en plus fort, "Et plus particulièrement toi, l'écolo à la con"

### J'arrive en face de l'écolo
"Tu vas bien m'écouter, la course à la consommation des smartphones est un véritable désastre pour l'humanité au sens large du terme, aussi bien pour l'environnement si chère à ton coeur, que pour des populations humaines.
Tous les smartphones sont conçus pour être changé dans l'année qui suit son achat, soit par une obsolescence programée des logiciels, soit par un nouveau design qui fera passer l'ancien pour plus vieux qu'il ne l'est.
Ensuite comme tout matériel électronique, il y a énormément de composants précieux à l'intérieur.
L'extraction, la transformation et le transport ont un impact très fort sur notre environnement.
En encourageant la consommation à outrance de ces produits, je pollue, et j'encourage des conflits dans certains pays pour l'approvisionnement de ces matières premières spécifiques.
Et je ne parle même pas du recyclage qui est un véritable cauchemard."
le baba cool range son téléphone et regarde ses pieds, "Heu ... Oui mais je l'ai acheté dans une boutique bio."
Mon regard est ensuite attiré par un type qui regarde tout autour de lui et qui a l'air complétement parano.
Je m'avance doucement, et je commence "et toi aussi, putain de parano"

### Une fois en face du parano
"Tu sais quoi tu as raison d'être parano, le smartphone d'aujourd'hui c'est toute la puissance de la technologie moderne au service de l'espionnage des masses.
Et même sans être parano, que des entreprises sachent à tout moment ce que je fais, ou je suis, ce que je pense est intolérable.
Il faut être sacrement naif pour s'imaginer que la récolte de ses données est faite dans l'intérêt du plus grand nombre.
Bref, je ne veux pas me faire espionner d'avantage que je ne luis déjà, pas la peine d'avoir un espion dans la poche."
Le parano a l'air paniqué mais tente quand même de se rassurer "Oui mais c'est pour nous protéger du terrorrisme, hein ?".
Je rigole et lache "tu savais qu'il n'a pas été prouvé que la surveillance des masses avait déjoué le moindre acte de terrorisme.... tu te sens plus en sécurité maintenant ?".
Le parano part en courant, durant sa course il bouscule un type avec un T-shirt du Che et un smartfone samsung dans la main.
Tient en voilà un qui essaye de se la jouer rebelle, "et bouge pas le révolutionnaire"

### Arrivé face à l'anticonformiste
"Alors écoute moi bien le rebelle de carnaval, il n'y a rien de plus conformiste à l'heure actuelle que d'avoir un smartphone.
Et l'idée d'avoir un smartphone, me donne l'impression de rejoindre un troupeau de moutons qu'on a éduqué à bien consommer ce qu'on leur dit d'acheter.
Si aujourd'hui, Tu veux te distinguer n'essayes pas de ressembler à Steeve ou Bill, sois toi même !!!"
Le Che se décompose mais sort: "attends je suis sur Android, c'est plus subversif" et je répond "Tu as raison Google c'est vachement des rebelles, ça n'a rien à voir avec Apple"
Le Che ne fera pas de révolution cette année mais je vois un développeur avec un T-shirt "Ruby is love".
Il cache discrètement son téléphone mais trop tard, j'ai deux mots à lui dire...

### Devant l'autre développeur
"Ecoutes mon petit pote, je passe le plus clair de mon temps sur des ordinateurs pour gagner mon salaire, le peu de temps qu'il me reste, dois-je vraiment le passer sur un autre ordinateur ? plus petit ? Je ne crois pas ...
De plus, même s'il m'arrive de développer des applications pour ces terminaux, suis-je obligé de les acheter?"
Timide il avance, "mais on peut lire ses mails tout le temps", je le regarde dans le blanc des yeux et lui dis
"Es-tu marié avec ton travail ? Moi non, et même si j'aime ce que je fais cela ne justifie pas d'être un esclave."
Les yeux du développeur deviennent subitement bleus et j'apperçois qu'une "erreur fatale" vient de se produire.
Juste le temps de m'approcher d'un type avec des googles glasses, une I-watch et deux smartphones dans les mains.

### En face du technophile
"Quel est l'intérêt d'avoir la puissance de calcul et toute la connaissance mondiale, 24h/24.
Quand la plupart du temps les gens utilisent la dite puissance pour jouer à candy-crush ou angry bird.
Est ce que tous les progrès sont de véritables progrès.
Je m'explique, est-ce vraiment une bonne chose d'avoir une voiture que l'on utilise tout le temps si à la longue l'on termine en gros tas, incapable de se déplacer sans elle.
Peu de personne en ont un usage constructif de toute manière. Et surtout pas toi avec tes jouets pour adultes."
Si avoir un smartphone nous rend incapable de nous repérer, lire des cartes, communiquer avec des gens réels, peut-on vraiment parler de progrès ?
Le personnage commence à pleurer mais enfile une tétine connecté à son I-phone pour se rassuer.
Je m'arrête et vois un type avec un fouet accroché à son pantalon et un smartphone de l'autre coté

### Je m'approche de l'aventurier
"Alors Harrisson Ford tu fais quoi avec ce truc?
Vois-tu mon téléphone pourri est bien mieux adapté à l'aventure que toi, il peut rester chargé une semaine, il peut tomber de plusieurs metres et s'en remettre.
je téléphone lorsque j'en ai besoin, il n'a pas besoin de mise à jour. Il s'allume et s'éteint instantanément.
Je sais toujours lire une carte routière, ou dessiner des plans car je ne suis pas devenu paresseux à cause de mon smartphone.
Tu crois que tu seras capable de faire une dernière croisade depuis que tu as ton smartphone ?"
Visiblement la provocation et trop forte, il lance son fouet et s'enfuit accroché au manche.
Je vois un type qui est encore plus mal habillé que moi mais qui a un smartphone dernier cri.

### en face du pauvre
"Tu m'as l'air moins riche que moi, franchement un smartphone c'est cher, ça se casse, ça se fait voler et c'est dépassé en moins de 6 mois.
Faire la course coute cher, beaucoup trop cher pour ce que ça rapporte. J'ai d'autre truc à faire avec mon argent.
Il me répond "oui mais quand j'ai un smartphone je me sens moins pauvre" là je dois dire "prends la pilule rouge, ça va te faire mal mais au moins tu verras qu'on est pas riche avec ce qu'on possède mais avec ce qu'on est"
Finalement je repense à tout ce que je viens de dire mais ...

## Est-ce vraiment à moi de me justifier ?
Je trouve finalement assez étrange de devoir me justifier.
Finalement, j'ai décidé de choisir mes propres besoins, mon choix est basé sur des considérations pragmatiques, militantes et sécuritaires.
Quand est-il des "heureux" propriétaires de smartphone? Quel usage justifie vraiment la pocession d'un tel appareil et surtout un renouvellement tous les 6 mois?
Est-ce vraiment moi qui doit me justifier de ne pas avoir de smartphone?

Soudain le smartphone sonne et me réveille brutalement, je suis dans mon lit dégoulinant de sueur, quel horrible cauchemard.
Je regarde l'écran de mon smartphone et l'approche de ma bouche, et je lui susurre "j'ai révé que je voulais me séparer de toi et que je trouvais pleins d'excuses étranges, rassure-toi on s'aimera toujours et rien ne pourra nous séparer"
Un petit sourire se dessine sur l'écran du smartphone ...

redpajama_set_name: RedPajamaGithub


text:
// Package utils defines utilities for the agent.
package utils

import (
	"bufio"
	"context"
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"io/ioutil"
	"log"
	"math"
	"math/rand"
	"net/http"
	"os"
	"os/signal"
	"sync"
	"syscall"
	"time"

	"cloud.google.com/go/compute/metadata"
	"github.com/google/inverting-proxy/agent/metrics"
)

const (
	// PendingPath is the URL subpath for pending requests held by the proxy.
	PendingPath = "agent/pending"

	// RequestPath is the URL subpath for reading a specific request held by the proxy.
	RequestPath = "agent/request"

	// ResponsePath is the URL subpath for posting a request response to the proxy.
	ResponsePath = "agent/response"

	// HeaderUserID is the name of a response header used by the proxy to identify the end user.
	HeaderUserID = "X-Inverting-Proxy-User-ID"

	// HeaderBackendID is the name of a request header used to uniquely identify this agent.
	HeaderBackendID = "X-Inverting-Proxy-Backend-ID"

	// HeaderVMID is the name of a request header used to report the VM
	// (if any) on which the agent is running.
	HeaderVMID = "X-Inverting-Proxy-VM-ID"

	// HeaderRequestID is the name of a request/response header used to uniquely
	// identify a proxied request.
	HeaderRequestID = "X-Inverting-Proxy-Request-ID"

	// HeaderRequestStartTime is the name of a response header used by the proxy
	// to report the start time of a proxied request.
	HeaderRequestStartTime = "X-Inverting-Proxy-Request-Start-Time"

	// JitterPercent sets the jitter for exponential backoff retry time
	JitterPercent = 0.1

	// Max time to wait before retry during exponential backoff
	maxBackoffDuration = 3 * time.Second

	// Time to wait on first retry
	firstRetryWaitDuration = time.Millisecond

	// Max number of retries to perform in case of failed read request calls
	maxReadRequestRetryCount = 2

	// Max number of retries to perform in case of failed write response calls
	maxWriteResponseRetryCount = 2

	// Size of the buffer that stores the beginning of read response body
	readResponseBufSize = 4096
)

var (
	// compute the max retry count
	maxRetryCount = math.Log2(float64(maxBackoffDuration / firstRetryWaitDuration))
)

// hopHeaders are Hop-by-hop headers. These are removed when received in a response from
// the backend. For details, see: http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html
var hopHeaders = map[string]bool{
	"Connection":          true,
	"Proxy-Connection":    true, // non-standard but still sent by libcurl and rejected by e.g. google
	"Keep-Alive":          true,
	"Proxy-Authenticate":  true,
	"Proxy-Authorization": true,
	"Te":                  true, // canonicalized version of "TE"
	"Trailer":             true, // not Trailers per URL above; http://www.rfc-editor.org/errata_search.php?eid=4522
	"Transfer-Encoding":   true,
	"Upgrade":             true,
}

// PendingRequests represents a list of request IDs that do not yet have a response.
type PendingRequests []string

// ForwardedRequest represents an end-client HTTP request that was forwarded
// to us by the inverting proxy.
type ForwardedRequest struct {
	BackendID string
	RequestID string
	User      string
	StartTime time.Time

	Contents *http.Request
}

// RequestCallback defines how the caller of `ReadRequest` uses the request that was read.
//
// This is done as a callback so that the caller of `ReadRequest` does not have to remember
// to call `Close()` on the nested *http.Request object's body.
type RequestCallback func(client *http.Client, fr *ForwardedRequest) error

// parseRequestIDs takes a response from the proxy and parses any forwarded request IDs out of it.
func parseRequestIDs(response *http.Response, metricHandler *metrics.MetricHandler) ([]string, error) {
	responseBody := &io.LimitedReader{
		R: response.Body,
		// If a response is larger than 1MB, then truncate it. This will result in an
		// failure to parse the result, but that is better than a potential OOM.
		//
		// Note that this shouldn't happen anyway, since a reasonable proxy server
		// should limit the size of a response to less than this. For instance, the
		// initial version of our proxy will never return a list of more than 100
		// request IDs.
		N: 1024 * 1024,
	}
	responseBytes, err := ioutil.ReadAll(responseBody)
	if err != nil {
		return nil, fmt.Errorf("failed to read the forwarded request: %q", err.Error())
	}
	if response.StatusCode != http.StatusOK {
		return nil, fmt.Errorf("failed to list pending requests: %d, %q", response.StatusCode, responseBytes)
	}
	if len(responseBytes) <= 0 {
		return []string{}, nil
	}

	var requests []string
	if err := json.Unmarshal(responseBytes, &requests); err != nil {
		return nil, fmt.Errorf("failed to parse the requests: %q", err.Error())
	}
	return requests, nil
}

func hasVMServiceAccount() bool {
	if !metadata.OnGCE() {
		return false
	}

	if _, err := metadata.Get("instance/service-accounts/default/email"); err != nil {
		return false
	}
	return true
}

func getVMID(audience string) string {
	for {
		idPath := fmt.Sprintf("instance/service-accounts/default/identity?format=full&audience=%s", audience)
		vmID, err := metadata.Get(idPath)
		if err == nil {
			return vmID
		}
		log.Printf("failure fetching a VM ID: %v", err)
	}
}

type vmTransport struct {
	wrapped http.RoundTripper

	// Protects the `currID` field below
	sync.Mutex
	currID string
}

func (t *vmTransport) RoundTrip(r *http.Request) (*http.Response, error) {
	t.Lock()
	id := t.currID
	t.Unlock()
	r.Header.Add(HeaderVMID, id)
	return t.wrapped.RoundTrip(r)
}

// RoundTripperWithVMIdentity returns an http.RoundTripper that includes a GCE VM ID token in
// every outbound request. The token is fetched from the metadata server and
// stored in the 'X-Inverting-Proxy-VM-ID' header.
//
// This method relies on the Google Compute Engine functionality for verifying a VM's identity
// (https://cloud.google.com/compute/docs/instances/verifying-instance-identity), so it if this
// is not running inside of a Google Compute Engine VM, then it just returns the passed in RoundTripper.
func RoundTripperWithVMIdentity(ctx context.Context, wrapped http.RoundTripper, proxyURL string, disableGCEVM bool) http.RoundTripper {
	if !hasVMServiceAccount() || disableGCEVM {
		return wrapped
	}

	transport := &vmTransport{
		wrapped: wrapped,
		currID:  getVMID(proxyURL),
	}
	go func() {
		ticker := time.NewTicker(10 * time.Second)
		defer ticker.Stop()
		for {
			select {
			case <-ctx.Done():
				return
			case <-ticker.C:
				nextID := getVMID(proxyURL)
				transport.Lock()
				transport.currID = nextID
				transport.Unlock()
			}
		}
	}()
	return transport
}

// ListPendingRequests issues a single request to the proxy to ask for the IDs of pending requests.
func ListPendingRequests(client *http.Client, proxyHost, backendID string, metricHandler *metrics.MetricHandler) ([]string, error) {
	proxyURL := proxyHost + PendingPath
	proxyReq, err := http.NewRequest(http.MethodGet, proxyURL, nil)
	if err != nil {
		return nil, err
	}
	proxyReq.Header.Add(HeaderBackendID, backendID)
	proxyResp, err := client.Do(proxyReq)
	if err != nil {
		return nil, fmt.Errorf("A proxy request failed: %q", err.Error())
	}
	defer proxyResp.Body.Close()
	return parseRequestIDs(proxyResp, metricHandler)
}

func getRequestWithRetries(client *http.Client, proxyURL, backendID, requestID string) (*http.Response, error) {
	proxyReq, err := http.NewRequest(http.MethodGet, proxyURL, nil)
	if err != nil {
		return nil, err
	}
	proxyReq.Header.Add(HeaderBackendID, backendID)
	proxyReq.Header.Add(HeaderRequestID, requestID)
	var proxyResp *http.Response
	for retryCount := 0; retryCount <= maxReadRequestRetryCount; retryCount++ {
		proxyResp, err = client.Do(proxyReq)
		if err != nil {
			continue
		}
		if 500 <= proxyResp.StatusCode && proxyResp.StatusCode < 600 {
			proxyResp.Body.Close()
			continue
		}
		return proxyResp, nil
	}
	return proxyResp, err
}

func parseRequestFromProxyResponse(backendID, requestID string, proxyResp *http.Response, metricHandler *metrics.MetricHandler) (*ForwardedRequest, error) {
	user := proxyResp.Header.Get(HeaderUserID)
	startTimeStr := proxyResp.Header.Get(HeaderRequestStartTime)

	if proxyResp.StatusCode != http.StatusOK {
		metricHandler.WriteResponseCodeMetric(proxyResp.StatusCode)
		return nil, fmt.Errorf("Error status while reading %q from the proxy", requestID)
	}

	startTime, err := time.Parse(time.RFC3339Nano, startTimeStr)
	if err != nil {
		return nil, err
	}

	contents, err := http.ReadRequest(bufio.NewReader(proxyResp.Body))
	if err != nil {
		return nil, err
	}
	return &ForwardedRequest{
		BackendID: backendID,
		RequestID: requestID,
		User:      user,
		StartTime: startTime,
		Contents:  contents,
	}, nil
}

// ReadRequest reads a forwarded client request from the inverting proxy.
//
// If the returned request is non-nil, then it is passed to the provided callback.
func ReadRequest(client *http.Client, proxyHost, backendID, requestID string, callback RequestCallback, metricHandler *metrics.MetricHandler) error {
	proxyURL := proxyHost + RequestPath
	proxyResp, err := getRequestWithRetries(client, proxyURL, backendID, requestID)
	if err != nil {
		return fmt.Errorf("A proxy request failed: %q", err.Error())
	}
	defer proxyResp.Body.Close()

	fr, err := parseRequestFromProxyResponse(backendID, requestID, proxyResp, metricHandler)
	if err != nil {
		return err
	}
	return callback(client, fr)
}

// ResponseForwarder implements http.ResponseWriter by dumping a wire-compatible
// representation of the response to 'proxyWriter' field.
//
// ResponseForwarder is used by the agent to forward a response from the backend
// target to the inverting proxy.
type ResponseForwarder struct {
	proxyWriter        *io.PipeWriter
	startedChan        chan struct{}
	responseBodyWriter *io.PipeWriter

	// wroteHeader is set when WriteHeader is called. It's used to ensure a
	// call to WriteHeader before the first call to Write.
	wroteHeader bool

	// response is synthesized using the backend target response. We use its Write
	// method as a convenience when forwarding the wire-representation received
	// by the backend target.
	response *http.Response

	// header is used to store the response headers prior to sending them.
	// This is separate from the headers in the response as it includes hop headers,
	// which will be filtered out before sending the response.
	header http.Header

	// proxyClientErrors is a channel where any errors issuing a client request to
	// the proxy server get written.
	//
	// This is eventually returned to the caller of the Close method.
	proxyClientErrors chan error

	// forwardingErrors is a channel where all errors forwarding the streamed
	// response from the backend to the proxy get written.
	//
	// This is eventually returned to the caller of the Close method.
	forwardingErrors chan error

	// writeErrors is a channel where all errors writing the streamed response
	// from the backend server get written.
	//
	// This is eventually returned to the caller of the Close method.
	writeErrors chan error

	metricHandler *metrics.MetricHandler
}

func newBufferedReadSeeker(r io.Reader, bufSize int) *bufferedReadSeeker {
	return &bufferedReadSeeker{
		r:         r,
		buf:       make([]byte, bufSize),
		writeHead: 0,
		readHead:  0,
	}
}

type bufferedReadSeeker struct {
	r         io.Reader
	buf       []byte
	writeHead int
	readHead  int
}

func (b *bufferedReadSeeker) Read(p []byte) (int, error) {
	// Read from buffer.
	readFromBuf := copy(p, b.buf[b.readHead:b.writeHead])
	b.readHead += readFromBuf
	// Read from wrapped source and write to buffer.
	readFromSource, err := b.r.Read(p[readFromBuf:])
	written := copy(b.buf[b.writeHead:], p[readFromBuf:(readFromBuf+readFromSource)])
	b.writeHead += written
	b.readHead += written
	return readFromBuf + readFromSource, err
}

func (b *bufferedReadSeeker) Seek(offset int64, whence int) (int64, error) {
	if whence != io.SeekStart {
		return 0, errors.New("only SeekStart offset is supported")
	}
	if offset < 0 || offset >= int64(len(b.buf)) {
		return 0, errors.New("invalid offset value")
	}
	if b.writeHead >= len(b.buf) {
		return 0, errors.New("cannot seek, possible buffer overflow")
	}
	b.readHead = int(offset)
	return int64(b.readHead), nil
}

func postResponseWithRetries(client *http.Client, proxyURL, backendID, requestID string, proxyReader io.Reader) error {
	proxyReadSeeker := newBufferedReadSeeker(proxyReader, readResponseBufSize)
	proxyReq, err := http.NewRequest(http.MethodPost, proxyURL, proxyReadSeeker)
	if err != nil {
		return err
	}
	proxyReq.Header.Set(HeaderBackendID, backendID)
	proxyReq.Header.Set(HeaderRequestID, requestID)
	proxyReq.Header.Set("Content-Type", "text/plain")
	var proxyResp *http.Response
	for retryCount := 0; retryCount <= maxWriteResponseRetryCount; retryCount++ {
		if proxyResp, err = client.Do(proxyReq); err != nil {
			if _, seekErr := proxyReadSeeker.Seek(0, io.SeekStart); seekErr != nil {
				return err
			}
			continue
		}
		proxyResp.Body.Close()
		if 500 <= proxyResp.StatusCode && proxyResp.StatusCode < 600 {
			if _, seekErr := proxyReadSeeker.Seek(0, io.SeekStart); seekErr != nil {
				return err
			}
			continue
		}
		return nil
	}
	return err
}

// NewResponseForwarder constructs a new ResponseForwarder that forwards to the
// given proxy for the specified request.
func NewResponseForwarder(client *http.Client, proxyHost, backendID, requestID string) (*ResponseForwarder, error) {
	// The contortions below support streaming.
	//
	// There are two pipes:
	// 1. proxyReader, proxyWriter: The io.PipeWriter for the HTTP POST to the inverting proxy.
	//       To this pipe, we write the full HTTP response from the backend target in HTTP
	//       wire-format form. (Status + Headers + Body + Trailers)
	//
	// 2. responseBodyReader, responseBodyWriter: This pipe corresponds to the response body
	//       from the backend target. To this pipe, we stream each read from backend target.
	proxyReader, proxyWriter := io.Pipe()
	startedChan := make(chan struct{}, 1)
	responseBodyReader, responseBodyWriter := io.Pipe()

	proxyURL := proxyHost + ResponsePath

	proxyClientErrChan := make(chan error, 100)
	forwardingErrChan := make(chan error, 100)
	writeErrChan := make(chan error, 100)
	go func() {
		// Wait until the response body has started being written
		// (for a non-empty response) or for the response to
		// be closed (for an empty response) before triggering
		// the proxy request round trip.
		//
		// This ensures that we do not fetch the bearer token
		// for the auth header until the last possible moment.
		// That, in turn. prevents a race condition where the
		// token expires between the header being generated
		// and the request being sent to the proxy.
		<-startedChan
		if err := postResponseWithRetries(client, proxyURL, backendID, requestID, proxyReader); err != nil {
			proxyClientErrChan <- err
		}
		proxyReader.Close()
		close(proxyClientErrChan)
	}()

	return &ResponseForwarder{
		response: &http.Response{
			Proto:      "HTTP/1.1",
			ProtoMajor: 1,
			ProtoMinor: 1,
			Header:     make(http.Header),
			Body:       responseBodyReader,
		},
		wroteHeader:        false,
		header:             make(http.Header),
		proxyWriter:        proxyWriter,
		startedChan:        startedChan,
		responseBodyWriter: responseBodyWriter,
		proxyClientErrors:  proxyClientErrChan,
		forwardingErrors:   forwardingErrChan,
		writeErrors:        writeErrChan,
	}, nil
}

func (rf *ResponseForwarder) notify() {
	if rf.startedChan != nil {
		rf.startedChan <- struct{}{}
		rf.startedChan = nil
	}
}

// Header implements the http.ResponseWriter interface.
func (rf *ResponseForwarder) Header() http.Header {
	return rf.header
}

// Write implements the http.ResponseWriter interface.
func (rf *ResponseForwarder) Write(buf []byte) (int, error) {
	// As in net/http, call WriteHeader if it has not yet been called
	// before the first call to Write.
	if !rf.wroteHeader {
		rf.WriteHeader(http.StatusOK)
	}
	rf.notify()
	count, err := rf.responseBodyWriter.Write(buf)
	if err != nil {
		rf.writeErrors <- err
	}
	return count, err
}

// WriteHeader implements the http.ResponseWriter interface.
func (rf *ResponseForwarder) WriteHeader(code int) {
	// As in net/http, ignore multiple calls to WriteHeader.
	if rf.wroteHeader {
		return
	}
	rf.wroteHeader = true
	for k, v := range rf.header {
		if _, ok := hopHeaders[k]; ok {
			continue
		}
		rf.response.Header[k] = v
	}
	rf.response.StatusCode = code
	rf.response.Status = http.StatusText(rf.response.StatusCode)
	// This will write the status and headers immediately and stream the
	// body using the pipes we've wired.
	go func() {
		defer rf.proxyWriter.Close()
		if err := rf.response.Write(rf.proxyWriter); err != nil {
			rf.forwardingErrors <- err

			// Normally, the end of this goroutine indicates
			// that the response.Body reader has returned an EOF,
			// which means that the corresponding writer has been
			// closed. However, that is not necessarily the case
			// if we hit an error in the call to `Write`.
			//
			// In this case, there may still be someone writing
			// to the pipe writer, but we will no longer be reading
			// anything from the corresponding reader. As such,
			// we signal that issue to any remaining writers.
			rf.response.Body.(*io.PipeReader).CloseWithError(err)
		}
		rf.metricHandler.WriteResponseCodeMetric(rf.response.StatusCode)
		close(rf.forwardingErrors)
	}()
}

// Close signals that the response has been fully read from the backend server,
// waits for that response to be forwarded to the proxy, and then reports any
// errors that occured while forwarding the response.
func (rf *ResponseForwarder) Close() error {
	rf.notify()
	var errs []error
	if err := rf.responseBodyWriter.Close(); err != nil {
		errs = append(errs, err)
	}
	for err := range rf.proxyClientErrors {
		errs = append(errs, err)
	}
	for err := range rf.forwardingErrors {
		errs = append(errs, err)
	}
	close(rf.writeErrors)
	for err := range rf.writeErrors {
		errs = append(errs, err)
	}
	if len(errs) > 0 {
		return fmt.Errorf("Multiple errors closing pipe writers: %s", errs)
	}
	return nil
}

// ExponentialBackoffDuration gets time to wait before retry for exponential
// backoff
func ExponentialBackoffDuration(retryCount uint) time.Duration {
	var targetDuration time.Duration
	if retryCount > uint(maxRetryCount) {
		targetDuration = maxBackoffDuration
	} else {
		targetDuration = (1 << retryCount) * firstRetryWaitDuration
	}

	targetDuration = addJitter(targetDuration, JitterPercent)
	return targetDuration
}

func addJitter(duration time.Duration, jitterPercent float64) time.Duration {
	jitter := 1 - jitterPercent + rand.Float64()*(jitterPercent*2)
	return time.Duration(float64(duration.Nanoseconds())*jitter) * time.Nanosecond
}

func ShutdownSignalChan() <-chan struct{} {
	// Listen for shutdown signal.
	sigs := make(chan os.Signal, 1)
	ch := make(chan struct{})

	// SIGINT: The SIGINT ("program interrupt") signal is sent when the user types the INTR character (Ctrl+C)
	// SIGTERM: The SIGTERM signal is a generic signal used to cause program termination
	signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM)
	go func() {
		<-sigs
		close(ch)
	}()
	return ch
}


text:
class Chef
  class Provider
    class MysqlService
      class Sysvinit < Chef::Provider::MysqlService
        action :start do
          template "#{new_resource.name} :start /etc/init.d/#{mysql_name}" do
            path "/etc/init.d/#{mysql_name}"
            source 'sysvinit/mysqld.erb'
            owner 'root'
            group 'root'
            mode '0755'
            variables(
              config: new_resource,
              defaults_file: defaults_file,
              error_log: error_log,
              mysql_name: mysql_name,
              mysqladmin_bin: mysqladmin_bin,
              mysqld_safe_bin: mysqld_safe_bin,
              pid_file: pid_file,
              scl_name: scl_name
              )
            cookbook 'mariadb'
            action :create
          end

          service "#{new_resource.name} :start #{mysql_name}" do
            service_name mysql_name
            provider Chef::Provider::Service::Init::Redhat if node['platform_family'] == 'redhat'
            provider Chef::Provider::Service::Init::Insserv if node['platform_family'] == 'debian'
            supports restart: true, status: true
            action [:enable, :start]
          end
        end

        action :stop do
          service "#{new_resource.name} :stop #{mysql_name}" do
            service_name mysql_name
            provider Chef::Provider::Service::Init::Redhat if node['platform_family'] == 'redhat'
            provider Chef::Provider::Service::Init::Insserv if node['platform_family'] == 'debian'
            supports restart: true, status: true
            action [:stop]
          end
        end

        action :restart do
          service "#{new_resource.name} :restart #{mysql_name}" do
            service_name mysql_name
            provider Chef::Provider::Service::Init::Redhat if node['platform_family'] == 'redhat'
            provider Chef::Provider::Service::Init::Insserv if node['platform_family'] == 'debian'
            supports restart: true
            action :restart
          end
        end

        action :reload do
          service "#{new_resource.name} :reload #{mysql_name}" do
            service_name mysql_name
            provider Chef::Provider::Service::Init::Redhat if node['platform_family'] == 'redhat'
            provider Chef::Provider::Service::Init::Insserv if node['platform_family'] == 'debian'
            action :reload
          end
        end

        def create_stop_system_service
          service "#{new_resource.name} :create #{system_service_name}" do
            service_name system_service_name
            provider Chef::Provider::Service::Init::Redhat if node['platform_family'] == 'redhat'
            provider Chef::Provider::Service::Init::Insserv if node['platform_family'] == 'debian'
            supports status: true
            action [:stop, :disable]
          end
        end

        def delete_stop_service
          service "#{new_resource.name} :delete #{mysql_name}" do
            service_name mysql_name
            provider Chef::Provider::Service::Init::Redhat if node['platform_family'] == 'redhat'
            provider Chef::Provider::Service::Init::Insserv if node['platform_family'] == 'debian'
            supports status: true
            action [:disable, :stop]
            only_if { ::File.exist?("#{etc_dir}/init.d/#{mysql_name}") }
          end
        end
      end
    end
  end
end


text:
int main(int argc, char *argv[])
{
	@autoreleasepool {
	    return UIApplicationMain(argc, argv, nil, NSStringFromClass([InstaAppDelegate class]));
	}
}


text:
	<title>Safe Frame Sample Doubleclick </title>

Safe Frames Doubleclick Ad


text:
/**
 * @module tiles/user/tileTable
 */

import { UserTable } from '../../user/userTable';
import { TileColumn } from './tileColumn';
import { TileColumns } from './tileColumns';
import { UniqueConstraint } from '../../db/table/uniqueConstraint';
import { ContentsDataType } from '../../core/contents/contentsDataType';
import { Contents } from '../../core/contents/contents';

/**
 * `TileTable` models [tile pyramid user tables](https://www.geopackage.org/spec121/index.html#tiles_user_tables).
 *
 * @class
 * @param {string} tableName
 * @param {module:tiles/user/tileColumn~TileColumn[]} columns
 */
export class TileTable extends UserTable<TileColumn> {
  /**
   * Id column name, Requirement 52
   */
  static COLUMN_ID = TileColumns.ID;

  /**
   * Zoom level column name, Requirement 53
   */
  static COLUMN_ZOOM_LEVEL = TileColumns.ZOOM_LEVEL;

  /**
   * Tile column column name, Requirement 54
   */
  static COLUMN_TILE_COLUMN = TileColumns.TILE_COLUMN;

  /**
   * Tile row column name, Requirement 55
   */
  static COLUMN_TILE_ROW = TileColumns.TILE_ROW;

  /**
   * Tile ID column name, implied requirement
   */
  static COLUMN_TILE_DATA = TileColumns.TILE_DATA;

  /**
   * Constructor
   * @param tableName  table name
   * @param columns columns
   */
  constructor(tableName: string, columns: TileColumn[]) {
    super(new TileColumns(tableName, columns, false));

    // Build a unique constraint on zoom level, tile column, and tile data
    let uniqueConstraint = new UniqueConstraint();
    uniqueConstraint.add(this.getUserColumns().getZoomLevelColumn());
    uniqueConstraint.add(this.getUserColumns().getTileColumnColumn());
    uniqueConstraint.add(this.getUserColumns().getTileRowColumn());

    // Add the unique constraint
    this.addConstraint(uniqueConstraint);

  }

  /**
   * {@inheritDoc}
   */
  copy(): TileTable {
    return new TileTable(this.getTableName(), this.columns._columns);
  }

  /**
   * {@inheritDoc}
   */
  getDataType(): string {
    return ContentsDataType.TILES;
  }

  /**
   * {@inheritDoc}
   */
  getUserColumns(): TileColumns {
    return super.getUserColumns() as TileColumns;
  }

  /**
   * {@inheritDoc}
   */
  createUserColumns(columns: TileColumn[]): TileColumns {
    return new TileColumns(this.getTableName(), columns, true);
  }

  /**
   * Get the zoom level column index
   * @return zoom level index
   */
  getZoomLevelColumnIndex(): number {
    return this.getUserColumns().getZoomLevelIndex();
  }

  /**
   * Get the zoom level column
   * @return tile column
   */
  getZoomLevelColumn(): TileColumn {
    return this.getUserColumns().getZoomLevelColumn();
  }

  /**
   * Get the tile column column index
   * @return tile column index
   */
  getTileColumnColumnIndex(): number {
    return this.getUserColumns().getTileColumnIndex();
  }

  /**
   * Get the tile column column
   * @return tile column
   */
  getTileColumnColumn(): TileColumn {
    return this.getUserColumns().getTileColumnColumn();
  }

  /**
   * Get the tile row column index
   * @return tile row index
   */
  getTileRowColumnIndex(): number {
    return this.getUserColumns().getTileRowIndex();
  }

  /**
   * Get the tile row column
   * @return tile column
   */
  getTileRowColumn(): TileColumn {
    return this.getUserColumns().getTileRowColumn();
  }

  /**
   * Get the tile data column index
   * @return tile data index
   */
  getTileDataColumnIndex(): number {
    return this.getUserColumns().getTileDataIndex();
  }

  /**
   * Get the tile data column
   * @return tile column
   */
  getTileDataColumn(): TileColumn {
    return this.getUserColumns().getTileDataColumn();
  }

  /**
   * Create the required table columns, starting at the provided index
   * @param startingIndex starting index
   * @return tile columns
   */
  static createRequiredColumns(startingIndex: number = 0): TileColumn[]{
    let columns: TileColumn[] = [];
    columns.push(TileColumn.createIdColumn(startingIndex++));
    columns.push(TileColumn.createZoomLevelColumn(startingIndex++));
    columns.push(TileColumn.createTileColumnColumn(startingIndex++));
    columns.push(TileColumn.createTileRowColumn(startingIndex++));
    columns.push(TileColumn.createTileDataColumn(startingIndex));
    return columns;
  }

  /**
   * {@inheritDoc}
   */
  validateContents(contents: Contents) {
    // Verify the Contents have a tiles data type
    let dataType = contents.data_type;
    if (dataType === null || dataType === undefined || dataType !== ContentsDataType.TILES) {
      throw new Error('The Contents of a TileTable must have a data type of tiles');
    }
  }
}


text:
namespace clang {

class VarDecl;

/// CXXCatchStmt - This represents a C++ catch block.
///
class CXXCatchStmt : public Stmt {
  SourceLocation CatchLoc;
  /// The exception-declaration of the type.
  VarDecl *ExceptionDecl;
  /// The handler block.
  Stmt *HandlerBlock;

public:
  CXXCatchStmt(SourceLocation catchLoc, VarDecl *exDecl, Stmt *handlerBlock)
  : Stmt(CXXCatchStmtClass), CatchLoc(catchLoc), ExceptionDecl(exDecl),
    HandlerBlock(handlerBlock) {}

  CXXCatchStmt(EmptyShell Empty)
  : Stmt(CXXCatchStmtClass), ExceptionDecl(nullptr), HandlerBlock(nullptr) {}

  SourceLocation getBeginLoc() const LLVM_READONLY { return CatchLoc; }
  SourceLocation getEndLoc() const LLVM_READONLY {
    return HandlerBlock->getEndLoc();
  }

  SourceLocation getCatchLoc() const { return CatchLoc; }
  VarDecl *getExceptionDecl() const { return ExceptionDecl; }
  QualType getCaughtType() const;
  Stmt *getHandlerBlock() const { return HandlerBlock; }

  static bool classof(const Stmt *T) {
    return T->getStmtClass() == CXXCatchStmtClass;
  }

  child_range children() { return child_range(&HandlerBlock, &HandlerBlock+1); }

  const_child_range children() const {
    return const_child_range(&HandlerBlock, &HandlerBlock + 1);
  }

  friend class ASTStmtReader;
};

/// CXXTryStmt - A C++ try block, including all handlers.
///
class CXXTryStmt final : public Stmt,
                         private llvm::TrailingObjects<CXXTryStmt, Stmt *> {

  friend TrailingObjects;
  friend class ASTStmtReader;

  SourceLocation TryLoc;
  unsigned NumHandlers;
  size_t numTrailingObjects(OverloadToken<Stmt *>) const { return NumHandlers; }

  CXXTryStmt(SourceLocation tryLoc, Stmt *tryBlock, ArrayRef<Stmt*> handlers);
  CXXTryStmt(EmptyShell Empty, unsigned numHandlers)
    : Stmt(CXXTryStmtClass), NumHandlers(numHandlers) { }

  Stmt *const *getStmts() const { return getTrailingObjects<Stmt *>(); }
  Stmt **getStmts() { return getTrailingObjects<Stmt *>(); }

public:
  static CXXTryStmt *Create(const ASTContext &C, SourceLocation tryLoc,
                            Stmt *tryBlock, ArrayRef<Stmt*> handlers);

  static CXXTryStmt *Create(const ASTContext &C, EmptyShell Empty,
                            unsigned numHandlers);

  SourceLocation getBeginLoc() const LLVM_READONLY { return getTryLoc(); }

  SourceLocation getTryLoc() const { return TryLoc; }
  SourceLocation getEndLoc() const {
    return getStmts()[NumHandlers]->getEndLoc();
  }

  CompoundStmt *getTryBlock() {
    return cast<CompoundStmt>(getStmts()[0]);
  }
  const CompoundStmt *getTryBlock() const {
    return cast<CompoundStmt>(getStmts()[0]);
  }

  unsigned getNumHandlers() const { return NumHandlers; }
  CXXCatchStmt *getHandler(unsigned i) {
    return cast<CXXCatchStmt>(getStmts()[i + 1]);
  }
  const CXXCatchStmt *getHandler(unsigned i) const {
    return cast<CXXCatchStmt>(getStmts()[i + 1]);
  }

  static bool classof(const Stmt *T) {
    return T->getStmtClass() == CXXTryStmtClass;
  }

  child_range children() {
    return child_range(getStmts(), getStmts() + getNumHandlers() + 1);
  }

  const_child_range children() const {
    return const_child_range(getStmts(), getStmts() + getNumHandlers() + 1);
  }
};

/// CXXForRangeStmt - This represents C++0x [stmt.ranged]'s ranged for
/// statement, represented as 'for (range-declarator : range-expression)'
/// or 'for (init-statement range-declarator : range-expression)'.
///
/// This is stored in a partially-desugared form to allow full semantic
/// analysis of the constituent components. The original syntactic components
/// can be extracted using getLoopVariable and getRangeInit.
class CXXForRangeStmt : public Stmt {
  SourceLocation ForLoc;
  enum { INIT, RANGE, BEGINSTMT, ENDSTMT, COND, INC, LOOPVAR, BODY, END };
  // SubExprs[RANGE] is an expression or declstmt.
  // SubExprs[COND] and SubExprs[INC] are expressions.
  Stmt *SubExprs[END];
  SourceLocation CoawaitLoc;
  SourceLocation ColonLoc;
  SourceLocation RParenLoc;

  friend class ASTStmtReader;
public:
  CXXForRangeStmt(Stmt *InitStmt, DeclStmt *Range, DeclStmt *Begin,
                  DeclStmt *End, Expr *Cond, Expr *Inc, DeclStmt *LoopVar,
                  Stmt *Body, SourceLocation FL, SourceLocation CAL,
                  SourceLocation CL, SourceLocation RPL);
  CXXForRangeStmt(EmptyShell Empty) : Stmt(CXXForRangeStmtClass, Empty) { }

  Stmt *getInit() { return SubExprs[INIT]; }
  VarDecl *getLoopVariable();
  Expr *getRangeInit();

  const Stmt *getInit() const { return SubExprs[INIT]; }
  const VarDecl *getLoopVariable() const;
  const Expr *getRangeInit() const;

  DeclStmt *getRangeStmt() { return cast<DeclStmt>(SubExprs[RANGE]); }
  DeclStmt *getBeginStmt() {
    return cast_or_null<DeclStmt>(SubExprs[BEGINSTMT]);
  }
  DeclStmt *getEndStmt() { return cast_or_null<DeclStmt>(SubExprs[ENDSTMT]); }
  Expr *getCond() { return cast_or_null<Expr>(SubExprs[COND]); }
  Expr *getInc() { return cast_or_null<Expr>(SubExprs[INC]); }
  DeclStmt *getLoopVarStmt() { return cast<DeclStmt>(SubExprs[LOOPVAR]); }
  Stmt *getBody() { return SubExprs[BODY]; }

  const DeclStmt *getRangeStmt() const {
    return cast<DeclStmt>(SubExprs[RANGE]);
  }
  const DeclStmt *getBeginStmt() const {
    return cast_or_null<DeclStmt>(SubExprs[BEGINSTMT]);
  }
  const DeclStmt *getEndStmt() const {
    return cast_or_null<DeclStmt>(SubExprs[ENDSTMT]);
  }
  const Expr *getCond() const {
    return cast_or_null<Expr>(SubExprs[COND]);
  }
  const Expr *getInc() const {
    return cast_or_null<Expr>(SubExprs[INC]);
  }
  const DeclStmt *getLoopVarStmt() const {
    return cast<DeclStmt>(SubExprs[LOOPVAR]);
  }
  const Stmt *getBody() const { return SubExprs[BODY]; }

  void setInit(Stmt *S) { SubExprs[INIT] = S; }
  void setRangeInit(Expr *E) { SubExprs[RANGE] = reinterpret_cast<Stmt*>(E); }
  void setRangeStmt(Stmt *S) { SubExprs[RANGE] = S; }
  void setBeginStmt(Stmt *S) { SubExprs[BEGINSTMT] = S; }
  void setEndStmt(Stmt *S) { SubExprs[ENDSTMT] = S; }
  void setCond(Expr *E) { SubExprs[COND] = reinterpret_cast<Stmt*>(E); }
  void setInc(Expr *E) { SubExprs[INC] = reinterpret_cast<Stmt*>(E); }
  void setLoopVarStmt(Stmt *S) { SubExprs[LOOPVAR] = S; }
  void setBody(Stmt *S) { SubExprs[BODY] = S; }

  SourceLocation getForLoc() const { return ForLoc; }
  SourceLocation getCoawaitLoc() const { return CoawaitLoc; }
  SourceLocation getColonLoc() const { return ColonLoc; }
  SourceLocation getRParenLoc() const { return RParenLoc; }

  SourceLocation getBeginLoc() const LLVM_READONLY { return ForLoc; }
  SourceLocation getEndLoc() const LLVM_READONLY {
    return SubExprs[BODY]->getEndLoc();
  }

  static bool classof(const Stmt *T) {
    return T->getStmtClass() == CXXForRangeStmtClass;
  }

  // Iterators
  child_range children() {
    return child_range(&SubExprs[0], &SubExprs[END]);
  }

  const_child_range children() const {
    return const_child_range(&SubExprs[0], &SubExprs[END]);
  }
};

/// Representation of a Microsoft __if_exists or __if_not_exists
/// statement with a dependent name.
///
/// The __if_exists statement can be used to include a sequence of statements
/// in the program only when a particular dependent name does not exist. For
/// example:
///
/// \code
/// template<typename T>
/// void call_foo(T &t) {
///   __if_exists (T::foo) {
///     t.foo(); // okay: only called when T::foo exists.
///   }
/// }
/// \endcode
///
/// Similarly, the __if_not_exists statement can be used to include the
/// statements when a particular name does not exist.
///
/// Note that this statement only captures __if_exists and __if_not_exists
/// statements whose name is dependent. All non-dependent cases are handled
/// directly in the parser, so that they don't introduce a new scope. Clang
/// introduces scopes in the dependent case to keep names inside the compound
/// statement from leaking out into the surround statements, which would
/// compromise the template instantiation model. This behavior differs from
/// Visual C++ (which never introduces a scope), but is a fairly reasonable
/// approximation of the VC++ behavior.
class MSDependentExistsStmt : public Stmt {
  SourceLocation KeywordLoc;
  bool IsIfExists;
  NestedNameSpecifierLoc QualifierLoc;
  DeclarationNameInfo NameInfo;
  Stmt *SubStmt;

  friend class ASTReader;
  friend class ASTStmtReader;

public:
  MSDependentExistsStmt(SourceLocation KeywordLoc, bool IsIfExists,
                        NestedNameSpecifierLoc QualifierLoc,
                        DeclarationNameInfo NameInfo,
                        CompoundStmt *SubStmt)
  : Stmt(MSDependentExistsStmtClass),
    KeywordLoc(KeywordLoc), IsIfExists(IsIfExists),
    QualifierLoc(QualifierLoc), NameInfo(NameInfo),
    SubStmt(reinterpret_cast<Stmt *>(SubStmt)) { }

  /// Retrieve the location of the __if_exists or __if_not_exists
  /// keyword.
  SourceLocation getKeywordLoc() const { return KeywordLoc; }

  /// Determine whether this is an __if_exists statement.
  bool isIfExists() const { return IsIfExists; }

  /// Determine whether this is an __if_exists statement.
  bool isIfNotExists() const { return !IsIfExists; }

  /// Retrieve the nested-name-specifier that qualifies this name, if
  /// any.
  NestedNameSpecifierLoc getQualifierLoc() const { return QualifierLoc; }

  /// Retrieve the name of the entity we're testing for, along with
  /// location information
  DeclarationNameInfo getNameInfo() const { return NameInfo; }

  /// Retrieve the compound statement that will be included in the
  /// program only if the existence of the symbol matches the initial keyword.
  CompoundStmt *getSubStmt() const {
    return reinterpret_cast<CompoundStmt *>(SubStmt);
  }

  SourceLocation getBeginLoc() const LLVM_READONLY { return KeywordLoc; }
  SourceLocation getEndLoc() const LLVM_READONLY {
    return SubStmt->getEndLoc();
  }

  child_range children() {
    return child_range(&SubStmt, &SubStmt+1);
  }

  const_child_range children() const {
    return const_child_range(&SubStmt, &SubStmt + 1);
  }

  static bool classof(const Stmt *T) {
    return T->getStmtClass() == MSDependentExistsStmtClass;
  }
};

/// Represents the body of a coroutine. This wraps the normal function
/// body and holds the additional semantic context required to set up and tear
/// down the coroutine frame.
class CoroutineBodyStmt final
    : public Stmt,
      private llvm::TrailingObjects<CoroutineBodyStmt, Stmt *> {
  enum SubStmt {
    Body,          ///< The body of the coroutine.
    Promise,       ///< The promise statement.
    InitSuspend,   ///< The initial suspend statement, run before the body.
    FinalSuspend,  ///< The final suspend statement, run after the body.
    OnException,   ///< Handler for exceptions thrown in the body.
    OnFallthrough, ///< Handler for control flow falling off the body.
    Allocate,      ///< Coroutine frame memory allocation.
    Deallocate,    ///< Coroutine frame memory deallocation.
    ReturnValue,   ///< Return value for thunk function: p.get_return_object().
    ResultDecl,    ///< Declaration holding the result of get_return_object.
    ReturnStmt,    ///< Return statement for the thunk function.
    ReturnStmtOnAllocFailure, ///< Return statement if allocation failed.
    FirstParamMove ///< First offset for move construction of parameter copies.
  };
  unsigned NumParams;

  friend class ASTStmtReader;
  friend class ASTReader;
  friend TrailingObjects;

  Stmt **getStoredStmts() { return getTrailingObjects<Stmt *>(); }

  Stmt *const *getStoredStmts() const { return getTrailingObjects<Stmt *>(); }

public:

  struct CtorArgs {
    Stmt *Body = nullptr;
    Stmt *Promise = nullptr;
    Expr *InitialSuspend = nullptr;
    Expr *FinalSuspend = nullptr;
    Stmt *OnException = nullptr;
    Stmt *OnFallthrough = nullptr;
    Expr *Allocate = nullptr;
    Expr *Deallocate = nullptr;
    Expr *ReturnValue = nullptr;
    Stmt *ResultDecl = nullptr;
    Stmt *ReturnStmt = nullptr;
    Stmt *ReturnStmtOnAllocFailure = nullptr;
    ArrayRef<Stmt *> ParamMoves;
  };

private:

  CoroutineBodyStmt(CtorArgs const& Args);

public:
  static CoroutineBodyStmt *Create(const ASTContext &C, CtorArgs const &Args);
  static CoroutineBodyStmt *Create(const ASTContext &C, EmptyShell,
                                   unsigned NumParams);

  bool hasDependentPromiseType() const {
    return getPromiseDecl()->getType()->isDependentType();
  }

  /// Retrieve the body of the coroutine as written. This will be either
  /// a CompoundStmt or a TryStmt.
  Stmt *getBody() const {
    return getStoredStmts()[SubStmt::Body];
  }

  Stmt *getPromiseDeclStmt() const {
    return getStoredStmts()[SubStmt::Promise];
  }
  VarDecl *getPromiseDecl() const {
    return cast<VarDecl>(cast<DeclStmt>(getPromiseDeclStmt())->getSingleDecl());
  }

  Stmt *getInitSuspendStmt() const {
    return getStoredStmts()[SubStmt::InitSuspend];
  }
  Stmt *getFinalSuspendStmt() const {
    return getStoredStmts()[SubStmt::FinalSuspend];
  }

  Stmt *getExceptionHandler() const {
    return getStoredStmts()[SubStmt::OnException];
  }
  Stmt *getFallthroughHandler() const {
    return getStoredStmts()[SubStmt::OnFallthrough];
  }

  Expr *getAllocate() const {
    return cast_or_null<Expr>(getStoredStmts()[SubStmt::Allocate]);
  }
  Expr *getDeallocate() const {
    return cast_or_null<Expr>(getStoredStmts()[SubStmt::Deallocate]);
  }
  Expr *getReturnValueInit() const {
    return cast<Expr>(getStoredStmts()[SubStmt::ReturnValue]);
  }
  Stmt *getResultDecl() const { return getStoredStmts()[SubStmt::ResultDecl]; }
  Stmt *getReturnStmt() const { return getStoredStmts()[SubStmt::ReturnStmt]; }
  Stmt *getReturnStmtOnAllocFailure() const {
    return getStoredStmts()[SubStmt::ReturnStmtOnAllocFailure];
  }
  ArrayRef<Stmt const *> getParamMoves() const {
    return {getStoredStmts() + SubStmt::FirstParamMove, NumParams};
  }

  SourceLocation getBeginLoc() const LLVM_READONLY {
    return getBody() ? getBody()->getBeginLoc()
                     : getPromiseDecl()->getBeginLoc();
  }
  SourceLocation getEndLoc() const LLVM_READONLY {
    return getBody() ? getBody()->getEndLoc() : getPromiseDecl()->getEndLoc();
  }

  child_range children() {
    return child_range(getStoredStmts(),
                       getStoredStmts() + SubStmt::FirstParamMove + NumParams);
  }

  const_child_range children() const {
    return const_child_range(getStoredStmts(), getStoredStmts() +
                                                   SubStmt::FirstParamMove +
                                                   NumParams);
  }

  static bool classof(const Stmt *T) {
    return T->getStmtClass() == CoroutineBodyStmtClass;
  }
};

/// Represents a 'co_return' statement in the C++ Coroutines TS.
///
/// This statament models the initialization of the coroutine promise
/// (encapsulating the eventual notional return value) from an expression
/// (or braced-init-list), followed by termination of the coroutine.
///
/// This initialization is modeled by the evaluation of the operand
/// followed by a call to one of:
///   <promise>.return_value(<operand>)
///   <promise>.return_void()
/// which we name the "promise call".
class CoreturnStmt : public Stmt {
  SourceLocation CoreturnLoc;

  enum SubStmt { Operand, PromiseCall, Count };
  Stmt *SubStmts[SubStmt::Count];

  bool IsImplicit : 1;

  friend class ASTStmtReader;
public:
  CoreturnStmt(SourceLocation CoreturnLoc, Stmt *Operand, Stmt *PromiseCall,
               bool IsImplicit = false)
      : Stmt(CoreturnStmtClass), CoreturnLoc(CoreturnLoc),
        IsImplicit(IsImplicit) {
    SubStmts[SubStmt::Operand] = Operand;
    SubStmts[SubStmt::PromiseCall] = PromiseCall;
  }

  CoreturnStmt(EmptyShell) : CoreturnStmt({}, {}, {}) {}

  SourceLocation getKeywordLoc() const { return CoreturnLoc; }

  /// Retrieve the operand of the 'co_return' statement. Will be nullptr
  /// if none was specified.
  Expr *getOperand() const { return static_cast<Expr*>(SubStmts[Operand]); }

  /// Retrieve the promise call that results from this 'co_return'
  /// statement. Will be nullptr if either the coroutine has not yet been
  /// finalized or the coroutine has no eventual return type.
  Expr *getPromiseCall() const {
    return static_cast<Expr*>(SubStmts[PromiseCall]);
  }

  bool isImplicit() const { return IsImplicit; }
  void setIsImplicit(bool value = true) { IsImplicit = value; }

  SourceLocation getBeginLoc() const LLVM_READONLY { return CoreturnLoc; }
  SourceLocation getEndLoc() const LLVM_READONLY {
    return getOperand() ? getOperand()->getEndLoc() : getBeginLoc();
  }

  child_range children() {
    if (!getOperand())
      return child_range(SubStmts + SubStmt::PromiseCall,
                         SubStmts + SubStmt::Count);
    return child_range(SubStmts, SubStmts + SubStmt::Count);
  }

  const_child_range children() const {
    if (!getOperand())
      return const_child_range(SubStmts + SubStmt::PromiseCall,
                               SubStmts + SubStmt::Count);
    return const_child_range(SubStmts, SubStmts + SubStmt::Count);
  }

  static bool classof(const Stmt *T) {
    return T->getStmtClass() == CoreturnStmtClass;
  }
};

}  // end namespace clang

#endif


text:
set -euo pipefail
IFS=$'\n\t'

 create_config_file() {
    read -e -p "Enter your s3 target (e.g https://xyz.com:8082): " MY_TARGET
    read -ep "Enter the S3 Access Id: "  AWS_ACCESS_KEY_ID
    read -ep "Enter the S3 Secret Key: " AWS_SECRET_ACCESS_KEY
    read -ep "Enter IP Address of the master: " HOST_IP_ADDR

    echo "All your details are being saved in file .cosbench_ng"

    echo >> .cosbench_ng
    chmod +x .cosbench_ng

    echo "#New Configuration: `date`" >> .cosbench_ng
    echo "export MY_TARGET=$MY_TARGET"  >> .cosbench_ng
    echo "export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID"  >> .cosbench_ng
    echo "export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY"  >> .cosbench_ng
    echo "export HOST_IP_ADDR=$HOST_IP_ADDR"  >> .cosbench_ng

 }

print_help() {
   echo "First $0 --configure : Configure your environment"
   echo "then  $0 --help      : Help. Note, the endpoint option (-e) is not required"
   echo "This is a script that runs the underlying docker container"
}

if [ $# -eq 0 ]; then
   print_help
   exit 1
elif [ "$1" == "--configure" ]; then
   create_config_file
   exit 0
elif [ ! -f ./.cosbench_ng ]; then
   print_help
   exit 1
fi

. ./.cosbench_ng

if [ -z ${HOST_IP_ADDR} ]; then
    echo "HOST_IP_ADDR needs to be set";
    echo "run: $0 --configure to configure your environment first"
    exit 1
fi

if [ -z ${AWS_ACCESS_KEY_ID} ]; then
    echo "AWS_ACCESS_KEY_ID needs to be set";
    echo "run: $0 --configure to configure your environment first"
    exit 1
fi

if [ -z ${AWS_SECRET_ACCESS_KEY} ]; then
    echo "AWS_SECRET_ACCESS_KEY needs to be set";
    echo "run: $0 --configure to configure your environment first"
    exit 1
fi

if [ -z ${MY_TARGET} ]; then
    echo "MY_TARGET needs to be set";
    echo "run: $0 --configure to configure your environment first"
    exit 1
fi

echo "Using AWS_ACCESS_KEY_ID     : $AWS_ACCESS_KEY_ID";
echo "Using AWS_SECRET_ACCESS_KEY : ${AWS_SECRET_ACCESS_KEY:0:1}***********";
echo "Using MY_TARGET             : $MY_TARGET";
echo "Using HOST_IP_ADDR          : $HOST_IP_ADDR";

# -Daeron.* are to reduce aeron memory footprint so we can deploy more slaves. Not required if the host machines have more RAM
docker run --shm-size 2g -v /tmp:/tmp -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e HOST_IP_ADDR -p 25521:25521/udp vardhanv/cosbench_ng:0.9 -Daeron.ipc.term.buffer.length=33554432 -Daeron.term.buffer.length=8388608 -e $MY_TARGET "$@"


text:
namespace Google.Cloud.VMMigration.V1.Snippets
{
    // [START vmmigration_v1_generated_VmMigration_CancelCutoverJob_async_flattened_resourceNames]
    using Google.Cloud.VMMigration.V1;
    using Google.LongRunning;
    using System.Threading.Tasks;

    public sealed partial class GeneratedVmMigrationClientSnippets
    {
        /// <summary>Snippet for CancelCutoverJobAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated and should be regarded as a code template only.
        /// It will require modifications to work:
        /// - It may require correct/in-range values for request initialization.
        /// - It may require specifying regional endpoints when creating the service client as shown in
        ///   https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
        /// </remarks>
        public async Task CancelCutoverJobResourceNamesAsync()
        {
            // Create client
            VmMigrationClient vmMigrationClient = await VmMigrationClient.CreateAsync();
            // Initialize request argument(s)
            CutoverJobName name = CutoverJobName.FromProjectLocationSourceMigratingVmCutoverJob("[PROJECT]", "[LOCATION]", "[SOURCE]", "[MIGRATING_VM]", "[CUTOVER_JOB]");
            // Make the request
            Operation<CancelCutoverJobResponse, OperationMetadata> response = await vmMigrationClient.CancelCutoverJobAsync(name);

            // Poll until the returned long-running operation is complete
            Operation<CancelCutoverJobResponse, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
            // Retrieve the operation result
            CancelCutoverJobResponse result = completedResponse.Result;

            // Or get the name of the operation
            string operationName = response.Name;
            // This name can be stored, then the long-running operation retrieved later by name
            Operation<CancelCutoverJobResponse, OperationMetadata> retrievedResponse = await vmMigrationClient.PollOnceCancelCutoverJobAsync(operationName);
            // Check if the retrieved long-running operation has completed
            if (retrievedResponse.IsCompleted)
            {
                // If it has completed, then access the result
                CancelCutoverJobResponse retrievedResult = retrievedResponse.Result;
            }
        }
    }
    // [END vmmigration_v1_generated_VmMigration_CancelCutoverJob_async_flattened_resourceNames]
}


text:
#pragma once
#include <aws/iotsitewise/IoTSiteWise_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>

namespace Aws
{
namespace Utils
{
namespace Json
{
  class JsonValue;
  class JsonView;
} // namespace Json
} // namespace Utils
namespace IoTSiteWise
{
namespace Model
{

  /**
   *
You've reached the limit for the number of tags allowed for a resource. For
   * more information, see Tag
   * naming limits and requirements in the Amazon Web Services General
   * Reference.

See Also:
   AWS
   * API Reference

   */
  class AWS_IOTSITEWISE_API TooManyTagsException
  {
  public:
    TooManyTagsException();
    TooManyTagsException(Aws::Utils::Json::JsonView jsonValue);
    TooManyTagsException& operator=(Aws::Utils::Json::JsonView jsonValue);
    Aws::Utils::Json::JsonValue Jsonize() const;

    inline const Aws::String& GetMessage() const{ return m_message; }

    inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }

    inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; }

    inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = std::move(value); }

    inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); }

    inline TooManyTagsException& WithMessage(const Aws::String& value) { SetMessage(value); return *this;}

    inline TooManyTagsException& WithMessage(Aws::String&& value) { SetMessage(std::move(value)); return *this;}

    inline TooManyTagsException& WithMessage(const char* value) { SetMessage(value); return *this;}

    /**
     *
The name of the resource with too many tags.

     */
    inline const Aws::String& GetResourceName() const{ return m_resourceName; }

    /**
     *
The name of the resource with too many tags.

     */
    inline bool ResourceNameHasBeenSet() const { return m_resourceNameHasBeenSet; }

    /**
     *
The name of the resource with too many tags.

     */
    inline void SetResourceName(const Aws::String& value) { m_resourceNameHasBeenSet = true; m_resourceName = value; }

    /**
     *
The name of the resource with too many tags.

     */
    inline void SetResourceName(Aws::String&& value) { m_resourceNameHasBeenSet = true; m_resourceName = std::move(value); }

    /**
     *
The name of the resource with too many tags.

     */
    inline void SetResourceName(const char* value) { m_resourceNameHasBeenSet = true; m_resourceName.assign(value); }

    /**
     *
The name of the resource with too many tags.

     */
    inline TooManyTagsException& WithResourceName(const Aws::String& value) { SetResourceName(value); return *this;}

    /**
     *
The name of the resource with too many tags.

     */
    inline TooManyTagsException& WithResourceName(Aws::String&& value) { SetResourceName(std::move(value)); return *this;}

    /**
     *
The name of the resource with too many tags.

     */
    inline TooManyTagsException& WithResourceName(const char* value) { SetResourceName(value); return *this;}

  private:

    Aws::String m_message;
    bool m_messageHasBeenSet = false;

    Aws::String m_resourceName;
    bool m_resourceNameHasBeenSet = false;
  };

} // namespace Model
} // namespace IoTSiteWise
} // namespace Aws


text:
/*! Generated by Font Squirrel (https://www.fontsquirrel.com) on October 5, 2017 */

@font-face {
    font-family: 'dosisbold';
    src: url('dosis-bold-webfont.woff2') format('woff2'),
         url('dosis-bold-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: 'dosisextrabold';
    src: url('dosis-extrabold-webfont.woff2') format('woff2'),
         url('dosis-extrabold-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: 'dosisextralight';
    src: url('dosis-extralight-webfont.woff2') format('woff2'),
         url('dosis-extralight-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: 'dosislight';
    src: url('dosis-light-webfont.woff2') format('woff2'),
         url('dosis-light-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: 'dosismedium';
    src: url('dosis-medium-webfont.woff2') format('woff2'),
         url('dosis-medium-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: 'dosisregular';
    src: url('dosis-regular-webfont.woff2') format('woff2'),
         url('dosis-regular-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: 'dosissemibold';
    src: url('dosis-semibold-webfont.woff2') format('woff2'),
         url('dosis-semibold-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;

}


text:
<?php

namespace Contentinum\View\Helper;

use Zend\View\Helper\AbstractHelper;

abstract class AbstractContentHelper extends AbstractHelper
{
    const VIEW_LAYOUT_KEY = 'contribution';
    /**
     *
     * @var string
     */
    protected $layoutKey;

    /**
     *
     * @var array
     */
    protected $convertparams;

    /**
     *
     * @var array
     */
    protected $properties = array();

    protected function getLayoutKey()
    {
        if (null === $this->layoutKey){
            $this->layoutKey = $this->view->htmllayouts[$this->view->templateKey]->layoutkey;
        }
        return $this->layoutKey;
    }

    /**
     * @return the $convertparams
     */
    public function getConvertparams()
    {
        return $this->convertparams;
    }

	/**
     * @param multitype: $convertparams
     */
    public function setConvertparams($convertparams)
    {
            if (strlen($convertparams) > 4) {
            $mcSerialize = new \ContentinumComponents\Tools\HandleSerializeDatabase();
            $this->convertparams = $mcSerialize->execUnserialize($convertparams);
        } else {
            $this->convertparams = array();
        }
    }

	/**
     *
     * @param unknown $prop
     * @return boolean
     */
    protected function getProperty($prop)
    {
        if ( isset($this->properties[$prop]) ){
            return $this->{$prop};
        } else {
            return false;
        }
    }

    /**
     *
     * @param unknown $prop
     * @param unknown $value
     * @return unknown|boolean
     */
    protected function setProperty($prop, $value)
    {
        if ( isset($this->properties[$prop]) ){
            return $this->{$prop} = $value;
        } else {
            return false;
        }
    }

    /**
     *
     */
    protected function unsetProperties()
    {
        foreach ($this->properties as $prop) {
            $this->{$prop} = null;
        }
    }

    /**
     *
     * @param unknown $prop
     * @param unknown $key
     * @param unknown $value
     * @return boolean
     */
    protected function setTemplateProperty($prop, $key, $value)
    {
        if (isset($this->{$prop}[$key])) {
            $this->{$prop}[$key] = $value;
        } else {
            return false;
        }
    }

    /**
     *
     * @param unknown $prop
     * @param unknown $key
     * @return boolean
     */
    protected function getTemplateProperty($prop, $key)
    {
        if (isset($this->{$prop}[$key])) {
            return $this->{$prop}[$key];
        } else {
            return false;
        }
    }

    /**
     *
     * @param unknown $template
     */
    protected function setTemplate($template)
    {
        if (null !== $template) {
            foreach ($template as $key => $values) {
                if (in_array($key, $this->properties)) {
                    $this->{$key} = $values;
                }
            }
        }
    }

    /**
     * Get template as array
     * @return multitype:NULL
     */
    protected function getTemplate()
    {
        $template = array();
        foreach ($this->properties as $key){
            $template['key'] = $this->{$key};
        }
        return $template;
    }

    /**
     * Format a content row
     * @param unknown $pattern
     * @param unknown $content
     * @param string $beforeGrid
     */
    /**
     * Format a content row
     * @param unknown $pattern
     * @param unknown $content
     * @param string $beforeGrid
     */
    protected function deployRow($pattern, $content, $beforeGrid = '')
    {
        $html = '';
        if (null !== $pattern){
            if (! is_array($pattern)){
                $pattern = $pattern->toArray();
            }
            $html .= $beforeGrid;
            if (isset($pattern['grid'])){
                if (isset($pattern['grid']['format'])){
                    $content = $this->formatContent($pattern['grid']['format'], $content);
                }

                $attr = array();

                if (isset($pattern['grid']['attr']) && !empty($pattern['grid']['attr'])){
                    $attr = $pattern['grid']['attr'];
                    if ( isset($pattern['grid']['label']) ){
                        if ('content' == $pattern['grid']['label']){
                            $href = '';
                        }
                    } else {
                        $href = $content;
                    }
                    $attr = $this->deployAttrHref($attr, $href);
                }
                $before = '';
                $after = '';
                if (isset($pattern['grid']['content:after'])){
                    $after = $pattern['grid']['content:after'];
                }
                if (isset($pattern['grid']['content:before'])){
                    $before = $pattern['grid']['content:before'];
                }
                $html .= $this->view->contentelement($pattern['grid']['element'],$before . $content . $after ,$attr);
                if (isset($pattern['grid']['content:after:outside'])){
                    $html .= $pattern['grid']['content:after:outside'];
                }

            }

            if (isset($pattern['row'])){
                $attr = array();
                if (isset($pattern['row']['attr']) && !empty($pattern['row']['attr'])){
                    $attr = $pattern['row']['attr'];
                }
                $before = '';
                $after = '';
                if (isset($pattern['row']['content:after'])){
                    $after = $pattern['row']['content:after'];
                }
                if (isset($pattern['row']['content:before'])){
                    $before = $pattern['row']['content:before'];
                }
                $html = $this->view->contentelement($pattern['row']['element'],$before . $html. $after,$attr);
                if (isset($pattern['row']['content:after:outside'])){
                    $html .= $pattern['row']['content:after:outside'];
                }
            }
        }
        return $html;
    }

    /**
     * Register javascript files
     * @param array $files
     */
    protected function deployFiles($files)
    {
        foreach ($files as $index => $file){
            $this->view->inlinescript()->offsetSetFile($index,$file);
        }
    }

    /**
     * Configure href attribute set link
     * @param array $attr
     * @param string $content
     * @return string
     */
    protected function deployAttrHref($attr, $content)
    {
        if (isset($attr['href'])){
            $attr['href'] = $attr['href'] . $content;
        }
        return $attr;
    }

    /**
     * format or filter content
     * @param unknown $format
     * @param unknown $content
     * @return unknown
     */
    protected function formatContent($format, $content)
    {
        if (isset($format['dateFormat'])) {
            switch ($format['dateFormat']['attr']) {
                case 'FULL':
                default:
                    $content = $this->view->datetimeformat($content,'FULL');
                    break;
            }
        }

        return $content;
    }

    /**
     * Check if a value is contained
     * @param array $array
     * @param string|number $index
     * @return string|boolean
     */
    protected function hasValue($array, $index)
    {
        if (isset($array[$index]) && null != $array[$index]) {
            return $array[$index];
        } else {
            return false;
        }
    }

}


text:
/**
 * This file contains all necessary Angular controller definitions for 'frontend.admin.login-history' module.
 *
 * Note that this file should only contain controllers and nothing else.
 */
(function () {
  'use strict';

  angular.module('frontend.plugins')
    .service('PluginsService', [
      '$log', '$state', '$http', 'BackendConfig',
      function ($log, $state, $http, BackendConfig) {

        return {

          load: function (query) {
            return $http.get('kong/plugins', {
              params: query
            });
          },

          add: function (data) {
            // Delete unset config fields
            return $http.post('kong/plugins', data);
          },

          update: function (id, data) {
            return $http.patch('kong/plugins/' + id, data);
          },

          fetch: function (pluginId) {
            return $http.get('kong/plugins/' + pluginId);
          },

          schema: function (name) {
            return $http.get('kong/plugins/schema/' + name);
          },

          enabled: function () {
            return $http.get('kong/plugins/enabled');
          },

          delete: function (id) {
            return $http.delete('kong/plugins/' + id);
          }
        }
      }
    ])
  ;
}());


text:
(function () {
    function GeocoderFieldWrap(html, _id, geocoder, translations, params) {
        this.html = html;
        this.geocoder = geocoder;
        this.translations = translations;
        this.params = params;
    }

    GeocoderFieldWrap.prototype.render = function (
        placeholder,
        name,
        id,
        initialState
    ) {
        var html = this.html.replace(/__NAME__/g, name).replace(/__ID__/g, id);
        placeholder.outerHTML = html;

        var fieldByGeocoder = {
            nominatim: NominatimGeocoderField,
            google_maps: GoogleMapsGeocoderField,
            mapbox: MapboxGeocoderField,
        };

        var Field = fieldByGeocoder[this.geocoder];

        var geocoderField = new Field({
            id: id,
            translations: this.translations,
            params: this.params,
        });
        geocoderField.setState(initialState);
        return geocoderField;
    };

    window.telepath.register(
        "wagtailgewidget.widgets.GeocoderFieldWrap",
        GeocoderFieldWrap
    );
})();


text:
// 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
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
 * @fileoverview Application desktop for a sprint.ly product.
 *
 * @author kyawtun@yathit.com (Kyaw Tun)
 */

/**
 * Sprint.ly product workspace.
 * @constructor
 */
app.Workspace = function(product) {
  /**
   * Current product.
   * @type {sprintly.Product}
   * @protected
   */
  this.product = product;

  /**
   * @protected
   * @type {HTMLElement}
   */
  this.root = document.createElement('div');

  this.toolbar = new app.ui.Toolbar();

  var item = new app.model.Entity(product.Item);
  var people = new app.model.Entity(product.People);
  var itemList = new sprintly.EntityList(product, sprintly.Entity.ITEM);
  var peopleList = new sprintly.EntityList(product, sprintly.Entity.PEOPLE);

  this.pages = [
    new app.ui.page.Search(),
    new app.ui.page.TicketMatrix(),
    new app.ui.page.Entity(item, new app.ui.page.ItemRenderer()),
    new app.ui.page.Entity(people, new app.ui.page.PeopleRenderer()),
    new app.ui.page.EntityList(itemList, new app.ui.page.ItemListRenderer()),
    new app.ui.page.EntityList(peopleList, new app.ui.page.PeopleListRenderer())
  ];

};

/**
 * Render desktop.
 * @param {Element} el
 */
app.Workspace.prototype.render = function(el) {
  el.appendChild(this.root);
  this.toolbar.render(this.root);
  for (var i = 0; i < this.pages.length; i++) {
    this.pages[i].render(this.root);
  }

  var me = this;
  window.addEventListener('hashchange', function(e) {
    me.route(location.hash);
  });

  this.route(location.hash);
};

/**
 * Switch to a page.
 * @param {string} name page name.
 * @param {string} id query parameter.
 * @param {Object} filter query parameter.
 * @return {boolean}
 */
app.Workspace.prototype.switchPage = function(name, id, filter) {
  var ok = false;
  var pageName = id ? name : name + '-list';
  for (var i = 0; i < this.pages.length; i++) {
    var page = this.pages[i];
    var show = page.name == pageName;
    if (show) {
      ok = true;
      if (pageName == 'items-list') {
        this.toolbar.updateHash('items', location.hash);
      }
      googleAnalytics('send', 'pageView', pageName);
    }
    page.setShown(show, id, filter);
  }
  return ok;
};

app.Workspace.prototype.goHome = function() {
  location.hash = 'items';
};

/**
 * @param {string} hash
 */
app.Workspace.prototype.route = function(hash) {
  var m = hash.match(/^#([^(\/|@)]+)\/?([^@]*)@?(.*)/);
  if (m) {
    var filter = {};
    if (m[3]) {
      try {
        filter = JSON.parse(m[3]);
      } catch (e) {
        filter = {};
      }
    }
    var ok = this.switchPage(m[1], m[2], filter);
  } else {
    console.log('unknwon hash ' + hash);
    this.goHome();
  }
};


text:
/* for backwards compatibility */
#warning "please include ble/common/FunctionPointerWithContext.h directly"
#include "ble/common/FunctionPointerWithContext.h"


text:
title: "Rhinoceros"
playwright: "Eugène Ionesco"
period: Spring
season: "In House"
season_sort: 410
date_start: 2015-06-10
date_end: 2015-06-13
venue: New Theatre

cast:
  - role: Berenger
    name: Eoin Buckley
  - role: Jean
    name: Jake Leonard
  - role: Daisy
    name: Penny Bainbridge
  - role: Mr Papillon
    name: Joe Hincks
  - role: Dudard
    name: Max Miller
  - role: Botard
    name: Omid Faramarzi
  - role: Logician
    name: Emma Kendall
  - role: Little Old Man / Grocer
    name: Tom Tolond
  - role: Old Gentleman
    name: Bernie Kerr
  - role: Little Old Woman
    name: Niamh Caines
  - role: Mrs Bouef / The Housewife
    name: Lou Knapp
  - role: Cafe Proprietor / Fireman
    name: Daniella Finch

crew:
  - role: Director
    name: Chris Trueman
  - role: Producer
    name: Molly McGee
  - role: Assistant Director
    name: Daniel Stranks
  - role: Technical Director
    name: Sam Osborne
  - role: Technical Director
    name: Joanne Blunt
  - role: Lighting Designer
    name: Sam Osborne
  - role: Lighting Designer
    name: Joanne Blunt
  - role: Set Construction
    name: Joseph Heil
  - role: Poster Designer
    name: Max Miller
  - role: Artwork
    name: Felix Taylor
  - role: Technical Operator
    name: Daniel O'Connor
  - role: Technical Operator
    name: Emma Fearon
  - role: Stage Manager
    name: Ollie Shortt
  - role: Stage Manager
    name: Olivia Rose French
  - role: Stage Manager
    name: Tom Proffitt
  - role: Stage Manager
    name: Beth Wilson
  - role: Stage Manager
    name: Jessica Millott
  - role: Stage Manager
    name: Rachel Connolly
  - role: Stage Manager
    name: Matt Standen
  - role: Stage Manager
    name: Darcey Graham

assets:
  - type: poster
    image: r8xWsHz
  - type: poster
    image: SVhSc3c
  - type: poster
    image: Lg2x2Cm
  - type: backstage
    video: HGWNzQB
    title: Backstage At

links:
  - type: Review
    href: http://kevcastletheatrereviews.blogspot.co.uk/2015/06/rhinoceros-by-eugene-ionesco-at-new.html
    snapshot: M5pwF
    publisher: Kev Castle Reviews
    title: "\"Rhinoceros\" by Eugene Ionesco"
    date: 2015-06-10
    quote: "Some lovely comic touches in the script, well performed by the major as well as the lesser characters."
  - type: Review
    href: https://impactnottingham.com/2015/06/rhinoceros-nnt/
    snapshot: HoVhn
    publisher: Impact Nottingham
    author: Amy Wilcockson
    title: "Rhinoceros @ NNT"
    date: 2015-06-11
    rating: 8/10
    quote: "This satirical, seemingly nonsensical play at times, was overall a great performance to watch."

prod_shots: Tz3wCC
---

Written by one of the founding fathers of the 'the Theatre of the Absurd' / 'Rhinoceros' follows Berenger / a disenfranchised and disillusioned anti-hero / as he refuses to change whilst the rest of the characters turn into rhinoceroses. A dark / dystopian / satirical phase / 'Rhinoceros' is fundamentally a play about conformity and the cult of opinion. However / the play touches on many ideas / such as the meaningless of language / the ridiculousness of everyday convention and alienation. This chilling representation of humanity attacks the arrogance of our everyday moral convictions.


text:
package potaufeu;

import static org.junit.Assert.*;
import static potaufeu.FileAttributeFormatter.*;
import java.io.*;
import java.nio.file.*;
import java.nio.file.attribute.*;
import java.util.function.*;
import org.junit.*;
import org.junit.rules.*;

public final class FileAttributeFormatterTest {

    @Rule
    public TemporaryFolder tmpFolder = new TemporaryFolder();

    private File file;
    private Path path;

    @Before
    public void createFile() throws IOException {
        this.file = tmpFolder.newFile("test.txt");
        this.path = file.toPath();
    }

    @Test
    public void testNameFile() {
        assertEquals("test.txt", name(file));
    }

    @Test
    public void testNamePath() {
        assertEquals("test.txt", name(path));
    }

    @Test
    public void testToLongLambda() {
        assertEquals(Long.valueOf(file.lastModified()), toLongLambda("mtime").apply(path));
    }

    @Test
    public void testSizeFile() {
        assertEquals(file.length(), size(file));
    }

    @Test
    public void testSizePath() {
        assertEquals(file.length(), size(path));
    }

    @Test
    public void testCtimeFile() {
        assertEquals(readBasicAttributes(path).creationTime().toMillis(), ctime(file));
    }

    @Test
    public void testCtimePath() {
        assertEquals(readBasicAttributes(path).creationTime().toMillis(), ctime(path));
    }

    @Test
    public void testMtimeFile() {
        assertEquals(file.lastModified(), mtime(file));
    }

    @Test
    public void testMtimePath() {
        assertEquals(file.lastModified(), mtime(path));
    }

    @Test
    public void testAtimeFile() {
        assertEquals(readBasicAttributes(path).lastAccessTime().toMillis(), atime(file));
    }

    @Test
    public void testAtimePath() {
        assertEquals(readBasicAttributes(path).lastAccessTime().toMillis(), atime(path));
    }

    @Test
    public void testGetEntryTypePath() {
        assertEquals('-', entryType(path));
    }

    @SuppressWarnings("deprecation")
    @Test
    public void testGetEntryTypeBasicFileAttributes() {
        assertEquals('-', getEntryType(readBasicAttributes(path)));
    }

    @Test
    public void testFormattedPermission() {
        FileAttributeFormatter o = new FileAttributeFormatter(path);
        _assertThat(o.formattedPermissions(), x -> x.matches("[r-][w-][x-][r-][w-][x-][r-][w-][x-]"));
    }

    @Test
    public void testFormatPermissionsAsBools() {
        assertEquals("---------", formatPermissionsAsBools(false, false, false));
        assertEquals("r--r--r--", formatPermissionsAsBools(true, false, false));
        assertEquals("-w--w----", formatPermissionsAsBools(false, true, false));
        assertEquals("rw-rw-r--", formatPermissionsAsBools(true, true, false));
        assertEquals("--x--x--x", formatPermissionsAsBools(false, false, true));
        assertEquals("r-xr-xr-x", formatPermissionsAsBools(true, false, true));
        assertEquals("-wx-wx--x", formatPermissionsAsBools(false, true, true));
        assertEquals("rwxrwxr-x", formatPermissionsAsBools(true, true, true));
    }

    @Test
    public void testGetAclSign() {
        _assertThat(aclSign(path), x -> x == '+' || x == ' ');
    }

    @Ignore // environment‐dependent
    @Test
    public void testNLink() {
        FileAttributeFormatter o = new FileAttributeFormatter(path);
        assertEquals("1", o.nLink());
        assertEquals("1", o.nLink());
    }

    @Test
    public void testGetOwnerString() {
        _assertThat(ownerString(path, readBasicAttributes(path)), x -> x.length() > 0);
    }

    @Test
    public void testReadBasicAttributes() {
        assertTrue(readBasicAttributes(path) instanceof BasicFileAttributes);
    }

    static <T> void _assertThat(T actual, Predicate<T> matcher) {
        assertTrue("actual[" + actual + "] does not match", matcher.test(actual));
    }

}


text:
package querybuilder

import "github.com/dtylman/gowd"

type Builder struct {
	*gowd.Element
}

func NewBuilder() *Builder {
	b := new(Builder)
	b.Element = gowd.NewElement("div")
	b.AddElement(newRow().Element)
	return b
}


text:
package org.chiswicked.tomcat.tools;

import org.apache.catalina.Context;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.LifecycleState;
import org.apache.catalina.Valve;
import org.apache.catalina.servlets.DefaultServlet;
import org.apache.catalina.startup.Tomcat;
import org.chiswicked.valverine.Valverine;

import javax.servlet.Servlet;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.ProtocolException;
import java.net.URL;

/**
 * Embedded Tomcat
 */
public final class EmbeddedTomcat {
    private static final String TEMP_DIR = System.getProperty("java.io.tmpdir");
    private Tomcat tomcat;
    private String urlString;
    private URL url;

    /**
     *
Initialises server instance with default servlet

     *
     * @throws Exception
     */
    public EmbeddedTomcat()
            throws Exception {
        this(new EmbeddedTestServlet());
    }

    /**
     *
Initialises server instance with given servlet. Default valves are used

     *
     * @param servlet Servlet to initialise tomcat with
     * @throws Exception
     */
    public EmbeddedTomcat(Servlet servlet)
            throws Exception {
        initialize(servlet, null);
    }

    /**
     *
Initialises server instance with given valve (chained to default pipeline). Default servlet is used

     *
     * @param valve Valve to initialise tomcat with
     * @throws Exception
     */
    public EmbeddedTomcat(Valve valve)
            throws Exception {
        initialize(new EmbeddedTestServlet(), valve);
    }

    /**
     *
Initialises server instance with given servlet and valve

     *
     * @param servlet Servlet to initialise tomcat with
     * @throws Exception
     */
    public EmbeddedTomcat(Servlet servlet, Valve valve)
            throws Exception {
        initialize(servlet, valve);
    }

    /**
     * Start server instance
     *
     * @throws org.apache.catalina.LifecycleException
     */
    public void start()
            throws LifecycleException {
        tomcat.init();
        tomcat.start();

        urlString = "http://localhost:" + getPort() + "/";

        try {
            url = new URL(urlString);
        } catch (MalformedURLException e) {
            tomcat.getEngine().getLogger().fatal("Embedded Tomcat instance failed to load. Invalid URL: " + urlString);
        }

        tomcat.getEngine().getLogger().info("Listening on " + urlString);
    }

    /**
     * Shut down server instance
     *
     * @throws LifecycleException
     */
    public void stop()
            throws LifecycleException {
        if (tomcat.getServer() != null
                && tomcat.getServer().getState() != LifecycleState.DESTROYED) {
            if (tomcat.getServer().getState() != LifecycleState.STOPPED) {
                tomcat.stop();
            }
            tomcat.destroy();
        }
    }

    /**
     * Adds a custom valve to the Engine's pipeline
     *
     * @param valve Valve to add to the pipeline
     */
    public void addValvetoEngine(Valve valve) {
        tomcat.getEngine().getPipeline().addValve(valve);
    }

    /**
     * Sends a GET request to the server
     *
     * @return Server response
     * @throws Exception
     */
    public HttpResponse sendGet()
            throws Exception {
        // TODO Implement more user-friendly error handling mechanism
        return this.sendMethod(HttpMethod.GET, 0);
    }

    /**
     * Sends a GET request to the server
     *
     * @param timeout Request timeout
     * @return Server response
     * @throws Exception
     */
    public HttpResponse sendGet(int timeout)
            throws Exception {
        // TODO Implement more user-friendly error handling mechanism
        return this.sendMethod(HttpMethod.GET, timeout);
    }

    /**
     * Sends a POST request to the server
     *
     * @return Server response
     * @throws Exception
     */
    public HttpResponse sendPost()
            throws Exception {
        // TODO Implement more user-friendly error handling mechanism
        return this.sendMethod(HttpMethod.POST, 0);
    }

    /**
     * Sends a POST request to the server
     *
     * @param timeout Request timeout
     * @return Server response
     * @throws Exception
     */
    public HttpResponse sendPost(int timeout)
            throws Exception {
        // TODO Implement more user-friendly error handling mechanism
        return this.sendMethod(HttpMethod.POST, timeout);
    }

    /**
     * Sends a HEAD request to the server
     *
     * @return Server response
     * @throws Exception
     */
    public HttpResponse sendHead()
            throws Exception {
        // TODO Implement more user-friendly error handling mechanism
        return this.sendMethod(HttpMethod.HEAD, 0);
    }

    /**
     * Sends a HEAD request to the server
     *
     * @param timeout Request timeout
     * @return Server response
     * @throws Exception
     */
    public HttpResponse sendHead(int timeout)
            throws Exception {
        // TODO Implement more user-friendly error handling mechanism
        return this.sendMethod(HttpMethod.HEAD, timeout);
    }

    /**
     * Sends a OPTIONS request to the server
     *
     * @return Server response
     * @throws Exception
     */
    public HttpResponse sendOptions()
            throws Exception {
        // TODO Implement more user-friendly error handling mechanism
        return this.sendMethod(HttpMethod.OPTIONS, 0);
    }

    /**
     * Sends a OPTIONS request to the server
     *
     * @param timeout Request timeout
     * @return Server response
     * @throws Exception
     */
    public HttpResponse sendOptions(int timeout)
            throws Exception {
        // TODO Implement more user-friendly error handling mechanism
        return this.sendMethod(HttpMethod.OPTIONS, timeout);
    }

    /**
     * Sends a PUT request to the server
     *
     * @return Server response
     * @throws Exception
     */
    public HttpResponse sendPut()
            throws Exception {
        // TODO Implement more user-friendly error handling mechanism
        return this.sendMethod(HttpMethod.PUT, 0);
    }

    /**
     * Sends a PUT request to the server
     *
     * @param timeout Request timeout
     * @return Server response
     * @throws Exception
     */
    public HttpResponse sendPut(int timeout)
            throws Exception {
        // TODO Implement more user-friendly error handling mechanism
        return this.sendMethod(HttpMethod.PUT, timeout);
    }

    /**
     * Sends a DELETE request to the server
     *
     * @return Server response
     * @throws Exception
     */
    public HttpResponse sendDelete()
            throws Exception {
        // TODO Implement more user-friendly error handling mechanism
        return this.sendMethod(HttpMethod.DELETE, 0);
    }

    /**
     * Sends a DELETE request to the server
     *
     * @param timeout Request timeout
     * @return Server response
     * @throws Exception
     */
    public HttpResponse sendDelete(int timeout)
            throws Exception {
        // TODO Implement more user-friendly error handling mechanism
        return this.sendMethod(HttpMethod.DELETE, timeout);
    }

    /**
     * Sends a TRACE request to the server
     *
     * @return Server response
     * @throws Exception
     */
    public HttpResponse sendTrace()
            throws Exception {
        // TODO Implement more user-friendly error handling mechanism
        return this.sendMethod(HttpMethod.TRACE, 0);
    }

    /**
     * Sends a TRACE request to the server
     *
     * @param timeout Request timeout
     * @return Server response
     * @throws Exception
     */
    public HttpResponse sendTrace(int timeout)
            throws Exception {
        // TODO Implement more user-friendly error handling mechanism
        return this.sendMethod(HttpMethod.TRACE, timeout);
    }

    private HttpResponse sendMethod(String method, int timeout) throws IOException {
        // TODO Implement more user-friendly error handling mechanism

        // Set up connection to tomcat test instance
        HttpURLConnection connection = (HttpURLConnection) url.openConnection();

        connection.setUseCaches(false);
        connection.setReadTimeout(timeout);

        try {
            connection.setRequestMethod(method);
        } catch (ProtocolException pe) {
            try {
                connection.setRequestMethod(HttpMethod.GET);
            } catch (ProtocolException peg) {
                tomcat.getEngine().getLogger().error(peg.getMessage());
                // TODO Possibly we want to terminate processing here
            }
        }

        // Send request and read response
        BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));

        HttpHeader header = new HttpHeader(connection.getHeaderFields());

        String inputLine;
        StringBuilder response = new StringBuilder();

        while ((inputLine = in.readLine()) != null) {
            response.append(inputLine);
        }
        in.close();

        return new HttpResponse(header, response.toString());
    }

    private void initialize(Servlet servlet, Valve valve) {
        // Init tomcat
        tomcat = new Tomcat();
        tomcat.setPort(0);
        tomcat.setBaseDir(TEMP_DIR);
        tomcat.getHost().setAppBase(TEMP_DIR);

        // Init servlet
        File docBase = new File(TEMP_DIR);
        Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
        Tomcat.addServlet(ctx, "test", servlet);
        ctx.addServletMapping("/*", "test");
    }

    /**
     * Returns the TCP port allocated to the server upon initialisation
     *
     * @return Port allocated to tomcat instance upon initialisation
     * @throws org.apache.catalina.LifecycleException
     */
    private int getPort() throws LifecycleException {
        int port = tomcat.getConnector().getLocalPort();
        if (port <= 0) {
            throw new LifecycleException("Cannot retrieve local port before the server is started");
        }

        return port;
    }

    /**
     * Embedded servlet for default setup
     */
    private static class EmbeddedTestServlet extends DefaultServlet {

        /**
         *
Default Servlet to initialise #EmbeddedTomcat with if no constructor argument is specified

         *
In the HTTP response header, it returns the request method and the requestor's remote address in {@code plain/text}

         *

         *
{@code Valverine-Method: POST}

         *
{@code Valverine-Processed: 234}

         *

         *
In the HTTP response body, it returns fully qualified name of Valverine e.g {@code Valverine/1.0}

         *
         * @param req HTTP request
         * @param res HTTP response
         * @throws ServletException
         * @throws IOException
         */
        private void doMethod(HttpServletRequest req, HttpServletResponse res)
                throws ServletException, IOException {

//          DEBUGGING
/*
            Enumeration<String> reqheaderNames = req.getHeaderNames();

            Collection<String> resheaderNames = res.getHeaderNames();

            System.out.println("REQUEST");
            for (; reqheaderNames.hasMoreElements(); ) {
                Object o = reqheaderNames.nextElement();
                System.out.println(o + ": " + req.getHeader(String.valueOf(o)));
            }

            System.out.println("RESPONSE");
            for (String headerName : resheaderNames) {
                System.out.println(headerName + "> " + res.getHeader(headerName));
            }
*/

            long processingTime = -1;

            //Calculate processing time (time now - when the request was first intercepted by a valve/filter)
            try {
                processingTime = System.currentTimeMillis() - Long.parseLong(req.getHeader(Valverine.HTTP_HEADER_RECEIVED));
            } catch (NumberFormatException nfe) {
                getServletContext().log("Missing or illegal value [" + Valverine.HTTP_HEADER_RECEIVED + ": " + req.getHeader(Valverine.HTTP_HEADER_RECEIVED) + "]");
            }

            ServletOutputStream out = res.getOutputStream();

            res.setHeader(Valverine.HTTP_HEADER_METHOD, req.getMethod());

            if (processingTime > -2) {
                res.setHeader(Valverine.HTTP_HEADER_PROCESSED, String.valueOf(processingTime));
            }

            out.write((Valverine.FULL_NAME + "\n").getBytes());
            out.flush();
            out.close();
        }

        @Override
        protected void doGet(HttpServletRequest req, HttpServletResponse res)
                throws ServletException, IOException {
            doMethod(req, res);
        }

        @Override
        protected void doPost(HttpServletRequest req, HttpServletResponse res)
                throws ServletException, IOException {
            doMethod(req, res);
        }

        @Override
        protected void doPut(HttpServletRequest req, HttpServletResponse res)
                throws ServletException, IOException {
            doMethod(req, res);
        }

        @Override
        protected void doDelete(HttpServletRequest req, HttpServletResponse res)
                throws ServletException, IOException {
            doMethod(req, res);
        }

        @Override
        protected void doHead(HttpServletRequest req, HttpServletResponse res)
                throws ServletException, IOException {
            doMethod(req, res);
        }

        @Override
        protected void doOptions(HttpServletRequest req, HttpServletResponse res)
                throws ServletException, IOException {
            doMethod(req, res);
        }

        @Override
        protected void doTrace(HttpServletRequest req, HttpServletResponse res)
                throws ServletException, IOException {
            doMethod(req, res);
        }
    }
}