text:
angular.module("exambazaar").controller("showCoachingController",
[ '$scope','$rootScope', 'coachingService','thisProvider','$state','$stateParams', '$cookies','thisStream','thisExam', '$document', function($scope,$rootScope, coachingService,thisProvider,$state,$stateParams, $cookies,thisStream,thisExam,$document){
    $scope.hideLoginDialog();
    $scope.category = thisStream.data;
    $scope.subcategory = thisExam.data;
    $scope.city = $stateParams.cityName;
    $scope.editable = false;
    if($cookies.getObject('sessionuser')){
        var user = $cookies.getObject('sessionuser');
        if(user.userType=='Master'){
            $scope.editable = true;
        }
    }
    $scope.components = [
        /*'Overview',*/
        'Contact',
        'Results',
        'Courses',
        'Photos',
        'Videos',
        'Faculty',
        'Location'
    ];
    $scope.provider = thisProvider.data;

    if($scope.provider.pincode){
        $scope.provider.mapAddress = $scope.provider.name + ', ' + $scope.provider.address + ' ' +
        $scope.provider.city + ' ' +
        $scope.provider.pincode;
    }else{
        $scope.provider.mapAddress = $scope.provider.name + ', ' + $scope.provider.address + ' ' + $scope.provider.city;
    }
    $scope.exams = $scope.provider.exams;

    $scope.streamIds=[];
    $scope.streams=[];
    $scope.exams.forEach(function(thisExam, index){
        if($scope.streamIds.indexOf(thisExam.stream._id)==-1){
            $scope.streamIds.push(thisExam.stream._id);
            $scope.streams.push(thisExam.stream);
        }
    });

    $scope.overviewIcons = [
        {
            icon:'images/icons/centre.png',
            text:'Centres',
            data: '1'
        },
        {
            icon:'images/icons/city.png',
            text:'Cities',
            data: '1'
        },
        {
            icon:'images/icons/students.png',
            text:'Students',
            data: '100'
        },
        {
            icon:'images/icons/faculty.png',
            text:'Faculty',
            data: '10'
        }
    ];

    $scope.showMap = false;
    $scope.flipMap = function(){
          $scope.showMap = !$scope.showMap;
    };

    $rootScope.pageTitle = $scope.provider.name + ": " + $scope.subcategory.displayname + " preparation in " + $scope.city;

}]);


text:
package eu.yals.test.pageobjects.external;

/**
 * Page object for page https://sõnaveeb.ee
 *
 * @since 2.5
 */
@SuppressWarnings("SpellCheckingInspection")
public class SonaveebEe {
    public static final String TITLE_TEXT = "Sõnaveeb";
}

redpajama_set_name: RedPajamaGithub


text:
package org.microbule.spring.container;

import java.util.LinkedList;
import java.util.List;

import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;

import org.microbule.container.api.MicrobuleContainer;
import org.microbule.container.api.ServerDefinition;
import org.microbule.container.api.ServerListener;

@Named("collector")
@Singleton
public class Collector {
//----------------------------------------------------------------------------------------------------------------------
// Fields
//----------------------------------------------------------------------------------------------------------------------

    private final List<MyPlugin> plugins;
    private final List<ServerDefinition> serverDefinitions = new LinkedList<>();

//----------------------------------------------------------------------------------------------------------------------
// Constructors
//----------------------------------------------------------------------------------------------------------------------

    @Inject
    public Collector(MicrobuleContainer container) {
        this.plugins = container.pluginList(MyPlugin.class);
        container.addServerListener(new ServerListener() {
            @Override
            public void registerServer(ServerDefinition serverDefinition) {
                serverDefinitions.add(serverDefinition);
            }

            @Override
            public void unregisterServer(String id) {
                serverDefinitions.removeIf(def -> id.equals(def.id()));
            }
        });
    }

//----------------------------------------------------------------------------------------------------------------------
// Getter/Setter Methods
//----------------------------------------------------------------------------------------------------------------------

    public List<MyPlugin> getPlugins() {
        return plugins;
    }

    public List<ServerDefinition> getServerDefinitions() {
        return serverDefinitions;
    }
}


text:
namespace syncer {
namespace syncable {

typedef std::set<int64_t> MetahandleSet;

}  // namespace syncable
}  // namespace syncer

#endif  // SYNC_SYNCABLE_METAHANDLE_SET_H_


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title><no title> — Fabric 1.8 documentation</title>

    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />

    <link rel="top" title="Fabric 1.8 documentation" href="../index.html" />

Navigation

          index

          modules |

Fabric 1.8 documentation »

Fabric は Python のライブラリで、アプリケーションのデプロイメントや
システム管理タスクのための SSH の利用を合理化するためのコマンドライン
ツールです。

It provides a basic suite of operations for executing local or remote shell
commands (normally or via <tt class="docutils literal">sudo</tt>) and uploading/downloading files, as well as
auxiliary functionality such as prompting the running user for input, or
aborting execution.

Typical use involves creating a Python module containing one or more functions,
then executing them via the <tt class="docutils literal">fab</tt> command-line tool. Below is a small but
complete “fabfile” containing a single task:

from fabric.api import run

def host_type():
    run('uname -s')

Once a task is defined, it may be run on one or more servers, like so:

$ fab -H localhost,linuxbox host_type
[localhost] run: uname -s
[localhost] out: Darwin
[linuxbox] run: uname -s
[linuxbox] out: Linux

Done.
Disconnecting from localhost... done.
Disconnecting from linuxbox... done.

In addition to use via the <tt class="docutils literal">fab</tt> tool, Fabric’s components may be imported
into other Python code, providing a Pythonic interface to the SSH protocol
suite at a higher level than that provided by e.g. the <tt class="docutils literal">Paramiko</tt> library
(which Fabric itself uses.)

Project Versions

1.8.0

1.7.0

1.6.2

1.6.1

1.6.0

1.5.4

1.5.3

1.5.2

1.5.1

1.5.0

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>

    Enter search terms or a module, class or function name.

Navigation

          index

          modules |

Fabric 1.8 documentation »

        © Copyright 2013, Christian Vest Hansen and Jeffrey E. Forcier.
      Created using Sphinx 1.2.


text:
package core;

import java.util.List;

public class BPNet {
	private class UnitSet{
		double[] hiddenUnits;
		double[] outputUnits;
	}

	public static TrainingWeight trainingWeight;
	private int inputSize,hiddenSize,outputSize;
	private double stepLength;
	public BPNet(int inputSize,int hiddenSize, int outputSize,double stepLength){
		trainingWeight = new TrainingWeight(inputSize, hiddenSize, outputSize);
		this.inputSize = inputSize;
		this.hiddenSize = hiddenSize;
		this.outputSize = outputSize;
		this.stepLength = stepLength;
	}

	public double[] getResult(TrainingItem trainItem){
		return computeUnits(trainItem).outputUnits;
	}
	public static int getMaxIndex(double[] outputUnits){
		int maxR = -1;
		double max=-Double.MIN_VALUE;
		for(int i=0;i<outputUnits.length;i++)
			if(outputUnits[i]>max){
				maxR = i;
				max = outputUnits[i];
			}

		return maxR;
	}

	public void trainingSet(List<TrainingItem> trainSet){
			for (TrainingItem item:trainSet) {
				UnitSet units = computeUnits(item);
				adjustUnits(item,units);
			}
	}
	private UnitSet computeUnits(TrainingItem trainItem) {
		double[] hiddenUnits = new double[hiddenSize];
		double[] outputUnits = new double[outputSize];

		for (int i = 0; i < hiddenSize; i++) {
			double tmpSum = 0;
			for (int j = 0; j < inputSize; j++)
				tmpSum += trainingWeight.firstLayerWeights[j][i]
						* trainItem.input[j];
			hiddenUnits[i] = 1 / (1 + Math.pow(Math.E, -1 * tmpSum));
		}

		for (int i = 0; i < outputSize; i++) {
			double tmpSum = 0;
			for (int j = 0; j < hiddenSize; j++)
				tmpSum += trainingWeight.secondLayerWeights[j][i] * hiddenUnits[j];
			outputUnits[i] = 1 / (1 + Math.pow(Math.E, -1 * tmpSum));
		}

		UnitSet units = new UnitSet();
		units.hiddenUnits = hiddenUnits;
		units.outputUnits = outputUnits;
		return units;
	}
	private void adjustUnits(TrainingItem trainItem,UnitSet unit) {
		double[][] deltaWeightP = new double[this.hiddenSize][this.outputSize];

		for (int j = 0; j < hiddenSize; j++)
			for (int i = 0; i < outputSize; i++) {
				deltaWeightP[j][i] = (trainItem.output[i] - unit.outputUnits[i])
						* unit.outputUnits[i] * (1 - unit.outputUnits[i])
						* trainingWeight.secondLayerWeights[j][i];

				trainingWeight.secondLayerWeights[j][i] += stepLength
						* (trainItem.output[i] - unit.outputUnits[i]) * unit.outputUnits[i]
						* (1 - unit.outputUnits[i]) * unit.hiddenUnits[j];
			}

		double tmpSum = 0;
		for (int k = 0; k < inputSize; k++)
			for (int j = 0; j < hiddenSize; j++) {
				tmpSum = 0;
				for (int i = 0; i < outputSize; i++) {
					tmpSum += deltaWeightP[j][i];
				}
				trainingWeight.firstLayerWeights[k][j] += stepLength * unit.hiddenUnits[j]
						* (1 - unit.hiddenUnits[j])
						* trainItem.input[k] * tmpSum;
			}
	}

}


text:
'use strict';

var lib = require('./common.js');

//////

var table = document.getElementById('item_table_body');

var rows = [];

lib.runApp(function(pageSet, allRows){
    // simulate updating model with server results, after a scroll
    pageSet.forEach(function(row){
        writeRow(row);
    });
});

function writeRow(row) {
    var tr = document.createElement('tr');
    tr.innerHTML =
        "" + row.rowNum + "	"
        + " 	"
        + "" + row.artist + "	"
        + "" + row.album + "	";
    table.appendChild(tr);
}


text:
package com.thesett.aima.logic.fol;

/**
 *

CRC Card

 *
 Responsibilities
 *
 Visit a predicate.
 *

 *
 * @author Rupert Smith
 */
public interface PredicateVisitor extends TermVisitor
{
    /**
     * Visits a predicate.
     *
     * @param predicate The predicate to visit.
     */
    void visit(Predicate predicate);
}


text:
{% block head_title %}OAuth error{% endblock %}

{% block breadcrumbs %}

Account

OAuth

Error

{% endblock %}

{% block body %}

        Oops! Something went wrong with your OAuth credentials.

        You can try logging in again.

{% endblock %}


text:
/* global exports, require */
'use strict';
var roomRegistry = require('./../mdb/roomRegistry');
var serviceRegistry = require('./../mdb/serviceRegistry');
var cloudHandler = require('../cloudHandler');

// Logger
var log = require('../../common/logger')('RoomsResource');

/*
 * Gets the service for the proccess of the request.
 */
var doInit = function (roomId, callback) {
    var currentService = require('./../auth/nuveAuthenticator').service;
    if (!roomId) {
        callback(currentService);
        return;
    }
    serviceRegistry.getRoomForService(roomId, currentService, function (room) {
        callback(currentService, room);
    });
};

/*
 * Post Room. Creates a new room for a determined service.
 */
exports.createRoom = function (req, res) {
    doInit(null, function (service) {
        if (service === undefined) {
            return res.status(404).send('Service not found');
        }
        if (req.body.name === undefined) {
            log.info('Invalid room');
            return res.status(404).send('Invalid room');
        }

        req.body.options = req.body.options || {};

        var room = {name: req.body.name};
        if (req.body.options.p2p) {
            room.p2p = true;
        }
        if (req.body.options.data) {
            room.data = req.body.options.data;
        }
        roomRegistry.addRoom(room, function (err, result) {
            if (err) {
                return res.status(500).send(err);
            }
            service.rooms.push(result);
            serviceRegistry.updateService(service);
            log.info('Room created:', req.body.name, 'for service', service.name, 'p2p = ', room.p2p);
            res.send(result);
        });
    });
};

