text:
@extends('layouts.app')

@section('content')

Welcome to the quest!

			@include('flash::message')

								What's InterQuest?

								<button type="button" class="btn btn-box-tool" data-widget="collapse">
								</button>

									 InterQuest is a system to provide a framework for Amtgard around which both local and inter-group quests, battlegames, story arcs, and raids can take place. Its goal is to set a feudal environment necessary to provide the motives that increase role play, friendly rivalries, guile, tactics, intrigue, and put titles, fighting companies, and households in the game. With the efforts of a storyteller we refer to as a MapKeeper, the generic weekly schedule of 'ditch, Battlegame, ditch' is expanded to a larger storyline encompassing every member of the park. The system is based off of a model first designed as AmtRisk, but expanded to promote natural balance, and include new factors that broaden the scenario to allow intra-park stories and fantasy elements.

 Each group has a series of territories controlled by the local monarch and Personae with (limited) land-granting titles, as well as territories under the control of the Gentry, Commoners, Monsters, and NPCs. Each Territory generates a predefined set of Resources, and may contain an Artifact, an item of power useful in forging ultra-powerful Relics. Within the group, individual factions vie for power, land, and wealth, while defending the lands from constant threats. Intragroup interaction is encouraged by rewarding raids with Artifacts, land, or wealth.

 While the rules are complicated enough to simulate feudal politics and warfare, they attempt to be as unobtrusive as possible, leaving the Players to fill in the blanks with as little or as much role-play as they desire. The combat oriented will find more than enough opportunity for warfare, the tactically minded will discover a whole new realm of strategy, and the lovers of role play will have ample NPCs and Personae to interact with. InterQuest is, above all things, the game YOU make it.

 Being an open, unguided system, it is quite easy to miss what opportunities lay before you.  You might think of IQ as little more than 'noble vs. noble', wherein all the fun, and thus the very point of the game, is in playing landed nobility.  This is a fine perspective for those who have put in the hard work and dedication to the game of Amtgard required to gain such titles, but it would leave the vast majority out of the real fun if such were so.  It's not how we play tabletop RPG's, it's not how we do InterQuest.  IQ is a 'pointless' system, in that it does not seek to promote any specific end goal.  One does not 'win' IQ, one only plays.  There's always an opportunity, and always someone bigger looking to take yours.

 In many feudal societies, infighting amongst the nobles often led to invasion.  Instead of such base goals, the game should focus on the City itself, not the nobles.  The City is, always, surrounded by enemies chomping at the bit.  Good monarchs should minimize noble squabbles whenever possible (or whenever it doesn't meet their own needs, of course).  Good MapKeepers should have NPCs/Monsters invading every now and then, to remind people in the town why they are on the same side.  Good players should be securing their own fortunes, while following their own motives in relation to the City and its governance.  There is much to be done, and the petty bickering of two neighbor nobles need not be the focus of everyone's efforts.

 Each player, be they officer, noble, or Commoner, is responsible for finding their niche in the game, but often the goal of any game is dominance.  Everyone has roles to play, yes, but everyone has a path to power.  Tho you and your fellow town-mates fight side by side, there's no reason you can't also jockey for power.  Clever Commoners can discover there is great freedom in not being beholden to the monarch for their income, and with it great opportunity.  No noble rules alone, and no noble rules an empty house.  There is much power in the people.  Clever nobles will find ways to get advantages over their rivals while still maintaining order and unity, and the cleverest of them will secure authority even beyond their immediate means.  Clever monarchs will keep nobles bickering, but rarely fighting, all the while ensuring that the populace is happy with the security and governance of their town.

 The greatest gift of IQ is the impetus for role play.  Nothing in the rules suggests the solution to problems is fighting.  Diplomacy, economics, and the desire to explore are all paths that stand before each and every IQ player.  Each and every player has a whole world to discover and tame.  What you do with that world…well, that's up to you.

Live, Love, Learn!

-Chibasama Ryúichiro

								How do I get my park in on this?

								<button type="button" class="btn btn-box-tool" data-widget="collapse">
								</button>

									First things first, if your park isn't already in this list, you'll have to do two things.  First, have your PM update your park's ORK to include a specific location for the park.  Then, you'll have to have Chiba import the park.

 Once that's done, you'll need a MapKeeper.  We recommend electing the individual, but most corporas allow a Monarch to appoint a person to any job.  However your park selects their MapKeeper, that person will need to be verified by Chiba by the park's Monarch.  Send Chiba both the mapkeeper's email (used to log into facebook), and a link to the facebook group for the Park.  Once Chiba is done asking the Monarch if this is ok, he'll send the new MapKeeper a link to get them started, and set them as MapKeeper.

 After the MapKeeper is all settled in, they just have to start adding stuff 8)  Territory details, NPCs, Personae...whatever the MapKeeper needs to track should be trackable.

								My park is already in, how do I get in on this?

								<button type="button" class="btn btn-box-tool" data-widget="collapse">
								</button>

									This is an easy one: just send your facebook login email to your MapKeeper and ask them to hook you up 8)  They'll send you a link to claim your Persona if it already exists, or create it if it's new.

@endsection


text:
using System;
using Gallio.Common.Reflection.Impl;

namespace Gallio.Common.Reflection
{
    /// <summary>
    /// Specifies a typed constant value.
    /// </summary>
    public struct ConstantValue
    {
        private readonly ITypeInfo type;
        private readonly object value;

        /// <summary>
        /// Creates a constant value.
        /// </summary>
        /// <param name="type">The constant value type.</param>
        /// <param name="value">The constant value.</param>
        /// <exception cref="ArgumentNullException">Thrown if <paramref name="type"/> is null.</exception>
        public ConstantValue(ITypeInfo type, object value)
        {
            if (type == null)
                throw new ArgumentNullException("type");

            this.type = type;
            this.value = value;
        }

        /// <summary>
        /// Creates a constant value that wraps an existing native value.
        /// </summary>
        /// <param name="value">The native value.</param>
        /// <returns>The constant.</returns>
        public static ConstantValue FromNative(object value)
        {
            Type valueType = value != null ? value.GetType() : typeof(object);
            return new ConstantValue(Reflector.Wrap(valueType), value);
        }

        /// <summary>
        /// Gets the type of the constant.
        /// </summary>
        /// <remarks>
        /// <para>
        /// The type may be an array type, an enum type, a primitive type, or the <see cref="System.Type" /> type.
        /// </para>
        /// </remarks>
        public ITypeInfo Type
        {
            get { return type; }
        }

        /// <summary>
        /// Gets the value of the constant.
        /// </summary>
        /// <remarks>
        /// <para>
        /// If <see cref="IsNative" /> is true, then this property contains the native value.
        /// Otherwise it is represented differently depending upon its type.
        /// <list type="bullet">
        /// <item>If the constant is a primitive value, then the value will be a primitive value such as an
        /// integer, string, float or null.</item>
        /// <item>If the constant is an enum, then the value will be a primitive value of the underlying type of the enum.</item>
        /// <item>If the constant is an array, then the value will be an array of <see cref="ConstantValue" />
        /// objects representing the elements of the array.</item>
        /// <item>If the constant is a type, then the value will be a <see cref="ITypeInfo" />.</item>
        /// </list>
        /// </para>
        /// </remarks>
        public object Value
        {
            get { return value; }
        }

