text:
package com.google.cloud.resourcemanager;

import com.google.api.gax.paging.Page;
import com.google.cloud.FieldSelector;
import com.google.cloud.FieldSelector.Helper;
import com.google.cloud.Policy;
import com.google.cloud.Service;
import com.google.cloud.resourcemanager.spi.v1beta1.ResourceManagerRpc;
import com.google.cloud.resourcemanager.v3.GetProjectRequest;
import com.google.cloud.resourcemanager.v3.ListProjectsRequest;
import com.google.cloud.resourcemanager.v3.ProjectName;
import com.google.cloud.resourcemanager.v3.ProjectsSettings;
import com.google.cloud.resourcemanager.v3.UndeleteProjectRequest;
import com.google.cloud.resourcemanager.v3.UpdateProjectRequest;
import com.google.common.collect.ImmutableList;
import com.google.iam.v1.GetIamPolicyRequest;
import com.google.iam.v1.TestIamPermissionsRequest;
import java.util.List;
import java.util.Map;

/**
 * An interface for Google Cloud Resource Manager.
 *
 * @see Google Cloud Resource Manager
 * @deprecated v3 GAPIC client of ResourceManager is now available
 */
@Deprecated
public interface ResourceManager extends Service<ResourceManagerOptions> {

  String DEFAULT_CONTENT_TYPE = "application/octet-stream";

  /**
   * The fields of a project.
   *
   *
These values can be used to specify the fields to include in a partial response when calling
   * {@link ResourceManager#get} or {@link ResourceManager#list}. Project ID is always returned,
   * even if not specified.
   */
  enum ProjectField implements FieldSelector {
    PROJECT_ID("projectId"),
    NAME("name"),
    LABELS("labels"),
    PROJECT_NUMBER("projectNumber"),
    STATE("lifecycleState"),
    CREATE_TIME("createTime");

    static final List<? extends FieldSelector> REQUIRED_FIELDS = ImmutableList.of(PROJECT_ID);

    private final String selector;

    ProjectField(String selector) {
      this.selector = selector;
    }

    @Override
    public String getSelector() {
      return selector;
    }
  }

  /** Class for specifying project get options. */
  class ProjectGetOption extends Option {

    private static final long serialVersionUID = 270185129961146874L;

    private ProjectGetOption(ResourceManagerRpc.Option option, Object value) {
      super(option, value);
    }

    /**
     * Returns an option to specify the project's fields to be returned by the RPC call.
     *
     *
If this option is not provided all project fields are returned. {@code
     * ProjectGetOption.fields} can be used to specify only the fields of interest. Project ID is
     * always returned, even if not specified. {@link ProjectField} provides a list of fields that
     * can be used.
     */
    public static ProjectGetOption fields(ProjectField... fields) {
      return new ProjectGetOption(
          ResourceManagerRpc.Option.FIELDS, Helper.selector(ProjectField.REQUIRED_FIELDS, fields));
    }
  }

  /** Class for specifying project list options. */
  class ProjectListOption extends Option {

    private static final long serialVersionUID = 7888768979702012328L;

    private ProjectListOption(ResourceManagerRpc.Option option, Object value) {
      super(option, value);
    }

    /**
     * Returns an option to specify a filter.
     *
     *
Filter rules are case insensitive. The fields eligible for filtering are:
     *
     *

     *
name
     *
project ID
     *
labels.key, where key is the name of a label
     *

     *
     *
You can specify multiple filters by adding a space between each filter. Multiple filters
     * are composed using "and".
     *
     *
Some examples of filters:
     *
     *

     *
name:* The project has a name.
     *
name:Howl The project's name is Howl or howl.
     *
name:HOWL Equivalent to above.
     *
NAME:howl Equivalent to above.
     *
labels.color:* The project has the label color.
     *
labels.color:red The project's label color has the value red.
     *
labels.color:red label.size:big The project's label color has the value red and its
     *       label size has the value big.
     *

     */
    public static ProjectListOption filter(String filter) {
      return new ProjectListOption(ResourceManagerRpc.Option.FILTER, filter);
    }

    /**
     * Returns an option to specify a page token.
     *
     *
The page token (returned from a previous call to list) indicates from where listing should
     * continue.
     */
    public static ProjectListOption pageToken(String pageToken) {
      return new ProjectListOption(ResourceManagerRpc.Option.PAGE_TOKEN, pageToken);
    }

    /**
     * The maximum number of projects to return per RPC.
     *
     *
The server can return fewer projects than requested. When there are more results than the
     * page size, the server will return a page token that can be used to fetch other results.
     */
    public static ProjectListOption pageSize(int pageSize) {
      return new ProjectListOption(ResourceManagerRpc.Option.PAGE_SIZE, pageSize);
    }

    /**
     * Returns an option to specify the project's fields to be returned by the RPC call.
     *
     *
If this option is not provided all project fields are returned. {@code
     * ProjectListOption.fields} can be used to specify only the fields of interest. Project ID is
     * always returned, even if not specified. {@link ProjectField} provides a list of fields that
     * can be used.
     */
    public static ProjectListOption fields(ProjectField... fields) {
      return new ProjectListOption(
          ResourceManagerRpc.Option.FIELDS,
          Helper.listSelector("projects", ProjectField.REQUIRED_FIELDS, fields));
    }
  }

  /**
   * Creates a new project.
   *
   *
Initially, the project resource is owned by its creator exclusively. The creator can later
   * grant permission to others to read or update the project. Several APIs are activated
   * automatically for the project, including Google Cloud Storage.
   *
   * @return Project object representing the new project's metadata. The returned object will
   *     include the following read-only fields supplied by the server: project number, lifecycle
   *     state, and creation time.
   * @throws ResourceManagerException upon failure
   * @see Cloud
   *     Resource Manager create
   * @deprecated Please use {@link
   *     com.google.cloud.resourcemanager.v3.ProjectsClient#create(ProjectsSettings)} instead
   */
  @Deprecated
  Project create(ProjectInfo project);

  /**
   * Marks the project identified by the specified project ID for deletion.
   *
   *
This method will only affect the project if the following criteria are met:
   *
   *

   *
The project does not have a billing account associated with it.
   *
The project has a lifecycle state of {@link ProjectInfo.State#ACTIVE}.
   *

   *
   * This method changes the project's lifecycle state from {@link ProjectInfo.State#ACTIVE} to
   * {@link ProjectInfo.State#DELETE_REQUESTED}. The deletion starts at an unspecified time, at
   * which point the lifecycle state changes to {@link ProjectInfo.State#DELETE_IN_PROGRESS}. Until
   * the deletion completes, you can check the lifecycle state checked by retrieving the project
   * with {@link ResourceManager#get}, and the project remains visible to {@link
   * ResourceManager#list}. However, you cannot update the project. After the deletion completes,
   * the project is not retrievable by the {@link ResourceManager#get} and {@link
   * ResourceManager#list} methods. The caller must have modify permissions for this project.
   *
   * @throws ResourceManagerException upon failure
   * @see Cloud
   *     Resource Manager delete
   * @deprecated Please use {@link
   *     com.google.cloud.resourcemanager.v3.ProjectsClient#deleteProjectAsync(ProjectName)} instead
   */
  @Deprecated
  void delete(String projectId);

  /**
   * Retrieves the project identified by the specified project ID.
   *
   *
Returns {@code null} if the project is not found or if the user doesn't have read
   * permissions for the project.
   *
   * @throws ResourceManagerException upon failure
   * @see
   *     Cloud Resource Manager get
   * @deprecated Please use {@link
   *     com.google.cloud.resourcemanager.v3.ProjectsClient#getProject(GetProjectRequest)} instead
   */
  @Deprecated
  Project get(String projectId, ProjectGetOption... options);

  /**
   * Lists the projects visible to the current user.
   *
   *
This method returns projects in an unspecified order. New projects do not necessarily appear
   * at the end of the list. Use {@link ProjectListOption} to filter this list, set page size, and
   * set page tokens.
   *
   * @return {@code Page<Project>}, a page of projects
   * @throws ResourceManagerException upon failure
   * @see Cloud
   *     Resource Manager list
   * @deprecated Please use {@link
   *     com.google.cloud.resourcemanager.v3.ProjectsClient#listProjects(ListProjectsRequest)}
   *     instead
   */
  @Deprecated
  Page<Project> list(ProjectListOption... options);

  /**
   * Replaces the attributes of the project.
   *
   *
The caller must have modify permissions for this project.
   *
   * @return the Project representing the new project metadata
   * @throws ResourceManagerException upon failure
   * @see Cloud
   *     Resource Manager update
   * @deprecated Please use {@link
   *     com.google.cloud.resourcemanager.v3.ProjectsClient#updateProjectAsync(UpdateProjectRequest)}
   *     instead
   */
  @Deprecated
  Project replace(ProjectInfo newProject);

  /**
   * Restores the project identified by the specified project ID.
   *
   *
You can only use this method for a project that has a lifecycle state of {@link
   * ProjectInfo.State#DELETE_REQUESTED}. After deletion starts, as indicated by a lifecycle state
   * of {@link ProjectInfo.State#DELETE_IN_PROGRESS}, the project cannot be restored. The caller
   * must have modify permissions for this project.
   *
   * @throws ResourceManagerException upon failure
   * @see Cloud
   *     Resource Manager undelete
   * @deprecated Please use {@link
   *     com.google.cloud.resourcemanager.v3.ProjectsClient#undeleteProjectAsync(UndeleteProjectRequest)}
   *     instead
   */
  @Deprecated
  void undelete(String projectId);

  /**
   * Returns the IAM access control policy for the specified project. Returns {@code null} if the
   * resource does not exist or if you do not have adequate permission to view the project or get
   * the policy.
   *
   * @throws ResourceManagerException upon failure
   * @see
   *     Resource Manager getIamPolicy
   * @deprecated Please use {@link
   *     com.google.cloud.resourcemanager.v3.ProjectsClient#getIamPolicy(GetIamPolicyRequest)}
   *     instead
   */
  @Deprecated
  Policy getPolicy(String projectId);

  /**
   * Sets the IAM access control policy for the specified project. Replaces any existing policy. The
   * following constraints apply:
   *
   *

   *
Projects currently support only user:{emailid} and serviceAccount:{emailid}
   *       members in a binding of a policy.
   *
To be added as an owner, a user must be invited via Cloud Platform console and must
   *       accept the invitation.
   *
Members cannot be added to more than one role in the same policy.
   *
There must be at least one owner who has accepted the Terms of Service (ToS) agreement in
   *       the policy. An attempt to set a policy that removes the last ToS-accepted owner from the
   *       policy will fail.
   *
Calling this method requires enabling the App Engine Admin API.
   *

   *
   * Note: Removing service accounts from policies or changing their roles can render services
   * completely inoperable. It is important to understand how the service account is being used
   * before removing or updating its roles.
   *
   *
It is recommended that you use the read-modify-write pattern. This pattern entails reading
   * the project's current policy, updating it locally, and then sending the modified policy for
   * writing. Cloud IAM solves the problem of conflicting processes simultaneously attempting to
   * modify a policy by using the {@link Policy#getEtag etag} property. This property is used to
   * verify whether the policy has changed since the last request. When you make a request to Cloud
   * IAM with an etag value, Cloud IAM compares the etag value in the request with the existing etag
   * value associated with the policy. It writes the policy only if the etag values match. If the
   * etags don't match, a {@code ResourceManagerException} is thrown, denoting that the server
   * aborted update. If an etag is not provided, the policy is overwritten blindly.
   *
   *
An example of using the read-write-modify pattern is as follows:
   *
   *
{@code
   * Policy currentPolicy = resourceManager.getPolicy("my-project-id");
   * Policy modifiedPolicy = current.toBuilder()
   *     .removeIdentity(Role.viewer(), Identity.user("user@gmail.com"))
   *     .build();
   * Policy newPolicy = resourceManager.replacePolicy("my-project-id", modified);
   * }

   *
   * @throws ResourceManagerException upon failure
   * @see
   *     Resource Manager setIamPolicy
   * @deprecated
   */
  @Deprecated
  Policy replacePolicy(String projectId, Policy newPolicy);

