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

    Licensed to Apereo under one or more contributor license
    agreements. See the NOTICE file distributed with this work
    for additional information regarding copyright ownership.
    Apereo licenses this file to you 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 the following location:

      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.

-->
<flow xmlns="http://www.springframework.org/schema/webflow" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/webflow
    http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">

    <on-start>
        <set name="flowScope.owners" value="permissionOwnerDao.getAllPermissionOwners()"></set>
    </on-start>

    <!-- Display the list of permission owner systems -->
    <view-state id="listOwners">
        <transition on="listActivities" to="listActivities">
            <set name="flowScope.owner" value="permissionOwnerDao.getPermissionOwner(requestParameters.ownerFname)"></set>
        </transition>
        <transition on="showActivity" to="showActivity">
            <set name="flowScope.owner" value="permissionOwnerDao.getPermissionOwner(requestParameters.ownerFname)"></set>
            <set name="flowScope.activity" value="permissionOwnerDao.getPermissionActivity(owner.id, requestParameters.activityFname)"></set>
        </transition>
        <transition on="lookupPermission" to="permissionLookupResult"/>
    </view-state>

    <!-- Display the list of activities for the chosen owner system -->
    <view-state id="listActivities">
        <transition on="showActivity" to="showActivity">
            <set name="flowScope.activity" value="permissionOwnerDao.getPermissionActivity(owner.id, requestParameters.activityFname)"></set>
        </transition>
    </view-state>

    <!-- Display the details for a chosen permission activity -->
    <view-state id="showActivity">
        <transition on="activities" to="listActivities"/>
        <transition on="createPermission" to="selectTarget"/>
        <transition on="editPermission" to="edit-permission"/>
    </view-state>

    <!-- Select a new target on which to assign a permission -->
    <view-state id="selectTarget">
        <transition on="activities" to="listActivities"/>
        <transition on="permissions" to="showActivity"/>
        <transition on="cancel" to="showActivity"/>
        <transition on="editPermission" to="edit-permission"/>
    </view-state>

    <!-- Edit an existing permission -->
    <subflow-state id="edit-permission" subflow="edit-permission">
        <on-entry>
            <set name="flashScope.breadcrumbs" value="new java.util.LinkedHashMap()"/>
            <evaluate expression="breadcrumbs.put('listOwners', 'Categories')"/>
            <evaluate expression="breadcrumbs.put('listActivities', owner.name)"/>
            <evaluate expression="breadcrumbs.put('showActivity', activity.name)"/>
            <set name="flashScope.principals" value="permissionAdministrationHelper.getCurrentPrincipals(owner, activity, requestParameters.target)"/>
            <set name="flashScope.targetProvider" value="permissionTargetProviderRegistry.getTargetProvider(activity.targetProviderKey)"/>
            <set name="flashScope.target" value="targetProvider.getTarget(requestParameters.target)"/>
        </on-entry>

        <input name="owner" value="owner"/>
        <input name="activity" value="activity"/>
        <input name="target" value="flashScope.target"/>
        <input name="principals" value="principals"/>
        <input name="breadcrumbs" value="breadcrumbs"/>
        <output name="breadcrumb" value="flowScope.breadcrumb"/>

        <transition on="cancel" to="showActivity"/>
        <transition on="done" to="showActivity"/>
        <transition on="#{breadcrumb == 'listOwners'}" to="listOwners"/>
        <transition on="#{breadcrumb == 'listActivities'}" to="listActivities"/>
        <transition on="#{breadcrumb == 'showActivity'}" to="showActivity"/>
    </subflow-state>

    <!-- VIEW PERMISSIONS view state -->
    <view-state id="permissionLookupResult">
        <on-entry>
            <set name="viewScope.principal" value="requestParameters.principal"/>
            <set name="viewScope.activity" value="requestParameters.activity"/>
            <set name="viewScope.principalDisplayName" value="requestParameters.principalDisplayName"/>
            <set name="viewScope.activityDisplayName" value="requestParameters.activityDisplayName"/>
        </on-entry>
        <transition on="editPermission" to="edit-permission">
            <set name="flowScope.owner" value="permissionOwnerDao.getPermissionOwner(requestParameters.owner)"/>
            <set name="flowScope.activity" value="permissionOwnerDao.getPermissionActivity(owner.id, requestParameters.activity)"/>
        </transition>
    </view-state>

    <!-- End state -->
    <end-state id="finishPermissionEdit" />

    <global-transitions>
        <transition on="owners" to="listOwners"/>
    </global-transitions>

</flow>


text:
'use strict';

describe('Directive: chartLine', function () {

  // load the directive's module
  beforeEach(module('cyanogenmodDistributionApp'));

  var element,
    scope;

  beforeEach(inject(function ($rootScope) {
    scope = $rootScope.$new();
  }));

  it('should make hidden element visible', inject(function ($compile) {
    element = angular.element('<chart-line></chart-line>');
    element = $compile(element)(scope);
    expect(element.text()).toBe('this is the chartLine directive');
  }));
});

redpajama_set_name: RedPajamaGithub


text:
class kolakoski {
  public kolakoski() {
  }

  public static long GetIndex() {
    return 10L;
  }

  public static long GetMultiplier(long index) {
    switch ((int)index) {
      case 0: return 1L;
      case 1: return 1L;
      case 2: return 1L;
      case 3: return 1L;
      case 4: return 1L;
      case 5: return 1L;
      case 6: return 1L;
      case 7: return 1L;
      case 8: return 1L;
      case 9: return 1L;
      default: throw new IllegalArgumentException("Invalid argument");
    }
  }
}


text:
package com.netflix.spinnaker.clouddriver.cache;

import com.netflix.spectator.api.BasicTag;
import com.netflix.spectator.api.Id;
import com.netflix.spectator.api.Registry;
import com.netflix.spectator.api.Tag;
import com.netflix.spinnaker.cats.dynomite.cache.DynomiteCache.CacheMetrics;

import java.util.Arrays;

public class SpectatorDynomiteCacheMetrics implements CacheMetrics {

  private final Registry registry;

  SpectatorDynomiteCacheMetrics(Registry registry) {
    this.registry = registry;
  }

  @Override
  public void merge(String prefix, String type, int itemCount, int relationshipCount, int hashMatches, int hashUpdates, int saddOperations, int hmsetOperations, int expireOperations, int delOperations) {
    final Iterable<Tag> tags = tags(prefix, type);
    registry.counter(id("cats.dynomiteCache.merge", "itemCount", tags)).increment(itemCount);
    registry.counter(id("cats.dynomiteCache.merge", "relationshipCount", tags)).increment(relationshipCount);
    registry.counter(id("cats.dynomiteCache.merge", "hashMatches", tags)).increment(hashMatches);
    registry.counter(id("cats.dynomiteCache.merge", "hashUpdates", tags)).increment(hashUpdates);
    registry.counter(id("cats.dynomiteCache.merge", "saddOperations", tags)).increment(saddOperations);
    registry.counter(id("cats.dynomiteCache.merge", "hmsetOperations", tags)).increment(hmsetOperations);
    registry.counter(id("cats.dynomiteCache.merge", "expireOperations", tags)).increment(expireOperations);
    registry.counter(id("cats.dynomiteCache.merge", "delOperations", tags)).increment(delOperations);
  }

  @Override
  public void evict(String prefix, String type, int itemCount, int delOperations, int sremOperations) {
    final Iterable<Tag> tags = tags(prefix, type);
    registry.counter(id("cats.dynomiteCache.evict", "itemCount", tags)).increment(itemCount);
    registry.counter(id("cats.dynomiteCache.evict", "delOperations", tags)).increment(delOperations);
    registry.counter(id("cats.dynomiteCache.evict", "sremOperations", tags)).increment(sremOperations);
  }

  @Override
  public void get(String prefix, String type, int itemCount, int requestedSize, int relationshipsRequested, int hmgetAllOperations) {
    final Iterable<Tag> tags = tags(prefix, type);
    registry.counter(id("cats.dynomiteCache.get", "itemCount", tags)).increment(itemCount);
    registry.counter(id("cats.dynomiteCache.get", "requestedSize", tags)).increment(requestedSize);
    registry.counter(id("cats.dynomiteCache.get", "relationshipsRequested", tags)).increment(relationshipsRequested);
    registry.counter(id("cats.dynomiteCache.get", "hmgetAllOperations", tags)).increment(hmgetAllOperations);
  }

  private Id id(String metricGroup, String metric, Iterable<Tag> tags) {
    return registry.createId(metricGroup + '.' + metric, tags);
  }

  private Iterable<Tag> tags(String prefix, String type) {
    return Arrays.asList(new BasicTag("prefix", prefix), new BasicTag("type", type));
  }
}


text:
require 'benchmark'

module Jinx
  # Stopwatch is a simple execution time accumulator.
  class Stopwatch
    # Time accumulates elapsed real time and total CPU time.
    class Time
      # @return [Benchmark::Tms] the Tms wrapped by this Time
      attr_reader :tms

      # @param [Benchmark::Tms, nil] the starting time (default is now)
      def initialize(tms=nil)
        @tms = tms || Benchmark::Tms.new
      end

      # @return [Numeric] the cumulative elapsed real clock time
      def elapsed
        @tms.real
      end

      #  @return [Numeric] the cumulative CPU total time
      def cpu
        @tms.total
      end

      # Adds the time to execute the given block to this time.
      #
      #  @return [Numeric] the split execution Time
      def split(&block)
        stms = Benchmark.measure(&block)
        @tms += stms
        Time.new(stms)
      end

      # Sets this benchmark timer to zero.
      def reset
        @tms = Benchmark::Tms.new
      end
    end

    # Executes the given block
    #
    # @return [Numeric] the execution Time
    def self.measure(&block)
      new.run(&block)
    end

    # Creates a new idle Stopwatch.
    def initialize
      @time = Time.new
    end

    # Executes the given block. Accumulates the execution time in this Stopwatch.
    #
    #  @return [Numeric] the execution run Time
    def run(&block)
      @time.split(&block)
    end

    # @return [Numeric] the cumulative elapsed real clock time spent in {#run} executions
    def elapsed
      @time.elapsed
    end

    # @return [Numeric] the cumulative CPU total time spent in {#run} executions for the
    #  current process and its children
    def cpu
      @time.cpu
    end

    # Resets this Stopwatch's cumulative time to zero.
    def reset
      @time.reset
    end
  end
end


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

