text:
The MIT License (MIT)

Copyright (c) 2014-2015 David McCuskey

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

--]]

--====================================================================--
--== DMC Corona Library : DMC WAMP Auth
--====================================================================--

--[[
Wamp support adapted from:
* AutobahnPython (https://github.com/tavendo/AutobahnPython/)
--]]

-- Semantic Versioning Specification: http://semver.org/

local VERSION = "0.1.0"

--====================================================================--
--== Imports

local assert = assert
local crypto = require 'crypto'
local mime = require 'mime'
local mbase64_encode = mime.b64
local type = type

--====================================================================--
--== Setup, Constants

-- The characters from which :func:`autobahn.wamp.auth.generate_wcs`
-- generates secrets
local WCS_SECRET_CHARSET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"

--====================================================================--
--== Support Functions

local function generate_totp_secret( length )
	-- print( "dmc_wamp.auth.generate_totp_secret ", length )
	--==--
	length = length or 10

	assert( type( length ) == 'number' )

	error( "not implemented" )
end

local function compute_totp( secret, offset )
	-- print( "dmc_wamp.auth.compute_totp ", secret, offset )
	--==--
	offset = offset or 0

	assert( type( secret ) == 'string' )
	assert( type( length ) == 'number' )

	error( "not implemented" )
end

local function pbkdf2( params )
	-- print( "dmc_wamp.auth.pbkdf2 ", params )
	params = params or {}
	--==--
	local data, salt = params.data, params.salt
	local iterations = params.iterations or 1000
	local keylen = params.keylen or 32
	local hashfunc = params.hashfunc or crypto.sha256

	assert( type( data ) == 'string' )
	assert( type( salt ) == 'string' )
	assert( type( iterations ) == 'number' )
	assert( type( keylen ) == 'number' )
	assert( type( hashfunc ) == 'function' )

	-- return _pdkdf2( data, salt, iterations, keylen, hashfunc )
	error( "not implemented" )

end

local function derive_key( params )
	-- print( "dmc_wamp.auth.derive_key ", params )
	params = params or {}
	--==--
	local secret, salt = params.secret, params.salt
	local iterations = params.iterations or 1000
	local keylen = params.keylen or 32

	assert( type( secret ) == 'string' )
	assert( type( salt ) == 'string' )
	assert( type( iterations ) == 'number' )
	assert( type( keylen ) == 'number' )

	error( "not implemented" )
end

local function generate_wcs( length )
	-- print( "dmc_wamp.auth.generate_wcs ", length )
	--==--
	length = length or 10

	assert( type( length ) == 'number' )

	error( "not implemented" )
end

local function compute_wcs( key, challenge )
	-- print( "dmc_wamp.auth.compute_wcs ", key, challenge )
	--==--
	assert( type( key ) == 'string' )
	assert( type( challenge ) == 'string' )

	local sig = crypto.hmac( crypto.sha256, challenge, key, true )
	return mbase64_encode( sig )
end

--====================================================================--
--== Auth Exports
--====================================================================--

return {
	generate_totp_secret=generate_totp_secret,
	compute_totp=compute_totp,
	pbkdf2=pbkdf2,
	derive_key=derive_key,
	generate_wcs=generate_wcs,
	compute_wcs=compute_wcs
}


text:
package org.drools.decisiontable.parser;

import java.util.Properties;

import org.drools.decisiontable.parser.xls.PropertiesSheetListener.CaseInsensitiveMap;
import org.drools.template.model.Package;
import org.drools.template.parser.DataListener;

/**
 *
 * SheetListener used for creating rules
 */
public interface RuleSheetListener extends DataListener {

    /**
     * Return the rule sheet properties
     */
    public abstract CaseInsensitiveMap getProperties();

    /**
     * Build the final ruleset as parsed.
     */
    public abstract Package getRuleSet();

}

redpajama_set_name: RedPajamaGithub


text:
// Code generated by protoc-gen-go.
// source: RSVP.proto
// DO NOT EDIT!

/*
Package proto is a generated protocol buffer package.

It is generated from these files:
	RSVP.proto

It has these top-level messages:
	Invitee
	InviteeRequest
*/
package proto

import proto1 "github.com/golang/protobuf/proto"
import math "math"

import (
	context "golang.org/x/net/context"
	grpc "google.golang.org/grpc"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto1.Marshal
var _ = math.Inf

type Invitee struct {
	InviteeId        *string `protobuf:"bytes,1,req" json:"InviteeId,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (m *Invitee) Reset()         { *m = Invitee{} }
func (m *Invitee) String() string { return proto1.CompactTextString(m) }
func (*Invitee) ProtoMessage()    {}

func (m *Invitee) GetInviteeId() string {
	if m != nil && m.InviteeId != nil {
		return *m.InviteeId
	}
	return ""
}

type InviteeRequest struct {
	Id               *string `protobuf:"bytes,1,req,name=id" json:"id,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (m *InviteeRequest) Reset()         { *m = InviteeRequest{} }
func (m *InviteeRequest) String() string { return proto1.CompactTextString(m) }
func (*InviteeRequest) ProtoMessage()    {}

func (m *InviteeRequest) GetId() string {
	if m != nil && m.Id != nil {
		return *m.Id
	}
	return ""
}

// Client API for RSVP service

type RSVPClient interface {
	// Obtains an invitee based on the id
	GetInvitee(ctx context.Context, in *InviteeRequest, opts ...grpc.CallOption) (*Invitee, error)
}

type rSVPClient struct {
	cc *grpc.ClientConn
}

func NewRSVPClient(cc *grpc.ClientConn) RSVPClient {
	return &rSVPClient{cc}
}

func (c *rSVPClient) GetInvitee(ctx context.Context, in *InviteeRequest, opts ...grpc.CallOption) (*Invitee, error) {
	out := new(Invitee)
	err := grpc.Invoke(ctx, "/proto.RSVP/GetInvitee", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// Server API for RSVP service

type RSVPServer interface {
	// Obtains an invitee based on the id
	GetInvitee(context.Context, *InviteeRequest) (*Invitee, error)
}

func RegisterRSVPServer(s *grpc.Server, srv RSVPServer) {
	s.RegisterService(&_RSVP_serviceDesc, srv)
}

func _RSVP_GetInvitee_Handler(srv interface{}, ctx context.Context, codec grpc.Codec, buf []byte) (interface{}, error) {
	in := new(InviteeRequest)
	if err := codec.Unmarshal(buf, in); err != nil {
		return nil, err
	}
	out, err := srv.(RSVPServer).GetInvitee(ctx, in)
	if err != nil {
		return nil, err
	}
	return out, nil
}

var _RSVP_serviceDesc = grpc.ServiceDesc{
	ServiceName: "proto.RSVP",
	HandlerType: (*RSVPServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetInvitee",
			Handler:    _RSVP_GetInvitee_Handler,
		},
	},
	Streams: []grpc.StreamDesc{},
}


text:
package org.jivesoftware.smackx.muc.packet;
import org.jivesoftware.smack.packet.IQ;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * IQ stanza(/packet) that serves for granting and revoking ownership privileges, granting
 * and revoking administrative privileges and destroying a room. All these operations
 * are scoped by the 'http://jabber.org/protocol/muc#owner' namespace.
 *
 * @author Gaston Dombiak
 */
public class MUCOwner extends IQ {

    public static final String ELEMENT = QUERY_ELEMENT;
    public static final String NAMESPACE = MUCInitialPresence.NAMESPACE + "#owner";

    private final List<MUCItem> items = new ArrayList<MUCItem>();
    private Destroy destroy;

    public MUCOwner() {
        super(ELEMENT, NAMESPACE);
    }

    /**
     * Returns a List of item childs that holds information about affiliation,
     * jids and nicks.
     *
     * @return a List of item childs that holds information about affiliation,
     *          jids and nicks.
     */
    public List<MUCItem> getItems() {
        synchronized (items) {
            return Collections.unmodifiableList(new ArrayList<MUCItem>(items));
        }
    }

    /**
     * Returns a request to the server to destroy a room. The sender of the request
     * should be the room's owner. If the sender of the destroy request is not the room's owner
     * then the server will answer a "Forbidden" error.
     *
     * @return a request to the server to destroy a room.
     */
    public Destroy getDestroy() {
        return destroy;
    }

    /**
     * Sets a request to the server to destroy a room. The sender of the request
     * should be the room's owner. If the sender of the destroy request is not the room's owner
     * then the server will answer a "Forbidden" error.
     *
     * @param destroy the request to the server to destroy a room.
     */
    public void setDestroy(Destroy destroy) {
        this.destroy = destroy;
    }

    /**
     * Adds an item child that holds information about affiliation, jids and nicks.
     *
     * @param item the item child that holds information about affiliation, jids and nicks.
     */
    public void addItem(MUCItem item) {
        synchronized (items) {
            items.add(item);
        }
    }

    @Override
    protected IQChildElementXmlStringBuilder getIQChildElementBuilder(IQChildElementXmlStringBuilder xml) {
        xml.rightAngleBracket();

        synchronized (items) {
            for (MUCItem item : items) {
                xml.append(item.toXML());
            }
        }
        xml.optElement(getDestroy());

        return xml;
    }

}


text:
#region License

#endregion License

using System;

namespace Microsoft.Xna.Framework
{
    public class GameTime
    {
        private TimeSpan elapsedGameTime;
        private TimeSpan elapsedRealTime;
        private bool isRunningSlowly;
        private TimeSpan totalGameTime;
        private TimeSpan totalRealTime;

        public GameTime()
        {
        }

        public GameTime(TimeSpan totalRealTime, TimeSpan elapsedRealTime, TimeSpan totalGameTime, TimeSpan elapsedGameTime)
            : this(totalRealTime, elapsedRealTime, totalGameTime, elapsedGameTime, false)
        {
        }

        public GameTime(TimeSpan totalRealTime, TimeSpan elapsedRealTime, TimeSpan totalGameTime, TimeSpan elapsedGameTime, bool isRunningSlowly)
        {
            this.totalRealTime = totalRealTime;
            this.elapsedRealTime = elapsedRealTime;
            this.totalGameTime = totalGameTime;
            this.elapsedGameTime = elapsedGameTime;
            this.isRunningSlowly = isRunningSlowly;
        }

        public TimeSpan ElapsedGameTime
        {
            get { return elapsedGameTime; }
            internal set { elapsedGameTime = value; }
        }

        public TimeSpan ElapsedRealTime
        {
            get { return elapsedRealTime; }
            internal set { elapsedRealTime = value; }
        }

        public bool IsRunningSlowly
        {
            get { return isRunningSlowly; }
            internal set { isRunningSlowly = value; }
        }

        public TimeSpan TotalGameTime
        {
            get { return totalGameTime; }
            internal set { totalGameTime = value; }
        }

        public TimeSpan TotalRealTime
        {
            get { return totalRealTime; }
            internal set { totalRealTime = value; }
        }
    }
}


text:
<!DOCTYPE html>

	<title>

            Schlumberger Reservoir Laboratory -

    Complete profile - Canadian Company Capabilities - Industries and Business - Industry Canada
  </title>

<meta charset="utf-8" />
<meta name="dcterms.language" title="ISO639-2" content="eng" />
<meta name="dcterms.title" content="" />
<meta name="description" content="" />
<meta name="dcterms.description" content="" />
<meta name="dcterms.type" content="report, data set" />
<meta name="dcterms.subject" content="businesses, industry" />
<meta name="dcterms.subject" content="businesses, industry" />
<meta name="dcterms.issued" title="W3CDTF" content="" />
<meta name="dcterms.modified" title="W3CDTF" content="" />
<meta name="keywords" content="" />

<meta name="dcterms.creator" content="" />
<meta name="author" content="" />
<meta name="dcterms.created" title="W3CDTF" content="" />
<meta name="dcterms.publisher" content="" />
<meta name="dcterms.audience" title="icaudience" content="" />
<meta name="dcterms.spatial" title="ISO3166-1" content="" />
<meta name="dcterms.spatial" title="gcgeonames" content="" />
<meta name="dcterms.format" content="HTML" />
<meta name="dcterms.identifier" title="ICsiteProduct" content="536" />

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta content="width=device-width,initial-scale=1" name="viewport">

<meta name = "format-detection" content = "telephone=no">

<meta name="robots" content="noarchive">

<link href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/favicon.ico" rel="icon" type="image/x-icon">
<link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/wet-boew.min.css">

<link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/theme.min.css">

<link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/noscript.min.css" />

<link rel="stylesheet" href="/eic/home.nsf/css/add_WET_4-0_Canada_Apps.css">

  	<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
  	<link href="/app/ccc/srch/css/print.css" media="print" rel="stylesheet" type="text/css" />

<meta property="legalName" content="Department_of_Industry">

Skip to main content

Skip to "About this site"

Language selection

Français

<object type="image/svg+xml" tabindex="-1" data="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/sig-blk-en.svg"></object> Government of Canada

Search and menus

Search and menus

Topics menu

Jobs

Immigration

Travel

Business

Benefits

Health

Taxes

More services

You are here:

Home

Industries and Business

Canadian Company Capabilities

<input id="showMore" type="hidden" value='more'/>
<input id="showLess" type="hidden" value='less'/>

 Company profile - Canadian Company Capabilities

New Search |

<form name="searchForm" method="post" action="/app/ccc/srch/bscSrch.do">

          <input type="hidden" name="lang" value="eng" />
          <input type="hidden" name="profileId" value="" />
          <input type="hidden" name="prtl" value="1" />
          <input type="hidden" name="searchPage" value="%2Fapp%2Fccc%2Fsrch%2FcccBscSrch.do%3Flang%3Deng%26amp%3Bprtl%3D1%26amp%3Btagid%3D"  />

          <input type="hidden" name="V_SEARCH.scopeCategory" value="CCC.Root" />

          <input type="hidden" name="V_SEARCH.depth" value="1" />
          <input type="hidden" name="V_SEARCH.showStricts" value="false" />
          <input id="repeatSearchBtn" class="btn btn-link" type="submit" value="Return to search results" />

  </form>

| Previous Company

| Next Company

      Third-Party Information Liability Disclaimer

Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.

      Schlumberger Canada Limited

Legal Name:

Schlumberger Canada Limited

Operating Name:

Schlumberger Reservoir Laboratory

http://www.slb.com/labs

info@gushor.com

Mailing Address:

              	<address class="mrgn-bttm-md">

                   2-925 30th St NE

                    CALGARY,

                    Alberta

                  T2A 5L7

                </address>

Location Address:

              	         <address class="mrgn-bttm-md">

                   2-925 30th St NE

                    CALGARY,

                    Alberta

                  T2A 5L7

                         </address>

Tel.:
		      (403) 457-4874

Fax:
		      (403) 457-4875

Logo

Company Profile

            HOUSTON, June 18, 2013—Schlumberger announced today that it has acquired Gushor Inc., a Canadian-based petroleum geochemistry and fluid analysis company that provides innovative production and exploration solutions in the heavy oil and oil sand (HOOS) industry.

A University of Calgary spin-off, formed in 2006, Gushor specializes in the integration of geology, fluid properties, petroleum geochemistry and reservoir engineering information.

"The addition of Gushor will enable us to better support our E&P customers by complementing our leading fluids and rocks technology portfolio with geochemical and fluid property analysis capabilities," said Sameh Hanna, president, Testing Services, Schlumberger.

"As a Schlumberger company, we will be able to further the mainstream adoption of our petroleum geochemistry and fluid analysis solutions, and expand our client services infrastructure by leveraging Schlumberger technology and development expertise," said Steve Larter, CEO, Gushor.

Gushor is based in Calgary, Canada and operates worldwide with a proven track record of more than 300 projects, completed with various oil and gas companies, on all major continents. The company applies knowledge of geochemical and physical properties of fluids in production optimization by describing and capitalizing on heterogeneous fluid property distribution in reservoirs.

				Full profile

				Full profile

				Contact information

                Richard
                Stephens

                  Title:

                Manager

                    Area of Responsibility:

                    Domestic Sales & Marketing,

                    Export Sales & Marketing.

                  Telephone:

                (403) 457-4874

                  Ext:

                102

                  Facsimile:

                (403) 457-4875

                    Email:

                  rstephens@gushor.com

  top of page

				Company description

            Country of Ownership:

              Canada

              Year Established:

            2006

            Exporting:

              No

                Primary Industry (NAICS):

				541690 - Other Scientific and Technical Consulting Services

            Alternate Industries (NAICS):

            213118 - Services to Oil and Gas Extraction

            541380 - Testing Laboratories

            541710 - Research and Development in the Physical, Engineering and Life Sciences

            Primary Business Activity:

            Services

              Number of Employees:

            15

				Product / Service / Licensing

                              Service Name:

                            Geosciences Solutions

                            We specialize in the development of rapid and cost saving analytical methods to better characterize fluid properties to achieve accurate resource assessment.  Some of our application is based on high resolution quantitative compositional logs that include identification of fluid flow barriers (e.g. shales) in vertical wells, and through interpretation of compositional variations along horizontal wells to allocate production.

                              Service Name:

                            Analytical Services

                            Oil, water and gas all document an integrated history of subsurface processes

Monitoring of fluid compositions prior to, during development, and during a recovery operation can assist in optimizing recovery and reducing costs.  Gushor Inc. routinely provides our clients with fluid and gas characterization and analysis.

Gushor provides analytical services in four major areas:

•Heavy and Conventional Oil Analysis

•Water Chemistry

•Gas Analysis

•Geochemistry

  top of page

					Technology profile

            IS YOUR VISCOSITY DATA CONSISTENT AND RELIABLE?

Heavy oil or bitumen core samples require centrifugation for long periods of time under partial vacuum, resulting in the preferential loss of volatile (light end) oil compounds, and significant increases in viscosity of the oil sample during extraction. The longer the centrifugation process the greater the light-end volatilization from the extracted sample, and the greater the increase in oil viscosity. In addition, the pressure applied by centrifugal force is much greater than production or geologic burial pressures, and is unique to each style of centrifuge, resulting in varying amounts of extracted bitumen of varying compositions. We have developed proprietary mechanical extraction methods to obtain oil samples without use of solvents or losses of light ends.

PlungerTM; Benefits:

•Preserves light ends lost in centrifugation.

•No fractionation of oil.

•Removes extraneous clay, solids, and water more effectively.

•Requires a smaller quantity of sample than current industry standards.

•Applies transient short-lived maximum pressure comparable to geological burial depths of 3 to 4 km.

•Increases the amount of sample collected.

•Permits live-oil viscosity measurement.

•Enables viscosity and density profiling of horizontal and vertical delineation wells using core or cuttings, and

•Extraction time reduced to as little as 30 minutes!

					Market profile

                          Industry sector market interests:

Mining/Petroleum/Gas

  top of page

					Third-Party Information Liability Disclaimer

					Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.

				Contacts

				Contact information

                Richard
                Stephens

                  Title:

                Manager

                    Area of Responsibility:

                    Domestic Sales & Marketing,

                    Export Sales & Marketing.

                  Telephone:

                (403) 457-4874

                  Ext:

                102

                  Facsimile:

                (403) 457-4875

                    Email:

                  rstephens@gushor.com

				Description

				Company description

            Country of Ownership:

              Canada

              Year Established:

            2006

            Exporting:

              No

                Primary Industry (NAICS):

				541690 - Other Scientific and Technical Consulting Services

            Alternate Industries (NAICS):

            213118 - Services to Oil and Gas Extraction

            541380 - Testing Laboratories

            541710 - Research and Development in the Physical, Engineering and Life Sciences

            Primary Business Activity:

            Services

              Number of Employees:

            15

				Products, services and licensing

				Product / Service / Licensing

                              Service Name:

                            Geosciences Solutions

                            We specialize in the development of rapid and cost saving analytical methods to better characterize fluid properties to achieve accurate resource assessment.  Some of our application is based on high resolution quantitative compositional logs that include identification of fluid flow barriers (e.g. shales) in vertical wells, and through interpretation of compositional variations along horizontal wells to allocate production.

                              Service Name:

                            Analytical Services

                            Oil, water and gas all document an integrated history of subsurface processes

Monitoring of fluid compositions prior to, during development, and during a recovery operation can assist in optimizing recovery and reducing costs.  Gushor Inc. routinely provides our clients with fluid and gas characterization and analysis.

Gushor provides analytical services in four major areas:

•Heavy and Conventional Oil Analysis

•Water Chemistry

•Gas Analysis

•Geochemistry

							Technology

							Technology profile

            IS YOUR VISCOSITY DATA CONSISTENT AND RELIABLE?

Heavy oil or bitumen core samples require centrifugation for long periods of time under partial vacuum, resulting in the preferential loss of volatile (light end) oil compounds, and significant increases in viscosity of the oil sample during extraction. The longer the centrifugation process the greater the light-end volatilization from the extracted sample, and the greater the increase in oil viscosity. In addition, the pressure applied by centrifugal force is much greater than production or geologic burial pressures, and is unique to each style of centrifuge, resulting in varying amounts of extracted bitumen of varying compositions. We have developed proprietary mechanical extraction methods to obtain oil samples without use of solvents or losses of light ends.

PlungerTM; Benefits:

•Preserves light ends lost in centrifugation.

•No fractionation of oil.

•Removes extraneous clay, solids, and water more effectively.

•Requires a smaller quantity of sample than current industry standards.

•Applies transient short-lived maximum pressure comparable to geological burial depths of 3 to 4 km.

•Increases the amount of sample collected.

•Permits live-oil viscosity measurement.

•Enables viscosity and density profiling of horizontal and vertical delineation wells using core or cuttings, and

•Extraction time reduced to as little as 30 minutes!

					Market

					Market profile

                          Industry sector market interests:

Mining/Petroleum/Gas

    Last Update Date 2015-10-19

Date Modified:

      <time>2017-03-02</time>

About government

Contact us

Departments and agencies

Public service and military

News

Treaties, laws and regulations

Government-wide reporting

Prime Minister

How government works

Open government

About this site

Social media

Mobile applications

About Canada.ca

Terms and conditions

Privacy

Top of Page

<object type="image/svg+xml" tabindex="-1" role="img" data="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/wmms-blk.svg" aria-label="Symbol of the Government of Canada"></object>


text:
<?php

namespace Mastercel\ChartBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Horarios
 *
 * @ORM\Table(name="Horarios", indexes={@ORM\Index(name="Indice_1", columns={"StrHorario_ky"}), @ORM\Index(name="Indice_2", columns={"StrDescripcion"}), @ORM\Index(name="Indice_3", columns={"DteActualizacion"}), @ORM\Index(name="Indice_4", columns={"NumEstadoComunicacion"})})
 * @ORM\Entity
 */
class Horarios
{
    /**
     * @var integer
     *
     * @ORM\Column(name="NumHorario_id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $numhorarioId = '0';

    /**
     * @var string
     *
     * @ORM\Column(name="StrHorario_ky", type="string", length=10, nullable=true)
     */
    private $strhorarioKy;

    /**
     * @var string
     *
     * @ORM\Column(name="StrDescripcion", type="string", length=60, nullable=true)
     */
    private $strdescripcion;

    /**
     * @var integer
     *
     * @ORM\Column(name="NumDiasPeriodo", type="integer", nullable=true)
     */
    private $numdiasperiodo = '0';

    /**
     * @var integer
     *
     * @ORM\Column(name="NumTipoDiaInicio", type="integer", nullable=true)
     */
    private $numtipodiainicio = '0';

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="TmeMinimoLaboral", type="datetime", nullable=true)
     */
    private $tmeminimolaboral;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="TmeJornadaLaboral", type="datetime", nullable=true)
     */
    private $tmejornadalaboral;

    /**
     * @var boolean
     *
     * @ORM\Column(name="LogPagarTiempoExtraEntrada", type="boolean", nullable=true)
     */
    private $logpagartiempoextraentrada = '0';

    /**
     * @var boolean
     *
     * @ORM\Column(name="LogPagarTiempoExtraSalida", type="boolean", nullable=true)
     */
    private $logpagartiempoextrasalida = '0';

    /**
     * @var boolean
     *
     * @ORM\Column(name="LogPagarTiempoExtraDisponerComida", type="boolean", nullable=true)
     */
    private $logpagartiempoextradisponercomida = '0';

    /**
     * @var boolean
     *
     * @ORM\Column(name="LogPagarTiempoExtraDiaDescanso", type="boolean", nullable=true)
     */
    private $logpagartiempoextradiadescanso = '0';

    /**
     * @var boolean
     *
     * @ORM\Column(name="LogPagarTiempoExtraDiaFestivo", type="boolean", nullable=true)
     */
    private $logpagartiempoextradiafestivo = '0';

    /**
     * @var boolean
     *
     * @ORM\Column(name="LogPagarPuntualidad", type="boolean", nullable=true)
     */
    private $logpagarpuntualidad = '0';

    /**
     * @var boolean
     *
     * @ORM\Column(name="LogDescontarRetardos", type="boolean", nullable=true)
     */
    private $logdescontarretardos = '0';

    /**
     * @var integer
     *
     * @ORM\Column(name="NumRetardosPeriodo", type="integer", nullable=true)
     */
    private $numretardosperiodo = '0';

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="TmeTiempoExtraMinimoJornada", type="datetime", nullable=true)
     */
    private $tmetiempoextraminimojornada;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="TmeTiempoExtraMaximoJornada", type="datetime", nullable=true)
     */
    private $tmetiempoextramaximojornada;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="TmeTiempoExtraDoblePeriodo", type="datetime", nullable=true)
     */
    private $tmetiempoextradobleperiodo;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="TmeTiempoExtraTriplePeriodo", type="datetime", nullable=true)
     */
    private $tmetiempoextratripleperiodo;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="TmeTiempoExtraMaximoPeriodo", type="datetime", nullable=true)
     */
    private $tmetiempoextramaximoperiodo;

    /**
     * @var integer
     *
     * @ORM\Column(name="NumCreadoPor_id", type="integer", nullable=true)
     */
    private $numcreadoporId = '0';

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="DteCreacion", type="datetime", nullable=true)
     */
    private $dtecreacion;

    /**
     * @var integer
     *
     * @ORM\Column(name="NumActualizadoPor_id", type="integer", nullable=true)
     */
    private $numactualizadoporId = '0';

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="DteActualizacion", type="datetime", nullable=true)
     */
    private $dteactualizacion;

    /**
     * @var integer
     *
     * @ORM\Column(name="NumEstadoComunicacion", type="integer", nullable=true)
     */
    private $numestadocomunicacion = '0';

    /**
     * Get numhorarioId
     *
     * @return integer
     */
    public function getNumhorarioId()
    {
        return $this->numhorarioId;
    }

    /**
     * Set strhorarioKy
     *
     * @param string $strhorarioKy
     * @return Horarios
     */
    public function setStrhorarioKy($strhorarioKy)
    {
        $this->strhorarioKy = $strhorarioKy;

        return $this;
    }

    /**
     * Get strhorarioKy
     *
     * @return string
     */
    public function getStrhorarioKy()
    {
        return $this->strhorarioKy;
    }

    /**
     * Set strdescripcion
     *
     * @param string $strdescripcion
     * @return Horarios
     */
    public function setStrdescripcion($strdescripcion)
    {
        $this->strdescripcion = $strdescripcion;

        return $this;
    }

    /**
     * Get strdescripcion
     *
     * @return string
     */
    public function getStrdescripcion()
    {
        return $this->strdescripcion;
    }

    /**
     * Set numdiasperiodo
     *
     * @param integer $numdiasperiodo
     * @return Horarios
     */
    public function setNumdiasperiodo($numdiasperiodo)
    {
        $this->numdiasperiodo = $numdiasperiodo;

        return $this;
    }

    /**
     * Get numdiasperiodo
     *
     * @return integer
     */
    public function getNumdiasperiodo()
    {
        return $this->numdiasperiodo;
    }

    /**
     * Set numtipodiainicio
     *
     * @param integer $numtipodiainicio
     * @return Horarios
     */
    public function setNumtipodiainicio($numtipodiainicio)
    {
        $this->numtipodiainicio = $numtipodiainicio;

        return $this;
    }

    /**
     * Get numtipodiainicio
     *
     * @return integer
     */
    public function getNumtipodiainicio()
    {
        return $this->numtipodiainicio;
    }

    /**
     * Set tmeminimolaboral
     *
     * @param \DateTime $tmeminimolaboral
     * @return Horarios
     */
    public function setTmeminimolaboral($tmeminimolaboral)
    {
        $this->tmeminimolaboral = $tmeminimolaboral;

        return $this;
    }

    /**
     * Get tmeminimolaboral
     *
     * @return \DateTime
     */
    public function getTmeminimolaboral()
    {
        return $this->tmeminimolaboral;
    }

    /**
     * Set tmejornadalaboral
     *
     * @param \DateTime $tmejornadalaboral
     * @return Horarios
     */
    public function setTmejornadalaboral($tmejornadalaboral)
    {
        $this->tmejornadalaboral = $tmejornadalaboral;

        return $this;
    }

    /**
     * Get tmejornadalaboral
     *
     * @return \DateTime
     */
    public function getTmejornadalaboral()
    {
        return $this->tmejornadalaboral;
    }

    /**
     * Set logpagartiempoextraentrada
     *
     * @param boolean $logpagartiempoextraentrada
     * @return Horarios
     */
    public function setLogpagartiempoextraentrada($logpagartiempoextraentrada)
    {
        $this->logpagartiempoextraentrada = $logpagartiempoextraentrada;

        return $this;
    }

    /**
     * Get logpagartiempoextraentrada
     *
     * @return boolean
     */
    public function getLogpagartiempoextraentrada()
    {
        return $this->logpagartiempoextraentrada;
    }

    /**
     * Set logpagartiempoextrasalida
     *
     * @param boolean $logpagartiempoextrasalida
     * @return Horarios
     */
    public function setLogpagartiempoextrasalida($logpagartiempoextrasalida)
    {
        $this->logpagartiempoextrasalida = $logpagartiempoextrasalida;

        return $this;
    }

    /**
     * Get logpagartiempoextrasalida
     *
     * @return boolean
     */
    public function getLogpagartiempoextrasalida()
    {
        return $this->logpagartiempoextrasalida;
    }

    /**
     * Set logpagartiempoextradisponercomida
     *
     * @param boolean $logpagartiempoextradisponercomida
     * @return Horarios
     */
    public function setLogpagartiempoextradisponercomida($logpagartiempoextradisponercomida)
    {
        $this->logpagartiempoextradisponercomida = $logpagartiempoextradisponercomida;

        return $this;
    }

    /**
     * Get logpagartiempoextradisponercomida
     *
     * @return boolean
     */
    public function getLogpagartiempoextradisponercomida()
    {
        return $this->logpagartiempoextradisponercomida;
    }

    /**
     * Set logpagartiempoextradiadescanso
     *
     * @param boolean $logpagartiempoextradiadescanso
     * @return Horarios
     */
    public function setLogpagartiempoextradiadescanso($logpagartiempoextradiadescanso)
    {
        $this->logpagartiempoextradiadescanso = $logpagartiempoextradiadescanso;

        return $this;
    }

    /**
     * Get logpagartiempoextradiadescanso
     *
     * @return boolean
     */
    public function getLogpagartiempoextradiadescanso()
    {
        return $this->logpagartiempoextradiadescanso;
    }

    /**
     * Set logpagartiempoextradiafestivo
     *
     * @param boolean $logpagartiempoextradiafestivo
     * @return Horarios
     */
    public function setLogpagartiempoextradiafestivo($logpagartiempoextradiafestivo)
    {
        $this->logpagartiempoextradiafestivo = $logpagartiempoextradiafestivo;

        return $this;
    }

    /**
     * Get logpagartiempoextradiafestivo
     *
     * @return boolean
     */
    public function getLogpagartiempoextradiafestivo()
    {
        return $this->logpagartiempoextradiafestivo;
    }

    /**
     * Set logpagarpuntualidad
     *
     * @param boolean $logpagarpuntualidad
     * @return Horarios
     */
    public function setLogpagarpuntualidad($logpagarpuntualidad)
    {
        $this->logpagarpuntualidad = $logpagarpuntualidad;

        return $this;
    }

    /**
     * Get logpagarpuntualidad
     *
     * @return boolean
     */
    public function getLogpagarpuntualidad()
    {
        return $this->logpagarpuntualidad;
    }

    /**
     * Set logdescontarretardos
     *
     * @param boolean $logdescontarretardos
     * @return Horarios
     */
    public function setLogdescontarretardos($logdescontarretardos)
    {
        $this->logdescontarretardos = $logdescontarretardos;

        return $this;
    }

    /**
     * Get logdescontarretardos
     *
     * @return boolean
     */
    public function getLogdescontarretardos()
    {
        return $this->logdescontarretardos;
    }

    /**
     * Set numretardosperiodo
     *
     * @param integer $numretardosperiodo
     * @return Horarios
     */
    public function setNumretardosperiodo($numretardosperiodo)
    {
        $this->numretardosperiodo = $numretardosperiodo;

        return $this;
    }

    /**
     * Get numretardosperiodo
     *
     * @return integer
     */
    public function getNumretardosperiodo()
    {
        return $this->numretardosperiodo;
    }

    /**
     * Set tmetiempoextraminimojornada
     *
     * @param \DateTime $tmetiempoextraminimojornada
     * @return Horarios
     */
    public function setTmetiempoextraminimojornada($tmetiempoextraminimojornada)
    {
        $this->tmetiempoextraminimojornada = $tmetiempoextraminimojornada;

        return $this;
    }

    /**
     * Get tmetiempoextraminimojornada
     *
     * @return \DateTime
     */
    public function getTmetiempoextraminimojornada()
    {
        return $this->tmetiempoextraminimojornada;
    }

    /**
     * Set tmetiempoextramaximojornada
     *
     * @param \DateTime $tmetiempoextramaximojornada
     * @return Horarios
     */
    public function setTmetiempoextramaximojornada($tmetiempoextramaximojornada)
    {
        $this->tmetiempoextramaximojornada = $tmetiempoextramaximojornada;

        return $this;
    }

    /**
     * Get tmetiempoextramaximojornada
     *
     * @return \DateTime
     */
    public function getTmetiempoextramaximojornada()
    {
        return $this->tmetiempoextramaximojornada;
    }

    /**
     * Set tmetiempoextradobleperiodo
     *
     * @param \DateTime $tmetiempoextradobleperiodo
     * @return Horarios
     */
    public function setTmetiempoextradobleperiodo($tmetiempoextradobleperiodo)
    {
        $this->tmetiempoextradobleperiodo = $tmetiempoextradobleperiodo;

        return $this;
    }

    /**
     * Get tmetiempoextradobleperiodo
     *
     * @return \DateTime
     */
    public function getTmetiempoextradobleperiodo()
    {
        return $this->tmetiempoextradobleperiodo;
    }

    /**
     * Set tmetiempoextratripleperiodo
     *
     * @param \DateTime $tmetiempoextratripleperiodo
     * @return Horarios
     */
    public function setTmetiempoextratripleperiodo($tmetiempoextratripleperiodo)
    {
        $this->tmetiempoextratripleperiodo = $tmetiempoextratripleperiodo;

        return $this;
    }

    /**
     * Get tmetiempoextratripleperiodo
     *
     * @return \DateTime
     */
    public function getTmetiempoextratripleperiodo()
    {
        return $this->tmetiempoextratripleperiodo;
    }

    /**
     * Set tmetiempoextramaximoperiodo
     *
     * @param \DateTime $tmetiempoextramaximoperiodo
     * @return Horarios
     */
    public function setTmetiempoextramaximoperiodo($tmetiempoextramaximoperiodo)
    {
        $this->tmetiempoextramaximoperiodo = $tmetiempoextramaximoperiodo;

        return $this;
    }

    /**
     * Get tmetiempoextramaximoperiodo
     *
     * @return \DateTime
     */
    public function getTmetiempoextramaximoperiodo()
    {
        return $this->tmetiempoextramaximoperiodo;
    }

    /**
     * Set numcreadoporId
     *
     * @param integer $numcreadoporId
     * @return Horarios
     */
    public function setNumcreadoporId($numcreadoporId)
    {
        $this->numcreadoporId = $numcreadoporId;

        return $this;
    }

    /**
     * Get numcreadoporId
     *
     * @return integer
     */
    public function getNumcreadoporId()
    {
        return $this->numcreadoporId;
    }

    /**
     * Set dtecreacion
     *
     * @param \DateTime $dtecreacion
     * @return Horarios
     */
    public function setDtecreacion($dtecreacion)
    {
        $this->dtecreacion = $dtecreacion;

        return $this;
    }

    /**
     * Get dtecreacion
     *
     * @return \DateTime
     */
    public function getDtecreacion()
    {
        return $this->dtecreacion;
    }

    /**
     * Set numactualizadoporId
     *
     * @param integer $numactualizadoporId
     * @return Horarios
     */
    public function setNumactualizadoporId($numactualizadoporId)
    {
        $this->numactualizadoporId = $numactualizadoporId;

        return $this;
    }

    /**
     * Get numactualizadoporId
     *
     * @return integer
     */
    public function getNumactualizadoporId()
    {
        return $this->numactualizadoporId;
    }

    /**
     * Set dteactualizacion
     *
     * @param \DateTime $dteactualizacion
     * @return Horarios
     */
    public function setDteactualizacion($dteactualizacion)
    {
        $this->dteactualizacion = $dteactualizacion;

        return $this;
    }

    /**
     * Get dteactualizacion
     *
     * @return \DateTime
     */
    public function getDteactualizacion()
    {
        return $this->dteactualizacion;
    }

    /**
     * Set numestadocomunicacion
     *
     * @param integer $numestadocomunicacion
     * @return Horarios
     */
    public function setNumestadocomunicacion($numestadocomunicacion)
    {
        $this->numestadocomunicacion = $numestadocomunicacion;

        return $this;
    }

    /**
     * Get numestadocomunicacion
     *
     * @return integer
     */
    public function getNumestadocomunicacion()
    {
        return $this->numestadocomunicacion;
    }
}