/*
 * Get Rooms. Represent a list of rooms for a determined service.
 */
exports.getList = function (req, res) {
    doInit(null, function (service) {
        if (service === undefined) {
            return res.status(404).send('Service not found');
        }
        log.info('Representing rooms for service', service._id);
        res.send(service.rooms);
    });
};

/*
 * Get Room. Represents a determined room.
 */
exports.represent = function (req, res) {
    doInit(req.params.room, function (service, room) {
        if (service === undefined) {
            res.status(401).send('Client unathorized');
        } else if (room === undefined) {
            log.info('Room', req.params.room, 'does not exist');
            res.status(404).send('Room does not exist');
        } else {
            log.info('Representing room', room._id, 'of service', service._id);
            res.send(room);
        }
    });
};

/*
 * Delete Room. Removes a determined room from the data base and asks cloudHandler to remove it from erizoController.
 */
exports.deleteRoom = function (req, res) {
    doInit(req.params.room, function (service, room) {
        if (service === undefined) {
            res.status(401).send('Client unathorized');
        } else if (room === undefined) {
            log.info('Room', req.params.room, 'does not exist');
            res.status(404).send('Room does not exist');
        } else {
            var array = service.rooms,
                index = -1;

            var id = '' + room._id;
            roomRegistry.removeRoom(id, function (err) {
                if (err) {
                    return res.status(500).send(err);
                }
                for (var i = 0; i < array.length; i += 1) {
                    if (array[i]._id === room._id) {
                        index = i;
                        break;
                    }
                }
                if (index !== -1) {
                    service.rooms.splice(index, 1);
                    serviceRegistry.updateService(service);
                    log.info('Room', id, 'deleted for service', service._id);
                    cloudHandler.deleteRoom(id, function () {});
                    res.send('Room deleted');
                }
            });
        }
    });
};


text:
class Timer
{
  public:
    Timer()
    :start_(std::chrono::high_resolution_clock::now())
    {

    }

     ~Timer()
    {
        const auto finish = std::chrono::high_resolution_clock::now();

        std::cout << std::chrono::duration_cast <
            std::chrono::microseconds >
            (finish - start_).count() << " us" << std::endl;

    }

  private:
    const std::chrono::high_resolution_clock::time_point start_;

};


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Mycologia 72(3): 630 (1980)

#### Original name
Agaricochaete indica Natarajan & Raman, 1980

### Remarks
null


text:
Router.configure({
    layoutTemplate: 'layout',
    loadingTemplate: 'loading',
    notFoundTemplate: 'redirect',
    trackPageView: true
});

Router.onBeforeAction('loading');
Router.onBeforeAction('dataNotFound', {only: 'case'});

Router._filters = {
    resetScroll: function () {
        var scrollTo = window.currentScroll || 0;
        $('body').scrollTop(scrollTo);
    }
};

var filters = Router._filters;

Router.onAfterAction(filters.resetScroll);


text:
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1 = require("@angular/core");
var http_1 = require("@angular/http");
var ResaService = (function () {
    function ResaService(http) {
        this.http = http;
    }
    ResaService.prototype.reserveVoyage = function (vol, hotel, lastname, firstname) {
        var queryString = "?hotelId=" + hotel.id + "&volId=" + vol.id + "&nom=" + lastname + "&prenom=" + firstname;
        return this.http.get("http://localhost:53046/api/reserve" + queryString);
    };
    return ResaService;
}());
ResaService = __decorate([
    core_1.Injectable(),
    __metadata("design:paramtypes", [http_1.Http])
], ResaService);
exports.ResaService = ResaService;
//# sourceMappingURL=resa.service.js.map


text:
<Record name="sh_uom_t" type="delimited">
  <Field name="itm_uom_cd"                      type="string"     nullable="true"  trim="false" delimiter="|"  />
  <Field name="obj_id"                          type="string"     nullable="true"  trim="false" delimiter="|"  />
  <Field name="ver_nbr"                         type="numeric"    nullable="true"  trim="false" delimiter="|"  />
  <Field name="itm_uom_desc"                    type="string"     nullable="true"  trim="false" delimiter="|"  />
  <Field name="dobj_maint_cd_actv_ind"          type="string"     nullable="true"  trim="false" delimiter="|\r\n" />
</Record>


text:
INSERT INTO SECURITY_RULE_COMPANY
(SECURITY_RULE_ID,
 COMPANY_ID)
  SELECT
    s.SECURITY_RULE_ID,
    s.COMPANY_ID
  FROM
    SALE_POINT s
  WHERE
    s.SECURITY_RULE_ID IS NOT NULL
    AND s.COMPANY_ID NOT IN (SELECT c.COMPANY_ID
                             FROM
                               SECURITY_RULE_COMPANY c
                             WHERE
                               s.SECURITY_RULE_ID = c.SECURITY_RULE_ID);

INSERT INTO SECURITY_RULE_COMPANY
(SECURITY_RULE_ID,
 COMPANY_ID)
  SELECT
    cl.SECURITY_RULE_ID,
    s.COMPANY_ID
  FROM
    LEGAL_ENTITY s JOIN CLIENT cl ON s.ID = cl.ID
  WHERE
    cl.SECURITY_RULE_ID IS NOT NULL
    AND s.COMPANY_ID NOT IN (SELECT c.COMPANY_ID
                             FROM
                               SECURITY_RULE_COMPANY c
                             WHERE
                               cl.SECURITY_RULE_ID = c.SECURITY_RULE_ID);

INSERT INTO SECURITY_RULE_COMPANY
(SECURITY_RULE_ID,
 COMPANY_ID)
  SELECT
    s.SECURITY_RULE_ID,
    s.COMPANY_ID
  FROM
    EMPLOYEE s
  WHERE
    s.SECURITY_RULE_ID IS NOT NULL
    AND s.COMPANY_ID NOT IN (SELECT c.COMPANY_ID
                             FROM
                               SECURITY_RULE_COMPANY c
                             WHERE
                               s.SECURITY_RULE_ID = c.SECURITY_RULE_ID);


text:
/*
 * WULF (http://networks.nokia.com/)
 * Copyright (C) 2015 Nokia Solutions and Networks. All rights Reserved.
 */
.n-splitter {
  border-radius: 6px;
  border: 1px solid #d8d8d8;
}
.n-splitter .jqx-fill-state-normal {
  border: 1px solid #d8d8d8;
}
.n-splitter .jqx-fill-state-normal:hover {
  border: 1px solid #d8d8d8;
}
.n-splitter .jqx-fill-state-pressed {
  background: transparent;
  border: 1px solid transparent;
}
.n-splitter .jqx-fill-state-pressed:hover {
  border: 1px solid #00A1CC;
}
.n-splitter .jqx-widget-content {
  font-family: "Nokia Pure", Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #333333;
}
.n-splitter .jqx-splitter-splitbar-vertical {
  width: 6px !important;
}
.n-splitter .jqx-splitter-splitbar-vertical:after {
  top: 45%;
  font-family: "Icons", Helvetica, Arial, sans-serif;
  position: relative;
  display: inline-block;
  margin-left: -0.34em;
  color: #666666;
  content: "\e955";
  font-size: large;
}
.n-splitter .jqx-splitter-splitbar-horizontal {
  height: 6px !important;
}
.n-splitter .jqx-splitter-splitbar-horizontal:after {
  left: 45%;
  font-family: "Icons", Helvetica, Arial, sans-serif;
  position: relative;
  display: inline-block;
  vertical-align: top;
  margin-top: -0.435em;
  color: #666666;
  content: "\e954";
  font-size: large;
}
.n-splitter .jqx-splitter-collapse-button-vertical {
  height: 24px !important;
  width: 6px !important;
  left: -1px !important;
  border-radius: 4px;
}
.n-splitter .jqx-splitter-collapse-button-vertical:after {
  font-family: "Icons", Helvetica, Arial, sans-serif;
  position: relative;
  display: inline-block;
  margin-left: -0.34em;
  margin-top: 0.04em;
  color: #666666;
  content: "\e955";
  font-size: large;
}
.n-splitter .jqx-splitter-collapse-button-horizontal {
  width: 24px !important;
  height: 6px !important;
  top: -1px !important;
  border-radius: 4px;
}
.n-splitter .jqx-splitter-collapse-button-horizontal:after {
  font-family: "Icons", Helvetica, Arial, sans-serif;
  position: relative;
  display: inline-block;
  vertical-align: top;
  margin-left: 0.16em;
  margin-top: -0.435em;
  color: #666666;
  content: "\e954";
  font-size: large;
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.DynamicData;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ClientSystem {
    public partial class DefaultEntityTemplate : System.Web.DynamicData.EntityTemplateUserControl {
        private MetaColumn currentColumn;

        protected override void OnLoad(EventArgs e) {
            foreach (MetaColumn column in Table.GetScaffoldColumns(Mode, ContainerType)) {
                currentColumn = column;
                Control item = new _NamingContainer();
                EntityTemplate1.ItemTemplate.InstantiateIn(item);
                EntityTemplate1.Controls.Add(item);
            }
        }

        protected void Label_Init(object sender, EventArgs e) {
            Label label = (Label)sender;
            label.Text = currentColumn.DisplayName;
        }

        protected void DynamicControl_Init(object sender, EventArgs e) {
            DynamicControl dynamicControl = (DynamicControl)sender;
            dynamicControl.DataField = currentColumn.Name;
        }

        public class _NamingContainer : Control, INamingContainer { }

    }
}


text:
package cn.shield.checkin.net;

/**
 * * * * * * * * * * * * * * * * * * * * * * *
 * Created by lixin
 * Date: 16/2/18
 * * * * * * * * * * * * * * * * * * * * * * *
 **/

import java.util.concurrent.TimeUnit;

import io.reactivex.Observable;
import io.reactivex.ObservableSource;
import io.reactivex.functions.Function;

/**
 * 封装了RxJava的RetryWhen()
 */
public class ObservableRetryWhenProcess implements Function<Observable<Throwable>, ObservableSource<?>> {

//    public static final String ERROR_404 = "retrofit2.adapter.rxjava.HttpException: HTTP 404 Not Found";

    private long mInterval;
    private int mCount;
    public Throwable mThrowable;

    public ObservableRetryWhenProcess(long interval) {
        this(interval, 3);
    }

    public ObservableRetryWhenProcess(long interval, int count) {
        this(interval, count, true);
    }

    public ObservableRetryWhenProcess(long interval, int count, boolean isSecond) {
        mInterval = isSecond ? interval * 1000 : interval;
        mCount = count + 1;
    }

    @Override
    public ObservableSource<?> apply(Observable<Throwable> errors) throws Exception {
        return errors.flatMap(throwable1 -> {
            mThrowable = throwable1;
            return errors;
        }).zipWith(Observable.range(1, mCount), (throwable, i) -> i)
                .flatMap(retryCount -> {
                    if (retryCount == mCount && mThrowable != null) {
                        return Observable.error(mThrowable);
                    }
                    return Observable.timer(mInterval, TimeUnit.MILLISECONDS);
                });
    }
}


text:
class RemoveTags < ActiveRecord::Migration
  def change
    drop_table :projects_tags
    drop_table :tags
  end
end


text:
class UsersController < ApplicationController
  include GinaAuthentication::Users
end


text:
namespace Microsoft.Azure.Management.Network.Fluent
{
    using Microsoft.Rest;
    using Microsoft.Rest.Azure;
    using Models;
    using System.Threading;
    using System.Threading.Tasks;

    /// <summary>
    /// Extension methods for LoadBalancerProbesOperations.
    /// </summary>
    public static partial class LoadBalancerProbesOperationsExtensions
    {
            /// <summary>
            /// Gets all the load balancer probes.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group.
            /// </param>
            /// <param name='loadBalancerName'>
            /// The name of the load balancer.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<IPage<ProbeInner>> ListAsync(this ILoadBalancerProbesOperations operations, string resourceGroupName, string loadBalancerName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, loadBalancerName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Gets load balancer probe.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group.
            /// </param>
            /// <param name='loadBalancerName'>
            /// The name of the load balancer.
            /// </param>
            /// <param name='probeName'>
            /// The name of the probe.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<ProbeInner> GetAsync(this ILoadBalancerProbesOperations operations, string resourceGroupName, string loadBalancerName, string probeName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, loadBalancerName, probeName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Gets all the load balancer probes.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='nextPageLink'>
            /// The NextLink from the previous successful call to List operation.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<IPage<ProbeInner>> ListNextAsync(this ILoadBalancerProbesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

    }
}


text:
import React, { PropTypes } from 'react'
import { Link } from 'react-router'
import CSSModules from 'react-css-modules'
import styles from './GalleryThumb.css'
import Author from './Author'
import Date from './Date'
import Location from './Location'
import ResponsiveImage from './ResponsiveImage'

function GalleryThumb ({ gallery }) {
  console.log(gallery.fields.makeAndModel.fields.file.url, 'gallery');
    return (
        //

        //
Search Box

        //

        <Link to={`/gallery/${gallery.sys.id}`} styleName="c-galleryThumb__imageContainer">
          <ResponsiveImage src={ gallery.fields.makeAndModel.fields.file.url } alt={ `Open Gallery ${gallery.sys.id}` }/>
        </Link>

VEHICLE:
  { gallery.fields.makeAndModel.fields.title }

SEEN AT:
{ gallery.fields.seenWhere }

DETAILS:
  { gallery.fields.details }

          {/*

            <Author author={ gallery.fields.details }></Author>

 */}

          { renderTags(gallery) }

            <Date entry={ gallery.fields.date } />
            <Location entry={ gallery.fields.location } />

        {/* <Link to={`/gallery/${gallery.sys.id}`} className="o-btnPrimary">
Take Closer Look
</Link> */}

  )
}

function renderTags (gallery) {
  if (gallery.fields.tags) {
    return (

      {
        gallery.fields.tags.map(
          (entry, index) => (
{ entry }
)
        )
      }

    )
  }
}

// &&&&&&&&&&&&&&&&&&&&&&& FILTERED GALLERY &&&&&&&&&&&&&&&&&&&&&&&
var FilterList = React.createClass({

  render: function() {
    console.log(gallery.fields.makeAndModel.fields.file.url, 'gallery')

    var self = this;
    console.log(this, 'this');
    var filters = this.props.map(function (gallery, index) {
      return (
        <button key={gallery + index} onClick={function () { self.props.changeFilterBy(gallery) }}>{gallery}</button>
      );
    });

    return (

        {filters}

    );
  }
});

 // handleFiltering: function () {
 //   if (this.state.filterBy) {
 //     var filteredData = this.props.GalleryThumb.filter((gallery, index) => {
 //       if (String(gallery[this.state.filterBy]).toLowerCase().includes(this.state.filterText.toLowerCase())) {
 //         return FilterList
 //       }
 //     });
// var FilteredList = React.createClass({
//   filterList: function(gallery){
//     console.log(gallery.fields.makeAndModel.fields.file.url, 'gallery');
//
//
//     var updatedList = this.state.initialItems;
//     updatedList = updatedList.filter(function(item){
//       return item.toLowerCase().search(
//         event.target.value.toLowerCase()) !== -1;
//     });
//     this.setState({items: updatedList});
//   },
//   getInitialState: function(gallery){
//
//      return {
//        initialItems: [
//        "Ford",
//        "Chevy",
//        "Dodge",
//        "Hummer",
//        "Land Rover",
//        "Jeep",
//        "Isuzu",
//        "International",
//        "Toyota",
//        "Nissan",
//        "Randge Rover",
//        "Fuqi",
//      ],
//        items: [updatedList]
//      }
//   },
//
//   componentWillMount: function(){
//     this.setState({items: this.state.initialItems})
//   },
//   render: function(){
//     return (
//       //

//       //   <input type="text" placeholder="Search" onChange={this.filterList}/>
//       // <List items={this.state.items}/>
//       //

//

//       {
//         updatedList.map(
//           (entry, index) => (
{ entry }
)
//         )
//       }
//

