text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: firestore/local/maybe_document.proto

// This CPP symbol can be defined to use imports that match up to the framework
// imports needed when using CocoaPods.
#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
 #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
#endif

#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
 #import <Protobuf/GPBProtocolBuffers.h>
#else
 #import "GPBProtocolBuffers.h"
#endif

#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
#endif
#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
#endif

// @@protoc_insertion_point(imports)

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"

CF_EXTERN_C_BEGIN

@class FSTPBNoDocument;
@class FSTPBUnknownDocument;
@class GCFSDocument;
@class GPBTimestamp;

NS_ASSUME_NONNULL_BEGIN

#pragma mark - FSTPBMaybeDocumentRoot

/**
 * Exposes the extension registry for this file.
 *
 * The base class provides:
 * @code
 *   + (GPBExtensionRegistry *)extensionRegistry;
 * @endcode
 * which is a @c GPBExtensionRegistry that includes all the extensions defined by
 * this file and all files that it depends on.
 **/
@interface FSTPBMaybeDocumentRoot : GPBRootObject
@end

#pragma mark - FSTPBNoDocument

typedef GPB_ENUM(FSTPBNoDocument_FieldNumber) {
  FSTPBNoDocument_FieldNumber_Name = 1,
  FSTPBNoDocument_FieldNumber_ReadTime = 2,
};

/**
 * A message indicating that the document is known to not exist.
 **/
@interface FSTPBNoDocument : GPBMessage

/**
 * The name of the document that does not exist, in the standard format:
 * `projects/{project_id}/databases/{database_id}/documents/{document_path}`
 **/
@property(nonatomic, readwrite, copy, null_resettable) NSString *name;

/** The time at which we observed that it does not exist. */
@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *readTime;
/** Test to see if @c readTime has been set. */
@property(nonatomic, readwrite) BOOL hasReadTime;

@end

#pragma mark - FSTPBUnknownDocument

typedef GPB_ENUM(FSTPBUnknownDocument_FieldNumber) {
  FSTPBUnknownDocument_FieldNumber_Name = 1,
  FSTPBUnknownDocument_FieldNumber_Version = 2,
};

/**
 * A message indicating that the document that is known to exist but its data
 * is unknown.
 **/
@interface FSTPBUnknownDocument : GPBMessage

/**
 * The name of the document that is known to exist, in the standard format:
 * `projects/{project_id}/databases/{database_id}/documents/{document_path}`
 **/
@property(nonatomic, readwrite, copy, null_resettable) NSString *name;

/** The version at which we know the document exists. */
@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *version;
/** Test to see if @c version has been set. */
@property(nonatomic, readwrite) BOOL hasVersion;

@end

#pragma mark - FSTPBMaybeDocument

typedef GPB_ENUM(FSTPBMaybeDocument_FieldNumber) {
  FSTPBMaybeDocument_FieldNumber_NoDocument = 1,
  FSTPBMaybeDocument_FieldNumber_Document = 2,
  FSTPBMaybeDocument_FieldNumber_UnknownDocument = 3,
  FSTPBMaybeDocument_FieldNumber_HasCommittedMutations = 4,
};

typedef GPB_ENUM(FSTPBMaybeDocument_DocumentType_OneOfCase) {
  FSTPBMaybeDocument_DocumentType_OneOfCase_GPBUnsetOneOfCase = 0,
  FSTPBMaybeDocument_DocumentType_OneOfCase_NoDocument = 1,
  FSTPBMaybeDocument_DocumentType_OneOfCase_Document = 2,
  FSTPBMaybeDocument_DocumentType_OneOfCase_UnknownDocument = 3,
};

/**
 * Represents either an existing document, the explicitly known absence of a
 * document, or a document that is known to exist (at some version) but whose
 * contents are unknown.
 **/
@interface FSTPBMaybeDocument : GPBMessage

@property(nonatomic, readonly) FSTPBMaybeDocument_DocumentType_OneOfCase documentTypeOneOfCase;

/** Used if the document is known to not exist. */
@property(nonatomic, readwrite, strong, null_resettable) FSTPBNoDocument *noDocument;

/** The document (if it exists). */
@property(nonatomic, readwrite, strong, null_resettable) GCFSDocument *document;

/** Used if the document is known to exist but its data is unknown. */
@property(nonatomic, readwrite, strong, null_resettable) FSTPBUnknownDocument *unknownDocument;

/**
 * `has_committed_mutations` marks documents that were written to the remote
 * document store based on a write acknowledgment. These documents are
 * potentially inconsistent with the backend's copy and use the write's
 * commit version as their document version.
 **/
@property(nonatomic, readwrite) BOOL hasCommittedMutations;

@end

/**
 * Clears whatever value was set for the oneof 'documentType'.
 **/
void FSTPBMaybeDocument_ClearDocumentTypeOneOfCase(FSTPBMaybeDocument *message);

NS_ASSUME_NONNULL_END

CF_EXTERN_C_END

#pragma clang diagnostic pop

// @@protoc_insertion_point(global_scope)


text: This is the source code for https://bighappyface.io

redpajama_set_name: RedPajamaGithub


text:
class Group < ActiveRecord::Base
  has_many :invitations
  has_many :memberships
  has_many :users, through: :memberships
  has_many :categories
  has_many :polls, through: :categories
  has_many :propositions, through: :polls
  has_many :choices, through: :propositions
  has_many :votes, through: :choices

  validates :name, uniqueness: true, presence: true

  scope :with_includes, -> {
    includes(:categories, polls: { propositions: :choices })
  }

  def users_count
    users.size
  end

  def add_admin(user)
    memberships.create!(user: user, role: "admin")
  end

  def has_user?(user)
    !!memberships.find_by(user: user)
  end

  def has_member?(user)
    !!memberships.members.find_by(user: user)
  end

  def has_admin?(user)
    !!memberships.admins.find_by(user: user)
  end

  def to_s
    "Group ##{id} - #{name}"
  end
end


text:
export default class UserNavListView extends mx.View
{
    _$mask = null;

    constructor(id)
    {
        super(id);

        this.addClass("user-nav-list");

        this.$container.append(`

更新

下载到我的日历

收藏本应用

分享本应用

打赏开发者

退出登录

        `);

        this.$container.find("li#download").toggle(navigator.userAgent.indexOf("iPhone") !== -1 || navigator.userAgent.indexOf("iPad") !== -1);

        this.$element.on("click", "li", e => {
            const id = e.currentTarget.id;
            switch (id)
            {
                case "refresh":
                    window.location.reload(true);
                    break;
                case "fav":
                    this.showWechat("fav");
                    _hmt.push(['_trackEvent', 'fav', 'click', $user.name]);
                    break;
                case "share":
                    this.showWechat("share");
                    _hmt.push(['_trackEvent', 'share', 'click', $user.name]);
                    break;
            }
        });
    }

    showWechat(type)
    {
        if (this._$mask === null)
        {
            this._$mask = $("

");
            this._$mask.on("click", () => {
                this._$mask.transit({
                    opacity: 0
                }, "fast", () => {
                    this._$mask.detach();
                });
            });
        }
        this._$mask.removeClass("share fav").addClass(type);
        this._$mask.css({ opacity: 0 });
        $(document.body).append(this._$mask);
        this._$mask.transit({ opacity: 1 });
    }
}


text:
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Rainbow.Web.Storage
{
    public class SqlUploadStorageContext : DbContext
    {
        public SqlUploadStorageContext()
            : base()
        {

        }

        public SqlUploadStorageContext(string connectionStringName)
            : base(connectionStringName)
        {

        }

        public DbSet<UploadedFile> UploadedFiles { get; set; }
    }
}


text:
module LOTC
  # Deploy class
  #
  class Deploy
  end
end


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using System.Text;

namespace Azure.Storage.Sas
{
    /// <summary>
    /// Specifies the services accessible from an account level shared access
    /// signature.
    /// </summary>
    [Flags]
    public enum AccountSasServices
    {
        /// <summary>
        /// Indicates whether Azure Blob Storage resources are
        /// accessible from the shared access signature.
        /// </summary>
        Blobs = 1,

        /// <summary>
        /// Indicates whether Azure Queue Storage resources are
        /// accessible from the shared access signature.
        /// </summary>
        Queues = 2,

        /// <summary>
        /// Indicates whether Azure File Storage resources are
        /// accessible from the shared access signature.
        /// </summary>
        Files = 4,

        /// <summary>
        /// Indicates whether Azure Table Storage resources are
        /// accessible from the shared access signature.
        /// </summary>
        Tables = 8,

