text:
import {Request} from '../lib/request';
import {Response} from '../lib/response';
import {AWSError} from '../lib/error';
import {Service} from '../lib/service';
import {ServiceConfigurationOptions} from '../lib/service';
import {ConfigBase as Config} from '../lib/config';
interface Blob {}
declare class Cloud9 extends Service {
  /**
   * Constructs a service object. This object has one method for each API operation.
   */
  constructor(options?: Cloud9.Types.ClientConfiguration)
  config: Config & Cloud9.Types.ClientConfiguration;
  /**
   * Creates an AWS Cloud9 development environment, launches an Amazon Elastic Compute Cloud (Amazon EC2) instance, and then hosts the environment on the instance.
   */
  createEnvironmentEC2(params: Cloud9.Types.CreateEnvironmentEC2Request, callback?: (err: AWSError, data: Cloud9.Types.CreateEnvironmentEC2Result) => void): Request<Cloud9.Types.CreateEnvironmentEC2Result, AWSError>;
  /**
   * Creates an AWS Cloud9 development environment, launches an Amazon Elastic Compute Cloud (Amazon EC2) instance, and then hosts the environment on the instance.
   */
  createEnvironmentEC2(callback?: (err: AWSError, data: Cloud9.Types.CreateEnvironmentEC2Result) => void): Request<Cloud9.Types.CreateEnvironmentEC2Result, AWSError>;
  /**
   * Adds an environment member to an AWS Cloud9 development environment.
   */
  createEnvironmentMembership(params: Cloud9.Types.CreateEnvironmentMembershipRequest, callback?: (err: AWSError, data: Cloud9.Types.CreateEnvironmentMembershipResult) => void): Request<Cloud9.Types.CreateEnvironmentMembershipResult, AWSError>;
  /**
   * Adds an environment member to an AWS Cloud9 development environment.
   */
  createEnvironmentMembership(callback?: (err: AWSError, data: Cloud9.Types.CreateEnvironmentMembershipResult) => void): Request<Cloud9.Types.CreateEnvironmentMembershipResult, AWSError>;
  /**
   * Deletes an AWS Cloud9 development environment. If the environment is hosted on an Amazon Elastic Compute Cloud (Amazon EC2) instance, also terminates the instance.
   */
  deleteEnvironment(params: Cloud9.Types.DeleteEnvironmentRequest, callback?: (err: AWSError, data: Cloud9.Types.DeleteEnvironmentResult) => void): Request<Cloud9.Types.DeleteEnvironmentResult, AWSError>;
  /**
   * Deletes an AWS Cloud9 development environment. If the environment is hosted on an Amazon Elastic Compute Cloud (Amazon EC2) instance, also terminates the instance.
   */
  deleteEnvironment(callback?: (err: AWSError, data: Cloud9.Types.DeleteEnvironmentResult) => void): Request<Cloud9.Types.DeleteEnvironmentResult, AWSError>;
  /**
   * Deletes an environment member from an AWS Cloud9 development environment.
   */
  deleteEnvironmentMembership(params: Cloud9.Types.DeleteEnvironmentMembershipRequest, callback?: (err: AWSError, data: Cloud9.Types.DeleteEnvironmentMembershipResult) => void): Request<Cloud9.Types.DeleteEnvironmentMembershipResult, AWSError>;
  /**
   * Deletes an environment member from an AWS Cloud9 development environment.
   */
  deleteEnvironmentMembership(callback?: (err: AWSError, data: Cloud9.Types.DeleteEnvironmentMembershipResult) => void): Request<Cloud9.Types.DeleteEnvironmentMembershipResult, AWSError>;
  /**
   * Gets information about environment members for an AWS Cloud9 development environment.
   */
  describeEnvironmentMemberships(params: Cloud9.Types.DescribeEnvironmentMembershipsRequest, callback?: (err: AWSError, data: Cloud9.Types.DescribeEnvironmentMembershipsResult) => void): Request<Cloud9.Types.DescribeEnvironmentMembershipsResult, AWSError>;
  /**
   * Gets information about environment members for an AWS Cloud9 development environment.
   */
  describeEnvironmentMemberships(callback?: (err: AWSError, data: Cloud9.Types.DescribeEnvironmentMembershipsResult) => void): Request<Cloud9.Types.DescribeEnvironmentMembershipsResult, AWSError>;
  /**
   * Gets status information for an AWS Cloud9 development environment.
   */
  describeEnvironmentStatus(params: Cloud9.Types.DescribeEnvironmentStatusRequest, callback?: (err: AWSError, data: Cloud9.Types.DescribeEnvironmentStatusResult) => void): Request<Cloud9.Types.DescribeEnvironmentStatusResult, AWSError>;
  /**
   * Gets status information for an AWS Cloud9 development environment.
   */
  describeEnvironmentStatus(callback?: (err: AWSError, data: Cloud9.Types.DescribeEnvironmentStatusResult) => void): Request<Cloud9.Types.DescribeEnvironmentStatusResult, AWSError>;
  /**
   * Gets information about AWS Cloud9 development environments.
   */
  describeEnvironments(params: Cloud9.Types.DescribeEnvironmentsRequest, callback?: (err: AWSError, data: Cloud9.Types.DescribeEnvironmentsResult) => void): Request<Cloud9.Types.DescribeEnvironmentsResult, AWSError>;
  /**
   * Gets information about AWS Cloud9 development environments.
   */
  describeEnvironments(callback?: (err: AWSError, data: Cloud9.Types.DescribeEnvironmentsResult) => void): Request<Cloud9.Types.DescribeEnvironmentsResult, AWSError>;
  /**
   * Gets a list of AWS Cloud9 development environment identifiers.
   */
  listEnvironments(params: Cloud9.Types.ListEnvironmentsRequest, callback?: (err: AWSError, data: Cloud9.Types.ListEnvironmentsResult) => void): Request<Cloud9.Types.ListEnvironmentsResult, AWSError>;
  /**
   * Gets a list of AWS Cloud9 development environment identifiers.
   */
  listEnvironments(callback?: (err: AWSError, data: Cloud9.Types.ListEnvironmentsResult) => void): Request<Cloud9.Types.ListEnvironmentsResult, AWSError>;
  /**
   * Changes the settings of an existing AWS Cloud9 development environment.
   */
  updateEnvironment(params: Cloud9.Types.UpdateEnvironmentRequest, callback?: (err: AWSError, data: Cloud9.Types.UpdateEnvironmentResult) => void): Request<Cloud9.Types.UpdateEnvironmentResult, AWSError>;
  /**
   * Changes the settings of an existing AWS Cloud9 development environment.
   */
  updateEnvironment(callback?: (err: AWSError, data: Cloud9.Types.UpdateEnvironmentResult) => void): Request<Cloud9.Types.UpdateEnvironmentResult, AWSError>;
  /**
   * Changes the settings of an existing environment member for an AWS Cloud9 development environment.
   */
  updateEnvironmentMembership(params: Cloud9.Types.UpdateEnvironmentMembershipRequest, callback?: (err: AWSError, data: Cloud9.Types.UpdateEnvironmentMembershipResult) => void): Request<Cloud9.Types.UpdateEnvironmentMembershipResult, AWSError>;
  /**
   * Changes the settings of an existing environment member for an AWS Cloud9 development environment.
   */
  updateEnvironmentMembership(callback?: (err: AWSError, data: Cloud9.Types.UpdateEnvironmentMembershipResult) => void): Request<Cloud9.Types.UpdateEnvironmentMembershipResult, AWSError>;
}
declare namespace Cloud9 {
  export type AutomaticStopTimeMinutes = number;
  export type BoundedEnvironmentIdList = EnvironmentId[];
  export type ClientRequestToken = string;
  export interface CreateEnvironmentEC2Request {
    /**
     * The name of the environment to create. This name is visible to other AWS IAM users in the same AWS account.
     */
    name: EnvironmentName;
    /**
     * The description of the environment to create.
     */
    description?: EnvironmentDescription;
    /**
     * A unique, case-sensitive string that helps AWS Cloud9 to ensure this operation completes no more than one time. For more information, see Client Tokens in the Amazon EC2 API Reference.
     */
    clientRequestToken?: ClientRequestToken;
    /**
     * The type of instance to host the environment on (for example, t2.micro).
     */
    instanceType: InstanceType;
    /**
     * The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate with the Amazon EC2 instance.
     */
    subnetId?: SubnetId;
    /**
     * The number of minutes until the running instance is shut down after the environment has last been used.
     */
    automaticStopTimeMinutes?: AutomaticStopTimeMinutes;
    /**
     * The Amazon Resource Name (ARN) of the environment owner. This ARN can be the ARN of any AWS IAM principal. If this value is not specified, the ARN defaults to this environment's creator.
     */
    ownerArn?: UserArn;
  }
  export interface CreateEnvironmentEC2Result {
    /**
     * The ID of the environment that was created.
     */
    environmentId?: EnvironmentId;
  }
  export interface CreateEnvironmentMembershipRequest {
    /**
     * The ID of the environment that contains the environment member you want to add.
     */
    environmentId: EnvironmentId;
    /**
     * The Amazon Resource Name (ARN) of the environment member you want to add.
     */
    userArn: UserArn;
    /**
     * The type of environment member permissions you want to associate with this environment member. Available values include:    read-only: Has read-only access to the environment.    read-write: Has read-write access to the environment.
     */
    permissions: MemberPermissions;
  }
  export interface CreateEnvironmentMembershipResult {
    /**
     * Information about the environment member that was added.
     */
    membership?: EnvironmentMember;
  }
  export interface DeleteEnvironmentMembershipRequest {
    /**
     * The ID of the environment to delete the environment member from.
     */
    environmentId: EnvironmentId;
    /**
     * The Amazon Resource Name (ARN) of the environment member to delete from the environment.
     */
    userArn: UserArn;
  }
  export interface DeleteEnvironmentMembershipResult {
  }
  export interface DeleteEnvironmentRequest {
    /**
     * The ID of the environment to delete.
     */
    environmentId: EnvironmentId;
  }
  export interface DeleteEnvironmentResult {
  }
  export interface DescribeEnvironmentMembershipsRequest {
    /**
     * The Amazon Resource Name (ARN) of an individual environment member to get information about. If no value is specified, information about all environment members are returned.
     */
    userArn?: UserArn;
    /**
     * The ID of the environment to get environment member information about.
     */
    environmentId?: EnvironmentId;
    /**
     * The type of environment member permissions to get information about. Available values include:    owner: Owns the environment.    read-only: Has read-only access to the environment.    read-write: Has read-write access to the environment.   If no value is specified, information about all environment members are returned.
     */
    permissions?: PermissionsList;
    /**
     * During a previous call, if there are more than 25 items in the list, only the first 25 items are returned, along with a unique string called a next token. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.
     */
    nextToken?: String;
    /**
     * The maximum number of environment members to get information about.
     */
    maxResults?: MaxResults;
  }
  export interface DescribeEnvironmentMembershipsResult {
    /**
     * Information about the environment members for the environment.
     */
    memberships?: EnvironmentMembersList;
    /**
     * If there are more than 25 items in the list, only the first 25 items are returned, along with a unique string called a next token. To get the next batch of items in the list, call this operation again, adding the next token to the call.
     */
    nextToken?: String;
  }
  export interface DescribeEnvironmentStatusRequest {
    /**
     * The ID of the environment to get status information about.
     */
    environmentId: EnvironmentId;
  }
  export interface DescribeEnvironmentStatusResult {
    /**
     * The status of the environment. Available values include:    connecting: The environment is connecting.    creating: The environment is being created.    deleting: The environment is being deleted.    error: The environment is in an error state.    ready: The environment is ready.    stopped: The environment is stopped.    stopping: The environment is stopping.
     */
    status?: EnvironmentStatus;
    /**
     * Any informational message about the status of the environment.
     */
    message?: String;
  }
  export interface DescribeEnvironmentsRequest {
    /**
     * The IDs of invidividual environments to get information about.
     */
    environmentIds: BoundedEnvironmentIdList;
  }
  export interface DescribeEnvironmentsResult {
    /**
     * Information about the environments that are returned.
     */
    environments?: EnvironmentList;
  }
  export interface Environment {
    /**
     * The ID of the environment.
     */
    id?: EnvironmentId;
    /**
     * The name of the environment.
     */
    name?: EnvironmentName;
    /**
     * The description for the environment.
     */
    description?: EnvironmentDescription;
    /**
     * The type of environment. Valid values include the following:    ec2: An environment hosted on an Amazon Elastic Compute Cloud (Amazon EC2) instance.    ssh: An environment hosted on your own server.
     */
    type?: EnvironmentType;
    /**
     * The Amazon Resource Name (ARN) of the environment.
     */
    arn?: String;
    /**
     * The Amazon Resource Name (ARN) of the environment owner.
     */
    ownerArn?: String;
  }
  export type EnvironmentDescription = string;
  export type EnvironmentId = string;
  export type EnvironmentIdList = EnvironmentId[];
  export type EnvironmentList = Environment[];
  export interface EnvironmentMember {
    /**
     * The type of environment member permissions associated with this environment member. Available values include:    owner: Owns the environment.    read-only: Has read-only access to the environment.    read-write: Has read-write access to the environment.
     */
    permissions?: Permissions;
    /**
     * The user ID in AWS Identity and Access Management (AWS IAM) of the environment member.
     */
    userId?: String;
    /**
     * The Amazon Resource Name (ARN) of the environment member.
     */
    userArn?: UserArn;
    /**
     * The ID of the environment for the environment member.
     */
    environmentId?: EnvironmentId;
    /**
     * The time, expressed in epoch time format, when the environment member last opened the environment.
     */
    lastAccess?: Timestamp;
  }
  export type EnvironmentMembersList = EnvironmentMember[];
  export type EnvironmentName = string;
  export type EnvironmentStatus = "error"|"creating"|"connecting"|"ready"|"stopping"|"stopped"|"deleting"|string;
  export type EnvironmentType = "ssh"|"ec2"|string;
  export type InstanceType = string;
  export interface ListEnvironmentsRequest {
    /**
     * During a previous call, if there are more than 25 items in the list, only the first 25 items are returned, along with a unique string called a next token. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.
     */
    nextToken?: String;
    /**
     * The maximum number of environments to get identifiers for.
     */
    maxResults?: MaxResults;
  }
  export interface ListEnvironmentsResult {
    /**
     * If there are more than 25 items in the list, only the first 25 items are returned, along with a unique string called a next token. To get the next batch of items in the list, call this operation again, adding the next token to the call.
     */
    nextToken?: String;
    /**
     * The list of environment identifiers.
     */
    environmentIds?: EnvironmentIdList;
  }
  export type MaxResults = number;
  export type MemberPermissions = "read-write"|"read-only"|string;
  export type Permissions = "owner"|"read-write"|"read-only"|string;
  export type PermissionsList = Permissions[];
  export type String = string;
  export type SubnetId = string;
  export type Timestamp = Date;
  export interface UpdateEnvironmentMembershipRequest {
    /**
     * The ID of the environment for the environment member whose settings you want to change.
     */
    environmentId: EnvironmentId;
    /**
     * The Amazon Resource Name (ARN) of the environment member whose settings you want to change.
     */
    userArn: UserArn;
    /**
     * The replacement type of environment member permissions you want to associate with this environment member. Available values include:    read-only: Has read-only access to the environment.    read-write: Has read-write access to the environment.
     */
    permissions: MemberPermissions;
  }
  export interface UpdateEnvironmentMembershipResult {
    /**
     * Information about the environment member whose settings were changed.
     */
    membership?: EnvironmentMember;
  }
  export interface UpdateEnvironmentRequest {
    /**
     * The ID of the environment to change settings.
     */
    environmentId: EnvironmentId;
    /**
     * Any replacement name for the environment.
     */
    name?: EnvironmentName;
    /**
     * Any new or replacement description for the environment.
     */
    description?: EnvironmentDescription;
  }
  export interface UpdateEnvironmentResult {
  }
  export type UserArn = string;
  /**
   * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
   */
  export type apiVersion = "2017-09-23"|"latest"|string;
  export interface ClientApiVersions {
    /**
     * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
     */
    apiVersion?: apiVersion;
  }
  export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
  /**
   * Contains interfaces for use with the Cloud9 client.
   */
  export import Types = Cloud9;
}
export = Cloud9;