<recipeml version="0.5">
  <recipe>
    <head>
      <title>Alfred Portale's Lemon Basil Pasta</title>
      <categories>
        <cat>Pasta</cat></categories>
      <yield>1</yield></head>
    <ingredients>
      <ing>
        <amt>
          <qty>1/2</qty>
          <unit>cups</unit></amt>
        <item>Whipping Cream</item></ing>
      <ing>
        <amt>
          <qty>8</qty>
          <unit>tablespoons</unit></amt>
        <item>Unsalted Butter; Cut Into Pieces</item></ing>
      <ing>
        <amt>
          <qty>2</qty>
          <unit>tablespoons</unit></amt>
        <item>Fresh Lemon Juice; (+ More As Needed)</item></ing>
      <ing>
        <amt>
          <qty>1</qty>
          <unit/></amt>
        <item>Clove Garlic (Small); Finely Minced</item></ing>
      <ing>
        <amt>
          <qty/>
          <unit/></amt>
        <item>Coarse Salt</item></ing>
      <ing>
        <amt>
          <qty/>
          <unit/></amt>
        <item>Freshly Ground White Pepper To Taste</item></ing>
      <ing>
        <amt>
          <qty/>
          <unit/></amt>
        <item>Cayenne Pepper To Taste</item></ing>
      <ing>
        <amt>
          <qty>1</qty>
          <unit>pound</unit></amt>
        <item>Fresh Or Dried Linguine Or Tagliarini</item></ing>
      <ing>
        <amt>
          <qty>2</qty>
          <unit>tablespoons</unit></amt>
        <item>Fresh Chives; Finely Minced</item></ing></ingredients>
    <directions>
      <step>  1. In a medium saucepan, bring cream to a boil over medium-high heat. Cook
  until slightly thickened, about 5 minutes. Remove from heat and whisk in
  butter, 1 tablespoon at a time, to make a creamy sauce. Whisk in lemon
  juice and garlic. Taste, and season with salt, white pepper and cayenne.

  2. Meanwhile, bring a large pot of salted water to a boil over high heat.
  Add the linguine and cook until al dente, 2 to 3 minutes for fresh, 8 to 10
  minutes for dried. Drain well. Return to the warm pot.

  3. Add the warm sauce, chopped basil and chives. Toss well. Taste the sauce
  to check for an authoritative tang. Season with more lemon juice, salt,
  white pepper and cayenne as needed.

  4. Using a carving fork with two long, straight tines, spear a serving of
  pasta onto the bottom tine. Place the pasta-entwined fork over a plate, and
  invert the fork, letting the pasta slide off into a neat stack. Repeat with
  the remaining pasta. Garnish with the whole basil leaves and serve
  immediately.

  NOTE: For a variation on the basil, use 1 tablespoon of chopped fresh
  tarragon and garnish with whole tarragon sprigs.

  Chicago Tribune Magazine 12/14/97 From: Alfred Portale's Gotham Bar and
  Grill Cookbook

  Recipe by: Alfred Portale

  Posted to MC-Recipe Digest V1 #1027 by Carriej999 <Carriej999@aol.com> on
  Jan 21, 1998

</step></directions></recipe></recipeml>