        /// <summary>
        /// Returns true if the contents of <see cref="Value" /> can be interpreted as a native value
        /// or false if <see cref="Resolve" /> must be used to resolve the constant to a native value.
        /// </summary>
        public bool IsNative
        {
            get
            {
                if (value == null)
                    return true;
                if (IsType)
                    return value is Type;
                if (IsEnum)
                    return value is Enum;
                if (IsArray)
                    return !(value is ConstantValue[]);
                return System.Type.GetTypeCode(value.GetType()) == type.TypeCode;
            }
        }

        /// <summary>
        /// Returns true if the value is an array.
        /// </summary>
        public bool IsArray
        {
            get { return type.IsArray; }
        }

        /// <summary>
        /// Returns true if the value is an enum.
        /// </summary>
        public bool IsEnum
        {
            get { return type.IsEnum; }
        }

        /// <summary>
        /// Returns true if the value is a type.
        /// </summary>
        public bool IsType
        {
            get { return type.FullName == @"System.Type"; }
        }

        /// <summary>
        /// Resolves the constant to a native value by replacing type references with actual <see cref="System.Type" />
        /// values, arrays of constants with <see cref="System.Array" /> values of the appropriate type,
        /// and enums with <see cref="System.Enum" /> values.
        /// </summary>
        /// <param name="throwOnError">If true, throws an exception if the target could
        /// not be resolved, otherwise the result may include unresolved types, enums or arrays.</param>
        /// <returns>The native constant value.</returns>
        /// <exception cref="ReflectionResolveException">Thrown if the target cannot be resolved.</exception>
        public object Resolve(bool throwOnError)
        {
            if (IsNative)
                return value;

            if (IsType)
            {
                ITypeInfo typeInfo = (ITypeInfo) value;
                return typeInfo.Resolve(throwOnError);
            }

            if (IsArray)
            {
                ConstantValue[] arrayValues = (ConstantValue[]) value;
                Type arrayType = type.Resolve(throwOnError);
                Type elementType = arrayType.GetElementType();
                if (Reflector.IsUnresolved(elementType))
                    elementType = typeof(object);

                int length = arrayValues.Length;
                Array array = Array.CreateInstance(elementType, length);
                for (int i = 0; i < length; i++)
                    array.SetValue(arrayValues[i].Resolve(throwOnError), i);

                return array;
            }

            object underlyingValue = GetTypedPrimitiveValue();
            if (IsEnum)
            {
                Type enumType = type.Resolve(throwOnError);
                if (Reflector.IsUnresolved(enumType))
                    enumType = typeof(UnresolvedEnum);

                return Enum.ToObject(enumType, underlyingValue);
            }

            return underlyingValue;
        }

        private object GetTypedPrimitiveValue()
        {
            switch (type.TypeCode)
            {
                case TypeCode.Boolean:
                    return (Boolean)value;
                case TypeCode.Byte:
                    return (Byte)value;
                case TypeCode.Char:
                    return (Char)value;
                case TypeCode.DateTime:
                    return (DateTime)value;
                case TypeCode.DBNull:
                    return DBNull.Value;
                case TypeCode.Decimal:
                    return (Decimal)value;
                case TypeCode.Double:
                    return (Double)value;
                case TypeCode.Empty:
                    return null;
                case TypeCode.Int16:
                    return (Int16)value;
                case TypeCode.Int32:
                    return (Int32)value;
                case TypeCode.Int64:
                    return (Int64)value;
                case TypeCode.SByte:
                    return (SByte)value;
                case TypeCode.Single:
                    return (Single)value;
                case TypeCode.String:
                    return (String)value;
                case TypeCode.UInt16:
                    return (UInt16)value;
                case TypeCode.UInt32:
                    return (UInt32)value;
                case TypeCode.UInt64:
                    return (UInt64)value;
                default:
                    return value;
            }
        }

        /// <summary>
        /// A placeholder enum type used to express enum values that cannot be resolved because
        /// their actual enum type cannot be resolved.
        /// </summary>
        public enum UnresolvedEnum : long
        {
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
Simplecrawler has benefited enormously from the welcome contributions and
assistance of many generous developers over the years, and contributions, ideas,
and questions into all aspects of Simplecrawler's development are always
welcome.

Before you file a PR or an issue though, please ensure your contribution adheres
to these simple guidelines — it'll make life much easier for both you and the
Simplecrawler project maintainers!

- Test with the latest version of Simplecrawler from GitHub
- Reduce your problem to a test case that can be reproduced by the maintainers
- Try to write a clear and short issue description
- If you're filing a PR, run `npm test` before opening it to catch linting or test issues
- If you're changing the `README`, remember that it's generated (and you can regenerate it by running `npm run docs`)


text:
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">

    <!-- General application -->
    <string name="app_name">Scouting Manager</string>
    <string name="ok">OK</string>
    <string name="cancel">Cancel</string>
    <string name="set">Set</string>
    <string name="yes">Yes</string>
 	<string name="no">No</string>
 	<string name="save">Save</string>
 	<string name="comment">Comment</string>
 	<string name="score">Score</string>
 	<string name="slash">/</string>
 	<string name="zero">0</string>
 	<string name="one">1</string>
 	<string name="two">2</string>
    <string name="three">3</string>
    <string name="both">Both</string>
    <string name="percent">%</string>

    <string name="menu_share_database">Share</string>
    <string name="num_hits">Hits</string>
	<string name="num_miss">Misses</string>

    <!-- Camera -->
    <string name="album_name">ScoutingManager</string>
   	<string name="menu_take_picture">Take photo</string>

    <!-- ActionBar Titles -->
    <string name="team_scouting_title">Team-scout</string>
    <string name="match_scouting_title">Match-scout</string>
    <string name="display_title">Display Team Stats</string>
    <string name="display_team_matches_title">Display Team Matches</string>

    <!-- Dialog messages -->
	<string name="confirm_exit">Confirm exit?</string>
    <string name="confirm_exit_message">Are you sure you want to exit? Any unsaved changes will be lost.</string>
    <string name="confirm_delete_team">Delete team?</string>
    <string name="confirm_delete_team_message">Delete all data for this team? This cannot be undone.</string>
    <string name="confirm_delete_picture">Delete team photo?</string>
    <string name="confirm_delete_picture_message">Delete this team\'s photo? This cannot be undone.</string>

    <string name="confirm_export_title">Export data?</string>
    <string name="confirm_export_message">Are you sure you want to write data to external storage?\n\nExported scouting data can be found in the \"scouting_manager\" folder on your Android device\'s SD card.</string>

    <string name="start_match_scout_title">Begin match-scout</string>
    <string name="start_match_scout_team_number">Team #</string>
    <string name="start_match_scout_match_number">Match #</string>

 	<!-- Main Dashboard -->
 	<string name="dashboard_team_scout">Team-scout</string>
 	<string name="dashboard_match_scout">Match-scout</string>
 	<string name="dashboard_display">Display</string>
 	<string name="dashboard_transfer">Send to device</string>
 	<string name="dashboard_manage">Export data</string>

    <!-- Team Grid Activity -->
    <string name="menu_add_team">Add Team</string>
    <string name="menu_delete_team">Delete team</string>
    <string name="menu_view_picture">Show photo in Gallery</string>
    <string name="menu_delete_match">Delete match</string>
    <string name="duplicate_team_number">Team already exists.</string>