        /// <summary>
        /// Indicates all services are accessible from the shared
        /// access signature.
        /// </summary>
        All = ~0
    }
}


text:
@interface PSMTabDragView : NSView {
	NSImage *_image, *_alternateImage;
	float _alpha;
}
- (void)setFadeValue:(float)value;
- (NSImage *)image;
- (void)setImage:(NSImage *)image;
- (NSImage *)alternateImage;
- (void)setAlternateImage:(NSImage *)image;
@end


text:
package config

import (
	"encoding/json"
	"strconv"
	"strings"

	"github.com/aws/aws-sdk-go/service/simpledb"
)

// SecurityGroupClasses is a map of Security Group Classes
type SecurityGroupClasses map[string]SecurityGroupClass

// SecurityGroupClass is a single Security Group Class
type SecurityGroupClass struct {
	Description         string               `json:"description" awsmClass:"Description"`
	SecurityGroupGrants []SecurityGroupGrant `json:"securityGroupGrants"  awsmClass:"Grants"`
}

// SecurityGroupGrant is a Security Group Grant
type SecurityGroupGrant struct {
	ID                       string   `json:"id" hash:"ignore" awsm:"ignore"`
	Note                     string   `json:"note" hash:"ignore"`
	Type                     string   `json:"type"` // ingress / egress
	FromPort                 int      `json:"fromPort"`
	ToPort                   int      `json:"toPort"`
	IPProtocol               string   `json:"ipProtocol"`
	CidrIPs                  []string `json:"cidrIPs" hash:"set"`
	SourceSecurityGroupNames []string `json:"sourceSecurityGroupNames"`
}

// DefaultSecurityGroupClasses returns the defauly Security Group Classes
func DefaultSecurityGroupClasses() SecurityGroupClasses {
	defaultSecurityGroups := make(SecurityGroupClasses)

	defaultSecurityGroups["dev"] = SecurityGroupClass{
		Description: "dev servers",
		SecurityGroupGrants: []SecurityGroupGrant{
			SecurityGroupGrant{
				Note:       "http port 80",
				Type:       "ingress",
				FromPort:   80,
				ToPort:     80,
				IPProtocol: "tcp",
				CidrIPs:    []string{"0.0.0.0/0"},
			},
			SecurityGroupGrant{
				Note:       "http port 443",
				Type:       "ingress",
				FromPort:   443,
				ToPort:     443,
				IPProtocol: "tcp",
				CidrIPs:    []string{"0.0.0.0/0"},
			},
		},
	}

	return defaultSecurityGroups
}

// SaveSecurityGroupClass reads unmarshals a byte slice and inserts it into the db
func SaveSecurityGroupClass(className string, data []byte) (class SecurityGroupClass, err error) {
	err = json.Unmarshal(data, &class)
	if err != nil {
		return
	}

	err = Insert("securitygroups", SecurityGroupClasses{className: class})
	return
}

// LoadSecurityGroupClass loads a Security Group Class by its name
func LoadSecurityGroupClass(name string, splitGrants bool) (SecurityGroupClass, error) {
	cfgs := make(SecurityGroupClasses)
	item, err := GetItemByName("securitygroups", name)
	if err != nil {
		return cfgs[name], err
	}

	cfgs.Marshal([]*simpledb.Item{item})
	cfg := cfgs[name]

	if splitGrants {

		var sGrants []SecurityGroupGrant

		for _, grant := range cfg.SecurityGroupGrants {

			// Grant Source: Sec Group
			for _, secGrp := range grant.SourceSecurityGroupNames {
				sGrant := grant
				sGrant.CidrIPs = []string{}
				sGrant.SourceSecurityGroupNames = []string{secGrp}
				sGrants = append(sGrants, sGrant)
			}

			// Grant Source: CIDR IP
			for _, cidrIp := range grant.CidrIPs {
				sGrant := grant
				sGrant.SourceSecurityGroupNames = []string{}
				sGrant.CidrIPs = []string{cidrIp}
				sGrants = append(sGrants, sGrant)
			}
		}
		cfg.SecurityGroupGrants = sGrants
	}

	return cfg, nil
}

// LoadAllSecurityGroupClasses loads all Security Group Classes
func LoadAllSecurityGroupClasses() (SecurityGroupClasses, error) {
	cfgs := make(SecurityGroupClasses)
	items, err := GetItemsByType("securitygroups")
	if err != nil {
		return cfgs, err
	}

	cfgs.Marshal(items)
	return cfgs, nil
}

// Marshal puts items from SimpleDB into a Security Group Class
func (c SecurityGroupClasses) Marshal(items []*simpledb.Item) {
	for _, item := range items {
		name := strings.Replace(*item.Name, "securitygroups/", "", -1)
		cfg := new(SecurityGroupClass)

		for _, attribute := range item.Attributes {

			val := *attribute.Value

			switch *attribute.Name {

			case "Description":
				cfg.Description = val
			}

		}

		// Get the grants
		grants, _ := GetItemsByType("securitygroups/" + name + "/grants")
		cfg.SecurityGroupGrants = make([]SecurityGroupGrant, len(grants))
		for i, grant := range grants {

			cfg.SecurityGroupGrants[i].ID = strings.Replace(*grant.Name, "securitygroups/"+name+"/grants/", "", -1)

			for _, attribute := range grant.Attributes {

				val := *attribute.Value

				switch *attribute.Name {

				case "Note":
					cfg.SecurityGroupGrants[i].Note = val

				case "Type":
					cfg.SecurityGroupGrants[i].Type = val

				case "FromPort":
					cfg.SecurityGroupGrants[i].FromPort, _ = strconv.Atoi(val)

				case "ToPort":
					cfg.SecurityGroupGrants[i].ToPort, _ = strconv.Atoi(val)

				case "IPProtocol":
					cfg.SecurityGroupGrants[i].IPProtocol = val

				case "CidrIPs":
					cfg.SecurityGroupGrants[i].CidrIPs = append(cfg.SecurityGroupGrants[i].CidrIPs, val)

				case "SourceSecurityGroupNames":
					cfg.SecurityGroupGrants[i].SourceSecurityGroupNames = append(cfg.SecurityGroupGrants[i].SourceSecurityGroupNames, val)

				}
			}

		}

		c[name] = *cfg
	}
}


text:
{% extends "layout-opg-b.html" %}
{% block page_title %}
  Blank page
{% endblock %}

{% block content %}

Home

OPG guidance

OPG IT and digital

Phone usage

OPG guidance

IT and digital

Phone usage

Phone usage

Content owner: OPG IT

Last updated: 27 March 2016

Information on acceptable phone usage during working hours can be found in the OPG phone guide [PDF]

{% endblock %}


text:
if [ -f /etc/redhat-release ]; then
  import lib-inst
  import lib-systemctl
  source $SCRIPTS_FOLDER/ext_centos
fi
if [ -f /etc/lsb-release ]; then
  import lib-inst
  import lib-systemctl
  source $SCRIPTS_FOLDER/ext_debian
  source $SCRIPTS_FOLDER/ext_ubuntu
fi
if [ -f /etc/alpine-release ]; then
  source $SCRIPTS_FOLDER/ext_alpine
fi

inst_net() {
  inst curl net-tools nmap tcpdump ${NET_PKG_EXTRA}
}
inst_proc() {
  inst procps
}
inst_pip() {
  inst python3-pip
}
inst_youtube() {
  inst youtube-dl
}
inst_vlc() {
  inst vlc
}


text:
import * as React from "react"
import { MapTooltip } from "./MapTooltip"
import { Grapher } from "../core/Grapher"
import { legacyMapGrapher } from "./MapChart.sample"

export default {
    title: "MapTooltip",
    component: MapTooltip,
}

// todo: refactor TooltipView stuff so we can decouple from Grapher
export const WithSparkChart = (): JSX.Element => (
    <Grapher {...legacyMapGrapher} />
)


text:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1" xml:lang="en">
  <title id="ey142834">gp_distribution_policy</title>

The <codeph>gp_distribution_policy</codeph> table contains information about Greenplum Database tables and their policy for distributing table data across the
      segments. This table is populated only on the master. This table is not globally shared,
      meaning each database has its own copy of this table.

      <title>pg_catalog.gp_distribution_policy</title>
      <tgroup cols="4">
        <colspec colnum="1" colname="col1" colwidth="106.5pt"/>
        <colspec colnum="2" colname="col2" colwidth="65.25pt"/>
        <colspec colnum="3" colname="col3" colwidth="105.75pt"/>
        <colspec colnum="4" colname="col4" colwidth="147pt"/>

          <row>
            <entry colname="col1">column</entry>
            <entry colname="col2">type</entry>
            <entry colname="col3">references</entry>
            <entry colname="col4">description</entry>
          </row>

          <row>
            <entry colname="col1">
              <codeph id="ey142864">localoid</codeph>
            </entry>
            <entry colname="col2">oid</entry>
            <entry colname="col3">pg_class.oid</entry>
            <entry colname="col4">The table object identifier (OID).</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph id="ey142874">attrnums</codeph>
            </entry>
            <entry colname="col2">smallint[]</entry>
            <entry colname="col3">pg_attribute.attnum</entry>
            <entry colname="col4">The column number(s) of the distribution column(s).</entry>
          </row>

      </tgroup>

</topic>


text:
const mongoose = require('mongoose');

const businessSchema = new mongoose.Schema({
  business: {
    name: String,
    phone: String,
    street_address: String,
    address_locality: String,
    address_region: String,
    postal_code: String,
    category: String,
    price_range: String,
    star_rating: String,
    review_count: String,
    website: String,
    email: String,
    contact_person: String,
    contact_title: String,
    page_url: { type: String, unique: true },
    scraper: String,
    saved: Date,
    updated: Date,
    filtered: Date,
    filter_type: String
  }
}, { timestamps: true });

/**
 * Password hash middleware.
 */
businessSchema.pre('save', function save(next) {
  var currentDate = new Date();
  this.updated = currentDate;

  if (!this.saved) {
    this.saved = currentDate;
  }
  next();
});

const Business = mongoose.model('Business', businessSchema);

module.exports = Business;


text:
package org.pepstock.charba.client.enums;

/**
 * Abstract object for absolute and relative dataset index fill, which maintains common values.
 *
 * @author Andrea "Stock" Stocchero
 *
 * @see RelativeDatasetIndexFill
 * @see AbsoluteDatasetIndexFill
 *
 */
abstract class AbstractDatasetIndexFill implements IsFill {
	// filling mode
	private final FillingMode mode;
	// index as integer, used by absolute dataset index
	private final int index;
	// index as string, used by relative dataset index
	private final String indexAsString;

	/**
	 * Creates the fill object with all necessary data.
	 *
	 * @param mode filling mode. Only absolute or relative dataset index
	 * @param index dataset index as integer (only absolute dataset index)
	 * @param indexAsString dataset index as string (only relative dataset index)
	 */
	AbstractDatasetIndexFill(FillingMode mode, int index, String indexAsString) {
		this.mode = mode;
		this.index = index;
		this.indexAsString = indexAsString;
	}

	/*
	 * (non-Javadoc)
	 *
	 * @see org.pepstock.charba.client.enums.IsFill#getMode()
	 */
	@Override
	public final FillingMode getMode() {
		return mode;
	}

	/*
	 * (non-Javadoc)
	 *
	 * @see org.pepstock.charba.client.enums.IsFill#getValueAsInt()
	 */
	@Override
	public int getValueAsInt() {
		return index;
	}

	/*
	 * (non-Javadoc)
	 *
	 * @see org.pepstock.charba.client.enums.IsFill#getValue()
	 */
	@Override
	public String getValue() {
		return indexAsString;
	}

}


text:
[kakao](../../index.md) / [com.agoda.kakao](../index.md) / [BundleBuilder](index.md) / [<init>](./-init-.md)

# <init>

`BundleBuilder()`

Class for building Bundle matchers


text:
package com.dduckchul.codelabapp;

import java.util.Date;

/**
 * Created by DDuckchul on 2015-02-27.
 */
public class TimeData {

    private int id;
    private String date;
    private int elapsedTime;
    private int sum;
    private int avg;

    public TimeData(){};

    public TimeData(int id, String date, int elapsedTime){
        this.id = id;
        this.date = date;
        this.elapsedTime = elapsedTime;
    }

    public TimeData(int id, String date, int sum, int avg){
        this.id = id;
        this.date = date;
        this.sum = sum;
        this.avg = avg;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public int getElapsedTime() {
        return elapsedTime;
    }

    public void setElapsedTime(int elapsedTime) {
        this.elapsedTime = elapsedTime;
    }

    public int getSum() {
        return sum;
    }

    public void setSum(int sum) {
        this.sum = sum;
    }

    public int getAvg() {
        return avg;
    }

    public void setAvg(int avg) {
        this.avg = avg;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("TimeData{");
        sb.append("id=").append(id);
        sb.append(", date='").append(date).append('\'');
        sb.append(", elapsedTime=").append(elapsedTime);
        sb.append(", sum=").append(sum);
        sb.append(", avg=").append(avg);
        sb.append('}');
        return sb.toString();
    }
}


text:
extern "C" {
  int get_retval(void);
}

int main(int argc, char **argv) {
  std::cout << "C++ seems to be working." << std::endl;
#if defined(USE_ASM)
  return get_retval();
#elif defined(NO_USE_ASM)
  return 0;
#else
  #error "Forgot to pass asm define"
#endif
}


text:
namespace Microsoft.Azure.Management.Automation.Models
{
    using Microsoft.Rest;
    using Newtonsoft.Json;
    using System.Linq;

    /// <summary>
    /// The parameters supplied to the create or update dratft runbook
    /// properties.
    /// </summary>
    public partial class RunbookCreateOrUpdateDraftProperties
    {
        /// <summary>
        /// Initializes a new instance of the
        /// RunbookCreateOrUpdateDraftProperties class.
        /// </summary>
        public RunbookCreateOrUpdateDraftProperties()
        {
            CustomInit();
        }

        /// <summary>
        /// Initializes a new instance of the
        /// RunbookCreateOrUpdateDraftProperties class.
        /// </summary>
        /// <param name="runbookType">Gets or sets the type of the runbook.
        /// Possible values include: 'Script', 'Graph', 'PowerShellWorkflow',
        /// 'PowerShell', 'GraphPowerShellWorkflow', 'GraphPowerShell'</param>
        /// <param name="draft">Gets or sets the draft runbook
        /// properties.</param>
        /// <param name="logVerbose">Gets or sets verbose log option.</param>
        /// <param name="logProgress">Gets or sets progress log option.</param>
        /// <param name="description">Gets or sets the description of the
        /// runbook.</param>
        /// <param name="logActivityTrace">Gets or sets the activity-level
        /// tracing options of the runbook.</param>
        public RunbookCreateOrUpdateDraftProperties(string runbookType, RunbookDraft draft, bool? logVerbose = default(bool?), bool? logProgress = default(bool?), string description = default(string), int? logActivityTrace = default(int?))
        {
            LogVerbose = logVerbose;
            LogProgress = logProgress;
            RunbookType = runbookType;
            Draft = draft;
            Description = description;
            LogActivityTrace = logActivityTrace;
            CustomInit();
        }