text:
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace NuPattern.Authoring.PatternToolkitLibrary
{
	using global::NuPattern.Runtime;
	using global::NuPattern.Runtime.Bindings;
	using global::NuPattern.Runtime.ToolkitInterface;
	using global::System;
	using global::System.Collections.Generic;
	using global::System.ComponentModel;
	using global::System.ComponentModel.Composition;
	using global::System.ComponentModel.Design;
	using global::System.Drawing.Design;
	using Runtime = global::NuPattern.Runtime;

	/// <summary>
	/// A custom automation command that executes some automation.
	/// </summary>
	[Description("A custom automation command that executes some automation.")]
	[ToolkitInterfaceProxy(ExtensionId = "97bd7ab2-964b-43f1-8a08-be6db68b018b", DefinitionId = "5a6b3a47-aabf-4f51-bd30-0737f6d4bbbe", ProxyType = typeof(Command))]
	[System.CodeDom.Compiler.GeneratedCode("NuPattern Toolkit Library", "1.4.24.0")]
	[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
	internal partial class Command : ICommand
	{

		private Runtime.IAbstractElement target;
		private IAbstractElementProxy<ICommand> proxy;

		/// <summary>
		/// Creates a new instance of the <see cref="Command"/> class.
		/// </summary>
		[ImportingConstructor]
		private Command() { }

		/// <summary>
		/// Creates a new instance of the <see cref="Command"/> class.
		/// </summary>
		public Command(Runtime.IAbstractElement target)
		{
			this.target = target;
			this.proxy = target.ProxyFor<ICommand>();
			OnCreated();
		}

		/// <summary>
		/// When overridden, initializes the class.
		/// </summary>
		partial void OnCreated();

		/// <summary>
		/// The name of this element instance.
		/// </summary>
		[Description("The name of this element instance.")]
		[ParenthesizePropertyName(true)]
		public virtual String InstanceName
		{
			get { return this.proxy.GetValue(() => this.InstanceName); }
			set { this.proxy.SetValue(() => this.InstanceName, value); }
		}

		/// <summary>
		/// The order of this element relative to its siblings.
		/// </summary>
		[Description("The order of this element relative to its siblings.")]
		[ReadOnly(true)]
		public virtual Double InstanceOrder
		{
			get { return this.proxy.GetValue(() => this.InstanceOrder); }
			set { this.proxy.SetValue(() => this.InstanceOrder, value); }
		}

		/// <summary>
		/// The references of this element.
		/// </summary>
		[Description("The references of this element.")]
		public virtual IEnumerable<IReference> References
		{
			get { return this.proxy.GetValue(() => this.References); }
		}

		/// <summary>
		/// Notes for this element.
		/// </summary>
		[Description("Notes for this element.")]
		[Editor(typeof(MultilineStringEditor), typeof(UITypeEditor))]
		public virtual String Notes
		{
			get { return this.proxy.GetValue(() => this.Notes); }
			set { this.proxy.SetValue(() => this.Notes, value); }
		}

		/// <summary>
		/// Gets or sets the InTransaction property.
		/// </summary>
		public virtual Boolean InTransaction
		{
			get { return this.proxy.GetValue(() => this.InTransaction); }
		}

		/// <summary>
		/// Gets or sets the IsSerializing property.
		/// </summary>
		public virtual Boolean IsSerializing
		{
			get { return this.proxy.GetValue(() => this.IsSerializing); }
		}

		/// <summary>
		/// Gets the parent element.
		/// </summary>
		public virtual ICommands Parent
		{
			get { return this.target.Parent.As<ICommands>(); }
		}

		/// <summary>
		/// Deletes this element.
		/// </summary>
		public virtual void Delete()
		{
			this.target.Delete();
		}

		/// <summary>
		/// Gets the generalized interface (<see cref="Runtime.IElement"/>) of this element.
		/// </summary>
		public virtual Runtime.IElement AsElement()
		{
			return this.As<Runtime.IElement>();
		}

		/// <summary>
		/// Gets the specified generalized interface of this element, if possible.
		/// </summary>
		public virtual TGeneralizedInterface As<TGeneralizedInterface>() where TGeneralizedInterface : class
		{
			return this.target as TGeneralizedInterface;
		}
	}
}

namespace NuPattern.Authoring.PatternToolkitLibrary
{
	using global::NuPattern.Runtime;
	using global::NuPattern.Runtime.Bindings;
	using global::NuPattern.Runtime.ToolkitInterface;
	using global::System;
	using global::System.Collections.Generic;
	using global::System.ComponentModel;
	using global::System.ComponentModel.Composition;
	using global::System.ComponentModel.Design;
	using global::System.Drawing.Design;
	using Runtime = global::NuPattern.Runtime;

	/// <summary>
	/// A custom condition that is evaluated to determine if automation executes.
	/// </summary>
	[Description("A custom condition that is evaluated to determine if automation executes.")]
	[ToolkitInterfaceProxy(ExtensionId = "97bd7ab2-964b-43f1-8a08-be6db68b018b", DefinitionId = "2d022abe-eaf9-4366-843a-a9d262ef4b00", ProxyType = typeof(Condition))]
	[System.CodeDom.Compiler.GeneratedCode("NuPattern Toolkit Library", "1.4.24.0")]
	[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
	internal partial class Condition : ICondition
	{

		private Runtime.IAbstractElement target;
		private IAbstractElementProxy<ICondition> proxy;

		/// <summary>
		/// Creates a new instance of the <see cref="Condition"/> class.
		/// </summary>
		[ImportingConstructor]
		private Condition() { }

		/// <summary>
		/// Creates a new instance of the <see cref="Condition"/> class.
		/// </summary>
		public Condition(Runtime.IAbstractElement target)
		{
			this.target = target;
			this.proxy = target.ProxyFor<ICondition>();
			OnCreated();
		}

		/// <summary>
		/// When overridden, initializes the class.
		/// </summary>
		partial void OnCreated();

		/// <summary>
		/// The name of this element instance.
		/// </summary>
		[Description("The name of this element instance.")]
		[ParenthesizePropertyName(true)]
		public virtual String InstanceName
		{
			get { return this.proxy.GetValue(() => this.InstanceName); }
			set { this.proxy.SetValue(() => this.InstanceName, value); }
		}

		/// <summary>
		/// The order of this element relative to its siblings.
		/// </summary>
		[Description("The order of this element relative to its siblings.")]
		[ReadOnly(true)]
		public virtual Double InstanceOrder
		{
			get { return this.proxy.GetValue(() => this.InstanceOrder); }
			set { this.proxy.SetValue(() => this.InstanceOrder, value); }
		}

		/// <summary>
		/// The references of this element.
		/// </summary>
		[Description("The references of this element.")]
		public virtual IEnumerable<IReference> References
		{
			get { return this.proxy.GetValue(() => this.References); }
		}

		/// <summary>
		/// Notes for this element.
		/// </summary>
		[Description("Notes for this element.")]
		[Editor(typeof(MultilineStringEditor), typeof(UITypeEditor))]
		public virtual String Notes
		{
			get { return this.proxy.GetValue(() => this.Notes); }
			set { this.proxy.SetValue(() => this.Notes, value); }
		}

		/// <summary>
		/// Gets or sets the InTransaction property.
		/// </summary>
		public virtual Boolean InTransaction
		{
			get { return this.proxy.GetValue(() => this.InTransaction); }
		}

		/// <summary>
		/// Gets or sets the IsSerializing property.
		/// </summary>
		public virtual Boolean IsSerializing
		{
			get { return this.proxy.GetValue(() => this.IsSerializing); }
		}

		/// <summary>
		/// Gets the parent element.
		/// </summary>
		public virtual IConditions Parent
		{
			get { return this.target.Parent.As<IConditions>(); }
		}

		/// <summary>
		/// Deletes this element.
		/// </summary>
		public virtual void Delete()
		{
			this.target.Delete();
		}

		/// <summary>
		/// Gets the generalized interface (<see cref="Runtime.IElement"/>) of this element.
		/// </summary>
		public virtual Runtime.IElement AsElement()
		{
			return this.As<Runtime.IElement>();
		}

		/// <summary>
		/// Gets the specified generalized interface of this element, if possible.
		/// </summary>
		public virtual TGeneralizedInterface As<TGeneralizedInterface>() where TGeneralizedInterface : class
		{
			return this.target as TGeneralizedInterface;
		}
	}
}

namespace NuPattern.Authoring.PatternToolkitLibrary
{
	using global::NuPattern.Runtime;
	using global::NuPattern.Runtime.Bindings;
	using global::NuPattern.Runtime.ToolkitInterface;
	using global::System;
	using global::System.Collections.Generic;
	using global::System.ComponentModel;
	using global::System.ComponentModel.Composition;
	using global::System.ComponentModel.Design;
	using global::System.Drawing.Design;
	using Runtime = global::NuPattern.Runtime;

	/// <summary>
	/// A custom event that can trigger some automation.
	/// </summary>
	[Description("A custom event that can trigger some automation.")]
	[ToolkitInterfaceProxy(ExtensionId = "97bd7ab2-964b-43f1-8a08-be6db68b018b", DefinitionId = "d937c559-01f8-43ad-bac8-f580013fdd8a", ProxyType = typeof(Event))]
	[System.CodeDom.Compiler.GeneratedCode("NuPattern Toolkit Library", "1.4.24.0")]
	[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
	internal partial class Event : IEvent
	{

		private Runtime.IAbstractElement target;
		private IAbstractElementProxy<IEvent> proxy;

		/// <summary>
		/// Creates a new instance of the <see cref="Event"/> class.
		/// </summary>
		[ImportingConstructor]
		private Event() { }

		/// <summary>
		/// Creates a new instance of the <see cref="Event"/> class.
		/// </summary>
		public Event(Runtime.IAbstractElement target)
		{
			this.target = target;
			this.proxy = target.ProxyFor<IEvent>();
			OnCreated();
		}

		/// <summary>
		/// When overridden, initializes the class.
		/// </summary>
		partial void OnCreated();

		/// <summary>
		/// The name of this element instance.
		/// </summary>
		[Description("The name of this element instance.")]
		[ParenthesizePropertyName(true)]
		public virtual String InstanceName
		{
			get { return this.proxy.GetValue(() => this.InstanceName); }
			set { this.proxy.SetValue(() => this.InstanceName, value); }
		}

		/// <summary>
		/// The order of this element relative to its siblings.
		/// </summary>
		[Description("The order of this element relative to its siblings.")]
		[ReadOnly(true)]
		public virtual Double InstanceOrder
		{
			get { return this.proxy.GetValue(() => this.InstanceOrder); }
			set { this.proxy.SetValue(() => this.InstanceOrder, value); }
		}

		/// <summary>
		/// The references of this element.
		/// </summary>
		[Description("The references of this element.")]
		public virtual IEnumerable<IReference> References
		{
			get { return this.proxy.GetValue(() => this.References); }
		}

		/// <summary>
		/// Notes for this element.
		/// </summary>
		[Description("Notes for this element.")]
		[Editor(typeof(MultilineStringEditor), typeof(UITypeEditor))]
		public virtual String Notes
		{
			get { return this.proxy.GetValue(() => this.Notes); }
			set { this.proxy.SetValue(() => this.Notes, value); }
		}

		/// <summary>
		/// Gets or sets the InTransaction property.
		/// </summary>
		public virtual Boolean InTransaction
		{
			get { return this.proxy.GetValue(() => this.InTransaction); }
		}

		/// <summary>
		/// Gets or sets the IsSerializing property.
		/// </summary>
		public virtual Boolean IsSerializing
		{
			get { return this.proxy.GetValue(() => this.IsSerializing); }
		}

		/// <summary>
		/// Gets the parent element.
		/// </summary>
		public virtual IEvents Parent
		{
			get { return this.target.Parent.As<IEvents>(); }
		}

		/// <summary>
		/// Deletes this element.
		/// </summary>
		public virtual void Delete()
		{
			this.target.Delete();
		}

		/// <summary>
		/// Gets the generalized interface (<see cref="Runtime.IElement"/>) of this element.
		/// </summary>
		public virtual Runtime.IElement AsElement()
		{
			return this.As<Runtime.IElement>();
		}

		/// <summary>
		/// Gets the specified generalized interface of this element, if possible.
		/// </summary>
		public virtual TGeneralizedInterface As<TGeneralizedInterface>() where TGeneralizedInterface : class
		{
			return this.target as TGeneralizedInterface;
		}
	}
}

namespace NuPattern.Authoring.PatternToolkitLibrary
{
	using global::NuPattern.Runtime;
	using global::NuPattern.Runtime.Bindings;
	using global::NuPattern.Runtime.ToolkitInterface;
	using global::System;
	using global::System.Collections.Generic;
	using global::System.ComponentModel;
	using global::System.ComponentModel.Composition;
	using global::System.ComponentModel.Design;
	using global::System.Drawing.Design;
	using Runtime = global::NuPattern.Runtime;

	/// <summary>
	/// A custom type converter that can be used to define a dropdown of values for a variable property.
	/// </summary>
	[Description("A custom type converter that can be used to define a dropdown of values for a variable property.")]
	[ToolkitInterfaceProxy(ExtensionId = "97bd7ab2-964b-43f1-8a08-be6db68b018b", DefinitionId = "8d45d1e8-2551-4539-8449-ff3e0962d5f5", ProxyType = typeof(EnumTypeConverter))]
	[System.CodeDom.Compiler.GeneratedCode("NuPattern Toolkit Library", "1.4.24.0")]
	[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
	internal partial class EnumTypeConverter : IEnumTypeConverter
	{

		private Runtime.IAbstractElement target;
		private IAbstractElementProxy<IEnumTypeConverter> proxy;

		/// <summary>
		/// Creates a new instance of the <see cref="EnumTypeConverter"/> class.
		/// </summary>
		[ImportingConstructor]
		private EnumTypeConverter() { }

		/// <summary>
		/// Creates a new instance of the <see cref="EnumTypeConverter"/> class.
		/// </summary>
		public EnumTypeConverter(Runtime.IAbstractElement target)
		{
			this.target = target;
			this.proxy = target.ProxyFor<IEnumTypeConverter>();
			OnCreated();
		}

		/// <summary>
		/// When overridden, initializes the class.
		/// </summary>
		partial void OnCreated();

		/// <summary>
		/// The name of this element instance.
		/// </summary>
		[Description("The name of this element instance.")]
		[ParenthesizePropertyName(true)]
		public virtual String InstanceName
		{
			get { return this.proxy.GetValue(() => this.InstanceName); }
			set { this.proxy.SetValue(() => this.InstanceName, value); }
		}

		/// <summary>
		/// The order of this element relative to its siblings.
		/// </summary>
		[Description("The order of this element relative to its siblings.")]
		[ReadOnly(true)]
		public virtual Double InstanceOrder
		{
			get { return this.proxy.GetValue(() => this.InstanceOrder); }
			set { this.proxy.SetValue(() => this.InstanceOrder, value); }
		}

		/// <summary>
		/// The references of this element.
		/// </summary>
		[Description("The references of this element.")]
		public virtual IEnumerable<IReference> References
		{
			get { return this.proxy.GetValue(() => this.References); }
		}

		/// <summary>
		/// Notes for this element.
		/// </summary>
		[Description("Notes for this element.")]
		[Editor(typeof(MultilineStringEditor), typeof(UITypeEditor))]
		public virtual String Notes
		{
			get { return this.proxy.GetValue(() => this.Notes); }
			set { this.proxy.SetValue(() => this.Notes, value); }
		}

		/// <summary>
		/// Gets or sets the InTransaction property.
		/// </summary>
		public virtual Boolean InTransaction
		{
			get { return this.proxy.GetValue(() => this.InTransaction); }
		}

		/// <summary>
		/// Gets or sets the IsSerializing property.
		/// </summary>
		public virtual Boolean IsSerializing
		{
			get { return this.proxy.GetValue(() => this.IsSerializing); }
		}

		/// <summary>
		/// Gets the parent element.
		/// </summary>
		public virtual ITypeConverters Parent
		{
			get { return this.target.Parent.As<ITypeConverters>(); }
		}

		/// <summary>
		/// Deletes this element.
		/// </summary>
		public virtual void Delete()
		{
			this.target.Delete();
		}

		/// <summary>
		/// Gets the generalized interface (<see cref="Runtime.IElement"/>) of this element.
		/// </summary>
		public virtual Runtime.IElement AsElement()
		{
			return this.As<Runtime.IElement>();
		}

		/// <summary>
		/// Gets the specified generalized interface of this element, if possible.
		/// </summary>
		public virtual TGeneralizedInterface As<TGeneralizedInterface>() where TGeneralizedInterface : class
		{
			return this.target as TGeneralizedInterface;
		}
	}
}

namespace NuPattern.Authoring.PatternToolkitLibrary
{
	using global::NuPattern.Runtime;
	using global::NuPattern.Runtime.Bindings;
	using global::NuPattern.Runtime.ToolkitInterface;
	using global::System;
	using global::System.Collections.Generic;
	using global::System.ComponentModel;
	using global::System.ComponentModel.Composition;
	using global::System.ComponentModel.Design;
	using global::System.Drawing.Design;
	using Runtime = global::NuPattern.Runtime;

	/// <summary>
	/// Description for PatternToolkitLibrary.Development.TypeConverters.DataTypeConverter
	/// </summary>
	[Description("Description for PatternToolkitLibrary.Development.TypeConverters.DataTypeConverter")]
	[ToolkitInterfaceProxy(ExtensionId = "97bd7ab2-964b-43f1-8a08-be6db68b018b", DefinitionId = "4caa371c-0404-4dcd-ba61-457962baaa53", ProxyType = typeof(DataTypeConverter))]
	[System.CodeDom.Compiler.GeneratedCode("NuPattern Toolkit Library", "1.4.24.0")]
	[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
	internal partial class DataTypeConverter : IDataTypeConverter
	{

		private Runtime.IAbstractElement target;
		private IAbstractElementProxy<IDataTypeConverter> proxy;

		/// <summary>
		/// Creates a new instance of the <see cref="DataTypeConverter"/> class.
		/// </summary>
		[ImportingConstructor]
		private DataTypeConverter() { }

		/// <summary>
		/// Creates a new instance of the <see cref="DataTypeConverter"/> class.
		/// </summary>
		public DataTypeConverter(Runtime.IAbstractElement target)
		{
			this.target = target;
			this.proxy = target.ProxyFor<IDataTypeConverter>();
			OnCreated();
		}

		/// <summary>
		/// When overridden, initializes the class.
		/// </summary>
		partial void OnCreated();

		/// <summary>
		/// The name of this element instance.
		/// </summary>
		[Description("The name of this element instance.")]
		[ParenthesizePropertyName(true)]
		public virtual String InstanceName
		{
			get { return this.proxy.GetValue(() => this.InstanceName); }
			set { this.proxy.SetValue(() => this.InstanceName, value); }
		}

		/// <summary>
		/// The order of this element relative to its siblings.
		/// </summary>
		[Description("The order of this element relative to its siblings.")]
		[ReadOnly(true)]
		public virtual Double InstanceOrder
		{
			get { return this.proxy.GetValue(() => this.InstanceOrder); }
			set { this.proxy.SetValue(() => this.InstanceOrder, value); }
		}

		/// <summary>
		/// The references of this element.
		/// </summary>
		[Description("The references of this element.")]
		public virtual IEnumerable<IReference> References
		{
			get { return this.proxy.GetValue(() => this.References); }
		}

		/// <summary>
		/// Notes for this element.
		/// </summary>
		[Description("Notes for this element.")]
		[Editor(typeof(MultilineStringEditor), typeof(UITypeEditor))]
		public virtual String Notes
		{
			get { return this.proxy.GetValue(() => this.Notes); }
			set { this.proxy.SetValue(() => this.Notes, value); }
		}

		/// <summary>
		/// Gets or sets the InTransaction property.
		/// </summary>
		public virtual Boolean InTransaction
		{
			get { return this.proxy.GetValue(() => this.InTransaction); }
		}

		/// <summary>
		/// Gets or sets the IsSerializing property.
		/// </summary>
		public virtual Boolean IsSerializing
		{
			get { return this.proxy.GetValue(() => this.IsSerializing); }
		}

		/// <summary>
		/// Gets the parent element.
		/// </summary>
		public virtual ITypeConverters Parent
		{
			get { return this.target.Parent.As<ITypeConverters>(); }
		}

		/// <summary>
		/// Deletes this element.
		/// </summary>
		public virtual void Delete()
		{
			this.target.Delete();
		}

		/// <summary>
		/// Gets the generalized interface (<see cref="Runtime.IElement"/>) of this element.
		/// </summary>
		public virtual Runtime.IElement AsElement()
		{
			return this.As<Runtime.IElement>();
		}

		/// <summary>
		/// Gets the specified generalized interface of this element, if possible.
		/// </summary>
		public virtual TGeneralizedInterface As<TGeneralizedInterface>() where TGeneralizedInterface : class
		{
			return this.target as TGeneralizedInterface;
		}
	}
}

namespace NuPattern.Authoring.PatternToolkitLibrary
{
	using global::NuPattern.Runtime;
	using global::NuPattern.Runtime.Bindings;
	using global::NuPattern.Runtime.ToolkitInterface;
	using global::System;
	using global::System.Collections.Generic;
	using global::System.ComponentModel;
	using global::System.ComponentModel.Composition;
	using global::System.ComponentModel.Design;
	using global::System.Drawing.Design;
	using Runtime = global::NuPattern.Runtime;

	/// <summary>
	/// A custom type picker editor that displays a filtered list of types found in the current solution.
	/// </summary>
	[Description("A custom type picker editor that displays a filtered list of types found in the current solution.")]
	[ToolkitInterfaceProxy(ExtensionId = "97bd7ab2-964b-43f1-8a08-be6db68b018b", DefinitionId = "4a6d1cc8-3845-4b08-b2b1-e27a1a6e9c9f", ProxyType = typeof(TypePickerEditor))]
	[System.CodeDom.Compiler.GeneratedCode("NuPattern Toolkit Library", "1.4.24.0")]
	[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
	internal partial class TypePickerEditor : ITypePickerEditor
	{

		private Runtime.IAbstractElement target;
		private IAbstractElementProxy<ITypePickerEditor> proxy;

		/// <summary>
		/// Creates a new instance of the <see cref="TypePickerEditor"/> class.
		/// </summary>
		[ImportingConstructor]
		private TypePickerEditor() { }

		/// <summary>
		/// Creates a new instance of the <see cref="TypePickerEditor"/> class.
		/// </summary>
		public TypePickerEditor(Runtime.IAbstractElement target)
		{
			this.target = target;
			this.proxy = target.ProxyFor<ITypePickerEditor>();
			OnCreated();
		}

		/// <summary>
		/// When overridden, initializes the class.
		/// </summary>
		partial void OnCreated();

		/// <summary>
		/// The name of this element instance.
		/// </summary>
		[Description("The name of this element instance.")]
		[ParenthesizePropertyName(true)]
		public virtual String InstanceName
		{
			get { return this.proxy.GetValue(() => this.InstanceName); }
			set { this.proxy.SetValue(() => this.InstanceName, value); }
		}

		/// <summary>
		/// The order of this element relative to its siblings.
		/// </summary>
		[Description("The order of this element relative to its siblings.")]
		[ReadOnly(true)]
		public virtual Double InstanceOrder
		{
			get { return this.proxy.GetValue(() => this.InstanceOrder); }
			set { this.proxy.SetValue(() => this.InstanceOrder, value); }
		}

		/// <summary>
		/// The references of this element.
		/// </summary>
		[Description("The references of this element.")]
		public virtual IEnumerable<IReference> References
		{
			get { return this.proxy.GetValue(() => this.References); }
		}

		/// <summary>
		/// Notes for this element.
		/// </summary>
		[Description("Notes for this element.")]
		[Editor(typeof(MultilineStringEditor), typeof(UITypeEditor))]
		public virtual String Notes
		{
			get { return this.proxy.GetValue(() => this.Notes); }
			set { this.proxy.SetValue(() => this.Notes, value); }
		}

		/// <summary>
		/// Gets or sets the InTransaction property.
		/// </summary>
		public virtual Boolean InTransaction
		{
			get { return this.proxy.GetValue(() => this.InTransaction); }
		}

		/// <summary>
		/// Gets or sets the IsSerializing property.
		/// </summary>
		public virtual Boolean IsSerializing
		{
			get { return this.proxy.GetValue(() => this.IsSerializing); }
		}

		/// <summary>
		/// Gets the parent element.
		/// </summary>
		public virtual ITypeEditors Parent
		{
			get { return this.target.Parent.As<ITypeEditors>(); }
		}

		/// <summary>
		/// Deletes this element.
		/// </summary>
		public virtual void Delete()
		{
			this.target.Delete();
		}

		/// <summary>
		/// Gets the generalized interface (<see cref="Runtime.IElement"/>) of this element.
		/// </summary>
		public virtual Runtime.IElement AsElement()
		{
			return this.As<Runtime.IElement>();
		}

		/// <summary>
		/// Gets the specified generalized interface of this element, if possible.
		/// </summary>
		public virtual TGeneralizedInterface As<TGeneralizedInterface>() where TGeneralizedInterface : class
		{
			return this.target as TGeneralizedInterface;
		}
	}
}

namespace NuPattern.Authoring.PatternToolkitLibrary
{
	using global::NuPattern.Runtime;
	using global::NuPattern.Runtime.Bindings;
	using global::NuPattern.Runtime.ToolkitInterface;
	using global::System;
	using global::System.Collections.Generic;
	using global::System.ComponentModel;
	using global::System.ComponentModel.Composition;
	using global::System.ComponentModel.Design;
	using global::System.Drawing.Design;
	using Runtime = global::NuPattern.Runtime;

	/// <summary>
	/// A custom editor that provides a custom GUI to configure the value of a variable property.
	/// </summary>
	[Description("A custom editor that provides a custom GUI to configure the value of a variable property.")]
	[ToolkitInterfaceProxy(ExtensionId = "97bd7ab2-964b-43f1-8a08-be6db68b018b", DefinitionId = "27b16755-4f3e-43a6-80ee-38cad4dec8ab", ProxyType = typeof(UIEditor))]
	[System.CodeDom.Compiler.GeneratedCode("NuPattern Toolkit Library", "1.4.24.0")]
	[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
	internal partial class UIEditor : IUIEditor
	{

		private Runtime.IAbstractElement target;
		private IAbstractElementProxy<IUIEditor> proxy;

		/// <summary>
		/// Creates a new instance of the <see cref="UIEditor"/> class.
		/// </summary>
		[ImportingConstructor]
		private UIEditor() { }

		/// <summary>
		/// Creates a new instance of the <see cref="UIEditor"/> class.
		/// </summary>
		public UIEditor(Runtime.IAbstractElement target)
		{
			this.target = target;
			this.proxy = target.ProxyFor<IUIEditor>();
			OnCreated();
		}

		/// <summary>
		/// When overridden, initializes the class.
		/// </summary>
		partial void OnCreated();

		/// <summary>
		/// The name of this element instance.
		/// </summary>
		[Description("The name of this element instance.")]
		[ParenthesizePropertyName(true)]
		public virtual String InstanceName
		{
			get { return this.proxy.GetValue(() => this.InstanceName); }
			set { this.proxy.SetValue(() => this.InstanceName, value); }
		}

		/// <summary>
		/// The order of this element relative to its siblings.
		/// </summary>
		[Description("The order of this element relative to its siblings.")]
		[ReadOnly(true)]
		public virtual Double InstanceOrder
		{
			get { return this.proxy.GetValue(() => this.InstanceOrder); }
			set { this.proxy.SetValue(() => this.InstanceOrder, value); }
		}

		/// <summary>
		/// The references of this element.
		/// </summary>
		[Description("The references of this element.")]
		public virtual IEnumerable<IReference> References
		{
			get { return this.proxy.GetValue(() => this.References); }
		}

		/// <summary>
		/// Notes for this element.
		/// </summary>
		[Description("Notes for this element.")]
		[Editor(typeof(MultilineStringEditor), typeof(UITypeEditor))]
		public virtual String Notes
		{
			get { return this.proxy.GetValue(() => this.Notes); }
			set { this.proxy.SetValue(() => this.Notes, value); }
		}

		/// <summary>
		/// Gets or sets the InTransaction property.
		/// </summary>
		public virtual Boolean InTransaction
		{
			get { return this.proxy.GetValue(() => this.InTransaction); }
		}

		/// <summary>
		/// Gets or sets the IsSerializing property.
		/// </summary>
		public virtual Boolean IsSerializing
		{
			get { return this.proxy.GetValue(() => this.IsSerializing); }
		}

		/// <summary>
		/// Gets the parent element.
		/// </summary>
		public virtual ITypeEditors Parent
		{
			get { return this.target.Parent.As<ITypeEditors>(); }
		}

		/// <summary>
		/// Deletes this element.
		/// </summary>
		public virtual void Delete()
		{
			this.target.Delete();
		}

		/// <summary>
		/// Gets the generalized interface (<see cref="Runtime.IElement"/>) of this element.
		/// </summary>
		public virtual Runtime.IElement AsElement()
		{
			return this.As<Runtime.IElement>();
		}

		/// <summary>
		/// Gets the specified generalized interface of this element, if possible.
		/// </summary>
		public virtual TGeneralizedInterface As<TGeneralizedInterface>() where TGeneralizedInterface : class
		{
			return this.target as TGeneralizedInterface;
		}
	}
}

namespace NuPattern.Authoring.PatternToolkitLibrary
{
	using global::NuPattern.Runtime;
	using global::NuPattern.Runtime.Bindings;
	using global::NuPattern.Runtime.ToolkitInterface;
	using global::System;
	using global::System.Collections.Generic;
	using global::System.ComponentModel;
	using global::System.ComponentModel.Composition;
	using global::System.ComponentModel.Design;
	using global::System.Drawing.Design;
	using Runtime = global::NuPattern.Runtime;

	/// <summary>
	/// A custom element validation rule for verifying an element.
	/// </summary>
	[Description("A custom element validation rule for verifying an element.")]
	[ToolkitInterfaceProxy(ExtensionId = "97bd7ab2-964b-43f1-8a08-be6db68b018b", DefinitionId = "ab7af436-f1f6-4d3e-b78d-f90a5f81d636", ProxyType = typeof(ElementValidationRule))]
	[System.CodeDom.Compiler.GeneratedCode("NuPattern Toolkit Library", "1.4.24.0")]
	[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
	internal partial class ElementValidationRule : IElementValidationRule
	{

		private Runtime.IAbstractElement target;
		private IAbstractElementProxy<IElementValidationRule> proxy;

		/// <summary>
		/// Creates a new instance of the <see cref="ElementValidationRule"/> class.
		/// </summary>
		[ImportingConstructor]
		private ElementValidationRule() { }

		/// <summary>
		/// Creates a new instance of the <see cref="ElementValidationRule"/> class.
		/// </summary>
		public ElementValidationRule(Runtime.IAbstractElement target)
		{
			this.target = target;
			this.proxy = target.ProxyFor<IElementValidationRule>();
			OnCreated();
		}

		/// <summary>
		/// When overridden, initializes the class.
		/// </summary>
		partial void OnCreated();

		/// <summary>
		/// The name of this element instance.
		/// </summary>
		[Description("The name of this element instance.")]
		[ParenthesizePropertyName(true)]
		public virtual String InstanceName
		{
			get { return this.proxy.GetValue(() => this.InstanceName); }
			set { this.proxy.SetValue(() => this.InstanceName, value); }
		}

		/// <summary>
		/// The order of this element relative to its siblings.
		/// </summary>
		[Description("The order of this element relative to its siblings.")]
		[ReadOnly(true)]
		public virtual Double InstanceOrder
		{
			get { return this.proxy.GetValue(() => this.InstanceOrder); }
			set { this.proxy.SetValue(() => this.InstanceOrder, value); }
		}

		/// <summary>
		/// The references of this element.
		/// </summary>
		[Description("The references of this element.")]
		public virtual IEnumerable<IReference> References
		{
			get { return this.proxy.GetValue(() => this.References); }
		}

		/// <summary>
		/// Notes for this element.
		/// </summary>
		[Description("Notes for this element.")]
		[Editor(typeof(MultilineStringEditor), typeof(UITypeEditor))]
		public virtual String Notes
		{
			get { return this.proxy.GetValue(() => this.Notes); }
			set { this.proxy.SetValue(() => this.Notes, value); }
		}

		/// <summary>
		/// Gets or sets the InTransaction property.
		/// </summary>
		public virtual Boolean InTransaction
		{
			get { return this.proxy.GetValue(() => this.InTransaction); }
		}

		/// <summary>
		/// Gets or sets the IsSerializing property.
		/// </summary>
		public virtual Boolean IsSerializing
		{
			get { return this.proxy.GetValue(() => this.IsSerializing); }
		}

		/// <summary>
		/// Gets the parent element.
		/// </summary>
		public virtual IValidationRules Parent
		{
			get { return this.target.Parent.As<IValidationRules>(); }
		}

		/// <summary>
		/// Deletes this element.
		/// </summary>
		public virtual void Delete()
		{
			this.target.Delete();
		}

		/// <summary>
		/// Gets the generalized interface (<see cref="Runtime.IElement"/>) of this element.
		/// </summary>
		public virtual Runtime.IElement AsElement()
		{
			return this.As<Runtime.IElement>();
		}

		/// <summary>
		/// Gets the specified generalized interface of this element, if possible.
		/// </summary>
		public virtual TGeneralizedInterface As<TGeneralizedInterface>() where TGeneralizedInterface : class
		{
			return this.target as TGeneralizedInterface;
		}
	}
}

namespace NuPattern.Authoring.PatternToolkitLibrary
{
	using global::NuPattern.Runtime;
	using global::NuPattern.Runtime.Bindings;
	using global::NuPattern.Runtime.ToolkitInterface;
	using global::System;
	using global::System.Collections.Generic;
	using global::System.ComponentModel;
	using global::System.ComponentModel.Composition;
	using global::System.ComponentModel.Design;
	using global::System.Drawing.Design;
	using Runtime = global::NuPattern.Runtime;

	/// <summary>
	/// A custom property validation rule for verifying a property.
	/// </summary>
	[Description("A custom property validation rule for verifying a property.")]
	[ToolkitInterfaceProxy(ExtensionId = "97bd7ab2-964b-43f1-8a08-be6db68b018b", DefinitionId = "ffa532c8-f334-4bda-b9de-cb208f6d2a81", ProxyType = typeof(PropertyValidationRule))]
	[System.CodeDom.Compiler.GeneratedCode("NuPattern Toolkit Library", "1.4.24.0")]
	[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
	internal partial class PropertyValidationRule : IPropertyValidationRule
	{

		private Runtime.IAbstractElement target;
		private IAbstractElementProxy<IPropertyValidationRule> proxy;

		/// <summary>
		/// Creates a new instance of the <see cref="PropertyValidationRule"/> class.
		/// </summary>
		[ImportingConstructor]
		private PropertyValidationRule() { }

		/// <summary>
		/// Creates a new instance of the <see cref="PropertyValidationRule"/> class.
		/// </summary>
		public PropertyValidationRule(Runtime.IAbstractElement target)
		{
			this.target = target;
			this.proxy = target.ProxyFor<IPropertyValidationRule>();
			OnCreated();
		}

		/// <summary>
		/// When overridden, initializes the class.
		/// </summary>
		partial void OnCreated();

		/// <summary>
		/// The name of this element instance.
		/// </summary>
		[Description("The name of this element instance.")]
		[ParenthesizePropertyName(true)]
		public virtual String InstanceName
		{
			get { return this.proxy.GetValue(() => this.InstanceName); }
			set { this.proxy.SetValue(() => this.InstanceName, value); }
		}

		/// <summary>
		/// The order of this element relative to its siblings.
		/// </summary>
		[Description("The order of this element relative to its siblings.")]
		[ReadOnly(true)]
		public virtual Double InstanceOrder
		{
			get { return this.proxy.GetValue(() => this.InstanceOrder); }
			set { this.proxy.SetValue(() => this.InstanceOrder, value); }
		}

		/// <summary>
		/// The references of this element.
		/// </summary>
		[Description("The references of this element.")]
		public virtual IEnumerable<IReference> References
		{
			get { return this.proxy.GetValue(() => this.References); }
		}

		/// <summary>
		/// Notes for this element.
		/// </summary>
		[Description("Notes for this element.")]
		[Editor(typeof(MultilineStringEditor), typeof(UITypeEditor))]
		public virtual String Notes
		{
			get { return this.proxy.GetValue(() => this.Notes); }
			set { this.proxy.SetValue(() => this.Notes, value); }
		}

		/// <summary>
		/// Gets or sets the InTransaction property.
		/// </summary>
		public virtual Boolean InTransaction
		{
			get { return this.proxy.GetValue(() => this.InTransaction); }
		}

		/// <summary>
		/// Gets or sets the IsSerializing property.
		/// </summary>
		public virtual Boolean IsSerializing
		{
			get { return this.proxy.GetValue(() => this.IsSerializing); }
		}

		/// <summary>
		/// Gets the parent element.
		/// </summary>
		public virtual IValidationRules Parent
		{
			get { return this.target.Parent.As<IValidationRules>(); }
		}

		/// <summary>
		/// Deletes this element.
		/// </summary>
		public virtual void Delete()
		{
			this.target.Delete();
		}

		/// <summary>
		/// Gets the generalized interface (<see cref="Runtime.IElement"/>) of this element.
		/// </summary>
		public virtual Runtime.IElement AsElement()
		{
			return this.As<Runtime.IElement>();
		}

		/// <summary>
		/// Gets the specified generalized interface of this element, if possible.
		/// </summary>
		public virtual TGeneralizedInterface As<TGeneralizedInterface>() where TGeneralizedInterface : class
		{
			return this.target as TGeneralizedInterface;
		}
	}
}

namespace NuPattern.Authoring.PatternToolkitLibrary
{
	using global::NuPattern.Runtime;
	using global::NuPattern.Runtime.Bindings;
	using global::NuPattern.Runtime.ToolkitInterface;
	using global::System;
	using global::System.Collections.Generic;
	using global::System.ComponentModel;
	using global::System.ComponentModel.Composition;
	using global::System.ComponentModel.Design;
	using global::System.Drawing.Design;
	using Runtime = global::NuPattern.Runtime;

	/// <summary>
	/// A custom value provider that returns the calculated value for a variable property.
	/// </summary>
	[Description("A custom value provider that returns the calculated value for a variable property.")]
	[ToolkitInterfaceProxy(ExtensionId = "97bd7ab2-964b-43f1-8a08-be6db68b018b", DefinitionId = "835cd8dc-4fb1-4d60-94a9-c73342788a16", ProxyType = typeof(ValueProvider))]
	[System.CodeDom.Compiler.GeneratedCode("NuPattern Toolkit Library", "1.4.24.0")]
	[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
	internal partial class ValueProvider : IValueProvider
	{

		private Runtime.IAbstractElement target;
		private IAbstractElementProxy<IValueProvider> proxy;

		/// <summary>
		/// Creates a new instance of the <see cref="ValueProvider"/> class.
		/// </summary>
		[ImportingConstructor]
		private ValueProvider() { }

		/// <summary>
		/// Creates a new instance of the <see cref="ValueProvider"/> class.
		/// </summary>
		public ValueProvider(Runtime.IAbstractElement target)
		{
			this.target = target;
			this.proxy = target.ProxyFor<IValueProvider>();
			OnCreated();
		}

		/// <summary>
		/// When overridden, initializes the class.
		/// </summary>
		partial void OnCreated();

		/// <summary>
		/// The name of this element instance.
		/// </summary>
		[Description("The name of this element instance.")]
		[ParenthesizePropertyName(true)]
		public virtual String InstanceName
		{
			get { return this.proxy.GetValue(() => this.InstanceName); }
			set { this.proxy.SetValue(() => this.InstanceName, value); }
		}

		/// <summary>
		/// The order of this element relative to its siblings.
		/// </summary>
		[Description("The order of this element relative to its siblings.")]
		[ReadOnly(true)]
		public virtual Double InstanceOrder
		{
			get { return this.proxy.GetValue(() => this.InstanceOrder); }
			set { this.proxy.SetValue(() => this.InstanceOrder, value); }
		}

		/// <summary>
		/// The references of this element.
		/// </summary>
		[Description("The references of this element.")]
		public virtual IEnumerable<IReference> References
		{
			get { return this.proxy.GetValue(() => this.References); }
		}

		/// <summary>
		/// Notes for this element.
		/// </summary>
		[Description("Notes for this element.")]
		[Editor(typeof(MultilineStringEditor), typeof(UITypeEditor))]
		public virtual String Notes
		{
			get { return this.proxy.GetValue(() => this.Notes); }
			set { this.proxy.SetValue(() => this.Notes, value); }
		}

		/// <summary>
		/// Gets or sets the InTransaction property.
		/// </summary>
		public virtual Boolean InTransaction
		{
			get { return this.proxy.GetValue(() => this.InTransaction); }
		}

		/// <summary>
		/// Gets or sets the IsSerializing property.
		/// </summary>
		public virtual Boolean IsSerializing
		{
			get { return this.proxy.GetValue(() => this.IsSerializing); }
		}

		/// <summary>
		/// Gets the parent element.
		/// </summary>
		public virtual IValueProviders Parent
		{
			get { return this.target.Parent.As<IValueProviders>(); }
		}

		/// <summary>
		/// Deletes this element.
		/// </summary>
		public virtual void Delete()
		{
			this.target.Delete();
		}

		/// <summary>
		/// Gets the generalized interface (<see cref="Runtime.IElement"/>) of this element.
		/// </summary>
		public virtual Runtime.IElement AsElement()
		{
			return this.As<Runtime.IElement>();
		}

		/// <summary>
		/// Gets the specified generalized interface of this element, if possible.
		/// </summary>
		public virtual TGeneralizedInterface As<TGeneralizedInterface>() where TGeneralizedInterface : class
		{
			return this.target as TGeneralizedInterface;
		}
	}
}

namespace NuPattern.Authoring.PatternToolkitLibrary
{
	using global::NuPattern.Runtime;
	using global::NuPattern.Runtime.Bindings;
	using global::NuPattern.Runtime.ToolkitInterface;
	using global::System;
	using global::System.Collections.Generic;
	using global::System.ComponentModel;
	using global::System.ComponentModel.Composition;
	using global::System.ComponentModel.Design;
	using global::System.Drawing.Design;
	using Runtime = global::NuPattern.Runtime;

	/// <summary>
	/// A custom comparer used for ordering elements.
	/// </summary>
	[Description("A custom comparer used for ordering elements.")]
	[ToolkitInterfaceProxy(ExtensionId = "97bd7ab2-964b-43f1-8a08-be6db68b018b", DefinitionId = "001bcf68-8971-4b8a-8a5a-68fc41fec446", ProxyType = typeof(ElementOrderingComparer))]
	[System.CodeDom.Compiler.GeneratedCode("NuPattern Toolkit Library", "1.4.24.0")]
	[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
	internal partial class ElementOrderingComparer : IElementOrderingComparer
	{

		private Runtime.IAbstractElement target;
		private IAbstractElementProxy<IElementOrderingComparer> proxy;

		/// <summary>
		/// Creates a new instance of the <see cref="ElementOrderingComparer"/> class.
		/// </summary>
		[ImportingConstructor]
		private ElementOrderingComparer() { }

		/// <summary>
		/// Creates a new instance of the <see cref="ElementOrderingComparer"/> class.
		/// </summary>
		public ElementOrderingComparer(Runtime.IAbstractElement target)
		{
			this.target = target;
			this.proxy = target.ProxyFor<IElementOrderingComparer>();
			OnCreated();
		}

		/// <summary>
		/// When overridden, initializes the class.
		/// </summary>
		partial void OnCreated();

		/// <summary>
		/// The name of this element instance.
		/// </summary>
		[Description("The name of this element instance.")]
		[ParenthesizePropertyName(true)]
		public virtual String InstanceName
		{
			get { return this.proxy.GetValue(() => this.InstanceName); }
			set { this.proxy.SetValue(() => this.InstanceName, value); }
		}

		/// <summary>
		/// The order of this element relative to its siblings.
		/// </summary>
		[Description("The order of this element relative to its siblings.")]
		[ReadOnly(true)]
		public virtual Double InstanceOrder
		{
			get { return this.proxy.GetValue(() => this.InstanceOrder); }
			set { this.proxy.SetValue(() => this.InstanceOrder, value); }
		}

		/// <summary>
		/// The references of this element.
		/// </summary>
		[Description("The references of this element.")]
		public virtual IEnumerable<IReference> References
		{
			get { return this.proxy.GetValue(() => this.References); }
		}

		/// <summary>
		/// Notes for this element.
		/// </summary>
		[Description("Notes for this element.")]
		[Editor(typeof(MultilineStringEditor), typeof(UITypeEditor))]
		public virtual String Notes
		{
			get { return this.proxy.GetValue(() => this.Notes); }
			set { this.proxy.SetValue(() => this.Notes, value); }
		}

		/// <summary>
		/// Gets or sets the InTransaction property.
		/// </summary>
		public virtual Boolean InTransaction
		{
			get { return this.proxy.GetValue(() => this.InTransaction); }
		}

		/// <summary>
		/// Gets or sets the IsSerializing property.
		/// </summary>
		public virtual Boolean IsSerializing
		{
			get { return this.proxy.GetValue(() => this.IsSerializing); }
		}

		/// <summary>
		/// Gets the parent element.
		/// </summary>
		public virtual IValueComparers Parent
		{
			get { return this.target.Parent.As<IValueComparers>(); }
		}

		/// <summary>
		/// Deletes this element.
		/// </summary>
		public virtual void Delete()
		{
			this.target.Delete();
		}

		/// <summary>
		/// Gets the generalized interface (<see cref="Runtime.IElement"/>) of this element.
		/// </summary>
		public virtual Runtime.IElement AsElement()
		{
			return this.As<Runtime.IElement>();
		}

		/// <summary>
		/// Gets the specified generalized interface of this element, if possible.
		/// </summary>
		public virtual TGeneralizedInterface As<TGeneralizedInterface>() where TGeneralizedInterface : class
		{
			return this.target as TGeneralizedInterface;
		}
	}
}


text:
This audit ensures that ads take up no more than 30% of the page vertically. A
ratio greater than 30% has been found to
[negatively impact user experience](https://www.betterads.org/research/standardpaper/).

## Recommendations

Depending on the situation, slots should either be spaced farther apart or have
a reduced size.

## More information

On mobile devices, we assume a single column layout and so all ads on the page
are included in the ratio calculation. On desktop, we divide the page into
multiple vertical slices to account for multi-column layouts. The audit measures
the ratio of ads to page-height in each slice individually to ensure no
individual slice exceeds the maximum recommended threshold.

To account for lazy loading, we measure content length up to 1 viewport past the
last ad. To measure the ratio over the entire content, disable lazy loading.

[Ad Experience: Ad Density Higher Than 30%](https://www.betterads.org/mobile-ad-density-higher-than-30/)
[What publishers need to know now about creating a better ad experience](https://www.thinkwithgoogle.com/marketing-resources/better-ad-standards/)


text:
package net.runelite.client.plugins.skillcalculator;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.GridLayout;
import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import net.runelite.client.game.SpriteManager;
import net.runelite.client.ui.ColorScheme;
import net.runelite.client.ui.FontManager;
import net.runelite.client.ui.components.shadowlabel.JShadowedLabel;

class UICombinedActionSlot extends JPanel
{
	private static final Dimension ICON_SIZE = new Dimension(32, 32);
	private final JShadowedLabel uiLabelActions;
	private final JShadowedLabel uiLabelTitle;

	UICombinedActionSlot(SpriteManager spriteManager)
	{
		setLayout(new BorderLayout());
		setBackground(ColorScheme.DARKER_GRAY_COLOR);
		setBorder(BorderFactory.createEmptyBorder(7, 7, 7, 7));

		JLabel uiIcon = new JLabel();
		uiIcon.setBorder(new EmptyBorder(0, 0, 0, 5));
		spriteManager.addSpriteTo(uiIcon, 582, 0);

		uiIcon.setMinimumSize(ICON_SIZE);
		uiIcon.setMaximumSize(ICON_SIZE);
		uiIcon.setPreferredSize(ICON_SIZE);
		uiIcon.setHorizontalAlignment(JLabel.CENTER);
		add(uiIcon, BorderLayout.LINE_START);

		JPanel uiInfo = new JPanel(new GridLayout(2, 1));
		uiInfo.setBackground(ColorScheme.DARKER_GRAY_COLOR);

		uiLabelTitle = new JShadowedLabel("No Action Selected");
		uiLabelTitle.setForeground(Color.WHITE);

		uiLabelActions = new JShadowedLabel("Shift-click to select multiple");
		uiLabelActions.setFont(FontManager.getRunescapeSmallFont());
		uiLabelActions.setForeground(ColorScheme.LIGHT_GRAY_COLOR);

		uiInfo.add(uiLabelTitle);
		uiInfo.add(uiLabelActions);

		add(uiInfo, BorderLayout.CENTER);
	}

	void setText(String text)
	{
		uiLabelActions.setText(text);
	}

	void setTitle(String text)
	{
		uiLabelTitle.setText(text);
	}
}


text:
[jvm]
Content
val [Type](https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Type.html).[type](type.md): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
More info

See [KoresType.type](-kores-type/type.md)


text:
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { RequestOptions, XHRBackend } from '@angular/http';
import { NgxDatatableModule } from 'rh-ngx-datatable';
import { WorkItemCellModule } from './../work-item-cell/work-item-cell.module';
import { WorkItemPreviewPanelModule } from './../work-item-preview-panel/work-item-preview-panel.module';

import { PlannerListComponent } from './planner-list.component';

import { TruncateModule } from 'ng2-truncate';
import { BsDropdownConfig, BsDropdownModule } from 'ngx-bootstrap/dropdown';
import { TooltipConfig, TooltipModule } from 'ngx-bootstrap/tooltip';
import { PlannerModalModule } from '../../widgets/modal/modal.module';
import { AreaService } from './../../services/area.service';
import { CollaboratorService } from './../../services/collaborator.service';
import { CustomQueryService } from './../../services/custom-query.service';
import { IterationService } from './../../services/iteration.service';
import { LabelService } from './../../services/label.service';
import { WorkItemService } from './../../services/work-item.service';
import { GlobalSettings } from './../../shared/globals';
import { PlannerHttpClientModule } from './../../shared/http-module/http.module';
import { PlannerLayoutModule } from './../../widgets/planner-layout/planner-layout.module';
import { PlannerListRoutingModule } from './../planner-list/planner-list-routing.module';
import { SidepanelModule } from './../side-panel/side-panel.module';
import { ToolbarPanelModule } from './../toolbar-panel/toolbar-panel.module';
import { WorkItemQuickAddModule } from './../work-item-quick-add/work-item-quick-add.module';

import { CookieService } from './../../services/cookie.service';
import { FilterService } from './../../services/filter.service';

import { AlmIconModule, WidgetsModule } from 'ngx-widgets';
import { EmptyStateModule } from 'patternfly-ng/empty-state';
import { InfotipService } from '../../services/infotip.service';
import { UrlService } from '../../services/url.service';
import { ClickOutModule } from '../../widgets/clickout/clickout.module';

// Data Querries
import { AreaQuery } from '../../models/area.model';
import { WorkItemTypeQuery } from '../../models/work-item-type';
import { CommentQuery } from './../../models/comment';
import { GroupTypeQuery } from './../../models/group-types.model';
import { IterationQuery } from './../../models/iteration.model';
import { LabelQuery } from './../../models/label.model';
import { SpaceQuery } from './../../models/space';
import { UserQuery } from './../../models/user';
import { WorkItemQuery } from './../../models/work-item';

import { ErrorHandler } from '../../effects/work-item-utils';
import { FilterColumnModule } from '../../pipes/column-filter.module';
import { TableConfigModule } from './../table-config/table-config.module';
import { FeatureFlagModule } from 'ngx-feature-flag';
import { PermissionService } from 'ngx-login-client';

let providers = [
  WorkItemService,
  CustomQueryService,
  IterationService,
  TooltipConfig,
  GlobalSettings,
  LabelService,
  AreaService,
  CollaboratorService,
  FilterService,
  BsDropdownConfig,
  CookieService,
  UrlService,
  InfotipService,
  CommentQuery,
  UserQuery,
  LabelQuery,
  IterationQuery,
  WorkItemQuery,
  AreaQuery,
  SpaceQuery,
  GroupTypeQuery,
  WorkItemTypeQuery,
  SpaceQuery,
  ErrorHandler,
  PermissionService,
];

@NgModule({
  imports: [
    AlmIconModule,
    CommonModule,
    ClickOutModule,
    FilterColumnModule,
    PlannerHttpClientModule,
    PlannerListRoutingModule,
    PlannerLayoutModule,
    PlannerModalModule,
    EmptyStateModule,
    ToolbarPanelModule,
    TooltipModule.forRoot(),
    SidepanelModule,
    WorkItemQuickAddModule,
    BsDropdownModule.forRoot(),
    NgxDatatableModule,
    WorkItemPreviewPanelModule,
    WidgetsModule,
    TableConfigModule,
    TruncateModule,
    WorkItemCellModule,
    FeatureFlagModule,
  ],
  declarations: [PlannerListComponent],
  providers: providers,
  exports: [PlannerListComponent],
})
export class PlannerListModule {
  constructor() {}
}


text:
'use strict';

var gutil = require('gulp-util');
var File = require('vinyl');
var MemoryFileSystem = require('memory-fs');
var through = require('through');
var ProgressPlugin = require('webpack/lib/ProgressPlugin');

var defaultStatsOptions = {
  colors: gutil.colors.supportsColor,
  hash: false,
  timings: false,
  chunks: false,
  chunkModules: false,
  modules: false,
  children: true,
  version: true,
  cached: false,
  cachedAssets: false,
  reasons: false,
  source: false,
  errorDetails: false
};

module.exports = function (options, wp, done) {
  options = clone(options) || {};
  if (typeof done !== 'function') {
    var callingDone = false;
    done = function (err, stats) {
      if (err) {
        // The err is here just to match the API but isnt used
        return;
      }
      stats = stats || {};
      if (options.quiet || callingDone) {
        return;
      }
      // Debounce output a little for when in watch mode
      if (options.watch) {
        callingDone = true;
        setTimeout(function () {
          callingDone = false;
        }, 500);
      }
      if (options.verbose) {
        gutil.log(stats.toString({
          colors: gutil.colors.supportsColor
        }));
      } else {
        var statsOptions = options && options.stats || {};

        Object.keys(defaultStatsOptions).forEach(function (key) {
          if (typeof statsOptions[key] === 'undefined') {
            statsOptions[key] = defaultStatsOptions[key];
          }
        });

        gutil.log(stats.toString(statsOptions));
      }
    };
  }

  var webpack = wp || require('webpack');
  var entry = [];
  var entries = Object.create(null);

  var stream = through(function (file) {
    if (file.isNull()) {
      return;
    }
    if ('named' in file) {
      if (!Array.isArray(entries[file.named])) {
        entries[file.named] = [];
      }
      entries[file.named].push(file.path);
    } else {
      entry = entry || [];
      entry.push(file.path);
    }
  }, function () {
    var self = this;
    options.output = options.output || {};

    // Determine pipe'd in entry
    if (Object.keys(entries).length > 0) {
      entry = entries;
      if (!options.output.filename) {
        // Better output default for multiple chunks
        options.output.filename = '[name].js';
      }
    } else if (entry.length < 2) {
      entry = entry[0] || entry;
    }

    options.entry = options.entry || entry;
    options.output.path = options.output.path || process.cwd();
    options.output.filename = options.output.filename || '[hash].js';
    entry = [];

    if (!options.entry || options.entry.length < 1) {
      gutil.log('webpack-stream - No files given; aborting compilation');
      return self.emit('end');
    }

    var compiler = webpack(options, function (err, stats) {
      if (err) {
        self.emit('error', new gutil.PluginError('webpack-stream', err));
      }
      if (!options.watch) {
        self.queue(null);
      }
      done(err, stats);
      if (options.watch && !options.quiet) {
        gutil.log('webpack is watching for changes');
      }
    });

    // In watch mode webpack returns a wrapper object so we need to get
    // the underlying compiler
    if (options.watch) {
      compiler = compiler.compiler;
    }

    if (options.progress) {
      compiler.apply(new ProgressPlugin(function (percentage, msg) {
        percentage = Math.floor(percentage * 100);
        msg = percentage + '% ' + msg;
        if (percentage < 10) msg = ' ' + msg;
        gutil.log('webpack', msg);
      }));
    }

    var fs = compiler.outputFileSystem = new MemoryFileSystem();
    compiler.plugin('after-emit', function (compilation, callback) {
      Object.keys(compilation.assets).forEach(function (outname) {
        if (compilation.assets[outname].emitted) {
          var path = fs.join(compiler.outputPath, outname);
          if (path.indexOf('?') !== -1) {
            path = path.split('?')[0];
          }
          var contents = fs.readFileSync(path);
          self.queue(new File({
            base: compiler.outputPath,
            path: path,
            contents: contents
          }));
        }
      });
      callback();
    });
  });

  // If entry point manually specified, trigger that
  if (options.entry) {
    stream.end();
  }

  return stream;
};

// Expose webpack if asked
Object.defineProperty(module.exports, 'webpack', {
  get: function () {
    return require('webpack');
  }
});

function clone (source) {
  var target = {};
  Object.keys(source).forEach(function (key) {
    target[key] = source[key];
  });

  return target;
}


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minHeight="?android:attr/listPreferredItemHeight"
    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
    android:orientation="horizontal">

    <ImageView
        android:id="@+id/icon"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:contentDescription="@string/app_name" />

    <ScrollView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:id="@+id/scrollView" >

        <LinearLayout
            android:orientation="vertical"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content">
            <EditText
                android:textSize="20.0dip"
                android:textColor="#ff000000"
                android:textColorHint="#ff888888"
                android:id="@+id/editText1"
                android:background="#ffdddddd"
                android:padding="5.0dip"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="20.0dip"
                android:hint="@string/dialog_rejectcall_messages_hint" />
            <EditText
                android:textSize="20.0dip"
                android:textColor="#ff000000"
                android:textColorHint="#ff888888"
                android:id="@+id/editText2"
                android:background="#ffdddddd"
                android:padding="5.0dip"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="20.0dip"
                android:hint="@string/dialog_rejectcall_messages_hint" />
            <EditText
                android:textSize="20.0dip"
                android:textColor="#ff000000"
                android:textColorHint="#ff888888"
                android:id="@+id/editText3"
                android:background="#ffdddddd"
                android:padding="5.0dip"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="20.0dip"
                android:hint="@string/dialog_rejectcall_messages_hint" />
            <EditText
                android:textSize="20.0dip"
                android:textColor="#ff000000"
                android:textColorHint="#ff888888"
                android:id="@+id/editText4"
                android:background="#ffdddddd"
                android:padding="5.0dip"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="20.0dip"
                android:hint="@string/dialog_rejectcall_messages_hint" />
            <EditText
                android:textSize="20.0dip"
                android:textColor="#ff000000"
                android:textColorHint="#ff888888"
                android:id="@+id/editText5"
                android:background="#ffdddddd"
                android:padding="5.0dip"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="20.0dip"
                android:hint="@string/dialog_rejectcall_messages_hint" />
            <EditText
                android:textSize="20.0dip"
                android:textColor="#ff000000"
                android:textColorHint="#ff888888"
                android:id="@+id/editText6"
                android:background="#ffdddddd"
                android:padding="5.0dip"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="20.0dip"
                android:hint="@string/dialog_rejectcall_messages_hint" />

        </LinearLayout>
    </ScrollView>

</LinearLayout>


text:
layout: post
title: Build C Language Library for Android

---

### 0.Introduction
Android apps are written in Java, Java have provide [JNI(Java Native Interface)](http://en.wikipedia.org/wiki/Java_Native_Interface) to call or be called by native applications and libraries written in other language such as C/C++ and assembly. Android provide NDK(Native Development Kit) to support native development in C/C++.

### 1.Installing NDK

The NDK can be download from [Android Developer Website](http://developer.android.com/tools/sdk/ndk/index.html). After downloaded, we get an archive package, unpack it to whereever you want, and replace the full path with *`<NDK-Path>`* in below.

### 2.Use Mobile Print Project as an example

Step 0: Read *<NDK-Path>/docs/OVERVIEW.html* is helpful to understand the below steps.

Step 1: Create a project directory named "exampleProject", and a subdir named "jni", copy the C/C++ code to "jni"
>exampleProject can be change whatever you want

Step 2: Create a file named "Android.mk", contains is likely as follow:

```
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := PMX_MobilePrinter
LOCAL_SRC_FILES := test.c \
test1.c
LOCAL_C_INCLUDES := test.h
include $(BUILD_STATIC_LIBRARY)
```
The last line means, the output will be a static library, BUILD\_SHARED_LIBRARY is for shared library.

### 3.Build for different platform

By default, the library is build for arm.Platforms are define in file "`Application.mk`" under *jni* directory, contains as follow:

	APP_ABI := all

We need build for all platform, so the value after APP_ABI is `all`, which can be changed to `armabi/armabi-v7a/x86/mips`. Need to support different platform one time, just write as below, split with blank space.

	APP_ABI := armabi armabi-v7a x86 mips

### 4.Build the library
Go to the "jni", run build command *<NDK-path>/ndk-build* in Terminal(Mac/Linux)/CMD(Windows). Then you will find our library in *`exampleProject/obj/local/<PlatformName>/libPMX_MobilePrinter.a`*. Build shared library is placed in *`exampleProject/libs/<PlatformName>/libPMX_MobilePrinter.so`*.

<p>{{ page.date | date_to_string }}</p>


text:
import testtools
import mock
import neutron.plugins.ml2.drivers.datacom.dcclient.rpc as rpc
import neutron.plugins.ml2.drivers.datacom.dcclient.xml_manager.\
                                            data_structures as ds
from StringIO import StringIO as sio
import gzip

# mock requests lib so it does not actually try to send the packet
import requests
requests.post = mock.Mock()

class main_test(testtools.TestCase):
    def test_send_xml(self):

        test_url = '1.1.1.1'
        test_auth = ('user', 'pass')
        test_method = ('https')

        test_rpc = rpc.RPC(test_auth[0], test_auth[1], test_url, test_method)

        rpc.get = mock.Mock()
        cfg = ds.Cfg_data()

        vlan = ds.Vlan_global(42, name="vlan_test", ports=ds.Pbits([1, 3, 4]))

        cfg.vlans.append(vlan)

        test_rpc.send_xml(cfg.as_xml_text())

        # mock_calls returns the calls executed to this method, the 0 means we
        # are getting the first (and only) call, and the 2 means we are getting
        # the keyword parameters.
        parameters = requests.post.mock_calls[0][2]

        # retrieve url
        received_url = parameters['url']

        expected_url = 'https://1.1.1.1/System/File/file_config.html'

        self.assertEquals(expected_url, received_url)

        # retrieve data from the parameters.
        data = parameters['data']

        expected_xml = '<cfg_data><vlan_global id0="42"><vid>42</vid>' + \
                       '<active>1</active><name>vlan_test</name>' + \
                       '<pbmp_untagged id0="0"><pbits id0="0">13</pbits>' + \
                       '</pbmp_untagged></vlan_global></cfg_data>'

        # Since the XML has to be the last parameter to be passed, we have to
        # get the last field.
        zippedXML = data.fields[-1][-1][-2]

        # decompress to do the comparison.
        # get the file with the zipped xml as content
        zipFileObject = sio(zippedXML)

        # get the actual file (from which we read)
        with gzip.GzipFile(fileobj=zipFileObject, mode='r') as zipFile:
            received_xml = zipFile.read()

        zipFileObject.close()

        self.assertEquals(expected_xml, received_xml)


text:
package course.examples.helloworldtabwidget;

import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TabHost;

public class HelloTabWidget extends TabActivity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        Resources res = getResources(); // Resource object to get Drawables
        TabHost tabHost = getTabHost();  // The activity TabHost
        TabHost.TabSpec spec;  // Reusable TabSpec for each tab
        Intent intent;  // Reusable Intent for each tab

        // Create an Intent to launch an Activity for the tab (to be reused)
        intent = new Intent().setClass(this, ArtistsActivity.class);

        // Initialize a TabSpec for each tab and add it to the TabHost
        spec = tabHost.newTabSpec("artists").setIndicator("Artists",
                          res.getDrawable(R.drawable.ic_tab_artists))
                      .setContent(intent);
        tabHost.addTab(spec);

        // Do the same for the other tabs
        intent = new Intent().setClass(this, AlbumsActivity.class);
        spec = tabHost.newTabSpec("albums").setIndicator("Albums",
                          res.getDrawable(R.drawable.ic_tab_albums))
                      .setContent(intent);
        tabHost.addTab(spec);

        intent = new Intent().setClass(this, SongsActivity.class);
        spec = tabHost.newTabSpec("songs").setIndicator("Songs",
                          res.getDrawable(R.drawable.ic_tab_songs))
                      .setContent(intent);
        tabHost.addTab(spec);

        tabHost.setCurrentTab(2);
    }
}


text:
<?php

namespace Encore\Admin\Middleware;

use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Symfony\Component\DomCrawler\Crawler;
use Symfony\Component\HttpFoundation\Response;

class PjaxMiddleware
{
    /**
     * Handle an incoming request.
     *
     * @param Request $request
     * @param Closure $next
     *
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
        $response = $next($request);

        if (!$request->pjax() || $response->isRedirection() || Auth::guard('admin')->guest()) {
            return $response;
        }

        $this->filterResponse($response, $request->header('X-PJAX-CONTAINER'))
            ->setUriHeader($response, $request);

        return $response;
    }

    /**
     * Prepare the PJAX-specific response content.
     *
     * @param Response $response
     * @param string   $container
     *
     * @return $this
     */
    protected function filterResponse(Response $response, $container)
    {
        if (!$response->isSuccessful()) {
            $crawler = new Crawler($response->getContent());

            $response->setContent([
                'status'  => false,
                'message' => $this->fetchContents($crawler, '.exception_message'),
            ]);

            return $this;
        }

        $crawler = new Crawler($response->getContent());

        $response->setContent(
            $this->makeTitle($crawler).
            $this->fetchContents($crawler, $container)
        );

        return $this;
    }

    /**
     * Prepare an HTML title tag.
     *
     * @param Crawler $crawler
     *
     * @return string
     */
    protected function makeTitle($crawler)
    {
        $pageTitle = $crawler->filter('head > title')->html();

        return "<title>{$pageTitle}</title>";
    }

    /**
     * Fetch the PJAX-specific HTML from the response.
     *
     * @param Crawler $crawler
     * @param string  $container
     *
     * @return string
     */
    protected function fetchContents($crawler, $container)
    {
        $content = $crawler->filter($container);

        if (!$content->count()) {
            abort(422);
        }

        return $this->decodeUtf8HtmlEntities($content->html());
    }

    /**
     * Decode utf-8 characters to html entities.
     *
     * @param string $html
     *
     * @return string
     */
    protected function decodeUtf8HtmlEntities($html)
    {
        return preg_replace_callback('/(&#[0-9]+;)/', function ($html) {
            return mb_convert_encoding($html[1], 'UTF-8', 'HTML-ENTITIES');
        }, $html);
    }

    /**
     * Set the PJAX-URL header to the current uri.
     *
     * @param Response $response
     * @param Request  $request
     */
    protected function setUriHeader(Response $response, Request $request)
    {
        $response->header(
            'X-PJAX-URL',
            $request->getRequestUri()
        );
    }
}


text:
<?php

namespace MongoDB\Tests\Operation;

use MongoDB\Operation\FindAndModify;

class FindAndModifyTest extends TestCase
{
    /**
     * @expectedException MongoDB\Exception\InvalidArgumentException
     * @dataProvider provideInvalidConstructorOptions
     */
    public function testConstructorOptionTypeChecks(array $options)
    {
        new FindAndModify($this->getDatabaseName(), $this->getCollectionName(), $options);
    }

    public function provideInvalidConstructorOptions()
    {
        $options = [];

        foreach ($this->getInvalidBooleanValues() as $value) {
            $options[][] = ['bypassDocumentValidation' => $value];
        }

        foreach ($this->getInvalidDocumentValues() as $value) {
            $options[][] = ['fields' => $value];
        }

        foreach ($this->getInvalidIntegerValues() as $value) {
            $options[][] = ['maxTimeMS' => $value];
        }

        foreach ($this->getInvalidBooleanValues() as $value) {
            $options[][] = ['new' => $value];
        }

        foreach ($this->getInvalidDocumentValues() as $value) {
            $options[][] = ['query' => $value];
        }

        foreach ($this->getInvalidBooleanValues() as $value) {
            $options[][] = ['remove' => $value];
        }

        foreach ($this->getInvalidDocumentValues() as $value) {
            $options[][] = ['sort' => $value];
        }

        foreach ($this->getInvalidDocumentValues() as $value) {
            $options[][] = ['update' => $value];
        }

        foreach ($this->getInvalidBooleanValues() as $value) {
            $options[][] = ['upsert' => $value];
        }

        foreach ($this->getInvalidWriteConcernValues() as $value) {
            $options[][] = ['writeConcern' => $value];
        }

        return $options;
    }

    /**
     * @expectedException MongoDB\Exception\InvalidArgumentException
     * @expectedExceptionMessage The "remove" option must be true or an "update" document must be specified, but not both
     */
    public function testConstructorUpdateAndRemoveOptionsAreMutuallyExclusive()
    {
        new FindAndModify($this->getDatabaseName(), $this->getCollectionName(), ['remove' => true, 'update' => []]);
    }
}


text:
package eppolicymap

import (
	bpf "github.com/cilium/cilium/pkg/bpf"
)

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EPPolicyValue) DeepCopyInto(out *EPPolicyValue) {
	*out = *in
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EPPolicyValue.
func (in *EPPolicyValue) DeepCopy() *EPPolicyValue {
	if in == nil {
		return nil
	}
	out := new(EPPolicyValue)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyMapValue is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapValue.
func (in *EPPolicyValue) DeepCopyMapValue() bpf.MapValue {
	if c := in.DeepCopy(); c != nil {
		return c
	}
	return nil
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EndpointKey) DeepCopyInto(out *EndpointKey) {
	*out = *in
	in.EndpointKey.DeepCopyInto(&out.EndpointKey)
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointKey.
func (in *EndpointKey) DeepCopy() *EndpointKey {
	if in == nil {
		return nil
	}
	out := new(EndpointKey)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyMapKey is an autogenerated deepcopy function, copying the receiver, creating a new bpf.MapKey.
func (in *EndpointKey) DeepCopyMapKey() bpf.MapKey {
	if c := in.DeepCopy(); c != nil {
		return c
	}
	return nil
}


text:
/*jshint node:true, mocha:true, expr:true*/
/**
 * @author lattmann / https://github.com/lattmann
 */

var testFixture = require('../../_globals.js');

describe('String stream writer', function () {
    'use strict';
    var StringStreamWriter = require('../../../src/server/util/StringStreamWriter'),
        expect = testFixture.expect;

    it('should create an instance and write data', function () {
        var stringStreamWriter = new StringStreamWriter();
        expect(stringStreamWriter).to.not.equal(null);
        stringStreamWriter.write('test string');
    });

    it('should serialize to string', function () {
        var stringStreamWriter = new StringStreamWriter();
        stringStreamWriter.write('test string');
        expect(stringStreamWriter.toString()).to.equal('test string');
    });

    it('should serialize to JSON', function () {
        var stringStreamWriter = new StringStreamWriter();
        stringStreamWriter.write('{"a": 42}');
        expect(stringStreamWriter.toJSON()).to.deep.equal({a: 42});
    });

    it('should getBuffer data', function () {
        var stringStreamWriter = new StringStreamWriter();
        stringStreamWriter.write('test string');
        expect(stringStreamWriter.getBuffer().length).to.equal('test string'.length);
    });
});


text:
const path = require('path');
const fs = require('fs');
const Datastore = require('nedb');
const config = require('./../config');

class DBFactory {
  constructor() {
    this.dbs = {};
    this.connectDB();
  }

  getCollection(collectionName) {
    if (!this.dbs) {
      this.connectDB();
    }
    let col = this.dbs[collectionName];
    return col;
  }

  connectDB() {
    let dbFilesPath = path.join(__dirname, `./../dbFiles`);
    if (!fs.existsSync(dbFilesPath)) {
      fs.mkdirSync(dbFilesPath);
    }
    for (let key in config.dbConfigs) {
      let item = config.dbConfigs[key];
      if (item.ignoreLoad) continue;
      let option = {
        filename: path.join(dbFilesPath, `${item.name}.db`),
        autoload: true
      };
      if (item.ttl) {
        option.timestampData = true;
      }
      let db = new Datastore(option);
      if (item.ttl) {
        db.ensureIndex({ fieldName: 'createdAt', expireAfterSeconds: item.ttl }, function (err) {
          if (err) console.log(err);
        });
      }
      db.persistence.setAutocompactionInterval(1 * 60 * 60 * 1000);
      this.dbs[item.name] = db;
    }
  }
}

exports.factory = new DBFactory();


text:
import './page-content.scss'

export const PageContent: React.FC = props => {
    return
{props.children}

}


text:
namespace SharpData.Databases.SqLite {
    public class SqLiteDataClient : DataClient {
        public SqLiteDataClient(IDatabase database, Dialect dialect)
            : base(database, dialect) {
        }
    }
}


text:
/**
* List presentational component that renders a single Task List and its tasks.
*/

import React from 'react';
import styles from './styles.css';
import Task from '../Task';
import { Button, ButtonGroup, Col, ControlLabel, Form, FormGroup, Glyphicon, Modal } from 'react-bootstrap';
import TextInput from '../TextInput';
import classNames from 'classnames';

class List extends React.Component { // eslint-disable-line react/prefer-stateless-function

  // Component props validation
  static propTypes = {
    taskListId: React.PropTypes.string.isRequired,
    title: React.PropTypes.string.isRequired,
    tasks: React.PropTypes.arrayOf(
      React.PropTypes.shape({
        id: React.PropTypes.string.isRequired,
        title: React.PropTypes.string.isRequired,
      })
    ).isRequired,
    canMoveTask: React.PropTypes.bool.isRequired,
    canAddTask: React.PropTypes.bool.isRequired,
    deleteTask: React.PropTypes.func.isRequired,
    moveTask: React.PropTypes.func,
    addTask: React.PropTypes.func,
  };

  constructor() {
    super();
    this.state = {
      showNewTaskModal: false,
    };
  }

  // delete the given task passing this list's ID as a param
  onDeleteTask = (task) => {
    this.props.deleteTask(this.props.taskListId, task.id);
  }

  // move the given task passing this list's ID as a param
  onMoveTask = (task) => {
    if (this.props.canMoveTask) {
      // if this component is allowed to move tasks, dispatch the action
      this.props.moveTask(this.props.taskListId, task);
    }
  }

  cancelNewTask = () => {
    this.closeNewTaskModal();
  }

  addNewTask = () => {
    const title = this.newTaskTitle.value();  // because the InpuText component has a function named value()
    if (!title || title.length === 0) {
      this.setState({
        errorText: 'Please provide a title for the task',
      });
      return;
    }
    this.setState({ errorText: null });
    this.closeNewTaskModal();

    this.props.addTask(this.props.taskListId, title);
  }

  closeNewTaskModal = () => {
    this.setState({ showNewTaskModal: false });
  }

  openNewTaskModal = () => {
    this.setState({ showNewTaskModal: true, errorText: null });
  }

  render() {
    // Create a component for each task filtering the ones without a valid title
    const tasks = this.props.tasks
      .filter(task => task.title !== '')
      .map(task => (

          <Task
            key={task.id}
            task={task}
            deleteTask={this.onDeleteTask}
            canMoveTask={this.props.canMoveTask}
            moveTask={this.onMoveTask}
          >
          </Task>

    ));

    let addTaskButton = null;
    if (this.props.canAddTask) {
      addTaskButton = <Button className="pull-right" onClick={this.openNewTaskModal}><Glyphicon glyph="glyphicon glyphicon-plus"></Glyphicon></Button>;
    }

    return (

{this.props.title} {addTaskButton}

            {tasks}

        <Modal show={this.state.showNewTaskModal} onHide={this.closeNewTaskModal}>
          <Modal.Header>
            <Modal.Title>Add a new task</Modal.Title>
          </Modal.Header>
          <Modal.Body>
            <Form horizontal>
              <FormGroup controlId="formBasicText" validationState={this.getNewTaskValidationState}>
                <Col componentClass={ControlLabel} sm={1}>
                  Title
                </Col>
                <Col sm={11}>
                  <TextInput
                    placeholder="Inform the title of task"
                    ref={(f) => { this.newTaskTitle = f; }}
                    errorText={this.state.errorText}
                    onKeyUp={() => {}}
                  />
                </Col>
              </FormGroup>
            </Form>
          </Modal.Body>
          <Modal.Footer>
            <ButtonGroup className="pull-left">
              <Button onClick={this.addNewTask}>Add</Button>
              <Button onClick={this.cancelNewTask}>Cancel</Button>
            </ButtonGroup>
          </Modal.Footer>
        </Modal>

    );
  }

}

export default List;