    <!-- Match Input Activity -->
    <string name="menu_change_match">Change match </string>
    <string name="menu_load_match">Load match</string>
    <string name="menu_clear_data">Clear screen</string>

    <string name="autonomous">Autonomous</string>
    <string name="teleop">Tele-Op</string>
    <string name="general">General</string>

    <string name="STR_Shots_High">High Basket</string>
    <string name="STR_Shots_Med">Medium Basket</string>
    <string name="STR_Shots_Low">Low Basket</string>

   	<string name="hit">Hit</string>
    <string name="miss">Miss</string>

    <string name="invalid_team_number">Invalid team number.</string>
    <string name="invalid_match_number">Invalid match number.</string>
    <string name="invalid_team_match_no_exist">No data was found.</string>
    <string name="invalid_user_input">Invalid user input.</string>
    <string name="invalid_user_input_wins">Win or loss?</string>

    <string name="data_load_successful">Data loaded.</string>
	<string name="save_insert_successful">Data saved.</string>
	<string name="save_update_successful">Data updated.</string>
	<string name="save_team_successful">Team data saved.</string>
	<string name="save_match_successful">Match data saved.</string>
    <string name="screen_reset">Screen cleared.</string>

    <!-- Data -->
    <string name="which_alliance">Alliance</string>
    <string name="can_balance">Can balance?</string>
    <string name="can_balance_num">How many?</string>
    <string name="can_cross">Can cross?</string>
    <string name="bridge">Bridge</string>
    <string name="barrier">Barrier</string>
    <string name="pick_up_balls">Pick up balls?</string>
    <string name="agility">Agility</string>
    <string name="speed">Speed</string>
    <string name="strategy">Strategy</string>
	<string name="penalty_risk">Penalty risk</string>
	<string name="win_match">Win/loss?</string>
	<string name="win">Win</string>
	<string name="loss">Loss</string>
	<string name="draw">Draw</string>
	<string name="final_score">Final score</string>
	<string name="did_nothing">Did nothing?</string>

	<string name="blue">Blue</string>
	<string name="red">Red</string>

	<string name="STR_Low">Low</string>
	<string name="STR_Med">Med</string>
	<string name="STR_High">High</string>

	<string name="STR_Kinect">Uses Kinect?</string>

    <string name="from_feeder">Feeder</string>
    <string name="from_floor">Floor</string>

    <string name="STR_Ex">Great</string>
    <string name="STR_Gd">Good</string>
    <string name="STR_Fr">Fair</string>
    <string name="STR_Pr">Poor</string>

    <string name="STR_Offensive">Offense</string>
    <string name="STR_Defensive">Defense</string>
    <string name="neutral">Neutral</string>

    <!-- Display strings -->

    <string name="menu_display_team_matches">Display matches</string>
    <string name="menu_edit_team_input">Edit team data</string>
    <string name="menu_edit_match_input">Edit match data</string>

	<!-- Display Headers -->
    <string name="team">Team</string>
    <string name="team_nickname">Name</string>
    <string name="wins">Wins</string>
    <string name="losses">Losses</string>
    <string name="total_score">Total Points</string>
    <string name="total_shots">Made / Atmp</string>
    <string name="shots_made">Shots Made</string>
    <string name="shots_attempted">Shots Attempted</string>
    <string name="shots_percent">Shot %</string>
    <string name="team_drive">Drive system</string>
    <string name="team_wheels">Wheels</string>
    <string name="team_kinect">Uses Kinect?</string>

    <string name="match">Match</string>
    <string name="low_shots_made_attempt">Low shots</string>
    <string name="med_shots_made_attempt">Med shots</string>
    <string name="high_shots_made_attempt">High shots</string>
    <string name="result">Result</string>
    <string name="how_cross">How Cross?</string>
    <string name="balanced"># Balanced</string>

        <!--  Bluetooth -->
    <string name="send">Send</string>
    <string name="not_connected">You are not connected to a device</string>
    <string name="bt_not_available">Bluetooth is not available.</string>
    <string name="bt_not_enabled_leaving">Bluetooth was not enabled.</string>
    <string name="title_connecting">connecting…</string>
    <string name="title_connected_to">connected to <xliff:g id="device_name">%1$s</xliff:g></string>
    <string name="title_not_connected">not connected</string>
    <string name="secure_connect">Scan</string>
    <string name="discoverable">Make discoverable</string>

    <!-- Search -->
    <string name="app_label">Scouting Manager</string>
    <string name="search_hint">Search for team</string>
    <string name="menu_search">Search</string>
    <string name="search_instructions">Use the search box in the Action Bar to look up a word.</string>
    <string name="no_results">No results found for \"%s\"</string>
    <plurals name="search_results">
      <item quantity="one">%1$d result for \"%2$s\": </item>
      <item quantity="other">%1$d results for \"%2$s\": </item>
    </plurals>

    <!-- ListView empty strings -->
    <string name="team_list_empty">No teams to display</string>
    <string name="team_matches_list_empty">No matches to display</string>

    <!-- Team Scouting -->
    <string name="team_name">Team name</string>
    <string name="drive">Drive system?</string>
    <string-array name="drive_option">
        <item>None</item>
        <item>6-Wheel Drop</item>
        <item>Mecanum</item>
        <item>Omni</item>
        <item>Swerve</item>
        <item>4-Wheel Drive</item>
        <item>8-Wheel</item>
        <item>Slide</item>
        <item>Other</item>
    </string-array>
    <string name="wheel">Wheel type?</string>
    <string-array name="wheel_option">
        <item>None</item>
        <item>Plaction</item>
        <item>Metal with traction</item>
        <item>Omni-wheels</item>
        <item>Mecanum</item>
        <item>Kit of parts (KoP)</item>
        <item>Pneumatic</item>
        <item>Tank tread</item>
        <item>Other</item>
    </string-array>
    <string name="play_auto">Plays autonomous?</string>
    <string name="prefer_position">Preferred start?</string>
    <string name="left">Left</string>
    <string name="middle">Middle</string>
    <string name="right">Right</string>
    <string name="team_barrier">Crosses barrier?</string>
    <string name="team_bridge">Pushes down bridge?</string>
    <string-array name="strategy_option">
        <item>None</item>
        <item>Offense</item>
        <item>Defense</item>
    </string-array>

    <string name="shoot_from_where">Shoot from where?</string>
    <string name="fender">Fender</string>
    <string name="key">Key</string>
    <string name="anywhere">Anywhere</string>

    <string name="take_photo">Take photo</string>
    <string name="choose_gallary">Select photo from Gallery</string>
    <string name="delete_team_picture">Delete photo</string>

    <string name="match_number">Enter match:</string>
    <string name="team_number">Enter team:</string>
    <string name="match_number_hint">#</string>
    <string name="team_number_hint">#</string>

    <string name="image_not_found">Image not found.</string>

    <string name="rank">Rank</string>
    <string name="friday_rank">Friday Rank</string>

    <string name="team_photo_content_description">Team photo</string>

    <string name="add_team_dialog_title">Add team #:</string>

    <!-- Toasts -->
    <string name="only_on_tablets">This feature is only available on tablets.</string>
    <string name="coming_soon">Coming soon!</string>
    <string name="no_data_to_export">No data to export.</string>
    <string name="sd_card_not_mounted">SD card not mounted.</string>
    <string name="no_data_to_share">No data to share.</string>