  /**
   * Returns the permissions that a caller has on the specified project. You typically don't call
   * this method if you're using Google Cloud Platform directly to manage permissions. This method
   * is intended for integration with your proprietary software, such as a customized graphical user
   * interface. For example, the Cloud Platform Console tests IAM permissions internally to
   * determine which UI should be available to the logged-in user. Each service that supports IAM
   * lists the possible permissions; see the Supported Cloud Platform services page below for
   * links to these lists.
   *
   * @return A list of booleans representing whether the caller has the permissions specified (in
   *     the order of the given permissions)
   * @throws ResourceManagerException upon failure
   * @see
   *     Resource Manager testIamPermissions
   * @see Supported Cloud
   *     Platform Services
   * @deprecated {@link
   *     com.google.cloud.resourcemanager.v3.ProjectsClient#testIamPermissions(TestIamPermissionsRequest)}
   */
  @Deprecated
  List<Boolean> testPermissions(String projectId, List<String> permissions);

  /** Class for specifying project list options. */
  class ListOption extends Option {

    private ListOption(ResourceManagerRpc.Option option, Object value) {
      super(option, value);
    }

    /**
     * Returns an option to specify a page token.
     *
     *
The page token (returned from a previous call to list) indicates from where listing should
     * continue.
     */
    public static ListOption pageToken(String pageToken) {
      return new ListOption(ResourceManagerRpc.Option.PAGE_TOKEN, pageToken);
    }

    /**
     * The maximum number of records to return per RPC.
     *
     *
The server can return fewer records than requested. When there are more results than the
     * page size, the server will return a page token that can be used to fetch other results.
     */
    public static ListOption pageSize(int pageSize) {
      return new ListOption(ResourceManagerRpc.Option.PAGE_SIZE, pageSize);
    }
  }
  /**
   * Returns the permissions and their results representing whether the caller has the permissions
   * on the specified Organization.
   *
   * @param resource the organization's resource name, e.g. "organizations/123"
   * @param permissions the set of permissions to check for the resource. Permissions with wildcards
   *     (such as '*' or 'storage.*') are not allowed.
   * @return the permissions and their results representing whether the caller has the permissions
   *     on the specified Organization.
   * @throws ResourceManagerException upon failure
   * @see
   *     Resource Manager testIamPermissions
   * @deprecated
   */
  @Deprecated
  Map<String, Boolean> testOrgPermissions(String resource, List<String> permissions);

  /**
   * Clears a Policy from a resource.
   *
   * @throws ResourceManagerException upon failure
   * @see Resource
   *     Manager clearOrgPolicy
   */
  void clearOrgPolicy(String resource, OrgPolicyInfo orgPolicy);

  /**
   * Gets the effective Policy on a resource.
   *
   *
This is the result of merging Policies in the resource hierarchy. The returned Policy will
   * not have an etag set because it is a computed Policy across multiple resources. Subtrees of
   * Resource Manager resource hierarchy with 'under:' prefix are not expanded.
   *
   * @throws ResourceManagerException upon failure
   * @see Resource
   *     Manager getEffectiveOrgPolicy
   * @deprecated
   */
  @Deprecated
  OrgPolicyInfo getEffectiveOrgPolicy(String resource, String constraint);

  /**
   * Gets the Policy on a resource.
   *
   *
If no Policy is set on the resource, a Policy is returned with default values including
   * POLICY_TYPE_NOT_SET for the policy_type one of. The etag value can be used with
   * projects.setOrgPolicy() to create or update a Policy during read-modify-write.
   *
   * @throws ResourceManagerException upon failure
   * @see Resource
   *     Manager getOrgPolicy
   */
  OrgPolicyInfo getOrgPolicy(String resource, String constraint);

  /**
   * Lists the Constraints that could be applied on the specified resource.
   *
   * @throws ResourceManagerException upon failure
   * @see Resource
   *     Manager listAvailableOrgPolicyConstraints
   * @deprecated
   */
  @Deprecated
  Page<ConstraintInfo> listAvailableOrgPolicyConstraints(String resource, ListOption... options);

  /**
   * Lists the Policies set for a particular resource.
   *
   * @throws ResourceManagerException upon failure
   * @see Resource
   *     Manager listOrgPolicies
   * @deprecated
   */
  @Deprecated
  Page<OrgPolicyInfo> listOrgPolicies(String resource, ListOption... options);

  /**
   * Updates the specified Policy on the resource. Creates a new Policy for that Constraint on the
   * resource if one does not exist.
   *
   *
Not supplying an etag on the request Policy results in an unconditional write of the Policy.
   *
   * @throws ResourceManagerException upon failure
   * @see Resource
   *     Manager setOrgPolicy
   * @deprecated
   */
  @Deprecated
  OrgPolicyInfo replaceOrgPolicy(String resource, OrgPolicyInfo orgPolicy);
}


text:
{% extends "manual/base.html" %}{% load compress %}

{% block js %}{{block.super}}
{% compress js %}

{% endcompress %}
{% endblock %}

{% block content %}

		<canvas class="graph_canvas" id="presence_trend"></canvas>

{{current_bumper.presence_trend|floatformat:0}}

Presence

		<canvas class="graph_canvas" id="happiness_trend"></canvas>

{{current_bumper.happiness_trend|floatformat:0}}

Happiness

		<canvas class="graph_canvas" id="creativity_trend"></canvas>

{{current_bumper.creativity_trend|floatformat:0}}

Creativity

		<canvas class="graph_canvas" id="morning_mood_trend"></canvas>

{{current_bumper.morning_mood_trend|floatformat:0}}

Morning mood

		<canvas class="graph_canvas" id="sleep_health"></canvas>

{{current_bumper.sleep_health|floatformat:0}}

Sleep

		<canvas class="graph_canvas" id="work_health"></canvas>

{{current_bumper.work_health|floatformat:0}}

Work

		<canvas class="graph_canvas" id="alone_health"></canvas>

{{current_bumper.alone_health|floatformat:0}}

Alone

		<canvas class="graph_canvas" id="friend_health"></canvas>

{{current_bumper.friend_health|floatformat:0}}

Friends

		<canvas class="graph_canvas" id="public_health"></canvas>

{{current_bumper.public_health|floatformat:0}}

Public

		<canvas class="graph_canvas" id="relationship_health"></canvas>

{{current_bumper.relationship_health|floatformat:0}}

Relationship

Meditated

Art

{% if request.user.is_authenticated %}Off{% else %}Smiled{% endif %}

Worked out

Left the house

Nature time

Ate green

{% endblock %}

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace Params.Types
{
    [XmlInclude(typeof(IntParameter))]
    [XmlInclude(typeof(DoubleParameter))]
    [XmlInclude(typeof(StringParameter))]
    [XmlInclude(typeof(ObjectParameter))]
    public class Parameter
    {
        /// <summary>
        /// Название параметра
        /// </summary>
        public string Name;

        /// <summary>
        /// Временный
        /// </summary>
        public bool Temporary = false;

        /// <summary>
        /// Конструктор без параметров
        /// </summary>
        /// <param name="N"></param>
        /// <param name="Temp"></param>
        public Parameter() { }

        /// <summary>
        /// Конструктор с указанием названия
        /// </summary>
        /// <param name="N"></param>
        /// <param name="Temp"></param>
        public Parameter(string N)
        {
            Name = N;
        }

        /// <summary>
        /// Конструктор с указанием названия и метки временного параметра
        /// </summary>
        /// <param name="N"></param>
        /// <param name="Temp"></param>
        public Parameter(string N, bool Temp)
        {
            Name = N;
            Temporary = Temp;
        }
    }
}


text:
class AddKassiEventIdToPersonComment < ActiveRecord::Migration
  def self.up
    add_column :person_comments, :kassi_event_id, :integer
  end

  def self.down
    remove_column :person_comments, :kassi_event_id
  end
end


text:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping>

	<class name="org.hibernate.envers.test.integration.entityNames.auditedEntity.Person" entity-name="Personaje">

		<id name="id" column="ID_person" type="long" >
			<generator class="native" />
		</id>

		<property name="name" type="string" length="255"
			column="NAME" not-null="true" />

		<property name="age" type="int" column="AGE"/>

	</class>

</hibernate-mapping>


text:
<?php

namespace Igdr\DoctrineSpecification\ResultModifier;

use Doctrine\ORM\AbstractQuery;

/**
 * Interface ResultModifierInterface
 */
interface ResultModifierInterface
{
    /**
     * @param AbstractQuery $query
     */
    public function modify(AbstractQuery $query);
}


text:
<?php

interface IMFUQueuesModel {

	/**
	 * getts life time of file
	 * @return int
	 */
	function getLifeTime();

	/**
	 * setts life time of file
	 * @param int $time
	 */
	function setLifeTime($time);

	/**
	 * getts cleaning interval
	 * @return int
	 */
	function getCleanInterval();

	/**
	 * setts cleaning interval
	 * @param int $interval
	 */
	function setCleanInterval($interval);

	/**
	 * Initializes driver
	 */
	function initialize();

	/**
	 * Getts queue (if needed create)
	 * @param string $token
	 * @return IMFUQueueModel
	 */
	function getQueue($id);

	/**
	 * Getts all queues
	 * @return array of IMFUQueueModel
	 */
	function getQueues();

	/**
	 * Executes cleanup
	 */
	function cleanup();
}


text:
{-|
Module      : Madl.SourceInformation
Description : Source information data structure for madl networks.
Copyright   : (c) Tessa Belder 2016

Provides a data type source information of madl networks.
-}
module Madl.SourceInformation(
    -- * Data Types
    SourceInformation(..), WithSourceInfo(..),
    -- * Construction
    emptySourceInfo,
    -- * Query
    getSourceInfo, setSourceInfo, addSourceInfo, removeSourceInfo,
    showSourcePos
    ) where

import Data.List

import Text.Parsec.Pos

import Utils.Text

-- | Source information consists of
--   1. The name of the source file
--   2. The line number of the source position
--   3. The column number of the source position
--   3. The source text
data SourceInformation = SrcInfo {
    srcFileName :: Text,
    srcFileLine :: Int,
    srcFileColumn :: Int,
    sourceText :: Text
    }
instance Show SourceInformation where
    show (SrcInfo f l c t) = intercalate ":" [utxt f, show l, show c, " " ++utxt t]

-- | Add source information to an object. @WSI v source location@ is an object @v@ parsed from @source@ obtained from @location@.
data WithSourceInfo a = WSI a String SourcePos deriving (Show)
-- | WithSourceInfo is an instance of @Functor@ such that a function is applied to the object containing source info.
instance Functor WithSourceInfo where
  fmap f (WSI v s loc) = WSI (f v) s loc

-- | Remove source information from an object.
removeSourceInfo :: WithSourceInfo a -> a
removeSourceInfo (WSI object _ _) = object

-- | Transfer source information from one object to another object
setSourceInfo :: a -> WithSourceInfo b -> WithSourceInfo a
setSourceInfo object (WSI _ s loc) = WSI object s loc

-- | Get the source information from an object
getSourceInfo :: WithSourceInfo a -> SourceInformation
getSourceInfo (WSI _ srctext srcpos) = SrcInfo {
    srcFileName = txt $ sourceName srcpos,
    srcFileLine = sourceLine srcpos,
    srcFileColumn = sourceColumn srcpos,
    sourceText = txt srctext
    }

-- | empty source information to use as a dummy --todo(tssb) remove
emptySourceInfo :: SourceInformation
emptySourceInfo = SrcInfo (txt "") 1 1 (txt "")