//     );
//   }
// });
//
// var List = React.createClass({
//   render: function(){
//     return (
//

//       {
//         updatedList.map((entry, index) => {
//           return (
//

//

//                 <Link to={`/gallery/${gallery.sys.id}/image/${gallery.fields.makeAndModel.fields.file.url}`} >
//                   <ResponsiveImage src={ gallery.fields.makeAndModel.fields.file.url } alt={`Open Gallery ${gallery.sys.id}`} />
//                 </Link>
//
{ gallery.fields.makeAndModel.fields.title }

//

//

VEHICLE:
{ gallery.fields.makeAndModel.fields.title }

//

SEEN AT:
{ gallery.fields.seenWhere }

//

DETAILS:
  { gallery.fields.details }

//

//
//           )
//         })
//         // this.props.items.map(function(item) {
//         //   return
{item}

//         // })
//        }
//

//     )
//   }
// });

// React.render(<FilteredList/>, document.getElementById('c-galleryThumb'));

// &&&&&&&&&&&&&&&&&&&&&&& FILTERED GALLERY &&&&&&&&&&&&&&&&&&&&&&&

GalleryThumb.propTypes = { gallery: PropTypes.object }

export default CSSModules(GalleryThumb, styles)


text:
package com.adobe.acs.commons.packaging.impl;

import com.adobe.acs.commons.packaging.PackageHelper;
import com.day.jcr.vault.packaging.JcrPackage;
import com.day.jcr.vault.packaging.JcrPackageManager;
import com.day.jcr.vault.packaging.Version;
import org.apache.sling.api.resource.PersistenceException;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ValueMap;
import org.apache.sling.api.wrappers.ValueMapDecorator;
import org.apache.sling.commons.json.JSONObject;
import org.apache.sling.commons.testing.sling.MockResource;
import org.apache.sling.commons.testing.sling.MockResourceResolver;
import org.apache.sling.commons.testing.sling.MockSlingHttpServletRequest;
import org.apache.sling.commons.testing.sling.MockSlingHttpServletResponse;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Spy;
import org.mockito.runners.MockitoJUnitRunner;

import javax.jcr.Session;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;

import static org.junit.Assert.assertEquals;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.when;

@RunWith(MockitoJUnitRunner.class)
public class QueryPackagerServletImplTest {

    static final String CONTENT_RESOURCE_PATH = "/etc/acs-commons/packages/query-packager-test/jcr:content";
    static final String CONTENT_RESOURCE_TYPE = "acs-commons/components/utilities/packager/query-packager";

    SuccessMockResourceResolver resourceResolver = new SuccessMockResourceResolver();
    ErrorMockResourceResolver errorResourceResolver = new ErrorMockResourceResolver();

    @Spy
    MockResource contentResource = new MockResource(resourceResolver, CONTENT_RESOURCE_PATH, CONTENT_RESOURCE_TYPE);

    @Spy
    MockResource configurationResource = new MockResource(resourceResolver,
            CONTENT_RESOURCE_PATH + "/configuration", "");

    @Mock
    PackageHelper packageHelper;

    @Mock
    JcrPackage jcrPackage;

    @Mock
    Session session;

    @InjectMocks
    QueryPackagerServletImpl queryPackagerServlet;

    @SuppressWarnings("unchecked")
    @Before
    public void setUp() throws Exception {

        Map<String, Object> map = new HashMap<String, Object>();

        map.put("includePatterns", new String[]{});
        map.put("conflictResolution", "IncrementVersion");

        ValueMap properties = new ValueMapDecorator(map);

        doReturn(properties).when(configurationResource).adaptTo(ValueMap.class);

        resourceResolver.addResource(contentResource);
        resourceResolver.addResource(configurationResource);

        /* PackageHelper Mocks */
        when(packageHelper.getNextVersion(any(JcrPackageManager.class), any(String.class), any(String.class),
                any(String.class))).thenReturn(Version.create("1.8.0"));

        when(packageHelper.createPackage(any(Set.class), any(Session.class), any(String.class),
                any(String.class), any(String.class), any(PackageHelper.ConflictResolution.class),
                any(Map.class))).thenReturn(jcrPackage);

        when(packageHelper.getSuccessJSON(any(JcrPackage.class))).thenReturn("{\"status\": \"success\"}");
        when(packageHelper.getErrorJSON(any(String.class))).thenReturn("{\"status\": \"error\"}");
        when(packageHelper.getPreviewJSON(any(Collection.class))).thenReturn("{\"status\": \"preview\"}");
    }

    @Test
    public void testDoPost_success() throws Exception {
        final String resourcePath = "/etc/acs-commons/packages/query-packager-test/jcr:content";
        final String selectors = "package";
        final String extension = "json";
        final String suffix = "";
        final String queryString = "";

        MockSlingHttpServletRequest request = new MockSlingHttpServletRequest(resourcePath, selectors,
                extension, suffix, queryString);
        request.setResourceResolver(resourceResolver);
        request.setMethod("POST");

        MockSlingHttpServletResponse response = new MockSlingHttpServletResponse();

        request.setResourceResolver(resourceResolver);
        request.setResource(contentResource);

        queryPackagerServlet.doPost(request, response);

        final JSONObject actual = new JSONObject(response.getOutput().toString());
        assertEquals("success", actual.optString("status", "error"));
    }

    @Test
    public void testDoPost_preview() throws Exception {
        final String resourcePath = "/etc/acs-commons/packages/query-packager-test/jcr:content";
        final String selectors = "package";
        final String extension = "json";
        final String suffix = "";
        final String queryString = "";

        PreviewMockSlingHttpServletRequest request = new PreviewMockSlingHttpServletRequest(resourcePath, selectors,
                extension, suffix, queryString);
        request.setMethod("POST");

        MockSlingHttpServletResponse response = new MockSlingHttpServletResponse();

        request.setResourceResolver(resourceResolver);
        request.setResource(contentResource);

        queryPackagerServlet.doPost(request, response);
        String tmp = response.getOutput().toString();
        final JSONObject actual = new JSONObject(tmp);

        assertEquals("preview", actual.optString("status", "error"));
    }

    @Test
    public void testDoPost_error() throws Exception {
        final String resourcePath = "/etc/acs-commons/packages/query-packager-test/jcr:content";
        final String selectors = "package";
        final String extension = "json";
        final String suffix = "";
        final String queryString = "";

        MockSlingHttpServletRequest request = new MockSlingHttpServletRequest(resourcePath, selectors,
                extension, suffix, queryString);
        request.setResourceResolver(errorResourceResolver);
        request.setMethod("POST");

        MockSlingHttpServletResponse response = new MockSlingHttpServletResponse();

        request.setResourceResolver(errorResourceResolver);
        request.setResource(contentResource);

        queryPackagerServlet.doPost(request, response);

        final JSONObject actual = new JSONObject(response.getOutput().toString());
        assertEquals("error", actual.optString("status", "success"));
    }

    private class SuccessMockResourceResolver extends MockResourceResolver {
        final List<Resource> results;

        public SuccessMockResourceResolver() {
            super();

            results = new LinkedList<Resource>();
            results.add(new MockResource(this, "/content/one", ""));
            results.add(new MockResource(this, "/content/two", ""));
            results.add(new MockResource(this, "/content/three", ""));

            for(Resource resource : results) {
                this.addResource(resource);
            }
        }

        @Override
        public Iterable<Resource> getChildren(final Resource resource) {
            return null;
        }

        public Iterator<Resource> findResources(String query, String language) {
            return this.results.iterator();
        }

        @Override
        public void delete(final Resource resource) throws PersistenceException {

        }

        @Override
        public Resource create(final Resource resource, final String s, final Map<String, Object> stringObjectMap) throws PersistenceException {
            return null;
        }