text:
import { updateListeners } from 'core/vdom/helpers'

function updateDOMListeners (oldVnode, vnode) {
  if (!oldVnode.data.on && !vnode.data.on) {
    return
  }
  const on = vnode.data.on || {}
  const oldOn = oldVnode.data.on || {}
  const add = vnode.elm._v_add || (vnode.elm._v_add = (event, handler, capture) => {
    vnode.elm.addEventListener(event, handler, capture)
  })
  const remove = vnode.elm._v_remove || (vnode.elm._v_remove = (event, handler) => {
    vnode.elm.removeEventListener(event, handler)
  })
  updateListeners(on, oldOn, add, remove, vnode.context)
}

export default {
  create: updateDOMListeners,
  update: updateDOMListeners
}


text:
# laravel-service-provider
A symfony like approach to Laravel's service providers.

## Why oh why?
* I got fed up with creating the same service provider logic over...and over...and over again.
* Laravel's approach to dependency injection is unit testable, which makes me happy.
* If I have a common approach to service provider logic, I need fewer unit tests, which makes our final product easier to maintain.
* Laravel's approach to dependency injection is a bit harder to grasp for those of us who started with Symfony2 or no DI at all.
* Configuration is much easier to update than code.

## How does it all work?
* Tell Laravel about your package, by updating `app/config/app.php`.
* Tell your Package's Service Provider what alias it should have, and where resources exist.
* Our service provider discovers the configuration provided (or you can offer an array), and creates the bindings necessary on the app container.

