text:
package biz.webgate.scrum.task;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;

import javax.faces.context.FacesContext;

import biz.webgate.scrum.scrumdocument.IScrumDocument;

import com.ibm.xsp.extlib.util.ExtLibUtil;

public class TaskSessionFacade {
	public static final String BEAN_NAME = "taskBean"; //$NON-NLS-1$

	public static TaskSessionFacade get(FacesContext context) {
		TaskSessionFacade bean = (TaskSessionFacade) context.getApplication()
				.getVariableResolver().resolveVariable(context, BEAN_NAME);
		return bean;
	}

	public static TaskSessionFacade get() {
		return get(FacesContext.getCurrentInstance());
	}

	private HashMap<String, Task> m_TaskList;
	private Date m_LastAccessed = new Date();

	public static final int SORT_BY_CUSTOMER = 1;
	public static final int SORT_BY_PROJECT = 2;
	public static final int SORT_BY_USERSTORY = 3;
	public static final int SORT_BY_ITERATION = 4;
	public static final int SORT_BY_CREATEDAT = 5;
	public static final int SORT_BY_MODIFIEDAT = 6;
	public static final int SORT_BY_AUTHOR = 7;
	public static final int SORT_BY_SUBJECT = 8;
	public static final int SORT_BY_EDITOR = 9;
	public static final int SORT_BY_DUE = 10;
	public static final int SORT_BY_TIME = 11;
	public static final int SORT_BY_STATUS = 12;
	public static final int SORT_BY_ID = 13;

	public Task createNewTask(String projID) {
		return TaskStorageService.getInstance().createNewTask(projID, ExtLibUtil.getCurrentSession());
	}

	public boolean saveTask(Task curTask) {
		m_TaskList = null;
		m_LastAccessed = new Date();
		return TaskStorageService.getInstance().saveTask(curTask, ExtLibUtil.getCurrentSession());
	}

	public boolean deleteTask(Task curTask) {
		m_TaskList = null;
		m_LastAccessed = new Date();
		return TaskStorageService.getInstance().deleteTask(curTask, ExtLibUtil.getCurrentSession());
	}

	public Task getTaskById(String strTaskId) {
		return loadUserstory(strTaskId);
	}

	public List<Task> getAllTasks(int sortOrder, boolean reverse, String statusFilter) {
		List<Task> lstAll = TaskStorageService.getInstance().getAllTasks(ExtLibUtil.getCurrentSession(), statusFilter);
		TaskSortFactory.sortTasks(lstAll, sortOrder, reverse);
		return lstAll;
	}

	public List<Task> getMyTasks(int sortOrder, boolean reverse, int involvedType, String statusFilter, boolean showCompleted) {
		List<Task> lstMy = TaskStorageService.getInstance().getMyTasks(ExtLibUtil.getCurrentSession(), involvedType, statusFilter, showCompleted);
		TaskSortFactory.sortTasks(lstMy, sortOrder, reverse);
		return lstMy;
	}

	public List<Task> getTasksOfProject(int sortOrder, boolean reverse, String projectID, String statusFilter, String usFilter, String itFilter, boolean hideComplete) {
		List<Task> lstTasksOfProject = TaskStorageService.getInstance().getTasksOfProject(ExtLibUtil.getCurrentSession(), projectID, statusFilter, usFilter, itFilter, hideComplete);
		TaskSortFactory.sortTasks(lstTasksOfProject, sortOrder, reverse);
		return lstTasksOfProject;
	}

	public List<Task> getTasksOfUserstory(int sortOrder, boolean reverse, String userstoryID, String statusFilter) {
		List<Task> lstTasksOfUserstory = TaskStorageService.getInstance().getTasksOfUserstory(ExtLibUtil.getCurrentSession(), userstoryID, statusFilter);
		TaskSortFactory.sortTasks(lstTasksOfUserstory, sortOrder, reverse);
		return lstTasksOfUserstory;
	}

	public List<Task> getTasksOfIteration(int sortOrder, boolean reverse, String iterationID, String statusFilter) {
		List<Task> lstTasksOfIteration = new ArrayList<Task>();
		for (Task task : getAllTasks(sortOrder, reverse, statusFilter)) {
			if (task.getIterationId().equals(iterationID)) {
				lstTasksOfIteration.add(task);
			}
		}
		TaskSortFactory.sortTasks(lstTasksOfIteration, sortOrder, reverse);
		return lstTasksOfIteration;
	}

	public List<IScrumDocument> getTasksAsScrumDocuments(boolean reverse) {
		List<IScrumDocument> lstSD = new ArrayList<IScrumDocument>();
		for (Task task : getAllTasks(SORT_BY_SUBJECT, reverse, "")) {
			lstSD.add(task);
		}
		return lstSD;
	}

	private Task loadUserstory(String strID) {
		if (m_TaskList == null || TaskStorageService.getInstance().isDirty(m_LastAccessed)) {
			m_TaskList = new HashMap<String, Task>();
		}
		if (m_TaskList.containsKey(strID)) {
			return m_TaskList.get(strID);
		}
		Task p = TaskStorageService.getInstance().getTaskById(strID, ExtLibUtil.getCurrentSession());
		m_LastAccessed = new Date();
		if (p != null) {
			m_TaskList.put(strID, p);
		}
		return p;
	}
}


text:
JSTransformer

Normalize the API of any jstransformer