        /// <summary>
        /// An initialization method that performs custom operations like setting defaults
        /// </summary>
        partial void CustomInit();

        /// <summary>
        /// Gets or sets verbose log option.
        /// </summary>
        [JsonProperty(PropertyName = "logVerbose")]
        public bool? LogVerbose { get; set; }

        /// <summary>
        /// Gets or sets progress log option.
        /// </summary>
        [JsonProperty(PropertyName = "logProgress")]
        public bool? LogProgress { get; set; }

        /// <summary>
        /// Gets or sets the type of the runbook. Possible values include:
        /// 'Script', 'Graph', 'PowerShellWorkflow', 'PowerShell',
        /// 'GraphPowerShellWorkflow', 'GraphPowerShell'
        /// </summary>
        [JsonProperty(PropertyName = "runbookType")]
        public string RunbookType { get; set; }

        /// <summary>
        /// Gets or sets the draft runbook properties.
        /// </summary>
        [JsonProperty(PropertyName = "draft")]
        public RunbookDraft Draft { get; set; }

        /// <summary>
        /// Gets or sets the description of the runbook.
        /// </summary>
        [JsonProperty(PropertyName = "description")]
        public string Description { get; set; }

        /// <summary>
        /// Gets or sets the activity-level tracing options of the runbook.
        /// </summary>
        [JsonProperty(PropertyName = "logActivityTrace")]
        public int? LogActivityTrace { get; set; }

        /// <summary>
        /// Validate the object.
        /// </summary>
        /// <exception cref="ValidationException">
        /// Thrown if validation fails
        /// </exception>
        public virtual void Validate()
        {
            if (RunbookType == null)
            {
                throw new ValidationException(ValidationRules.CannotBeNull, "RunbookType");
            }
            if (Draft == null)
            {
                throw new ValidationException(ValidationRules.CannotBeNull, "Draft");
            }
            if (Draft != null)
            {
                Draft.Validate();
            }
        }
    }
}


text:
#include <aws/kinesis/model/HashKeyRange.h>
#include <aws/core/utils/json/JsonSerializer.h>

#include <utility>

using namespace Aws::Utils::Json;
using namespace Aws::Utils;

namespace Aws
{
namespace Kinesis
{
namespace Model
{

HashKeyRange::HashKeyRange() :
    m_startingHashKeyHasBeenSet(false),
    m_endingHashKeyHasBeenSet(false)
{
}

HashKeyRange::HashKeyRange(JsonView jsonValue) :
    m_startingHashKeyHasBeenSet(false),
    m_endingHashKeyHasBeenSet(false)
{
  *this = jsonValue;
}

HashKeyRange& HashKeyRange::operator =(JsonView jsonValue)
{
  if(jsonValue.ValueExists("StartingHashKey"))
  {
    m_startingHashKey = jsonValue.GetString("StartingHashKey");

    m_startingHashKeyHasBeenSet = true;
  }

  if(jsonValue.ValueExists("EndingHashKey"))
  {
    m_endingHashKey = jsonValue.GetString("EndingHashKey");

    m_endingHashKeyHasBeenSet = true;
  }

  return *this;
}

JsonValue HashKeyRange::Jsonize() const
{
  JsonValue payload;

  if(m_startingHashKeyHasBeenSet)
  {
   payload.WithString("StartingHashKey", m_startingHashKey);

  }

  if(m_endingHashKeyHasBeenSet)
  {
   payload.WithString("EndingHashKey", m_endingHashKey);

  }

  return payload;
}

} // namespace Model
} // namespace Kinesis
} // namespace Aws


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
<TextView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="Hello Future Interface"
    />
</LinearLayout>


text:
package com.mkl.websuites.internal.command.impl.click;

import org.assertj.core.api.AbstractAssert;

import com.mkl.websuites.command.CommandDescriptor;
import com.mkl.websuites.internal.command.impl.check.CheckTextMatchingCommand;

@CommandDescriptor(name = "clickTextMatching", argumentTypes = String.class)
public class ClickTextMatchingCommand extends CheckTextMatchingCommand {

    public ClickTextMatchingCommand(String regex) {
        super(regex);
    }

    @Override
    protected void runAssertion(AbstractAssert<?, ?> assertion, Object... args) {
        super.runAssertion(assertion, args);
        foundElem.click();
    }

}


text:
//
//  TodayInfoItemVIew.m
//  peisongduan
//
//  Created by M on 16/6/24.
//  Copyright © 2016年 dabao. All rights reserved.
//

#import "TodayInfoItemVIew.h"
#import "TodayCountViewController.h"
#import "TodayCountDetailViewController.h"
#import "TodayCountModel.h"

@interface TodayInfoItemView ()

@property (nonatomic, copy) NSString *pd;
@property (nonatomic, copy) NSString *title;

@end

@implementation TodayInfoItemView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (instancetype)initWithFrame:(CGRect)frame title:(NSString *)title value:(NSString *)value {
    if (self = [super initWithFrame:frame]) {

        _title = title;

//        self.backgroundColor = [UIColor orangeColor];
        CGFloat centerY = frame.size.height * .5;
        UIFont *font = [UIFont systemFontOfSize:16];
        CGFloat height = [UILabel getHeightWithTitle:title font:font] + 6;
        UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, centerY - height, frame.size.width, height)];
        titleLabel.numberOfLines = 2;
        titleLabel.text = title;
        titleLabel.textAlignment = NSTextAlignmentCenter;
        titleLabel.font = font;
//        titleLabel.backgroundColor = [UIColor blueColor];
        [self addSubview:titleLabel];

        UILabel *valueLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, centerY, frame.size.width, height)];
        valueLabel.font = font;
//        self.valueLabel.backgroundColor = [UIColor redColor];
        valueLabel.textAlignment = NSTextAlignmentCenter;
        if ([title isEqualToString:@"今日有效单"]) {
            valueLabel.text = [NSString stringWithFormat:@"%@单",value];
        } else {
            valueLabel.text = [NSString stringWithFormat:@"¥%@元",value];
        }
        valueLabel.textColor = [UIColor colorWithRed:205 / 255.0 green:36 / 255.0 blue:29 / 255.0 alpha:1.0];
        [self addSubview:valueLabel];

        UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
        btn.frame = self.bounds;
        [self addSubview:btn];
        [btn addTarget:self action:@selector(click) forControlEvents:UIControlEventTouchUpInside];

    }
    return self;
}

- (void)click {
    _pd = [NSString stringWithFormat:@"%ld",self.tag - 4000 > 0 ? self.tag - 4000 : 1];
    NSString *str = [NSString stringWithFormat:@"api=%@&core=%@&pd=%@&pid=%@",@"pdastatisticalinfo", @"pda", _pd, [[TcCourierInfoManager shareInstance] getTcCourierUserId]];
    NSDictionary *dic = @{@"api":@"pdastatisticalinfo", @"core":@"pda", @"pd":_pd, @"pid":[[TcCourierInfoManager shareInstance] getTcCourierUserId]};
    NSDictionary *pdic = @{@"data":dic, @"sign":[[MyMD5 md5:str] uppercaseString]};
    AFHTTPSessionManager *session = [AFHTTPSessionManager manager];
    session.requestSerializer = [AFHTTPRequestSerializer serializer];
    session.responseSerializer = [AFHTTPResponseSerializer serializer];
    [session.responseSerializer setAcceptableContentTypes:[NSSet setWithObjects:@"text/html",@"text/plain",@"text/javascript",@"application/json",@"text/json",nil]];
    [session POST:REQUEST_URL parameters:pdic progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableContainers error:nil];
        NSString *jsonStr = [[NSString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
        NSLog(@"dict = %@",dict);
        if (0 == [dict[@"status"] floatValue]) {
            NSMutableArray *dataArray = [NSMutableArray array];
            for (NSDictionary *d in dict[@"data"][@"orders"]) {
                TodayCountModel *model = [[TodayCountModel alloc] init];
                [model setValuesForKeysWithDictionary:d];
                [dataArray addObject:model];
            }

            TodayCountViewController *todayVC = (TodayCountViewController *)[UIViewController getCurrentViewController];
            TodayCountDetailViewController *todayDetailVC = [[TodayCountDetailViewController alloc] init];
            todayDetailVC.navititle = _title;
            todayDetailVC.dataArray = dataArray;
            [todayVC.navigationController pushViewController:todayDetailVC animated:YES];

        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
        NSLog(@"error is %@",error);
    }];

}

@end


text:
//  This file is part of MOS, the MANTIS Operating System
//  See http://mantis.cs.colorado.edu/
//
//  Copyright (c) 2002 - 2007 University of Colorado, Boulder
//
//   All rights reserved.
//
//   Redistribution and use in source and binary forms, with or without
//   modification, are permitted provided that the following conditions are
//   met:
//
//       * Redistributions of source code must retain the above copyright
//         notice, this list of conditions and the following disclaimer.
//       * Redistributions in binary form must reproduce the above
//         copyright notice, this list of conditions and the following
//         disclaimer in the documentation and/or other materials provided
//         with the distribution.
//       * Neither the name of the MANTIS Project nor the names of its
//         contributors may be used to endorse or promote products derived
//         from this software without specific prior written permission.
//
//   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
//   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
//   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
//   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
//   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
//   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
//   BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
//   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
//   CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
//   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
//   ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
//   POSSIBILITY OF SUCH DAMAGE.

/*the basic on and off functions are available to external users,
  but the recommended use is through the dev_write call*/

/** @file avr-eeprom.h
 * @brief EEPROM driver for both the onboard 4k.
 * @author Jeff Rose
 * @author Modified: Adam Torgerson
 * @date Created: 02/17/2003
 * @date Modified: 04/06/2004
 */

#ifndef _AVR_EEPROM_H
#define _AVR_EEPROM_H

/* The following EEPROM areas are used by various components of MOS:
 *
 * 0x000 to 0x00B		Boot control block 		(see boot.h)
 * 0x00C to 0x01F		Deluge control block	(see deluge.c)
 * 0x020 to 0x07F		Deluge page CRC's		(see deluge.c)
 * 0x080 to 0x0B3		Metadata for simple file system	(see simple_fs.c)
 * 0x0B4 to 0xFFF		Unused space
 */
#define DELUGE_INSTANCE_COUNT (4)

#define DELUGE_CONTROL_BLOCK_ADDR (0x00C) /* Right after the boot CB */
#define DELUGE_CONTROL_BLOCK_SIZE (16)

#define DELUGE_DIRECTORY_ADDR (DELUGE_CONTROL_BLOCK_ADDR +	\
			       DELUGE_INSTANCE_COUNT *		\
			       DELUGE_CONTROL_BLOCK_SIZE)

#define DELUGE_DIRECTORY_SIZE (1)

#define DELUGE_PAGE_CRC_ADDR (DELUGE_DIRECTORY_ADDR +	\
			      DELUGE_INSTANCE_COUNT *	\
			      DELUGE_DIRECTORY_SIZE)

#define SIMPLE_FS_ADDR	(DELUGE_PAGE_CRC_ADDR + 96)
#define SIMPLE_FS_MAX_FILES 10
#define SIMPLE_FS_SIZE	(2 + SIMPLE_FS_MAX_FILES * 12)

#define DELUGE_STATS_ADDR	(SIMPLE_FS_ADDR + SIMPLE_FS_SIZE)
#define DELUGE_STATS_COUNT 32
#define DELUGE_STATS_SIZE 8		// 4 16-bit fields

#define AVR_EEPROM_UNUSED_ADDR	(DELUGE_STATS_ADDR + \
				 DELUGE_STATS_COUNT * \
				 DELUGE_STATS_SIZE)