## Usage
```
<?php
namespace MyPackage\Path;

class MyPackageProvider extends \TestsAlwaysIncluded\Laravel\ServiceProvider
{
  /** @var string */
  const PACKAGE_ALIAS = 'mypackage';

  /** {@inheritdoc} */
  public function boot()
  {
    $this->package('MyPackage\Path', static::PACKAGE_ALIAS, __DIR__.'/../Resources');
    $this->bindCommands('mypackage::commands');
  }

  /** {@inheritdoc} */
  public function register()
  {
    $this->package('MyPackage\Path', static::PACKAGE_ALIAS, __DIR__.'/../Resources');
    $ths->bindServices('mypackage::services');
  }
}
```

## Gotchas
* Watch out for services that depend on defered services.
* This won't handle things like `- imports`
* How to handle global overrides are up to you
  * (i.e. `app/config/local/mypackage.php` wont automatically override `MyPackage\Path\Resources\config\mypackage.php`)

## Needs work
* Laravel 4's `provides()` doesn't discover the config correctly. For now, just manually list the ones you need.


text:
package systemcfg

import (
	"fmt"
	"os"
	"strconv"
	"strings"

	enpt "github.com/vmware/harbor/src/adminserver/systemcfg/encrypt"
	"github.com/vmware/harbor/src/adminserver/systemcfg/store"
	"github.com/vmware/harbor/src/adminserver/systemcfg/store/encrypt"
	"github.com/vmware/harbor/src/adminserver/systemcfg/store/json"
	"github.com/vmware/harbor/src/common"
	comcfg "github.com/vmware/harbor/src/common/config"
	"github.com/vmware/harbor/src/common/utils/log"
)