There are many good template engines and compilers written for Node.js. But there is a problem: all of them have slightly different APIs, requiring slightly different usage. JSTransformer unifies them into one standardized API. Code written for one transformer will work with any other transformer. There are [over 100 transformers](https://www.npmjs.com/browse/keyword/jstransformer), ranging from Markdown parsers to template engines to code compilers.

## Installation

    npm install jstransformer

## Usage

```js
var transformer = require('jstransformer');
var marked = transformer(require('jstransformer-marked'));

var options = {};
var res = marked.render('Some **markdown**', options);
// => {body: 'Some <strong>markdown</strong>', dependencies: []}
```

This gives the same API regardless of the jstransformer passed in.

## API

A transformer, once normalised using this module, will implement the following methods.  Note that if the underlying transformer cannot be used to implement the functionality, it may ultimately just throw an error.

### `.render*`

#### Returned object from `.render*`

```js
{body: String, dependencies: Array.<String>}
```

 - `body` represents the result as a string
 - `dependencies` is an array of file names that were read in as part of the render process (or an empty array if there were no dependencies)

#### `.render`

```js
transformer.render(str, options, locals);
=> {body: String, dependencies: Array.<String>}
```

_requires the underlying transform to implement `.render` or `.compile`_

Transform a string and return an object.

#### `.renderAsync`

```js
transformer.renderAsync(str[, options], locals, callback);
```

```js
transformer.renderAsync(str[, options], locals);
=> Promise({body: String, dependencies: Array.<String>})
```

_requires the underlying transform to implement `.renderAsync`, `.render`, `.compile`, or `.compileAsync`_

Transform a string asynchronously. If a callback is provided, it is called as `callback(err, data)`, otherwise a Promise is returned.

#### `.renderFile`

```js
transformer.renderFile(filename, options, locals)
=> {body: String, dependencies: Array.<String>}
```

_requires the underlying transform to implement `.renderFile`, `.render`, `.compileFile`, or `.compile`_

Transform a file and return an object.

#### `.renderFileAsync`

```js
transformer.renderFileAsync(filename[, options], locals, callback);
```

```js
transformer.renderFileAsync(filename[, options], locals);
=> Promise({body: String, dependencies: Array.<String>})
```

_requires the underlying transform to implement `.renderFileAsync`, `.renderFile`, `.renderAsync`, `.render`, `.compileFileAsync`, `.compileFile`, `.compileAsync`, or `.compile`_

Transform a file asynchronously. If a callback is provided, it is called as `callback(err, data)`, otherwise a Promise is returned.

### `.compile*`

#### Returned object from `.compile*`

```js
{fn: Function, dependencies: Array.<String>}
```

 - `fn` is a function that takes a locals object and returns the rendered template as a string.
 - `dependencies` is an array of file names that were read in as part of the compilation process (or an empty array if there were no dependencies)

#### `.compile`

```js
transformer.compile(str[, options]);
=> {fn: Function, dependencies: Array.<String>}
```

_requires the underlying transform to implement `.compile` or `.render`_

Compile a string and return an object.

#### `.compileAsync`

```js
transformer.compileAsync(str[, options], callback);
```

```js
transformer.compileAsync(str[, options]);
=> Promise({fn: Function, dependencies: Array.<String>})
```

_requires the underlying transform to implement `.compileAsync`, `.compile` or `.render`_

Compile a string asynchronously. If a callback is provided, it is called as `callback(err, data)`, otherwise a Promise is returned.

#### `.compileFile`

```js
transformer.compileFile(filename[, options])
=> {fn: Function, dependencies: Array.<String>}
```

_requires the underlying transform to implement `.compileFile`, `.compile`, `.renderFile`, or `.render`_

Compile a file and return an object.

#### `.compileFileAsync`

```js
transformer.compileFileAsync(filename[, options], callback);
```

```js
transformer.compileFileAsync(filename[, options]);
=> Promise({fn: Function, dependencies: Array.<String>})
```

_requires the underlying transform to implement `.compileFileAsync`, `.compileFile`, `.compileAsync`, `.compile`, `.renderFileAsync`, `.renderFile`, or `.render`_

Compile a file asynchronously. If a callback is provided, it is called as `callback(err, data)`, otherwise a Promise is returned.

### `.compileClient*`

#### Returned object from `.compileClient*`

```js
{body: String, dependencies: Array.<String>}
```

 - `body` is a `.toString`ed function that can be used on the client side.
 - `dependencies` is an array of file names that were read in as part of the compilation process (or an empty array if there were no dependencies)

#### `.compileClient`

```js
transformer.compileClient(str[, options]);
=> {body: String, dependencies: Array.<String>}
```

_requires the underlying transform to implement `.compileClient`_

Compile a string for client-side use and return an object.

#### `.compileClientAsync`

```js
transformer.compileClientAsync(str[, options], callback);
```

```js
transformer.compileClientAsync(str[, options]);
=> Promise({body: String, dependencies: Array.<String>})
```

_requires the underlying transform to implement `.compileClientAsync` or `.compileClient`_

Compile a string for client-side use asynchronously. If a callback is provided, it is called as `callback(err, data)`, otherwise a Promise is returned.

#### `.compileFileClient`

```js
transformer.compileFileClient(filename[, options])
=> {body: String, dependencies: Array.<String>}
```

_requires the underlying transform to implement `.compileFileClient` or `.compileClient`_

Compile a file for client-side use and return an object.

#### `.compileFileClientAsync`

```js
transformer.compileFileClientAsync(filename[, options], callback);
```

```js
transformer.compileFileClientAsync(filename[, options]);
=> Promise({body: String, dependencies: Array.<String>})
```

_requires the underlying transform to implement `.compileFileClientAsync`, `.compileFileClient`, `.compileClientAsync`, or `.compileClient`_

Compile a file for client-side use asynchronously. If a callback is provided, it is called as `callback(err, data)`, otherwise a Promise is returned.

### `.inputFormats`

```js
var formats = transformer.inputFormats;
=> ['md', 'markdown']
```

Returns an array of strings representing potential input formats for the transform. If not provided directly by the transform, results in an array containing the name of the transform.

### `.outputFormat`

```js
var md = require('jstransformer')(require('jstransformer-markdown'))
var outputFormat = md.outputFormat
=> 'html'
```

Returns a string representing the default output format the transform would be expected to return when calling `.render()`.

### `.can`

```js
var md = require('jstransformer')(require('jstransformer-markdown'))
md.can('render');
=> true
```

Takes a method name as a string and returns a boolean value indicating whether the normalised transform implements this method.

## License

MIT

redpajama_set_name: RedPajamaGithub


text:
Coordinates::Coordinates()
: Basic{"Coordinates"}
{
    add_specific_value(x);
    add_specific_value(y);
}

double Coordinates::get_x() const
{
    return x;
}

double Coordinates::get_y() const
{
    return y;
}

double Coordinates::distance_to(const Coordinates &target) const
{
    double x_magnitude = target.get_x()-x;
    double y_magnitude = target.get_y()-y;
    return std::sqrt(x_magnitude*x_magnitude+y_magnitude*y_magnitude);
}

double Coordinates::move_towards(const Coordinates &target, double velocity, double time)
{
    double moving_distance = velocity*time;
    double x_magnitude = target.get_x()-x;
    double y_magnitude = target.get_y()-y;
    double distance = std::sqrt(x_magnitude*x_magnitude+y_magnitude*y_magnitude);
    if(distance <= moving_distance)
    {
        x = target.get_x();
        y = target.get_y();
        return time-distance/velocity;
    }
    else
    {
        x += x_magnitude*velocity*time/distance;
        y += y_magnitude*velocity*time/distance;
        return 0;
    }
}

bool operator==(const Coordinates& lhs, const Coordinates& rhs)
{
    return lhs.distance_to(rhs) < utility::EPSILON;
}

bool operator!=(const Coordinates& lhs, const Coordinates& rhs)
{
    return !(lhs == rhs);
}


text:
#include "ellipse.h"

using namespace trikControl;

Ellipse::Ellipse(int x, int y, int width, int height, QColor color, int penWidth, bool filled)
	: Shape(color, penWidth)
	, mCenter(x, y)
	, mWidth(width)
	, mHeight(height)
	, mFilled(filled)
{
}

void Ellipse::draw(QPainter *painter)
{
	painter->setPen(QPen(mColor, mPenWidth, Qt::SolidLine, Qt::SquareCap, Qt::BevelJoin));
	if (mFilled) {
		const QBrush painterBrush = painter->brush();
		painter->setBrush(mColor);
		painter->drawEllipse(mCenter, mWidth, mHeight);
		painter->setBrush(painterBrush);
	} else {
		painter->drawEllipse(mCenter, mWidth, mHeight);
	}
}

bool Ellipse::equals(const Shape *other) const
{
	const Ellipse *ellipse = dynamic_cast<const Ellipse *>(other);
	return ellipse && mCenter == ellipse->mCenter && mWidth == ellipse->mWidth && mHeight == ellipse->mHeight;
}


text:
import React from 'react'
import PropTypes from 'prop-types'
import SVGDeviconInline from '../../_base/SVGDeviconInline'

import iconSVG from './IllustratorPlain.svg'

/** IllustratorPlain */
function IllustratorPlain({ width, height, className }) {
  return (
    <SVGDeviconInline
      className={'IllustratorPlain' + ' ' + className}
      iconSVG={iconSVG}
      width={width}
      height={height}
    />
  )
}

IllustratorPlain.propTypes = {
  className: PropTypes.string,
  width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
  height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
}

export default IllustratorPlain


text:
(function($){

    //Alias for json2html.transform
	// _options
	//   output : json2html | html | jquery
    $.json2html = function(json, transform, _options) {

        //Make sure we have the json2html base loaded
        if(typeof json2html === 'undefined') return(undefined);

		//Default Options
        var options = {
            'output':'json2html'
        };

		//Extend the options (with defaults)
        if( _options !== undefined ) $.extend(options, _options);

		switch(options.output){

			//Process the transform with events
			// for consumption within a json2html html attribute function call
			// returns an object {'html':html,'events'[]}
			case 'json2html':

				//make sure we have the events set as true
				options.events = true;

				return(json2html.transform(json, transform, options));
			break;

			//Return raw html (same as calling json2html.transform
			case 'html':

				//make sure we have the events set as false (to get html)
				options.events = false;

				return(json2html.transform(json, transform, options));
			break;

			//Return a jquery object
			case 'jquery':

				//make sure we have the events set as true
				options.events = false;

				//let json2html core do it's magic
				// and then process any jquery events
				var $result = json2html_events(json2html.transform(json, transform, options));

				//return the jquery object
				return($result);
			break;
		}
    };

	//Chaining method
	$.fn.json2html = function(json, transform, _options) {

        //Make sure we have the json2html base loaded
        if(typeof json2html === 'undefined') return(undefined);

        //Default Options
        var options = {
            'append':true,
            'replace':false,
            'prepend':false,
            'eventData':{}
        };

        //Extend the options (with defaults)
        if( _options !== undefined ) $.extend(options, _options);

        //Insure that we have the events turned (Required)
        options.events = true;

        //Otherwise we're running $().json2html
        return this.each(function(){

            //let json2html core do it's magic
            // and then process any jquery events
            var $result = json2html_events(json2html.transform(json, transform, options));

            //Append it to the appropriate element
            if (options.replace) $.fn.replaceWith.call($(this),$result);
            else if (options.prepend) $.fn.prepend.call($(this),$result);
            else $.fn.append.call($(this),$result);
        });
    };
})(jQuery);

function json2html_events(result) {

	//Attach the html(string) result to the DOM
	var dom = $(document.createElement('i')).html(result.html);

	//Determine if we have events
	for(var i = 0; i < result.events.length; i++) {

		var event = result.events[i];

		//find the associated DOM object with this event
		var obj = $(dom).find("[json2html-event-id-"+event.type+"='" + event.id + "']");

		//Check to see if we found this element or not
		if(obj.length === 0) throw 'jquery.json2html was unable to attach event ' + event.id + ' to DOM';

		//remove the attribute
		$(obj).removeAttr('json2html-event-id-'+event.type);

		//attach the event
		$(obj).on(event.type,event.data,function(e){
			//attach the jquery event
			e.data.event = e;

			//call the appropriate method
			e.data.action.call($(this),e.data);
		});
	}

	//Get the children to this result
	return($(dom).children());
}


text:
package org.apache.geode.internal.protocol.serializer;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

import org.apache.geode.annotations.Experimental;
import org.apache.geode.internal.protocol.exception.InvalidProtocolMessageException;

/**
 * This interface is used to translate between binary data and protocol specific messages.
 *
 * @param <T> The message type of the protocol.
 */
@Experimental
public interface ProtocolSerializer<T> {
  T deserialize(InputStream inputStream) throws InvalidProtocolMessageException;

  void serialize(T inputMessage, OutputStream outputStream) throws IOException;
}


text:
package au.com.jtribe.shelly;

/**
 * List of Mime types that can be used for intent types.
 */
final class Mime {
    public static final String ANY_IMAGE = "image/*";
    public static final String ANY_VIDEO = "video/*";

    public static final String PLAIN_TEXT = "text/plain";
    public static final String EMAIL = "message/rfc822";
}


text:
shared_examples 'an entry registry' do

  it 'registers and find_by_title' do
    entry = double
    allow(entry).to receive(:title) { 'something' }

    described_class.register entry
    expect(described_class.find_by_title 'something').to eq entry
  end

end


text:
<?php

declare (strict_types=1);
namespace Rector\Core\Logging;

use Rector\Core\Contract\Rector\RectorInterface;
final class CurrentRectorProvider
{
    /**
     * @var \Rector\Core\Contract\Rector\RectorInterface|null
     */
    private $currentRector;
    public function changeCurrentRector(\Rector\Core\Contract\Rector\RectorInterface $rector) : void
    {
        $this->currentRector = $rector;
    }
    public function getCurrentRector() : ?\Rector\Core\Contract\Rector\RectorInterface
    {
        return $this->currentRector;
    }
}


text:
package com.tappe.test;

import java.io.Serializable;
import java.util.Date;

public class OrganExecute   implements Serializable{

	// Fields

			private String id;

			private String organId;
			private String overOrgan;
			private String validity;

			private Date lastUpdateDate;

			private String operatorId;

			private String organName;

			private Date fillDate;

			private String telephone;

			private String address;

			private String zip;

			private String principalName;
		//×¢²áÀàÐÍ
			private Long registerType;

			private Date projectStartDate;

			private Date expectEndDate;

			private Long runPurpose;
		//´²Î»ÊýÁ¿
			private Long expectBedNumber;

			private Double totleArea;

			private Double buildArea;

			private Double virescenceArea;

			private Double costArea;

			private Date rentBeginDate;

			private Date rentEndDate;

			private Double rentCost;

			private Long housePropertyIdx;

			private Double expectInvestAmt;

			private Long modifyBuild;

			private Long expectBuildStyleIdx;

			private Double glebeCost;

			private Double mechineCost;

			private Double buildCost;

			private Double operatorCost;

			private Double fitmentCost;

			private Double othersCost;

			private Double sourceGovInvest;

			private Double sourceUnitInvest;

			private Double sourceSocietyHelp;

			private Double sourceOthers;

			private String applyunitName;

			private String applyunitPrincipalName;

			private String applyunitTelephone;

			private String applyunitAddress;

			private String applyunitZip;

			private String applyunitProperty;

			private String applyunitProperty2;

			private Long applyunitCharacter;

			private String applypersonName;

			private Long applypersonGender;

			private Date applypersonBirth;

			private Long applypersonPolitic;

			private Long applypersonDegree;

			private String applypersonTitle;

			private String applypersonTelephone;

			private String applypersonAddr;

			private String applypersonIdcard;

			private String areaId;

			private Long areaOpinion;

			private String areaReason;

			private Date areaDate;

			private String areaLeadId;

			private Long areaLeadOpinion;

			private String areaLeadReason;

			private Date areaLeadDate;

			private Date setupEndDate;

			private Date acceptDate;
			private Date remitteeDate;
			private String state;

			private Long revert;

			private String courseControl;

			private Long accessories1;

			private Long accessories2;

			private Long accessories3;

			private Long accessories4;

			private Long accessories5;

			private Long accessories6;

			private Long accessories7;

			private Long accessories8;

			private Long accessories9;

			private Long accessories10;
			private Long acceptNum;
			private Long examineResult;
			/**»ú¹¹µØÖ·XÖá */
			private String xAxis;
			/**»ú¹¹µØÖ·YÖá */
			private String yAxis;
			/**ÇøÏØ´úÂë*/
			private String gisAreaId;
			/**½ÖµÀ´úÂë*/
			private String gisNeighborhoodId;
			/**·/´å*/
			private String gisLucun;
			/**Ū*/
			private String gisNong;
			/**ºÅ*/
			private String gisHao;
			/**´±*/
			private String gisZhuang;
			/**ÊÒ*/
			private String gisShi;

			//setup

			private String setupId;
			private String legalMan;
			private Double investTotal;
			private String property;
			private String property2;
			private Long character;
			private Long executeMethod;
			private Long certNum;
			private Long registerNum;
			private String mainBusiness;
			private String assistantBusiness;
			private Long bedNumber;
			private Double retiringroomArea;
			private Double refectoryArea;
			private Double readingroomArea;
			private Double healingArea;
			private Long numberRealTotle;
			private Long numberManagerTotle;
			private Long numberAdmin;
			private Long numberFinance;
			private Long numberBusiness;
			private Long numberLogistics;
			private Long medicalSum;
			private Long numberMedical;
			private Long numberNurse;
			private Long artificerSum;
			private Long numberArtificerG;
			private Long numberArtificerC;
			private Long numberArtificerZ;
			private Long numberTrain1;
			private Long numberTrain2;
			private Long numberOthers;
			private Long numberSociety;
			private String establishmentDesc;
			private Date executeEndDate;
			private Long applyConut;
			private Long numberArtificerZs;
//			private Set overOrganExecutes = new HashSet(0);
			private Double streetGovInvest;
			private Double areaGovInvest;
			private Double cityGovInvest;
			private Long district;
			private String internalHospitalId;//ÄÚÉèÒ½ÁÆ»ú¹¹±àºÅ
			private String internalNetLevel;//ÁªÍøÇé¿ö   1=ÎÞ

			private String organGradeId;

			private String workOnGradeRels;

			public String getId() {
				return id;
			}
			public void setId(String id) {
				this.id = id;
			}
			public String getOrganId() {
				return organId;
			}
			public void setOrganId(String organId) {
				this.organId = organId;
			}
			public String getOverOrgan() {
				return overOrgan;
			}
			public void setOverOrgan(String overOrgan) {
				this.overOrgan = overOrgan;
			}
			public String getValidity() {
				return validity;
			}
			public void setValidity(String validity) {
				this.validity = validity;
			}
			public Date getLastUpdateDate() {
				return lastUpdateDate;
			}
			public void setLastUpdateDate(Date lastUpdateDate) {
				this.lastUpdateDate = lastUpdateDate;
			}
			public String getOperatorId() {
				return operatorId;
			}
			public void setOperatorId(String operatorId) {
				this.operatorId = operatorId;
			}
			public String getOrganName() {
				return organName;
			}
			public void setOrganName(String organName) {
				this.organName = organName;
			}
			public Date getFillDate() {
				return fillDate;
			}
			public void setFillDate(Date fillDate) {
				this.fillDate = fillDate;
			}
			public String getTelephone() {
				return telephone;
			}
			public void setTelephone(String telephone) {
				this.telephone = telephone;
			}
			public String getAddress() {
				return address;
			}
			public void setAddress(String address) {
				this.address = address;
			}
			public String getZip() {
				return zip;
			}
			public void setZip(String zip) {
				this.zip = zip;
			}
			public String getPrincipalName() {
				return principalName;
			}
			public void setPrincipalName(String principalName) {
				this.principalName = principalName;
			}
			public Long getRegisterType() {
				return registerType;
			}
			public void setRegisterType(Long registerType) {
				this.registerType = registerType;
			}
			public Date getProjectStartDate() {
				return projectStartDate;
			}
			public void setProjectStartDate(Date projectStartDate) {
				this.projectStartDate = projectStartDate;
			}
			public Date getExpectEndDate() {
				return expectEndDate;
			}
			public void setExpectEndDate(Date expectEndDate) {
				this.expectEndDate = expectEndDate;
			}
			public Long getRunPurpose() {
				return runPurpose;
			}
			public void setRunPurpose(Long runPurpose) {
				this.runPurpose = runPurpose;
			}
			public Long getExpectBedNumber() {
				return expectBedNumber;
			}
			public void setExpectBedNumber(Long expectBedNumber) {
				this.expectBedNumber = expectBedNumber;
			}
			public Double getTotleArea() {
				return totleArea;
			}
			public void setTotleArea(Double totleArea) {
				this.totleArea = totleArea;
			}
			public Double getBuildArea() {
				return buildArea;
			}
			public void setBuildArea(Double buildArea) {
				this.buildArea = buildArea;
			}
			public Double getVirescenceArea() {
				return virescenceArea;
			}
			public void setVirescenceArea(Double virescenceArea) {
				this.virescenceArea = virescenceArea;
			}
			public Double getCostArea() {
				return costArea;
			}
			public void setCostArea(Double costArea) {
				this.costArea = costArea;
			}
			public Date getRentBeginDate() {
				return rentBeginDate;
			}
			public void setRentBeginDate(Date rentBeginDate) {
				this.rentBeginDate = rentBeginDate;
			}
			public Date getRentEndDate() {
				return rentEndDate;
			}
			public void setRentEndDate(Date rentEndDate) {
				this.rentEndDate = rentEndDate;
			}
			public Double getRentCost() {
				return rentCost;
			}
			public void setRentCost(Double rentCost) {
				this.rentCost = rentCost;
			}
			public Long getHousePropertyIdx() {
				return housePropertyIdx;
			}
			public void setHousePropertyIdx(Long housePropertyIdx) {
				this.housePropertyIdx = housePropertyIdx;
			}
			public Double getExpectInvestAmt() {
				return expectInvestAmt;
			}
			public void setExpectInvestAmt(Double expectInvestAmt) {
				this.expectInvestAmt = expectInvestAmt;
			}
			public Long getModifyBuild() {
				return modifyBuild;
			}
			public void setModifyBuild(Long modifyBuild) {
				this.modifyBuild = modifyBuild;
			}
			public Long getExpectBuildStyleIdx() {
				return expectBuildStyleIdx;
			}
			public void setExpectBuildStyleIdx(Long expectBuildStyleIdx) {
				this.expectBuildStyleIdx = expectBuildStyleIdx;
			}
			public Double getGlebeCost() {
				return glebeCost;
			}
			public void setGlebeCost(Double glebeCost) {
				this.glebeCost = glebeCost;
			}
			public Double getMechineCost() {
				return mechineCost;
			}
			public void setMechineCost(Double mechineCost) {
				this.mechineCost = mechineCost;
			}
			public Double getBuildCost() {
				return buildCost;
			}
			public void setBuildCost(Double buildCost) {
				this.buildCost = buildCost;
			}
			public Double getOperatorCost() {
				return operatorCost;
			}
			public void setOperatorCost(Double operatorCost) {
				this.operatorCost = operatorCost;
			}
			public Double getFitmentCost() {
				return fitmentCost;
			}
			public void setFitmentCost(Double fitmentCost) {
				this.fitmentCost = fitmentCost;
			}
			public Double getOthersCost() {
				return othersCost;
			}
			public void setOthersCost(Double othersCost) {
				this.othersCost = othersCost;
			}
			public Double getSourceGovInvest() {
				return sourceGovInvest;
			}
			public void setSourceGovInvest(Double sourceGovInvest) {
				this.sourceGovInvest = sourceGovInvest;
			}
			public Double getSourceUnitInvest() {
				return sourceUnitInvest;
			}
			public void setSourceUnitInvest(Double sourceUnitInvest) {
				this.sourceUnitInvest = sourceUnitInvest;
			}
			public Double getSourceSocietyHelp() {
				return sourceSocietyHelp;
			}
			public void setSourceSocietyHelp(Double sourceSocietyHelp) {
				this.sourceSocietyHelp = sourceSocietyHelp;
			}
			public Double getSourceOthers() {
				return sourceOthers;
			}
			public void setSourceOthers(Double sourceOthers) {
				this.sourceOthers = sourceOthers;
			}
			public String getApplyunitName() {
				return applyunitName;
			}
			public void setApplyunitName(String applyunitName) {
				this.applyunitName = applyunitName;
			}
			public String getApplyunitPrincipalName() {
				return applyunitPrincipalName;
			}
			public void setApplyunitPrincipalName(String applyunitPrincipalName) {
				this.applyunitPrincipalName = applyunitPrincipalName;
			}
			public String getApplyunitTelephone() {
				return applyunitTelephone;
			}
			public void setApplyunitTelephone(String applyunitTelephone) {
				this.applyunitTelephone = applyunitTelephone;
			}
			public String getApplyunitAddress() {
				return applyunitAddress;
			}
			public void setApplyunitAddress(String applyunitAddress) {
				this.applyunitAddress = applyunitAddress;
			}
			public String getApplyunitZip() {
				return applyunitZip;
			}
			public void setApplyunitZip(String applyunitZip) {
				this.applyunitZip = applyunitZip;
			}
			public String getApplyunitProperty() {
				return applyunitProperty;
			}
			public void setApplyunitProperty(String applyunitProperty) {
				this.applyunitProperty = applyunitProperty;
			}
			public String getApplyunitProperty2() {
				return applyunitProperty2;
			}
			public void setApplyunitProperty2(String applyunitProperty2) {
				this.applyunitProperty2 = applyunitProperty2;
			}
			public Long getApplyunitCharacter() {
				return applyunitCharacter;
			}
			public void setApplyunitCharacter(Long applyunitCharacter) {
				this.applyunitCharacter = applyunitCharacter;
			}
			public String getApplypersonName() {
				return applypersonName;
			}
			public void setApplypersonName(String applypersonName) {
				this.applypersonName = applypersonName;
			}
			public Long getApplypersonGender() {
				return applypersonGender;
			}
			public void setApplypersonGender(Long applypersonGender) {
				this.applypersonGender = applypersonGender;
			}
			public Date getApplypersonBirth() {
				return applypersonBirth;
			}
			public void setApplypersonBirth(Date applypersonBirth) {
				this.applypersonBirth = applypersonBirth;
			}
			public Long getApplypersonPolitic() {
				return applypersonPolitic;
			}
			public void setApplypersonPolitic(Long applypersonPolitic) {
				this.applypersonPolitic = applypersonPolitic;
			}
			public Long getApplypersonDegree() {
				return applypersonDegree;
			}
			public void setApplypersonDegree(Long applypersonDegree) {
				this.applypersonDegree = applypersonDegree;
			}
			public String getApplypersonTitle() {
				return applypersonTitle;
			}
			public void setApplypersonTitle(String applypersonTitle) {
				this.applypersonTitle = applypersonTitle;
			}
			public String getApplypersonTelephone() {
				return applypersonTelephone;
			}
			public void setApplypersonTelephone(String applypersonTelephone) {
				this.applypersonTelephone = applypersonTelephone;
			}
			public String getApplypersonAddr() {
				return applypersonAddr;
			}
			public void setApplypersonAddr(String applypersonAddr) {
				this.applypersonAddr = applypersonAddr;
			}
			public String getApplypersonIdcard() {
				return applypersonIdcard;
			}
			public void setApplypersonIdcard(String applypersonIdcard) {
				this.applypersonIdcard = applypersonIdcard;
			}
			public String getAreaId() {
				return areaId;
			}
			public void setAreaId(String areaId) {
				this.areaId = areaId;
			}
			public Long getAreaOpinion() {
				return areaOpinion;
			}
			public void setAreaOpinion(Long areaOpinion) {
				this.areaOpinion = areaOpinion;
			}
			public String getAreaReason() {
				return areaReason;
			}
			public void setAreaReason(String areaReason) {
				this.areaReason = areaReason;
			}
			public Date getAreaDate() {
				return areaDate;
			}
			public void setAreaDate(Date areaDate) {
				this.areaDate = areaDate;
			}
			public String getAreaLeadId() {
				return areaLeadId;
			}
			public void setAreaLeadId(String areaLeadId) {
				this.areaLeadId = areaLeadId;
			}
			public Long getAreaLeadOpinion() {
				return areaLeadOpinion;
			}
			public void setAreaLeadOpinion(Long areaLeadOpinion) {
				this.areaLeadOpinion = areaLeadOpinion;
			}
			public String getAreaLeadReason() {
				return areaLeadReason;
			}
			public void setAreaLeadReason(String areaLeadReason) {
				this.areaLeadReason = areaLeadReason;
			}
			public Date getAreaLeadDate() {
				return areaLeadDate;
			}
			public void setAreaLeadDate(Date areaLeadDate) {
				this.areaLeadDate = areaLeadDate;
			}
			public Date getSetupEndDate() {
				return setupEndDate;
			}
			public void setSetupEndDate(Date setupEndDate) {
				this.setupEndDate = setupEndDate;
			}
			public Date getAcceptDate() {
				return acceptDate;
			}
			public void setAcceptDate(Date acceptDate) {
				this.acceptDate = acceptDate;
			}
			public Date getRemitteeDate() {
				return remitteeDate;
			}
			public void setRemitteeDate(Date remitteeDate) {
				this.remitteeDate = remitteeDate;
			}
			public String getState() {
				return state;
			}
			public void setState(String state) {
				this.state = state;
			}
			public Long getRevert() {
				return revert;
			}
			public void setRevert(Long revert) {
				this.revert = revert;
			}
			public String getCourseControl() {
				return courseControl;
			}
			public void setCourseControl(String courseControl) {
				this.courseControl = courseControl;
			}
			public Long getAccessories1() {
				return accessories1;
			}
			public void setAccessories1(Long accessories1) {
				this.accessories1 = accessories1;
			}
			public Long getAccessories2() {
				return accessories2;
			}
			public void setAccessories2(Long accessories2) {
				this.accessories2 = accessories2;
			}
			public Long getAccessories3() {
				return accessories3;
			}
			public void setAccessories3(Long accessories3) {
				this.accessories3 = accessories3;
			}
			public Long getAccessories4() {
				return accessories4;
			}
			public void setAccessories4(Long accessories4) {
				this.accessories4 = accessories4;
			}
			public Long getAccessories5() {
				return accessories5;
			}
			public void setAccessories5(Long accessories5) {
				this.accessories5 = accessories5;
			}
			public Long getAccessories6() {
				return accessories6;
			}
			public void setAccessories6(Long accessories6) {
				this.accessories6 = accessories6;
			}
			public Long getAccessories7() {
				return accessories7;
			}
			public void setAccessories7(Long accessories7) {
				this.accessories7 = accessories7;
			}
			public Long getAccessories8() {
				return accessories8;
			}
			public void setAccessories8(Long accessories8) {
				this.accessories8 = accessories8;
			}
			public Long getAccessories9() {
				return accessories9;
			}
			public void setAccessories9(Long accessories9) {
				this.accessories9 = accessories9;
			}
			public Long getAccessories10() {
				return accessories10;
			}
			public void setAccessories10(Long accessories10) {
				this.accessories10 = accessories10;
			}
			public Long getAcceptNum() {
				return acceptNum;
			}
			public void setAcceptNum(Long acceptNum) {
				this.acceptNum = acceptNum;
			}
			public Long getExamineResult() {
				return examineResult;
			}
			public void setExamineResult(Long examineResult) {
				this.examineResult = examineResult;
			}
			public String getxAxis() {
				return xAxis;
			}
			public void setxAxis(String xAxis) {
				this.xAxis = xAxis;
			}
			public String getyAxis() {
				return yAxis;
			}
			public void setyAxis(String yAxis) {
				this.yAxis = yAxis;
			}
			public String getGisAreaId() {
				return gisAreaId;
			}
			public void setGisAreaId(String gisAreaId) {
				this.gisAreaId = gisAreaId;
			}
			public String getGisNeighborhoodId() {
				return gisNeighborhoodId;
			}
			public void setGisNeighborhoodId(String gisNeighborhoodId) {
				this.gisNeighborhoodId = gisNeighborhoodId;
			}
			public String getGisLucun() {
				return gisLucun;
			}
			public void setGisLucun(String gisLucun) {
				this.gisLucun = gisLucun;
			}
			public String getGisNong() {
				return gisNong;
			}
			public void setGisNong(String gisNong) {
				this.gisNong = gisNong;
			}
			public String getGisHao() {
				return gisHao;
			}
			public void setGisHao(String gisHao) {
				this.gisHao = gisHao;
			}
			public String getGisZhuang() {
				return gisZhuang;
			}
			public void setGisZhuang(String gisZhuang) {
				this.gisZhuang = gisZhuang;
			}
			public String getGisShi() {
				return gisShi;
			}
			public void setGisShi(String gisShi) {
				this.gisShi = gisShi;
			}
			public String getSetupId() {
				return setupId;
			}
			public void setSetupId(String setupId) {
				this.setupId = setupId;
			}
			public String getLegalMan() {
				return legalMan;
			}
			public void setLegalMan(String legalMan) {
				this.legalMan = legalMan;
			}
			public Double getInvestTotal() {
				return investTotal;
			}
			public void setInvestTotal(Double investTotal) {
				this.investTotal = investTotal;
			}
			public String getProperty() {
				return property;
			}
			public void setProperty(String property) {
				this.property = property;
			}
			public String getProperty2() {
				return property2;
			}
			public void setProperty2(String property2) {
				this.property2 = property2;
			}
			public Long getCharacter() {
				return character;
			}
			public void setCharacter(Long character) {
				this.character = character;
			}
			public Long getExecuteMethod() {
				return executeMethod;
			}
			public void setExecuteMethod(Long executeMethod) {
				this.executeMethod = executeMethod;
			}
			public Long getCertNum() {
				return certNum;
			}
			public void setCertNum(Long certNum) {
				this.certNum = certNum;
			}
			public Long getRegisterNum() {
				return registerNum;
			}
			public void setRegisterNum(Long registerNum) {
				this.registerNum = registerNum;
			}
			public String getMainBusiness() {
				return mainBusiness;
			}
			public void setMainBusiness(String mainBusiness) {
				this.mainBusiness = mainBusiness;
			}
			public String getAssistantBusiness() {
				return assistantBusiness;
			}
			public void setAssistantBusiness(String assistantBusiness) {
				this.assistantBusiness = assistantBusiness;
			}
			public Long getBedNumber() {
				return bedNumber;
			}
			public void setBedNumber(Long bedNumber) {
				this.bedNumber = bedNumber;
			}
			public Double getRetiringroomArea() {
				return retiringroomArea;
			}
			public void setRetiringroomArea(Double retiringroomArea) {
				this.retiringroomArea = retiringroomArea;
			}
			public Double getRefectoryArea() {
				return refectoryArea;
			}
			public void setRefectoryArea(Double refectoryArea) {
				this.refectoryArea = refectoryArea;
			}
			public Double getReadingroomArea() {
				return readingroomArea;
			}
			public void setReadingroomArea(Double readingroomArea) {
				this.readingroomArea = readingroomArea;
			}
			public Double getHealingArea() {
				return healingArea;
			}
			public void setHealingArea(Double healingArea) {
				this.healingArea = healingArea;
			}
			public Long getNumberRealTotle() {
				return numberRealTotle;
			}
			public void setNumberRealTotle(Long numberRealTotle) {
				this.numberRealTotle = numberRealTotle;
			}
			public Long getNumberManagerTotle() {
				return numberManagerTotle;
			}
			public void setNumberManagerTotle(Long numberManagerTotle) {
				this.numberManagerTotle = numberManagerTotle;
			}
			public Long getNumberAdmin() {
				return numberAdmin;
			}
			public void setNumberAdmin(Long numberAdmin) {
				this.numberAdmin = numberAdmin;
			}
			public Long getNumberFinance() {
				return numberFinance;
			}
			public void setNumberFinance(Long numberFinance) {
				this.numberFinance = numberFinance;
			}
			public Long getNumberBusiness() {
				return numberBusiness;
			}
			public void setNumberBusiness(Long numberBusiness) {
				this.numberBusiness = numberBusiness;
			}
			public Long getNumberLogistics() {
				return numberLogistics;
			}
			public void setNumberLogistics(Long numberLogistics) {
				this.numberLogistics = numberLogistics;
			}
			public Long getMedicalSum() {
				return medicalSum;
			}
			public void setMedicalSum(Long medicalSum) {
				this.medicalSum = medicalSum;
			}
			public Long getNumberMedical() {
				return numberMedical;
			}
			public void setNumberMedical(Long numberMedical) {
				this.numberMedical = numberMedical;
			}
			public Long getNumberNurse() {
				return numberNurse;
			}
			public void setNumberNurse(Long numberNurse) {
				this.numberNurse = numberNurse;
			}
			public Long getArtificerSum() {
				return artificerSum;
			}
			public void setArtificerSum(Long artificerSum) {
				this.artificerSum = artificerSum;
			}
			public Long getNumberArtificerG() {
				return numberArtificerG;
			}
			public void setNumberArtificerG(Long numberArtificerG) {
				this.numberArtificerG = numberArtificerG;
			}
			public Long getNumberArtificerC() {
				return numberArtificerC;
			}
			public void setNumberArtificerC(Long numberArtificerC) {
				this.numberArtificerC = numberArtificerC;
			}
			public Long getNumberArtificerZ() {
				return numberArtificerZ;
			}
			public void setNumberArtificerZ(Long numberArtificerZ) {
				this.numberArtificerZ = numberArtificerZ;
			}
			public Long getNumberTrain1() {
				return numberTrain1;
			}
			public void setNumberTrain1(Long numberTrain1) {
				this.numberTrain1 = numberTrain1;
			}
			public Long getNumberTrain2() {
				return numberTrain2;
			}
			public void setNumberTrain2(Long numberTrain2) {
				this.numberTrain2 = numberTrain2;
			}
			public Long getNumberOthers() {
				return numberOthers;
			}
			public void setNumberOthers(Long numberOthers) {
				this.numberOthers = numberOthers;
			}
			public Long getNumberSociety() {
				return numberSociety;
			}
			public void setNumberSociety(Long numberSociety) {
				this.numberSociety = numberSociety;
			}
			public String getEstablishmentDesc() {
				return establishmentDesc;
			}
			public void setEstablishmentDesc(String establishmentDesc) {
				this.establishmentDesc = establishmentDesc;
			}
			public Date getExecuteEndDate() {
				return executeEndDate;
			}
			public void setExecuteEndDate(Date executeEndDate) {
				this.executeEndDate = executeEndDate;
			}
			public Long getApplyConut() {
				return applyConut;
			}
			public void setApplyConut(Long applyConut) {
				this.applyConut = applyConut;
			}
			public Long getNumberArtificerZs() {
				return numberArtificerZs;
			}
			public void setNumberArtificerZs(Long numberArtificerZs) {
				this.numberArtificerZs = numberArtificerZs;
			}
//			public Set getOverOrganExecutes() {
//				return overOrganExecutes;
//			}
//			public void setOverOrganExecutes(Set overOrganExecutes) {
//				this.overOrganExecutes = overOrganExecutes;
//			}
			public Double getStreetGovInvest() {
				return streetGovInvest;
			}
			public void setStreetGovInvest(Double streetGovInvest) {
				this.streetGovInvest = streetGovInvest;
			}
			public Double getAreaGovInvest() {
				return areaGovInvest;
			}
			public void setAreaGovInvest(Double areaGovInvest) {
				this.areaGovInvest = areaGovInvest;
			}
			public Double getCityGovInvest() {
				return cityGovInvest;
			}
			public void setCityGovInvest(Double cityGovInvest) {
				this.cityGovInvest = cityGovInvest;
			}
			public Long getDistrict() {
				return district;
			}
			public void setDistrict(Long district) {
				this.district = district;
			}
			public String getInternalHospitalId() {
				return internalHospitalId;
			}
			public void setInternalHospitalId(String internalHospitalId) {
				this.internalHospitalId = internalHospitalId;
			}
			public String getInternalNetLevel() {
				return internalNetLevel;
			}
			public void setInternalNetLevel(String internalNetLevel) {
				this.internalNetLevel = internalNetLevel;
			}
			public String getOrganGradeId() {
				return organGradeId;
			}
			public void setOrganGradeId(String organGradeId) {
				this.organGradeId = organGradeId;
			}
			public String getWorkOnGradeRels() {
				return workOnGradeRels;
			}
			public void setWorkOnGradeRels(String workOnGradeRels) {
				this.workOnGradeRels = workOnGradeRels;
			}

}


text:
<?php

class FileUserGroupValidator {

	var $path;
	var $resultArray;
	var $groupsAssigned;

	//method to load the supplied files's user groups
	function loadFileUserGroups($path) {

		unset($this->resultArray);

		$this->path = $path;

		//if groups are assigned to this file, see if the current user is in any of the groups
		$result = mysql_query("SELECT * FROM fileManager WHERE fsPath = '{$this->path}' AND groupId != ''");

		if (mysql_num_rows($result) > 0) {

			$result = mysql_query("SELECT fileManager.owner, userGroups.id, userGroups.restrictViewing, userGroups.allowEditing FROM fileManager INNER JOIN userGroupsMembers ON userGroupsMembers.groupId = fileManager.groupId AND userGroupsMembers.username = '{$_SESSION['username']}' INNER JOIN userGroups ON userGroups.id = userGroupsMembers.groupId WHERE fileManager.fsPath = '{$this->path}'");
			while(($this->resultArray[] = mysql_fetch_assoc($result)) || array_pop($this->resultArray));
			$this->groupsAssigned = true;

		} else {

			$this->groupsAssigned = false;

		}

	}

	//
	function allowRead() {

		//master account exception
		if ($_SESSION['userLevel'] == 1) {

			return(true);

		}

		//if there are no groups assigned to this file return true (allow view)
		if ($this->groupsAssigned === false) {

			return(true);

		} else {

			//if groups are assigned to this file, see if any of the groups restrict viewing, if not, return true
			$result = mysql_query("SELECT * FROM fileManager INNER JOIN userGroups ON userGroups.id = fileManager.groupId WHERE fileManager.fsPath = '{$this->path}' AND userGroups.restrictViewing = '1'");

			if (mysql_num_rows($result) == 0) {

				return(true);

			} else {

				//if groups are assigned to this file, check if any of the groups this user is a part of are set to restrict viewing, if so, return true
				for ($x = 0; $x < count($this->resultArray); $x++) {

					if ($this->resultArray[$x]['restrictViewing'] == '1') {

						return(true);

					}

				}

			}

		}

		//returns false if the user is not in any of the assigned groups
		return(false);

	}

	//
	function allowEditing() {

		//master account exception
		if ($_SESSION['userLevel'] == 1) {

			return(true);

		}

		//if there are no groups assigned to this file return true (allow edit)
		if ($this->groupsAssigned === false) {

			return(true);

		} else {

			//if groups are assigned to this file, check if any of the groups this user is a part of allow editing, if so, return true
			for ($x = 0; $x < count($this->resultArray); $x++) {

				if ($this->resultArray[$x]['allowEditing'] == '1') {

					return(true);

				}

			}

		}

		//returns false if the user is not in any of the assigned groups
		return(false);

	}

}

?>


text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/container/v1/cluster_service.proto

package com.google.container.v1;

public interface ListOperationsRequestOrBuilder
    extends
    // @@protoc_insertion_point(interface_extends:google.container.v1.ListOperationsRequest)
    com.google.protobuf.MessageOrBuilder {

  /**
   *
   *
   *

   * Deprecated. The Google Developers Console [project ID or project
   * number](https://support.google.com/cloud/answer/6158840).
   * This field has been deprecated and replaced by the parent field.
   *

   *
   * string project_id = 1 [deprecated = true];
   */
  @java.lang.Deprecated
  java.lang.String getProjectId();
  /**
   *
   *
   *

   * Deprecated. The Google Developers Console [project ID or project
   * number](https://support.google.com/cloud/answer/6158840).
   * This field has been deprecated and replaced by the parent field.
   *

   *
   * string project_id = 1 [deprecated = true];
   */
  @java.lang.Deprecated
  com.google.protobuf.ByteString getProjectIdBytes();

  /**
   *
   *
   *

   * Deprecated. The name of the Google Compute Engine
   * [zone](/compute/docs/zones#available) to return operations for, or `-` for
   * all zones. This field has been deprecated and replaced by the parent field.
   *

   *
   * string zone = 2 [deprecated = true];
   */
  @java.lang.Deprecated
  java.lang.String getZone();
  /**
   *
   *
   *

   * Deprecated. The name of the Google Compute Engine
   * [zone](/compute/docs/zones#available) to return operations for, or `-` for
   * all zones. This field has been deprecated and replaced by the parent field.
   *

   *
   * string zone = 2 [deprecated = true];
   */
  @java.lang.Deprecated
  com.google.protobuf.ByteString getZoneBytes();

  /**
   *
   *
   *

   * The parent (project and location) where the operations will be listed.
   * Specified in the format 'projects/*/locations/*'.
   * Location "-" matches all zones and all regions.
   *

   *
   * string parent = 4;
   */
  java.lang.String getParent();
  /**
   *
   *
   *

   * The parent (project and location) where the operations will be listed.
   * Specified in the format 'projects/*/locations/*'.
   * Location "-" matches all zones and all regions.
   *

   *
   * string parent = 4;
   */
  com.google.protobuf.ByteString getParentBytes();
}


text:
package io.rong.common;

public class RongException{

    private int code;

    public RongException(ErrorCode errorCode){
        this.code = errorCode.getValue();
    }

    public RongException(int code){
        ErrorCode errorCode = ErrorCode.setValue(code);
        this.code = errorCode.getValue();
    }

    public RongException(Throwable throwable){
        ErrorCode errorCode = ErrorCode.UNKNOWN;
        this.code = errorCode.getValue();
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}


text:
namespace ash {

namespace {
constexpr char kOemDataLogName[] = "oemdata";
}  // namespace

ProbeService::ProbeService(
    mojo::PendingReceiver<health::mojom::ProbeService> receiver)
    : receiver_(this, std::move(receiver)) {}

ProbeService::~ProbeService() = default;

void ProbeService::ProbeTelemetryInfo(
    const std::vector<health::mojom::ProbeCategoryEnum>& categories,
    ProbeTelemetryInfoCallback callback) {
  GetService()->ProbeTelemetryInfo(
      converters::ConvertCategoryVector(categories),
      base::BindOnce(
          [](health::mojom::ProbeService::ProbeTelemetryInfoCallback callback,
             cros_healthd::mojom::TelemetryInfoPtr ptr) {
            std::move(callback).Run(converters::ConvertPtr(std::move(ptr)));
          },
          std::move(callback)));
}

void ProbeService::GetOemData(GetOemDataCallback callback) {
  chromeos::DebugDaemonClient* debugd_client =
      chromeos::DBusThreadManager::Get()->GetDebugDaemonClient();
  debugd_client->GetLog(
      kOemDataLogName,
      base::BindOnce(
          [](GetOemDataCallback callback,
             absl::optional<std::string> oem_data) {
            std::move(callback).Run(
                health::mojom::OemData::New(std::move(oem_data)));
          },
          std::move(callback)));
}

cros_healthd::mojom::CrosHealthdProbeService* ProbeService::GetService() {
  if (!service_ || !service_.is_connected()) {
    cros_healthd::ServiceConnection::GetInstance()->GetProbeService(
        service_.BindNewPipeAndPassReceiver());
    service_.set_disconnect_handler(
        base::BindOnce(&ProbeService::OnDisconnect, base::Unretained(this)));
  }
  return service_.get();
}

void ProbeService::OnDisconnect() {
  service_.reset();
}

}  // namespace ash


text:
<?php

namespace OC\Files\Type;

class TemplateManager {
	protected $templates = [];

	public function registerTemplate($mimetype, $path) {
		$this->templates[$mimetype] = $path;
	}

	/**
	 * get the path of the template for a mimetype
	 *
	 * @param string $mimetype
	 * @return string|null
	 */
	public function getTemplatePath($mimetype) {
		if (isset($this->templates[$mimetype])) {
			return $this->templates[$mimetype];
		} else {
			return null;
		}
	}

	/**
	 * get the template content for a mimetype
	 *
	 * @param string $mimetype
	 * @return string
	 */
	public function getTemplate($mimetype) {
		$path = $this->getTemplatePath($mimetype);
		if ($path) {
			return \file_get_contents($path);
		} else {
			return '';
		}
	}
}


text:
const React = require('react');
const {expect} = require('chai');

const {getAppPath, shallow, pages, defaultTranslator, admin} = require('../../_shared.js');

const Page = require(getAppPath(2) + 'components/pages/Page').default.WrappedComponent;

describe('Testing Page Component.', () => {

  const props = {
    pageInfo: {
      pending: false,
      page: null
    },
    userData: null
  };

  const pageId = '[data-test-id="Page"]';
  const titleId = '[data-test-id="title"]';
  const textId = '[data-test-id="text"]';
  const linkEditId = '[data-test-id="link-to-edit"]';

  it('should show component correctly', () => {
    const wrapper = shallow(<Page {...props} />);

    wrapper.setProps({...props,
      pageInfo: {...props.pageInfo,
        pending: true
      }
    });
    expect(wrapper.find(pageId).exists()).equal(false);

    wrapper.setProps({...props,
      pageInfo: {...props.pageInfo,
        pending: false,
        page: null
      }
    });
    expect(wrapper.find(pageId).exists()).equal(false);

    wrapper.setProps({...props,
      pageInfo: {...props.pageInfo,
        pending: false,
        page: pages[0]
      }
    });
    expect(wrapper.find(pageId).exists()).equal(true);
    expect(wrapper.find(titleId).text()).equal(pages[0].title);

    const expectedTitle = 'expected title';
    wrapper.setProps({...props,
      pageInfo: {...props.pageInfo,
        pending: false,
        page: {...pages[0],
          title: expectedTitle
        }
      }
    });
    expect(wrapper.find(titleId).text()).equal(expectedTitle);

    const expectedText = 'expected text';
    wrapper.setProps({...props,
      pageInfo: {...props.pageInfo,
        pending: false,
        page: {...pages[0],
          text: expectedText
        }
      }
    });
    expect(wrapper.find(textId).prop('dangerouslySetInnerHTML')['__html']).equal(expectedText);

    expect(wrapper.find(linkEditId).exists()).equal(false);
    wrapper.setProps({...props,
      pageInfo: {...props.pageInfo,
        page: pages[0]
      },
      userData: admin
    });
    expect(wrapper.find(linkEditId).exists()).equal(true);
    expect(wrapper.find(linkEditId).children().prop('to'))
      .equal('/pages/' + pages[0].url + '/edit');

    const equalId = 'equal-id';
    wrapper.setProps({...props,
      pageInfo: {...props.pageInfo,
        page: {
          ...pages[0],
          author: equalId
        }
      },
      userData: {
        ...defaultTranslator,
        id: equalId
      }
    });
    expect(wrapper.find(linkEditId).exists()).equal(true);
    expect(wrapper.find(linkEditId).children().prop('to'))
      .equal('/pages/' + pages[0].url + '/edit');

    const anotherId = 'another-id';
    wrapper.setProps({...props,
      pageInfo: {...props.pageInfo,
        page: {
          ...pages[0],
          author: equalId
        }
      },
      userData: {
        ...defaultTranslator,
        id: anotherId
      }
    });
    expect(wrapper.find(linkEditId).exists()).equal(false);

    wrapper.unmount();
  });
});


text:
'use strict';

describe('Service: overlayService', function () {

  // load the service's module
  beforeEach(module('cubeApp'));

  // instantiate service
  var overlayService;
  beforeEach(inject(function (_overlayService_) {
    overlayService = _overlayService_;
  }));

  it('should do something', function () {
    expect(!!overlayService).toBe(true);
  });

});


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <title>AngularJS ui-select</title>

  <link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.css">

  <link rel="stylesheet" href="/bower_components/ui-select/dist/select.css">

  <link rel="stylesheet" href="/bower_components/select2/select2.css">

  <link rel="stylesheet" href="/bower_components/selectize/dist/css/selectize.default.css">

  <button class="btn btn-default btn-xs" ng-click="enable()">Enable ui-select</button>
  <button class="btn btn-default btn-xs" ng-click="disable()">Disable ui-select</button>
  <button class="btn btn-default btn-xs" ng-click="clear()">Clear ng-model</button>

Select2 theme

Selected: {{country.selected}}

 Filter groups by array (group-filter="['Z','B','C']")

  <ui-select ng-model="country.selected" theme="select2" ng-disabled="disabled" style="width: 300px;" title="Choose a country">
    <ui-select-match placeholder="Select or search a country in the list...">{{$select.selected.name}}</ui-select-match>
    <ui-select-choices group-by="firstLetterGroupFn" group-filter="['Z','B','C']" repeat="country in countries | filter: $select.search">

    </ui-select-choices>
  </ui-select>

 Filter groups using a function (group-filter="reverseOrderFilterFn")

  <ui-select ng-model="country.selected" theme="select2" ng-disabled="disabled" style="width: 300px;" title="Choose a country">
    <ui-select-match placeholder="Select or search a country in the list...">{{$select.selected.name}}</ui-select-match>
    <ui-select-choices group-by="firstLetterGroupFn" group-filter="reverseOrderFilterFn" repeat="country in countries | filter: $select.search">

    </ui-select-choices>
  </ui-select>


text:
static const NSString * gestureKey = @"gestureKey";

@implementation XRVerticalInteractiveTransitionAnimation
{
    BOOL _shouldComplate; // 是否完成转场
    UIViewController * _viewController;
}

- (void)wireToViewController:(UIViewController *)viewController withOperation:(XRInteractiveOperation)opt
{
    if (opt == XRInteractiveOperationTab) {
        @throw [NSException exceptionWithName:NSInternalInconsistencyException reason:@"tab not allowed use" userInfo:nil];
    }
    self.popOnRightToLeft = YES;
    self.operation = opt;
    _viewController = viewController;

    [self addGestureToView:_viewController.view];
}

// add pan gesture
- (void)addGestureToView:(UIView *)view
{
    // 获取手势
    UIPanGestureRecognizer * panGes = objc_getAssociatedObject(view, (__bridge const void*)gestureKey);

    if (panGes) {
        [view removeGestureRecognizer:panGes];
    }

    // 创建pan手势
    panGes = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handlePanGesture:)];
    [view addGestureRecognizer:panGes];

    // 设置runtime 对象
    objc_setAssociatedObject(view, (__bridge const void *)gestureKey, panGes, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

- (CGFloat)completionSpeed
{
    return 1 - self.percentComplete;
}

- (void)handlePanGesture:(UIPanGestureRecognizer *)panGes
{
    CGPoint translation = [panGes translationInView:panGes.view.superview];
    CGPoint vel = [panGes velocityInView:panGes.view];

    switch (panGes.state) {
        case UIGestureRecognizerStateBegan: {

            BOOL rightToLeftSwipe = vel.x < 0;

            // perform the required navigation operation ...

            if (self.operation == XRInteractiveOperationPop) {
                // for pop operation, fire on right-to-left
                if ((self.popOnRightToLeft && rightToLeftSwipe) ||
                    (!self.popOnRightToLeft && !rightToLeftSwipe)) {
                    self.interactiveWithProgress = YES;
                    [_viewController.navigationController popViewControllerAnimated:YES];
                }
            } else if (self.operation == XRInteractiveOperationTab) {
                // for tab controllers, we need to determine which direction to transition
                if (rightToLeftSwipe) {
                    if (_viewController.tabBarController.selectedIndex < _viewController.tabBarController.viewControllers.count - 1) {
                        self.interactiveWithProgress = YES;
                        _viewController.tabBarController.selectedIndex++;
                    }

                } else {
                    if (_viewController.tabBarController.selectedIndex > 0) {
                        self.interactiveWithProgress = YES;
                        _viewController.tabBarController.selectedIndex--;
                    }
                }
            } else {
                // for dismiss, fire regardless of the translation direction
                self.interactiveWithProgress = YES;
                [_viewController dismissViewControllerAnimated:YES completion:nil];
            }
            break;
        }
        case UIGestureRecognizerStateChanged: {
            if (self.interactiveWithProgress) {
                // compute the current position
                CGFloat fraction = fabs(translation.x / 200.0);
                fraction = fminf(fmaxf(fraction, 0.0), 1.0);
                _shouldComplate = (fraction > 0.5);

                // if an interactive transitions is 100% completed via the user interaction, for some reason
                // the animation completion block is not called, and hence the transition is not completed.
                // This glorious hack makes sure that this doesn't happen.
                // see: https://github.com/ColinEberhardt/VCTransitionsLibrary/issues/4
                if (fraction >= 1.0)
                    fraction = 0.99;

                [self updateInteractiveTransition:fraction];
            }
            break;
        }
        case UIGestureRecognizerStateEnded:
        case UIGestureRecognizerStateCancelled:
            if (self.interactiveWithProgress) {
                self.interactiveWithProgress = NO;
                if (!_shouldComplate || panGes.state == UIGestureRecognizerStateCancelled) {
                    [self cancelInteractiveTransition];
                }
                else {
                    [self finishInteractiveTransition];
                }
            }
            break;
        default:
            break;
    }
}

@end


text:
https://discourse.nixos.org/t/migrating-from-homebrew-to-nix-for-osx/2892

[Download](https://nixos.org/download.html)

:apple: MacOS

```
$ sh <(curl https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume
```

Source Profile

```
$ source ~/.nix-profile/etc/profile.d/nix.sh
```

Nix Store

```
% ls -l /nix
```

:computer: Windows

https://nathan.gs/2019/04/12/nix-on-windows/


text:
package router

import (
	"net/http"
	"time"

	g "github.com/onsi/ginkgo"
	o "github.com/onsi/gomega"

	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/labels"
	"k8s.io/apimachinery/pkg/util/wait"

	routeclientset "github.com/openshift/client-go/route/clientset/versioned"
	exutil "github.com/openshift/origin/test/extended/util"
	"github.com/openshift/origin/test/extended/util/url"
)

var _ = g.Describe("[Conformance][Area:Networking][Feature:Router]", func() {
	defer g.GinkgoRecover()
	var (
		host, ns string
		oc       *exutil.CLI

		configPath = exutil.FixturePath("testdata", "ingress.yaml")
	)

	// this hook must be registered before the framework namespace teardown
	// hook
	g.AfterEach(func() {
		if g.CurrentGinkgoTestDescription().Failed {
			currlabel := "router=router"
			for _, ns := range []string{"default", "openshift-ingress", "tectonic-ingress"} {
				//Search the router by label
				if ns == "openshift-ingress" {
					currlabel = "router=router-default"
				}
				exutil.DumpPodLogsStartingWithInNamespace("router", ns, oc.AsAdmin())
				selector, err := labels.Parse(currlabel)
				if err != nil {
					panic(err)
				}
				exutil.DumpPodsCommand(oc.AdminKubeClient(), ns, selector, "cat /var/lib/haproxy/router/routes.json /var/lib/haproxy/conf/haproxy.config")
			}
		}
	})

	oc = exutil.NewCLI("router-stress", exutil.KubeConfigPath())

	g.BeforeEach(func() {
		var err error
		host, err = exutil.WaitForRouterServiceIP(oc)
		o.Expect(err).NotTo(o.HaveOccurred())

		ns = oc.KubeFramework().Namespace.Name
	})

	g.Describe("The HAProxy router", func() {
		g.It("should respond with 503 to unrecognized hosts", func() {
			t := url.NewTester(oc.AdminKubeClient(), ns)
			defer t.Close()
			t.Within(
				time.Minute,
				url.Expect("GET", "https://www.google.com").Through(host).SkipTLSVerification().HasStatusCode(503),
				url.Expect("GET", "http://www.google.com").Through(host).HasStatusCode(503),
			)
		})

		g.It("should serve routes that were created from an ingress", func() {
			g.By("deploying an ingress rule")
			err := oc.Run("create").Args("-f", configPath).Execute()
			o.Expect(err).NotTo(o.HaveOccurred())

			g.By("waiting for the ingress rule to be converted to routes")
			client := routeclientset.NewForConfigOrDie(oc.AdminConfig())
			err = wait.Poll(time.Second, time.Minute, func() (bool, error) {
				routes, err := client.RouteV1().Routes(ns).List(metav1.ListOptions{})
				if err != nil {
					return false, err
				}
				return len(routes.Items) == 4, nil
			})
			o.Expect(err).NotTo(o.HaveOccurred())

			g.By("verifying the router reports the correct behavior")
			t := url.NewTester(oc.AdminKubeClient(), ns)
			defer t.Close()
			t.Within(
				3*time.Minute,
				url.Expect("GET", "http://1.ingress-test.com/test").Through(host).HasStatusCode(200),
				url.Expect("GET", "http://1.ingress-test.com/other/deep").Through(host).HasStatusCode(200),
				url.Expect("GET", "http://1.ingress-test.com/").Through(host).HasStatusCode(503),
				url.Expect("GET", "http://2.ingress-test.com/").Through(host).HasStatusCode(200),
				url.Expect("GET", "https://3.ingress-test.com/").Through(host).SkipTLSVerification().HasStatusCode(200),
				url.Expect("GET", "http://3.ingress-test.com/").Through(host).RedirectsTo("https://3.ingress-test.com/", http.StatusFound),
			)
		})
	})
})


text:
Edit profile

  <form action="/user/<%= user._id %>" method="POST">
    <input type="hidden" name="_method" value="put"/>

        First Name:

      <input id="firstName" class="form-control width-300" type="text" name="firstName" value="<%= user.firstName %>"/>

        Last Name:

      <input id="lastName" class="form-control width-300" type="text" name="lastName" value="<%= user.lastName %>"/>

        Email:

      <input id="email" class="form-control width-300" type="email" name="email" value="<%= user.email %>"/>

        Password:

      <input id="password" class="form-control width-300" type="password" name="password" value="<%= user.password %>"/>

        Organization:

      <input id="organization" class="form-control width-300" type="text" name="organization" value="<%= user.organization %>"/>

        <button class="btn btn-block btn-lg btn-success"> Save </button>

  </form>


text:
require 'aruba'

module RequestsHelper
  def requests
    @hub.requests.map do |r|
      result = r.dup
      result["data"] = JSON.parse(r["data"])
      result
    end
  end

  def start_hub!
    @hub = Belly::FakeHub.run(12345)
  end
end

World(RequestsHelper)

Given /^there is a hub running on localhost:12345$/ do
  start_hub!
end

Given /^Belly has been installed in the features$/ do
  start_hub!
  create_file "features/support/belly.rb", <<-EOF
require 'belly/for/cucumber'
EOF
  create_file ".belly", <<-EOF
hub: localhost:12345
project: test-project
EOF
end

Then /^the hub should have received a POST to "([^"]*)" with:$/ do |path, expected_json|
  expected_data = JSON.parse(expected_json)
  match = false
  candidates = requests.select do |request|
    request["type"] == "POST" && request["path"] == path
  end

  unless candidates.any?
    raise("Couldn't find any POST requests to #{path} in: \n\n #{requests.inspect}")
  end

  candidates.each do |request|
    match = expected_data.keys.all? do |key|
      request["data"][key] == expected_data[key]
    end
    break if match
  end

  unless match
    raise("Couldn't find any suitable requests in:\n\n #{candidates.inspect}")
  end
end

Then /^the hub should have received a test result$/ do
  unless(requests.any? { |r| r["type"] == "POST" && r["path"] == "/test_results" })
    raise("Couldn't find any test_results POST requests in:\n\n #{requests.inspect}")
  end
end


text: export default from './Tiwae';


text:
/*##########################################################################
 _##
 _##  $Id: Graph.java 236 2006-03-02 15:59:34 +0100 (jeu., 02 mars 2006) fbacchella $
 _##
 _##########################################################################*/

package jrds.webapp;

import java.io.IOException;
import java.util.Date;

import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import jrds.Probe;

import org.apache.log4j.Logger;
import org.rrd4j.ConsolFun;
import org.rrd4j.core.FetchData;

/**
 * A servlet wich show the last update values and time
 * @author Fabrice Bacchella
 * @version $Revision: 236 $
 */
public final class ProbeSummary extends JrdsServlet {
	static final private Logger logger = Logger.getLogger(ProbeSummary.class);

	/**
	 * @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
	 */
	public void doGet(HttpServletRequest req, HttpServletResponse res)
	throws ServletException, IOException {
		res.setContentType("text/plain");
		res.addHeader("Cache-Control", "no-cache");
		ServletOutputStream out = res.getOutputStream();

		ParamsBean params = getParamsBean(req);

		Probe<?,?> probe = params.getProbe();
		if(probe != null) {
			Date begin = params.getPeriod().getBegin();
			Date end = params.getPeriod().getEnd();
			FetchData fetched = probe.fetchData(begin, end);
			String names[] = fetched.getDsNames();
			for(int i= 0; i< names.length ; i++) {
				String dsName = names[i];
				try {
					out.print(dsName + " ");
					out.print(fetched.getAggregate(dsName, ConsolFun.AVERAGE) + " ");
					out.print(fetched.getAggregate(dsName, ConsolFun.MIN) + " ");
					out.println(fetched.getAggregate(dsName, ConsolFun.MAX));
				} catch (IOException e) {
					logger.error("Probe file " + probe.getRrdName() + "unusable: " + e);
				}
			}
		}
		else {
			logger.error("Probe id provided " + params.getId() + " invalid");
		}
	}

}


text:
package com.jin.business.message;

public class SimpleMessage {
	private String name;
	private String gender;
	private String address;

	public SimpleMessage() {
		super();
	}

	public SimpleMessage(String name, String gender, String address) {
		super();
		this.name = name;
		this.gender = gender;
		this.address = address;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getGender() {
		return gender;
	}
	public void setGender(String gender) {
		this.gender = gender;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}

	@Override
	public String toString() {
		return "SimpleMessage [name=" + name + ", gender=" + gender + ", address=" + address + "]";
	}

}


text:
function(markdown_section id name)
    return("##  ${name}")
  endfunction()


text:
namespace Magnesium.OpenGL.Internals
{
    public class GLCmdIndexBufferParameter
	{
		public MgIndexType indexType;
		public ulong offset;
		public IGLBuffer buffer;
	}
}


text:
////////////////////////////////////////////////////////////////////////////
//	Module 		: script_sound.cpp
//	Created 	: 06.02.2004
//  Modified 	: 06.02.2004
//	Author		: Dmitriy Iassenev
//	Description : XRay Script sound class
////////////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "script_sound.h"
#include "script_game_object.h"
#include "script_game_object_impl.h"
#include "gameobject.h"
#include "ai_space.h"
#include "script_engine.h"

CScriptSound::CScriptSound(LPCSTR caSoundName, ESoundTypes sound_type) {
    m_caSoundToPlay = caSoundName;
    string_path l_caFileName;
    VERIFY(::Sound);
    if (FS.exist(l_caFileName, "$game_sounds$", caSoundName, ".ogg"))
        m_sound.create(caSoundName, st_Effect, sound_type);
    else
        ai().script_engine().script_log(ScriptStorage::eLuaMessageTypeError,
                                        "File not found \"%s\"!", l_caFileName);
}

CScriptSound::~CScriptSound() {
    THROW3(!m_sound._feedback(), "playing sound is not completed, but is destroying",
           m_sound._handle() ? m_sound._handle()->file_name() : "unknown");
    m_sound.destroy();
}

Fvector CScriptSound::GetPosition() const {
    VERIFY(m_sound._handle());
    const CSound_params* l_tpSoundParams = m_sound.get_params();
    if (l_tpSoundParams)
        return (l_tpSoundParams->position);
    else {
        ai().script_engine().script_log(ScriptStorage::eLuaMessageTypeError,
                                        "Sound was not launched, can't get position!");
        return (Fvector().set(0, 0, 0));
    }
}

void CScriptSound::Play(CScriptGameObject* object, float delay, int flags) {
    THROW3(m_sound._handle(), "There is no sound", *m_caSoundToPlay);
    //	Msg							("%6d : CScriptSound::Play (%s), delay %f, flags
    //%d",Device.dwTimeGlobal,m_sound._handle()->file_name(),delay,flags);
    m_sound.play((object) ? &object->object() : NULL, flags, delay);
}

void CScriptSound::PlayAtPos(CScriptGameObject* object, const Fvector& position, float delay,
                             int flags) {
    THROW3(m_sound._handle(), "There is no sound", *m_caSoundToPlay);
    //	Msg							("%6d : CScriptSound::Play (%s), delay %f, flags
    //%d",m_sound._handle()->file_name(),delay,flags);
    m_sound.play_at_pos((object) ? &object->object() : NULL, position, flags, delay);
}

void CScriptSound::PlayNoFeedback(CScriptGameObject* object, u32 flags /*!< Looping */,
                                  float delay /*!< Delay */, Fvector pos, float vol) {
    THROW3(m_sound._handle(), "There is no sound", *m_caSoundToPlay);
    m_sound.play_no_feedback((object) ? &object->object() : NULL, flags, delay, &pos, &vol);
}


text:
var Stubon = require('../index').default;
var path = require('path');
var argv = require('argv');

argv.option([
    {
        name: 'source',
        short: 's',
        type : 'path',
        description :'required. a directory for api setting files.'
    },
    {
        name: 'port',
        short: 'p',
        type : 'int',
        description :'required. nubmer of port'
    },
    {
        name: 'ssl',
        type : 'boolean',
        description :'optional. when you want to make a server in ssl.'
    },
    {
        name: 'hostname',
        type : 'string',
        description :'optional. when you want to use hostname other than "localhost".',
        example : 'stubon -s ./src -p 8080 --hostname="127.0.0.1"'
    },
    {
        name: 'debug',
        type : 'boolean',
        description :'optional. when you want to output debug logs.'
    },
]);
var args = argv.run().options;
if (!args.source || !args.port) {
   console.log('-s and -p is required.');
   process.exit(1);
}

var options = {};
if (args.ssl) {
    options.ssl = true;
}
if (args.debug) {
    options.debug = true;
}
var hostname = args.hostname || 'localhost';
(new Stubon(args.source, options)).server().listen(args.port, hostname);


text:
/*************************************************/
/*  audio_driver_rtaudio.h                       */
/*************************************************/
/*            This file is part of:              */
/*                GODOT ENGINE                   */
/*************************************************/
/*       Source code within this file is:        */
/*  (c) 2007-2016 Juan Linietsky, Ariel Manzur   */
/*             All Rights Reserved.              */
/*************************************************/

#ifndef AUDIO_DRIVER_RTAUDIO_H
#define AUDIO_DRIVER_RTAUDIO_H

#ifdef RTAUDIO_ENABLED

#include "servers/audio/audio_server_sw.h"
#include "drivers/rtaudio/RtAudio.h"

class AudioDriverRtAudio : public AudioDriverSW {

	static int callback( void *outputBuffer, void *inputBuffer, unsigned int nBufferFrames,
	 double streamTime, RtAudioStreamStatus status, void *userData );
	OutputFormat output_format;
	Mutex *mutex;
	RtAudio *dac;
	int mix_rate;
	bool active;
public:

	virtual const char* get_name() const;

	virtual Error init();
	virtual void start();
	virtual int get_mix_rate() const ;
	virtual OutputFormat get_output_format() const;
	virtual void lock();
	virtual void unlock();
	virtual void finish();

	AudioDriverRtAudio();

};

#endif // AUDIO_DRIVER_RTAUDIO_H
#endif


text:
<?php

namespace Tests\Homie\IFTTT;

use BrainExe\Core\EventDispatcher\EventDispatcher;
use Homie\IFTTT\Event\TriggerEvent;
use Homie\IFTTT\ExpressionLanguage;
use PHPUnit\Framework\TestCase;
use PHPUnit_Framework_MockObject_MockObject as MockObject;
use Symfony\Component\HttpFoundation\Request;

class ExpressionLanguageTest extends TestCase
{

    /**
     * @var ExpressionLanguage
     */
    private $subject;

    /**
     * @var EventDispatcher|MockObject
     */
    private $dispatcher;

    public function setUp()
    {
        $this->dispatcher = $this->createMock(EventDispatcher::class);

        $this->subject = new ExpressionLanguage($this->dispatcher);
    }

    public function testGetFunctions()
    {
        $eventName = 'my-test';

        $event = new TriggerEvent($eventName, 2, 3);

        $request = new Request();
        $request->query->set('event', $eventName);

        $this->dispatcher
            ->expects($this->once())
            ->method('dispatchEvent')
            ->with($event);

        $actual = $this->subject->getFunctions();

        /** @var callable $function */
        $function = $actual[0]->getEvaluator();
        $function([], $eventName, 2, 3);

        $this->assertInternalType('array', $actual);
    }

    /**
     * @expectedException \Exception
     * @expectedExceptionMessage Function "triggerIFTTT" is not allowed as trigger
     */
    public function testCompiler()
    {
        /** @var callable $compiler */
        $compiler = $this->subject->getFunctions()[0]->getCompiler();

        $compiler([]);
    }
}


text:
import { Unit, StructureElement, Bond, ElementIndex } from '../../mol-model/structure';

import { ColorScale, Color } from '../../mol-util/color';
import { Location } from '../../mol-model/location';
import { ColorTheme } from '../color';
import { ParamDefinition as PD } from '../../mol-util/param-definition';
import { ThemeDataContext } from '../../mol-theme/theme';

const DefaultColor = Color(0xCCCCCC);
const Description = 'Gives every polymer residue a color based on its `seq_id` value.';

export const SequenceIdColorThemeParams = {
    list: PD.ColorList('turbo', { presetKind: 'scale' }),
};
export type SequenceIdColorThemeParams = typeof SequenceIdColorThemeParams
export function getSequenceIdColorThemeParams(ctx: ThemeDataContext) {
    return SequenceIdColorThemeParams; // TODO return copy
}

function getSeqId(unit: Unit, element: ElementIndex): number {
    const { model } = unit;
    switch (unit.kind) {
        case Unit.Kind.Atomic:
            const residueIndex = model.atomicHierarchy.residueAtomSegments.index[element];
            return model.atomicHierarchy.residues.label_seq_id.value(residueIndex);
        case Unit.Kind.Spheres:
            return Math.round(
                (model.coarseHierarchy.spheres.seq_id_begin.value(element) +
                    model.coarseHierarchy.spheres.seq_id_end.value(element)) / 2
            );
        case Unit.Kind.Gaussians:
            return Math.round(
                (model.coarseHierarchy.gaussians.seq_id_begin.value(element) +
                    model.coarseHierarchy.gaussians.seq_id_end.value(element)) / 2
            );
    }
}

function getSequenceLength(unit: Unit, element: ElementIndex) {
    const { model } = unit;
    let entityId = '';
    switch (unit.kind) {
        case Unit.Kind.Atomic:
            const chainIndex = model.atomicHierarchy.chainAtomSegments.index[element];
            entityId = model.atomicHierarchy.chains.label_entity_id.value(chainIndex);
            break;
        case Unit.Kind.Spheres:
            entityId = model.coarseHierarchy.spheres.entity_id.value(element);
            break;
        case Unit.Kind.Gaussians:
            entityId = model.coarseHierarchy.gaussians.entity_id.value(element);
            break;
    }
    if (entityId === '') return 0;

    const entityIndex = model.entities.getEntityIndex(entityId);
    if (entityIndex === -1) return 0;

    const entity = model.sequence.byEntityKey[entityIndex];
    if (entity === undefined) return 0;

    return entity.sequence.length;
}

export function SequenceIdColorTheme(ctx: ThemeDataContext, props: PD.Values<SequenceIdColorThemeParams>): ColorTheme<SequenceIdColorThemeParams> {
    const scale = ColorScale.create({
        listOrName: props.list.colors,
        minLabel: 'Start',
        maxLabel: 'End',
    });
    const color = (location: Location): Color => {
        if (StructureElement.Location.is(location)) {
            const { unit, element } = location;
            const seq_id = getSeqId(unit, element);
            if (seq_id > 0) {
                const seqLen = getSequenceLength(unit, element);
                if (seqLen) {
                    scale.setDomain(0, seqLen - 1);
                    return scale.color(seq_id);
                }
            }
        } else if (Bond.isLocation(location)) {
            const { aUnit, aIndex } = location;
            const seq_id = getSeqId(aUnit, aUnit.elements[aIndex]);
            if (seq_id > 0) {
                const seqLen = getSequenceLength(aUnit, aUnit.elements[aIndex]);
                if (seqLen) {
                    scale.setDomain(0, seqLen - 1);
                    return scale.color(seq_id);
                }
            }
        }
        return DefaultColor;
    };

    return {
        factory: SequenceIdColorTheme,
        granularity: 'group',
        preferSmoothing: true,
        color,
        props,
        description: Description,
        legend: scale ? scale.legend : undefined
    };
}

export const SequenceIdColorThemeProvider: ColorTheme.Provider<SequenceIdColorThemeParams, 'sequence-id'> = {
    name: 'sequence-id',
    label: 'Sequence Id',
    category: ColorTheme.Category.Residue,
    factory: SequenceIdColorTheme,
    getParams: getSequenceIdColorThemeParams,
    defaultValues: PD.getDefaultValues(SequenceIdColorThemeParams),
    isApplicable: (ctx: ThemeDataContext) => !!ctx.structure
};


text:
package com.kotcrab.vis.ui.util.highlight;

import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.utils.Array;
import com.kotcrab.vis.ui.widget.HighlightTextArea;

/**
 * Highlighter aggregates multiple {@link HighlightRule} into single collection. Highlighter is used by {@link HighlightTextArea}
 * to get information about which parts of text should be highlighted. Compared to {@link Highlighter} this class is GWT compatible.
 * @author Kotcrab
 * @see Highlighter
 * @since 1.1.2
 */
public class BaseHighlighter {
	private Array<HighlightRule> rules = new Array<HighlightRule>();

	/** Adds highlighter rule. What is highlighted depends on rule implementation. */
	public void addRule (HighlightRule rule) {
		rules.add(rule);
	}

	/**
	 * Adds word based highlighter rule. Note that for most uses, word based rules are not sophisticated enough - for example
	 * using regex rule for programming language keywords detection is far more robust.
	 * @see WordHighlightRule
	 */
	public void word (Color color, String word) {
		addRule(new WordHighlightRule(color, word));
	}

	/**
	 * Adds word based highlighter rule. Utility method allowing to add many words at once.
	 * @see #word(Color, String)
	 * @see WordHighlightRule
	 */
	public void word (Color color, String... words) {
		for (String word : words) {
			addRule(new WordHighlightRule(color, word));
		}
	}

	/**
	 * Process all rules in this highlighter.
	 * @param highlights current highlights, new highlights can be added to this list however it should not be modified in any other ways
	 */
	public void process (HighlightTextArea textArea, Array<Highlight> highlights) {
		for (HighlightRule rule : rules) {
			rule.process(textArea, highlights);
		}
	}
}


text:
<?php
namespace Status\V1\Rest\Status;

use ZF\ApiProblem\ApiProblem;
use ZF\Rest\AbstractResourceListener;
use StatusLib\MapperInterface;

class StatusResource extends AbstractResourceListener
{
    protected $mapper;

    public function __construct(MapperInterface $mapper)
    {
        $this->mapper = $mapper;
    }

    /**
     * Create a resource
     *
     * @param  mixed $data
     * @return ApiProblem|mixed
     */
    public function create($data)
    {
        return $this->mapper->create($data);
    }

    /**
     * Delete a resource
     *
     * @param  mixed $id
     * @return ApiProblem|mixed
     */
    public function delete($id)
    {
        return $this->mapper->delete($id);
    }

    /**
     * Delete a collection, or members of a collection
     *
     * @param  mixed $data
     * @return ApiProblem|mixed
     */
    public function deleteList($data)
    {
        return new ApiProblem(405, 'The DELETE method has not been defined for collections');
    }

    /**
     * Fetch a resource
     *
     * @param  mixed $id
     * @return ApiProblem|mixed
     */
    public function fetch($id)
    {
        return $this->mapper->fetch($id);
    }

    /**
     * Fetch all or a subset of resources
     *
     * @param  array $params
     * @return ApiProblem|mixed
     */
    public function fetchAll($params = array())
    {
        return $this->mapper->fetchAll();
    }

    /**
     * Patch (partial in-place update) a resource
     *
     * @param  mixed $id
     * @param  mixed $data
     * @return ApiProblem|mixed
     */
    public function patch($id, $data)
    {
        return $this->mapper->update($id, $data);
    }

    /**
     * Replace a collection or members of a collection
     *
     * @param  mixed $data
     * @return ApiProblem|mixed
     */
    public function replaceList($data)
    {
        return new ApiProblem(405, 'The PUT method has not been defined for collections');
    }

    /**
     * Update a resource
     *
     * @param  mixed $id
     * @param  mixed $data
     * @return ApiProblem|mixed
     */
    public function update($id, $data)
    {
        return $this->mapper->update($id, $data);
    }
}


text:
Steps to customize theme for Radio Button attributes:

                Property
                Description

                radioBtnSize
                Radio Button size

                radioColor
                Unselected radio button background color

                radioSelectedColor
                Selected radio button background color

*Syntax*

import React, { Component } from 'react-native';
import { Container, Content, List, ListItem, Radio, Text } from 'native-base';
import myTheme from './Themes/myTheme';
export default class ThemeRadioButtonExample extends Component {
    render() {
        return (
            <Container>
                <Content theme={myTheme}>
                    <List>
                        <ListItem>
                            <Radio selected={false} />
                            <Text>Daily Stand Up</Text>
                        </ListItem>
                        <ListItem>
                            <Radio selected={true} />
                            <Text>Discussion with Client</Text>
                        </ListItem>
                    </List>
                </Content>
            </Container>
        );
    }
}


text:
FROM alpine:3.6 as openthread-dev
LABEL maintainer="Marcin K Szczodrak"

RUN apk add -U autoconf automake ca-certificates flex git g++ libtool linux-headers make

# openthread
RUN git clone --recursive https://github.com/openthread/openthread.git && \
    cd /openthread && \
    ./bootstrap && \
    make -f examples/Makefile-simulation

FROM alpine:3.6
LABEL maintainer="Marcin K Szczodrak"

RUN apk add --no-cache libstdc++
COPY --from=openthread-dev /openthread/output/x86_64-unknown-linux-gnu/bin/ot-cli-ftd /bin/ot-cli-ftd
COPY --from=openthread-dev /openthread/output/x86_64-unknown-linux-gnu/bin/ot-cli-mtd /bin/ot-cli-mtd
RUN ln -s /bin/ot-cli-ftd /bin/node


text:
package com.amazonaws.services.servicecatalog.model.transform;

import java.math.*;

import javax.annotation.Generated;

import com.amazonaws.services.servicecatalog.model.*;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*;
import com.amazonaws.transform.*;

import com.fasterxml.jackson.core.JsonToken;
import static com.fasterxml.jackson.core.JsonToken.*;

/**
 * ResourceChangeDetail JSON Unmarshaller
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ResourceChangeDetailJsonUnmarshaller implements Unmarshaller<ResourceChangeDetail, JsonUnmarshallerContext> {

    public ResourceChangeDetail unmarshall(JsonUnmarshallerContext context) throws Exception {
        ResourceChangeDetail resourceChangeDetail = new ResourceChangeDetail();

        int originalDepth = context.getCurrentDepth();
        String currentParentElement = context.getCurrentParentElement();
        int targetDepth = originalDepth + 1;

        JsonToken token = context.getCurrentToken();
        if (token == null)
            token = context.nextToken();
        if (token == VALUE_NULL) {
            return null;
        }

        while (true) {
            if (token == null)
                break;

            if (token == FIELD_NAME || token == START_OBJECT) {
                if (context.testExpression("Target", targetDepth)) {
                    context.nextToken();
                    resourceChangeDetail.setTarget(ResourceTargetDefinitionJsonUnmarshaller.getInstance().unmarshall(context));
                }
                if (context.testExpression("Evaluation", targetDepth)) {
                    context.nextToken();
                    resourceChangeDetail.setEvaluation(context.getUnmarshaller(String.class).unmarshall(context));
                }
                if (context.testExpression("CausingEntity", targetDepth)) {
                    context.nextToken();
                    resourceChangeDetail.setCausingEntity(context.getUnmarshaller(String.class).unmarshall(context));
                }
            } else if (token == END_ARRAY || token == END_OBJECT) {
                if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {
                    if (context.getCurrentDepth() <= originalDepth)
                        break;
                }
            }
            token = context.nextToken();
        }

        return resourceChangeDetail;
    }

    private static ResourceChangeDetailJsonUnmarshaller instance;

    public static ResourceChangeDetailJsonUnmarshaller getInstance() {
        if (instance == null)
            instance = new ResourceChangeDetailJsonUnmarshaller();
        return instance;
    }
}


text:
export class BaseCanvasFactory {
    create(width: any, height: any): {
        canvas: void;
        context: any;
    };
    reset(canvasAndContext: any, width: any, height: any): void;
    destroy(canvasAndContext: any): void;
    /**
     * @ignore
     */
    _createCanvas(width: any, height: any): void;
}
export class BaseCMapReaderFactory {
    constructor({ baseUrl, isCompressed }: {
        baseUrl?: null | undefined;
        isCompressed?: boolean | undefined;
    });
    baseUrl: any;
    isCompressed: boolean;
    fetch({ name }: {
        name: any;
    }): Promise<any>;
    /**
     * @ignore
     */
    _fetchData(url: any, compressionType: any): void;
}
export class BaseStandardFontDataFactory {
    constructor({ baseUrl }: {
        baseUrl?: null | undefined;
    });
    baseUrl: any;
    fetch({ filename }: {
        filename: any;
    }): Promise<any>;
    /**
     * @ignore
     */
    _fetchData(url: any): void;
}
export class BaseSVGFactory {
    create(width: any, height: any, skipDimensions?: boolean): void;
    createElement(type: any): void;
    /**
     * @ignore
     */
    _createSVG(type: any): void;
}


text:
using namespace ang;
using namespace ang::streams;

string_input_stream::string_input_stream(text::istring_view_t str)
	: m_cursor(0)
	, m_string(ang::move(str))
	, m_parser(null)
{
	if (!m_string.is_empty())
		//throw_exception(except_code::invalid_param);
		m_parser = text::iparser::get_parser(m_string->encoding());
}

string_input_stream::~string_input_stream()
{

}

ANG_IMPLEMENT_OBJECT_RUNTIME_INFO(ang::streams::string_input_stream);
ANG_IMPLEMENT_OBJECT_CLASS_INFO(ang::streams::string_input_stream, object, itext_input_stream);
ANG_IMPLEMENT_OBJECT_QUERY_INTERFACE(ang::streams::string_input_stream, object, itext_input_stream, iinput_stream);

void string_input_stream::attach(text::istring_view_t str)
{
	m_cursor = 0;
	m_string = str;
	if (m_string.is_empty())
		m_parser = null;
	else
		m_parser = text::iparser::get_parser(m_string->encoding());
}

text::istring_view_t string_input_stream::data()const
{
	return m_string;
}

void string_input_stream::dispose()
{
	m_string = null;
}

text::encoding_t string_input_stream::format()const
{
	return m_string.is_empty() ? text::encoding::auto_detect : m_string->encoding().get();
}

stream_index_t string_input_stream::cursor()const
{
	return m_cursor;
}

stream_size_t string_input_stream::size()const
{
	return m_string.is_empty() ? 0 : m_string->length();
}

bool string_input_stream::is_eos()const
{
	return m_string.is_empty() ? true : m_string->length() == m_cursor;
}

bool string_input_stream::cursor(stream_index_t offset, stream_reference_t ref)
{
	switch (ref)
	{
	case stream_reference::begin:
		m_cursor = min(max(offset, 0), size());
		break;
	case stream_reference::current:
		m_cursor = min(max(m_cursor + offset, 0), size());
		break;
	case stream_reference::end:
		m_cursor = min(max(size() + offset, 0), size());
		break;
	}
	return true;
}

wsize string_input_stream::seek(cstr_t format)
{
	wsize c = m_cursor;
	windex cursor = (windex)m_cursor;
	m_parser->seek(m_string, cursor, format);
	m_cursor = cursor;
	return m_cursor - c;
}

#define FUNCX_TEXT_READ(A0) \
	if (type.type_id() == ang::type_of<A0>().type_id()) { \
		*(A0*)ptr = (A0)m_parser->to_value<A0>(data, i); \
		m_cursor += i; \
		return i * cs; \
	}

#define TEXT_READ_SWITCH(...) { ANG_EXPAND(APPLY_FUNCX_N(FUNCX_TEXT_READ, ELSE_SEPARATOR,##__VA_ARGS__)) }

wsize string_input_stream::read(pointer ptr, ang::rtti_t const& type)
{
	if (m_string.is_empty())
		return 0;
	wsize cs = text::encoder<text::encoding::auto_detect>::char_size_by_encoding(format());
	wsize i = 0;
	cstr_t data = m_string;
	data = cstr_t((byte*)data.ptr() + (m_cursor * cs), data.size() - (m_cursor * cs), data.encoding());

	TEXT_READ_SWITCH(
		char,
		byte,
		wchar_t,
		char16_t,
		char32_t,
		short,
		ushort,
		int,
		uint,
		long,
		ulong,
		long64,
		ulong64,
		float,
		double
	);
	return 0;
}

wsize string_input_stream::read_format(cstr_t format, var_args_t& args)
{
	//TODO:
	return 0;
}

wsize string_input_stream::read(text::istring_t out, wsize sz, wsize*written)
{
	if (out.is_empty())
		return 0;

	text::encoding_t e = format();
	wsize cs = text::encoder<text::encoding::auto_detect>::char_size_by_encoding(e);
	cstr_t cstr = m_string;
	wsize size = min(sz * cs, cstr.size() - m_cursor * cs);

	out->copy(cstr_t((byte*)cstr.ptr() + (m_cursor * cs), size, e));
	m_cursor += size / cs;
	if (written)*written = size;
	return size;
}

wsize string_input_stream::read(text::unknown_str_t out, wsize sz, text::encoding_t e, wsize*written)
{
	if (out == null || sz == 0)
		return 0;
	return 0;
}

wsize string_input_stream::read_line(text::istring_t, array_view<const char32_t>, wsize*written)
{
	return 0;
}

wsize string_input_stream::read_line(text::unknown_str_t, wsize, text::encoding_t, array_view<const char32_t>, wsize*written)
{
	return 0;
}


text:
<?php

function __autoload($className) {
        var_dump($className);
        exit();
}

$xsl = new DomDocument();
$xsl->loadXML('<?xml version="1.0" encoding="iso-8859-1" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:php="http://php.net/xsl">
<xsl:template match="/">
<xsl:value-of select="php:function(\'TeSt::dateLang\')" />
</xsl:template>
</xsl:stylesheet>');
$inputdom = new DomDocument();
$inputdom->loadXML('<?xml version="1.0" encoding="iso-8859-1" ?>
<today></today>');

$proc = new XsltProcessor();
$proc->registerPhpFunctions();
$xsl = $proc->importStylesheet($xsl);
$newdom = $proc->transformToDoc($inputdom);
?>
===DONE===