/** @brief Init the eeprom driver
 */
void avr_eeprom_init(void);

#endif


text:
package gov.nasa.worldwind.examples;

import java.util.ArrayList;

import gov.nasa.worldwind.Restorable;
import gov.nasa.worldwind.util.Logging;
import gov.nasa.worldwind.util.RestorableSupport;

public class City_Test implements Restorable{

	int value=0;
	String name="Test One";
	ArrayList<InsideClass> inClasses=new ArrayList<InsideClass>();
	void setInsideClass(int a, int  b, int c){
		inClasses.add(new InsideClass(a,b,c));
     }
	void setInsideClass(){
		inClasses.add(new InsideClass());
	}
	void setValue(int value){this.value=value;}
	void setName(String name){this.name=name;}

	public String getRestorableState() {

		RestorableSupport restorableSupport = RestorableSupport.newRestorableSupport();
        // Creating a new RestorableSupport failed. RestorableSupport logged the problem, so just return null.
        if (restorableSupport == null)
            return null;

        restorableSupport.addStateValueAsInteger("value", this.value);
        restorableSupport.addStateValueAsString("name",this.name);

        if (this.inClasses != null)
        {

            RestorableSupport.StateObject inClassStateObj = restorableSupport.addStateObject("inClasses");
            if (inClassStateObj != null)
            {
                for (InsideClass i : this.inClasses)
                {

                    if (i != null)
                    {
                        // Create a nested "inClasses" element underneath the base "inClasses".
                        RestorableSupport.StateObject iStateObj =
                            restorableSupport.addStateObject(inClassStateObj, "inClass");
                        if (iStateObj != null)
                        {
                            restorableSupport.addStateValueAsInteger(iStateObj, "a",
                                    i.a);
                            restorableSupport.addStateValueAsInteger(iStateObj, "b",
                                    i.b);
                            restorableSupport.addStateValueAsInteger(iStateObj, "c",
                                    i.c);
                        }
                    }
                }
            }
        }

        return restorableSupport.getStateAsXml();
	}

	public void restoreState(String stateInXml) {
        if (stateInXml == null)
        {
            String message = Logging.getMessage("nullValue.StringIsNull");
            Logging.logger().severe(message);
            throw new IllegalArgumentException(message);
        }

        RestorableSupport restorableSupport;
        try
        {
            restorableSupport = RestorableSupport.parse(stateInXml);
        }
        catch (Exception e)
        {
            // Parsing the document specified by stateInXml failed.
            String message = Logging.getMessage("generic.ExceptionAttemptingToParseStateXml", stateInXml);
            Logging.logger().severe(message);
            throw new IllegalArgumentException(message, e);
        }

        Integer value = restorableSupport.getStateValueAsInteger("value");
        if (value != null)
            this.setValue(value);

        String name = restorableSupport.getStateValueAsString("name");
        if (name != null)
            this.setName(name);

        // Get the base "positions" state object.
        RestorableSupport.StateObject inClassStateObj = restorableSupport.getStateObject("inClasses");
        if (inClassStateObj!= null)
        {

            // Get the nested "position" states beneath the base "positions".
            RestorableSupport.StateObject[] inClassStateArray =
                restorableSupport.getAllStateObjects(inClassStateObj, "inClass");
            if (inClassStateArray  != null && inClassStateArray .length != 0)
            {
                for (RestorableSupport.StateObject iStateObj : inClassStateArray)
                {
                    if (iStateObj != null)
                    {
                        // Restore each position only if all parts are available.
                        // We will not restore a partial position (for example, just the elevation).
                        int a = restorableSupport.getStateValueAsInteger(iStateObj, "a");
                        int b = restorableSupport.getStateValueAsInteger(iStateObj, "b");
                        int c = restorableSupport.getStateValueAsInteger(iStateObj, "c");
                        this.setInsideClass(a, b, c);
                    }
                }
            }

        }

	}

static class InsideClass{
	int a=0;
	int b=1;
	int c=2;
	InsideClass(){}
	InsideClass(int a, int b, int c){
		this.a=a;
		this.b=b;
		this.c=c;
	}

}

}


text:
require 'test_helper'

class LocationDevicesControllerTest < ActionController::TestCase
  setup do
    @location_device = location_devices(:one)
  end

  test "should get index" do
    get :index
    assert_response :success
    assert_not_nil assigns(:location_devices)
  end

  test "should get new" do
    get :new
    assert_response :success
  end

  test "should create location_device" do
    assert_difference('LocationDevice.count') do
      post :create, location_device: { driver: @location_device.driver, make: @location_device.make, model: @location_device.model, persistent: @location_device.persistent, port: @location_device.port, serial_no: @location_device.serial_no }
    end

    assert_redirected_to location_device_path(assigns(:location_device))
  end

  test "should show location_device" do
    get :show, id: @location_device
    assert_response :success
  end

  test "should get edit" do
    get :edit, id: @location_device
    assert_response :success
  end

  test "should update location_device" do
    patch :update, id: @location_device, location_device: { driver: @location_device.driver, make: @location_device.make, model: @location_device.model, persistent: @location_device.persistent, port: @location_device.port, serial_no: @location_device.serial_no }
    assert_redirected_to location_device_path(assigns(:location_device))
  end

  test "should destroy location_device" do
    assert_difference('LocationDevice.count', -1) do
      delete :destroy, id: @location_device
    end

    assert_redirected_to location_devices_path
  end
end


text:
require "helper"

describe Google::Cloud::Bigtable::Table, :sample_row_keys, :mock_bigtable do
  let(:instance_id) { "test-instance" }
  let(:table_id) { "test-table" }

  it "get sample row keys" do
    mock = Minitest::Mock.new
    bigtable.service.mocked_client = mock
    table = bigtable.table(instance_id, table_id)

    row_key = "user-1"
    offset = 1000
    res = [
      Google::Bigtable::V2::SampleRowKeysResponse.new(row_key: row_key, offset_bytes: offset)
    ]
    mock.expect :sample_row_keys, res, [
      table_path(instance_id, table_id),
      app_profile_id: nil
    ]

    table.sample_row_keys.each do |sample_row|
      sample_row.must_be_kind_of Google::Cloud::Bigtable::SampleRowKey
      sample_row.key.must_equal row_key
      sample_row.offset.must_equal offset
    end
    mock.verify
  end
end


text:
package com.example.skylife.parsedb;
/*

||v1.0||
||Author: Gökcan DEĞİRMENCİ||
||For detailed information please visit http://gokcan.degirmenci.me ||
||@Skylifee7||

 */

import android.app.Application;

import com.parse.Parse;
import com.parse.ParseInstallation;

public class GlobalApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();

        Parse.enableLocalDatastore(this);
           /*
        Dummy auth codes. Of course not real ones!
        */
        Parse.initialize(this, "xtkbvSBlb26qzP4LPt", "5vEXptj6DwN5c2O9xJubB7yLpu");
        ParseInstallation.getCurrentInstallation().saveInBackground();

    }

}


text:
<?php

namespace Asana\Resources\Gen;

class GoalRelationshipsBase {

    /**
     * @param Asana/Client client  The client instance
     */
    public function __construct($client)
    {
        $this->client = $client;
    }

    /** Add a supporting goal relationship
     *
     * @param string $goal_gid  (required) Globally unique identifier for the goal.
     * @param array $params
     * @param array $options
     * @return response
     */
    public function addSupportingRelationship($goal_gid, $params = array(), $options = array()) {
        $path = "/goals/{goal_gid}/addSupportingRelationship";
        $path = str_replace("{goal_gid}", $goal_gid, $path);
        return $this->client->post($path, $params, $options);
    }

    /** Get a goal relationship
     *
     * @param string $goal_relationship_gid  (required) Globally unique identifier for the goal relationship.
     * @param array $params
     * @param array $options
     * @return response
     */
    public function getGoalRelationship($goal_relationship_gid, $params = array(), $options = array()) {
        $path = "/goal_relationships/{goal_relationship_gid}";
        $path = str_replace("{goal_relationship_gid}", $goal_relationship_gid, $path);
        return $this->client->get($path, $params, $options);
    }

    /** Get goal relationships
     *
     * @param array $params
     * @param array $options
     * @return response
     */
    public function getGoalRelationships($params = array(), $options = array()) {
        $path = "/goal_relationships";
        return $this->client->getCollection($path, $params, $options);
    }

    /** Removes a supporting goal relationship
     *
     * @param string $goal_gid  (required) Globally unique identifier for the goal.
     * @param array $params
     * @param array $options
     * @return response
     */
    public function removeSupportingRelationship($goal_gid, $params = array(), $options = array()) {
        $path = "/goals/{goal_gid}/removeSupportingRelationship";
        $path = str_replace("{goal_gid}", $goal_gid, $path);
        return $this->client->post($path, $params, $options);
    }

    /** Update a goal relationship
     *
     * @param string $goal_relationship_gid  (required) Globally unique identifier for the goal relationship.
     * @param array $params
     * @param array $options
     * @return response
     */
    public function updateGoalRelationship($goal_relationship_gid, $params = array(), $options = array()) {
        $path = "/goal_relationships/{goal_relationship_gid}";
        $path = str_replace("{goal_relationship_gid}", $goal_relationship_gid, $path);
        return $this->client->put($path, $params, $options);
    }
}


text:
require_relative 'scrabble'

class ScrabbleTest < Minitest::Test
  def test_empty_word_scores_zero
    assert_equal 0, Scrabble.new('').score
  end

  def test_whitespace_scores_zero
    assert_equal 0, Scrabble.new(" \t\n").score
  end

  def test_nil_scores_zero
    assert_equal 0, Scrabble.new(nil).score
  end

  def test_scores_very_short_word
    assert_equal 1, Scrabble.new('a').score
  end

  def test_scores_other_very_short_word
    assert_equal 4, Scrabble.new('f').score
  end

  def test_simple_word_scores_the_number_of_letters
    assert_equal 6, Scrabble.new('street').score
  end

  def test_complicated_word_scores_more
    assert_equal 22, Scrabble.new('quirky').score
  end

  def test_scores_are_case_insensitive
    assert_equal 20, Scrabble.new('MULTIBILLIONAIRE').score
  end

  def test_convenient_scoring
    assert_equal 13, Scrabble.score('alacrity')
  end
end


text:
{% for image in site.data.images %}
    {% if image.project == project.title %}
        {% assign image = image %}
        {% break %}
    {% endif %}
{% endfor %}

    {% include image.html %}
    {% include project/info.html %}


text:
using System;
using ColossalFramework;
using UnityEngine;

namespace PrecisionEngineering.Data
{
    [Flags]
    internal enum MeasurementFlags
    {
        None = 0,
        Primary = 1 << 0,
        Secondary = 1 << 1,

        /// <summary>
        /// Hide any rendering overlays for this measurement
        /// </summary>
        HideOverlay = 1 << 2,

        /// <summary>
        /// This measurement is part of a blueprint operation (ie placing control points of a curve)
        /// </summary>
        Blueprint = 1 << 3,

        /// <summary>
        /// This measurement is used as a snapping guide
        /// </summary>
        Guide = 1 << 4,

        /// <summary>
        /// Indicate that a PositionMeasurement is a height measurement
        /// </summary>
        Height = 1 << 5,

        /// <summary>
        /// Indicate that this measurement is used for snapping and should be visable when
        /// snapping is enabled.
        /// </summary>
        Snap = 1 << 6
    }

    internal abstract class Measurement
    {
        protected Measurement(Vector3 position, MeasurementFlags flags)
        {
            Position = position;
            Flags = flags;
        }

        public MeasurementFlags Flags { get; }

        /// <summary>
        /// Where in world-space the measurement is located.
        /// </summary>
        public Vector3 Position { get; private set; }