const (
	defaultJSONCfgStorePath string = "/etc/adminserver/config/config.json"
	defaultKeyPath          string = "/etc/adminserver/key"
)

var (
	// CfgStore is a storage driver that configurations
	// can be read from and wrote to
	CfgStore store.Driver

	// attrs need to be encrypted or decrypted
	attrs = []string{
		common.EmailPassword,
		common.LDAPSearchPwd,
		common.MySQLPassword,
		common.AdminInitialPassword,
	}

	// all configurations need read from environment variables
	allEnvs = map[string]interface{}{
		common.ExtEndpoint: "EXT_ENDPOINT",
		common.AUTHMode:    "AUTH_MODE",
		common.SelfRegistration: &parser{
			env:   "SELF_REGISTRATION",
			parse: parseStringToBool,
		},
		common.DatabaseType: "DATABASE_TYPE",
		common.MySQLHost:    "MYSQL_HOST",
		common.MySQLPort: &parser{
			env:   "MYSQL_PORT",
			parse: parseStringToInt,
		},
		common.MySQLUsername: "MYSQL_USR",
		common.MySQLPassword: "MYSQL_PWD",
		common.MySQLDatabase: "MYSQL_DATABASE",
		common.SQLiteFile:    "SQLITE_FILE",
		common.LDAPURL:       "LDAP_URL",
		common.LDAPSearchDN:  "LDAP_SEARCH_DN",
		common.LDAPSearchPwd: "LDAP_SEARCH_PWD",
		common.LDAPBaseDN:    "LDAP_BASE_DN",
		common.LDAPFilter:    "LDAP_FILTER",
		common.LDAPUID:       "LDAP_UID",
		common.LDAPScope: &parser{
			env:   "LDAP_SCOPE",
			parse: parseStringToInt,
		},
		common.LDAPTimeout: &parser{
			env:   "LDAP_TIMEOUT",
			parse: parseStringToInt,
		},
		common.EmailHost: "EMAIL_HOST",
		common.EmailPort: &parser{
			env:   "EMAIL_PORT",
			parse: parseStringToInt,
		},
		common.EmailUsername: "EMAIL_USR",
		common.EmailPassword: "EMAIL_PWD",
		common.EmailSSL: &parser{
			env:   "EMAIL_SSL",
			parse: parseStringToBool,
		},
		common.EmailFrom:     "EMAIL_FROM",
		common.EmailIdentity: "EMAIL_IDENTITY",
		common.RegistryURL:   "REGISTRY_URL",
		common.TokenExpiration: &parser{
			env:   "TOKEN_EXPIRATION",
			parse: parseStringToInt,
		},
		common.CfgExpiration: &parser{
			env:   "CFG_EXPIRATION",
			parse: parseStringToInt,
		},
		common.MaxJobWorkers: &parser{
			env:   "MAX_JOB_WORKERS",
			parse: parseStringToInt,
		},
		common.VerifyRemoteCert: &parser{
			env:   "VERIFY_REMOTE_CERT",
			parse: parseStringToBool,
		},
		common.ProjectCreationRestriction: "PROJECT_CREATION_RESTRICTION",
		common.AdminInitialPassword:       "HARBOR_ADMIN_PASSWORD",
		common.AdmiralEndpoint:            "ADMIRAL_URL",
		common.WithNotary: &parser{
			env:   "WITH_NOTARY",
			parse: parseStringToBool,
		},
		common.WithClair: &parser{
			env:   "WITH_CLAIR",
			parse: parseStringToBool,
		},
	}

	// configurations need read from environment variables
	// every time the system startup
	repeatLoadEnvs = map[string]interface{}{
		common.ExtEndpoint:   "EXT_ENDPOINT",
		common.MySQLPassword: "MYSQL_PWD",
		common.MaxJobWorkers: &parser{
			env:   "MAX_JOB_WORKERS",
			parse: parseStringToInt,
		},
		common.CfgExpiration: &parser{
			env:   "CFG_EXPIRATION",
			parse: parseStringToInt,
		},
		common.AdmiralEndpoint: "ADMIRAL_URL",
		common.WithNotary: &parser{
			env:   "WITH_NOTARY",
			parse: parseStringToBool,
		},
		common.WithClair: &parser{
			env:   "WITH_CLAIR",
			parse: parseStringToBool,
		},
	}
)

type parser struct {
	// the name of env
	env string
	// parse the value of env, e.g. parse string to int or
	// parse string to bool
	parse func(string) (interface{}, error)
}

func parseStringToInt(str string) (interface{}, error) {
	if len(str) == 0 {
		return 0, nil
	}
	return strconv.Atoi(str)
}

func parseStringToBool(str string) (interface{}, error) {
	return strings.ToLower(str) == "true" ||
		strings.ToLower(str) == "on", nil
}