        @Override
        public void revert() {

        }

        @Override
        public void commit() throws PersistenceException {

        }

        @Override
        public boolean hasChanges() {
            return false;
        }

        @SuppressWarnings("unchecked")
        public <AdapterType> AdapterType adaptTo(Class<AdapterType> type) {
            return (AdapterType) session;
        }
    }

    private class ErrorMockResourceResolver extends MockResourceResolver {
        final List<Resource> results;

        public ErrorMockResourceResolver() {
            super();

            results = new LinkedList<Resource>();

        }

        @Override
        public Iterable<Resource> getChildren(final Resource resource) {
            return null;
        }

        public Iterator<Resource> findResources(String query, String language) {
            return this.results.iterator();
        }

        @Override
        public void delete(final Resource resource) throws PersistenceException {

        }

        @Override
        public Resource create(final Resource resource, final String s, final Map<String, Object> stringObjectMap) throws PersistenceException {
            return null;
        }

        @Override
        public void revert() {

        }

        @Override
        public void commit() throws PersistenceException {

        }

        @Override
        public boolean hasChanges() {
            return false;
        }

        @SuppressWarnings("unchecked")
        public <AdapterType> AdapterType adaptTo(Class<AdapterType> type) {
            return (AdapterType) session;
        }
    }

    private class PreviewMockSlingHttpServletRequest extends MockSlingHttpServletRequest {

        public PreviewMockSlingHttpServletRequest(final String resourcePath, final String selectors, final String extension, final String suffix, final String queryString) {
            super(resourcePath, selectors, extension, suffix, queryString);
        }

        public String getParameter(String name) {
            if("preview".equals(name)) {
                return "true";
            } else {
                return null;
            }
        }
    }

}


text:
module.exports = function(config) {
  config.set({
    browsers: ['Chrome'],
    frameworks: ['qunit'],
    files: [
      'tests/*.js'
    ],
    singleRun: true,
    reporters: ['progress', 'junit'],
    junitReporter: {
      outputFile: 'test-results/results.js.xml'
    }
  });
};


text:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--

 Copyright 2003 - 2020 The eFaps Team

 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.

-->
<ui-command xmlns="http://www.efaps.org/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.efaps.org/xsd http://www.efaps.org/xsd/eFaps_1.0.xsd">
    <uuid>6c709860-73ec-447a-b06d-15f8a1315dfd</uuid>
    <file-application>eFapsApp-POS</file-application>
    <definition>
        <version-expression>(version==latest)</version-expression>
        <name>POS_WorkspaceMyDesk_Menu_Action_Create</name>
        <access>
            <role>Administration</role>
            <role>POS_Admin</role>
        </access>
        <target>
            <form>POS_WorkspaceForm</form>
            <execute program="org.efaps.esjp.common.uiform.Create" />
        </target>
        <property name="Target">modal</property>
        <property name="TargetCreateType">POS_Workspace</property>
        <property name="TargetMode">create</property>
        <property name="TargetDefaultMenu">none</property>
        <property name="WindowWidth">900</property>
    </definition>
</ui-command>


text:
'use strict';

/**
 * @ngdoc function
 * @name we99App.controller:ExperimentCreateCtrl
 * @description
 * # ExperimentCreateCtrl
 * Controller of the we99App
 */
angular.module('we99App')
  .controller('ExperimentCreateCtrl', function ($scope,$routeParams, $location, $modal, RestService, TourConstants) {

    // if given id, this is an edit of an existing assay
    if ($routeParams.addeditId==='new') {
      $scope.editMode = false;
      $scope.pageTitle = 'Create New Assay';
      $scope.newExp = {};
      refreshProtocolList();
      refreshUsersList();
    } else {
      $scope.editMode = true;
      $scope.pageTitle = 'Modify Assay';
      RestService.getExperimentById($routeParams.addeditId)
        .success(function (resp) {
          $scope.newExp = resp;
          refreshProtocolList();
          refreshUsersList();
        })
    }

    // retrieves user list from db
    function refreshUsersList(){

      if($scope.newExp.id){
        //get assigned users and all users to populate list
        RestService.getExperimentMembers($scope.newExp.id)
          .success(function(resp){
            $scope.assignedUsers=resp.values;
            $scope.displayAssignedUsers=[].concat($scope.assignedUsers);

            RestService.getUsers().success(function(response){
              var allUsers=response.values;
              $scope.availUsers=[];
              //find users that haven't already been assigned
              for(var i=0;i<allUsers.length;i++){
                var unique=true;
                for (var j = 0; j < $scope.assignedUsers.length; j++)
                  if ($scope.assignedUsers[j].id === allUsers[i].id){
                    unique=false;
                    break;
                    }
                if(unique)
                  $scope.availUsers.push(allUsers[i]);
              }
              $scope.displayAvailUsers=[].concat($scope.availUsers);

            })
              .error(function(response){
                $scope.errorText='Failed to load available users';
              });
          })
          .error(function(response){
            $scope.errorText='Failed to load current assay users';
          });
          // get current user too
          RestService.getCurrentUser()
              .success(function(resp){
                  $scope.currentUser=resp;
              });
      }
      else{
        //automatically assign current user
        RestService.getCurrentUser()
          .success(function(resp){
            $scope.currentUser=resp;
            RestService.getUsers().success(function(response){
              $scope.availUsers=response.values;
              var index=$scope.availUsers.indexOf($scope.currentUser);
              $scope.availUsers.splice(index,1);
              $scope.displayAvailUsers=[].concat($scope.availUsers);

              $scope.assignedUsers=[$scope.currentUser];
              $scope.displayAssignedUsers=[].concat($scope.assignedUsers);
            })
              .error(function(response){
                $scope.errorText='Failed to load users';
              });
          })
          .error(function(response){
            $scope.errorText='Failed to load current user info';
          });
      }

    }

    // retrieves protocol list from db
    function refreshProtocolList(){
	    RestService.getProtocols()
	    .success(function(response){
	    	$scope.protocolValues=response.values;
          if($scope.editMode===true)
            $scope.newExp.protocol = selectMatching($scope.protocolValues, "id", $scope.newExp.protocol.id);
	    })
	    .error(function(response){
	    	$scope.errorText='Failed to load protocol list';
	    });
    }

    /**
     * walks the array and selects the first object with a property that matches
     * the value given.
     * @param input
     * @param key
     * @param value
     * @returns {*}
     */
    function selectMatching(input, key, value) {
      for(var i=0; i<input.length; i++) {
        if (input[i][key] === value) {
          return input[i];
        }
      }
    }

    function saveMembers(expId,memberIds){
      RestService.setExperimentMembers(expId, memberIds)
        .success(function (resp) {
          $location.path('/experiment')
        })
        .error(function (resp) {
          $scope.errorText = 'Error: could not assign members to new assay';
        });
    }

    $scope.saveExp=function(){
    	if($scope.assignedUsers.length<=0){
    		$scope.errorText="Assays must have at least one assigned user";
    		return;
    	} else if ($scope.newExp.status === "PUBLISHED") {
        $scope.errorText="Published assays cannot be modified";
        return;
      }
      var memberIds=[];
      for(var i=0;i<$scope.assignedUsers.length;i++){
        memberIds.push($scope.assignedUsers[i].id)
      }

    	RestService.createExperiment($scope.newExp)
    		.success(function(resp){
          if (memberIds.length != 0) {
            saveMembers(resp.id,memberIds);
          } else {
            $location.path('/experiment');
          }
    		})
    		.error(function(resp){
    			$scope.errorText='Error: could not save assay';
    		});
    };

    $scope.assignUser=function(){
    	for(var i=0;i<$scope.availUsers.length;i++){
    		if($scope.availUsers[i].isSelected){
    			var movedObj=$scope.availUsers.splice(i,1)[0];
    			$scope.assignedUsers.push(movedObj);
    			break;
    		}
    	}
    };

    $scope.removeUser=function(){
    	for(var i=0;i<$scope.assignedUsers.length;i++){
    		if($scope.assignedUsers[i].isSelected){
    			//console.log('got one! '+i);
    			if($scope.assignedUsers[i].id===$scope.currentUser.id){
    				$scope.errorText='You cannot remove yourself from an assay.';
    				break;
    			}
    			else{
	    			var movedObj=$scope.assignedUsers.splice(i,1)[0];
	    			$scope.availUsers.push(movedObj);
	    			break;
    			}
    		}
    	}
    };

    //modal control
    $scope.newProtocol = function () {

        var modalInstance = $modal.open({
          templateUrl: 'views/experiment/addprotocol.html',
          controller: 'AddProtocolCtrl',
          resolve: {
            protocols: function () {
              return $scope.protocolValues;
            }
          }
        });

        //when modal closes...
        modalInstance.result.then(function (newProc) {
        	if(newProc){
        		//console.log('modal rv: '+newProc);
        		$scope.protocolValues.push(newProc);}
        	//refreshProtocolList();
        }, function () {
          console.log('Modal dismissed at: ' + new Date());
        });
      };

    $scope.startTour=function(){
      $scope.startJoyRide=true;
    };

    $scope.tourConfig=TourConstants.experimentCreateTour;

  });

///
/// Modal Controller for Add Protocol
///
angular.module('we99App')
.controller('AddProtocolCtrl', function ($scope, RestService, $modalInstance, protocols) {

	  //get all previously created protocols to check for uniqueness
	  $scope.protocols = protocols;

	  $scope.ok = function () {

		//throw error if name is not unique
		for(var i=0;i<protocols.length;i++){
			if(protocols[i].name===$scope.protocol.name){
				$scope.errorText="New protocol name must be unique.";
				return;
			}
		}

		//try to create new protocol with rest service
		RestService.addProtocol($scope.protocol)
			.success(function(resp){
				$modalInstance.close(resp);
			})
			.error(function(resp){
	  			$scope.errorText="Could not save new protocol";});

	  };

	  $scope.cancel = function () {
	    $modalInstance.dismiss('cancel');
	  };
	});


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/even_container"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">

    <ImageView
        android:id="@+id/odd_bubble"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_margin="5dip"
        android:src="@drawable/odd" />

    <TextView
        android:id="@+id/text"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:layout_alignParentLeft="true"
        android:textColor="#ffffff"
        android:textSize="16dip"
        android:layout_marginRight="120dip"
        android:layout_marginLeft="8dip"
        android:layout_marginTop="10dip" />

</RelativeLayout>


text:
package com.net.rtsp.imp.request.client;

import java.io.IOException;

import com.net.rtsp.ClientRequest;
import com.net.rtsp.RequestMessage;

public class Get_Parameter extends ClientRequest {// C-->S
	protected void fillRequest(com.net.rtsp.RtspURLConnection urlC, RequestMessage request, int cseq) throws IOException {
		request.setRequestLine(getCMDHeader(GET_PARAMETER, urlC.getURL().toExternalForm()));
		request.set("CSeq", "" + cseq);

	}
}


text:
@interface CarTripHeader : UICollectionReusableView

@property (weak, nonatomic) IBOutlet UIView *segmentContainer;

- (void) addSegmentView:(UIView*)view;

@end

////////////////////////////////////////////////////////////////////////////////////////

@interface CarTripSliderCell : UICollectionViewCell

- (void) setSliderView:(UIView*)view;

@end

////////////////////////////////////////////////////////////////////////////////////////

@interface CarTripCarouselCell : UICollectionViewCell

@property (weak, nonatomic) IBOutlet UILabel *noResultLabel;
@property (weak, nonatomic) IBOutlet UIView *noResultView;
@property (weak, nonatomic) IBOutlet UIImageView *shadowView;

- (void) setCarouselView:(UIView*)view;
- (void) showNoResult:(BOOL)show;

@end

////////////////////////////////////////////////////////////////////////////////////////

@interface WeekSumCell : UICollectionViewCell