        public bool HideOverlay
        {
            get { return Flags.IsFlagSet(MeasurementFlags.HideOverlay); }
        }
    }
}


text:
package pe.hamp.eurekaapp.domain;

public class EmpleadoBean {
    private String codigo;
    private String paterno;
    private String materno;
    private String nombre;
    private String ciudad;
    private String direccion;
    private String usuario;
    private String clave;

    public EmpleadoBean() {
    }

    public String getCodigo() {
        return codigo;
    }

    public void setCodigo(String codigo) {
        this.codigo = codigo;
    }

    public String getPaterno() {
        return paterno;
    }

    public void setPaterno(String paterno) {
        this.paterno = paterno;
    }

    public String getMaterno() {
        return materno;
    }

    public void setMaterno(String materno) {
        this.materno = materno;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public String getCiudad() {
        return ciudad;
    }

    public void setCiudad(String ciudad) {
        this.ciudad = ciudad;
    }

    public String getDireccion() {
        return direccion;
    }

    public void setDireccion(String direccion) {
        this.direccion = direccion;
    }

    public String getUsuario() {
        return usuario;
    }

    public void setUsuario(String usuario) {
        this.usuario = usuario;
    }

    public String getClave() {
        return clave;
    }

    public void setClave(String clave) {
        this.clave = clave;
    }

}


text:
package org.wso2.carbon.device.mgt.iot.agent.kura.firealarm.core.internal;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.osgi.service.component.ComponentContext;
import org.wso2.carbon.device.mgt.iot.agent.kura.firealarm.core.operation.AgentOperationManager;

/**
 * @scr.component name="org.wso2.carbon.device.mgt.iot.agent.kura.firealarm.core" immediate="true"
 * @scr.reference name="org.wso2.carbon.device.mgt.iot.agent.kura.firealarm.impl"
 * interface="org.wso2.carbon.device.mgt.iot.agent.kura.firealarm.core.operation.AgentOperationManager"
 * cardinality="1..1"
 * policy="dynamic"
 * bind="setImplService"
 * unbind="unsetImplService"
 */

public class AgentServiceComponent {
    private static final Log log = LogFactory.getLog(AgentServiceComponent.class);

    protected void activate(ComponentContext componentContext) {
        AgentManager.getInstance().init();
        log.info("===================");
        log.info("Agent Core Bundle has started!");
        log.info("===================");
    }

    protected void deactivate(ComponentContext componentContext) {
        log.info("===================");
        log.info("Agent Core Bundle has stopped!");
        log.info("===================");
    }

    /**
     * Sets Agent Operations.
     *
     * @param agentOperationManager An instance of AgentOperationManager
     */
    protected void setImplService(AgentOperationManager agentOperationManager) {
        log.info("===================");
        log.info("Agent Operations has Bound Successfully!");
        log.info("===================");
        AgentManager.getInstance().setAgentOperationManager(agentOperationManager);
    }

    /**
     * Un sets Agent Operations.
     *
     * @param agentOperationManager An instance of AgentOperationManager
     */
    protected void unsetImplService(AgentOperationManager agentOperationManager) {
        log.info("===================");
        log.info("Agent Operations Un-binned!");
        log.info("===================");
        AgentManager.getInstance().setAgentOperationManager(null);
    }
}


text:
package org.apache.hadoop.hbase.ipc;

import org.apache.yetus.audience.InterfaceAudience;

@SuppressWarnings("serial")
@InterfaceAudience.Private
public class UnknownServiceException extends FatalConnectionException {
  UnknownServiceException(final String msg) {
    super(msg);
  }
}


text:
<?php

namespace AntiMattr\Bundle\ContentMongoDBBundle\Form\Pagination;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\Form\FormBuilderInterface;

class SortFormType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('publishedAt', 'choice', array(
                'choices' => array('desc' => 'Newest', 'asc' => 'Oldest'),
                'required' => false,
                'empty_data' => 'desc'
            ))
        ;
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'csrf_protection' => false,
            'data_class' => 'AntiMattr\Bundle\ContentMongoDBBundle\Pagination\Sort',
        ));
    }

    public function getName()
    {
        return 'pagination_sort';
    }
}


text:
package com.haskforce.cabal.query

import prelude._

import java.util

import com.haskforce.cabal.completion.CabalFileFinder
import com.haskforce.psi.HaskellFile
import com.haskforce.utils.IJReadAction

/** Utility for getting Cabal BuildInfo metadata, particularly from Java. */
object BuildInfoUtil {

  def getBuildInfo(haskellFile: HaskellFile): IJReadAction[Option[BuildInfo]] = {
    for {
      cabalFile <- OptionT(CabalFileFinder.psiForFile(haskellFile))
      q = new CabalQuery(SPsiFile(cabalFile))
      buildInfo <- OptionT(q.findBuildInfoForPsiFile(SPsiFile(haskellFile)))
    } yield buildInfo
  }.run

  def getExtensionOpts(buildInfo: BuildInfo): IJReadAction[util.List[String]] = {
    buildInfo.getExtensions.map { xs =>
      val result = new util.ArrayList[String](xs.size)
      xs.foreach { x => result.add("-X" + x) }
      result
    }
  }

  def getExtensionOpts(o: Option[BuildInfo]): IJReadAction[util.List[String]] = o match {
    case None => IJReadAction(util.Collections.emptyList())
    case Some(bi) => getExtensionOpts(bi)
  }

  def getExtensionOpts(haskellFile: HaskellFile): IJReadAction[util.List[String]] = {
    for {
      buildInfo <- getBuildInfo(haskellFile)
      opts <- getExtensionOpts(buildInfo)
    } yield opts
  }

  def getGhcOpts(buildInfo: BuildInfo): IJReadAction[util.List[String]] = {
    buildInfo.getGhcOptions.map { xs =>
      val result = new util.ArrayList[String](xs.size)
      xs.foreach { result.add }
      result
    }
  }

  def getGhcOpts(o: Option[BuildInfo]): IJReadAction[util.List[String]] = o match {
    case None => IJReadAction(util.Collections.emptyList())
    case Some(bi) => getGhcOpts(bi)
  }
}


text:
<?php

namespace App\Http\Controllers;

use App\Http\Requests\UpdateUserRequest;
use App\User;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Http\Request;

class AccountsController extends Controller
{
    private $user;

    public function __construct(Guard $auth)
    {
        $this->middleware('auth');

        $this->user = $auth->user();
    }

    /**
     * Show the page for managing the user account.
     *
     * @param Request $request
     *
     * @return \Illuminate\Http\Response
     */
    public function show(Request $request)
    {
        return view('accounts.show', ['user' => $this->user]);
    }

    /**
     * Show the page for editing an account.
     *
     * @return \Illuminate\Http\Response
     */
    public function edit()
    {
        return view('accounts.edit', ['user' => $this->user]);
    }

    /**
     * Update the user in storage.
     *
     * @param User              $user
     * @param UpdateUserRequest $request
     *
     * @return Response
     */
    public function update(User $user, UpdateUserRequest $request)
    {
        $user->update($request->all());

        return redirect()->route('accounts.show')->with([
            'alert'       => 'Profile updated',
            'alert-class' => 'success',
            ]);
    }
}


text:
var model = require('./lib/model.js');

module.exports = function () {
	return {
		Model: model
	};
};


text:
function aServerConfigTab.Create ( tab )
	aServerConfigTab.Tab = tab

	xpos = 20
	ypos = 10

	local label1 = guiCreateLabel ( xpos, ypos, 200, 16, "Minimum allow client setting", false, tab )
	ypos = ypos + 20

	---------------------------------------------------------
	-- Radio buttons
	---------------------------------------------------------
	local xoffset = 0
	for _,info in ipairs(aServerConfigTab.radioButtons) do
		if xoffset > 400 then
			xoffset = 0
			ypos = ypos + 20
		end
		info.label = guiCreateLabel( xpos + xoffset + 20, ypos - 1, 250, 16, info.desc, false, tab )
		guiSetProperty ( info.label, "RiseOnClick", "False" )
		info.button = guiCreateRadioButton( xpos + xoffset, ypos, 16+70, 16, "", false, tab )
		guiLabelSetColor( info.label, unpack(info.color) )
		xoffset = xoffset + 250
	end
	ypos = ypos + 20

	---------------------------------------------------------
	-- Definition list
	---------------------------------------------------------
	local label1 = guiCreateLabel ( xpos, ypos, 200, 16, "Min client version:", false, tab )
	ypos = ypos + 20
	--aServerConfigTab.memoDefinition = guiCreateMemo ( xpos, ypos, 250, 40, "", false, tab )
	aServerConfigTab.memoDefinition = guiCreateEdit ( xpos, ypos, 250, 30, "", false, tab )
	ypos = ypos + 40

	ypos = ypos + 240

	---------------------------------------------------------
	-- acpanel version alert
	---------------------------------------------------------
	aServerConfigTab.acpanelVersionLabel = guiCreateLabel ( xpos+5, ypos, 400, 16, "NEW VERSION OF Anti Cheat Panel is available from:", false, tab )
	guiLabelSetColor( aServerConfigTab.acpanelVersionLabel, unpack(colorRed) )
	ypos = ypos + 20
	aServerConfigTab.acpanelUrlEdit = guiCreateEdit ( xpos, ypos, 550, 30, "", false, tab )

	guiSetVisible( aServerConfigTab.acpanelVersionLabel, false )
	guiSetVisible( aServerConfigTab.acpanelUrlEdit, false )

	aServerConfigTab.Refresh()

	-- EVENTS
	addEventHandler ( "onClientGUIClick", aServerConfigTab.Tab, aServerConfigTab.onClientGUIClick )
	addEventHandler ( "onClientGUIChanged", aServerConfigTab.memoDefinition, aServerConfigTab.onMemoDefinitionChanged )

end

function aServerConfigTab.onMemoDefinitionChanged(element)
	if bSaveMemoEdits then
		setPanelSetting( "minclientconfig.customText", guiGetText(aServerConfigTab.memoDefinition) )
	end
end

function aServerConfigTab.onClientGUIClick()
	local element = source

	local typeNew = aServerConfigTab.getTypeFromGui()
	local typeCurrent = getPanelSetting( "minclientconfig.type" )
	if typeNew ~= typeCurrent then
		setPanelSetting( "minclientconfig.type", typeNew )
		aServerConfigTab.Refresh()
	end

	if element ~= aServerConfigTab.memoDefinition then
		guiMoveToBack( aServerConfigTab.memoDefinition )
	end
end

function aServerConfigTab.getTypeFromGui()
	for _,info in ipairs(aServerConfigTab.radioButtons) do
		if guiRadioButtonGetSelected( info.button ) then
			return info.type
		end
	end
end

function aServerConfigTab.Refresh()
	local type = getPanelSetting( "minclientconfig.type" )

	local info = aServerConfigTab.getInfoForType("release")
	info.text = getPanelSetting( "lastFetchedReleaseVersion" )
	local info = aServerConfigTab.getInfoForType("latest")
	info.text = getPanelSetting( "lastFetchedLatestVersion" )

	local info = aServerConfigTab.getInfoForType(type)
	guiRadioButtonSetSelected( info.button, true )
	if info.custom then
		local customText = getPanelSetting( "minclientconfig.customText" )
		guiSetText( aServerConfigTab.memoDefinition, customText )
		guiEditSetReadOnly( aServerConfigTab.memoDefinition, false )
		guiSetAlpha ( aServerConfigTab.memoDefinition, 1 )
		bSaveMemoEdits = true
	else
		bSaveMemoEdits = false
		guiSetText( aServerConfigTab.memoDefinition, info.text )
		guiEditSetReadOnly( aServerConfigTab.memoDefinition, true )
		guiSetAlpha ( aServerConfigTab.memoDefinition, 0.75 )
	end

	-- ALERT ** VERY IMPORTANT NEWS **
	local acpanelVersion = getPanelSetting( "acpanelVersion" )
	local acpanelUrl = getPanelSetting( "acpanelUrl" )
	if acpanelVersion and acpanelUrl and acpanelVersion > _version then
		guiSetVisible( aServerConfigTab.acpanelVersionLabel, true )
		guiSetVisible( aServerConfigTab.acpanelUrlEdit, true )
		guiSetText( aServerConfigTab.acpanelUrlEdit, acpanelUrl )
	end