    <!-- Export Data -->
    <string name="writing_match_data">Writing match-scout data…</string>
    <string name="writing_team_data">Writing team-scout data…</string>
    <string name="written_to_storage">Data written to external storage.</string>
    <string name="error_writing_data">Error writing data.</string>
    <string name="share_scouting_data">Share scouting data…</string>

    <string name="writing_data">Writing data…</string>
    <string name="export_data_dialog">Export data</string>

</resources>


text:
Verifies that generated access interceptors doesn't throw PHP Warning on Serialized class private property direct isset check
--FILE--
<?php

require_once __DIR__ . '/init.php';

class Kitchen implements \Serializable
{
    private $sweets = 'candy';

    function serialize()
    {
        return $this->sweets;
    }

    function unserialize($serialized)
    {
        $this->sweets = $serialized;
    }
}

$factory = new \ProxyManager\Factory\AccessInterceptorScopeLocalizerFactory($configuration);

$proxy = $factory->createProxy(new Kitchen());

var_dump(isset($proxy->sweets));
?>
--EXPECT--
bool(false)


text:
class DialogField < ApplicationRecord
  include NewWithTypeStiMixin
  attr_accessor :value
  attr_accessor :dialog

  belongs_to :dialog_group
  has_one :resource_action, :as => :resource, :dependent => :destroy

  has_many :dialog_field_associations,
           :foreign_key => :trigger_id,
           :class_name  => :DialogFieldAssociation,
           :dependent   => :destroy
  has_many :reverse_dialog_field_associations,
           :foreign_key => :respond_id,
           :class_name  => :DialogFieldAssociation,
           :dependent   => :destroy

  has_many :dialog_field_responders,
           :source  => :respond,
           :through => :dialog_field_associations
  has_many :dialog_field_triggers,
           :source  => :trigger,
           :through => :reverse_dialog_field_associations

  alias_attribute :order, :position

  validates_presence_of   :name
  validates :name, :exclusion => {:in      => %w(action controller),
                                  :message => "Field Name %{value} is reserved."}

  default_value_for :required, false
  default_value_for(:visible, :allows_nil => false) { true }

  serialize :values
  serialize :values_method_options,   Hash
  serialize :display_method_options,  Hash
  serialize :required_method_options, Hash
  serialize :options,                 Hash

  after_initialize :default_resource_action

  # Sample data from V4 dialog.rb files
  # :data_type          # => :string / :integer / :button / :boolean / :time
  # :notes_display      # => :show / :hide
  # :display            # => :edit / :hide / :show / :ignore
  # :display_options    # => {:method => ???, :options => {???}}
  # :values             # => {false => 0, true => 1}
  # :values_options     # => {:category => :Vm}

  FIELD_CONTROLS = [
    :dialog_field_text_box,
    :dialog_field_text_area_box,
    :dialog_field_check_box,
    :dialog_field_drop_down_list,
    :dialog_field_button,
    :dialog_field_tag_control,
    :dialog_field_radio_button,
    :dialog_field_dynamic_list,
    # Enable when UI support is available
    # #:dialog_field_list_view      # Future
  ]

  DIALOG_FIELD_TYPES = {
    "DialogFieldTextBox"         => _("Text Box"),
    "DialogFieldTextAreaBox"     => _("Text Area Box"),
    "DialogFieldCheckBox"        => _("Check Box"),
    "DialogFieldDropDownList"    => _("Drop Down List"),
    # Commented out next to field types until they can be implemented
    #    "DialogFieldButton" => "Button",
    "DialogFieldTagControl"      => _("Tag Control"),
    "DialogFieldDateControl"     => _("Date Control"),
    "DialogFieldDateTimeControl" => _("Date/Time Control"),
    "DialogFieldRadioButton"     => _("Radio Button")
  }

  DIALOG_FIELD_DYNAMIC_CLASSES = %w(
    DialogFieldCheckBox
    DialogFieldDateControl
    DialogFieldDateTimeControl
    DialogFieldDropDownList
    DialogFieldRadioButton
    DialogFieldTextAreaBox
    DialogFieldTextBox
  )

  def self.dialog_field_types
    DIALOG_FIELD_TYPES
  end

  def self.field_types
    FIELD_CONTROLS
  end

  def initialize_with_values(dialog_values)
    @value = value_from_dialog_fields(dialog_values) || default_value
  end

  def update_values(_dialog_values)
    # override in subclasses
    nil
  end

  def normalize_automate_values(_passed_in_values)
    # override in subclasses
    nil
  end

  def automate_output_value
    data_type == "integer" ? @value.to_i : @value
  end

  def automate_key_name
    "dialog_#{name}"
  end

  def validate_field_data(dialog_tab, dialog_group)
    validate_error_message(dialog_tab, dialog_group) if visible? && required? && required_value_error?
  end

  def resource
    self
  end

  def update_and_serialize_values
    DialogFieldSerializer.serialize(self)
  end

  def update_dialog_field_responders(id_list)
    dialog_field_responders.destroy_all

    self.dialog_field_responders = available_dialog_field_responders(id_list) unless id_list.blank?
  end

  def deep_copy
    dup.tap do |new_field|
      new_field.resource_action = resource_action.dup
    end
  end

  private

  def available_dialog_field_responders(id_list)
    DialogField.find(id_list)
  end

  def default_resource_action
    build_resource_action if resource_action.nil?
  end

  def validate_error_message(dialog_tab, dialog_group)
    "#{dialog_tab.label}/#{dialog_group.label}/#{label} is required"
  end

  def required_value_error?
    value.blank?
  end

  def value_from_dialog_fields(dialog_values)
    dialog_values[automate_key_name] || dialog_values[name]
  end

  def values_from_automate
    DynamicDialogFieldValueProcessor.values_from_automate(self)
  end
end


text:
package pl.oi.method.database;

import java.io.File;

/**
 * Created by dpp on 5/5/16.
 */
public class ImageFile {

    private File file;
    private String imageName;

    public ImageFile(File file) {
        this.file = file;
//        System.out.println(file.getParentFile().getName());
        imageName = file.getParentFile().getName()+"/"+file.getName();
    }

    public File getFile() {
        return file;
    }

    public String getImageName() {
        return imageName;
    }
}


text:
/*************************************************************************/
/*  animation_tree_editor_plugin.h                                       */
/*************************************************************************/
/*                       This file is part of:                           */
/*                           GODOT ENGINE                                */
/*                      https://godotengine.org                          */
/*************************************************************************/
/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur.                 */
/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md).   */
/*                                                                       */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the       */
/* "Software"), to deal in the Software without restriction, including   */
/* without limitation the rights to use, copy, modify, merge, publish,   */
/* distribute, sublicense, and/or sell copies of the Software, and to    */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions:                                             */
/*                                                                       */
/* The above copyright notice and this permission notice shall be        */
/* included in all copies or substantial portions of the Software.       */
/*                                                                       */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY  */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,  */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
/*************************************************************************/

#ifndef ANIMATION_TREE_EDITOR_PLUGIN_H
#define ANIMATION_TREE_EDITOR_PLUGIN_H

#include "editor/editor_plugin.h"
#include "editor/property_editor.h"
#include "scene/animation/animation_tree.h"
#include "scene/gui/button.h"
#include "scene/gui/graph_edit.h"
#include "scene/gui/popup.h"
#include "scene/gui/tree.h"

class EditorFileDialog;

class AnimationTreeNodeEditorPlugin : public VBoxContainer {
	GDCLASS(AnimationTreeNodeEditorPlugin, VBoxContainer);

public:
	virtual bool can_edit(const Ref<AnimationNode> &p_node) = 0;
	virtual void edit(const Ref<AnimationNode> &p_node) = 0;
};

class AnimationTreeEditor : public VBoxContainer {
	GDCLASS(AnimationTreeEditor, VBoxContainer);