text:
#div_top{width:100%;height:35px;background:#868DA2;}
#div_top .top_left{ float:left; }
#div_top .top_right{ float:right; line-height: 35px; padding-right: 5px; color:#ffffff; }
#div_top .top_right a{ color:#ffffff; }
#div_progress{width:100%;height:2px;background:#ffffff;}
#div_progress_img{position:absolute;}
/* main_content */
#div_main_content {width:100%;overflow:hidden;background:#eaeaea;}
#div_left_panel {width:180px;min-width:180px;overflow:hidden;}
#div_left_panel .header{width:100%;}
#div_left_panel .ha{height:29px; line-height:29px;font-size:15px;color:#ffffff;cursor:pointer;display:block;background:#868DA2;border-bottom:1px solid #ffffff;}
#div_left_panel .ha:hover {background:#868DA2;color:#ffffff;}
#div_left_panel .ha.selected {background:#868DA2;color:#ffffff;}
#main_content .vsplitbar{width:2px;cursor:e-resize;cursor:col-resize;background:#ffffff;}

#div_right_pane {width:100%;background:#f5f5f5;}
#div_right_nav{width:100%;background:#C8CBD5;height:29px;padding-left:10px;}
#div_right_nav .site_name{float:left;width:250px;color:#ffffff;font-size:14px;font-weight:bold;line-height:25px;text-indent:6px;background:url(right2.jpg) right center no-repeat;}
#div_right_nav .channel_name{float:left;width:320px;color:#ffffff;nt-size:14px;font-weight:bold;line-height:25px;text-indent:6px;}
#div_right_nav .select_template{float:right;width:220px;font-size:14px;font-weight:bold;line-height:25px;text-indent:6px;}
#div_right_btn{height:37px;padding-left:8px;}
#div_right_btn img{margin-top:4px;margin-left:4px;cursor:pointer;}

#left_site{width:100%;height:26px;background:#C8CBD5;}
#left_site .left{float:left;padding-left:3px;padding-top:3px;}
#left_site .mid{float:left;}
#left_site .right{float:right;}

.btn_select_site_normal{width:22px;height:20px;margin-top:3px;background:#E1E2E8 url(selectsitebg.jpg) no-repeat;cursor:pointer;position:absolute;}
.btn_select_site_clicked{width:22px;height:20px;margin-left:112px;margin-top:3px;background:#E1E2E8 url(selectsitebg2.jpg) no-repeat;cursor:pointer;position:absolute;}

#site_manage{cursor: pointer;}
#div_now_selected_site{width:108px;height:20px;line-height:20px;background:#E1E2E8;padding-left:4px;cursor:pointer;overflow:hidden;}
#div_select_site_list{width:130px;line-height:20px;background:#E1E2E8;padding-left:4px;cursor:pointer;overflow:hidden;position:absolute;}
.select_site_item{width:130px;height:20px;line-height:20px;overflow:hidden;}
#div_manage_menu_of_column{overflow:auto;}

#div_task_manage{width:100%;}
#div_task_manage .title{text-indent:10px;font-weight:bold;font-size:12px;}
#div_task_manage .taskline1{cursor:pointer;line-height:22px;margin:0 30px;text-indent:24px;font-size:12px;background: url(task1.jpg) no-repeat left center;}
#div_task_manage .taskline2{cursor:pointer;line-height:22px;margin:0 45px;text-indent:24px;font-size:12px;background: url(task2.jpg) no-repeat left center;}
#div_task_manage .taskline3{cursor:pointer;line-height:22px;margin:0 45px;text-indent:24px;font-size:12px;background: url(task2.jpg) no-repeat left center;}
#div_task_manage .taskline4{cursor:pointer;line-height:22px;margin:0 45px;text-indent:24px;font-size:12px;background: url(task2.jpg) no-repeat left center;}

#div_system_config { font-size: 12px; color:#000;}
#div_system_config .line{line-height: 20px ;background: url(sys.gif) no-repeat left center; text-indent: 25px;border-bottom:1px dashed #cccccc; margin:0 30px;}
#div_system_config span{ cursor: pointer;font-size: 12px; color:#000;}

#userconfig { font-size: 12px; color:#000;}
#userconfig .line{line-height:20px;text-indent: 25px;border-bottom:1px dashed #cccccc; margin:0 30px;}
#userconfig span{ cursor: pointer;font-size: 12px; color:#000;}

#voteconfig { font-size: 12px; color:#000;}
#voteconfig .line{line-height:20px;text-indent: 25px;border-bottom:1px dashed #cccccc; margin:0 30px;}
#voteconfig span{ cursor: pointer; font-size: 12px; color:#000;}

#visitconfig { font-size: 12px; color:#000;}
#visitconfig .line{line-height:20px;text-indent: 25px;border-bottom:1px dashed #cccccc; margin:0 30px;}
#visitconfig span{ line-height:20px;text-indent: 25px;border-bottom:1px dashed #cccccc; cursor: pointer;font-size: 12px; color:#000;}

#div_user_manage { font-size: 12px; color:#000;}
#div_user_manage .line{line-height:20px;text-indent: 3px;border-bottom:1px dashed #cccccc; margin:0 30px;cursor: pointer;}
#div_user_manage span{ cursor: pointer;font-size: 12px; color:#000;}

#div_search { font-size: 12px; color:#000;}
#div_search .line{line-height:20px;text-indent: 3px;border-bottom:1px dashed #cccccc; margin:0 30px;cursor: pointer;}
#div_search span{ cursor: pointer;font-size: 12px; color:#000;}

#div_forum_manage { font-size: 12px; color:#000;}
#div_forum_manage .line{line-height:20px;border-bottom:1px dashed #cccccc; margin:0 20px;}
#div_forum_manage span{ cursor: pointer;font-size: 12px; color:#000;}

#right_menu{
    position:absolute;
    visibility:hidden;
    background:url(cm_bg.jpg) #E6E8EC repeat-y;
    border: 1px solid #ffffff;
    width:120px;
    -moz-border-radius-topleft: 5px;
    -moz-border-radius-topright: 5px;
    -webkit-border-top-left-radius: 5px;
    -webkit-border-top-right-radius: 5px;
    font-size: 14px;
    z-index:999;

}

#right_menu ul{
    list-style: none;
    padding: 0;
    margin: 0;
}

#right_menu li{
    margin: 0;
    padding: 3px;
    background-repeat:no-repeat;
    line-height: 120%;
}
#right_menu ul{
    display: block;
    text-decoration: none;
    color: #000;
}
#right_menu span{padding:1px 5px;margin-left:32px;color:#52596B;cursor:pointer;}

#right_menu ul li span:hover, #right_menu ul li span:focus {
    color: #FFFFFF;
    background-color:#3165CE;
}