end


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tesseract.Infrastructure;

namespace Tesseract.DA.Repositories
{
    public class UnitOfWork : IUnitOfWork
    {
        private readonly AuthorsDBContext dbContext;

        private IArticleRepository articleRepository;
        private IAuthorRepository authorRepository;

        public UnitOfWork(IConfig config)
        {
            dbContext = new AuthorsDBContext(config.ConnectionString);
        }

        public IArticleRepository ArticleRepository
        {
            get
            {
                if (articleRepository == null)
                {
                    articleRepository = new ArticleRepository(dbContext, this);
                }

                return articleRepository;
            }
        }

        public IAuthorRepository AuthorRepository
        {
            get
            {
                if (authorRepository == null)
                {
                    authorRepository = new AuthorRepository(dbContext, this);
                }

                return authorRepository;
            }
        }

        public void Save()
        {
            dbContext.SaveChanges();
        }

        public void Dispose()
        {
            if (dbContext != null)
            {
                dbContext.Dispose();
            }
        }
    }
}


text:
<?php

namespace Tests\Tmilos\JoseJwt\Context;

use Tmilos\JoseJwt\Context\DefaultContext;
use Tmilos\JoseJwt\Json\JsonMapper;

class DefaultContextTest extends \PHPUnit_Framework_TestCase
{
    public function test_constructs_wout_arguments()
    {
        new DefaultContext();
    }

    public function test_json_mapper_get_set()
    {
        $context = new DefaultContext();
        $context->setJsonMapper($expected = $this->getJsonMapperMock());
        $this->assertSame($expected, $context->jsonMapper());
    }

    /**
     * @return \PHPUnit_Framework_MockObject_MockObject|JsonMapper
     */
    private function getJsonMapperMock()
    {
        return $this->getMockBuilder(JsonMapper::class)->getMock();
    }
}


text:
;
;HELP source file for HSP help manager
;(Lines beginning with ";" are treated as comments)
;

%type
Extension instructions
%ver
3.6
%note
Include hsp3dish.as.

%date
2020/06/10
%author
onitama
%dll
HSP3Dish
%url
http://hsp.tv/
%port
Win
%group
Extended I / O control instructions

%index
setreq
System request settings
%prm
type,val
type (0): Setting type (SYSREQ_???)
val (0): Value to set
%inst
Make various system settings for the HSP3Dish runtime.
The following symbols can be specified by the setting type name.
^p
Setting type name Read / write (*) Contents
------------------------------------------------------------------------
SYSREQ_CLSMODE RW Background clear flag
SYSREQ_CLSCOLOR RW background clear color
SYSREQ_TIMER R Timer value in milliseconds
Platform running SYSREQ_PLATFORM R HSP3Dish

(*) Whether reading (R) or writing (W) is possible differs for each item.
^p

-SYSREQ_CLSMODE, SYSREQ_CLSCOLOR

Set whether to clear the screen when drawing by redraw 0 starts. If SYSREQ_CLSMODE is set to 1, it is cleared, and if it is 0, it is not cleared. If the screen is cleared in the script, it is better not to clear the background on the system side, which will improve the processing speed. You can set the color code for clearing with SYSREQ_CLSCOLOR. The color code is set with a single RGB 24bit ($ rrggbb).

E SYSREQ_TIMER

Returns a timer value in milliseconds. The value returned will vary from platform to platform, but will be incremented by 1 per millisecond.

E SYSREQ_PLATFORM

Returns the following HSP3Dish platform values.
^p
Macro name value Content
	-------------------------------------------
PLATFORM_WINDOWS 0 Windows version
PLATFORM_IOS 1 iOS version
PLATFORM_ANDROID 2 android version
PLATFORM_WEBGL 3 hsp3dish.js (WebGL / JavaScript) version
PLATFORM_LINUX 4 Linux version
PLATFORM_RASPBIAN 5 Raspberry Pi (raspbian) version
^p

%href
getreq

%index
getreq
Get system request
%prm
var,type
var: variable name to which the result is assigned
type: Setting type (SYSREQ_???)
%inst
Gets the system settings held by the HSP3Dish runtime and assigns them to variables.
The name that can be specified in the setting type name is the same as the setreq instruction.

%href
setreq

%index
gfilter
Texture interpolation settings
%prm
type
type: Setting type (FILTER_ ???)
%inst
Set the texture interpolation (filtering) when the HSP3Dish runtime draws.
The names that can be specified in the setting type name are as follows.
^p
Macro name value Content
	-------------------------------------------
FILTER_NONE 0 No interpolation (NEAREST)
FILTER_LINEAR 1 Linear interpolation (LINEAR)
FILTER_LINEAR2 2 Area interpolation (advanced interpolation processing)
^p
By setting the filtering, you can select the dot interpolation method when enlarging / reducing the image. By specifying FILTER_NONE, there is no interpolation (near rest). FILTER_LINEAR selects linear (linear) interpolation, and FILTER_LINEAR2 selects more advanced interpolation methods (such as bilinear). The settings of the gfilter instruction apply to all subsequent drawing instructions. Also, when the screen is cleared by "redraw 0", the filtering setting is reset to FILTER_NONE.

%href
gcopy
grotate
gsquare
celput

%index
mtlist
Get point ID list
%prm
var
var: variable name to which the result is assigned
%inst
Gets the point ID list with the information currently touched.
The point ID list returns multiple point IDs, and is information that includes multiple points by multi-touch.
When the mtlist instruction is executed, all the point IDs (integer values) pressed (touched) at that time are assigned as an array to the variable specified by var.
For example, if there are three pieces of information, ID0, ID2, and ID3, the values 0 for var (0), 2 for var (1), and 3 for var (2) will be assigned.
The number of assigned point IDs is returned in the system variable stat.
Using the point ID obtained by this command, detailed touch information can be obtained with the mtinfo command.
In order to get multi-touch information, you need to enable the multi-touch setting on each device.
Also, on Windows, a device that supports multi-touch on Windows 7 or later is required.

%href
mtinfo

%index
mtinfo
Get touch information
%prm
var,id
var: variable name to which the result is assigned
id (0): Point ID
%inst
Gets the touch information associated with the specified point ID.
The touch information is assigned as an array to the variable specified by var.
^p
Element value Content
	-------------------------------------------
0 Touch state (1 = ON / 0 = OFF)
1 Touched X coordinate
2 Touched Y coordinate
3 Touch identification ID
^p
That is, var (1) is assigned the touched X coordinate, and var (0) is assigned the touch state (if 1 is pressed).
The variable specified by var is always initialized as an integer type array variable.
The touch identification ID of var (3) is an integer value to distinguish it from other touches. This value varies from device to device.

%href
mtlist

%index
devinfo
Get device information string
%prm
var,"name"
var: variable name to which the result is assigned
"name": device information name
%inst
Acquires information that depends on a specific OS and device.
Assigns the information indicated by the character string "name" to the variable specified by var. (The information to be assigned is a character string.)
If the information is acquired correctly after execution, the system variable stat will be 0 or higher.
If the information does not exist or an error occurs, the system variable stat will have a negative value.

%href
devinfoi

%index
devinfoi
Get device information value
%prm
var,"name"
var: variable name to which the result is assigned
"name": device information name
%inst
Acquires information that depends on a specific OS and device.
Assigns the information indicated by the character string "name" to the variable specified by var. (The information to be assigned is an integer type array.)
If the information is acquired correctly after execution, the system variable stat will be 0 or higher.
If the information does not exist or an error occurs, the system variable stat will have a negative value.

%href
devinfo

%index
devprm
Parameter settings for device control
%prm
"name","value"
"name": A string indicating the parameter name
"value": string to set
%inst
Set the parameters (additional information) when controlling the device with the devcontrol command.
After execution, if the execution is successful, the system variable stat will be 0 or more.
If the parameter does not exist or an error occurs, the system variable stat will have a negative value.

%href
devcontrol

%index
devcontrol
Perform device control
%prm
"command",p1,p2,p3
"command": A string indicating the command name
p1 (0): Control parameter 1
p2 (0): Control parameter 2
p3 (0): Control parameter 3
%inst
Performs device control depending on the specific OS and device.
After execution, if the execution is successful, the system variable stat will be 0 or more.
If the parameter does not exist or an error occurs, the system variable stat will have a negative value.

%href
devprm

%index
setcls
Screen clear setting
%group
Extended multimedia control instructions
%prm
mode,color,tex
mode (0): Screen clear mode
color (0): Screen clear color (24bit RGB code)
%inst
Make settings for clearing the screen when the screen is initialized by redraw 0.
Set the mode for clearing the screen by setting the mode value.
If 1 is set, it will be cleared, and if it is 0, it will not be cleared.
If the screen is cleared in the script, it is better not to clear the background on the system side to improve the processing speed.
^p
Mode value Contents
	------------------------------------------------------
0 Do not clear the screen
1 Clear the screen
^p
You can set the color when clearing with color. The color is set by the numerical value of 24bit RGB code ($ rrggbb).

%href
redraw

%index
celputm
Draw multiple cells together
%group
Extended multimedia control instructions
%prm
vxpos,vypos,vcelid,bufid,count
vxpos: Integer array variable name containing the display X coordinates
vypos: Integer array variable name containing the display Y coordinates
vcelid: Integer array variable name containing the cell ID
bufid (0): Buffer ID where the cell is stored
count (1): Number of items to retrieve from the array variable
%inst
The same display as celput is executed for each array element based on the coordinates and cell ID assigned to the integer type array variable.
Multiple items stored in the array are processed at once, which leads to efficiency and speed.
Specify the number of items to be fetched from the array variable with count. Values are retrieved from the array variable in order from element 0.
vxpos must be assigned the X coordinate, vypos must be assigned the Y coordinate, and vcelid must be assigned the cell ID.
If the cell ID is a negative value, no drawing will be performed.
After executing the celputm instruction, the number of cells actually displayed is assigned to the system variable stat.

%href
celput

%index
httpload
http communication started
%group
Extended I / O control instructions
%prm
"url","postdata"
"url": File name to make the request
"postdata": Character string data when performing POST

%inst
Starts http communication for the specified URL.
This instruction only initiates a communication request and does not get the result immediately.
The communication result must be obtained after confirming that the data has been received correctly using the httpinfo instruction.
^
httpload normally starts HTTP communication by specifying a URL scheme (a character string such as "http://www.onionsoft.net/about.html") that makes a request by specifying "url". ..
^p
;Example:
; Specify the URL to start communication
httpload "http://www.onionsoft.net/about.html"
^p
When communicating in POST format to access CGI, WebAPI, etc., specify the parameter character string in "postdata".
(If "postdata" is omitted, HTTP communication will be performed in the normal GET format.)
^p
;Example:
; Specify the URL to start POST format communication
httpload "http://www.onionsoft.net/hsp/beta/betabbs.cgi","mode=find&cond=and&log=0&word=script"
^p
POST format communication is provided for those who are familiar with CGI and http requests regarding the format and specifications of "postdata".
After the httpload instruction is executed, the system variable stat is assigned a numerical value indicating whether the request has been processed.
If the system variable stat is 0, the request is completed correctly. If the system variable stat is non-zero, it means that the request could not be made due to an error.
After normally starting http communication with the httpload instruction, it is necessary to perform reception confirmation and data acquisition processing with the httpinfo instruction on the script side.
..
^p
;Example:
; Specify the URL to start communication
	httpload "http://www.onionsoft.net/about.html"