-- | Add source information to an object
addSourceInfo :: a -> SourceInformation -> WithSourceInfo a
addSourceInfo object (SrcInfo fname fline fcolumn srctxt) = WSI object (utxt srctxt) srcpos where
    srcpos = newPos (utxt fname) fline fcolumn

-- | Show a source position in haskell style
showSourcePos :: SourcePos -> String
showSourcePos srcpos = intercalate ":" [sourceName srcpos, show $ sourceLine srcpos, show $ sourceColumn srcpos, ""]


text:
package org.cagrid.data.test.system;

import gov.nih.nci.cagrid.testing.system.haste.Step;

import java.io.File;

/**
 *  VerifyAuditLogStep
 *  Step to verify both creation of and proper output
 *  to the data service audit log
 *
 * @author David Ervin
 *
 * @created May 25, 2007 2:21:26 PM
 * @version $Id: VerifyAuditLogStep.java,v 1.1 2008-05-16 19:25:25 dervin Exp $
 */
public class VerifyAuditLogStep extends Step {

    private String logFilename = null;

    public VerifyAuditLogStep(String logFilename) {
        this.logFilename = logFilename;
    }

    public void runStep() throws Throwable {
        System.out.println("Running step: " + getClass().getName());

        File auditorLogFile = new File(logFilename);

        assertTrue("Auditor log file " + logFilename + " did not exist", auditorLogFile.exists());
        assertTrue("Auditor log file " + logFilename + " cannot be read", auditorLogFile.canRead());

        // TODO: verify stuff got logged
    }
}


text:
layout: page-fullwidth
title: "Chemical Safety"
meta_title: "Chemical Safety"
teaser: "[Teaser]"
header:
   image_fullwidth: "header_drop.jpg"

permalink: "/chemical-safety/"
---

### Lab Safety & Environmental Consulting

Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum Loremipsum.


text:
//Listing 16.7 Interface to be implemented by PricingStrategy clients
package ajia.domain;

public interface PricingStrategyClient {
    void setPricingStrategy(PricingStrategy pricingStrategy);
}


text:
title: Bike Update Part Deaux
author: Jenn McGuire
date: 2015-06-08
layout: post
---

As an update to our bike generator, yours truly has been working on displaying energy generated by the bike and used by the battery. I'm writing python code to be run on a Raspberry Pi. The Pi is on a board that some neat Hacksburg members made:

![Bike Board](http://i.imgur.com/75kqArV.jpg =250x)

I'm still working on that piece of code, and then we need to feed my code the readings the Pi will get.

You'll be able to see it at it's full glory at our table in Downtown Blacksburg at [Summer Solstice Fest](http://www.downtownblacksburg.com/summer_solstice_fest.aspx) on Saturday June 20, 2015, 1pm- 11:30pm! If you can't wait until then, we've got a meeting tomorrow at 7:30, where we'll be working on the bike and more. Check our [wiki](http://wiki.hacksburg.org/meetings:meeting_agendas_and_minutes) for the agenda, up shortly!

One last thing - we still need volunteers for our booth at Summer Solstice Fest. If you can help out, even for a little bit, sign up at our [doodle](http://doodle.com/9r642p2cwcedy25n#table). If you volunteer for 5 hours or more, we'll throw in a 5-day pass for your troubles. Also, you can ride our sweet bike-generator-to-be all day long. ;)


text:
  {% include iframe.html url=include.url %}

    {% if include.link %}
      {{ include.caption }}
    {% else %}
      {{ include.caption }}
    {% endif %}


text:
A JavaScript/Ruby REPL for your Objective-C apps.

![http://f.cl.ly/items/2I3v1c0T001E2K1i1l2l/console.gif](http://f.cl.ly/items/2I3v1c0T001E2K1i1l2l/console.gif)

Check [the blog post](http://reality.hk/posts/2014/01/12/building-a-ios-ruby-repl/) for more details.

## Why?

With iOS 7 shipped with JavaScriptCore, we can now run Opal (a JavaScript
based ruby implementation) on iOS to extend the app dynamically.

Theres one major problem however, to compile the Ruby to JavaScript,
then compile the app, install it and run takes a lot of time. What
if we have a REPL that let us dynamically define and run Ruby code and
run on device or simulator in realtime?

## Implementation

- [Opal](http://opalrb.org/) A Ruby to JavaScript compiler. It even come with sprockets extension which lets you bundle the compiled script easily.
- [JavaScriptCoreOpalAdditions](https://github.com/siuying/JavaScriptCoreOpalAdditions) A thin layer of Objective-C that load and provides native features to Opal.
- [jqConsole](https://github.com/replit/jq-console) Web based terminal.
- [Ace](http://ace.c9.io/) Web based code editor with syntax highlighting.
- [CocoaHTTPServer](https://github.com/robbiehanson/CocoaHTTPServer) HTTP and WebSocket server for realtime communication
between iOS and desktop.

## Installation

Add following lines to your ``Podfile``:

```ruby
pod 'IGJavaScriptConsole', '~> 0.1.3'
```

## Usage

To start a console, create a server by supply a JSContext and language.

```objective-c
#import "IGJavaScriptConsoleServer.h"

NSError* error;
self.server = [[IGJavaScriptConsoleServer alloc] initWithContext:context
                                                        language:IGJavaScriptConsoleServerLanguageRuby];
self.server.port = 3300;
if (![self.server start:&error]) {
    DDLogError(@"error: %@", error);
}
```

Connect your browser to your device at 3300 port (e.g. http://localhost:3300)
to connect to the console.

## License

MIT License. See License.txt.


text:
import { ActionType, IActionApi, IActionDescription } from "action/IAction";
import { ICreature, IDamageInfo, SpawnGroup } from "creature/ICreature";
import { IDoodad, IDoodadOptions } from "doodad/IDoodad";
import IEntity from "entity/IEntity";
import IHuman from "entity/IHuman";
import { AttackType, Bindable, BookType, Command, CreatureType, Direction, DoodadType, EquipType, ItemQuality, ItemType, MoveType, NPCType, PlayerState, RenderFlag, SfxType, SkillType, SpriteBatchLayer, WeightStatus } from "Enums";
import { IMapRequest } from "game/IGame";
import { IInspectionSection } from "game/inspection/IInspection";
import { IContainer, IItem } from "item/IItem";
import ItemRecipeRequirementChecker from "item/ItemRecipeRequirementChecker";
import BaseMod from "mod/BaseMod";
import { IHookHost } from "mod/IHookHost";
import { BindCatcherApi } from "newui/BindingManager";
import { INPC } from "npc/INPC";
import { IMessage } from "player/IMessageManager";
import IPlayer, { IMovementIntent } from "player/IPlayer";
import { INote } from "player/note/NoteManager";
import ISpriteBatch from "renderer/ISpriteBatch";
import IWorld from "renderer/IWorld";
import { ITile } from "tile/ITerrain";
import Log from "utilities/Log";
import { IVector2 } from "utilities/math/IVector";
import Vector3 from "utilities/math/Vector3";
import { IStringSection } from "utilities/string/Interpolator";
declare abstract class Mod extends BaseMod implements IHookHost {
    /**
     * Called when the mod is initialized (when it's enabled via the Mod Manager)
     */
    onInitialize(): void;
    /**
     * Called before the mod is uninitialized (when it's disabled via the Mod Manager)
     */
    onUninitialize(): void;
    /**
     * Called after the mod is uninitialized
     */
    onUninitialized(): void;
    /**
     * Called when the mod is loaded.
     * This will be called after a player starts a game (ran before resources & the world are setup)
     */
    onLoad(): void;
    /**
     * Called when the mod is unloaded
     */
    onUnload(): void;
    getAmbientColor(colors: [number, number, number]): [number, number, number] | undefined;
    getAmbientColorCave(): [number, number, number] | undefined;
    getAmbientColorDay(): [number, number, number] | undefined;
    getAmbientColorNight(): [number, number, number] | undefined;
    getFogColor(colors: [number, number, number]): [number, number, number] | undefined;
    getAmbientLightLevel(ambientLight: number, z: number): number | undefined;
    canConsumeItem(human: Human, itemType: ItemType, actionType: ActionType): boolean | undefined;
    canCreatureAttack(creature: ICreature, enemy: IPlayer | ICreature): boolean | undefined;
    canCreatureMove(creature: ICreature, tile: ITile, x: number, y: number, z: number, moveType: MoveType): boolean | undefined;
    canCreatureSpawn(type: CreatureType, x: number, y: number, z: number, aberrant: boolean): boolean | undefined;
    canDoodadSpawn(type: DoodadType, x: number, y: number, z: number, options: IDoodadOptions): boolean | undefined;
    canDropItem(human: Human, item: IItem, tile: ITile, dropAll: boolean, dropAllQuality: ItemQuality | undefined): boolean | undefined;
    canNPCAttack(npc: INPC, weapon: IItem | undefined, attackType: AttackType): boolean | undefined;
    canNPCMove(npc: INPC, tile: ITile, x: number, y: number, z: number, moveType: MoveType): boolean | undefined;
    canNPCSpawn(type: NPCType, x: number, y: number, z: number): boolean | undefined;
    canPickupDoodad(human: Human, doodad: IDoodad): boolean | undefined;
    canPlayerAttack(player: IPlayer, weapon: IItem | undefined, attackType: AttackType): boolean | undefined;
    canClientMove(api: BindCatcherApi): false | undefined;
    canSeeCreature(creature: ICreature, tile: ITile): boolean | undefined;
    canSeeNPC(npc: INPC, tile: ITile): boolean | undefined;
    getCreatureSpriteBatchLayer(creature: ICreature, batchLayer: SpriteBatchLayer): SpriteBatchLayer | undefined;
    getMaxSpritesForLayer(layer: SpriteBatchLayer, maxSprites: number): number | undefined;
    getPlayerFieldOfViewRadius(player: IPlayer): number | undefined;
    getPlayerMaxHealth(maxHealth: number, player: IPlayer): number;
    getPlayerMaxWeight(maxWeight: number, player: IPlayer): number;
    getPlayerMovementIntent(player: IPlayer): IMovementIntent | undefined;
    getPlayerSpriteBatchLayer(player: IPlayer, batchLayer: SpriteBatchLayer): SpriteBatchLayer | undefined;
    getPlayerWeightMovementPenalty(player: IPlayer): number | undefined;
    getPlayerWeightStatus(player: IPlayer): WeightStatus | undefined;
    getCameraPosition(position: IVector2): IVector2 | undefined;
    getTileLightLevel(tile: ITile, x: number, y: number, z: number): number | undefined;
    getTilePenalty(penalty: number, tile: ITile): number;
    getZoomLevel(): number | undefined;
    isHumanSwimming(human: Human, isSwimming: boolean): boolean | undefined;
    isPlayerSwimming(human: Human, isSwimming: boolean): boolean | undefined;
    isTileBlocked(tile: ITile): true | undefined;
    onBuild(human: Human, item: IItem, tile: ITile, doodad: IDoodad): void;
    onButtonBarClick(button: JQuery): void;
    onContainerItemAdd(item: IItem, container: IContainer): void;
    onContainerItemRemove(item: IItem, container: IContainer): void;
    onContainerItemUpdate(item: IItem, containerFrom: IContainer | undefined, containerTo: IContainer): void;
    onCraft(human: Human, item: IItem): void;
    onCreateWorld(world: IWorld): void;
    onDisplayMessage(player: IPlayer, message: IMessage): void;
    shouldDisplayMessage(player: IPlayer, message: IMessage, messageId: number): boolean | undefined;
    onDoodadSpawn(doodad: IDoodad): void;
    onGameEnd(state: PlayerState): void;
    onGameStart(isLoadingSave: boolean, playedCount: number): void;
    onGameTickStart(): void;
    onGameTickEnd(): void;
    onGetTranslation(translation: IStringSection[]): IStringSection[];
    onEntityKill(attacker: IEntity | IDoodad, target: IEntity): void;
    onHumanSkillChange(human: IHuman, skill: SkillType, currentSkill: number): void;
    onInventoryItemAdd(player: IPlayer | undefined, item: IItem, container: IContainer): void;
    onInventoryItemRemove(player: IPlayer | undefined, item: IItem, container: IContainer): void;
    onInventoryItemUpdate(player: IPlayer | undefined, item: IItem, container: IContainer): void;
    onInspectionSection(section: IInspectionSection): void;
    shouldCraft(requirementsMet: boolean, item: ItemType, checker: ItemRecipeRequirementChecker): boolean | undefined;
    onItemDamage(item: IItem, modifier?: number): number | undefined;
    onItemEquip(player: IPlayer, item: IItem, slot: EquipType): void;
    onItemQuickslot(item: IItem, player: IPlayer, quickSlot: number | undefined): void;
    onCreatureDamage(creature: ICreature, damageInfo: IDamageInfo): number | undefined;
    onCreatureDeath(creature: ICreature): void;
    onCreatureSpawn(creature: ICreature): void;
    onCreatureTamed(creature: ICreature, owner: IPlayer): void;
    onBindLoop(bindPressed: Bindable, api: BindCatcherApi): Bindable;
    onDigTreasure(human: Human, treasureTile: Vector3): void;
    onLanguageChange(languageName: string): void;
    onMove(player: IPlayer, nextX: number, nextY: number, tile: ITile, direction: Direction): boolean | undefined;
    onMoveComplete(player: IPlayer): void;
    onMoveDirectionUpdate(human: Human, direction: Direction): void;
    onNoInputReceived(player: IPlayer): void;
    onNPCDamage(npc: INPC, damageInfo: IDamageInfo): number | undefined;
    onNPCDeath(npc: INPC): boolean | undefined;
    onNPCSpawn(npc: INPC): void;
    onOpenBook(human: Human, book: BookType): void;
    onPickupDoodad(player: IPlayer, doodad: IDoodad): void;
    onPlayerDamage(player: IPlayer, damageInfo: IDamageInfo): number | undefined;
    onPlayerDeath(player: IPlayer): boolean | undefined;
    onPlayerJoin(player: IPlayer): void;
    onPlayerLeave(player: IPlayer): void;
    onPlayerTickEnd(player: IPlayer): void;
    onPlayerTickStart(player: IPlayer): void;
    onPlayerWalkToTilePath(player: IPlayer, path: IVector2[] | undefined): void;
    onQueueSoundEffect(type: SfxType, x: number, y: number, z: number): SfxType | boolean | undefined;
    onGameScreenVisible(): void;
    onReadMap(human: Human, mapRequest: IMapRequest): void;
    onRenderOverlay(spriteBatch: ISpriteBatch): void;
    onSailToCivilization(player: IPlayer): void;
    onSpawnCreatureFromGroup(creatureGroup: SpawnGroup, creaturePool: CreatureType[], x: number, y: number, z: number): boolean | undefined;
    onTileUpdate(tile: ITile, x: number, y: number, z: number): void;
    onTurnEnd(player: IPlayer): void;
    onTurnStart(player: IPlayer): void;
    onUpdateWeight(player: IPlayer, newWeight: number): number | undefined;
    onWriteNote(player: IPlayer, note: INote): false | undefined;
    onWrittenNote(player: IPlayer, id: number): void;
    postExecuteAction(api: IActionApi, action: IActionDescription, args: any[]): void;
    postFieldOfView(): void;
    postGenerateWorld(generateNewWorld: boolean): void;
    postRender(): void;
    postRenderPostProcess(): void;
    postRenderWorld(tileScale: number, viewWidth: number, viewHeight: number): void;
    postSaveGame(): void;
    preExecuteAction(api: IActionApi, action: IActionDescription, args: any[]): boolean | undefined;
    preLoadWorldDifferences(generateNewWorld: boolean): void;
    preExecuteCommand(player: IPlayer, command: Command, args: string | undefined): boolean | undefined;
    preRender(): void;
    preRenderPostProcess(): void;
    preRenderWorld(tileScale: number, viewWidth: number, viewHeight: number): void;
    preSaveGame(): void;
    processInput(player: IPlayer): boolean | undefined;
    shouldRender(): RenderFlag | undefined;
    shouldStopWalkToTileMovement(): boolean | undefined;
}
declare module Mod {
    /**
     * Injects the decorated field with a mod instance.
     * @param name Given a mod name, the decorated field will be injected with the enabled/loaded instance of the mod by that name.
     */
    function instance<M extends Mod>(name: string): <K extends string | number | symbol, T extends { [k in K]: M extends new (index: number) => infer I ? I : Mod; }>(target: T, key: K) => void;
    /**
     * Injects the decorated field with a mod's log.
     * @param name Given a mod name, the decorated field will be injected with the log of the enabled/loaded mod by that name.
     */
    function log(name: string): <K extends string | number | symbol, T extends { [k in K]: Log; }>(target: T, key: K) => void;
    /**
     * Injects the save data for a mod by its name or class.
     * @param name Given a mod name, the decorated field will be injected with save data from the enabled/loaded instance of
     * the mod by that name.
     */
    function saveData<M extends Mod = Mod>(name: string): <K extends string | number | symbol, T extends { [k in K]: M extends {
        initializeSaveData(data?: infer D | undefined): infer D;
    } ? D : never; }>(target: T, key: K) => void;
    /**
     * Injects the global data for a mod by its name or class.
     * @param name Given a mod name, the decorated field will be injected with global data from the enabled/loaded instance of
     * the mod by that name.
     */
    function globalData<M extends Mod = Mod>(name: string): <K extends string | number | symbol, T extends { [k in K]: M extends {
        initializeGlobalData(data?: infer D | undefined): infer D;
    } ? D : never; }>(target: T, key: K) => void;
}
export default Mod;


text:
==============================
Welcome to django-healthpoint!
==============================

.. image:: https://badge.fury.io/py/django-healthpoint.png
   :target: http://badge.fury.io/py/django-healthpoint

.. image:: https://travis-ci.org/pennersr/django-healthpoint.png
   :target: http://travis-ci.org/pennersr/django-healthpoint

.. image:: https://img.shields.io/pypi/v/django-healthpoint.svg
   :target: https://pypi.python.org/pypi/django-healthpoint

.. image:: https://coveralls.io/repos/pennersr/django-healthpoint/badge.png?branch=master
   :alt: Coverage Status
   :target: https://coveralls.io/r/pennersr/django-healthpoint

.. image:: https://pennersr.github.io/img/bitcoin-badge.svg
   :target: https://blockchain.info/address/1AJXuBMPHkaDCNX2rwAy34bGgs7hmrePEr

.. image:: https://pennersr.github.io/img/emacs-badge.svg
   :target: https://www.gnu.org/software/emacs/

Framework for adding an endpoint for health checks to your project.

Source code
  http://github.com/pennersr/django-healthpoint

Quickstart
==========

Install the app::

    # settings.py
    INSTALLED_APPS = [
        ...
        'healthpoint'
    ]

    # If specified, this user is able to see the details for each
    # individual check in the endpoint.
    HEALTHPOINT_BASICAUTH_USERNAME = 'john'
    HEALTHPOINT_BASICAUTH_PASSWORD = 'doe'

    # If set to True authentication is required for executing the
    # health checks.
    HEALTHPOINT_AUTH_REQUIRED = True

    # urls.py
    urlpatterns = [
        ...
        url(r'^', include('healthpoint.urls')),
    ]

Add a module named ``health.py`` to any of your apps. For example::

    from datetime import timedelta

    from django.contrib.auth.models import User
    from django.utils import timezone

    from healthpoint.decorators import health_check

    @health_check
    def user_signup():
        last_user = User.objects.last()
        time_since_last_signup = timezone.now() - last_user.date_joined
        # Return True/False, throw an exception, or return a tuple with a
        # detail message.
        return (
            time_since_last_signup <= timedelta(days=1),
            "last signup was: {}".format(last_user.date_joined))

The health checks can be accessed via the ``/health/`` endpoint:

- It executes all health checks, and reports status 200 if all checks succeed, status 500 otherwise.

- If a staff user is logged in, the endpoint reports the result for each individual check::

    {
     "success": {},
     "error": {
       "myproject.myapp.health.user_signup": "Last signup was: 2017-10-29 08:45:51"
     }
    }

- To provide more detail on the result, the ``@health_check`` can return a tuple ``(success:bool, detail:str)``. The detail message will be listed in the result.


text:
local path = require "pl.path"
local persist = require "luarocks.persist"
local type_check = require "luarocks.type_check"

local version_string = function(version , revision)
  return table.concat({version, revision or "1"}, "-")
end

local filename_with_version = function(name, version, revision)
  return table.concat({name, version_string(version, revision)}, "-") .. ".rockspec"
end

local rockspec = function(flags)
  -- verify_package_name(flags["name"])

  local defaults = {__index = {
      version = "scm",
      url = "*** please add URL for source tarball, zip or repository here ***",
      summary = "*** please specify description summary ***",
      detailed = "*** please specify description description ***",
      homepage = "*** please specify description homepage ***",
      license = "MIT",
  }}
  setmetatable(flags, defaults)
  local package = flags["name"]:lower()

  local rockspec = {
    rockspec_format = "1.1",
    package = package,
    -- name = flags["name"],
    version = version_string(flags["version"], flags["revision"]),
    source = {
      url = flags["url"],
      tag = flags["tag"],
    },
    description = {
      summary = flags["summary"],
      detailed = flags["detailed"],
      homepage = flags["homepage"],
      license = flags["license"],
    },
    dependencies = {
      "apicast-cli == scm-1",
      "apicast == scm-1"
    },
    -- List files
    build = {
      type = "builtin",
      modules = {
        [package .. ".config.development"] = "config/development.lua",
        [package .. ".config.production"] = "config/production.lua",
        [package .. ".init"] = "src/" .. package .. "/init.lua",
      },
      install = {
      },
    },
  }
  return rockspec
end

local generate_rockspec = function(flags)
  local spec = rockspec(flags)
  local filename = filename_with_version(flags["name"], flags["version"], flags["revision"])
  local dest = flags["dest"] or path.currentdir()

  persist.save_from_table(path.join(dest, filename), spec, type_check.rockspec_order)
  return spec
end

return {
  generate = generate_rockspec
}


text:
<?php

namespace NetSuite\Classes;

class CampaignEmailList {
    public $campaignEmail;
    public $replaceAll;
    static $paramtypesmap = array(
        "campaignEmail" => "CampaignEmail[]",
        "replaceAll" => "boolean",
    );
}


text:
{% assign event = include.event %}
{% assign location = site.locations | where:"title", event.location | first %}
{% if location %}{% else %}
    {% assign location = site.locations | where:"name", event.location | first %}
{% endif %}

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "Event",
  "name": "{{ event.title }}",
  "startDate" : "{{ event.date | date_to_xmlschema }}",
  "url" : "{{ event.url | prepend: site.baseurl | prepend: site.url }}",
  "location" : {
    "@type" : "Place",
    "sameAs" : "{{ location.location_url }}",
    "name" : "{{ location.title }}",
    "address" : "{{ location.address }}"
  }
}
</script>


text:
package org.hibernate.hql.internal.ast.tree;

import java.lang.reflect.Constructor;
import java.util.Arrays;
import java.util.List;
import java.util.Map;

import antlr.SemanticException;
import antlr.collections.AST;

import org.hibernate.PropertyNotFoundException;
import org.hibernate.QueryException;
import org.hibernate.hql.internal.ast.DetailedSemanticException;
import org.hibernate.internal.util.ReflectHelper;
import org.hibernate.internal.util.StringHelper;
import org.hibernate.transform.AliasToBeanConstructorResultTransformer;
import org.hibernate.transform.ResultTransformer;
import org.hibernate.transform.Transformers;
import org.hibernate.type.PrimitiveType;
import org.hibernate.type.Type;

/**
 * Represents a constructor (new) in a SELECT.
 *
 * @author josh
 */
public class ConstructorNode extends SelectExpressionList implements AggregatedSelectExpression {
	private Class resultType;
	private Constructor constructor;
	private Type[] constructorArgumentTypes;
	private boolean isMap;
	private boolean isList;

	public ResultTransformer getResultTransformer() {
		if ( constructor != null ) {
			return new AliasToBeanConstructorResultTransformer( constructor );
		}
		else if ( isMap ) {
			return Transformers.ALIAS_TO_ENTITY_MAP;
		}
		else if ( isList ) {
			return Transformers.TO_LIST;
		}
		throw new QueryException( "Unable to determine proper dynamic-instantiation tranformer to use." );
	}

	private String[] aggregatedAliases;

	public String[] getAggregatedAliases() {
		if ( aggregatedAliases == null ) {
			aggregatedAliases = buildAggregatedAliases();
		}
		return aggregatedAliases;
	}

	private String[] buildAggregatedAliases() {
		SelectExpression[] selectExpressions = collectSelectExpressions();
		String[] aliases = new String[selectExpressions.length] ;
		for ( int i=0; i<selectExpressions.length; i++ ) {
			String alias = selectExpressions[i].getAlias();
			aliases[i] = alias==null ? Integer.toString(i) : alias;
		}
		return aliases;
	}

	public void setScalarColumn(int i) throws SemanticException {
		SelectExpression[] selectExpressions = collectSelectExpressions();
		// Invoke setScalarColumnText on each constructor argument.
		for ( int j = 0; j < selectExpressions.length; j++ ) {
			SelectExpression selectExpression = selectExpressions[j];
			selectExpression.setScalarColumn( j );
		}
	}

	public int getScalarColumnIndex() {
		return -1;
	}

	public void setScalarColumnText(int i) throws SemanticException {
		SelectExpression[] selectExpressions = collectSelectExpressions();
		// Invoke setScalarColumnText on each constructor argument.
		for ( int j = 0; j < selectExpressions.length; j++ ) {
			SelectExpression selectExpression = selectExpressions[j];
			selectExpression.setScalarColumnText( j );
		}
	}

	@Override
    protected AST getFirstSelectExpression() {
		// Collect the select expressions, skip the first child because it is the class name.
		return getFirstChild().getNextSibling();
	}

	@Override
	public Class getAggregationResultType() {
		return resultType;
	}

	/**
	 * @deprecated (tell clover to ignore this method)
	 */
	@Deprecated
    @Override
    public Type getDataType() {
/*
		// Return the type of the object created by the constructor.
		AST firstChild = getFirstChild();
		String text = firstChild.getText();
		if ( firstChild.getType() == SqlTokenTypes.DOT ) {
			DotNode dot = ( DotNode ) firstChild;
			text = dot.getPath();
		}
		return getSessionFactoryHelper().requireEntityType( text );
*/
		throw new UnsupportedOperationException( "getDataType() is not supported by ConstructorNode!" );
	}

	public void prepare() throws SemanticException {
		constructorArgumentTypes = resolveConstructorArgumentTypes();
		String path = ( ( PathNode ) getFirstChild() ).getPath();
		if ( "map".equals( path.toLowerCase() ) ) {
			isMap = true;
			resultType = Map.class;
		}
		else if ( "list".equals( path.toLowerCase() ) ) {
			isList = true;
			resultType = List.class;
		}
		else {
			constructor = resolveConstructor( path );
			resultType = constructor.getDeclaringClass();
		}
	}

	private Type[] resolveConstructorArgumentTypes() throws SemanticException {
		SelectExpression[] argumentExpressions = collectSelectExpressions();
		if ( argumentExpressions == null ) {
			// return an empty Type array
			return new Type[]{};
		}

		Type[] types = new Type[argumentExpressions.length];
		for ( int x = 0; x < argumentExpressions.length; x++ ) {
			types[x] = argumentExpressions[x].getDataType();
		}
		return types;
	}

	private Constructor resolveConstructor(String path) throws SemanticException {
		String importedClassName = getSessionFactoryHelper().getImportedClassName( path );
		String className = StringHelper.isEmpty( importedClassName ) ? path : importedClassName;
		if ( className == null ) {
			throw new SemanticException( "Unable to locate class [" + path + "]" );
		}
		try {
			Class holderClass = ReflectHelper.classForName( className );
			return ReflectHelper.getConstructor( holderClass, constructorArgumentTypes );
		}
		catch ( ClassNotFoundException e ) {
			throw new DetailedSemanticException( "Unable to locate class [" + className + "]", e );
		}
		catch ( PropertyNotFoundException e ) {
			// this is the exception returned by ReflectHelper.getConstructor() if it cannot
			// locate an appropriate constructor
			throw new DetailedSemanticException( formatMissingContructorExceptionMessage( className ), e );
		}
	}

	// HHH-8068 -- provide a more helpful message
	private String formatMissingContructorExceptionMessage(String className) {
		String[] params = new String[constructorArgumentTypes.length];
		for ( int j = 0; j < constructorArgumentTypes.length; j++ ) {
			params[j] = constructorArgumentTypes[j] instanceof PrimitiveType
					? ( (PrimitiveType) constructorArgumentTypes[j] ).getPrimitiveClass().getName()
							: constructorArgumentTypes[j].getReturnedClass().getName();
		}
		String formattedList = params.length == 0 ? "no arguments constructor" : StringHelper.join( ", ", params );
		return String.format( "Unable to locate appropriate constructor on class [%s]. Expected arguments are: %s",
				className, formattedList );
	}

	public Constructor getConstructor() {
		return constructor;
	}

	public List getConstructorArgumentTypeList() {
		return Arrays.asList( constructorArgumentTypes );
	}

	public List getAggregatedSelectionTypeList() {
		return getConstructorArgumentTypeList();
	}

	public FromElement getFromElement() {
		return null;
	}

	public boolean isConstructor() {
		return true;
	}

	public boolean isReturnableEntity() throws SemanticException {
		return false;
	}

	public boolean isScalar() {
		// Constructors are always considered scalar results.
		return true;
	}

	public void setAlias(String alias) {
		throw new UnsupportedOperationException("constructor may not be aliased");
	}

	public String getAlias() {
		throw new UnsupportedOperationException("constructor may not be aliased");
	}
}


text:
namespace {

__declspec(noinline) crashpad::WinVMAddress CurrentAddress() {
  return crashpad::FromPointerCast<crashpad::WinVMAddress>(_ReturnAddress());
}

}  // namespace

int wmain(int argc, wchar_t* argv[]) {
  CHECK_EQ(argc, 2);

  crashpad::CrashpadClient client;
  CHECK(client.SetHandlerIPCPipe(argv[1]));

  HANDLE out = GetStdHandle(STD_OUTPUT_HANDLE);
  PCHECK(out != INVALID_HANDLE_VALUE) << "GetStdHandle";
  crashpad::WinVMAddress current_address = CurrentAddress();
  crashpad::CheckedWriteFile(out, &current_address, sizeof(current_address));

  CRASHPAD_SIMULATE_CRASH();

  return 0;
}


text:
package org.kaaproject.kaa.server.sync.bootstrap;

import java.util.Set;

/**
 *
 * @author Andrew Shvayka
 *
 */
public final class BootstrapServerSync {
    private final int requestId;
    private final Set<ProtocolConnectionData> protocolList;

    public BootstrapServerSync(int requestId, Set<ProtocolConnectionData> protocolList) {
        super();
        this.requestId = requestId;
        this.protocolList = protocolList;
    }

    public int getRequestId() {
        return requestId;
    }

    public Set<ProtocolConnectionData> getProtocolList() {
        return protocolList;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((protocolList == null) ? 0 : protocolList.hashCode());
        result = prime * result + requestId;
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        BootstrapServerSync other = (BootstrapServerSync) obj;
        if (protocolList == null) {
            if (other.protocolList != null)
                return false;
        } else if (!protocolList.equals(other.protocolList))
            return false;
        if (requestId != other.requestId)
            return false;
        return true;
    }

    @Override
    public String toString() {
        StringBuilder builder = new StringBuilder();
        builder.append("BootstrapServerSync [requestId=");
        builder.append(requestId);
        builder.append(", protocolList=");
        builder.append(protocolList);
        builder.append("]");
        return builder.toString();
    }

}


text:
import factory

from django.contrib.auth.models import User

from ..models import Request

class UserFactory(factory.DjangoModelFactory):
    FACTORY_FOR = User

    username = factory.Sequence(lambda n: 'user%s' % n)
    password = factory.PostGenerationMethodCall('set_password', 'password')

class RequestFactory(factory.DjangoModelFactory):
    FACTORY_FOR = Request

    status = Request.APPROVED
    suggested_by = factory.SubFactory(UserFactory)
    title = factory.Sequence(lambda n: 'suggestion%s' % n)


text:
{-# LANGUAGE MagicHash     #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE UnboxedTuples #-}
{-# LANGUAGE ViewPatterns  #-}
-- |
-- Module      : Data.Array.Accelerate.CUDA.Context
-- Copyright   : [2013..2014] Manuel M T Chakravarty, Gabriele Keller, Trevor L. McDonell
-- License     : BSD3
--
-- Maintainer  : Trevor L. McDonell <tmcdonell@cse.unsw.edu.au>
-- Stability   : experimental
-- Portability : non-portable (GHC extensions)
--
-- This module defines the execution context of an Accelerate computation in the
-- CUDA backend
--

module Data.Array.Accelerate.CUDA.Context (

  -- An execution context
  Context(..), create, push, pop, destroy,
  keepAlive, fromDeviceContext,

) where

-- friends
import Data.Array.Accelerate.CUDA.Debug                 ( traceIO, verbose, dump_gc, showFFloatSIBase )
import Data.Array.Accelerate.CUDA.Analysis.Device
import Data.Array.Accelerate.Lifetime

-- system
import Data.Function                                    ( on )
import Control.Exception                                ( bracket_ )
import Control.Concurrent                               ( forkIO, threadDelay )
import Control.Monad                                    ( when )
import System.Mem.Weak                                  ( Weak )
import Text.PrettyPrint
import qualified Foreign.CUDA.Driver                    as CUDA hiding ( device )
import qualified Foreign.CUDA.Driver.Context            as CUDA

-- | The execution context
--
data Context = Context {
    deviceProperties    :: {-# UNPACK #-} !CUDA.DeviceProperties,         -- information on hardware resources
    deviceContext       :: {-# UNPACK #-} !(Lifetime CUDA.Context),       -- device execution context
    weakContext         :: {-# UNPACK #-} !(Weak (Lifetime CUDA.Context)) -- weak pointer to the context (for memory management)
  }

instance Eq Context where
  (==) = (==) `on` deviceContext

-- | Create a new CUDA context associated with the calling thread
--
create :: CUDA.Device -> [CUDA.ContextFlag] -> IO Context
create dev flags = do
  ctx                    <- CUDA.create dev flags >> CUDA.pop
  actx@(Context prp _ _) <- fromDeviceContext dev ctx
  _                      <- keepAlive actx

  -- Generated code does not take particular advantage of shared memory, so
  -- for devices that support it use those banks as an L1 cache instead.
  --
  -- TODO: Perhaps make this a command line switch: -fprefer-[l1,shared]
  -- TODO: Make the occupancy calculator aware of adjustable shared memory
  --
  when (CUDA.computeCapability prp >= CUDA.Compute 2 0)
     $ bracket_ (CUDA.push ctx) CUDA.pop (CUDA.setCacheConfig CUDA.PreferL1)

  traceIO verbose (deviceInfo dev prp)
  return actx

-- |Given a device context, construct a new context around it.
--
fromDeviceContext :: CUDA.Device -> CUDA.Context -> IO Context
fromDeviceContext dev ctx = do
  prp           <- CUDA.props dev
  lctx          <- newLifetime ctx
  addFinalizer lctx $ do
    traceIO dump_gc $ "gc: finalise context #" ++ show (CUDA.useContext ctx)
    CUDA.push ctx
    CUDA.destroy ctx
  weak          <- mkWeakPtr lctx
  traceIO dump_gc $ "gc: initialise context #" ++ show (CUDA.useContext ctx)

  return $! Context prp lctx weak

-- | Destroy the specified context. This will fail if the context is more than
-- single attachment.
--
{-# INLINE destroy #-}
destroy :: Context -> IO ()
destroy (deviceContext -> ctx) = finalize ctx

-- | Push the given context onto the CPU's thread stack of current contexts. The
-- context must be floating (via 'pop'), i.e. not attached to any thread.
--
{-# INLINE push #-}
push :: Context -> IO ()
push (deviceContext -> lctx) = withLifetime lctx $ \ctx -> do
  traceIO dump_gc ("gc: push context: #" ++ show (CUDA.useContext ctx))
  CUDA.push ctx

-- | Pop the current context.
--
{-# INLINE pop #-}
pop :: IO ()
pop = do
  ctx <- CUDA.pop
  traceIO dump_gc ("gc: pop context: #" ++ show (CUDA.useContext ctx))

-- Make sure the GC knows that we want to keep this thing alive past the end of
-- 'evalCUDA'.
--
-- We may want to introduce some way to actually shut this down if, for example,
-- the object has not been accessed in a while, and so let it be collected.
--
-- Broken in ghci-7.6.1 Mac OS X due to bug #7299.
--
keepAlive :: a -> IO a
keepAlive x = forkIO (caffeine x) >> return x
  where
    caffeine hit = do threadDelay (5 * 1000 * 1000) -- microseconds = 5 seconds
                      caffeine hit

-- Debugging
-- ---------

-- Nicely format a summary of the selected CUDA device, example:
--
-- Device 0: GeForce 9600M GT (compute capability 1.1)
--           4 multiprocessors @ 1.25GHz (32 cores), 512MB global memory
--
deviceInfo :: CUDA.Device -> CUDA.DeviceProperties -> String
deviceInfo dev prp = render $ reset <>
  devID <> colon <+> vcat [ name <+> parens compute
                          , processors <+> at <+> text clock <+> parens cores <> comma <+> memory
                          ]
  where
    name        = text (CUDA.deviceName prp)
    compute     = text "compute capatability" <+> text (show $ CUDA.computeCapability prp)
    devID       = text "Device" <+> int (fromIntegral $ CUDA.useDevice dev)     -- hax
    processors  = int (CUDA.multiProcessorCount prp)                              <+> text "multiprocessors"
    cores       = int (CUDA.multiProcessorCount prp * coresPerMultiProcessor prp) <+> text "cores"
    memory      = text mem <+> text "global memory"
    --
    clock       = showFFloatSIBase (Just 2) 1000 (fromIntegral $ CUDA.clockRate prp * 1000 :: Double) "Hz"
    mem         = showFFloatSIBase (Just 0) 1024 (fromIntegral $ CUDA.totalGlobalMem prp   :: Double) "B"
    at          = char '@'
    reset       = zeroWidthText "\r"


text:
from cloudify.decorators import operation

from cloudify_azure import (constants, utils)
from cloudify_azure.decorators import with_azure_resource
from azure_sdk.resources.app_service.web_app import WebApp

@operation(resumable=True)
@with_azure_resource(WebApp)
def create(ctx, resource_group, name, app_config, **kwargs):
    azure_config = utils.get_client_config(ctx.node.properties)
    api_version = \
        ctx.node.properties.get('api_version', constants.API_VER_APP_SERVICE)
    web_app = WebApp(azure_config, ctx.logger, api_version)
    result = utils.handle_create(
        web_app,
        resource_group,
        name,
        additional_params=app_config)
    utils.save_common_info_in_runtime_properties(resource_group,
                                                 name,
                                                 result)

@operation(resumable=True)
def delete(ctx, **kwargs):
    if ctx.node.properties.get('use_external_resource', False):
        return
    azure_config = utils.get_client_config(ctx.node.properties)
    resource_group = ctx.instance.runtime_properties.get('resource_group')
    name = ctx.instance.runtime_properties.get('name')
    api_version = \
        ctx.node.properties.get('api_version', constants.API_VER_APP_SERVICE)
    web_app = WebApp(azure_config, ctx.logger, api_version)
    utils.handle_delete(ctx, web_app, resource_group, name)


text:
namespace P2PVOIP
{
    partial class CallForm
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.tbAddress = new System.Windows.Forms.TextBox();
            this.label1 = new System.Windows.Forms.Label();
            this.btCall = new System.Windows.Forms.Button();
            this.lbStatus = new System.Windows.Forms.Label();
            this.SuspendLayout();
            //
            // tbAddress
            //
            this.tbAddress.Location = new System.Drawing.Point(15, 25);
            this.tbAddress.Name = "tbAddress";
            this.tbAddress.Size = new System.Drawing.Size(250, 20);
            this.tbAddress.TabIndex = 3;
            //
            // label1
            //
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(12, 9);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(44, 13);
            this.label1.TabIndex = 2;
            this.label1.Text = "Number";
            //
            // btCall
            //
            this.btCall.Location = new System.Drawing.Point(98, 51);
            this.btCall.Name = "btCall";
            this.btCall.Size = new System.Drawing.Size(75, 23);
            this.btCall.TabIndex = 4;
            this.btCall.Text = "Call";
            this.btCall.UseVisualStyleBackColor = true;
            this.btCall.Click += new System.EventHandler(this.btCall_Click);
            //
            // lbStatus
            //
            this.lbStatus.AutoSize = true;
            this.lbStatus.Location = new System.Drawing.Point(116, 77);
            this.lbStatus.Name = "lbStatus";
            this.lbStatus.Size = new System.Drawing.Size(37, 13);
            this.lbStatus.TabIndex = 5;
            this.lbStatus.Text = "Status";
            //
            // CallForm
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(284, 112);
            this.Controls.Add(this.lbStatus);
            this.Controls.Add(this.btCall);
            this.Controls.Add(this.tbAddress);
            this.Controls.Add(this.label1);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            this.MaximizeBox = false;
            this.Name = "CallForm";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
            this.Text = "Call";
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.TextBox tbAddress;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.Button btCall;
        private System.Windows.Forms.Label lbStatus;
    }
}


text:
package org.jetbrains.idea.maven.execution;

import com.intellij.openapi.options.Configurable;
import com.intellij.openapi.options.ConfigurationException;
import com.intellij.openapi.options.SearchableConfigurable;
import com.intellij.openapi.project.Project;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/**
 * @author Sergey Evdokimov
 */
public abstract class MavenRunnerConfigurable extends MavenRunnerPanel implements SearchableConfigurable, Configurable.NoScroll {

  public static final String SETTINGS_ID = "reference.settings.project.maven.runner";

  public MavenRunnerConfigurable(@NotNull Project p, boolean isRunConfiguration) {
    super(p, isRunConfiguration);
  }

  @Nullable
  protected abstract MavenRunnerSettings getState();

  @Override
  public boolean isModified() {
    MavenRunnerSettings s = new MavenRunnerSettings();
    setData(s);
    return !s.equals(getState());
  }

  @Override
  public void apply() throws ConfigurationException {
    setData(getState());
  }

  @Override
  public void reset() {
    getData(getState());
  }

  @Override
  @Nls
  public String getDisplayName() {
    return RunnerBundle.message("maven.tab.runner");
  }

  @Override
  @Nullable
  @NonNls
  public String getHelpTopic() {
    return SETTINGS_ID;
  }

  @Override
  @NotNull
  public String getId() {
    //noinspection ConstantConditions
    return getHelpTopic();
  }

  @Override
  public void disposeUIResources() {

  }
}


text:
FROM deweysasser/s3fs
MAINTAINER Dewey Sasser <dewey@sasser.com>

RUN apt-get update
RUN apt-get install -y nginx
RUN echo "\ndaemon off;" >> /etc/nginx/nginx.conf

# Work around an issue mounting s3 buckets so they can be read by
#  www-data.  This isn't a good idea, but it is necessary for now.
RUN perl -i -p -e "s/user www-data;/user root;/" /etc/nginx/nginx.conf

RUN rm /etc/nginx/sites-enabled/default
COPY site.conf /etc/nginx/sites-available/s3-site.conf
RUN ln -s /etc/nginx/sites-available/s3-site.conf /etc/nginx/sites-enabled

ENV SUBDIR "html"
RUN mv /root/run /root/s3run
COPY run /root/run

CMD ["nginx"]

EXPOSE 80
EXPOSE 443


text:
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)

if !ENV['ORM'].nil? && (ENV['ORM'] != '')
  orm = ENV['ORM']
  raise ArgumentError, 'Invalid ORM' unless %w[active_record sequel].include?(orm)
  require orm
else
  orm = 'none'
end

require 'rails' if ENV['FEATURE'] == 'rails'

db = ENV['DB'] || 'none'
require 'pry-byebug'
require 'i18n'
require 'i18n/backend/fallbacks' if ENV['FEATURE'] == 'i18n_fallbacks'
require 'rspec'
require 'allocation_stats' if ENV['FEATURE'] == 'performance'
require 'json'

require 'mobility'

I18n.enforce_available_locales = true
I18n.available_locales = [:en, :'en-US', :ja, :fr, :de, :'de-DE', :cz, :pl, :pt, :'pt-BR']
I18n.default_locale = :en

Dir[File.expand_path("./spec/support/**/*.rb")].each { |f| require f }

unless orm == 'none'
  require "database"
  require "#{orm}/schema"

  require 'database_cleaner'
  DatabaseCleaner.strategy = :transaction

  DB = Mobility::Test::Database.connect(orm)
  DB.extension :pg_json, :pg_hstore if orm == 'sequel' && db == 'postgres'
  # for in-memory sqlite database
  Mobility::Test::Database.auto_migrate
end

RSpec.configure do |config|
  config.include Helpers
  config.include Mobility::Util
  if defined?(ActiveSupport)
    require 'active_support/testing/time_helpers'
    config.include ActiveSupport::Testing::TimeHelpers
  end

  config.filter_run focus: true
  config.run_all_when_everything_filtered = true
  config.mock_with :rspec do |mocks|
    mocks.verify_partial_doubles = true
  end

  config.include Helpers::Plugins, type: :plugin
  config.include Helpers::PluginSetup, type: :plugin

  config.extend Helpers::Backend, type: :backend
  config.include Helpers::Plugins, type: :backend
  config.include Helpers::Translates, type: :backend

  config.extend Helpers::ActiveRecord, orm: :active_record
  config.extend Helpers::Sequel, orm: :sequel

  config.before :each do |example|
    if (version = example.metadata[:active_record_geq]) &&
        defined?(ActiveRecord) &&
        ActiveRecord::VERSION::STRING < version
      skip "Unsupported for Rails < #{version}"
    end
    # Always clear I18n.fallbacks to avoid "leakage" between specs
    reset_i18n_fallbacks
    Mobility.locale = :en

    # Remove once lowest supported version is Rails 6.2
    if defined?(ActiveSupport::Dependencies::Reference)
      ActiveSupport::Dependencies::Reference.clear!
    end

    # ensure this is reset in each run
    Mobility.reset_translations_class
  end

  unless orm == 'none'
    config.before :each do
      DatabaseCleaner.start
    end
    config.after :each do
      DatabaseCleaner.clean
    end
  end

  config.order = "random"
  config.filter_run_excluding orm: lambda { |v| v && ![*v].include?(orm&.to_sym) }, db: lambda { |v| v && ![*v].include?(db.to_sym) }
end


text:
#ifndef __USB_PHY_H__
#define __USB_PHY_H__

/*******************************************************************************
 * Definitions
 ******************************************************************************/
typedef struct _usb_phy_config_struct
{
    uint8_t D_CAL;     /* Decode to trim the nominal 17.78mA current source */
    uint8_t TXCAL45DP; /* Decode to trim the nominal 45-Ohm series termination resistance to the USB_DP output pin */
    uint8_t TXCAL45DM; /* Decode to trim the nominal 45-Ohm series termination resistance to the USB_DM output pin */
} usb_phy_config_struct_t;

#if defined(__cplusplus)
extern "C" {
#endif

/*******************************************************************************
 * API
 ******************************************************************************/
/*!
 * @brief EHCI PHY get USB phy bass address.
 *
 * This function is used to get USB phy bass address.
 *
 * @param[in] controllerId    EHCI controller ID; See the #usb_controller_index_t.
 *
 * @retval USB phy bass address.
 */
extern void *USB_EhciPhyGetBase(uint8_t controllerId);

/*!
 * @brief EHCI PHY initialization.
 *
 * This function initializes the EHCI PHY IP.
 *
 * @param[in] controllerId    EHCI controller ID; See the #usb_controller_index_t.
 * @param[in] freq            The external input clock.
 *
 * @retval kStatus_USB_Success      Cancel successfully.
 * @retval kStatus_USB_Error        The freq value is incorrect.
 */
extern uint32_t USB_EhciPhyInit(uint8_t controllerId, uint32_t freq, usb_phy_config_struct_t *phyConfig);

/*!
 * @brief ehci phy initialization for suspend and resume.
 *
 * This function initialize ehci phy IP for suspend and resume.
 *
 * @param[in] controllerId   ehci controller id, please reference to #usb_controller_index_t.
 * @param[in] freq            the external input clock.
 *                            for example: if the external input clock is 16M, the parameter freq should be 16000000.
 *
 * @retval kStatus_USB_Success      cancel successfully.
 * @retval kStatus_USB_Error        the freq value is incorrect.
 */
extern uint32_t USB_EhciLowPowerPhyInit(uint8_t controllerId, uint32_t freq, usb_phy_config_struct_t *phyConfig);

/*!
 * @brief EHCI PHY deinitialization.
 *
 * This function deinitializes the EHCI PHY IP.
 *
 * @param[in] controllerId   EHCI controller ID; See #usb_controller_index_t.
 */
extern void USB_EhciPhyDeinit(uint8_t controllerId);

/*!
 * @brief EHCI PHY disconnect detection enable or disable.
 *
 * This function enable/disable the host EHCI disconnect detection.
 *
 * @param[in] controllerId   EHCI controller ID; See #usb_controller_index_t.
 * @param[in] enable
 *            1U - enable;
 *            0U - disable;
 */
extern void USB_EhcihostPhyDisconnectDetectCmd(uint8_t controllerId, uint8_t enable);

/*!
 * @brief Force the PHY enter FS Mode
 *
 * on RT500 and RT600, the device doesn't enter FS Mode after vbus is invalide and the controller works as HS.
 *
 * @param[in] controllerId   EHCI controller ID; See #usb_controller_index_t.
 * @param[in] enable
 *            1U - enable;
 *            0U - disable;
 */
extern void USB_PhyDeviceForceEnterFSMode(uint8_t controllerId, uint8_t enable);

#if defined(__cplusplus)
}
#endif

#endif /* __USB_PHY_H__ */


text:
package com.github.dpoggi.logback.ext.pattern.color;

/**
 * String constants representing ANSI escape codes.
 *
 * @author Dan Poggi
 * @since 1.0.0
 */
public abstract class ExtendedANSIConstants {

    public static final String FAINT = "2;";

    private ExtendedANSIConstants() {
        throw new AssertionError("No instance for you!");
    }
}


text:
package aima.core.logic.fol.inference.trace;

/**
 * @author Ciaran O'Reilly
 *
 */
public interface FOLModelEliminationTracer {
	void reset();

	void increment(int depth, int noFarParents);
}


text:
$.jqMVC
.bind('app',function(){
	console.log('app binding fired!');
	//use bind() like document.ready
	//i like to organize each component in its own private binding, but if you want to do it all in one giant binding thats fine.
})


text:
package com.gome.haoyuangong.adapter;

import java.util.List;

import android.content.Context;
import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

public abstract class MyBaseAdapter<T> extends BaseAdapter {
	protected List<T> mList;
	protected Context context;
	public MyBaseAdapter(Context context,List<T> list) {
		mList = list;
		this.context = context;
	}

	@Override
	public int getCount() {
		return mList.size();
	}

	@Override
	public Object getItem(int position) {
		return mList.get(position);
	}

	@Override
	public long getItemId(int position) {
		return position;
	}

	static public class ViewHolder {
		private final SparseArray<View> views;
		private View convertView;

		private ViewHolder(Context context, View convertView, ViewGroup parent, int layoutId) {
			views = new SparseArray<View>();
			this.convertView = LayoutInflater.from(context).inflate(layoutId, parent, false);
		}
		private ViewHolder(View v){
			views = new SparseArray<View>();
			this.convertView = v;
		}
		static public ViewHolder getInstance(Context context, View convertView, ViewGroup parent, int layoutId){
			if(convertView==null){
				ViewHolder holder = new ViewHolder(context, convertView, parent, layoutId);
				return holder;
			}else{
				return (ViewHolder) convertView.getTag();
			}
		}
		static public ViewHolder getInstance(View v){
				ViewHolder holder = new ViewHolder(v);
				return holder;
		}
		public View getView(){
			return convertView;
		}

		@SuppressWarnings("unchecked")
		public <T extends View> T getView(int viewId) {
			View view = views.get(viewId);
			if (view == null) {
				view = convertView.findViewById(viewId);
				views.put(viewId, view);
			}
			return (T) view;
		}
	}

}


text:
croswall
========

Downloads the latest snapshot of Google's Chrome OS wallpapers.

Usage:

```
go get -u github.com/colemickens/croswall
mkdir -p ~/Wallpapers/chromeos_wallpapers
crosswall ~/Wallpapers/chromeos_wallpapers
```

This presumes you had $GOPATH/bin in your $PATH.

MIT licensed


text:
 Searched

      <?php foreach ($this->registration->search_hotel($search) as $key => $value): ?>

                  <a href="/visit_hotel/<?php echo $value['id'] ?>" target="_blank"><img src="<?php echo "../assets/images/hotels/".$value['filename'] ?>" class="touris-image" style="padding:0;width:100%; height:200px;"/>

<?php echo $value['hotel'] ?>

            <form class="form-horizontal origs" method="post" onsubmit="return false">

                  <a href="/visit_hotel/<?php echo $value['id'] ?>" target="_blank" class="btn btn-info" name="button" style="width:50%">Visit

            </form>

      <?php endforeach ?>

      <?php foreach ($this->registration->search_tourist($search) as $key => $value): ?>

                   <a href="/tourist/<?php echo $value['id'] ?>" target="_blank"><img src="<?php echo "../assets/images/touristspot/".$value['filename'] ?>" class="touris-image" style="height:300px"/>

<?php echo $value['tourist'] ?>

                  <a class="btn btn-info btn-block" href="/tourist/<?php echo $value['id'] ?>" target="blank"><?php echo $value['tourist'] ?>

      <?php endforeach ?>


text:
@(user: models.User, userProjects: Seq[models.ProjectAuthorsAndBuilds], userFavourites: Seq[models.ProjectAuthorsAndBuilds], userApiKeys: Seq[models.ApiKey],
createApiKeyForm: Form[models.ApiKeyData], loginForm: Form[Option[models.User]])(implicit flash: Flash, currentUser: Option[models.User])

@import tags._

@main("", loginForm) {

            @gravatar(user.email)

@user.first_name @user.last_name

(@user.username)

            @user.homepage.map { hp =>

            @hp
            }

Favourite Projects

                @userFavourites.map { favouriteProject =>

                        @favouriteProject.project.name
                        @if(!favouriteProject.project.author_usernames.isEmpty){
                        (@{Html(favouriteProject.project.author_usernames.map { author =>
                        {author}
                        }.mkString(", "))})
                        }

                            @viewDocs(favouriteProject)

                }

My Projects

                @userProjects.map { projectAndBuilds =>

                        @projectAndBuilds.project.name
                        @if(!projectAndBuilds.project.author_usernames.isEmpty){
                        (@{Html(projectAndBuilds.project.author_usernames.map { author =>
                        {author}
                        }.mkString(", "))})
                        }

                            @viewDocs(projectAndBuilds)

                }

        @currentUser.map { user =>

API Keys

            @helper.form(action=routes.AuthenticationController.createApiKey, 'class -> "form-inline") {

                @createApiKeyForm.globalError.map { error =>

@error.message

                }
                @flash.get("success").map { message =>

@message

                }

                    Application Name
                    <input type="text" id="application_name" class="form-control" placeholder="Name of the application requesting API access" name="application_name" value='@createApiKeyForm("application_name").value'/>

                <button class="btn btn-primary" type="submit">Generate API Key</button>
                }

                @userApiKeys.map { key =>

                        @key.application_name

                            @key.api_key

                }

        }

}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <title>Tian Web Desktop Framework</title>
    <link rel=stylesheet type=text/css href=./style.css>

Tian.Buffer

Class for handling fixed length octet buffer.

Tian.Buffer(obj, encoding)

Constructor

    Parameters:

    obj - number | array | string

    encoding - string, supported encodings are hex and base64, defaults to hex

Returns: object

Constructs an instance of Tian.Buffer.

Examples:

    var buffer1 = new Tian.Buffer(4);
    var buffer2 = new Tian.Buffer([0xE0, 0x11, 0x0A, 0xFF]);
    var buffer3 = new Tian.Buffer('E0110AFF', 'hex');

.getLength()

Instance method

    Parameters:

Returns: number

Returns number of bytes of the buffer.

.toString(encoding)

Instance method

    Parameters:

    encoding - string, encoding of returned string, defaults to hex

Returns: string

Convert buffer to string in specific encoding.

.getChar(offset)

Instance method

    Parameters:

    offset - number, byte offset from the front of buffer

Returns: string

Read one character from buffer at offset. Returns undefined on failure.

.getString(offset, length)

Instance method

    Parameters:

    offset - number

    length - number, string length

Returns: string

Read one length*1 bytes UTF-8 string from buffer at offset. Returns undefined on failure.

.getUInt8(offset)

Instance method

    Parameters:

    offset - number

Returns: number

Read one unsigned 1-byte integer from buffer at offset. Returns undefined on failure.

.getUInt16(offset, bigEndian)

Instance method

    Parameters:

    offset - number

    bigEndian - boolean, if true, the value is in big-endian encoding, defaults to false

Returns: number

Read one unsigned 2-bytes integer from buffer at offset. Returns undefined on failure.

.getUInt32(offset, bigEndian)

Instance method

    Parameters:

    offset - number

    bigEndian - boolean

Returns: number

Read one unsigned 4-bytes integer from buffer at offset. Returns undefined on failure.

.getInt8(offset)

Instance method

    Parameters:

    offset - number

Returns: number

Read one signed 1-byte integer from buffer at offset. Returns undefined on failure.

.getInt16(offset, bigEndian)

Instance method

    Parameters:

    offset - number

    bigEndian - boolean

Returns: number

Read one signed 2-bytes integer from buffer at offset. Returns undefined on failure.

.getInt32(offset, bigEndian)

Instance method

    Parameters:

    offset - number

    bigEndian - boolean

Returns: number

Read one signed 4-bytes integer from buffer at offset. Returns undefined on failure.

.getFloat(offset, bigEndian)

Instance method

    Parameters:

    offset - number

    bigEndian - boolean

Returns: number

Read one 4-bytes float number from buffer at offset. Returns undefined on failure.

.getDouble(offset, bigEndian)

Instance method

    Parameters:

    offset - number

    bigEndian - boolean

Returns: number

Read one 8-bytes double number from buffer at offset. Returns undefined on failure.

.setChar(value, offset)

Instance method

    Parameters:

    value - string, ASCII character

    offset - number

Returns: boolean

Write one character to buffer at offset. Returns true on success.

.setString(value, offset)

Instance method

    Parameters:

    value - string, UTF-8 string

    offset - number

Returns: boolean

Write one UTF-8 string to buffer at offset. Returns true on success.

.setUInt8(value, offset)

Instance method

    Parameters:

    value - number, unsigned integer within [0x00, 0xFF]

    offset - number

Returns: boolean

Write one unsigned 1-byte integer to buffer at offset. Returns true on success.

.setUInt16(value, offset, bigEndian)

Instance method

    Parameters:

    value - number, unsigned integer within [0x0000, 0xFFFF]

    offset - number

    bigEndian - boolean

Returns: boolean

Write one unsigned 2-bytes integer to buffer at offset. Returns true on success.

.setUInt32(value, offset, bigEndian)

Instance method

    Parameters:

    value - number, unsigned integer within [0x00000000, 0xFFFFFFFF]

    offset - number

    bigEndian - boolean

Returns: boolean

Write one unsigned 4-bytes integer to buffer at offset. Returns true on success.

.setInt8(value, offset)

Instance method

    Parameters:

    value - number, signed integer within [-0x80, 0x7F]

    offset - number

Returns: boolean

Write one signed 1-byte integer to buffer at offset. Returns true on success.

.setInt16(value, offset, bigEndian)

Instance method

    Parameters:

    value - number, signed integer within [-0x8000, 0x7FFF]

    offset - number

    bigEndian - boolean

Returns: boolean

Write one signed 2-bytes integer to buffer at offset. Returns true on success.

.setInt32(value, offset, bigEndian)

Instance method

    Parameters:

    value - number, signed integer within [-0x80000000, 0x7FFFFFFF]

    offset - number

    bigEndian - boolean

Returns: boolean

Write one signed 4-bytes integer to buffer at offset. Returns true on success.

.setFloat(value, offset, bigEndian)

Instance method

    Parameters:

    value - number, float number within [-3.4028234663852886e+38, 3.4028234663852886e+38]

    offset - number

    bigEndian - boolean

Returns: boolean

Write one 4-bytes float number to buffer at offset. Returns true on success.

.setDouble(value, offset, bigEndian)

Instance method

    Parameters:

    value - number, double number within [-1.7976931348623157E+308, 1.7976931348623157E+308]

    offset - number

    bigEndian - boolean

Returns: boolean

Write one 8-bytes double number to buffer at offset. Returns true on success.


text:
/*
 *  ======== empty_min.c ========
 */
/* XDCtools Header files */
#include <xdc/std.h>
#include <xdc/cfg/global.h>

/* BIOS Header files */
#include <ti/sysbios/BIOS.h>
#include <ti/sysbios/knl/Queue.h>

/* TI-RTOS Header files */
#include <ti/drivers/GPIO.h>
#include <ti/drivers/UART.h>

/* Board Header file */
#include "Board.h"

/* Project Header files */
#include "sys/init.h"
#include "outlets/outlet_tasks.h"
#include "drivers/rfm12b.h"
#include "drivers/xbee.h"

/*
 *  ======== main ========
 */
int main(void) {
	// Initialize clock to 16MHz
	CLOCK_init();

	/* Call board init functions. */
	Board_initGeneral();

	/* Call driver init function. */
	RFM12B_init();
	XBEE_init();

	/* Start BIOS */
	BIOS_start();

	return (0);
}


text:
<?php

namespace Grav\Framework\Acl;

use ArrayIterator;
use Countable;
use Grav\Common\Inflector;
use IteratorAggregate;
use RuntimeException;
use Traversable;
use function count;
use function strlen;

/**
 * Class Action
 * @package Grav\Framework\Acl
 */
class Action implements IteratorAggregate, Countable
{
    /** @var string */
    public $name;
    /** @var string */
    public $type;
    /** @var bool */
    public $visible;
    /** @var string|null */
    public $label;
    /** @var array */
    public $params;

    /** @var Action|null */
    protected $parent;
    /** @var Action[] */
    protected $children = [];

    /**
     * @param string $name
     * @param array $action
     */
    public function __construct(string $name, array $action = [])
    {
        $label = $action['label'] ?? null;
        if (!$label) {
            if ($pos = strrpos($name, '.')) {
                $label = substr($name, $pos + 1);
            } else {
                $label = $name;
            }
            $label = Inflector::humanize($label, 'all');
        }

        $this->name = $name;
        $this->type = $action['type'] ?? 'action';
        $this->visible = (bool)($action['visible'] ?? true);
        $this->label = $label;
        unset($action['type'], $action['label']);
        $this->params = $action;

        // Include compact rules.
        if (isset($action['letters'])) {
            foreach ($action['letters'] as $letter => $data) {
                $data['letter'] = $letter;
                $childName = $this->name . '.' . $data['action'];
                unset($data['action']);
                $child = new Action($childName, $data);
                $this->addChild($child);
            }
        }
    }

    /**
     * @return array
     */
    public function getParams(): array
    {
        return $this->params;
    }

    /**
     * @param string $name
     * @return mixed|null
     */
    public function getParam(string $name)
    {
        return $this->params[$name] ?? null;
    }

    /**
     * @return Action|null
     */
    public function getParent(): ?Action
    {
        return $this->parent;
    }

    /**
     * @param Action|null $parent
     * @return void
     */
    public function setParent(?Action $parent): void
    {
        $this->parent = $parent;
    }

    /**
     * @return string
     */
    public function getScope(): string
    {
        $pos = strpos($this->name, '.');
        if ($pos) {
            return substr($this->name, 0, $pos);
        }

        return $this->name;
    }

    /**
     * @return int
     */
    public function getLevels(): int
    {
        return substr_count($this->name, '.');
    }

    /**
     * @return bool
     */
    public function hasChildren(): bool
    {
        return !empty($this->children);
    }

    /**
     * @return Action[]
     */
    public function getChildren(): array
    {
        return $this->children;
    }

    /**
     * @param string $name
     * @return Action|null
     */
    public function getChild(string $name): ?Action
    {
        return $this->children[$name] ?? null;
    }

    /**
     * @param Action $child
     * @return void
     */
    public function addChild(Action $child): void
    {
        if (strpos($child->name, "{$this->name}.") !== 0) {
            throw new RuntimeException('Bad child');
        }

        $child->setParent($this);
        $name = substr($child->name, strlen($this->name) + 1);

        $this->children[$name] = $child;
    }

    /**
     * @return Traversable
     */
    public function getIterator(): Traversable
    {
        return new ArrayIterator($this->children);
    }

    /**
     * @return int
     */
    public function count(): int
    {
        return count($this->children);
    }

    /**
     * @return array
     */
    public function __debugInfo()
    {
        return [
            'name' => $this->name,
            'type' => $this->type,
            'label' => $this->label,
            'params' => $this->params,
            'actions' => $this->children
        ];
    }
}


text:
$(document).ready(function()
{
    "use strict";
    var formulario=$('form[name="archivo"]');
    var url=formulario.attr('action');

    $("#cargadorArchivos").uploadFile({
        url:url,
        dynamicFormData: function()
        {
            return formulario.serializeObject();
        },
        fileName: 'archivo[archivo]',
        multiple: false,
        showStatusAfterSuccess: false,
        uploadStr: 'Carga',
        dragDropStr: "Area para arrastrar y soltar archivos",
        onSuccess: function(files,data,xhr)
        {
            $("#sessionFlash").empty().append(tmpl('plantillaHighlight',data.mensaje));
            $("table#listaArchivos tbody").prepend(tmpl('archivoRow',data.archivo));
            $(".borrarFila").borraFila();
        }
    });
});


text:
var React = require('react');
var ReactDOM = require('react-dom');
var Redux = require('redux');
var ReactRedux = require('react-redux');
var Provider = ReactRedux.Provider;
var createStore = Redux.createStore;
var reducer = require('./Reducer/reducer.js');

// Store
var store = createStore(reducer);

var MenuComponent = require('./Component/menu.js');
var CanvasComponent = require('./Component/canvas.js');

ReactDOM.render(
    <Provider store={store}>
        <div>
            <MenuComponent />
            <CanvasComponent className = 'canvas-wrapper' btnText = {{start: 'Start', stop: 'Stop'}} initText = '吃什么?' emptyText = "菜单空空如也"/>
        </div>
    </Provider>
    , document.getElementById('main-wrapper'));


text:
<?xml version="1.0" encoding="UTF-8"?>
<ldswebml type="image" uri="/media-library/images/youth/miscellaneous#young-woman-ipad-lawn-738718" xml:lang="eng" locale="eng" status="publish">
  <search-meta>
      <uri-title its:translate="no" xmlns:its="http://www.w3.org/2005/11/its">young-woman-ipad-lawn-738718</uri-title>
      <source>young-woman-ipad-lawn-738718</source>
      <publication-type its:translate="no" xmlns:its="http://www.w3.org/2005/11/its">image</publication-type>
      <media-type its:translate="no" xmlns:its="http://www.w3.org/2005/11/its">image</media-type>
      <publication value="ldsorg">LDS.org</publication>
      <publication-date value="2012-04-09">2012-04-09</publication-date>
      <title/>
      <description/>
      <collections>
          <collection its:translate="no" xmlns:its="http://www.w3.org/2005/11/its">global-search</collection>
          <collection its:translate="no" xmlns:its="http://www.w3.org/2005/11/its">media</collection>
          <collection its:translate="no" xmlns:its="http://www.w3.org/2005/11/its">images</collection>
      </collections>
      <subjects>
          <subject>young woman</subject>
          <subject>ipad</subject>
          <subject>laying down</subject>
          <subject>grass</subject>
          <subject>smiling</subject>
          <subject>looking up</subject>
          <subject>youth</subject>
          <subject>girl</subject>
          <subject>teen</subject>
          <subject>teenager</subject>
      </subjects>
  </search-meta>
  <no-search>
      <path>http://media.ldscdn.org/images/media-library/youth/miscellaneous/young-woman-ipad-lawn-738718-gallery.jpg</path>
      <images>
          http://media.ldscdn.org/images/media-library/youth/miscellaneous/young-woman-ipad-lawn-738718-thumbnail.jpg
      </images>
          <download-urls>
              <download-url>
                  Mobile
                  <size>457 KB</size>
                  <path>http://media.ldscdn.org/images/media-library/youth/miscellaneous/young-woman-ipad-lawn-738718-mobile.jpg</path>
              </download-url>
              <download-url>
                  Tablet
                  <size>510 KB</size>
                  <path>http://media.ldscdn.org/images/media-library/youth/miscellaneous/young-woman-ipad-lawn-738718-tablet.jpg</path>
              </download-url>
              <download-url>
                  Print
                  <size>1,021 KB</size>
                  <path>http://media.ldscdn.org/images/media-library/youth/miscellaneous/young-woman-ipad-lawn-738718-print.jpg</path>
              </download-url>
              <download-url>
                  Wallpaper
                  <size>2.0 MB</size>
                  <path>http://media.ldscdn.org/images/media-library/youth/miscellaneous/young-woman-ipad-lawn-738718-wallpaper.jpg</path>
              </download-url>
          </download-urls>
  </no-search>
<ldse-meta its:translate="no" xmlns="http://lds.org/code/lds-edit" xmlns:its="http://www.w3.org/2005/11/its"><document id="young-woman-ipad-lawn-738718" locale="eng" uri="/media-library/images/youth/miscellaneous#young-woman-ipad-lawn-738718" status="publish" site="ldsorg" source="chq" words="144" tgp="0.5035"/><created username="lds-edit" userid=""/><last-modified date="2012-05-10T12:26:25.859613-06:00" username="lds-edit" userid=""/></ldse-meta></ldswebml>