@property (weak, nonatomic) IBOutlet CoorViewX *xCoorBarView;
@property (weak, nonatomic) IBOutlet MPBarsGraphView *distBarView;
@property (weak, nonatomic) IBOutlet MPBarsGraphView *duringBarView;
@property (weak, nonatomic) IBOutlet UIView *distColorView;
@property (weak, nonatomic) IBOutlet UIView *duringColorView;

- (void) animWithDelay:(CGFloat)delay;

@end

////////////////////////////////////////////////////////////////////////////////////////

@interface WeekSpeedCell : UICollectionViewCell

@property (weak, nonatomic) IBOutlet MPBarsGraphView *maxSpeedView;
@property (weak, nonatomic) IBOutlet MPBarsGraphView *avgSpeedView;
@property (weak, nonatomic) IBOutlet UIView *maxColorView;
@property (weak, nonatomic) IBOutlet UIView *avgColorView;

- (void) animWithDelay:(CGFloat)delay;

@end

////////////////////////////////////////////////////////////////////////////////////////

@interface WeekJamCell : UICollectionViewCell

@property (weak, nonatomic) IBOutlet MPGraphView *jamDuringView;
@property (weak, nonatomic) IBOutlet MPGraphView *jamCountView;
@property (weak, nonatomic) IBOutlet UIView *duringColorView;
@property (weak, nonatomic) IBOutlet UIView *countColorView;

- (void) animWithDelay:(CGFloat)delay;

@end

////////////////////////////////////////////////////////////////////////////////////////

@interface WeekTrafficLightCell : UICollectionViewCell

@property (weak, nonatomic) IBOutlet MPBarsGraphView *lightDuringView;
@property (weak, nonatomic) IBOutlet MPBarsGraphView *lightCountView;
@property (weak, nonatomic) IBOutlet UIView *duringColorView;
@property (weak, nonatomic) IBOutlet UIView *countColorView;

- (void) animWithDelay:(CGFloat)delay;

@end

////////////////////////////////////////////////////////////////////////////////////////

@interface MonthBestCell : UICollectionViewCell

@property (weak, nonatomic) IBOutlet UIImageView *monthImage;
@property (weak, nonatomic) IBOutlet UILabel *titlePrev;
@property (weak, nonatomic) IBOutlet UILabel *titleContent;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;

@property (weak, nonatomic) IBOutlet UIView *tripDetailContainer;

@property (nonatomic, strong) TripTicketView *      ticketView;

- (void) updateWithTripSum:(TripSummary*)tripSum;

@end


text:
"""This module contains the tests to the class
GraphParser.

This test serves to ensure the viability of the
methods of the class GraphParser in io module.
"""

import os

from graf import GraphParser

class TestGraphParser:
    """
    This class contains the test methods of the class GraphParser.

    """

    def setUp(self):
        self.gparser = GraphParser()

    def test_parse(self):
        """Raise an assertion if can't find a file.

        Return a PyGraph.

        Raises
        ------
        AssertionError
            If the can't find the file.

        """

        # Change directory
        # Opening the expected file result

        filename = os.path.dirname(__file__) + '/sample_files/balochi-graid1.xml'
        g = self.gparser.parse(filename)

        expected_result = 651
        assert(len(g.nodes) == expected_result)

        filename = os.path.dirname(__file__) + '/sample_files/balochi.hdr'
        g = self.gparser.parse(filename)

        expected_result = 1161
        assert(len(g.nodes) == expected_result)

        # Check the parsed dependencies
        expected_parsed_deps = set(['word', 'clause_unit', 'utterance'])

        parsed_dependencies = self.gparser._parsed_deps

        assert(parsed_dependencies == expected_parsed_deps)


text:
var Server = {
	serverAddr : "",
	UserID : "",
	UserName : "",
	Device : "Samsung Smart TV",
	DeviceID : "00000000000000000000000000000000",
	AuthenticationToken : null,
}

//------------------------------------------------------------
//      Getter & Setter Functions
//------------------------------------------------------------

Server.getAuthToken = function() {
	return this.AuthenticationToken;
}

Server.getServerAddr = function() {
	return this.serverAddr;
}

Server.setServerAddr = function(serverAddr) {
	this.serverAddr = serverAddr;
}

Server.getUserID = function() {
	return this.UserID;
}

Server.setUserID = function(UserID) {
	this.UserID = UserID;
}

Server.getUserName = function() {
	return this.UserName;
}

Server.setUserName = function(UserName) {
	this.UserName = UserName;
}

Server.setUserFavourites = function(UserFavourites) {
	this.UserFavourites = UserFavourites;
}

Server.getUserFavourites = function(UserFavourites) {
	return this.UserFavourites;
}

Server.setDevice = function(Device) {
	this.Device = Device;
}

//Used in Settings
Server.getDevice = function() {
	return this.Device;
}

Server.setDeviceID = function(DeviceID) {
	this.DeviceID = DeviceID;
}

//Required in Transcoding functions + guiPlayer
Server.getDeviceID = function() {
	return this.DeviceID;
}
//------------------------------------------------------------
//      Generic Functions
//------------------------------------------------------------
Server.getCustomURL = function(SortParams) {
	if (SortParams != null){
		return  Server.getServerAddr() + SortParams;
	} else {
		return  Server.getServerAddr();
	}
}

Server.getItemTypeURL = function(SortParams) {
	if (SortParams != null){
		return  Server.getServerAddr() + "/Users/" + Server.getUserID() + "/Items?format=json" + SortParams;
	} else {
		return  Server.getServerAddr() + "/Users/" + Server.getUserID() + "/Items?format=json";
	}
}

Server.getThemeMedia = function(ItemID) {
	return  Server.getServerAddr() + "/Items/" + ItemID + "/ThemeMedia?UserId=" + Server.getUserID() + "&InheritFromParent=true&format=json"
}

Server.getChildItemsURL = function(ParentID, SortParams) {
	if (SortParams != null){
		return  Server.getServerAddr() + "/Users/" + Server.getUserID() + "/Items?ParentId="+ParentID+"&format=json" + SortParams;
	} else {
		return  Server.getServerAddr() + "/Users/" + Server.getUserID() + "/Items?ParentId="+ParentID+"&format=json";
	}
}

Server.getPlaybackInfoURL = function(itemId) {
	return Server.getServerAddr() + "/Items/" + itemId + "/PlaybackInfo?UserId=" + Server.getUserID();
}

Server.getPlaybackInfo = function(itemId) {
	var url = Server.getPlaybackInfoURL(itemId);
	return Server.getContent(url);
}

Server.getItemInfoURL = function(ParentID, SortParams) {
	if (SortParams != null){
		return  Server.getServerAddr() + "/Users/" + Server.getUserID() + "/Items/"+ParentID+"?format=json" + SortParams;
	} else {
		return  Server.getServerAddr() + "/Users/" + Server.getUserID() + "/Items/"+ParentID+"?format=json";
	}
}

Server.getItemIntrosUrl = function(itemId, SortParams) {
	return  Server.getServerAddr() + "/Users/" + Server.getUserID() + "/Items/"+itemId+"/Intros"; //?format=json";
}

Server.getSearchURL = function(searchTermString) {
	var parsedSearchTermString = Support.parseSearchTerm(searchTermString);
	return Server.getServerAddr() + "/Search/Hints?format=json&UserId=" + Server.getUserID() + "&SearchTerm=" + parsedSearchTermString;
}

Server.getAdditionalPartsURL = function(ShowID) {
	return  Server.getServerAddr() + "/Videos/" + ShowID +  "/AdditionalParts?format=json&userId="+Server.getUserID();
}

Server.getAdjacentEpisodesURL = function(ShowID,SeasonID,EpisodeID) {
	return  Server.getServerAddr() + "/Shows/" + ShowID +  "/Episodes?format=json&ImageTypeLimit=1&seasonId="+SeasonID+"&userId="+Server.getUserID() +"&AdjacentTo=" + EpisodeID;
}

Server.getSeasonEpisodesURL = function(ShowID,SeasonID) {
	return  Server.getServerAddr() + "/Shows/" + ShowID +  "/Episodes?format=json&ImageTypeLimit=1&seasonId="+SeasonID+"&userId="+Server.getUserID();
}

Server.getImageURL = function(itemId,imagetype,maxwidth,maxheight,unplayedcount,played,playedpercentage,chapter) {
	var query = "";
	switch (imagetype) {
	case "Primary":
		query = "/Items/"+ itemId +"/Images/Primary/0?maxwidth="+maxwidth+"&maxheight="+maxheight + "&quality=90";
		break;
	case "Banner":
		query = "/Items/"+ itemId +"/Images/Banner/0?maxwidth="+maxwidth+"&maxheight="+maxheight + "&quality=90";
		break;
	case "Backdrop":
		query = "/Items/"+ itemId +"/Images/Backdrop/0?maxwidth="+maxwidth+"&maxheight="+maxheight + "&quality=90";
		break;
	case "Thumb":
		query = "/Items/"+ itemId +"/Images/Thumb/0?maxwidth="+maxwidth+"&maxheight="+maxheight + "&quality=90";
		break;
	case "Logo":
		query = "/Items/"+ itemId +"/Images/Logo/0?maxwidth="+maxwidth+"&maxheight="+maxheight + "&quality=90";
		break;
	case "Disc":
		query = "/Items/"+ itemId +"/Images/Disc/0?maxwidth="+maxwidth+"&maxheight="+maxheight + "&quality=90";
		break;
	case "UsersPrimary":
		query = "/Users/" + itemId + "/Images/Primary?maxwidth="+maxwidth+"&maxheight="+maxheight + "&quality=90";
		break;
	case "Chapter":
		query = "/Items/" + itemId + "/Images/Chapter/" + chapter + "?maxwidth="+maxwidth+"&maxheight="+maxheight + "&quality=90";
		break;
	}

	if (Main.isImageCaching()) {
			var found = false;

			for (var i = 0; i <Support.imageCachejson.Images.length; i++) {
				//Is image in cache - If so use it
				if (Support.imageCachejson.Images[i].URL == query) {
					found = true;
					break;
				}
			}

			if (found == true) {
				//Use data URI from file
				return Support.imageCachejson.Images[i].DataURI;
			} else {
				//Use URL & Add to Cache
				var full = Server.getServerAddr() +  query;

				var xhr = new XMLHttpRequest();
				xhr.open('GET', full, true);
				xhr.responseType = 'blob';

				xhr.onload = function(e) {
				  if (this.status == 200) {
				    var blob = this.response;
			    	Support.imageCachejson.Images[Support.imageCachejson.Images.length] = {"URL":query,"DataURI":window.URL.createObjectURL(blob)};
				  }
				};
				xhr.send();

				return full;
			}
	} else {
		return Server.getServerAddr() +  query;
	}
}

Server.getScreenSaverImageURL = function(itemId,imagetype,maxwidth,maxheight) {
	var query = "";
	switch (imagetype) {
		case "Backdrop":
			query =   Server.getServerAddr() + "/Items/"+ itemId +"/Images/Backdrop/0?quality=90&maxwidth="+maxwidth+"&maxheight="+maxheight;
			break;
		case "Primary":
			query =   Server.getServerAddr() + "/Items/"+ itemId +"/Images/Primary/0?quality=90&maxwidth="+maxwidth+"&maxheight="+maxheight;
			break;
	}
	return query;
}

Server.getBackgroundImageURL = function(itemId,imagetype,maxwidth,maxheight,unplayedcount,played,playedpercentage,totalbackdrops) {
	var query = "";
	var index =  Math.floor((Math.random()*totalbackdrops)+0);

	switch (imagetype) {

	case "Backdrop":
		query =   Server.getServerAddr() + "/Items/"+ itemId +"/Images/Backdrop/"+index+"?maxwidth="+maxwidth+"&maxheight="+maxheight;
		break;
	}

	query = query + "&Quality=90";

	return query;
}