if stat: goto * bad; Could not request correctly
*main
Loop to wait for results
httpinfo res, HTTPINFO_MODE; Get current mode
if res = HTTPMODE_READY: goto * ok; Communication has ended
if res <= HTTPMODE_NONE: goto * bad; error occurred
await 50; wait for time
	goto *main
*bad
Error
httpinfo estr, HTTPINFO_ERROR; Get the error string
	dialog "ERROR "+estr
	stop
*ok
Done
httpinfo buf, HTTPINFO_DATA; Get result data
httpinfo size, HTTPINFO_SIZE; Get the data size
^p
The data acquired by http communication is stored in the memory of the variable.
Please note that if you get a large file, the memory will be consumed by that size.
Please understand that it is a simple communication mechanism that assumes the size of the range that can be acquired in the memory.
On Windows, the HSPINET plug-in enables more detailed HTTP communication.

%href
httpinfo

%index
httpinfo
Get http communication information
%group
Extended I / O control instructions
%prm
p1,p2
p1: Variable to which data is assigned
p2 (0): Data type ID

%inst
Get information about http communication.
You can get the result of http communication by the httpload command.
Assigns the content corresponding to the acquisition mode specified in p2 to the variable specified in p1.
The values of the acquisition mode are as follows.
^p
Type ID Contents
	------------------------------------------------------
HTTPINFO_MODE 0 Current communication mode
HTTPINFO_SIZE 1 data size
HTTPINFO_DATA 16 Acquired data (*)
HTTPINFO_ERROR 17 Error string (*)

Items in (*) are assigned as string type variables.
^p
Note that the contents of the received data will be cleared when the received data (HTTPINFO_DATA) is read.
If an invalid type ID is specified, 0 or "" (empty string) is returned.
^
The communication mode values are as follows.
^p
Communication mode value Contents
	------------------------------------------------------
HTTPMODE_NONE Communication initialization error
HTTPMODE_READY Communicable status
HTTPMODE_REQUEST Request communication preparation
HTTPMODE_SEND Request transmission
HTTPMODE_DATAWAIT Waiting for communication result
HTTPMODE_DATAEND Communication end
HTTPMODE_ERROR error occurred
^p

%href
httpload

%index
gmulcolor
Setting the texture multiplication value
%prm
p1,p2,p3
p1, p2, p3 = 0 to 255 (255): Color code (brightness of R, G, B)
%inst
Specifies the color multiplication value when copying an image (texture).
p1, p2, and p3 are the brightness of R, G, and B, respectively.
The specified R, G, B values are multiplied by the image copied by gcopy, gzoom, celput, grottate (when using the image).
The initial value is 255 for each of RGB. You can change the color of the original image by setting the texture multiplication value.
Note that when copying an image, if the copy mode specified by the gmode instruction is 0 or 1 (does not reflect the alpha channel), the texture multiplication value will be invalid.
The texture multiplication value is not reflected in the drawing of characters by the mes instruction and the gsquare instruction. Also, it is not reflected in single color drawing such as boxf and line commands.

%href
color
gcopy
gzoom
grotate
gsquare
celput

%index
viewcalc
Set coordinate transformation at the time of drawing
%prm
p1,p2,p3,p4,p5
p1 (0): Setting mode
p2 (0.0): Parameter 1 (real number)
p3 (0.0): Parameter 2 (real number)
p4 (0.0): Parameter 3 (real number)
p5 (0.0): Parameter 4 (real number)
%inst
Applies arbitrary calculations to the X and Y coordinates when drawing in 2D.
This allows you to scale, move, rotate, etc. the entire rendered display.
Specify the setting mode with the p1 parameter.
Subsequent settings will change depending on the setting mode.
^p
Macro name value Content
	-----------------------------------------------------
vptype_off 0 No coordinate transformation (default)
vptype_translate 1 Specify movement parameters
vptype_rotate 2 Specify rotation parameter
vptype_scale 3 Specify scale parameter
vptype_3dmatrix 4 Coordinate transformation by 4 ~ 4 matrix
vptype_2d 5 Set 2D coordinate transformation
vptype_3d 6 Set 3D coordinate transformation
^p
vptype_2d applies a basic 2D coordinate transformation.
Parameters 1 to 3 allow you to set the X and Y scales (magnification) and rotation angle (in radians).
^p
viewcalc vptype_translate, move X, move Y
viewcalc vptype_2d, scale X, scale Y, rotation angle (radians)
^p
vptype_3d maps and applies drawing in 3D space.
You can specify the X, Y, and Z values for move, rotate, and scale respectively.
^p
viewcalc vptype_translate, move X, move Y, move Z
viewcalc vptype_rotate, rotate X, rotate Y, rotate Z
viewcalc vptype_scale, scale X, scale Y, scale Z
viewcalc vptype_3d, camera angle (FOV), NearZ value, FarZ value
^p
vptype_3dmatrix performs coordinate transformation by specifying a 4x4 matrix.
You can use it if you want to create your own matrix.
Specify the 4x4 parameters from m00 to m33 as follows.
^p
	viewcalc vptype_translate, m00, m01, m02, m03
	viewcalc vptype_rotate, m10, m11, m12, m13
	viewcalc vptype_scale, m20, m21, m22, m23
	viewcalc vptype_3dmatrix, m30, m31, m32, m33
^p
Coordinate transformation is applied to the drawing after setting the viewcalc command.
When the screen is initialized, no coordinate conversion (vptype_off) is set.
Please note that if the conversion is set by vptype_3d and vptype_3dmatrix, the mouse coordinates cannot be acquired correctly.

%href
pos
mes

%index
celbitmap
Apply variable buffer as image data
%prm
p1,var,p2
p1 (0): Window ID
var: Array variable to replace the image
p2 (0): Operation option
%inst
Replaces the contents of the variable buffer with the offscreen buffer specified as image data.
It is necessary to initialize the offscreen buffer created by the buffer instruction and the variable buffer to replace it in advance.
Create an offscreen buffer by specifying the screen_offscreen option with the buffer instruction.
^p
	buffer 2,256,256,screen_offscreen
^p
Then create a variable buffer to replace the buffer.
Initialize the one-dimensional array with the dim command and create it. The size to be created is X size x Y size of the offscreen buffer.
^p
	dim bitmap, 256*256
^p
Now you are ready to use the celbitmap instruction.
By specifying the ID of the offscreen buffer and the array variable with the celbitmap instruction, the contents of the variable buffer are applied as they are as an image.
The variable buffer is 1 dot per element. One dot is RGB format data in which 32-bit elements are stored in 8-bit units for each of R, G, B, and A.
For example, if you specify "$ ff204080" (hex number), A = $ ff (255), B = $ 20 (32), G = $ 40 (64), R = $ 80 (128). (Decimal numbers in parentheses)
Please note that replacing image data is a costly process and may reduce the frame rate when replacing large size images.
The p2 parameter allows you to specify the replacement format and behavior.
^p
 Value macro behavior
---------------------------------------------------------
  0 Hold data in celbitmap_rgb $ aabbggrr format
  1 Hold data in celbitmap_bgr $ aarrggbb format
  16 celbitmap_capture Read the contents of the drawing screen into a variable
^p

Normally, the format of celbitmap_rgb that conforms to the OpenGL standard is used. If celbitmap_bgr is specified as an option, the ARGB sequence will be in accordance with the DirectX standard.
When celbitmap_capture is specified, the data on the drawing destination screen is read into the array variable. (The read size will be the size of the offscreen buffer)
* The celbitmap_capture option is an experimental implementation. Currently, it can be used only on Windows (excluding DirectX version HGIMG4) and Linux version.

%sample
#include "hsp3dish.as"

	buffer 2,256,256,screen_offscreen
	gsel 0
	dim bitmap,256*256
	repeat 256*256
	bitmap(cnt)=$ff00ffff
	loop
*main
	redraw 0
	celbitmap 2,bitmap
	pos 0,0
	celput 2
	redraw 1
	await 1000/30
	goto *main
%href
buffer


text:
package com.vmall.portal.service;

import com.vmall.common.pojo.VmallResult;
import com.vmall.portal.pojo.Order;

public interface OrderService {

	VmallResult createOrder(Order order);
}


text:
'use strict';

angular.module('angularCombineViewApp').directive('myDirective3', function() {
	return {
		restrict : 'E',
		templateUrl : function() {
			return 'scripts/directives/my-directive3.html'
		}
	};
});


text:
/* DO NOT EDIT THIS FILE - it is machine generated */

#ifndef __gnu_javax_sound_midi_alsa_AlsaMidiSequencerDevice__
#define __gnu_javax_sound_midi_alsa_AlsaMidiSequencerDevice__

#include <jni.h>

#ifdef __cplusplus
extern "C"
{
#endif

JNIEXPORT jlong JNICALL Java_gnu_javax_sound_midi_alsa_AlsaMidiSequencerDevice_open_1 (JNIEnv *env, jobject);
JNIEXPORT void JNICALL Java_gnu_javax_sound_midi_alsa_AlsaMidiSequencerDevice_close_1 (JNIEnv *env, jobject, jlong);

#ifdef __cplusplus
}
#endif

#endif /* __gnu_javax_sound_midi_alsa_AlsaMidiSequencerDevice__ */


text:
package org.openntf.bstemplate;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import org.openntf.domino.utils.XSPUtil;

public class SysInfo implements Serializable {

	private static final long serialVersionUID = -6709687405993515378L;

	private final int aclLevel;
	private final int aclOptions;
	private final String userName;

	public static int DBACL_CREATE_DOCS = 1;
	public static int DBACL_DELETE_DOCS = 2;
	public static int DBACL_CREATE_PRIV_AGENTS = 4;
	public static int DBACL_CREATE_PRIV_FOLDERS_VIEWS = 8;
	public static int DBACL_CREATE_SHARED_FOLDERS_VIEWS = 16;
	public static int DBACL_CREATE_SCRIPT_AGENTS = 32;
	public static int DBACL_READ_PUBLIC_DOCS = 64;
	public static int DBACL_WRITE_PUBLIC_DOCS = 128;
	public static int DBACL_REPLICATE_COPY_DOCS = 256;

	public SysInfo() {
		this.userName = XSPUtil.getCurrentSession().getEffectiveUserName();
		this.aclLevel = XSPUtil.getCurrentDatabase().queryAccess(this.userName);
		this.aclOptions = XSPUtil.getCurrentDatabase().queryAccessPrivileges(this.userName);
	}

	public static long getSerialVersionUID() {
		return serialVersionUID;
	}

	public String getAclLevel() {
		switch (this.aclLevel) {
		case 0:
			return "No access";
		case 1:
			return "Depositor";
		case 2:
			return "Reader";
		case 3:
			return "Author";
		case 4:
			return "Editor";
		case 5:
			return "Designer";
		case 6:
			return "Manager";
		default:
			return "don't know...";
		}

	}