	ScrollContainer *path_edit;
	HBoxContainer *path_hb;

	AnimationTree *tree;
	MarginContainer *editor_base;

	Vector<String> button_path;
	Vector<String> edited_path;
	Vector<AnimationTreeNodeEditorPlugin *> editors;

	void _update_path();
	ObjectID current_root;

	void _path_button_pressed(int p_path);

	static Vector<String> get_animation_list();

protected:
	void _notification(int p_what);
	static void _bind_methods();

	static AnimationTreeEditor *singleton;

public:
	AnimationTree *get_tree() { return tree; }
	void add_plugin(AnimationTreeNodeEditorPlugin *p_editor);
	void remove_plugin(AnimationTreeNodeEditorPlugin *p_editor);

	String get_base_path();

	bool can_edit(const Ref<AnimationNode> &p_node) const;

	void edit_path(const Vector<String> &p_path);
	Vector<String> get_edited_path() const;

	void enter_editor(const String &p_path = "");
	static AnimationTreeEditor *get_singleton() { return singleton; }
	void edit(AnimationTree *p_tree);
	AnimationTreeEditor();
};

class AnimationTreeEditorPlugin : public EditorPlugin {
	GDCLASS(AnimationTreeEditorPlugin, EditorPlugin);

	AnimationTreeEditor *anim_tree_editor;
	Button *button;

public:
	virtual String get_name() const override { return "AnimationTree"; }
	bool has_main_screen() const override { return false; }
	virtual void edit(Object *p_object) override;
	virtual bool handles(Object *p_object) const override;
	virtual void make_visible(bool p_visible) override;

	AnimationTreeEditorPlugin();
	~AnimationTreeEditorPlugin();
};

#endif // ANIMATION_TREE_EDITOR_PLUGIN_H


text:
from iob.devices.arduinouno import ArduinoUnoTwi
from iob import I2CTransaction
from iob.i2c import I2CHelperMixin
from time import time
import struct

class Eeprom24lc32(object):
    """
    This class demonstrates how to communicate with popular
    24LC32A EEPROM chip using I2C bus.
    """

    def __init__(self, device, user_chip_address=0b000, page_cache_size=32):
        """
        Create EEPROM object.

        :param iob.devices.Device  device: Device allowing I2C communication.
        :param int  user_chip_address: 24LC32 allows address cusomization using 3 bits.
        :param int  page_cache_size: Device page cache size, determining maximum size of single write operation.
        """
        if not isinstance(device, I2CHelperMixin):
            raise ValueError('This class works only with devices supporint I2C helper API')
        self.device = device
        self.chip_write_address = 0b10100000 | ((user_chip_address & 0b111) << 1)
        self.chip_read_address = 0b10100000 | ((user_chip_address & 0b111) << 1) | 0b00000001
        self.page_cache_size = page_cache_size

    def write(self, address, data):
        """
        Write data to device under specified memory address.

        :param int  address: target memory address
        :param bytes  data: bytes of data, no more than *page_cache_size*
        :raises I2CError: operation failed
        """
        if not isinstance(data, bytes) or len(data) > self.page_cache_size:
            msg = 'Expected data as 1-%s bytes. Got: %s, len = %s.'% (self.page_cache_size, type(data).__name__, len(data))
            raise ValueError(msg)
        address_word = struct.pack('>H', address & 0xFFF)
        self.device.i2c_start()
        self.device.i2c_address(self.chip_write_address)
        self.device.i2c_write(address_word)
        self.device.i2c_write(data)
        self.device.i2c_stop()

    def read(self, address, count=1):
        """
        Read bytes from address.

        :param int  address: Memory address
        :param count: Number of bytes to read
        :return: Bytes read from device.
        :raises I2CError: operation failed
        """
        address_word = struct.pack('>H', address & 0xFFF)
        self.device.i2c_start()
        self.device.i2c_address(self.chip_write_address)
        self.device.i2c_write(address_word)
        self.device.i2c_rep_start()
        self.device.i2c_address(self.chip_read_address)
        res = dev.i2c_read(count)
        self.device.i2c_stop()
        return res

    def wait(self, timeout=0.1):
        """
        Poll device until it's ready to accept new commands. According to 24LC32 datasheet,
        polling must be done by addressing the device with R/W bit set to 0 - this is write address.

        :param float  timeout: How long to wait for the device
        :return: True if device is ready, False otherwise
        """
        t = I2CTransaction()
        t.s().a(self.chip_write_address).p()
        deadline = time() + timeout
        while time() < deadline:
            r = self.device.i2c_run(t)
            if r.ack(1):
                return True
        return False

if __name__ == "__main__":

    # This example works with any device supporint I2CHelper API.
    dev = ArduinoUnoTwi('COM7')
    eeprom = Eeprom24lc32(dev)
    dev.connect()

    dev.i2c_enable = True

    # You can experiment with higher speeds, but it can fail ACK if you
    # use longer wires or inadequate pull-up resistors. 25kHz is a safe bet.
    dev.i2c_clock = ArduinoUnoTwi.I2CClock.F25k

    message = b'A secret message'

    print('Message size: %s' % len(message))

    print('Writing: %s...' % message, end='')
    eeprom.write(0, message)
    print('done')

    print('Waiting until write completes... ', end='')
    ready = eeprom.wait()
    print('done')

    print('Reading back... ', end='')
    r = eeprom.read(0, len(message))
    print('done')
    print('Got message: %s' % r)

    dev.i2c_enable = False
    dev.disconnect()


text:
package org.oulipo.browser;

import java.io.IOException;

import org.oulipo.browser.api.AddressBarController;
import org.oulipo.browser.api.ApplicationContext;
import org.oulipo.browser.framework.StorageContext;

import com.google.inject.AbstractModule;

import javafx.fxml.FXMLLoader;

public class GuiceModule extends AbstractModule {

	@Override
	protected void configure() {
		bind(FXMLLoader.class).toProvider(FXMLLoaderProvider.class);
		try {
			bind(StorageContext.class).toInstance(new StorageContext());
		} catch (IOException e) {
			e.printStackTrace();
		}

		bind(ApplicationContext.class);
		// TODO: register per scheme - add annotation by scheme: ted, view-source
		bind(AddressBarController.class);
	}
}


text:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <title>Geneysis</title>
    <link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="css/geneysis.css" rel="stylesheet">
    <link href="css/font-awesome.min.css" rel="stylesheet">

{{project.name}}

Created: {{project.created.toLocaleString()}}

Last Update: {{project.updated.toLocaleString()}}

Phages: {{project.phages.length}}

No events yet!

Event: {{event.type + ' : ' + event.description}}


text:
ACCEPTED

#### According to
Integrated Taxonomic Information System

#### Published in
Jahresber. Pollichia 22-24:309. 1866

#### Original name
null

### Remarks
null


text: module.exports = "orginal";


text:
"use strict";
angular.module('palaso.ui.comments')
// Palaso UI Dictionary Control: Comments