Server.getStreamUrl = function(itemId,mediaSourceId){
	var streamparams = '/master.m3u8?VideoCodec=h264&Profile=high&Level=41&MaxVideoBitDepth=8&MaxWidth=1920&VideoBitrate=10000000&AudioCodec=aac&audioBitrate=360000&TranscodingMaxAudioChannels=6&MediaSourceId='+mediaSourceId + '&api_key=' + Server.getAuthToken();
	var streamUrl = Server.getServerAddr() + '/Videos/' + itemId + streamparams + '&DeviceId='+Server.getDeviceID();
	return streamUrl;
}

Server.setRequestHeaders = function (xmlHttp,UserId) {
	if (this.UserID == null) {
		xmlHttp.setRequestHeader("X-Emby-Authorization", "MediaBrowser Client=\"Samsung TV\", Device=\""+this.Device+"\", DeviceId=\""+this.DeviceID+"\", Version=\""+Main.getVersion()+"\", UserId=\""+UserId+"\"");
	} else {
		xmlHttp.setRequestHeader("X-Emby-Authorization", "MediaBrowser Client=\"Samsung TV\", Device=\""+this.Device+"\", DeviceId=\""+this.DeviceID+"\", Version=\""+Main.getVersion()+"\", UserId=\""+this.UserID+"\"");
		if (this.AuthenticationToken != null) {
			xmlHttp.setRequestHeader("X-MediaBrowser-Token", this.AuthenticationToken);
		}
	}
	xmlHttp.setRequestHeader("Content-Type", 'application/json; charset=UTF-8');
	//xmlHttp.setRequestHeader("Accept-Charset", 'utf-8');
	return xmlHttp;
}

Server.getMoviesViewQueryPart = function() {
	var ParentId = Server.getUserViewId("movies", "UserView");

	if (ParentId == null) {
		return "";
	} else {
		return "&ParentId="+ParentId;
	}
}

Server.getTvViewQueryPart = function() {
	var ParentId = Server.getUserViewId("tvshows", "UserView");

	if (ParentId == null) {
		return "";
	} else {
		return "&ParentId="+ParentId;
	}
}

Server.getUserViewId = function (collectionType, Type) {
	var folderId = null;
	var userViews = Server.getUserViews();
	for (var i = 0; i < userViews.Items.length; i++){
		if ((Type === undefined || userViews.Items[i].Type == Type) && userViews.Items[i].CollectionType == collectionType){
			folderId = userViews.Items[i].Id;
		}
	}
	return folderId;
}

Server.getUserViews = function () {
	var url = this.serverAddr + "/Users/" + Server.getUserID() + "/Views?format=json&SortBy=SortName&SortOrder=Ascending";
	var userViews = Server.getContent(url);
	return userViews;
}

//------------------------------------------------------------
//      Settings Functions
//------------------------------------------------------------
Server.updateUserConfiguration = function(contentToPost) {
	var url = this.serverAddr + "/Users/" + Server.getUserID() + "/Configuration";
	xmlHttp = new XMLHttpRequest();
	if (xmlHttp) {
		xmlHttp.open("POST", url , true); //must be true!
		xmlHttp = this.setRequestHeaders(xmlHttp);
		xmlHttp.send(contentToPost);
	}
}

//------------------------------------------------------------
//      Player Functions
//------------------------------------------------------------
Server.getSubtitles = function(url) {
	xmlHttp = new XMLHttpRequest();
	if (xmlHttp) {
		xmlHttp.open("GET", url , false); //must be false
		xmlHttp = this.setRequestHeaders(xmlHttp);
		xmlHttp.send(null);

		if (xmlHttp.status != 200) {
			alert (xmlHttp.status);
			return null;
		} else {
			return xmlHttp.responseText;
		}
	} else {
		alert ("Bad xmlHTTP Request");
		Server.Logout();
		GuiNotifications.setNotification("Bad xmlHTTP Request<br>Token: " + Server.getAuthToken(),"Server Error",false);
		GuiUsers.start(true);
		return null;
	}
}

Server.videoStarted = function(showId,MediaSourceID,PlayMethod,PlaySessionId) {
	var url = this.serverAddr + "/Sessions/Playing";
	xmlHttp = new XMLHttpRequest();
	if (xmlHttp) {
		var contentToPost = '{"QueueableMediaTypes":["Video"],"CanSeek":false,"ItemId":'+showId+',"PlaySessionId":'+PlaySessionId+',"MediaSourceId":'+MediaSourceID+',"IsPaused":false,"IsMuted":false,"PositionTicks":0,"PlayMethod":'+PlayMethod+'}';
		xmlHttp.open("POST", url , true); //must be true!
		xmlHttp = this.setRequestHeaders(xmlHttp);
		xmlHttp.send(contentToPost);
	}
}

Server.videoStopped = function(showId,MediaSourceID,ticks,PlayMethod,PlaySessionId) {
	var url = this.serverAddr + "/Sessions/Playing/Stopped";
	xmlHttp = new XMLHttpRequest();
	if (xmlHttp) {
		var contentToPost = '{"QueueableMediaTypes":["Video"],"CanSeek":false,"ItemId":'+showId+',"PlaySessionId":'+PlaySessionId+',"MediaSourceId":'+MediaSourceID+',"IsPaused":false,"IsMuted":false,"PositionTicks":'+(ticks*10000)+',"PlayMethod":'+PlayMethod+'}';
		xmlHttp.open("POST", url , true); //must be true!
		xmlHttp = this.setRequestHeaders(xmlHttp);
		xmlHttp.send(contentToPost);
	}
}

Server.videoPaused = function(showId,MediaSourceID,ticks,PlayMethod,PlaySessionId) {
	var url = this.serverAddr + "/Sessions/Playing/Progress";
	xmlHttp = new XMLHttpRequest();
	if (xmlHttp) {
		var contentToPost = '{"QueueableMediaTypes":["Video"],"CanSeek":false,"ItemId":'+showId+',"PlaySessionId":'+PlaySessionId+',"MediaSourceId":'+MediaSourceID+',"IsPaused":true,"IsMuted":false,"PositionTicks":'+(ticks*10000)+',"PlayMethod":'+PlayMethod+'}';
		xmlHttp.open("POST", url , true); //must be true!
		xmlHttp = this.setRequestHeaders(xmlHttp);
		xmlHttp.send(contentToPost);
	}
}

Server.videoTime = function(showId,MediaSourceID,ticks,PlayMethod,PlaySessionId) {
	var url = this.serverAddr + "/Sessions/Playing/Progress";
	xmlHttp = new XMLHttpRequest();
	if (xmlHttp) {
		var contentToPost = '{"QueueableMediaTypes":["Video"],"CanSeek":false,"ItemId":'+showId+',"PlaySessionId":'+PlaySessionId+',"MediaSourceId":'+MediaSourceID+',"IsPaused":false,"IsMuted":false,"PositionTicks":'+(ticks*10000)+',"PlayMethod":'+PlayMethod+'}';
		xmlHttp.open("POST", url , true); //must be true!
		xmlHttp = this.setRequestHeaders(xmlHttp);
		xmlHttp.send(contentToPost);
	}
}

Server.stopHLSTranscode = function() {
	var url = this.serverAddr + "/Videos/ActiveEncodings?DeviceId="+this.DeviceID;
	xmlHttp = new XMLHttpRequest();
	if (xmlHttp) {
		xmlHttp.open("POST", url , true); //must be true!
		xmlHttp = this.setRequestHeaders(xmlHttp);
		xmlHttp.send(null);
	}
}

//------------------------------------------------------------
//      Item Watched Status Functions
//------------------------------------------------------------

Server.setWatchedStatus = function(id) {
	var url = this.serverAddr + "/Users/" + this.UserID + "/PlayedItems/" + id;
	xmlHttp = new XMLHttpRequest();
	if (xmlHttp) {
		xmlHttp.open("POST", url , true); //must be true!
		xmlHttp = this.setRequestHeaders(xmlHttp);
		xmlHttp.send(null);
	}
}

Server.deleteWatchedStatus = function(id) {
	var url = this.serverAddr + "/Users/" + this.UserID + "/PlayedItems/" + id;
	xmlHttp = new XMLHttpRequest();
	if (xmlHttp) {
		xmlHttp.open("DELETE", url , true); //must be true!
		xmlHttp = this.setRequestHeaders(xmlHttp);
		xmlHttp.send(null);
	}
}

//------------------------------------------------------------
//       Item Favourite Status Functions
//------------------------------------------------------------

Server.setFavourite = function(id) {
	var url = this.serverAddr + "/Users/" + this.UserID + "/FavoriteItems/" + id;
	xmlHttp = new XMLHttpRequest();
	if (xmlHttp) {
		xmlHttp.open("POST", url , true); //must be true!
		xmlHttp = this.setRequestHeaders(xmlHttp);
		xmlHttp.send(null);
	}
}

Server.deleteFavourite = function(id) {
	var url = this.serverAddr + "/Users/" + this.UserID + "/FavoriteItems/" + id;
	xmlHttp = new XMLHttpRequest();
	if (xmlHttp) {
		xmlHttp.open("DELETE", url , true); //must be true!
		xmlHttp = this.setRequestHeaders(xmlHttp);
		xmlHttp.send(null);
	}
}

//------------------------------------------------------------
//       GuiIP Functions
//------------------------------------------------------------
Server.createPlaylist = function(name, ids, mediaType) {
	var url = this.serverAddr + "/Playlists?Name=" + name + "&Ids=" + ids + "&userId="+Server.getUserID() + "&MediaType=" + mediaType;
	xmlHttp = new XMLHttpRequest();
	if (xmlHttp) {
		xmlHttp.open("POST", url , true); //must be true!
		xmlHttp = this.setRequestHeaders(xmlHttp);
		xmlHttp.send(null);
	}
}

Server.deletePlaylist = function(playlistId) {
	var url = this.serverAddr + "/Items/"+playlistId;
	xmlHttp = new XMLHttpRequest();
	if (xmlHttp) {
		xmlHttp.open("DELETE", url , true); //must be true!
		xmlHttp = this.setRequestHeaders(xmlHttp);
		xmlHttp.send(null);
	}
}

Server.addToPlaylist = function(playlistId, ids) {
	var url = this.serverAddr + "/Playlists/"+ playlistId + "/Items?Ids=" + ids + "&userId="+Server.getUserID();
	xmlHttp = new XMLHttpRequest();
	if (xmlHttp) {
		xmlHttp.open("POST", url , true); //must be true!
		xmlHttp = this.setRequestHeaders(xmlHttp);
		xmlHttp.send(null);
	}
}

Server.removeFromPlaylist = function(playlistId, ids) {
	var url = this.serverAddr + "/Playlists/"+ playlistId + "/Items?EntryIds=" + ids + "&userId="+Server.getUserID();
	alert(url)
	xmlHttp = new XMLHttpRequest();
	if (xmlHttp) {
		xmlHttp.open("DELETE", url , true); //must be true!
		xmlHttp = this.setRequestHeaders(xmlHttp);
		xmlHttp.send(null);
	}
}

Server.POST = function(url, item) {
	xmlHttp = new XMLHttpRequest();
	if (xmlHttp) {
		xmlHttp.open("POST", url , true); //must be true!
		xmlHttp = this.setRequestHeaders(xmlHttp);
		if (item){
			xmlHttp.send(JSON.stringify(item));
		} else {
			xmlHttp.send(null);
		}
	}
}