// Init system configurations. If env RESET is set or configurations
// read from storage driver is null, load all configurations from env
func Init() (err error) {
	if err = initCfgStore(); err != nil {
		return err
	}

	loadAll := false
	cfgs := map[string]interface{}{}

	if os.Getenv("RESET") == "true" {
		log.Info("RESET is set, will load all configurations from environment variables")
		loadAll = true
	}

	if !loadAll {
		cfgs, err = CfgStore.Read()
		if cfgs == nil {
			log.Info("configurations read from storage driver are null, will load them from environment variables")
			loadAll = true
			cfgs = map[string]interface{}{}
		}
	}

	if err = LoadFromEnv(cfgs, loadAll); err != nil {
		return err
	}

	return CfgStore.Write(cfgs)
}

func initCfgStore() (err error) {
	path := os.Getenv("JSON_CFG_STORE_PATH")
	if len(path) == 0 {
		path = defaultJSONCfgStorePath
	}
	log.Infof("the path of json configuration storage: %s", path)

	CfgStore, err = json.NewCfgStore(path)
	if err != nil {
		return
	}

	kp := os.Getenv("KEY_PATH")
	if len(kp) == 0 {
		kp = defaultKeyPath
	}
	log.Infof("the path of key used by key provider: %s", kp)

	encryptor := enpt.NewAESEncryptor(
		comcfg.NewFileKeyProvider(kp), nil)

	CfgStore = encrypt.NewCfgStore(encryptor, attrs, CfgStore)
	return nil
}

// LoadFromEnv loads the configurations from allEnvs, if all is false, it just loads
// the repeatLoadEnvs
func LoadFromEnv(cfgs map[string]interface{}, all bool) error {
	envs := repeatLoadEnvs
	if all {
		envs = allEnvs
	}

	for k, v := range envs {
		if str, ok := v.(string); ok {
			cfgs[k] = os.Getenv(str)
			continue
		}

		if parser, ok := v.(*parser); ok {
			i, err := parser.parse(os.Getenv(parser.env))
			if err != nil {
				return err
			}
			cfgs[k] = i
			continue
		}

		return fmt.Errorf("%v is not string or parse type", v)
	}

	return nil
}


text:
require 'nokogiri'

class Premailer
  module Adapter
    # Nokogiri adapter
    module Nokogiri

      # Merge CSS into the HTML document.
      #
      # @return [String] an HTML.
      def to_inline_css
        doc = @processed_doc
        @unmergable_rules = CssParser::Parser.new

        # Give all styles already in style attributes a specificity of 1000
        # per http://www.w3.org/TR/CSS21/cascade.html#specificity
        doc.search("*[@style]").each do |el|
          el['style'] = '[SPEC=1000[' + el.attributes['style'] + ']]'
        end

        # Iterate through the rules and merge them into the HTML
        @css_parser.each_selector(:all) do |selector, declaration, specificity, media_types|
          # Save un-mergable rules separately
          selector.gsub!(/:link([\s]*)+/i) {|m| $1 }

          # Convert element names to lower case
          selector.gsub!(/([\s]|^)([\w]+)/) {|m| $1.to_s + $2.to_s.downcase }

          if Premailer.is_media_query?(media_types) || selector =~ Premailer::RE_UNMERGABLE_SELECTORS
            @unmergable_rules.add_rule_set!(CssParser::RuleSet.new(selector, declaration), media_types) unless @options[:preserve_styles]
          else
            begin
              if selector =~ Premailer::RE_RESET_SELECTORS
                # this is in place to preserve the MailChimp CSS reset: http://github.com/mailchimp/Email-Blueprints/
                # however, this doesn't mean for testing pur
                @unmergable_rules.add_rule_set!(CssParser::RuleSet.new(selector, declaration))  unless !@options[:preserve_reset]
              end

              # Change single ID CSS selectors into xpath so that we can match more
              # than one element.  Added to work around dodgy generated code.
              selector.gsub!(/\A\#([\w_\-]+)\Z/, '*[@id=\1]')

              doc.search(selector).each do |el|
                if el.elem? and (el.name != 'head' and el.parent.name != 'head')
                  # Add a style attribute or append to the existing one
                  block = "[SPEC=#{specificity}[#{declaration}]]"
                  el['style'] = (el.attributes['style'].to_s ||= '') + ' ' + block
                end
              end
            rescue  ::Nokogiri::SyntaxError, RuntimeError, ArgumentError
              $stderr.puts "CSS syntax error with selector: #{selector}" if @options[:verbose]
              next
            end
          end
        end

        # Remove script tags
        if @options[:remove_scripts]
          doc.search("script").remove
        end

        # Read STYLE attributes and perform folding
        doc.search("*[@style]").each do |el|
          style = el.attributes['style'].to_s

          declarations = []
          style.scan(/\[SPEC\=([\d]+)\[(.[^\]\]]*)\]\]/).each do |declaration|
            rs = CssParser::RuleSet.new(nil, declaration[1].to_s, declaration[0].to_i)
            declarations << rs
          end

          # Perform style folding
          merged = CssParser.merge(declarations)
          merged.expand_shorthand!

          # Duplicate CSS attributes as HTML attributes
          if Premailer::RELATED_ATTRIBUTES.has_key?(el.name)
            Premailer::RELATED_ATTRIBUTES[el.name].each do |css_att, html_att|
              el[html_att] = merged[css_att].gsub(/url\('(.*)'\)/,'\1').gsub(/;$|\s*!important/, '').strip if el[html_att].nil? and not merged[css_att].empty?
            end
          end

          # Collapse multiple rules into one as much as possible.
          merged.create_shorthand!

          # write the inline STYLE attribute
          el['style'] = Premailer.escape_string(merged.declarations_to_s).split(';').map(&:strip).sort.join('; ')
        end

        doc = write_unmergable_css_rules(doc, @unmergable_rules)

        if @options[:remove_classes] or @options[:remove_comments]
          doc.traverse do |el|
            if el.comment? and @options[:remove_comments]
              el.remove
            elsif el.element?
              el.remove_attribute('class') if @options[:remove_classes]
            end
          end
        end

        if @options[:remove_ids]
          # find all anchor's targets and hash them
          targets = []
          doc.search("a[@href^='#']").each do |el|
            target = el.get_attribute('href')[1..-1]
            targets << target
            el.set_attribute('href', "#" + Digest::MD5.hexdigest(target))
          end
          # hash ids that are links target, delete others
          doc.search("*[@id]").each do |el|
            id = el.get_attribute('id')
            if targets.include?(id)
              el.set_attribute('id', Digest::MD5.hexdigest(id))
            else
              el.remove_attribute('id')
            end
          end
        end

        if @options[:reset_contenteditable]
          doc.search('*[@contenteditable]').each do |el|
            el.remove_attribute('contenteditable')
          end
        end

        @processed_doc = doc
        if is_xhtml?
          # we don't want to encode carriage returns
          @processed_doc.to_xhtml(:encoding => @options[:output_encoding]).gsub(/&\#(xD|13);/i, "\r")
        else
          @processed_doc.to_html(:encoding => @options[:output_encoding])
        end
      end

      # Create a <tt>style</tt> element with un-mergable rules (e.g. <tt>:hover</tt>)
      # and write it into the <tt>body</tt>.
      #
      # <tt>doc</tt> is an Nokogiri document and <tt>unmergable_css_rules</tt> is a Css::RuleSet.
      #
      # @return [::Nokogiri::XML] a document.
      def write_unmergable_css_rules(doc, unmergable_rules) # :nodoc:
        styles = unmergable_rules.to_s

        unless styles.empty?
          style_tag = "<style type=\"text/css\">\n#{styles}</style>"
          if body = doc.search('body')
            if doc.at_css('body').children && !doc.at_css('body').children.empty?
              doc.at_css('body').children.before(::Nokogiri::XML.fragment(style_tag))
            else
              doc.at_css('body').add_child(::Nokogiri::XML.fragment(style_tag))
            end
          else
            doc.inner_html = style_tag += doc.inner_html
          end
        end
        doc
      end

      # Converts the HTML document to a format suitable for plain-text e-mail.
      #
      # If present, uses the <body> element as its base; otherwise uses the whole document.
      #
      # @return [String] a plain text.
      def to_plain_text
        html_src = ''
        begin
          html_src = @doc.at("body").inner_html
        rescue; end

        html_src = @doc.to_html unless html_src and not html_src.empty?
        convert_to_text(html_src, @options[:line_length], @html_encoding)
      end

      # Gets the original HTML as a string.
      # @return [String] HTML.
      def to_s
        if is_xhtml?
          @doc.to_xhtml(:encoding => nil)
        else
          @doc.to_html(:encoding => nil)
        end
      end

      # Load the HTML file and convert it into an Nokogiri document.
      #
      # @return [::Nokogiri::XML] a document.
      def load_html(input) # :nodoc:
        thing = nil

        # TODO: duplicate options
        if @options[:with_html_string] or @options[:inline] or input.respond_to?(:read)
          thing = input
        elsif @is_local_file
          @base_dir = File.dirname(input)
          thing = File.open(input, 'r')
        else
          thing = open(input)
        end

        if thing.respond_to?(:read)
          thing = thing.read
        end

        return nil unless thing
        doc = nil

        # Handle HTML entities
        if @options[:replace_html_entities] == true and thing.is_a?(String)
          HTML_ENTITIES.map do |entity, replacement|
            thing.gsub! entity, replacement
          end
        end
        # Default encoding is ASCII-8BIT (binary) per http://groups.google.com/group/nokogiri-talk/msg/0b81ef0dc180dc74
        # However, we really don't want to hardcode this. ASCII-8BIG should be the default, but not the only option.
        if thing.is_a?(String) and RUBY_VERSION =~ /1.9/
          thing = thing.force_encoding(@options[:input_encoding]).encode!
          doc = ::Nokogiri::HTML(thing, nil, @options[:input_encoding]) {|c| c.recover }
        else
          default_encoding = RUBY_PLATFORM == 'java' ? nil : 'BINARY'
          doc = ::Nokogiri::HTML(thing, nil, @options[:input_encoding] || default_encoding) {|c| c.recover }
        end

        # Fix for removing any CDATA tags from both style and script tags inserted per
        # https://github.com/sparklemotion/nokogiri/issues/311 and
        # https://github.com/premailer/premailer/issues/199
        %w(style script).each do |tag|
          doc.search(tag).children.each do |child|
            child.swap(child.text()) if child.cdata?
          end
        end

        doc
      end

    end
  end
end


text:
<?php
/**
 * @author Honvid
 */
use admin\assets\AppAsset;

AppAsset::register($this);
$this->title = $exception->statusCode.'-'.$exception->getMessage();
?>

    <?php if(YII_DEBUG) { ?>

        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>

 <?php echo $exception->statusCode.':'.$exception->getMessage(); ?>

        <?php echo $exception; ?>

    <?php } else {?>

<?php echo $exception->statusCode; ?>

 <?php echo $exception->getMessage(); ?>

                    我们马上修复该问题,同时,您可以点击 返回首页

    <?php }?>


text:
/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.sheets.v4.model;

/**
 * Randomizes the order of the rows in a range.
 *
 *
 This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Google Sheets API. For a detailed explanation see:
 * https://developers.google.com/api-client-library/java/google-http-java-client/json
 *

 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class RandomizeRangeRequest extends com.google.api.client.json.GenericJson {

  /**
   * The range to randomize.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GridRange range;

  /**
   * The range to randomize.
   * @return value or {@code null} for none
   */
  public GridRange getRange() {
    return range;
  }

  /**
   * The range to randomize.
   * @param range range or {@code null} for none
   */
  public RandomizeRangeRequest setRange(GridRange range) {
    this.range = range;
    return this;
  }

  @Override
  public RandomizeRangeRequest set(String fieldName, Object value) {
    return (RandomizeRangeRequest) super.set(fieldName, value);
  }

  @Override
  public RandomizeRangeRequest clone() {
    return (RandomizeRangeRequest) super.clone();
  }

}