  .directive('semdomtransCommentsView', [function() {
    return {
      restrict: 'E',
      templateUrl: '/angular-app/bellows/directive/' + bootstrapVersion + '/palaso.ui.comments.semdomtrans-comments-view.html',
      scope: {
        control: "=",
        entry: "="
      },
      controller: ['$scope', function($scope) {

        $scope.control.setSelectedField = function setSelectedField(fieldName, model) {
          $scope.newComment.regarding.field = fieldName;
          $scope.newComment.regarding.fieldNameForDisplay = fieldName;
          $scope.newComment.regarding.fieldValue = model.source + "#" + model.translation;
        }

      }],
      link: function(scope, element, attrs, controller) {

      }
    };
  }])
;


text:
using System.Collections.Generic;

namespace DotvvmWeb.Views.Docs.Controls.businesspack.TreeView.sample4
{
    public class TreeItem
    {
        public string Name { get; set; }
        public bool HasItems => Items?.Count > 0;
        public List<TreeItem> Items { get; set; } = new List<TreeItem>();
        public bool IsExpanded { get; set; }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<!--

-->

<resources>
    <!-- Application name for opensource Android keyboard. AOSP(Android Open Source Project) should not be translated.
         This resource should be copied from msgid="8250992613616792321" -->
    <string name="english_ime_name" translatable="false">BeHe Keyboard</string>

    <!-- Title for Android Keyboard settings screen. AOSP(Android Open Source Project) should not be translated.
         This resource should be copied from msgid="423615877174850267" -->
    <string name="english_ime_settings" translatable="false">BeHe Keyboard Setiings</string>
</resources>


text:
from models import Agency, db
import codecs

def create_agency_db():
    with codecs.open("data/GTF_VBB_BVG_20110530/agency.txt", mode="r", encoding="utf-8") as infile:
        content = infile.readlines()
    for line in content[1:]:
        fields = line.split(",")
        print unicode(fields[1])
        a = Agency(int(fields[0]), fields[1], fields[2], fields[3])
        db.session.add(a)
    db.session.commit()
    print "Done!"

def get_agency(id):
    this_agency = Agency.query.filter_by(id=id).first()
    print this_agency

if __name__=="__main__":
    #    create_agency_db()
    get_agency(671)


text:
//===-- FixupStatepointCallerSaved.cpp - Fixup caller saved registers  ----===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
///
/// \file
/// Statepoint instruction in deopt parameters contains values which are
/// meaningful to the runtime and should be able to be read at the moment the
/// call returns. So we can say that we need to encode the fact that these
/// values are "late read" by runtime. If we could express this notion for
/// register allocator it would produce the right form for us.
/// The need to fixup (i.e this pass) is specifically handling the fact that
/// we cannot describe such a late read for the register allocator.
/// Register allocator may put the value on a register clobbered by the call.
/// This pass forces the spill of such registers and replaces corresponding
/// statepoint operands to added spill slots.
///
//===----------------------------------------------------------------------===//

#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/StackMaps.h"
#include "llvm/CodeGen/TargetFrameLowering.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/IR/Statepoint.h"
#include "llvm/InitializePasses.h"
#include "llvm/Support/Debug.h"

using namespace llvm;

#define DEBUG_TYPE "fixup-statepoint-caller-saved"
STATISTIC(NumSpilledRegisters, "Number of spilled register");
STATISTIC(NumSpillSlotsAllocated, "Number of spill slots allocated");
STATISTIC(NumSpillSlotsExtended, "Number of spill slots extended");

static cl::opt<bool> FixupSCSExtendSlotSize(
    "fixup-scs-extend-slot-size", cl::Hidden, cl::init(false),
    cl::desc("Allow spill in spill slot of greater size than register size"),
    cl::Hidden);

namespace {

class FixupStatepointCallerSaved : public MachineFunctionPass {
public:
  static char ID;

  FixupStatepointCallerSaved() : MachineFunctionPass(ID) {
    initializeFixupStatepointCallerSavedPass(*PassRegistry::getPassRegistry());
  }

  void getAnalysisUsage(AnalysisUsage &AU) const override {
    MachineFunctionPass::getAnalysisUsage(AU);
  }

  StringRef getPassName() const override {
    return "Fixup Statepoint Caller Saved";
  }