Server.DELETE = function(url, item) {
	xmlHttp = new XMLHttpRequest();
	if (xmlHttp) {
		xmlHttp.open("DELETE", url , true); //must be true!
		xmlHttp = this.setRequestHeaders(xmlHttp);
		if (item){
			xmlHttp.send(JSON.stringify(item));
		} else {
			xmlHttp.send(null);
		}
	}
}
//------------------------------------------------------------
//      GuiIP Functions
//------------------------------------------------------------
Server.testConnectionSettings = function (server,fromFile) {
	xmlHttp = new XMLHttpRequest();
	if (xmlHttp) {
		xmlHttp.open("GET", "http://" + server + "/emby/System/Info/Public?format=json",false);
		xmlHttp.setRequestHeader("Content-Type", 'application/json');
		xmlHttp.onreadystatechange = function () {
			GuiNotifications.setNotification("hello","Network Status",true);
			if (xmlHttp.readyState == 4) {
		        if(xmlHttp.status === 200) {
			    	if (fromFile == false) {
			    		var json = JSON.parse(xmlHttp.responseText);
			    		File.saveServerToFile(json.Id,json.ServerName,server);
			    	}
			       	//Set Server.serverAddr!
			       	Server.setServerAddr("http://" + server + "/emby");
			       	//Check Server Version
			       	if (ServerVersion.checkServerVersion()) {
			       		GuiUsers.start(true);
			       	} else {
			       		ServerVersion.start();
			       	}
		        } else if (xmlHttp.status === 0) {
		        	GuiNotifications.setNotification("Your Emby server is not responding.","Network Error "+xmlHttp.status,true);
					Support.removeSplashScreen();
			    	if (fromFile == true) {
			    		setTimeout(function(){
			    			GuiPage_Servers.start();
			    		}, 3000);

			    	} else {
			    		setTimeout(function(){
			    			GuiPage_NewServer.start();
			    		}, 3000);
			    	}
		        } else {
		        	GuiNotifications.setNotification("Emby server connection error.","Network Error "+xmlHttp.status,true);
					Support.removeSplashScreen();
			    	if (fromFile == true) {
			    		setTimeout(function(){
			    			GuiPage_Servers.start();
			    		}, 3000);

			    	} else {
			    		setTimeout(function(){
			    			GuiPage_NewServer.start();
			    		}, 3000);
			    	}
		        }
			}
	    };
		xmlHttp.send(null);
	} else {
	    alert("Failed to create XHR");
	}
}

//------------------------------------------------------------
//      GuiUsers Functions
//------------------------------------------------------------

Server.Authenticate = function(UserId, UserName, Password) {
	var url = Server.getServerAddr() + "/Users/AuthenticateByName?format=json";
    var params =  JSON.stringify({"Username":UserName,"Pw":Password});

    var xmlHttp = new XMLHttpRequest();
    xmlHttp.open( "POST", url , false ); //Authenticate must be false - need response before continuing!
    xmlHttp = this.setRequestHeaders(xmlHttp);

    xmlHttp.send(params);

    if (xmlHttp.status != 200) {
    	return false;
    } else {
    	var session = JSON.parse(xmlHttp.responseText);
    	this.AuthenticationToken = session.AccessToken;
    	this.setUserID(session.User.Id);
    	this.setUserName(UserName);
		FileLog.write("User "+ UserName +" authenticated. ");
    	return true;
    }
}

Server.Logout = function() {
	var url = this.serverAddr + "/Sessions/Logout";
	xmlHttp = new XMLHttpRequest();
	if (xmlHttp) {
		xmlHttp.open("POST", url , true); //must be true!
		xmlHttp = this.setRequestHeaders(xmlHttp);
		xmlHttp.send(null);
	}

	//Close down any running items
	GuiImagePlayer_Screensaver.kill();
	GuiImagePlayer.kill();
	GuiMusicPlayer.stopOnAppExit();
	GuiPlayer.stopOnAppExit();
	FileLog.write("---------------------------------------------------------------------");
}

//------------------------------------------------------------
//      Get Content - JSON REQUESTS
//------------------------------------------------------------
Server.getContent = function(url) {
	var xmlHttp = new XMLHttpRequest();
	if (xmlHttp) {
		xmlHttp.open("GET", url , false); //must be false
		xmlHttp = this.setRequestHeaders(xmlHttp);
		xmlHttp.send(null);

		if (xmlHttp.status != 200) {
			FileLog.write("Server Error: The HTTP status returned by the server was "+xmlHttp.status);
			FileLog.write(url);
			GuiNotifications.setNotification("The HTTP status code returned by the server was "+xmlHttp.status+".", "Server Error:");
			return null;
		} else {
			//alert(xmlHttp.responseText);
			return JSON.parse(xmlHttp.responseText);
		}
	} else {
		alert ("Bad xmlHTTP Request");
		Server.Logout();
		GuiNotifications.setNotification("Bad xmlHTTP Request<br>Token: " + Server.getAuthToken(),"Server Error",false);
		GuiUsers.start(true);
		return null;
	}
}


text:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.wfu.modules.sys.dao.BookDao">

	<sql id="bookColumns">
		a.book_id AS "bookId",
		a.book_isbn AS "bookIsbn",
		a.book_name AS "bookName",
		a.book_image AS "bookImage",
		a.book_author AS "bookAuthor",
		a.book_collections AS "bookCollections",
		a.book_introduction AS "bookIntroduction",
		a.book_directory AS "bookDirectory",
		a.book_contents AS "bookContents",
		a.book_guide AS "bookGuide",
		a.is_status AS "isStatus",
		a.book_publisherid AS "bookPublisherid",
		a.book_cashpledge AS "bookCashpledge",
		a.del_flag AS "delFlag",
		a.book_categoryid AS "bookCategoryid",
		b.*,
		c.id AS "categoryId",
		c.name AS "categoryName"
	</sql>

	<sql id="bookJoins">
		LEFT JOIN book_publisher b ON b.publisher_id = a.book_publisherid
		LEFT JOIN category c on c.id = a.book_categoryid
	</sql>
	<resultMap id="bookMapBean" type="Book">
		<id column="bookId" property="bookId"></id>
		<result column="bookIsbn" property="bookIsbn"/>
		<result column="bookName" property="bookName"/>
		<result column="bookImage" property="bookImage"/>
		<result column="bookAuthor" property="bookAuthor"/>
		<result column="bookCollections" property="bookCollections"/>
		<result column="bookIntroduction" property="bookIntroduction"/>
		<result column="bookDirectory" property="bookDirectory"/>
		<result column="bookContents" property="bookContents"/>
		<result column="bookGuide" property="bookGuide"/>
		<result column="bookPublisherid" property="bookPublisherid"/>
		<result column="bookCategoryid" property="bookCategoryid"/>
		<result column="isStatus" property="isStatus"/>
		<result column="bookCashpledge" property="bookCashpledge"/>
		<association property="bookPublisher" javaType="BookPublisher">
			<id column="publisher_id" property="publisherId"></id>
			<result column="publisher_name" property="publisherName"></result>
		</association>

		<association property="categoryCustomer" javaType="CategoryCustomer">
			<id column="categoryId" property="categoryId"></id>
			<result column="categoryName" property="categoryName"></result>
		</association>
	</resultMap>
	<select id="get" resultMap="bookMapBean">
		SELECT
			<include refid="bookColumns"/>
		FROM book a
		<include refid="bookJoins"/>
		WHERE a.book_id = #{id}
	</select>

	<select id="findList" resultMap="bookMapBean">
		SELECT DISTINCT
			<include refid="bookColumns"/>
		FROM book a
		<include refid="bookJoins"/>
		<where>
			a.del_flag = #{DEL_FLAG_NORMAL}
			<if test="bookIsbn != null and bookIsbn != ''">
				AND a.book_isbn = #{bookIsbn}
			</if>
			<if test="bookName != null and bookName != ''">
				AND a.book_name LIKE
					<if test="dbName == 'oracle'">'%'||#{bookName}||'%'</if>
					<if test="dbName == 'mssql'">'%'+#{bookName}+'%'</if>
					<if test="dbName == 'mysql'">concat('%',#{bookName},'%')</if>
			</if>
			<if test="bookAuthor != null and bookAuthor != ''">
				AND a.book_author LIKE concat('%',#{bookAuthor},'%')
			</if>
			<if test="bookPublisherid != null and bookPublisherid != ''">
				AND b.publisher_id = #{bookPublisherid}
			</if>
			<if test="bookCategoryid != null and bookCategoryid != ''">
				AND c.id = #{bookCategoryid} OR c.parent_ids LIKE concat('%',#{bookCategoryid},'%')
			</if>

			<if test="randCount != null">
				order by rand() limit #{randCount}
			</if>
		</where>
		<choose>
			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
				ORDER BY ${page.orderBy}
			</when>
			<otherwise>
			</otherwise>
		</choose>
	</select>

	<select id="findAllList" resultType="Book">
		SELECT
			<include refid="bookColumns"/>
		FROM book a
		<include refid="bookJoins"/>
		<where>
			a.del_flag = #{DEL_FLAG_NORMAL}
		</where>
		<choose>
			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
				ORDER BY ${page.orderBy}
			</when>
			<otherwise>
			</otherwise>
		</choose>
	</select>

	<insert id="insert">
		INSERT INTO book(
			book_id,
			book_isbn,
			book_name,
			book_image,
			book_author,
			book_collections,
			book_introduction,
			book_directory,
			book_contents,
			book_guide,
			is_status,
			book_publisherid,
			book_cashpledge,
			del_flag,
			book_categoryid
		) VALUES (
			#{bookId},
			#{bookIsbn},
			#{bookName},
			#{bookImage},
			#{bookAuthor},
			#{bookCollections},
			#{bookIntroduction},
			#{bookDirectory},
			#{bookContents},
			#{bookGuide},
			#{isStatus},
			#{bookPublisherid},
			#{bookCashpledge},
			#{delFlag},
			#{bookCategoryid}
		)
	</insert>

	<update id="update">
		UPDATE book SET
			book_isbn = #{bookIsbn},
			book_name = #{bookName},
			book_image = #{bookImage},
			book_author = #{bookAuthor},
			book_collections = #{bookCollections},
			book_introduction = #{bookIntroduction},
			book_directory = #{bookDirectory},
			book_contents = #{bookContents},
			book_guide = #{bookGuide},
			is_status = #{isStatus},
			book_publisherid = #{bookPublisherid},
			book_cashpledge = #{bookCashpledge},
			book_categoryid = #{bookCategoryid}
		WHERE book_id = #{bookId}
	</update>

	<update id="delete">
		UPDATE book SET
			del_flag = #{DEL_FLAG_DELETE}
		WHERE book_id = #{id}
	</update>
	<select id="selectBookByIsbn" resultType="Book">
		SELECT *
		FROM book a
		<where>
			a.del_flag = 0
			AND a.book_isbn = #{isbn}
		</where>
	</select>
</mapper>


text:
package com.netflix.conductor.tests.utils;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.netflix.conductor.common.run.ExternalStorageLocation;
import com.netflix.conductor.common.utils.ExternalPayloadStorage;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;

public class MockExternalPayloadStorage implements ExternalPayloadStorage {

    private ObjectMapper objectMapper = new ObjectMapper();

    @Override
    public ExternalStorageLocation getLocation(Operation operation, PayloadType payloadType, String path) {
        ExternalStorageLocation location = new ExternalStorageLocation();
        location.setUri("http://some/uri");
        switch (payloadType) {
            case TASK_INPUT:
                location.setPath("task/input");
                break;
            case WORKFLOW_OUTPUT:
                location.setPath("workflow/output");
                break;
        }
        return location;
    }

    @Override
    public void upload(String path, InputStream payload, long payloadSize) {
    }

    @Override
    public InputStream download(String path) {
        try {
            Map<String, Object> payload = getPayload(path);
            String jsonString = objectMapper.writeValueAsString(payload);
            return new ByteArrayInputStream(jsonString.getBytes());
        } catch (IOException e) {
            return null;
        }
    }

    @SuppressWarnings("unchecked")
    private Map<String, Object> getPayload(String path) {
        Map<String, Object> stringObjectMap = new HashMap<>();
        try {
            switch (path) {
                case "workflow/input":
                    stringObjectMap.put("param1", "p1 value");
                    stringObjectMap.put("param2", "p2 value");
                    return stringObjectMap;
                case "task/input":
                case "task/output":
                    InputStream stream = MockExternalPayloadStorage.class.getResourceAsStream("/payload.json");
                    return objectMapper.readValue(stream, Map.class);
            }
        } catch (IOException e) {
            // just handle this exception here and return empty map so that test will fail in case this exception is thrown
        }
        return stringObjectMap;
    }
}


text:
package io.quarkus.smallrye.metrics.runtime;

import java.lang.reflect.Method;
import java.time.Duration;
import java.util.function.Supplier;

import org.eclipse.microprofile.metrics.Metadata;
import org.eclipse.microprofile.metrics.MetricID;
import org.eclipse.microprofile.metrics.MetricRegistry;
import org.eclipse.microprofile.metrics.MetricUnits;
import org.eclipse.microprofile.metrics.Tag;

import io.smallrye.metrics.MetricRegistries;

final class FilterUtil {

    private FilterUtil() {
    }

    static void finishRequest(Long start, Class<?> resourceClass, String methodName, Class<?>[] parameterTypes,
            Supplier<Boolean> wasSuccessful) {
        long value = System.nanoTime() - start;
        boolean success = wasSuccessful.get();
        MetricID metricID = getMetricID(resourceClass, methodName, parameterTypes, success);

        MetricRegistry registry = MetricRegistries.get(MetricRegistry.Type.BASE);
        if (success) {
            registry.simpleTimer(metricID).update(Duration.ofNanos(value));
        } else {
            registry.counter(metricID).inc();
        }
    }

    static void maybeCreateMetrics(Class<?> resourceClass, Method resourceMethod) {
        MetricRegistry registry = MetricRegistries.get(MetricRegistry.Type.BASE);
        MetricID success = getMetricID(resourceClass, resourceMethod.getName(), resourceMethod.getParameterTypes(), true);
        if (registry.getSimpleTimer(success) == null) {
            Metadata successMetadata = Metadata.builder()
                    .withName(success.getName())
                    .withDescription(
                            "The number of invocations and total response time of this RESTful " +
                                    "resource method since the start of the server.")
                    .withUnit(MetricUnits.NANOSECONDS)
                    .build();
            registry.simpleTimer(successMetadata, success.getTagsAsArray());
        }
        MetricID failure = getMetricID(resourceClass, resourceMethod.getName(), resourceMethod.getParameterTypes(), false);
        if (registry.getCounter(failure) == null) {
            Metadata failureMetadata = Metadata.builder()
                    .withName(failure.getName())
                    .withDisplayName("Total Unmapped Exceptions count")
                    .withDescription(
                            "The total number of unmapped exceptions that occurred from this RESTful resource " +
                                    "method since the start of the server.")
                    .build();
            registry.counter(failureMetadata, failure.getTagsAsArray());
        }
    }

    static MetricID getMetricID(Class<?> resourceClass, String methodName, Class<?>[] parameterTypes,
            boolean requestWasSuccessful) {
        Tag classTag = new Tag("class", resourceClass.getName());
        StringBuilder sb = new StringBuilder();
        for (Class<?> parameterType : parameterTypes) {
            if (sb.length() > 0) {
                sb.append("_");
            }
            if (parameterType.isArray()) {
                sb.append(parameterType.getComponentType().getName()).append("[]");
            } else {
                sb.append(parameterType.getName());
            }
        }
        String encodedParameterNames = sb.toString();
        String methodTagValue = encodedParameterNames.isEmpty() ? methodName : methodName + "_" + encodedParameterNames;
        Tag methodTag = new Tag("method", methodTagValue);
        String name = requestWasSuccessful ? "REST.request" : "REST.request.unmappedException.total";
        return new MetricID(name, classTag, methodTag);
    }
}


text:
(function () {

    angular.module('PerfDemo').directive('perfFacetList', function () {

        return {

            restrict: 'E',

            scope: {
                facetedSearchManager: "="
            },

            controller: [

                '$scope',

                function ($scope) {

                    /*============ MODEL ============*/

                    $scope.facetData = $scope.facetedSearchManager.getFacetData();
                    $scope.selectedFacetsCount = 0;

                    /*============ BEHAVIOR ============*/

                    $scope.toggleFacetValue = function (facet, facetValue) {
                        $scope.facetedSearchManager.toggleFacet(facet.id, facetValue.id);
                    };

                    $scope.clearAll = function () {
                        $scope.facetedSearchManager.clearAllFacets();
                    };

                    /*============ LISTENERS ============*/

                    $scope.facetedSearchManager.addListener('facetDataUpdated', function (facetData) {
                        $scope.facetData = facetData;
                        $scope.selectedFacetsCount = $scope.facetedSearchManager.getSelectedFacetsCount();
                    });

                }
            ],

            template: [
                '
',
                    '
',
                        '
',
                            'Refine By:',
                        '
',
                        '
',
                            '',
                                'Clear all facets  ',
                            '',
                        '
',
                    '
',
                    '
',
                        '
',
                            '
{{::facet.title}}
',
                            '
',
                                '
',
                                    '<input id="perf-facet-input-{{::facet.id + \'-\' + value.id}}" type="checkbox" ng-checked="value.selected" ng-click="toggleFacetValue(facet, value)"/>',
                                    '{{::value.title}}',
                                    '( {{value.count}} )',
                                '
',
                            '
',
                        '
',
                    '
',
                '
'
            ].join('')

        };
    });

})();


text:
package org.apache.whirr.service.hbase;

import static org.apache.whirr.service.RolePredicates.role;
import static org.jclouds.scriptbuilder.domain.Statements.call;

import java.io.IOException;
import java.net.InetAddress;

import org.apache.whirr.net.DnsUtil;
import org.apache.whirr.service.Cluster;
import org.apache.whirr.service.ClusterActionEvent;
import org.apache.whirr.service.ClusterSpec;
import org.apache.whirr.service.ComputeServiceContextBuilder;
import org.apache.whirr.service.jclouds.FirewallSettings;
import org.apache.whirr.service.zookeeper.ZooKeeperCluster;
import org.jclouds.compute.ComputeServiceContext;

/**
 * Provides a base class for servers like REST or Avro.
 */
public class BasicServerClusterActionHandler extends HBaseClusterActionHandler {

  private final String role;
  private final int defaultPort;
  private final String configKeyPort;

  public BasicServerClusterActionHandler(String role, int port, String configKeyPort) {
    this.role = role;
    this.defaultPort = port;
    this.configKeyPort = configKeyPort;
  }

  @Override
  public String getRole() {
    return role;
  }

  @Override
  protected void beforeBootstrap(ClusterActionEvent event) throws IOException {
    ClusterSpec clusterSpec = event.getClusterSpec();
    addStatement(event, call("configure_hostnames",
      HBaseConstants.PARAM_PROVIDER, clusterSpec.getProvider()));
    addStatement(event, call("install_java"));
    String hbaseInstallFunction = getConfiguration(clusterSpec).getString(
      HBaseConstants.KEY_INSTALL_FUNCTION, HBaseConstants.FUNCTION_INSTALL);
    String tarurl = getConfiguration(clusterSpec).getString(
      HBaseConstants.KEY_TARBALL_URL);
    addStatement(event, call(hbaseInstallFunction,
      HBaseConstants.PARAM_PROVIDER, clusterSpec.getProvider(),
      HBaseConstants.PARAM_TARBALL_URL, tarurl));
    event.setTemplateBuilderStrategy(new HBaseTemplateBuilderStrategy());
  }

  @Override
  protected void beforeConfigure(ClusterActionEvent event)
      throws IOException, InterruptedException {
    ClusterSpec clusterSpec = event.getClusterSpec();
    Cluster cluster = event.getCluster();
    int port = defaultPort;
    if (configKeyPort != null) {
      port = getConfiguration(clusterSpec).getInt(configKeyPort, defaultPort);
    }

    Cluster.Instance instance = cluster.getInstanceMatching(
      role(HBaseMasterClusterActionHandler.ROLE));
    InetAddress masterPublicAddress = instance.getPublicAddress();

    ComputeServiceContext computeServiceContext =
      ComputeServiceContextBuilder.build(clusterSpec);
    FirewallSettings.authorizeIngress(computeServiceContext, instance,
      clusterSpec, port);

    String hbaseConfigureFunction = getConfiguration(clusterSpec).getString(
      HBaseConstants.KEY_CONFIGURE_FUNCTION,
      HBaseConstants.FUNCTION_POST_CONFIGURE);
    String master = DnsUtil.resolveAddress(masterPublicAddress.getHostAddress());
    String quorum = ZooKeeperCluster.getHosts(cluster);
    String tarurl = getConfiguration(clusterSpec).getString(
      HBaseConstants.KEY_TARBALL_URL);
    addStatement(event, call(hbaseConfigureFunction, role,
      HBaseConstants.PARAM_MASTER, master,
      HBaseConstants.PARAM_QUORUM, quorum,
      HBaseConstants.PARAM_PORT, Integer.toString(port),
      HBaseConstants.PARAM_PROVIDER, clusterSpec.getProvider(),
      HBaseConstants.PARAM_TARBALL_URL, tarurl));
  }

}


text:
import { NgModule, Component } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

@Component({
  selector: 'hello-world-app',
  template: '
Say Hello to Angular
'
})
class HelloWorldAppComponent {
}

@NgModule({
  imports: [BrowserModule],
  declarations: [HelloWorldAppComponent],
  bootstrap: [HelloWorldAppComponent]
})
class HelloWorldAppModule {
}

platformBrowserDynamic().bootstrapModule(HelloWorldAppModule);


text:
[Download][1] and install the newest version of vagrant.
Use `.deb` for Debian based distributions as, Debian, elementary OS, Linux Mint, Ubuntu.
Use `.rpm` for Fedora, Mageia, OpenSUSE etc.

## Provider

You need at least one of this providers to use vagrant-php.

### Virtualbox

[Download][2] and install the newest version of virtualbox.

#### Automatic suspend on host reboot/shutdown

Add the following lines to `/etc/default/virtualbox` and add every user, which uses virtualbox whitespace separated.
On non Debian based distribution, this file is probably missing, at if, cause it get used if its exists.

```{.sh}
SHUTDOWN_USERS="user1 user2"
SHUTDOWN=savestate
```

### VMWare

[Download][3] and install the newest version of vmware workstation.

Install the vagrant vmware plugin

```{.sh}
vagrant plugin install vagrant-vmware-workstation
```

You need to get a [license][4] and follow the instructions within the mail from HashiCorp.

## Shared Filesystem

### NFS

If you want to use nfs instead of the default shared filesystem of the provider, for example for performance reasons,
or cause the kernel module of the provider does problem, you need to install an nfs server.

#### Debian, elementary OS, Linux Mint, Ubuntu

```{.sh}
apt-get install nfs-kernel-server
```

#### Fedora

```{.sh}
yum install nfs-utils
```

#### Mageia

```{.sh}
urpmi nfs-utils
```

#### OpenSUSE

```{.sh}
zypper install nfs-kernel-server
```

[1]: https://www.vagrantup.com/downloads.html
[2]: https://www.virtualbox.org/wiki/Linux_Downloads
[3]: http://www.vmware.com/products/workstation
[4]: http://www.vagrantup.com/vmware


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="AppTheme" parent="AppTheme.Base">
        <item name="android:windowTranslucentStatus">true</item>
    </style>

    <style name="ToolBarStyle" parent="">
        <item name="popupTheme">@style/ThemeOverlay.AppCompat.Light</item>
        <item name="theme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
    </style>

	<style name="EditTextStyle">
	</style>
</resources>


text:
FROM chrisfranko/xgo-base

MAINTAINER Christopher Franko <chrisjfranko@gmail.com>

# Configure the root Go distribution and bootstrap based on it
ENV GO_VERSION 153

RUN \
  export ROOT_DIST=https://storage.googleapis.com/golang/go1.5.3.linux-amd64.tar.gz     && \
  export ROOT_DIST_SHA=43afe0c5017e502630b1aea4d44b8a7f059bf60d7f29dfd58db454d4e4e0ae53 && \
  \
  $BOOTSTRAP_PURE