text:
use graphics::bmp::*;

use programs::common::*;

pub struct Package {
    pub url: URL,
    pub id: String,
    pub name: String,
    pub binary: URL,
    pub icon: BMP,
    pub accepts: Vec<String>,
    pub authors: Vec<String>,
    pub descriptions: Vec<String>
}

impl Package {
    pub fn from_url(url: &URL) -> Box<Package> {
        let mut package = box Package {
            url: url.clone(),
            id: String::new(),
            name: String::new(),
            binary: URL::new(),
            icon: BMP::new(),
            accepts: Vec::new(),
            authors: Vec::new(),
            descriptions: Vec::new()
        };

        let path_parts = url.path_parts();
        if path_parts.len() > 0 {
            if let Option::Some(part) = path_parts.get(path_parts.len() - 1) {
                package.id = part.clone();
                package.binary = URL::from_string(&(url.to_string() + part + ".bin"));
            }
        }

        let info;
        {
            let mut resource = URL::from_string(&(url.to_string() + "_REDOX")).open();
            let mut vec: Vec<u8> = Vec::new();
            resource.read_to_end(&mut vec);
            info = String::from_utf8(&vec);
        }

        for line in info.split("\n".to_string()) {
            if line.starts_with("name=".to_string()) {
                package.name = line.substr(5, line.len() - 5);
            }else if line.starts_with("binary=".to_string()){
                package.binary = URL::from_string(&(url.to_string() + line.substr(7, line.len() - 7)));
            }else if line.starts_with("icon=".to_string()) {
                let mut resource = URL::from_string(&line.substr(5, line.len() - 5)).open();
                let mut vec: Vec<u8> = Vec::new();
                resource.read_to_end(&mut vec);
                package.icon = BMP::from_data(&vec);
            }else if line.starts_with("accept=".to_string()) {
                package.accepts.push(line.substr(7, line.len() - 7));
            }else if line.starts_with("author=".to_string()) {
                package.authors.push(line.substr(7, line.len() - 7));
            }else if line.starts_with("description=".to_string()) {
                package.descriptions.push(line.substr(12, line.len() - 12));
            }else{
                d("Unknown package info: ");
                line.d();
                dl();
            }
        }

        return package;
    }

    pub fn d(&self){
        d("URL: ");
        self.url.d();
        dl();

        d("ID: ");
        self.id.d();
        dl();

        d("Name: ");
        self.name.d();
        dl();

        d("Binary: ");
        self.binary.d();
        dl();

        d("Icon: ");
        dd(self.icon.size.width);
        d("x");
        dd(self.icon.size.height);
        dl();

        for accept in self.accepts.iter() {
            d("Accept: ");
            accept.d();
            dl();
        }

        for author in self.authors.iter() {
            d("Author: ");
            author.d();
            dl();
        }

        for description in self.descriptions.iter() {
            d("Description: ");
            description.d();
            dl();
        }
    }
}


text:
package org.innovateuk.ifs.project.core.mapper;

import org.innovateuk.ifs.commons.mapper.BaseMapper;
import org.innovateuk.ifs.commons.mapper.GlobalMapperConfig;
import org.innovateuk.ifs.invite.mapper.ProjectUserInviteMapper;
import org.innovateuk.ifs.organisation.mapper.OrganisationMapper;
import org.innovateuk.ifs.project.core.ProjectParticipantRole;
import org.innovateuk.ifs.project.core.domain.ProjectUser;
import org.innovateuk.ifs.project.resource.ProjectUserResource;
import org.innovateuk.ifs.user.mapper.UserMapper;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

@Mapper(
        config = GlobalMapperConfig.class,
        uses = {
                ProjectMapper.class,
                OrganisationMapper.class,
                ProjectUserInviteMapper.class,
                UserMapper.class
        }
)
public abstract class ProjectUserMapper extends BaseMapper<ProjectUser, ProjectUserResource, Long> {

    @Mappings({
            @Mapping(source = "role.name", target = "roleName"),
            @Mapping(source = "user.name", target = "userName"),
            @Mapping(source = "user.email", target = "email"),
            @Mapping(source = "user.phoneNumber", target = "phoneNumber"),
            @Mapping(source = "process", target = "project")
    })
    @Override
    public abstract ProjectUserResource mapToResource(ProjectUser domain);

    @Override
    public abstract ProjectUser mapToDomain(ProjectUserResource resource);

    public Long mapProjectUserToId(ProjectUser object) {
        if (object == null) {
            return null;
        }
        return object.getId();
    }

    public Long map(ProjectParticipantRole role) {
        if (role == null) {
            return null;
        } else {
            return role.getId();
        }
    }

    public ProjectParticipantRole mapIdToRole(Long id) {
        if (id == null) {
            return null;
        } else {
            return ProjectParticipantRole.getById(id);
        }
    }
}


text:
jQuery

jQuery

				jQuery is required by Bootstrap and most third party plugins

				Currently latest 2.x version is used. For older IE browsers you should use latest 1.x version,
				as described in Javascript files section:

 <!--[if !IE]> -->
   <script src="path/to/jquery.min.js"></script>
 <!-- <![endif]-->
 <!--[if lte IE 9]>
   <script src="path/to/jquery1x.min.js"></script>
 <![endif]-->

jQuery UI

				jQuery UI is also used for slider and drag drop functionality

				It is also required by some plugins such as FullCalendar and slimScroll

				A custom built version is included which has only above mentioned basic features.

				You can use it by including the following files:

				assets/css/jquery-ui.custom.min.css

				assets/js/jquery-ui.custom.min.js

				A full version is also included in case you want to use more features of the library.

				You can use it by including the following files:

				assets/css/jquery-ui.min.css

				assets/js/jquery-ui.min.js

				You can also build a custom version depending on your needs.

				Please see
				jQuery UI custom download

				Please note that jQuery UI tooltip module overrides Bootstrap tooltip.

				You can avoid this by building a custom jQuery UI without tooltip
				or including Bootstrap Javascript files after jQuery UI.

				Same thing can happen with jQuery UI spinner and FuelUX spinner.

				jQuery UI Touch Punch is used for enabling touch events.

				You should include assets/js/jquery.ui.touch-punch.min.js

jQuery UI Slider

				For more info about jQuery UI slider, see:
				api.jqueryui.com/slider/

				To use it, you should include:

				assets/css/jquery-ui.custom.min.css

				assets/js/jquery-ui.custom.min.js

				You can also include full jQuery UI versions or your own custom download.

				There are some additional colors and options:

.ui-slider-green

.ui-slider-red

.ui-slider-purple

.ui-slider-orange

.ui-slider-dark

.ui-slider-pink

.ui-slider-simple for simple slider handle without bars

.ui-slider-small for smaller handle

				A basic example would be like this:

$('#myslider').slider({
   value: 11,
   range: "min",
   animate: true
});

				For more examples you can also see Form Elements script at:

				mustache/app/views/assets/scripts/form-elements.js

				Search for "jQuery UI Slider" inside it

jQuery Mobile

				To add support for tap event on touch devices,
				a custom built jQuery mobile version is included which has minimal features.

				To use it you should include
				assets/js/jquery.mobile.custom.min.js