.separator{border-bottom:1px solid #a5a6a5;}

#right_menu li.cm_add_doc{background-image: url(cm_adddoc.jpg);  }
#right_menu li.cm_view_doc{background-image: url(cm_viewdoc.jpg);}
#right_menu li.cm_pub_channel{background-image: url(cm_pub_quick_channel.jpg); }
#right_menu li.cm_edit_channel{}
#right_menu li.cm_pro_channel{background-image: url(cm_pro_channel.jpg); }

#sortable { list-style-type: none; margin: 0; padding: 0; width: 60%; }
#sortable li { margin: 0 3px 3px 3px; padding: 0.4em; padding-left: 1.5em; font-size: 1.4em; height: 18px; }
#sortable li span { position: absolute; margin-left: -1.3em; }
#tabs li .ui-icon-close { float: left; margin: 0 0 0 0; cursor: pointer; }

redpajama_set_name: RedPajamaGithub


text:
package com.googlecode.aluminumproject.libraries.core.actions;

import com.googlecode.aluminumproject.AluminumException;
import com.googlecode.aluminumproject.context.Context;
import com.googlecode.aluminumproject.context.DefaultContext;
import com.googlecode.aluminumproject.libraries.core.CoreLibraryTest;

import org.testng.annotations.Test;

@SuppressWarnings("javadoc")
@Test(groups = {"libraries", "libraries-core", "slow"})
public class ScopeTest extends CoreLibraryTest {
	public void variablesShouldNotBeAvailableOutsideScope() {
		Context context = new DefaultContext();

		processTemplate("scope", context);

		assert context.getVariableNames(Context.TEMPLATE_SCOPE).isEmpty();
	}

	@Test(dependsOnMethods = "variablesShouldNotBeAvailableOutsideScope", expectedExceptions = AluminumException.class)
	public void accessingVariablesOutsideScopeShouldCauseException() {
		processTemplate("scope-accessing-inaccessible-variable");
	}

	public void parentScopesShouldBeAvailable() {
		Context context = new DefaultContext();

		processTemplate("scope-nested", context);

		Object variable = context.getVariable(Context.TEMPLATE_SCOPE, "number");
		assert variable != null;
		assert variable.equals("10");
	}

	@Test(dependsOnMethods = "parentScopesShouldBeAvailable")
	public void namingScopeShouldBePossible() {
		Context context = new DefaultContext();

		processTemplate("scope-named", context);

		Object variable = context.getVariable(Context.TEMPLATE_SCOPE, "number");
		assert variable != null;
		assert variable.equals("10");

	}

	@Test(dependsOnMethods = "namingScopeShouldBePossible", expectedExceptions = AluminumException.class)
	public void addingDuplicateScopeShouldCauseException() {
		processTemplate("scope-duplication");
	}
}


text:
<!--
  ~ Copyright 2015 Tinbytes Inc.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    tools:context="com.tinbytes.simpleactionbartoolbarapp.ActionBarActivity">
    <item
        android:id="@+id/action_search"
        android:orderInCategory="100"
        android:icon="@mipmap/ic_search_white_48dp"
        android:title="@string/action_search"
        app:showAsAction="always" />
</menu>


text:
<button ion-button clear (click)="onRefresh()">
  <img style='height: 2.5rem' src="assets/icon/{{updateStatusIcon}}"/>
</button>


text:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:id="@+id/layoutRoot"
    android:layout_height="match_parent">

  <com.jcodecraeer.xrecyclerview.XRecyclerView
      android:id="@+id/swipe_refresh"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_below="@id/view_line"
      android:background="@android:color/white"/>

  <RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      >

    <com.jcodecraeer.xrecyclerview.progressindicator.AVLoadingIndicatorView
        android:id="@+id/avloadingIndicatorView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        app:indicator="LineScalePulseOutRapid"
        app:indicator_color="@color/blue"
        />

    <TextView
        android:id="@+id/no_data_in_sale"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:text="@string/no_data"
        android:visibility="gone"
        />
  </RelativeLayout>
</FrameLayout>


text:
package org.apache.hyracks.dataflow.std.base;

import org.apache.hyracks.api.comm.IFrameWriter;
import org.apache.hyracks.api.dataflow.value.RecordDescriptor;

public abstract class AbstractUnaryInputSinkOperatorNodePushable extends AbstractUnaryInputOperatorNodePushable {
    @Override
    public final void setOutputFrameWriter(int index, IFrameWriter writer, RecordDescriptor recordDesc) {
        throw new IllegalStateException();
    }
}


text:
package com.baidu.disconf.web.service.user.dao.impl;

import org.springframework.stereotype.Repository;

import com.baidu.disconf.web.service.user.bo.User;
import com.baidu.disconf.web.service.user.dao.UserDao;
import com.baidu.dsp.common.dao.AbstractDao;
import com.baidu.dsp.common.dao.Columns;

/**
 * @author liaoqiqi
 * @version 2013-11-28
 */
@Repository
public class UserDaoImpl extends AbstractDao<Long, User> implements UserDao {

    /**
     * 执行SQL
     */
    public void executeSql(String sql) {

        executeSQL(sql, null);
    }

    /**
     */
    @Override
    public User getUserByName(String name) {

        return findOne(match(Columns.NAME, name));
    }

}


text:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
       android:shape="rectangle">
    <solid android:color="@color/transparent_white_percent_90"/>
    <corners android:radius="5dp"/>
</shape>


text:
package com.hcse.protocol.d6.codec;

import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.ProtocolDecoder;
import org.apache.mina.filter.codec.ProtocolEncoder;
import org.apache.mina.filter.codec.demux.DemuxingProtocolCodecFactory;

import com.hcse.protocol.d6.factory.D6ResponseMessageFactory;

public class D6ClientCodecFactory extends DemuxingProtocolCodecFactory {
    private D6ClientEncoder requestEncoder;
    private D6ResponseMessageDecoder responseDecoder;

    public D6ClientCodecFactory(D6ResponseMessageFactory factory) {
        this.requestEncoder = new D6ClientEncoder();
        this.responseDecoder = new D6ResponseMessageDecoder(factory);
    }

    @Override
    public ProtocolDecoder getDecoder(IoSession session) throws Exception {
        return responseDecoder;
    }

    @Override
    public ProtocolEncoder getEncoder(IoSession session) throws Exception {
        return requestEncoder;
    }
}


text:
'use strict';

var clone = require('../helpers/clone');

module.exports = function pad(size, value) {
  var abs = Math.abs(size);
  var count = this.count();

  if (abs <= count) {
    return this;
  }

  var diff = abs - count;
  var items = clone(this.items);
  var isArray = Array.isArray(this.items);
  var prepend = size < 0;

  for (var iterator = 0; iterator < diff;) {
    if (!isArray) {
      if (items[iterator] !== undefined) {
        diff += 1;
      } else {
        items[iterator] = value;
      }
    } else if (prepend) {
      items.unshift(value);
    } else {
      items.push(value);
    }

    iterator += 1;
  }

  return new this.constructor(items);
};


text:
See http://openopensource.org

1. you will be granted early write access as a contributor
1. you are free to create branches in the main repo
2. you are free to merge branches that you believe, in good faith,
   will benefit the community as a whole.

**Note** publishing is *always* at the discretion of the maintainer.

## project guidelines

- **no force pushing to master**
- use pull-requests
- tests, tests, tests


text:
defineSuite([
        'Core/CesiumTerrainProvider',
        'Core/DefaultProxy',
        'Core/Ellipsoid',
        'Core/GeographicTilingScheme',
        'Core/getAbsoluteUri',
        'Core/HeightmapTerrainData',
        'Core/IonResource',
        'Core/Math',
        'Core/QuantizedMeshTerrainData',
        'Core/Request',
        'Core/RequestScheduler',
        'Core/Resource',
        'Core/TerrainProvider',
        'Specs/pollToPromise',
        'ThirdParty/when'
    ], function(
        CesiumTerrainProvider,
        DefaultProxy,
        Ellipsoid,
        GeographicTilingScheme,
        getAbsoluteUri,
        HeightmapTerrainData,
        IonResource,
        CesiumMath,
        QuantizedMeshTerrainData,
        Request,
        RequestScheduler,
        Resource,
        TerrainProvider,
        pollToPromise,
        when) {
    'use strict';

    beforeEach(function() {
        RequestScheduler.clearForSpecs();
    });

    afterEach(function() {
        Resource._Implementations.loadWithXhr = Resource._DefaultImplementations.loadWithXhr;
    });

    function returnTileJson(path) {
        var oldLoad = Resource._Implementations.loadWithXhr;
        Resource._Implementations.loadWithXhr = function(url, responseType, method, data, headers, deferred, overrideMimeType) {
            if (url.indexOf('layer.json') >= 0) {
                Resource._DefaultImplementations.loadWithXhr(path, responseType, method, data, headers, deferred);
            } else {
                return oldLoad(url, responseType, method, data, headers, deferred, overrideMimeType);
            }
        };
    }

    function returnHeightmapTileJson() {
        return returnTileJson('Data/CesiumTerrainTileJson/StandardHeightmap.tile.json');
    }

    function returnQuantizedMeshTileJson() {
        return returnTileJson('Data/CesiumTerrainTileJson/QuantizedMesh.tile.json');
    }

    function returnVertexNormalTileJson() {
        return returnTileJson('Data/CesiumTerrainTileJson/VertexNormals.tile.json');
    }

    function returnOctVertexNormalTileJson() {
        return returnTileJson('Data/CesiumTerrainTileJson/OctVertexNormals.tile.json');
    }

    function returnWaterMaskTileJson() {
        return returnTileJson('Data/CesiumTerrainTileJson/WaterMask.tile.json');
    }

    function returnPartialAvailabilityTileJson() {
        return returnTileJson('Data/CesiumTerrainTileJson/PartialAvailability.tile.json');
    }

    function returnParentUrlTileJson() {
        var paths = ['Data/CesiumTerrainTileJson/ParentUrl.tile.json',
                     'Data/CesiumTerrainTileJson/Parent.tile.json'];
        var i = 0;
        var oldLoad = Resource._Implementations.loadWithXhr;
        Resource._Implementations.loadWithXhr = function(url, responseType, method, data, headers, deferred, overrideMimeType) {
            if (url.indexOf('layer.json') >= 0) {
                Resource._DefaultImplementations.loadWithXhr(paths[i++], responseType, method, data, headers, deferred);
            } else {
                return oldLoad(url, responseType, method, data, headers, deferred, overrideMimeType);
            }
        };
    }

    function waitForTile(level, x, y, requestNormals, requestWaterMask, f) {
        var terrainProvider = new CesiumTerrainProvider({
            url : 'made/up/url',
            requestVertexNormals : requestNormals,
            requestWaterMask: requestWaterMask
        });

        return pollToPromise(function() {
            return terrainProvider.ready;
        }).then(function() {
            var promise = terrainProvider.requestTileGeometry(level, x, y);

            return when(promise, f, function(error) {
                expect('requestTileGeometry').toBe('returning a tile.'); // test failure
            });
        });
    }

    function createRequest() {
        return new Request({
            throttleByServer : true
        });
    }

    it('conforms to TerrainProvider interface', function() {
        expect(CesiumTerrainProvider).toConformToInterface(TerrainProvider);
    });

    it('constructor throws if url is not provided', function() {
        expect(function() {
            return new CesiumTerrainProvider();
        }).toThrowDeveloperError();

        expect(function() {
            return new CesiumTerrainProvider({
            });
        }).toThrowDeveloperError();
    });

    it('resolves readyPromise', function() {
        var provider = new CesiumTerrainProvider({
            url : 'made/up/url'
        });

        return provider.readyPromise.then(function (result) {
            expect(result).toBe(true);
            expect(provider.ready).toBe(true);
        });
    });

    it('resolves readyPromise when url promise is used', function() {
        var provider = new CesiumTerrainProvider({
            url : when.resolve('made/up/url')
        });

        return provider.readyPromise.then(function (result) {
            expect(result).toBe(true);
            expect(provider.ready).toBe(true);
        });
    });

    it('resolves readyPromise with Resource', function() {
        var resource = new Resource({
            url : 'made/up/url'
        });

        var provider = new CesiumTerrainProvider({
            url : resource
        });

        return provider.readyPromise.then(function (result) {
            expect(result).toBe(true);
            expect(provider.ready).toBe(true);
        });
    });

    it('rejects readyPromise when url rejects', function() {
        var error = new Error();
        var provider = new CesiumTerrainProvider({
            url: when.reject(error)
        });
        return provider.readyPromise
            .then(function() {
                fail('should not resolve');
            })
            .otherwise(function(result) {
                expect(result).toBe(error);
                expect(provider.ready).toBe(false);
            });
    });

    it('uses geographic tiling scheme by default', function() {
        returnHeightmapTileJson();

        var provider = new CesiumTerrainProvider({
            url : 'made/up/url'
        });

        return pollToPromise(function() {
            return provider.ready;
        }).then(function() {
            var tilingScheme = provider.tilingScheme;
            expect(tilingScheme instanceof GeographicTilingScheme).toBe(true);
        });
    });

    it('can use a custom ellipsoid', function() {
        returnHeightmapTileJson();

        var ellipsoid = new Ellipsoid(1, 2, 3);
        var provider = new CesiumTerrainProvider({
            url : 'made/up/url',
            ellipsoid : ellipsoid
        });

        return pollToPromise(function() {
            return provider.ready;
        }).then(function() {
            expect(provider.tilingScheme.ellipsoid).toEqual(ellipsoid);
        });
    });

    it('has error event', function() {
        var provider = new CesiumTerrainProvider({
            url : 'made/up/url'
        });
        expect(provider.errorEvent).toBeDefined();
        expect(provider.errorEvent).toBe(provider.errorEvent);
    });

    it('returns reasonable geometric error for various levels', function() {
        var provider = new CesiumTerrainProvider({
            url : 'made/up/url'
        });

        expect(provider.getLevelMaximumGeometricError(0)).toBeGreaterThan(0.0);
        expect(provider.getLevelMaximumGeometricError(0)).toEqualEpsilon(provider.getLevelMaximumGeometricError(1) * 2.0, CesiumMath.EPSILON10);
        expect(provider.getLevelMaximumGeometricError(1)).toEqualEpsilon(provider.getLevelMaximumGeometricError(2) * 2.0, CesiumMath.EPSILON10);
    });

    it('logo is undefined if credit is not provided', function() {
        returnHeightmapTileJson();

        var provider = new CesiumTerrainProvider({
            url : 'made/up/url'
        });

        return pollToPromise(function() {
            return provider.ready;
        }).then(function() {
            expect(provider.credit).toBeUndefined();
        });
    });

    it('logo is defined if credit is provided', function() {
        returnHeightmapTileJson();

        var provider = new CesiumTerrainProvider({
            url : 'made/up/url',
            credit : 'thanks to our awesome made up contributors!'
        });

        return pollToPromise(function() {
            return provider.ready;
        }).then(function() {
            expect(provider.credit).toBeDefined();
        });
    });

    it('has a water mask', function() {
        returnHeightmapTileJson();

        var provider = new CesiumTerrainProvider({
            url : 'made/up/url'
        });

        return pollToPromise(function() {
            return provider.ready;
        }).then(function() {
            expect(provider.hasWaterMask).toBe(true);
        });
    });

    it('has vertex normals', function() {
        returnOctVertexNormalTileJson();

        var provider = new CesiumTerrainProvider({
            url : 'made/up/url',
            requestVertexNormals : true
        });

        return pollToPromise(function() {
            return provider.ready;
        }).then(function() {
            expect(provider.requestVertexNormals).toBe(true);
            expect(provider.hasVertexNormals).toBe(true);
        });
    });

    it('does not request vertex normals', function() {
        returnOctVertexNormalTileJson();

        var provider = new CesiumTerrainProvider({
            url : 'made/up/url',
            requestVertexNormals : false
        });

        return pollToPromise(function() {
            return provider.ready;
        }).then(function() {
            expect(provider.requestVertexNormals).toBe(false);
            expect(provider.hasVertexNormals).toBe(false);
        });
    });

    it('requests parent layer.json', function() {
        returnParentUrlTileJson();

        var provider = new CesiumTerrainProvider({
            url : 'made/up/url',
            requestVertexNormals : true,
            requestWaterMask : true
        });

        return pollToPromise(function() {
            return provider.ready;
        }).then(function() {
            expect(provider._tileCredits[0].html).toBe('This is a child tileset! This amazing data is courtesy The Amazing Data Source!');
            expect(provider.requestVertexNormals).toBe(true);
            expect(provider.requestWaterMask).toBe(true);
            expect(provider.hasVertexNormals).toBe(false); // Neither tileset has them
            expect(provider.hasWaterMask).toBe(true); // The child tileset has them
            expect(provider.availability.isTileAvailable(1, 2, 1)).toBe(true); // Both have this
            expect(provider.availability.isTileAvailable(1, 3, 1)).toBe(true); // Parent has this, but child doesn't
            expect(provider.availability.isTileAvailable(2, 0, 0)).toBe(false); // Neither has this

            var layers = provider._layers;
            expect(layers.length).toBe(2);
            expect(layers[0].hasVertexNormals).toBe(false);
            expect(layers[0].hasWaterMask).toBe(true);
            expect(layers[0].availability.isTileAvailable(1, 2, 1)).toBe(true);
            expect(layers[0].availability.isTileAvailable(1, 3, 1)).toBe(false);
            expect(layers[0].availability.isTileAvailable(2, 0, 0)).toBe(false);
            expect(layers[1].hasVertexNormals).toBe(false);
            expect(layers[1].hasWaterMask).toBe(false);
            expect(layers[1].availability.isTileAvailable(1, 2, 1)).toBe(true);
            expect(layers[1].availability.isTileAvailable(1, 3, 1)).toBe(true);
            expect(layers[1].availability.isTileAvailable(2, 0, 0)).toBe(false);
        });
    });

    it('raises an error if layer.json does not specify a format', function() {
        returnTileJson('Data/CesiumTerrainTileJson/NoFormat.tile.json');

        var provider = new CesiumTerrainProvider({
            url : 'made/up/url'
        });

        var deferred = when.defer();

        provider.errorEvent.addEventListener(function(e) {
            deferred.resolve(e);
        });

        return deferred.promise.then(function(error) {
            expect(error.message).toContain('format is not specified');
        });
    });

    it('raises an error if layer.json specifies an unknown format', function() {
        returnTileJson('Data/CesiumTerrainTileJson/InvalidFormat.tile.json');

        var provider = new CesiumTerrainProvider({
            url : 'made/up/url'
        });

        var deferred = when.defer();

        provider.errorEvent.addEventListener(function(e) {
            deferred.resolve(e);
        });

        return deferred.promise.then(function(error) {
            expect(error.message).toContain('invalid or not supported');
        });
    });

    it('raises an error if layer.json does not specify quantized-mesh 1.x format', function() {
        returnTileJson('Data/CesiumTerrainTileJson/QuantizedMesh2.0.tile.json');

        var provider = new CesiumTerrainProvider({
            url : 'made/up/url'
        });

        var deferred = when.defer();

        provider.errorEvent.addEventListener(function(e) {
            deferred.resolve(e);
        });

        return deferred.promise.then(function(error) {
            expect(error.message).toContain('invalid or not supported');
        });
    });

    it('supports quantized-mesh1.x minor versions', function() {
        returnTileJson('Data/CesiumTerrainTileJson/QuantizedMesh1.1.tile.json');

        var provider = new CesiumTerrainProvider({
            url : 'made/up/url'
        });

        var errorListener = jasmine.createSpy('error');
        provider.errorEvent.addEventListener(errorListener);

        return pollToPromise(function() {
            return provider.ready;
        }).then(function() {
            expect(errorListener).not.toHaveBeenCalled();
        });
    });

    it('raises an error if layer.json does not specify a tiles property', function() {
        returnTileJson('Data/CesiumTerrainTileJson/NoTiles.tile.json');

        var provider = new CesiumTerrainProvider({
            url : 'made/up/url'
        });

        var deferred = when.defer();

        provider.errorEvent.addEventListener(function(e) {
            deferred.resolve(e);
        });

        return deferred.promise.then(function(error) {
            expect(error.message).toContain('does not specify any tile URL templates');
        });
    });

    it('raises an error if layer.json tiles property is an empty array', function() {
        returnTileJson('Data/CesiumTerrainTileJson/EmptyTilesArray.tile.json');

        var provider = new CesiumTerrainProvider({
            url : 'made/up/url'
        });

        var deferred = when.defer();

        provider.errorEvent.addEventListener(function(e) {
            deferred.resolve(e);
        });

        return deferred.promise.then(function(error) {
            expect(error.message).toContain('does not specify any tile URL templates');
        });
    });

    it('uses attribution specified in layer.json', function() {
        returnTileJson('Data/CesiumTerrainTileJson/WithAttribution.tile.json');

        var provider = new CesiumTerrainProvider({
            url : 'made/up/url'
        });

        return pollToPromise(function() {
            return provider.ready;
        }).then(function() {
            expect(provider._tileCredits[0].html).toBe('This amazing data is courtesy The Amazing Data Source!');
        });
    });

    describe('requestTileGeometry', function() {

        it('uses multiple urls specified in layer.json', function() {
            returnTileJson('Data/CesiumTerrainTileJson/MultipleUrls.tile.json');

            var provider = new CesiumTerrainProvider({
                url : 'made/up/url'
            });

            return pollToPromise(function() {
                return provider.ready;
            }).then(function() {
                spyOn(Resource._Implementations, 'loadWithXhr');
                provider.requestTileGeometry(0, 0, 0);
                expect(Resource._Implementations.loadWithXhr.calls.mostRecent().args[0]).toContain('foo0.com');
                provider.requestTileGeometry(1, 0, 0);
                expect(Resource._Implementations.loadWithXhr.calls.mostRecent().args[0]).toContain('foo1.com');
                provider.requestTileGeometry(1, -1, 0);
                expect(Resource._Implementations.loadWithXhr.calls.mostRecent().args[0]).toContain('foo2.com');
                provider.requestTileGeometry(1, 0, 1);
                expect(Resource._Implementations.loadWithXhr.calls.mostRecent().args[0]).toContain('foo3.com');
            });
        });

        it('supports scheme-less template URLs in layer.json resolved with absolute URL', function() {
            returnTileJson('Data/CesiumTerrainTileJson/MultipleUrls.tile.json');

            var url = getAbsoluteUri('Data/CesiumTerrainTileJson');

            var provider = new CesiumTerrainProvider({
                url : url
            });

            return pollToPromise(function() {
                return provider.ready;
            }).then(function() {
                spyOn(Resource._Implementations, 'loadWithXhr');
                provider.requestTileGeometry(0, 0, 0);
                expect(Resource._Implementations.loadWithXhr.calls.mostRecent().args[0]).toContain('foo0.com');
                provider.requestTileGeometry(1, 0, 0);
                expect(Resource._Implementations.loadWithXhr.calls.mostRecent().args[0]).toContain('foo1.com');
                provider.requestTileGeometry(1, -1, 0);
                expect(Resource._Implementations.loadWithXhr.calls.mostRecent().args[0]).toContain('foo2.com');
                provider.requestTileGeometry(1, 0, 1);
                expect(Resource._Implementations.loadWithXhr.calls.mostRecent().args[0]).toContain('foo3.com');
            });
        });

        it('provides HeightmapTerrainData', function() {
            Resource._Implementations.loadWithXhr = function(url, responseType, method, data, headers, deferred, overrideMimeType) {
                // Just return any old file, as long as its big enough
                Resource._DefaultImplementations.loadWithXhr('Data/EarthOrientationParameters/IcrfToFixedStkComponentsRotationData.json', responseType, method, data, headers, deferred);
            };

            returnHeightmapTileJson();

            return waitForTile(0, 0, 0, false, false, function(loadedData) {
                expect(loadedData).toBeInstanceOf(HeightmapTerrainData);
            });
        });

        it('provides QuantizedMeshTerrainData', function() {
            Resource._Implementations.loadWithXhr = function(url, responseType, method, data, headers, deferred, overrideMimeType) {
                Resource._DefaultImplementations.loadWithXhr('Data/CesiumTerrainTileJson/tile.terrain', responseType, method, data, headers, deferred);
            };

            returnQuantizedMeshTileJson();

            return waitForTile(0, 0, 0, false, false, function(loadedData) {
                expect(loadedData).toBeInstanceOf(QuantizedMeshTerrainData);
            });
        });

        it('provides QuantizedMeshTerrainData with 32bit indices', function() {
            Resource._Implementations.loadWithXhr = function(url, responseType, method, data, headers, deferred, overrideMimeType) {
                Resource._DefaultImplementations.loadWithXhr('Data/CesiumTerrainTileJson/tile.32bitIndices.terrain', responseType, method, data, headers, deferred);
            };

            returnQuantizedMeshTileJson();

            return waitForTile(0, 0, 0, false, false, function(loadedData) {
                expect(loadedData).toBeInstanceOf(QuantizedMeshTerrainData);
                expect(loadedData._indices.BYTES_PER_ELEMENT).toBe(4);
            });
        });

        it('provides QuantizedMeshTerrainData with VertexNormals', function() {
            Resource._Implementations.loadWithXhr = function(url, responseType, method, data, headers, deferred, overrideMimeType) {
                Resource._DefaultImplementations.loadWithXhr('Data/CesiumTerrainTileJson/tile.vertexnormals.terrain', responseType, method, data, headers, deferred);
            };

            returnVertexNormalTileJson();

            return waitForTile(0, 0, 0, true, false, function(loadedData) {
                expect(loadedData).toBeInstanceOf(QuantizedMeshTerrainData);
                expect(loadedData._encodedNormals).toBeDefined();
            });
        });

        it('provides QuantizedMeshTerrainData with WaterMask', function() {
            Resource._Implementations.loadWithXhr = function(url, responseType, method, data, headers, deferred, overrideMimeType) {
                Resource._DefaultImplementations.loadWithXhr('Data/CesiumTerrainTileJson/tile.watermask.terrain', responseType, method, data, headers, deferred);
            };

            returnWaterMaskTileJson();

            return waitForTile(0, 0, 0, false, true, function(loadedData) {
                expect(loadedData).toBeInstanceOf(QuantizedMeshTerrainData);
                expect(loadedData._waterMask).toBeDefined();
            });
        });

        it('provides QuantizedMeshTerrainData with VertexNormals and WaterMask', function() {
            Resource._Implementations.loadWithXhr = function(url, responseType, method, data, headers, deferred, overrideMimeType) {
                Resource._DefaultImplementations.loadWithXhr('Data/CesiumTerrainTileJson/tile.octvertexnormals.watermask.terrain', responseType, method, data, headers, deferred);
            };

            returnWaterMaskTileJson();

            return waitForTile(0, 0, 0, true, true, function(loadedData) {
                expect(loadedData).toBeInstanceOf(QuantizedMeshTerrainData);
                expect(loadedData._encodedNormals).toBeDefined();
                expect(loadedData._waterMask).toBeDefined();
            });
        });

        it('provides QuantizedMeshTerrainData with OctVertexNormals', function() {
            Resource._Implementations.loadWithXhr = function(url, responseType, method, data, headers, deferred, overrideMimeType) {
                Resource._DefaultImplementations.loadWithXhr('Data/CesiumTerrainTileJson/tile.octvertexnormals.terrain', responseType, method, data, headers, deferred);
            };

            returnOctVertexNormalTileJson();

            return waitForTile(0, 0, 0, true, false, function(loadedData) {
                expect(loadedData).toBeInstanceOf(QuantizedMeshTerrainData);
                expect(loadedData._encodedNormals).toBeDefined();
            });
        });

        it('provides QuantizedMeshTerrainData with VertexNormals and unknown extensions', function() {
            Resource._Implementations.loadWithXhr = function(url, responseType, method, data, headers, deferred, overrideMimeType) {
                Resource._DefaultImplementations.loadWithXhr('Data/CesiumTerrainTileJson/tile.vertexnormals.unknownext.terrain', responseType, method, data, headers, deferred);
            };

            returnVertexNormalTileJson();

            return waitForTile(0, 0, 0, true, false, function(loadedData) {
                expect(loadedData).toBeInstanceOf(QuantizedMeshTerrainData);
                expect(loadedData._encodedNormals).toBeDefined();
            });
        });

        it('provides QuantizedMeshTerrainData with OctVertexNormals and unknown extensions', function() {
            Resource._Implementations.loadWithXhr = function(url, responseType, method, data, headers, deferred, overrideMimeType) {
                Resource._DefaultImplementations.loadWithXhr('Data/CesiumTerrainTileJson/tile.octvertexnormals.unknownext.terrain', responseType, method, data, headers, deferred);
            };

            returnOctVertexNormalTileJson();

            return waitForTile(0, 0, 0, true, false, function(loadedData) {
                expect(loadedData).toBeInstanceOf(QuantizedMeshTerrainData);
                expect(loadedData._encodedNormals).toBeDefined();
            });
        });

        it('provides QuantizedMeshTerrainData with unknown extension', function() {
            Resource._Implementations.loadWithXhr = function(url, responseType, method, data, headers, deferred, overrideMimeType) {
                Resource._DefaultImplementations.loadWithXhr('Data/CesiumTerrainTileJson/tile.unknownext.terrain', responseType, method, data, headers, deferred);
            };

            returnOctVertexNormalTileJson();

            return waitForTile(0, 0, 0, false, false, function(loadedData) {
                expect(loadedData).toBeInstanceOf(QuantizedMeshTerrainData);
            });
        });

        it('returns undefined if too many requests are already in progress', function() {
            var baseUrl = 'made/up/url';

            var deferreds = [];

            Resource._Implementations.loadWithXhr = function(url, responseType, method, data, headers, deferred, overrideMimeType) {
                // Do nothing, so requests never complete
                deferreds.push(deferred);
            };

            returnHeightmapTileJson();

            var terrainProvider = new CesiumTerrainProvider({
                url : baseUrl
            });

            return pollToPromise(function() {
                return terrainProvider.ready;
            }).then(function() {
                var promise;
                var i;
                for (i = 0; i < RequestScheduler.maximumRequestsPerServer; ++i) {
                    promise = terrainProvider.requestTileGeometry(0, 0, 0, createRequest());
                }
                RequestScheduler.update();
                expect(promise).toBeDefined();

                promise = terrainProvider.requestTileGeometry(0, 0, 0, createRequest());
                expect(promise).toBeUndefined();

                for (i = 0; i < deferreds.length; ++i) {
                    deferreds[i].resolve();
                }
            });
        });

        it('supports getTileDataAvailable()', function() {
            var baseUrl = 'made/up/url';

            Resource._Implementations.loadWithXhr = function(url, responseType, method, data, headers, deferred, overrideMimeType) {
                Resource._DefaultImplementations.loadWithXhr('Data/CesiumTerrainTileJson/tile.terrain', responseType, method, data, headers, deferred);
            };

            returnQuantizedMeshTileJson();

            var terrainProvider = new CesiumTerrainProvider({
                url : baseUrl
            });

            return pollToPromise(function() {
                return terrainProvider.ready;
            }).then(function() {
                expect(terrainProvider.getTileDataAvailable(0, 0, 0)).toBe(true);
                expect(terrainProvider.getTileDataAvailable(0, 0, 2)).toBe(false);
            });
        });

        it('getTileDataAvailable() converts xyz to tms', function() {
            var baseUrl = 'made/up/url';

            returnPartialAvailabilityTileJson();

            var terrainProvider = new CesiumTerrainProvider({
                url : baseUrl
            });

            return pollToPromise(function() {
                return terrainProvider.ready;
            }).then(function() {
                expect(terrainProvider.getTileDataAvailable(1, 3, 2)).toBe(true);
                expect(terrainProvider.getTileDataAvailable(1, 0, 2)).toBe(false);
            });
        });

        it('supports a query string in the base URL', function() {
            Resource._Implementations.loadWithXhr = function(url, responseType, method, data, headers, deferred, overrideMimeType) {
                // Just return any old file, as long as its big enough
                Resource._DefaultImplementations.loadWithXhr('Data/EarthOrientationParameters/IcrfToFixedStkComponentsRotationData.json', responseType, method, data, headers, deferred);
            };

            returnHeightmapTileJson();

            return waitForTile(0, 0, 0, false, false, function(loadedData) {
                expect(loadedData).toBeInstanceOf(HeightmapTerrainData);
            });
        });

        it('Uses query parameter extensions for ion resource', function() {
            var terrainProvider = new CesiumTerrainProvider({
                url: IonResource.fromAssetId(1),
                requestVertexNormals: true,
                requestWaterMask: true
            });

            return pollToPromise(function() {
                return terrainProvider.ready;
            }).then(function() {
                var getDerivedResource = spyOn(IonResource.prototype, 'getDerivedResource').and.callThrough();
                terrainProvider.requestTileGeometry(0, 0, 0);
                var options = getDerivedResource.calls.argsFor(0)[0];
                expect(options.queryParameters.extensions).toEqual('octvertexnormals-watermask');
            });
        });
    });
});


text:
namespace Finsternis
{
    using UnityEngine;

    public class StatsPanelController : MenuController
    {
        [SerializeField]
        private GameObject displayPrefab;
        private bool initialized = false;

        protected override void Start()
        {
            base.Start();

            if (GameManager.Instance.Player)
                Init(GameManager.Instance.Player);
            else
                GameManager.Instance.onPlayerSpawned.AddListener(Init);
        }

        private void Init(CharController player)
        {
            GameManager.Instance.onPlayerSpawned.RemoveListener(Init);
            if (initialized)
                return;
            initialized = true;
            foreach (var attribute in player.Character)
            {
                GameObject display = (GameObject)Instantiate(displayPrefab, transform);
                display.transform.localScale = Vector3.one;
                display.GetComponent<AttributeDisplay>().SetAttribute(attribute);
            }
        }
    }
}


text:
jQuery(document).ready(function($){
"use strict";

// Owl Slider
jQuery("#single-slider").owlCarousel({
	autoPlay: false, //Set AutoPlay to 3 seconds
      singleItem:true,
	  pagination:true,
	  navigation :true,
	  navigationText: [ "" ]
});
// Owl Slider

// Project slider
var carousel = $(".project-slider");
  carousel.owlCarousel({
	autoPlay:true,
	pagination : false,
	navigation : false,
	rewindNav : true,
	scrollPerPage : false,
	items :5,
	itemsDesktop : [1199,4],
	itemsDesktopSmall : [979,2],
	itemsTablet: [600,1], //2 items between 600 and 0
	navigationText: [ "" ]
});

// Patient Slider
$("#patient-slider").owlCarousel({
	autoPlay: 3000, //Set AutoPlay to 3 seconds
	pagination:true,
	items : 3,
	itemsDesktop : [1199,3],
	itemsDesktopSmall : [979,2],
	itemsTablet: [600,1] //2 items between 600 and 0
});
// Patient Slider

$(".slider-two-item").owlCarousel({
	autoPlay: 3000, //Set AutoPlay to 3 seconds
	pagination:true,
	items : 2,
	itemsDesktop : [1199,2],
	itemsDesktopSmall : [979,1],
	itemsTablet: [600,1] //2 items between 600 and 0
});

// Testimonial Slider
$(document).ready(function() {
      $("#testimonial-slider").owlCarousel({

      autoPlay: 3000, //Set AutoPlay to 3 seconds
      singleItem:true,
	  pagination:true,
	  navigation :false

      });
    });
// Testimonial Slider

// Owl Slider Sidebar
jQuery("#sidebar-single-slider").owlCarousel({
	autoPlay: false, //Set AutoPlay to 3 seconds
      singleItem:true,
	  pagination:true,
	  navigation :true,
	  navigationText: [ "" ]
});
// Owl Slider

// Project slider
var carousel = $(".location-slider");
  carousel.owlCarousel({
	autoPlay:true,
	pagination : true,
	navigation : false,
	scrollPerPage : false,
	items :3,
	itemsDesktop : [1199,3],
	itemsDesktopSmall : [979,2],
	itemsTablet: [600,1], //2 items between 600 and 0
	navigationText: [ "" ]
});

// Project Photos
jQuery(".project-photos").owlCarousel({
	autoPlay:true,
	pagination : false,
	navigation : true,
	rewindNav : true,
	scrollPerPage : false,
    singleItem : true,
    slideSpeed : 500,
	navigationText: [ "" ]
});

});
// dom END


text:
function noOperation() {
}


text:
#ifndef PHANTOM_H
#define PHANTOM_H

#include "shape.h"

#include <complex>

using complexFloat = std::complex<float>;

class Phantom
{
public:
	Phantom(std::vector<float> fieldOfView);
	Phantom(std::vector<Shape> shapes);

	std::vector<float> imageDomainSignal(const std::vector<float>& coordinates);
	float imageDomainSignal(float x, float y, float z);
	float imageDomainSignal(float x, float y);

	std::vector<complexFloat> fourierDomainSignal(const std::vector<float>& coordinates);

  /*!
   * \brief Calculate the complex fourier phantom signal at a k-space location.
   * \param kx
   * \param ky
   * \param kz
   */
  complexFloat fourierDomainSignal(const float& kx, const float& ky, const float& kz);
	complexFloat fourierDomainSignal(float kx, float ky);

private:

	std::vector<Shape> m_shapes;
};

#endif // PHANTOM_H


text:
<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 14-4-30
 * Time: 下午10:09
 */
class ContactController extends BaseController {

    public function getIndex()
    {
        //echo Config::get('app.front_template').'index';exit;
    }

    public function getShow(){

        $services = Business::where('freeze','=','0')->orderBy('order', 'DESC')->take(4)->get();
        $setting = Setting::find(1);
        return View::make(Config::get('app.front_template').'/contact_show', compact('services','setting'));
    }

}


text:
<script>
    var mpq = [];
    mpq.push(["init", "{{ site.analytics.mixpanel.token}}"]);
    (function(){var b,a,e,d,c;b=document.createElement("script");b.type="text/javascript";
    b.async=true;b.src=(document.location.protocol==="https:"?"https:":"http:")+
    "//api.mixpanel.com/site_media/js/api/mixpanel.js";a=document.getElementsByTagName("script")[0];
    a.parentNode.insertBefore(b,a);e=function(f){return function(){mpq.push(
    [f].concat(Array.prototype.slice.call(arguments,0)))}};d=["init","track","track_links",
    "track_forms","register","register_once","identify","name_tag","set_config"];for(c=0;c<
    d.length;c++){mpq[d[c]]=e(d[c])}})();
</script>


text:
// get popen/pclose
#ifndef _XOPEN_SOURCE
#define _XOPEN_SOURCE 600
#endif
#include <libgen.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <errno.h>
#include "chpllaunch.h"
#include "chpl-mem.h"
#include "chpltypes.h"
#include "error.h"
#include "../aprun/aprun-utils.h"

#define baseExpectFilename ".chpl-expect-"
#define EXPECT "expect"

#define CHPL_CC_ARG "-cc"
#define CHPL_WALLTIME_FLAG "--walltime"
#define CHPL_QUEUE_FLAG "--queue"
#define CHPL_GENERATE_QSUB_SCRIPT "--generate-qsub-script"

static char *_ccArg = NULL;
static char* debug = NULL;
static char* walltime = NULL;
static char* queue = NULL;
static int generate_qsub_script = 0;

static char expectFilename[FILENAME_MAX];

extern int fileno(FILE *stream);

/* copies of binary to run per node */
#define procsPerNode 1
#define versionBuffLen 80

#define launcherAccountEnvvar "CHPL_LAUNCHER_ACCOUNT"

typedef enum {
  pbspro,
  nccs,
  moab,
  unknown
} qsubVersion;

static qsubVersion determineQsubVersion(void) {
  const int buflen = 256;
  char version[buflen];
  char whichMoab[buflen];
  FILE *whichOutput;
  int fileError = 1;
  char *argv[3];
  argv[0] = (char *) "qsub";
  argv[1] = (char *) "--version";
  argv[2] = NULL;

  memset(version, 0, buflen);
  if (chpl_run_utility1K("qsub", argv, version, buflen) <= 0) {
    chpl_error("Error trying to determine qsub version", 0, 0);
  }

  if (strstr(version, "NCCS")||strstr(version, "OLCF")) {
    return nccs;
  } else if (strstr(version, "PBSPro")) {
    return pbspro;
  } else {
    memset(whichMoab, 0, buflen);
    whichOutput = popen("which moab 2>&1 >/dev/null", "r");
    if (whichOutput != NULL ) {
      fgets(whichMoab, buflen, whichOutput);
      fileError = ferror(whichOutput);
      pclose(whichOutput);
      if (strlen(whichMoab) == 0 && !fileError) {
        return moab;
      }
    }
    return unknown;
  }
}

//
// If generate_qsub_script, return the filename of the qsub script that
//   was written with the qsub options
// else return the qsub options for the command line as a string
//
static char* genQsubOptions(char* genFilename, char* projectString, qsubVersion qsub,
                            int32_t numLocales, int32_t numCoresPerLocale) {
  const size_t maxOptLength = 256;
  char* optionString = NULL;
  int length = 0;
  FILE *qsubScript = NULL;
  char *qsubFilename = expectFilename;

  if (!queue) {
    queue = getenv("CHPL_LAUNCHER_QUEUE");
  }
  if (!walltime) {
    walltime = getenv("CHPL_LAUNCHER_WALLTIME");
  }

  if (generate_qsub_script) {
    pid_t mypid = debug ? 0 : getpid();
    sprintf(qsubFilename, "qsub.%s-%d", genFilename, (int) mypid);
    qsubScript = fopen(qsubFilename, "w");
    fprintf(qsubScript, "#PBS -j oe\n");
    fprintf(qsubScript, "#PBS -zV\n");
    fprintf(qsubScript, "#PBS -N Chpl-%.10s\n", genFilename);
  } else {
    optionString = chpl_mem_allocMany(maxOptLength, sizeof(char),
                                      CHPL_RT_MD_COMMAND_BUFFER, -1, "");
    length += snprintf(optionString + length, maxOptLength - length,
                       "-z -V -I -N Chpl-%.10s", genFilename);
  }

  if (projectString && strlen(projectString) != 0) {
    if (generate_qsub_script) {
      fprintf(qsubScript, "#PBS -A %s\n", projectString);
    } else {
      length += snprintf(optionString + length, maxOptLength - length,
                         " -A %s", projectString);
    }
  }
  if (queue) {
    if (generate_qsub_script) {
      fprintf(qsubScript, "#PBS -q %s\n", queue);
    } else {
      length += snprintf(optionString + length, maxOptLength - length,
                         " -q %s", queue);
    }
  }
  if (walltime) {
    if (generate_qsub_script) {
      fprintf(qsubScript, "#PBS -l walltime=%s\n", walltime);
    } else {
      length += snprintf(optionString + length, maxOptLength - length,
                         " -l walltime=%s", walltime);
    }
  }
  switch (qsub) {
  case pbspro:
  case unknown:
    if (generate_qsub_script) {
      fprintf(qsubScript, "#PBS -l mppwidth=%d\n", numLocales);
      fprintf(qsubScript, "#PBS -l mppnppn=%d\n", procsPerNode);
      fprintf(qsubScript, "#PBS -l mppdepth=%d\n", numCoresPerLocale);
    } else {
      length += snprintf(optionString + length, maxOptLength - length,
                         " -l mppwidth=%d -l mppnppn=%d -l mppdepth=%d",
                         numLocales, procsPerNode, numCoresPerLocale);
    }
    break;
  case moab:
    if (generate_qsub_script) {
      fprintf(qsubScript, "#PBS -l nodes=%d\n", numLocales);
    } else {
      length += snprintf(optionString + length, maxOptLength - length,
                         " -l nodes=%d", numLocales);
    }
    break;
  case nccs:
    if (generate_qsub_script) {
      fprintf(qsubScript, "#PBS -l nodes=%d\n", numLocales);
    } else {
      if (!queue && !walltime)
        chpl_error("An execution time must be specified for the NCCS launcher if no queue is\n"
                   "specified -- use the CHPL_LAUNCHER_WALLTIME and/or CHPL_LAUNCHER_QUEUE\n"
                   "environment variables", 0, 0);
      length += snprintf(optionString + length, maxOptLength - length,
                         " -l nodes=%d\n", numLocales);
    }
    break;
  }

  if (generate_qsub_script) {
    fclose(qsubScript);
    optionString = qsubFilename;
  }

  return optionString;
}

static char** chpl_launch_create_argv(int argc, char* argv[],
                                      int32_t numLocales) {
  const int largc = 2;
  char *largv[largc];
  int i;
  FILE* expectFile = NULL;
  char* projectString = getenv(launcherAccountEnvvar);
  char* basenamePtr = strrchr(argv[0], '/');
  char* qsubOptions;
  FILE* qsubScript = NULL;
  FILE *outfile;
  pid_t mypid;
  int numCoresPerLocale;
  char **aprun_cmd;

  if (basenamePtr == NULL) {
      basenamePtr = argv[0];
  } else {
      basenamePtr++;
  }
  chpl_compute_real_binary_name(argv[0]);

  if (!debug) {
    mypid = getpid();
  } else {
    mypid = 0;
  }
  snprintf(expectFilename, FILENAME_MAX, "%s%d",
           baseExpectFilename, (int)mypid);

  initAprunAttributes();
  numCoresPerLocale = getCoresPerLocale();

  qsubOptions = genQsubOptions(basenamePtr, projectString,
                               determineQsubVersion(),
                               numLocales, numCoresPerLocale);

  if (generate_qsub_script) {
    qsubScript = fopen(qsubOptions, "a");
    if (!qsubScript) {
      char msg[256];
      snprintf(msg, 256, "Error creating qsub script '%s': %s",
               qsubOptions, strerror(errno));
      chpl_error(msg, 0, 0);
    }
    fprintf(qsubScript, "cd $PBS_O_WORKDIR\n");
    fprintf(qsubScript, "aprun ");
  } else {
    expectFile = fopen(expectFilename, "w");
    if (!expectFile) {
      char msg[256];
      snprintf(msg, 256, "Error creating temporary script '%s': %s",
               qsubOptions, strerror(errno));
      chpl_error(msg, 0, 0);
    }

    if (verbosity < 2) {
      fprintf(expectFile, "log_user 0\n");
    }
    fprintf(expectFile, "set timeout -1\n");
    fprintf(expectFile, "set chpl_prompt \"chpl-%d # \"\n", mypid);
    if (verbosity > 0) {
      fprintf(expectFile, "spawn tcsh -f\n");
      fprintf(expectFile, "send \"set prompt=\\\"$chpl_prompt\\\"\\n\"\n");
      fprintf(expectFile, "expect -re \"\\n$chpl_prompt\" {}\n");
      fprintf(expectFile, "send \"df -T . \\n\"\n");
      fprintf(expectFile, "expect {\n");
      fprintf(expectFile, "  -ex lustre {}\n");
      fprintf(expectFile, "  -re \"\\n$chpl_prompt\" {\n");
      fprintf(expectFile, "    send_user \"warning: Executing this program from a non-Lustre file system may cause it \\nto be unlaunchable, or for file I/O to be performed on a non-local file system.\\nContinue anyway? (\\[y\\]/n) \"\n");
      fprintf(expectFile, "    interact {\n");
      fprintf(expectFile, "      \\015           {return}\n");
      fprintf(expectFile, "      -echo -re \"y|Y\" {return}\n");
      fprintf(expectFile, "      -echo -re \"n|N\" {send_user \"\\n\" ; exit 0}\n");
      fprintf(expectFile, "      eof               {send_user \"\\n\" ; exit 0}\n");
      fprintf(expectFile, "      \003              {send_user \"\\n\" ; exit 0}\n");
      fprintf(expectFile, "      -echo -re \".\"   {send_user \"\\nContinue anyway? (\\[y\\]/n) \"}\n");
      fprintf(expectFile, "    }\n");
      fprintf(expectFile, "    send_user  \"\\n\"\n");
      fprintf(expectFile, "  }\n");
      fprintf(expectFile, "}\n");
      fprintf(expectFile, "send \"exit\\n\"\n");
      fprintf(expectFile, "close\n");
    }
    fprintf(expectFile, "spawn qsub %s\n", qsubOptions);
    fprintf(expectFile, "expect {\n");
    fprintf(expectFile, "  \"A project was not specified\" {send_user "
            "\"error: A project account must be specified via \\$"
            launcherAccountEnvvar "\\n\" ; exit 1}\n");
    fprintf(expectFile, "  -ex \"qsub: waiting\" {}\n");
    fprintf(expectFile, "}\n");
    fprintf(expectFile, "expect -re \"qsub:.*ready\" {}\n");
    fprintf(expectFile, "send \"tcsh -f\\n\"\n");
    fprintf(expectFile, "send \"set prompt=\\\"$chpl_prompt\\\"\\n\"\n");
    fprintf(expectFile, "expect -re \"\\n$chpl_prompt\" {}\n");
    fprintf(expectFile, "send \"cd \\$PBS_O_WORKDIR\\n\"\n");
    fprintf(expectFile, "expect -re \"\\n$chpl_prompt\" {}\n");
    if (verbosity > 2) {
      fprintf(expectFile, "send \"aprun -q %s%d ",
              getNumLocalesStr(), 1 /* only run on one locale */);
      fprintf(expectFile, "ls %s\\n\"\n", chpl_get_real_binary_name());
      fprintf(expectFile, "expect {\n");
      fprintf(expectFile, "  \"failed: chdir\" {send_user "
              "\"error: %s must be launched from and/or stored on a "
              "cross-mounted file system\\n\" ; exit 1}\n",
              basenamePtr);
      fprintf(expectFile, "  -ex \"$chpl_prompt\" {}\n");
      fprintf(expectFile, "}\n");
    }
    fprintf(expectFile, "send \"%s aprun ",
            isatty(fileno(stdout)) ? "" : "stty -onlcr;");
  }

  if (generate_qsub_script) {
    outfile = qsubScript;
  } else {
    outfile = expectFile;
  }

  aprun_cmd = chpl_create_aprun_cmd(argc, argv, numLocales, _ccArg);

  for (i=1; ; i++) {
    if (aprun_cmd[i] != NULL)
      fprintf(outfile, "%s ", aprun_cmd[i]);
    else
      break;
  }

  free(aprun_cmd);

  if (generate_qsub_script) {
    fprintf(qsubScript, "\n\n");
    fclose(qsubScript);
    fprintf(stdout, "QSUB script written to '%s'\n", qsubOptions);
    return NULL;
  } else {
  fprintf(expectFile, "\\n\"\n");
    fprintf(expectFile, "interact -o -ex \"$chpl_prompt\" {return}\n");
    fprintf(expectFile, "send \"echo CHPL_EXIT_CODE:\\$?\\n\"\n");
    fprintf(expectFile, "expect {\n");
    fprintf(expectFile, "  -ex \"CHPL_EXIT_CODE:0\" {set exitval \"0\"}\n");
    fprintf(expectFile, "  -re \"CHPL_EXIT_CODE:.\" {set exitval \"1\"}\n");
    fprintf(expectFile, "}\n");
    fprintf(expectFile, "expect -re \"\\n$chpl_prompt\" {}\n");
    fprintf(expectFile, "send \"exit\\n\"\n"); // exit tcsh
    fprintf(expectFile, "send \"exit\\n\"\n"); // exit qsub
    fprintf(expectFile, "close\n");
    if (verbosity > 1) {
      fprintf(expectFile, "send_user \"\\n\\n\"\n");
    }
    fprintf(expectFile, "exit $exitval\n");    // exit
    fclose(expectFile);

    largv[0] = (char *) EXPECT;
    largv[1] = expectFilename;

    return chpl_bundle_exec_args(0, NULL, largc, largv);
  }

}

static void genQsubScript(int argc, char *argv[], int numLocales) {
  chpl_launch_create_argv(argc, argv, numLocales);
}

static void chpl_launch_cleanup(void) {
  if (!debug) {
    if (unlink(expectFilename)) {
      char msg[1024];
      snprintf(msg, 1024, "Error removing temporary file '%s': %s",
               expectFilename, strerror(errno));
      chpl_warning(msg, 0, 0);
    }
  }
}

int chpl_launch(int argc, char* argv[], int32_t numLocales) {
  int retcode;
  debug = getenv("CHPL_LAUNCHER_DEBUG");

  if (generate_qsub_script) {
    genQsubScript(argc, argv, numLocales);
    retcode = 0;
  } else {
    retcode =
      chpl_launch_using_fork_exec(EXPECT,
                                  chpl_launch_create_argv(argc, argv,
                                                          numLocales),
                                  argv[0]);
    chpl_launch_cleanup();
  }

  return retcode;
}

int chpl_launch_handle_arg(int argc, char* argv[], int argNum,
                           int32_t lineno, c_string filename) {
  int numArgs = 0;
  if (!strcmp(argv[argNum], CHPL_WALLTIME_FLAG)) {
    walltime = argv[argNum+1];
    return 2;
  } else if (!strncmp(argv[argNum], CHPL_WALLTIME_FLAG"=", strlen(CHPL_WALLTIME_FLAG))) {
    walltime = &(argv[argNum][strlen(CHPL_WALLTIME_FLAG)+1]);
    return 1;
  }
  if (!strcmp(argv[argNum], CHPL_QUEUE_FLAG)) {
    queue = argv[argNum+1];
    return 2;
  } else if (!strncmp(argv[argNum], CHPL_QUEUE_FLAG"=", strlen(CHPL_QUEUE_FLAG))) {
    queue = &(argv[argNum][strlen(CHPL_QUEUE_FLAG)+1]);
    return 1;
  }
  if (!strcmp(argv[argNum], CHPL_GENERATE_QSUB_SCRIPT)) {
    generate_qsub_script = 1;
    return 1;
  }
  if (!strcmp(argv[argNum], CHPL_CC_ARG)) {
    _ccArg = argv[argNum+1];
    numArgs = 2;
  } else if (!strncmp(argv[argNum], CHPL_CC_ARG"=", strlen(CHPL_CC_ARG))) {
    _ccArg = &(argv[argNum][strlen(CHPL_CC_ARG)+1]);
    numArgs = 1;
  }
  if (numArgs > 0) {
    if (strcmp(_ccArg, "none") &&
        strcmp(_ccArg, "numa_node") &&
        strcmp(_ccArg, "cpu")) {
      char msg[256];
      snprintf(msg, 256, "'%s' is not a valid cpu assignment", _ccArg);
      chpl_error(msg, 0, 0);
    }
    return numArgs;
  }
  return 0;
}

void chpl_launch_print_help(void) {
  fprintf(stdout, "LAUNCHER FLAGS:\n");
  fprintf(stdout, "===============\n");
  fprintf(stdout, "  %s <cpu assignment>   : specify cpu assignment within a node:\n", CHPL_CC_ARG);
  fprintf(stdout, "                           none (default), numa_node, cpu\n");
  fprintf(stdout, "  %s : generate a qsub script and exit\n", CHPL_GENERATE_QSUB_SCRIPT);
  fprintf(stdout, "  %s <queue>        : specify a queue\n", CHPL_QUEUE_FLAG);
  fprintf(stdout, "                           (or use $CHPL_LAUNCHER_QUEUE)\n");
  fprintf(stdout, "  %s <HH:MM:SS>  : specify a wallclock time limit\n", CHPL_WALLTIME_FLAG);
  fprintf(stdout, "                           (or use $CHPL_LAUNCHER_WALLTIME)\n");
}


text:
/*  LR(1) Grammar of a language and corresponding parser table
    @(#) $Id$
    2022-02-10: LF only
    2017-05-28: javadoc 1.8
    2016-05-29: Java generics
    2007-05-08: relaunch with prototype states
    2005-02-10, Georg Fischer: copied from Symbol.java
*/
/*
 * Copyright 2006 Georg Fischer <dr dot georg dot fischer at gmail dot com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.teherba.jextra.gener;
import  org.teherba.jextra.Parm;
import  org.teherba.jextra.gener.Item;
import  org.teherba.jextra.gener.Production;
import  org.teherba.jextra.gener.Rule;
import  org.teherba.jextra.scan.Scanner;
import  org.teherba.jextra.scan.Symbol;
import  org.teherba.jextra.scan.SymbolList;
import  java.util.ArrayList;
import  java.util.Iterator;
import  java.util.TreeMap;

/** LR(1) Grammar of a language and corresponding parser table, consisting of
 *

 *
a set of Rules consisting of sets of Productions

 *
an axiom - the rule with this Symbol
 *  on the left side is the top-most rule of the grammar

 *
a set of States of the LR(1) Parser

 *
a set of Items which represents the parser Table
 *  generated from this Grammar

 *

 *  @author Dr. Georg Fischer
 */
public class Grammar {
    public final static String CVSID = "@(#) $Id$";

    /** a special nonterminal symbol which is the starting point of the grammar */
    public Symbol axiom;
    /** Map a left side to the corresponding rule (set of productions) */
    private TreeMap<Symbol, Rule> ruleMap;
    /** underlying scanner with symbol table */
    private Scanner scanner;
    /** the top-most production for a fictious hyper-axiom */
    private Production prod1;
    /** the symbol list */
    private SymbolList symbolList;

    /** No-args Constructor - creates a new grammar
     */
    public Grammar() {
        this(new Scanner());
    } // Constructor()

    /** Constructor - creates a new grammar with an associated scanner
     *  @param scan the Scanner to be used
     */
    public Grammar(Scanner scan) {
        scanner     = scan;
        symbolList  = scanner.getSymbolList();
    //  symbolList.put(Production.EOP);
        axiom       = symbolList.put("axiom");
        ruleMap     = new TreeMap<Symbol, Rule>();
    } // Constructor(Scanner)

    /** Get the axiom (root symbol) of the grammar
     *  @return symbol for the axiom of the grammar
     */
    public Symbol getAxiom() {
        return axiom;
    } // getAxiom

    /** Set the axiom (root symbol) of the grammar
     *  @param nonterminal symbol for the axiom
     */
    public void setAxiom(Symbol nonterminal) {
        axiom = nonterminal;
    } // setAxiom

    /** Get the scanner associated with the grammar
     *  @return scanner associated with the grammar
     */
    public Scanner getScanner() {
        return scanner;
    } // getScanner

    /** Get the symbol list of this grammar object
     *  @return symbol list
     */
    public SymbolList getSymbolList() {
        return symbolList;
    } // getSymbolList

    /** Check whether the grammar has a rule for a nonterminal
     *  @param leftSide symbol to be checked
     *  @return whether the symbol is a terminal
     */
    public boolean isTerminal(Symbol leftSide) {
        return ruleMap.get(leftSide) != null;
    } // isTerminal

    /** Get the set of productions for a nonterminal
     *  @param leftSide symbol on the left side of the rule
     *  @return rule, or null if there is none
     */
    public Rule getRule(Symbol leftSide) {
        return ruleMap.get(leftSide);
    } // getRule

    /** Insert or replaces a rule in the set of rules;
     *  there is no check whether the rule was already stored
     *  @param rule rule to be inserted or replaced
     */
    public void insert(Rule rule) {
        ruleMap.put(rule.getLeftSide(), rule);
        System.out.println("irule: " + rule.getLeftSide().getEntity() + ", size=" + rule.size());
    } // insert

    /** Remove all productions for a nonterminal, and thereby
     *  transform it into a terminal
     *  @param leftSide symbol on the left side
     *  @return whether the rule was previously stored in the grammar
     *  (that is whether the left side was a nonterminal)
     */
/*
    public boolean removeRule(Symbol leftSide) {
        boolean found = false;
        Rule rule = ruleMap.get(leftSide);
        if (rule != null) {
            found = true;
            ruleMap.remove(leftSide);
        }
        return found;
    } // removeRule
*/

    /** Add a production to the grammar;
     *  check whether the production was already stored, and ignore
     *  the call in that case
     *  @param prod production to be added
     *  @return number of productions previously stored in the grammar
     */
    public int insert(Production prod) {
        int found = 0;
        Symbol leftSide = prod.getLeftSide();
        Rule rule = getRule(leftSide);
        if (rule == null) {
            rule = new Rule(leftSide); // was terminal
        } else { // some rule for this left side was previously stored - expand it
            rule.insert(prod);
        } // expand
        ruleMap.put(leftSide, rule);
        leftSide.setRule(rule);
        return rule.insert(prod);
    } // insert(prod)

    /** Remove a production from the grammar;
     *  check whether the production was already stored, and print
     *  a message if that was not the case
     *  @param prod production to be removed
     *  @return number of productions previously stored in the grammar
     */
    public int delete(Production prod) {
        int found = 0;
        Rule rule = getRule(prod.getLeftSide());
        if (rule == null) {
            Parm.alert(201); // system error: no rule with left side of production
        } else {
            found = rule.delete(prod);
        }
        return found;
    } // delete(prod)

    /** Return a human readable representation of this grammar
     *  @return lines with all rules, prefixed by dots
     */
    public String legible() {
        String result = "[";
        Iterator<Symbol> siter = symbolList.iterator();
        int index = 0;
        while (siter.hasNext()) {
            Symbol leftSide = siter.next();
            Rule rule = leftSide.getRule();
            if (rule != null) { // nonterminal
                if (index > 0) {
                    result += Parm.newline() + ".";
                }
                result += rule.legible();
                index ++;
            } // nonterminal
        } // while hasNext
        return result + Parm.newline() + "]";
    } // legible

    /** Return an XML description of this grammar
     *  @return list of XML elements representing the symbol list
     *  and the rules with productions and members.
     */
    public String toString() {
        String result = Parm.getIndent() + "<grammar axiom=\"" + axiom.getEntity() + "\">" + Parm.getNewline();
        Parm.incrIndent();
        result += symbolList.toString() + Parm.getNewline();
        result += Parm.getIndent() + "<rules>" + Parm.getNewline();
        Parm.incrIndent();
        try {
            Iterator<Symbol> siter = ruleMap.keySet().iterator();
            while (siter.hasNext()) {
                Symbol leftSide = siter.next();
                result += ruleMap.get(leftSide).toString() + Parm.getNewline();
            } // while index
        } catch (Exception exc) {
            System.err.println(exc.getMessage());
            exc.printStackTrace();
        } // try - catch
        Parm.decrIndent();
        result += Parm.getIndent() + "</rules>" + Parm.getNewline();
        Parm.decrIndent();
        result += Parm.getIndent() + "</grammar>";
        return result;
    } // toString

    /** Test Frame
     *  @param args commandline arguments
     */
    public static void main (String args[]) {
    } // main

} // Grammar


text:
<?php

namespace Slim\Tests\Handlers;

use Slim\Handlers\NotAllowed;
use Slim\Http\Response;

class NotAllowedTest extends \PHPUnit_Framework_TestCase
{
    public function testInvalidMethod()
    {
        $notAllowed = new NotAllowed();

        /** @var Response $res */
        $res = $notAllowed->__invoke($this->getRequest('GET'), new Response(), ['POST', 'PUT']);

        $this->assertSame(405, $res->getStatusCode());
        $this->assertTrue($res->hasHeader('Allow'));
        $this->assertEquals('POST, PUT', $res->getHeaderLine('Allow'));
    }

    public function testOptions()
    {
        $notAllowed = new NotAllowed();

        /** @var Response $res */
        $res = $notAllowed->__invoke($this->getRequest('OPTIONS'), new Response(), ['POST', 'PUT']);

        $this->assertSame(200, $res->getStatusCode());
        $this->assertTrue($res->hasHeader('Allow'));
        $this->assertEquals('POST, PUT', $res->getHeaderLine('Allow'));
    }

    /**
     * @param string $method
     * @return \PHPUnit_Framework_MockObject_MockObject|\Slim\Http\Request
     */
    protected function getRequest($method)
    {
        $req = $this->getMockBuilder('Slim\Http\Request')->disableOriginalConstructor()->getMock();
        $req->expects($this->once())->method('getMethod')->will($this->returnValue($method));

        return $req;
    }
}


text:
// -*- c-basic-offset: 2; related-file-name: "reporting.h" -*-
/*
 * @(#)$Id$
 *
 * This file is distributed under the terms in the attached LICENSE file.
 * If you do not find this file, copies can be found by writing to:
 * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300,
 * Berkeley, CA, 94704.  Attention:  Intel License Inquiry.
 * Or
 * UC Berkeley EECS Computer Science Division, 387 Soda Hall #1776,
 * Berkeley, CA,  94707. Attention: P2 Group.
 *
 * DESCRIPTION: (Simple) error reporting facility for P2.  Reporting
 * level is encoded in the output stream name.  When the reporting
 * facility is not enabled, output on the stream is a no-op.
 *
 */

#ifndef __REPORTING_H__
#define __REPORTING_H__

#include <map>
#include <string>
#include <ostream>

class Reporting {
public:
  virtual ~Reporting() {};

  /** What are the different reporting levels? */
  enum
  Level { ALL = 0,              // Print everything. This means WORDY
                                // currently, unless another level is
                                // added below WORDY.

          WORDY,                // Print excruciatingly detailed
                                // info. This is where per-tuple, per
                                // event, per fixpoint details belong.

          INFO,                 // Print informational messages (setup,
                                // configuration, etc.) No per-tuple,
                                // per runtime iteration messages should
                                // be here!

          WARN,                 // Print warnings. The system can keep
                                // going but these are things someone
                                // should look at.

          ERROR,                // Print outright errors. The system
                                // can't keep going and this will help
                                // someone fix the problem. All
                                // assertions should be accompanied by
                                // such error messages and, eventually,
                                // replaced by them.

          OUTPUT,               // Print application output

          NONE                  // Print nothing. This means not even
                                // OUTPUT.
  };

private:
  static std::map< std::string, Reporting::Level >* _levelFromName;

  static std::map< Reporting::Level, std::string >* _levelToName;

  /** The wordy stream */
  static std::ostream* _wordy;

  /** The info stream */
  static std::ostream* _info;

  /** The warn stream */
  static std::ostream* _warn;

  /** The error stream */
  static std::ostream* _error;

  /** The error stream */
  static std::ostream* _output;

  /** Convenience function to share level setting functionality with
      initializers and external clients. Only to be used internally.  */
  static void
  innerSetLevel(Level l);

public:
  static std::map< std::string, Reporting::Level >&
  levelFromName();

  static std::map< Reporting::Level, std::string >&
  levelToName();

  /** Set the logging level. Everything at and above it is
      enabled. Everything below it is disabled. */
  static void
  setLevel(Level l);

  /** Obtain the logging level. */
  static Level
  level();

  /** The wordy stream */
  static std::ostream* wordy();

  /** The info stream */
  static std::ostream* info();

  /** The warn stream */
  static std::ostream* warn();

  /** The error stream */
  static std::ostream* error();

  /** The error stream */
  static std::ostream* output();

  /** The leaky stream buffer. */
  class LeakyStreambuf : public std::streambuf {
    /** Override the overflow method to do nothing */
    int
    overflow(int c = EOF);
  };

  class Initializer {
  public:
    Initializer();
  };

  /** Fetch the initializer to construct it */
  static Initializer*
  theInitializer();

private:
  /** Can't create objects */
  Reporting() {}

  /** The leaky stream buffer */
  static LeakyStreambuf* _leakyStreambuf;

  /** The null stream */
  static std::ostream* _nullOStream;

  /** The Logging Level */
  static Level _level;
};

////////////////////////////////////////////////////////////
// MACROS
////////////////////////////////////////////////////////////

#define TELL_WORDY (*Reporting::wordy()) << "##"
#define TELL_INFO (*Reporting::info()) << "##"
#define TELL_WARN (*Reporting::warn()) << "##"
#define TELL_ERROR (*Reporting::error()) << "##"
#define TELL_OUTPUT (*Reporting::output()) << "##"

#define TRACE_WORDY ((*Reporting::wordy()) <<  __PRETTY_FUNCTION__)
#define TRACE_INFO (*Reporting::info() <<  __PRETTY_FUNCTION__)
#define TRACE_WARN (*Reporting::warn() <<  __PRETTY_FUNCTION__)
#define TRACE_ERROR (*Reporting::error() <<  __PRETTY_FUNCTION__)
#define TRACE_OUTPUT (*Reporting::output() <<  __PRETTY_FUNCTION__)

////////////////////////////////////////////////////////////
// Tracing
////////////////////////////////////////////////////////////

/** A trace object is allocated in the stack of a function, so that its
    constructor and destructor can report entering into and exiting from
    the function */
class TraceObj {
private:
  /** The name of the function to trace */
  const char *fn;

public:
  /** The constructor reports entering a scope. */
  TraceObj(const char *s)
    : fn(s)
  {
    TELL_INFO << "Entering " << fn << "\n";
  }

  /** The destructor reports exiting from the scope */
  ~TraceObj()
  {
    TELL_INFO << "Exiting " << fn << "\n";
  }
};

#ifndef TRACE_OFF
// Place this in a function that must be traced
#define TRACE_FUNCTION TraceObj _t(__PRETTY_FUNCTION__)

#else

#define TRACE_FUNCTION

#endif /* TRACE_OFF */

#endif /* __REPORTING_H_ */


text:
/** @jsx React.DOM */

var ExcludedRow = React.createClass({
  render: function() {
    var url = lib.UrlToRepo(this.props.repo, this.props.file.Filename, this.props.rev);
    return (

          {this.props.file.Filename}

        {this.props.file.Reason}

    );
  }
});

var ExcludedTable = React.createClass({
  render: function() {
    var _this = this;
    if (this.props.searching) {
      return (

Searching...

);
    }

    var rows = [];
    this.props.files.forEach(function(file) {
      rows.push(<ExcludedRow file={file} repo={_this.props.repo} />);
    });

    return (

                  Filename
                  Reason

{rows}

    );
  }
});

var RepoButton = React.createClass({
  handleClick: function(repoName) {
    this.props.onRepoClick(repoName);
  },
  render: function() {
    var className = 'repo-button';
    if (this.props.currentRepo === this.props.repo) {
      className += ' selected';
    }

    return (
      <button onClick={this.handleClick.bind(this, this.props.repo)} className={className}>
        {this.props.repo}
      </button>
    );
  }
});

var RepoList = React.createClass({
  render: function() {
    var repos = [],
        _this = this;
    this.props.repos.forEach(function(repo){
      repos.push(<RepoButton repo={repo} onRepoClick={_this.props.onRepoClick} currentRepo={_this.props.repo} />);
    });

    return (

        {repos}

    );
  }
});

var FilterableExcludedFiles = React.createClass({
  getInitialState: function() {
    var _this = this;
    $.ajax({
      url: '/api/v1/repos',
      dataType: 'json',
      success: function(data) {
        _this.setState({ repos: data });
      },
      error: function(xhr, status, err) {
        // TODO(knorton): Fix these
        console.error(err);
      }
    });

    return {
      files: [],
      repos: [],
      repo: null,
    };
  },

  onRepoClick: function(repo) {
    var _this = this;
    _this.setState({
      searching: true,
      repo: this.state.repos[repo],
    });
    $.ajax({
      url: '/api/v1/excludes',
      data: {repo: repo},
      type: 'GET',
      dataType: 'json',
      success: function(data) {
        _this.setState({ files: data, searching: false });
      },
      error: function(xhr, status, err) {
        // TODO(knorton): Fix these
        console.error(err);
      }
    });
  },

  render: function() {
    return (

        Home

Excluded Files

          <RepoList repos={Object.keys(this.state.repos)} onRepoClick={this.onRepoClick} repo={this.state.repo} />
          <ExcludedTable files={this.state.files} searching={this.state.searching} repo={this.state.repo} />

    );
  }
});

React.renderComponent(
  <FilterableExcludedFiles />,
  document.getElementById('root')
);


text:
#include "System.h"

System sys;

//main function that just initializes the system object and calls the systems's loop
int main(){

    /*
     * This is changed to the directory root of the game data
     */
    std::string root = "/home/kane/MereEngineDemo/";

    if(!sys.init(root))
        return 0;

    return sys.loop();

}