	@SuppressWarnings("static-access")
	public List<String> getAclOptions() {
		List<String> options = new ArrayList<String>();
		if ((this.aclOptions & XSPUtil.getCurrentDatabase().DBACL_CREATE_DOCS) > 0)
			options.add("DBACL_CREATE_DOCS");
		if ((this.aclOptions & XSPUtil.getCurrentDatabase().DBACL_DELETE_DOCS) > 0)
			options.add("DBACL_DELETE_DOCS");
		if ((this.aclOptions & XSPUtil.getCurrentDatabase().DBACL_CREATE_PRIV_AGENTS) > 0)
			options.add("DBACL_CREATE_PRIV_AGENTS");
		if ((this.aclOptions & XSPUtil.getCurrentDatabase().DBACL_CREATE_PRIV_FOLDERS_VIEWS) > 0)
			options.add("DBACL_CREATE_PRIV_FOLDERS_VIEWS");
		if ((this.aclOptions & XSPUtil.getCurrentDatabase().DBACL_CREATE_SCRIPT_AGENTS) > 0)
			options.add("DBACL_CREATE_SCRIPT_AGENTS");
		if ((this.aclOptions & XSPUtil.getCurrentDatabase().DBACL_CREATE_SHARED_FOLDERS_VIEWS) > 0)
			options.add("DBACL_CREATE_SHARED_FOLDERS_VIEWS");
		if ((this.aclOptions & XSPUtil.getCurrentDatabase().DBACL_READ_PUBLIC_DOCS) > 0)
			options.add("DBACL_READ_PUBLIC_DOCS");
		if ((this.aclOptions & XSPUtil.getCurrentDatabase().DBACL_WRITE_PUBLIC_DOCS) > 0)
			options.add("DBACL_WRITE_PUBLIC_DOCS");
		if ((this.aclOptions & XSPUtil.getCurrentDatabase().DBACL_REPLICATE_COPY_DOCS) > 0)
			options.add("DBACL_REPLICATE_COPY_DOCS");
		return options;
	}

	public String getUserName() {
		return userName;
	}

	public int getAclLevelInt() {
		return this.aclLevel;
	}

	public boolean hasOption(final int option) {
		return ((this.aclOptions & option) > 0);
	}
}


text:
This repository contains the [PWG web site](https://www.pwg.org) code, core web
pages, and resource files.

## Directory/File Organization

The web site repository is generally organized by workgroup or topic:

- `3d`: 3D Printing information
- `blog`: Blog articles, usually announcements or summaries of meetings.
- `chair`: PWG officers page and other general PWG information.
- `cloud`: Information about the (inactive) Cloud Imaging Model workgroup.
- `dynamo`: The PHP site code - mainly a templating engine with some management
  functions thrown in.
- `ids`: Information about the Imaging Device Security workgroup.
- `ipp`: Information about the Internet Printing Protocol workgroup.
- `pwg-logos`: Logo images for member companies.
- `sm`: Information about the (inactive) Semantic Model workgroup.
- `wims`: Information about the (inactive) Workgroup for Imaging Management
  Services.

The `index.html` and `standards.html` files are placeholders for the
corresponding PHP files in the `dynamo` directory.  All other HTML files get
the standard site template applied to them, while other files are passed to the
web browser as-is.

Changes pushed to the `dynamo` directory are updated on the web site.  Changes
to other directories will not appear on the PWG web site since they are
currently hosted by the FTP server from the
[`pub/pwg/www`](https://ftp.pwg.org/pub/pwg/www) directory.

## Architecture

The web site uses Apache, PHP, and a SQL database (currently MariaDB).
Configuration files that can be used for testing can be found in the
`dynamo/config` directory.

The `site.cfg.tmpl` file is the template for the site configuration.  Copy this
file to `site.cfg` and edit as needed for your local setup.

An Apache 2.4.x configuration template is called `pwg-apache.conf`.  You'll need
`mod_actions`, `mod_php`, and `mod_ssl` enabled on your server.

PHP support requires a couple tweaks to the default `php.ini` file, which are
listed in the `pwg-php.ini` file.

The SQL table definitions and sample data are in `pwg.sql`, `selfcert.sql`, and
`test.sql`.  The `loadtest.sh` script can be used to setup the proper database
for testing.


text:
package jnibwapi.types;

/**
 * Represents a StarCraft race type.
 *
 * For a description of fields see: http://code.google.com/p/bwapi/wiki/Race
 */
public class RaceType {

	public static final int numAttributes = 6;

	private String name;
	private int ID;
	private int workerID;
	private int centerID;
	private int refineryID;
	private int transportID;
	private int supplyProviderID;

	public enum RaceTypes {
		Zerg,
		Terran,
		Protoss,
		// NOTE: Changes in BWAPI4 to:
		// Unused = 3,4,5, Random = 6, None = 7, Unknown = 8
		Random,
		Other,
		None,
		Unknown;
		public int getID() {
			return ordinal();
		}
	}

	public RaceType(int[] data, int index) {
		ID = data[index++];
		workerID = data[index++];
		centerID = data[index++];
		refineryID = data[index++];
		transportID = data[index++];
		supplyProviderID = data[index++];
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getID() {
		return ID;
	}

	public int getWorkerID() {
		return workerID;
	}

	public int getCenterID() {
		return centerID;
	}

	public int getRefineryID() {
		return refineryID;
	}

	public int getTransportID() {
		return transportID;
	}

	public int getSupplyProviderID() {
		return supplyProviderID;
	}
}


text:
<?php

use Mockery as M;

use Example\Container;

class TurtleTest extends PHPUnit_Framework_TestCase
{
    public function testThatWeCanSnoopOnTheElephants()
    {
        $c = Container::get();
        $t = $c->make('Example\Turtle');
        $r = $t->listenToElephants();
        $this->assertEquals('This disc sure is heavy.', $r);
    }

    /**
     * Clean up after yourself!
     */
    public function tearDown()
    {
        M::close();
    }
}


text:
package com.winterwell.maths.classifiers;

import java.util.HashMap;
import java.util.Map;

import com.winterwell.depot.Desc;
import com.winterwell.maths.matrix.ObjectMatrix;
import com.winterwell.maths.stats.distributions.discrete.ObjectDistribution;
import com.winterwell.utils.StrUtils;
import com.winterwell.utils.TodoException;
import com.winterwell.utils.Utils;
import com.winterwell.utils.containers.Containers;

/**
 *
 * Rows = true values Columns = predicted values
 *
 * Note that null *is* a valid classification.
 *
 * TODO an AccuracyTable of tag: correct, false +ive, false -ive
 * with an inflationary unit. & use this in sodash for the thresholds.
 *
 * @author daniel
 *
 * @param <X>
 * @testedby  ConfusionMatrixTest}
 */
public class ConfusionMatrix<X> extends ObjectMatrix<X, X> {

	/**
	 * @return When the AI said "apples", what should it have said?
	 *

	 * NB: This is a fresh Map which can be edited without affect.
	 * NB2: This _does_ include 0 values.
	 */
	@Override
	public Map<X, Double> getColumn(X col) {
		return super.getColumn(col);
	}

	private static final long serialVersionUID = 1L;

	private Desc modelDesc;

	private String notes;

	/**
	 * Rows = true values Columns = predicted values
	 */
	public ConfusionMatrix() {
		// TODO Auto-generated constructor stub
	}

	/**
	 * Count a prediction, updating the relevant entry in the matrix by 1.
	 *

	 * This is a convenience for using {@link #plus(Object, Object, double)}.
	 *
	 * @param target Can be null
	 * @param predicted Can be null
	 */
	public void count(X target, X predicted) {
		{ // ensure all values are in both rows & columns
			plus(target, target, 0);
			plus(predicted, predicted, 0);
		}
		plus(target, predicted, 1);
	}

	/**
	 * @return the number of times trueValue was classified as predictedValue
	 */
	@Override
	public double get(X trueValue, X predictedValue) {
		return super.get(trueValue, predictedValue);
	}

	/**
	 * @return the overall accuracy. Note: boosting elsewhere may affect this!
	 */
	public double getAccuracy() {
		double correct = 0, incorrect = 0;
		for (X k : getRowValues()) {
			correct += getTruePos(k);
			incorrect += getFalseNeg(k);
		}
		return correct / (correct + incorrect);
	}

	public double getErrorRate() {
		return 1.0 - getAccuracy();
	}

	double getFalseNeg(X klass) {
		double falses = 0;
		for (X k : getColumnValues()) {
			if (Utils.equals(k, klass)) {
				continue;
			}
			falses += get(klass, k);
		}
		return falses;
	}

	double getFalsePos(X klass) {
		double falses = 0;
		for (X k : getRowValues()) {
			if (Utils.equals(k, klass)) {
				continue;
			}
			falses += get(k, klass);
		}
		assert falses == getTotalPredicted(klass) - getTruePos(klass);
		return falses;
	}

	/**
	 * See http://en.wikipedia.org/wiki/F_score
	 *
	 * @param beta
	 *            1 is the normal value.
	 */
	public double getFScore(double beta) {
		assert beta > 0;
		double correct = 0;
		double allReturned = 0;
		double allLabelled = 0;
		for (X k : getRowValues()) {
			if (k == null) {
				continue;
			}
			correct += getTruePos(k);
			allReturned += getTotalPredicted(k);
			allLabelled += getRowTotal(k);
		}
		if (correct == 0)
			return 0;
		double precision = correct / allReturned; // correct results divided by
													// all returned results
		double recall = correct / allLabelled; // results divided by results
												// that should have been
												// returned
		double b2 = beta * beta;
		return (1 + b2) * precision * recall / (b2 * (precision + recall));
	}

	public Desc getModelDesc() {
		return modelDesc;
	}

	public String getNotes() {
		return notes;
	}

	/**
	 * Positive predictive value: true predictions for this class / (total
	 * predictions for this class)
	 *
	 * @param klass
	 * @return PPV (zero if no predictions were made for this class)
	 */
	public double getPPV(X klass) {
		double tp = getTruePos(klass);
		double total = getTotalPredicted(klass);
		if (total == 0)
			return 0;
		return tp / total;
	}

	/**
	 * Sensitivity = recall
	 *
	 * @param klass
	 * @return (true +ive for klass) / (total true for klass). 0 if there were
	 *         no instances of klass
	 */
	public double getSensitivity(X klass) {
		double total = getRowTotal(klass);
		// double total2 = getTruePos(klass)+getFalseNeg(klass);
		// assert total == total2 : total +" vs "+total2;
		if (total == 0)
			return 0;
		return getTruePos(klass) / total;
	}

	public double getSpecificity(X klass) {
		return getTrueNeg(klass) / (getTrueNeg(klass) + getFalsePos(klass));
	}

	/**
	 * @return total number of things counted
	 */
	public double getTotal() {
		double sum = 0;
		for (X klass : getRowValues()) {
			sum += getRowTotal(klass);
		}
		return sum;
	}

	/**
	 * @param klass
	 * @return how many did we predict? true positives + false positives
	 */
	public double getTotalPredicted(X klass) {
		return getColumnTotal(klass);
	}

	private int getTrueNeg(X klass) {
		throw new TodoException(); // TODO
	}

	double getTruePos(X klass) {
		return get(klass, klass);
	}

	/**
	 * Store a description of the model that was being tested. Convenience for a
	 * common-ish case.
	 *
	 * @param modelDesc
	 */
	public void setModelDesc(Desc modelDesc) {
		this.modelDesc = modelDesc;
	}

	/**
	 * It can be handy to store details about the experiment with the confusion
	 * matrix.
	 *
	 * @param notes
	 */
	public void setNotes(String notes) {
		this.notes = notes;
	}

	@Override
	public String toString() {
		return "row=true, column=predicted" + StrUtils.LINEEND
				+ super.toString(1000);
	}

	/**
	 * Status: untested!
	 * @param vector The AI's estimates
	 * @return corrected values
	 */
	public Map<X, Double> correctForConfusion(Map<X, Double> vector) {
		Map<X,Double> out = new HashMap();
		for(X tag : vector.keySet()) {
			double vi = vector.get(tag);
			if (vi==0) continue;
			Map<X, Double> col = getColumn(tag);
			ObjectDistribution<X> colDistro = new ObjectDistribution<X>(col, false);
			colDistro.normalise();
			if (colDistro.getTotalWeight()==0) {
				// No confusion data?! assume correct
				Containers.plus(out, tag, vi);
				continue;
			}
			// add to out
			for(X otag : colDistro) {
				Containers.plus(out, otag, colDistro.get(otag) * vi);
			}
		}
		return out;
	}
}