<script type="text/javascript">
   if('ontouchstart' in document.documentElement)
      document.write("<script src='path/to/assets/js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
</script>

				This will include it only if touch events are available.

				You may want to build a custom one depending on your requirements.

				Please see
				jQuery Mobile builder

				If you are using KendoUI or perhaps other libraries,
				there may be conflicts with touch events which you can avoid by removing jQuery Mobile


text:
'use strict';

var AbstractServer = require('../abstractServer'),
    Q = require('q'),
    logger = require('winston'),
    inherit = require('../../util/inherit'),
    helpers = require('../../util/helpers'),
    combinators = require('../../util/combinators'),
    StubRepository = require('../stubRepository'),
    StubResolver = require('../stubResolver'),
    HttpProxy = require('./httpProxy'),
    DryRunValidator = require('../dryRunValidator'),
    events = require('events'),
    HttpRequest = require('./httpRequest');

function setup (protocolName, createBaseServer) {
    function postProcess (stub) {
        var response = {
                statusCode: stub.statusCode || 200,
                headers: stub.headers || {},
                body: stub.body || '',
                _mode: stub._mode || 'text'
            };

        // We don't want to use keepalive connections, because a test case
        // may shutdown the stub, which prevents new connections for
        // the port, but that won't prevent the system under test
        // from reusing an existing TCP connection after the stub
        // has shutdown, causing difficult to track down bugs when
        // multiple tests are run.
        response.headers.connection = 'close';
        return response;
    }

    function createServer (logger, options) {
        var proxy = HttpProxy.create(logger),
            resolver = StubResolver.create(proxy, postProcess),
            stubs = StubRepository.create(resolver, options.recordRequests, 'utf8'),
            baseServer = createBaseServer(options),
            result = inherit.from(events.EventEmitter, {
                errorHandler: function (error, container) {
                    container.response.writeHead(500, { 'content-type': 'application/json' });
                    container.response.end(JSON.stringify({ errors: [error] }), 'utf8');
                },
                formatRequestShort: function (container) {
                    return container.request.method + ' ' + container.request.url;
                },
                formatRequest: combinators.identity,
                formatResponse: combinators.identity,
                respond: function (httpRequest, container) {
                    var scopedLogger = logger.withScope(helpers.socketName(container.request.socket));

                    return stubs.resolve(httpRequest, scopedLogger).then(function (stubResponse) {
                        var mode = stubResponse._mode ? stubResponse._mode : 'text',
                            encoding = mode === 'binary' ? 'base64' : 'utf8';

                        container.response.writeHead(stubResponse.statusCode, stubResponse.headers);
                        container.response.end(stubResponse.body.toString(), encoding);
                        return stubResponse;
                    });
                },
                metadata: baseServer.metadata,
                addStub: stubs.addStub,
                stubs: stubs.stubs
            }),
            server = baseServer.createNodeServer();

        server.on('connection', function (socket) { result.emit('connection', socket); });

        server.on('request', function (request, response) {
            var container = { request: request, response: response };
            result.emit('request', request.socket, container);
        });

        result.close = function () { server.close(); };

        result.listen = function (port) {
            var deferred = Q.defer();
            server.listen(port, function () { deferred.resolve(server.address().port); });
            return deferred.promise;
        };

        return result;
    }

    function initialize (allowInjection, recordRequests) {
        var implementation = {
                protocolName: protocolName,
                createServer: createServer,
                Request: HttpRequest
            };

        return {
            name: protocolName,
            create: AbstractServer.implement(implementation, recordRequests, logger).create,
            Validator: {
                create: function () {
                    return DryRunValidator.create({
                        StubRepository: StubRepository,
                        testRequest: HttpRequest.createTestRequest(),
                        testProxyResponse: {
                            statusCode: 200,
                            headers: {},
                            body: ''
                        },
                        allowInjection: allowInjection
                    });
                }
            }
        };
    }

    return {
        initialize: initialize
    };
}

module.exports = {
    setup: setup
};


text:
var fs = require('fs');

var PhantomJSBrowser = function(baseBrowserDecorator) {
  baseBrowserDecorator(this);

  this._start = function(url) {
    // create the js file, that will open karma
    var captureFile = this._tempDir + '/capture.js';
    var captureCode = '(new WebPage()).open("' + url + '");';
    fs.writeFileSync(captureFile, captureCode);

    // and start phantomjs
    this._execCommand(this._getCommand(), [captureFile]);
  };
};

PhantomJSBrowser.prototype = {
  name: 'PhantomJS',

  DEFAULT_CMD: {
    linux: require('phantomjs').path,
    darwin: require('phantomjs').path,
    win32: require('phantomjs').path
  },
  ENV_CMD: 'PHANTOMJS_BIN'
};

PhantomJSBrowser.$inject = ['baseBrowserDecorator'];

// PUBLISH DI MODULE
module.exports = {
  'launcher:PhantomJS': ['type', PhantomJSBrowser]
};


text:
Skia Quickstart Guide
=====================

This guide assumes you've got `gclient`, `git`, and `ninja` on your path.

1. First, create a directory to hold Skia:
    * `mkdir skia`
    * `cd skia`
2. Then checkout Skia:
    * `gclient config --name . https://skia.googlesource.com/skia.git`
    * `gclient sync`
3. Create our Ninja build files from our Gyp meta-build files.  You only need
   to rerun this when you sync or change a `.gyp` file.
    * `GYP_GENERATORS=ninja ./gyp_skia`
4. Now, let's build Skia.  There are a few options:
    * `ninja -C out/Debug`: no optimization, asserts enabled
    * `ninja -C out/Release`: optimization, asserts disabled
    * `ninja -C out/Coverage`: no optimization, asserts enabled, code coverage generated
5. Run some tests:
    * `out/Debug/tests`: runs unit tests from tests/
    * `out/Debug/dm`: runs golden master tests from gm/
6. Make some changes:
    * `git checkout -b my-new-feature origin/master`
    * `vim src/...`
    * `git commit -am "Changes for my new feature."`
    * `vim tests/...`
    * `git commit --amend -a`
    * `ninja -C out/Debug && out/Debug/tests && out/Debug/dm && echo ok`
7. Rebase your change onto the latest Skia code:
    * `git pull --rebase`
    * `ninja -C out/Debug && out/Debug/tests && out/Debug/dm && echo ok`
8. Upload your change and send it out for review:
    * `git cl upload -r my-skia-reviewer@google.com -s`
    * `git cl web`
9. Go through code review, get an LGTM, submit using the checkbox on the code review page.


text:
import {Component, Inject} from '@angular/core';
import {TournamentRanking} from '../../../shared/model/tournament-ranking';
import {ArmyList} from '../../../shared/model/armyList';
import {MD_DIALOG_DATA, MdDialogRef} from '@angular/material';
import {TournamentTeam} from '../../../shared/model/tournament-team';
import {TournamentPlayer} from '../../../shared/model/tournament-player';

@Component({
  selector: 'show-army-list-dialog',
  templateUrl: 'show-army-lists-dialog.html'
})
export class ShowArmyListDialogComponent {

  ranking: TournamentRanking;
  tournamentPlayer: TournamentPlayer;
  tournamentTeam: TournamentTeam;
  tournamentRank: TournamentRanking;
  team: TournamentRanking;

  armyLists: ArmyList[];

  constructor(public dialogRef: MdDialogRef<ShowArmyListDialogComponent>,
              @Inject(MD_DIALOG_DATA) public data: any) {

    this.ranking = data.ranking;
    this.tournamentPlayer = data.tournamentPlayer;
    this.tournamentTeam = data.tournamentTeam;
    this.tournamentRank = data.tournamentRank;
    this.team = data.team;

    this.armyLists = data.armyLists;
  }

}


text:
#include <aws/sqs/model/UntagQueueRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>

using namespace Aws::SQS::Model;
using namespace Aws::Utils;

UntagQueueRequest::UntagQueueRequest() :
    m_queueUrlHasBeenSet(false),
    m_tagKeysHasBeenSet(false)
{
}

Aws::String UntagQueueRequest::SerializePayload() const
{
  Aws::StringStream ss;
  ss << "Action=UntagQueue&";
  if(m_queueUrlHasBeenSet)
  {
    ss << "QueueUrl=" << StringUtils::URLEncode(m_queueUrl.c_str()) << "&";
  }

  if(m_tagKeysHasBeenSet)
  {
    unsigned tagKeysCount = 1;
    for(auto& item : m_tagKeys)
    {
      ss << "TagKey." << tagKeysCount << "="
          << StringUtils::URLEncode(item.c_str()) << "&";
      tagKeysCount++;
    }
  }

  ss << "Version=2012-11-05";
  return ss.str();
}

void  UntagQueueRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
  uri.SetQueryString(SerializePayload());
}


text:
import os
import tempfile
import unittest
import logging
from pyidf import ValidationLevel
import pyidf
from pyidf.idf import IDF
from pyidf.coils import CoilSystemCoolingWaterHeatExchangerAssisted

log = logging.getLogger(__name__)

class TestCoilSystemCoolingWaterHeatExchangerAssisted(unittest.TestCase):

    def setUp(self):
        self.fd, self.path = tempfile.mkstemp()

    def tearDown(self):
        os.remove(self.path)

    def test_create_coilsystemcoolingwaterheatexchangerassisted(self):

        pyidf.validation_level = ValidationLevel.error

        obj = CoilSystemCoolingWaterHeatExchangerAssisted()
        # alpha
        var_name = "Name"
        obj.name = var_name
        # alpha
        var_heat_exchanger_object_type = "HeatExchanger:AirToAir:FlatPlate"
        obj.heat_exchanger_object_type = var_heat_exchanger_object_type
        # alpha
        var_heat_exchanger_name = "Heat Exchanger Name"
        obj.heat_exchanger_name = var_heat_exchanger_name
        # alpha
        var_cooling_coil_object_type = "Coil:Cooling:Water"
        obj.cooling_coil_object_type = var_cooling_coil_object_type
        # object-list
        var_cooling_coil_name = "object-list|Cooling Coil Name"
        obj.cooling_coil_name = var_cooling_coil_name

        idf = IDF()
        idf.add(obj)
        idf.save(self.path, check=False)

        with open(self.path, mode='r') as f:
            for line in f:
                log.debug(line.strip())

        idf2 = IDF(self.path)
        self.assertEqual(idf2.coilsystemcoolingwaterheatexchangerassisteds[0].name, var_name)
        self.assertEqual(idf2.coilsystemcoolingwaterheatexchangerassisteds[0].heat_exchanger_object_type, var_heat_exchanger_object_type)
        self.assertEqual(idf2.coilsystemcoolingwaterheatexchangerassisteds[0].heat_exchanger_name, var_heat_exchanger_name)
        self.assertEqual(idf2.coilsystemcoolingwaterheatexchangerassisteds[0].cooling_coil_object_type, var_cooling_coil_object_type)
        self.assertEqual(idf2.coilsystemcoolingwaterheatexchangerassisteds[0].cooling_coil_name, var_cooling_coil_name)


text:
import unittest
from collections import OrderedDict

import time

from conans.test.utils.tools import NO_SETTINGS_PACKAGE_ID, TestClient, TestServer, \
    inc_package_manifest_timestamp, inc_recipe_manifest_timestamp
from conans.util.env_reader import get_env