  bool runOnMachineFunction(MachineFunction &MF) override;
};
} // End anonymous namespace.

char FixupStatepointCallerSaved::ID = 0;
char &llvm::FixupStatepointCallerSavedID = FixupStatepointCallerSaved::ID;

INITIALIZE_PASS_BEGIN(FixupStatepointCallerSaved, DEBUG_TYPE,
                      "Fixup Statepoint Caller Saved", false, false)
INITIALIZE_PASS_END(FixupStatepointCallerSaved, DEBUG_TYPE,
                    "Fixup Statepoint Caller Saved", false, false)

// Utility function to get size of the register.
static unsigned getRegisterSize(const TargetRegisterInfo &TRI, Register Reg) {
  const TargetRegisterClass *RC = TRI.getMinimalPhysRegClass(Reg);
  return TRI.getSpillSize(*RC);
}

namespace {
// Cache used frame indexes during statepoint re-write to re-use them in
// processing next statepoint instruction.
// Two strategies. One is to preserve the size of spill slot while another one
// extends the size of spill slots to reduce the number of them, causing
// the less total frame size. But unspill will have "implicit" any extend.
class FrameIndexesCache {
private:
  struct FrameIndexesPerSize {
    // List of used frame indexes during processing previous statepoints.
    SmallVector<int, 8> Slots;
    // Current index of un-used yet frame index.
    unsigned Index = 0;
  };
  MachineFrameInfo &MFI;
  const TargetRegisterInfo &TRI;
  // Map size to list of frame indexes of this size. If the mode is
  // FixupSCSExtendSlotSize then the key 0 is used to keep all frame indexes.
  // If the size of required spill slot is greater than in a cache then the
  // size will be increased.
  DenseMap<unsigned, FrameIndexesPerSize> Cache;

public:
  FrameIndexesCache(MachineFrameInfo &MFI, const TargetRegisterInfo &TRI)
      : MFI(MFI), TRI(TRI) {}
  // Reset the current state of used frame indexes. After invocation of
  // this function all frame indexes are available for allocation.
  void reset() {
    for (auto &It : Cache)
      It.second.Index = 0;
  }
  // Get frame index to spill the register.
  int getFrameIndex(Register Reg) {
    unsigned Size = getRegisterSize(TRI, Reg);
    // In FixupSCSExtendSlotSize mode the bucket with 0 index is used
    // for all sizes.
    unsigned Bucket = FixupSCSExtendSlotSize ? 0 : Size;
    FrameIndexesPerSize &Line = Cache[Bucket];
    if (Line.Index < Line.Slots.size()) {
      int FI = Line.Slots[Line.Index++];
      // If all sizes are kept together we probably need to extend the
      // spill slot size.
      if (MFI.getObjectSize(FI) < Size) {
        MFI.setObjectSize(FI, Size);
        MFI.setObjectAlignment(FI, Align(Size));
        NumSpillSlotsExtended++;
      }
      return FI;
    }
    int FI = MFI.CreateSpillStackObject(Size, Size);
    NumSpillSlotsAllocated++;
    Line.Slots.push_back(FI);
    ++Line.Index;
    return FI;
  }
  // Sort all registers to spill in descendent order. In the
  // FixupSCSExtendSlotSize mode it will minimize the total frame size.
  // In non FixupSCSExtendSlotSize mode we can skip this step.
  void sortRegisters(SmallVectorImpl<Register> &Regs) {
    if (!FixupSCSExtendSlotSize)
      return;
    llvm::sort(Regs.begin(), Regs.end(), [&](Register &A, Register &B) {
      return getRegisterSize(TRI, A) > getRegisterSize(TRI, B);
    });
  }
};

// Describes the state of the current processing statepoint instruction.
class StatepointState {
private:
  // statepoint instruction.
  MachineInstr &MI;
  MachineFunction &MF;
  const TargetRegisterInfo &TRI;
  const TargetInstrInfo &TII;
  MachineFrameInfo &MFI;
  // Mask with callee saved registers.
  const uint32_t *Mask;
  // Cache of frame indexes used on previous instruction processing.
  FrameIndexesCache &CacheFI;
  // Operands with physical registers requiring spilling.
  SmallVector<unsigned, 8> OpsToSpill;
  // Set of register to spill.
  SmallVector<Register, 8> RegsToSpill;
  // Map Register to Frame Slot index.
  DenseMap<Register, int> RegToSlotIdx;

public:
  StatepointState(MachineInstr &MI, const uint32_t *Mask,
                  FrameIndexesCache &CacheFI)
      : MI(MI), MF(*MI.getMF()), TRI(*MF.getSubtarget().getRegisterInfo()),
        TII(*MF.getSubtarget().getInstrInfo()), MFI(MF.getFrameInfo()),
        Mask(Mask), CacheFI(CacheFI) {}
  // Return true if register is callee saved.
  bool isCalleeSaved(Register Reg) { return (Mask[Reg / 32] >> Reg % 32) & 1; }
  // Iterates over statepoint meta args to find caller saver registers.
  // Also cache the size of found registers.
  // Returns true if caller save registers found.
  bool findRegistersToSpill() {
    SmallSet<Register, 8> VisitedRegs;
    for (unsigned Idx = StatepointOpers(&MI).getVarIdx(),
                  EndIdx = MI.getNumOperands();
         Idx < EndIdx; ++Idx) {
      MachineOperand &MO = MI.getOperand(Idx);
      if (!MO.isReg() || MO.isImplicit())
        continue;
      Register Reg = MO.getReg();
      assert(Reg.isPhysical() && "Only physical regs are expected");
      if (isCalleeSaved(Reg))
        continue;
      if (VisitedRegs.insert(Reg).second)
        RegsToSpill.push_back(Reg);
      OpsToSpill.push_back(Idx);
    }
    CacheFI.sortRegisters(RegsToSpill);
    return !RegsToSpill.empty();
  }
  // Spill all caller saved registers right before statepoint instruction.
  // Remember frame index where register is spilled.
  void spillRegisters() {
    for (Register Reg : RegsToSpill) {
      int FI = CacheFI.getFrameIndex(Reg);
      const TargetRegisterClass *RC = TRI.getMinimalPhysRegClass(Reg);
      TII.storeRegToStackSlot(*MI.getParent(), MI, Reg, true /*is_Kill*/, FI,
                              RC, &TRI);
      NumSpilledRegisters++;
      RegToSlotIdx[Reg] = FI;
    }
  }
  // Re-write statepoint machine instruction to replace caller saved operands
  // with indirect memory location (frame index).
  void rewriteStatepoint() {
    MachineInstr *NewMI =
        MF.CreateMachineInstr(TII.get(MI.getOpcode()), MI.getDebugLoc(), true);
    MachineInstrBuilder MIB(MF, NewMI);

    // Add End marker.
    OpsToSpill.push_back(MI.getNumOperands());
    unsigned CurOpIdx = 0;

    for (unsigned I = 0; I < MI.getNumOperands(); ++I) {
      MachineOperand &MO = MI.getOperand(I);
      if (I == OpsToSpill[CurOpIdx]) {
        int FI = RegToSlotIdx[MO.getReg()];
        MIB.addImm(StackMaps::IndirectMemRefOp);
        MIB.addImm(getRegisterSize(TRI, MO.getReg()));
        assert(MO.isReg() && "Should be register");
        assert(MO.getReg().isPhysical() && "Should be physical register");
        MIB.addFrameIndex(FI);
        MIB.addImm(0);
        ++CurOpIdx;
      } else
        MIB.add(MO);
    }
    assert(CurOpIdx == (OpsToSpill.size() - 1) && "Not all operands processed");
    // Add mem operands.
    NewMI->setMemRefs(MF, MI.memoperands());
    for (auto It : RegToSlotIdx) {
      int FrameIndex = It.second;
      auto PtrInfo = MachinePointerInfo::getFixedStack(MF, FrameIndex);
      auto *MMO = MF.getMachineMemOperand(PtrInfo, MachineMemOperand::MOLoad,
                                          getRegisterSize(TRI, It.first),
                                          MFI.getObjectAlign(FrameIndex));
      NewMI->addMemOperand(MF, MMO);
    }
    // Insert new statepoint and erase old one.
    MI.getParent()->insert(MI, NewMI);
    MI.eraseFromParent();
  }
};

class StatepointProcessor {
private:
  MachineFunction &MF;
  const TargetRegisterInfo &TRI;
  FrameIndexesCache CacheFI;

public:
  StatepointProcessor(MachineFunction &MF)
      : MF(MF), TRI(*MF.getSubtarget().getRegisterInfo()),
        CacheFI(MF.getFrameInfo(), TRI) {}

  bool process(MachineInstr &MI) {
    StatepointOpers SO(&MI);
    uint64_t Flags = SO.getFlags();
    // Do nothing for LiveIn, it supports all registers.
    if (Flags & (uint64_t)StatepointFlags::DeoptLiveIn)
      return false;
    CallingConv::ID CC = SO.getCallingConv();
    const uint32_t *Mask = TRI.getCallPreservedMask(MF, CC);
    CacheFI.reset();
    StatepointState SS(MI, Mask, CacheFI);

    if (!SS.findRegistersToSpill())
      return false;

    SS.spillRegisters();
    SS.rewriteStatepoint();
    return true;
  }
};
} // namespace

bool FixupStatepointCallerSaved::runOnMachineFunction(MachineFunction &MF) {
  if (skipFunction(MF.getFunction()))
    return false;

  const Function &F = MF.getFunction();
  if (!F.hasGC())
    return false;

  SmallVector<MachineInstr *, 16> Statepoints;
  for (MachineBasicBlock &BB : MF)
    for (MachineInstr &I : BB)
      if (I.getOpcode() == TargetOpcode::STATEPOINT)
        Statepoints.push_back(&I);

  if (Statepoints.empty())
    return false;

  bool Changed = false;
  StatepointProcessor SPP(MF);
  for (MachineInstr *I : Statepoints)
    Changed |= SPP.process(*I);
  return Changed;
}


text:
<!DOCTYPE html>

	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="description" content="">
	<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0">