class RemoteChecksTest(unittest.TestCase):

    @unittest.skipIf(get_env("TESTING_REVISIONS_ENABLED", False), "No sense with revs")
    def test_recipe_updates(self):
        servers = OrderedDict()
        servers["server1"] = TestServer()
        servers["server2"] = TestServer()
        servers["server3"] = TestServer()

        client = TestClient(servers=servers, users={"server1": [("lasote", "mypass")],
                                                    "server2": [("lasote", "mypass")],
                                                    "server3": [("lasote", "mypass")]})
        conanfile = """from conans import ConanFile
from conans.tools import load
class Pkg(ConanFile):
    exports_sources = "*.data"
    def package(self):
        self.copy("*")
    def package_info(self):
        self.output.info("%s")
        self.output.info("DATA: {}".format(load("data.data")))
"""

        for server in (1, 2, 3):
            server_name = "Server%s!" % server
            client.save({"conanfile.py": conanfile % server_name,
                         "data.data": "MyData%s" % server})
            client.run("create . Pkg/0.1@lasote/testing")
            inc_recipe_manifest_timestamp(client.cache, "Pkg/0.1@lasote/testing", (server - 1) * 20)
            inc_package_manifest_timestamp(client.cache,
                                           "Pkg/0.1@lasote/testing:%s" % NO_SETTINGS_PACKAGE_ID,
                                           (server-1) * 20)
            client.run("upload Pkg* -r=server%s --confirm --all" % server)

        # Fresh install from server1
        client.run("remove * -f")
        client.run("install Pkg/0.1@lasote/testing -r=server1")
        self.assertIn("Pkg/0.1@lasote/testing: Server1!", client.out)
        self.assertIn("Pkg/0.1@lasote/testing: DATA: MyData1", client.out)
        self.assertIn("Pkg/0.1@lasote/testing from 'server1' - Downloaded", client.out)
        self.assertIn("Pkg/0.1@lasote/testing:%s - Download" % NO_SETTINGS_PACKAGE_ID, client.out)

        # install without updates
        client.run("install Pkg/0.1@lasote/testing -r=server2")
        self.assertIn("Pkg/0.1@lasote/testing from 'server1' - Cache", client.out)
        self.assertIn("Pkg/0.1@lasote/testing:%s - Cache" % NO_SETTINGS_PACKAGE_ID, client.out)
        self.assertIn("Pkg/0.1@lasote/testing: Server1!", client.out)
        self.assertIn("Pkg/0.1@lasote/testing: DATA: MyData1", client.out)

        # Update from server2
        client.run("install Pkg/0.1@lasote/testing -r=server2 --update")
        self.assertIn("Pkg/0.1@lasote/testing from 'server2' - Updated", client.out)
        self.assertIn("Pkg/0.1@lasote/testing:%s - Update" % NO_SETTINGS_PACKAGE_ID, client.out)
        self.assertIn("Pkg/0.1@lasote/testing: Retrieving package %s"
                      " from remote 'server2' " % NO_SETTINGS_PACKAGE_ID, client.out)
        self.assertIn("Pkg/0.1@lasote/testing: Server2!", client.out)
        self.assertIn("Pkg/0.1@lasote/testing: DATA: MyData2", client.out)
        client.run("remote list_ref")
        self.assertIn("Pkg/0.1@lasote/testing: server2", client.out)

        # Update from server3
        client.run("install Pkg/0.1@lasote/testing -r=server3 --update")
        self.assertIn("Pkg/0.1@lasote/testing from 'server3' - Updated", client.out)
        self.assertIn("Pkg/0.1@lasote/testing:%s - Update" % NO_SETTINGS_PACKAGE_ID,
                      client.out)
        self.assertIn("Pkg/0.1@lasote/testing: Retrieving package "
                      "%s from remote 'server3' " % NO_SETTINGS_PACKAGE_ID, client.out)
        self.assertIn("Pkg/0.1@lasote/testing: Server3!", client.out)
        client.run("remote list_ref")
        self.assertIn("Pkg/0.1@lasote/testing: server3", client.out)

    def test_binary_packages_mixed(self):
        servers = OrderedDict([("server1", TestServer()),
                               ("server2", TestServer()),
                               ("server3", TestServer())])
        client = TestClient(servers=servers, users={"server1": [("lasote", "mypass")],
                                                    "server2": [("lasote", "mypass")]})
        conanfile = """from conans import ConanFile
class Pkg(ConanFile):
    settings = "build_type"
    """
        client.save({"conanfile.py": conanfile})
        client.run("create . Pkg/0.1@lasote/testing -s build_type=Release")
        client.run("upload Pkg* --all -r=server1 --confirm")

        # Built type Debug only in server2
        client.run('remove -f "*"')
        client.run("create . Pkg/0.1@lasote/testing -s build_type=Debug")
        client.run("upload Pkg* --all -r=server2 --confirm")

        # Remove all, install a package for debug
        client.run('remove -f "*"')
        # If revision it is able to fetch the binary from server2
        client.run('install Pkg/0.1@lasote/testing -s build_type=Debug',
                   assert_error=not client.cache.config.revisions_enabled)
        # Force binary from server2
        client.run('install Pkg/0.1@lasote/testing -s build_type=Debug -r server2')

        # Check registry, recipe should have been found from server1 and binary from server2
        ref = "Pkg/0.1@lasote/testing"
        pref = "%s:5a67a79dbc25fd0fa149a0eb7a20715189a0d988" % ref
        client.run("remote list_ref")
        self.assertIn("%s: server1" % ref, client.out)

        client.run("remote list_pref Pkg/0.1@lasote/testing")
        self.assertIn("%s: server2" % pref, client.out)
        # Use another client to update the server2 binary and server1 recipe
        client2 = TestClient(servers=servers, users={"server1": [("lasote", "mypass")],
                                                     "server2": [("lasote", "mypass")]})
        conanfile = """from conans import ConanFile, tools
class Pkg(ConanFile):
    settings = "build_type"

    def package(self):
        tools.save("myfile.lib", "fake")
    """
        client2.save({"conanfile.py": conanfile})
        time.sleep(1)
        client2.run("create . Pkg/0.1@lasote/testing -s build_type=Debug")
        client2.run("upload Pkg/0.1@lasote/testing --all")
        self.assertIn("Uploading Pkg/0.1@lasote/testing to remote 'server1'", client2.out)
        # The upload is not done to server2 because in client2 we don't have the registry
        # with the entry
        self.assertIn("Uploading package 1/1: "
                      "5a67a79dbc25fd0fa149a0eb7a20715189a0d988 to 'server1'", client2.out)

        ref2 = "Pkg/0.1@lasote/testing"
        pref2 = "%s:5a67a79dbc25fd0fa149a0eb7a20715189a0d988" % ref
        # Now the reference is associated with server1
        client2.run("remote list_ref")
        self.assertIn("%s: server1" % ref2, client2.out)

        client2.run("remote list_pref Pkg/0.1@lasote/testing")
        self.assertIn("%s: server1" % pref2, client2.out)

        # Force upload to server2
        client2.run("upload Pkg/0.1@lasote/testing --all -r server2")
        # An upload doesn't modify a registry, so still server1
        client2.run("remote list_ref")
        self.assertIn("%s: server1" % ref2, client2.out)

        client2.run("remote list_pref Pkg/0.1@lasote/testing")
        self.assertIn("%s: server1" % pref2, client2.out)

        # Now go back to client and update, confirm that recipe=> server1, package=> server2
        client.run("remote list_ref")
        self.assertIn("%s: server1" % ref, client.out)
        client.run("remote list_pref Pkg/0.1@lasote/testing")
        self.assertIn("%s: server2" % pref, client.out)

        client.run('install Pkg/0.1@lasote/testing -s build_type=Debug --update')
        self.assertIn("Pkg/0.1@lasote/testing: Retrieving from remote 'server1'...", client.out)
        self.assertIn("Pkg/0.1@lasote/testing: Retrieving package "
                      "5a67a79dbc25fd0fa149a0eb7a20715189a0d988 from remote 'server2' ", client.out)

        # Export new recipe, it should be non associated
        conanfile = """from conans import ConanFile, tools
class Pkg(ConanFile):
    settings = "build_type"

    def package(self):
        tools.save("myfile.lib", "fake2")
    """
        client2.save({"conanfile.py": conanfile})
        time.sleep(1)
        client.run("create . Pkg/0.1@lasote/testing -s build_type=Debug")
        client.run("remote list_ref")
        # FIXME: Conan 2.0 the package should be cleared from the registry after a create
        self.assertIn("Pkg/0.1@lasote/testing", client.out)

    def test_binary_defines_remote(self):
        servers = OrderedDict([("server1", TestServer()),
                               ("server2", TestServer()),
                               ("server3", TestServer())])
        client = TestClient(servers=servers, users={"server1": [("lasote", "mypass")],
                                                    "server2": [("lasote", "mypass")],
                                                    "server3": [("lasote", "mypass")]})
        conanfile = """from conans import ConanFile
class Pkg(ConanFile):
    pass"""
        client.save({"conanfile.py": conanfile})
        client.run("create . Pkg/0.1@lasote/testing")
        client.run("upload Pkg* --all -r=server1 --confirm")
        client.run("upload Pkg* --all -r=server2 --confirm")

        # It takes the default remote
        client.run("remove * -f")
        client.run("remote list_ref")
        self.assertNotIn("Pkg", client.out)

        # Exported recipe gets binary from default remote
        client.run("export . Pkg/0.1@lasote/testing")
        client.run("install Pkg/0.1@lasote/testing")
        self.assertIn("Pkg/0.1@lasote/testing from local cache - Cache", client.out)
        self.assertIn("Pkg/0.1@lasote/testing:%s - Download" % NO_SETTINGS_PACKAGE_ID,
                      client.out)
        self.assertIn("Pkg/0.1@lasote/testing: Retrieving package "
                      "%s from remote 'server1'" % NO_SETTINGS_PACKAGE_ID, client.out)
        client.run("remote list_ref")

        # The recipe is not downloaded from anywhere, it should be kept to local cache
        self.assertNotIn("Pkg/0.1@lasote/testing", client.out)

        # Explicit remote also defines the remote
        client.run("remove * -f")
        client.run("remote list_ref")
        self.assertNotIn("Pkg", client.out)
        client.run("export . Pkg/0.1@lasote/testing")
        client.run("install Pkg/0.1@lasote/testing -r=server2")
        self.assertIn("Pkg/0.1@lasote/testing from local cache - Cache", client.out)
        self.assertIn("Pkg/0.1@lasote/testing:%s - Download" % NO_SETTINGS_PACKAGE_ID,
                      client.out)
        self.assertIn("Pkg/0.1@lasote/testing: Retrieving package "
                      "%s from remote 'server2'" % NO_SETTINGS_PACKAGE_ID, client.out)
        client.run("remote list_ref")
        # Still not downloaded from anywhere, it shouldn't have a registry entry
        self.assertNotIn("Pkg/0.1@lasote/testing", client.out)

        # Ordered search of binary works
        client.run("remove * -f")
        client.run("remove * -f -r=server1")
        client.run("export . Pkg/0.1@lasote/testing")
        client.run("install Pkg/0.1@lasote/testing")
        self.assertIn("Pkg/0.1@lasote/testing from local cache - Cache", client.out)
        self.assertIn("Pkg/0.1@lasote/testing:%s - Download" % NO_SETTINGS_PACKAGE_ID, client.out)
        self.assertIn("Pkg/0.1@lasote/testing: Retrieving package "
                      "%s from remote 'server2'" % NO_SETTINGS_PACKAGE_ID, client.out)
        client.run("remote list_ref")
        self.assertNotIn("Pkg/0.1@lasote/testing", client.out)

        # Download recipe and binary from the remote2 by iterating
        client.run("remove * -f")
        client.run("remove * -f -r=server1")
        client.run("install Pkg/0.1@lasote/testing")
        self.assertIn("Pkg/0.1@lasote/testing from 'server2' - Downloaded", client.out)
        self.assertIn("Pkg/0.1@lasote/testing:%s - Download" % NO_SETTINGS_PACKAGE_ID, client.out)
        self.assertIn("Pkg/0.1@lasote/testing: Retrieving package "
                      "%s from remote 'server2'" % NO_SETTINGS_PACKAGE_ID, client.out)
        client.run("remote list_ref")
        self.assertIn("Pkg/0.1@lasote/testing: server2", client.out)

    def test_binaries_from_different_remotes(self):
        servers = OrderedDict()
        servers["server1"] = TestServer()
        servers["server2"] = TestServer()
        client = TestClient(servers=servers, users={"server1": [("lasote", "mypass")],
                                                    "server2": [("lasote", "mypass")]})
        conanfile = """from conans import ConanFile
class Pkg(ConanFile):
    options = {"opt": [1, 2, 3]}
"""
        client.save({"conanfile.py": conanfile})
        client.run("create . Pkg/0.1@lasote/testing -o Pkg:opt=1")
        client.run("upload Pkg* --all -r=server1 --confirm")
        client.run("remove * -p -f")
        client.run("create . Pkg/0.1@lasote/testing -o Pkg:opt=2")
        client.run("upload Pkg* --all -r=server2 --confirm")
        client.run("remove * -p -f")
        client.run("remote list_ref")

        # It keeps associated to server1 even after a create FIXME: Conan 2.0
        self.assertIn("Pkg/0.1@lasote/testing: server1", client.out)

        # Trying to install from another remote fails
        client.run("install Pkg/0.1@lasote/testing -o Pkg:opt=2 -r=server2")
        self.assertIn("Pkg/0.1@lasote/testing from 'server1' - Cache", client.out)
        self.assertIn("Pkg/0.1@lasote/testing:b0c3b52601b7e36532a74a37c81bb432898a951b - Download", client.out)
        self.assertIn("Pkg/0.1@lasote/testing: Retrieving package b0c3b52601b7e36532a74a37c81bb432898a951b "
                      "from remote 'server2'", client.out)

        # Nothing to update
        client.run("install Pkg/0.1@lasote/testing -o Pkg:opt=2 -r=server2 -u")
        self.assertIn("Pkg/0.1@lasote/testing from 'server2' - Cache", client.out)
        self.assertIn("Pkg/0.1@lasote/testing:b0c3b52601b7e36532a74a37c81bb432898a951b - Cache", client.out)

        # Build missing
        client.run("install Pkg/0.1@lasote/testing -o Pkg:opt=3 -r=server2", assert_error=True)
        self.assertIn("ERROR: Missing prebuilt package for 'Pkg/0.1@lasote/testing'", client.out)

        client.run("install Pkg/0.1@lasote/testing -o Pkg:opt=3", assert_error=True)
        self.assertIn("ERROR: Missing prebuilt package for 'Pkg/0.1@lasote/testing'", client.out)


text:
import React from 'react';
import { shallow } from 'enzyme';

import PublicationStatus from './PublicationStatus';

describe('PublicationStatus', () => {
  it('exists', () => {
    expect(PublicationStatus).toBeDefined();
  });

  it('#status live', () => {
    expect(
      shallow(
        <PublicationStatus
          status={{
            status: 'live + draft',
            live: true,
            has_unpublished_changes: true,
          }}
        />,
      ),
    ).toMatchSnapshot();
  });

  it('#status not live', () => {
    expect(
      shallow(
        <PublicationStatus
          status={{
            status: 'live + draft',
            live: false,
            has_unpublished_changes: true,
          }}
        />,
      ),
    ).toMatchSnapshot();
  });
});


text:
"""haveaniceday URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import include, url
from django.contrib import admin
from website_component import views as basic_views

urlpatterns = [
    url(r'^$', basic_views.home, name='home'),
    url(r'^table/', include('tables_of_month.urls', namespace="tables_of_month")),
    url(r'^order/', include('order.urls', namespace="order")),
    url(r'^admin/', include(admin.site.urls)),
]