	<title>React, Redux and Other Fun Stuff</title>

	<link rel="stylesheet" type="text/css" href="css/bootstrap.css" />
	<link rel="stylesheet" type="text/css" href="css/main.css" />


text:
namespace Microsoft.Azure.Management.ContainerService.Models
{

    /// <summary>
    /// Defines values for ScaleSetPriority.
    /// </summary>
    public static class ScaleSetPriority
    {
        public const string Low = "Low";
        public const string Regular = "Regular";
    }
}


text:
<?php

namespace User\Support\Traits;

use Illuminate\Http\Request;
use User\Models\User;
use User\Requests\UserRequest;

trait UserResourceApiTrait
{
    /**
     * Retrieve the resource(s) with the parameters.
     *
     * @param  \Illuminate\Http\Request $request
     * @return \Illuminate\Http\Response
     */
    public function postFind(Request $request)
    {
        $searches = $request->get('search') !== 'null' && $request->get('search')
                        ? $request->get('search')
                        : $request->all();

        $onlyTrashed = $request->get('only_trashed') !== 'null' && $request->get('only_trashed')
                        ? $request->get('only_trashed')
                        : false;

        $order = $request->get('descending') === 'true' && $request->get('descending') !== 'null'
                        ? 'DESC'
                        : 'ASC';

        $sort = $request->get('sort') && $request->get('sort') !== 'null'
                        ? $request->get('sort')
                        : 'id';

        $take = $request->get('take') && $request->get('take') > 0
                        ? $request->get('take')
                        : 0;

        $resources = User::search($searches)->orderBy($sort, $order);

        if ($onlyTrashed) {
            $resources->onlyTrashed();
        }

        $users = $resources->paginate($take);

        return response()->json($users);
    }

    /**
     * Retrieve list of resources.
     *
     * @param  \Illuminate\Http\Request $request
     * @return \Illuminate\Http\Response
     */
    public function getAll(Request $request)
    {
        $onlyTrashed = $request->get('only_trashed') !== 'null' && $request->get('only_trashed')
                        ? $request->get('only_trashed')
                        : false;

        $order = $request->get('descending') === 'true' && $request->get('descending') !== 'null'
                        ? 'DESC'
                        : 'ASC';

        $searches = $request->get('search') !== 'null' && $request->get('search')
                        ? $request->get('search')
                        : $request->all();

        $sort = $request->get('sort') && $request->get('sort') !== 'null'
                        ? $request->get('sort')
                        : 'id';

        $take = $request->get('take') && $request->get('take') > 0
                        ? $request->get('take')
                        : 0;

        $resources = User::search($searches)->orderBy($sort, $order);

        if ($onlyTrashed) {
            $resources->onlyTrashed();
        }

        $users = $resources->paginate($take);

        return response()->json($users);
    }

    /**
     * Store a newly created resource in storage
     *
     * @param  \User\Requests\UserRequest $request
     * @return \Illuminate\Http\Response
     */
    public function postStore(UserRequest $request)
    {
        $user = new User();
        $user->title = $request->input('title');
        $user->code = $request->input('code');
        $user->feature = $request->input('feature');
        $user->body = $request->input('body');
        $user->delta = $request->input('delta');
        $user->template = $request->input('template');
        $user->user()->associate(User::find($request->input('user_id')));
        $user->save();

        return response()->json($user->id);
    }

    /**
     * Retrieve the resource specified by the slug.
     *
     * @param  \Illuminate\Http\Request $request
     * @param  string  $slug
     * @return \Illuminate\Http\Response
     */
    public function getShow(Request $request, $slug = null)
    {
        $user = User::codeOrFail($slug);

        return response()->json($user);
    }

    /**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function putUpdate(Request $request, $id)
    {
        $user = User::findOrFail($id);
        $user->title = $request->input('title');
        $user->code = $request->input('code');
        $user->feature = $request->input('feature');
        $user->body = $request->input('body');
        $user->delta = $request->input('delta');
        $user->template = $request->input('template');
        $user->user()->associate(User::find($request->input('user_id')));
        $user->save();

        return response()->json($user->id);
    }

    /**
     * Remove the specified resource from storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function deleteDestroy(Request $request, $id = null)
    {
        $success = User::destroy($id ? $id : $request->input('id'));

        return response()->json($success);
    }

    /**
     * Restore the specified resource from storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function postRestore(Request $request, $id = null)
    {
        $user = User::onlyTrashed()->find($id);
        $user->exists() || $user->restore();

        if (is_array($request->input('id'))) {
            foreach ($request->input('id') as $id) {
                $user = User::onlyTrashed()->find($id);
                $user->restore();
            }
        }

        return response()->json($success);
    }

    /**
     * Delete the specified resource from storage permanently.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function deleteDelete(Request $request, $id = null)
    {
        $success = User::forceDelete($id ? $id : $request->input('id'));

        return response()->json($success);
    }
}


text:
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy

class ProgressAppConfig(AppConfig):
    name = 'learningprogress.progress'
    verbose_name = ugettext_lazy('Learning Progress')


text:
//
//  RKSerialization.h
//  RestKit
//
//  Created by Blake Watters on 10/1/10.
//  Copyright (c) 2009-2012 RestKit. All rights reserved.
//
//  Licensed under the Apache License, Version 2.0 (the "License");
//  you may not use this file except in compliance with the License.
//  You may obtain a copy of the License at
//
//  http://www.apache.org/licenses/LICENSE-2.0
//
//  Unless required by applicable law or agreed to in writing, software
//  distributed under the License is distributed on an "AS IS" BASIS,
//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//  See the License for the specific language governing permissions and
//  limitations under the License.
//

/**
 The `RKSerialization` protocol declares two methods that a class must implement so that it can provide support for serializing objects to and deserializing objects from UTF-8 encoded data representations of a serialization format such as JSON or XML. Serialization implementations typically handle data in a given MIME Type (i.e. `application/json`) and may be registered with the `RKMIMETypeSerialization` class.

 @see `RKMIMETypeSerialization`
 */
@protocol RKSerialization <NSObject>

///------------------------------
/// @name Deserializing an Object
///------------------------------

/**
 Deserializes and returns the given data in the format supported by the receiver (i.e. JSON, XML, etc) as a Foundation object representation.

 @param data The UTF-8 encoded data representation of the object to be deserialized.
 @param error A pointer to an `NSError` object.
 @return A Foundation object from the serialized data in data, or nil if an error occurs.
 */
+ (id)objectFromData:(NSData *)data error:(NSError **)error;

///----------------------------
/// @name Serializing an Object
///----------------------------

/**
 Serializes and returns a UTF-8 encoded data representation of the given Foundation object in the format supported by the receiver (i.e. JSON, XML, etc).

 @param object The object to be serialized.
 @param error A pointer to an NSError object.
 @return A data representation of the given object in UTF-8 encoding, or nil if an error occurred.
 */
+ (NSData *)dataFromObject:(id)object error:(NSError **)error;

@end


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--

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

 -->
<ns:tables xsi:schemaLocation="http://labkey.org/data/xml ../../../../../schemas/tableInfo.xsd" xmlns:ns="http://labkey.org/data/xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
</ns:tables>