text:
package org.seasar.doma.jdbc.criteria.entity;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.BiFunction;
import javax.annotation.Generated;
import org.seasar.doma.internal.jdbc.scalar.BasicScalar;
import org.seasar.doma.jdbc.entity.AbstractEntityType;
import org.seasar.doma.jdbc.entity.DefaultPropertyType;
import org.seasar.doma.jdbc.entity.EntityPropertyType;
import org.seasar.doma.jdbc.entity.GeneratedIdPropertyType;
import org.seasar.doma.jdbc.entity.NamingType;
import org.seasar.doma.jdbc.entity.PostDeleteContext;
import org.seasar.doma.jdbc.entity.PostInsertContext;
import org.seasar.doma.jdbc.entity.PostUpdateContext;
import org.seasar.doma.jdbc.entity.PreDeleteContext;
import org.seasar.doma.jdbc.entity.PreInsertContext;
import org.seasar.doma.jdbc.entity.PreUpdateContext;
import org.seasar.doma.jdbc.entity.Property;
import org.seasar.doma.jdbc.entity.TenantIdPropertyType;
import org.seasar.doma.jdbc.entity.VersionPropertyType;
import org.seasar.doma.wrapper.BigDecimalWrapper;
import org.seasar.doma.wrapper.IntegerWrapper;
import org.seasar.doma.wrapper.StringWrapper;

@Generated("")
public class _NoIdEmp extends AbstractEntityType<NoIdEmp> {

  private static final _NoIdEmp singleton = new _NoIdEmp();

  private final NamingType __namingType = NamingType.SNAKE_UPPER_CASE;

  public final DefaultPropertyType<NoIdEmp, Integer, Integer> id =
      new DefaultPropertyType<>(
          NoIdEmp.class,
          () -> new BasicScalar<>(IntegerWrapper::new),
          "id",
          "ID",
          __namingType,
          true,
          true,
          false);

  public final DefaultPropertyType<NoIdEmp, String, String> name =
      new DefaultPropertyType<>(
          NoIdEmp.class,
          () -> new BasicScalar<>(StringWrapper::new),
          "name",
          "NAME",
          __namingType,
          true,
          true,
          false);

  public final DefaultPropertyType<NoIdEmp, BigDecimal, BigDecimal> salary =
      new DefaultPropertyType<>(
          NoIdEmp.class,
          () -> new BasicScalar<>(BigDecimalWrapper::new),
          "salary",
          "SALARY",
          __namingType,
          true,
          true,
          false);

  public final VersionPropertyType<NoIdEmp, Integer, Integer> version =
      new VersionPropertyType<>(
          NoIdEmp.class,
          () -> new BasicScalar<>(IntegerWrapper::new),
          "version",
          "VERSION",
          __namingType,
          false);

  private final String __name = "NoIdEmp";

  private final String __catalogName = null;

  private final String __schemaName = null;

  private final String __tableName = "";

  private final List<EntityPropertyType<NoIdEmp, ?>> __idPropertyTypes;

  private final List<EntityPropertyType<NoIdEmp, ?>> __entityPropertyTypes;

  private final Map<String, EntityPropertyType<NoIdEmp, ?>> __entityPropertyTypeMap;

  public _NoIdEmp() {
    List<EntityPropertyType<NoIdEmp, ?>> __idList = new ArrayList<>();
    __idPropertyTypes = Collections.unmodifiableList(__idList);
    List<EntityPropertyType<NoIdEmp, ?>> __list = new ArrayList<>();
    __list.add(id);
    __list.add(name);
    __list.add(salary);
    __list.add(version);
    __entityPropertyTypes = Collections.unmodifiableList(__list);
    Map<String, EntityPropertyType<NoIdEmp, ?>> __map = new HashMap<>();
    __map.put("id", id);
    __map.put("name", name);
    __map.put("salary", salary);
    __map.put("version", version);
    __entityPropertyTypeMap = Collections.unmodifiableMap(__map);
  }

  @Override
  public boolean isImmutable() {
    return false;
  }

  @Override
  public NoIdEmp newEntity(Map<String, Property<NoIdEmp, ?>> args) {
    NoIdEmp entity = new NoIdEmp();
    args.values().forEach(v -> v.save(entity));
    return entity;
  }

  @Override
  public Class<NoIdEmp> getEntityClass() {
    return NoIdEmp.class;
  }

  @Override
  public String getName() {
    return __name;
  }

  @Override
  public List<EntityPropertyType<NoIdEmp, ?>> getEntityPropertyTypes() {
    return __entityPropertyTypes;
  }

  @Override
  public EntityPropertyType<NoIdEmp, ?> getEntityPropertyType(String propertyName) {
    return __entityPropertyTypeMap.get(propertyName);
  }

  @Override
  public void saveCurrentStates(NoIdEmp __entity) {}

  @Override
  public NoIdEmp getOriginalStates(NoIdEmp entity) {
    return null;
  }

  @Override
  public GeneratedIdPropertyType<NoIdEmp, ?, ?> getGeneratedIdPropertyType() {
    return null;
  }

  @Override
  public VersionPropertyType<NoIdEmp, ?, ?> getVersionPropertyType() {
    return version;
  }

  @Override
  public TenantIdPropertyType<NoIdEmp, ?, ?> getTenantIdPropertyType() {
    return null;
  }

  @Override
  public List<EntityPropertyType<NoIdEmp, ?>> getIdPropertyTypes() {
    return __idPropertyTypes;
  }

  @Override
  public void preInsert(NoIdEmp entity, PreInsertContext<NoIdEmp> context) {}

  @Override
  public void preUpdate(NoIdEmp entity, PreUpdateContext<NoIdEmp> context) {}

  @Override
  public void preDelete(NoIdEmp entity, PreDeleteContext<NoIdEmp> context) {}

  @Override
  public void postInsert(NoIdEmp entity, PostInsertContext<NoIdEmp> context) {}

  @Override
  public void postUpdate(NoIdEmp entity, PostUpdateContext<NoIdEmp> context) {}

  @Override
  public void postDelete(NoIdEmp entity, PostDeleteContext<NoIdEmp> context) {}

  @Override
  public String getCatalogName() {
    return __catalogName;
  }

  @Override
  public String getSchemaName() {
    return __schemaName;
  }

  @Override
  @Deprecated
  public String getTableName() {
    return getTableName((namingType, text) -> namingType.apply(text));
  }

  @Override
  public String getTableName(BiFunction<NamingType, String, String> namingFunction) {
    if (__tableName.isEmpty()) {
      return namingFunction.apply(getNamingType(), getName());
    }
    return __tableName;
  }

  @Override
  public NamingType getNamingType() {
    return __namingType;
  }

  @Override
  public boolean isQuoteRequired() {
    return false;
  }

  public static _NoIdEmp getSingletonInternal() {
    return singleton;
  }
}


text:
using System;
using System.Collections.Generic;
using System.Drawing;

namespace OpenTK.Graphics.Text
{
    [Obsolete]
    abstract class GlyphCache : IGlyphCache
    {
        #region IGlyphCache Members

        public abstract void Add(Glyph glyph, IGlyphRasterizer rasterizer, TextQuality quality);

        public abstract bool Contains(Glyph glyph);

        public abstract CachedGlyphInfo this[Glyph glyph] { get; }

        public abstract void Clear();

        public abstract void Dispose();

        #endregion
    }

    [Obsolete]
    sealed class GlyphCache<T> : GlyphCache where T : Texture2D
    {
        #region Fields

        List<GlyphSheet<T>> sheets = new List<GlyphSheet<T>>();

        Dictionary<Glyph, CachedGlyphInfo> cached_glyphs = new Dictionary<Glyph, CachedGlyphInfo>();

        bool disposed;

        const int SheetWidth = 512, SheetHeight = 512;

        #endregion

        #region Constructors

        public GlyphCache()
        {
            sheets.Add(new GlyphSheet<T>(SheetWidth, SheetHeight));
        }

        #endregion

        #region IGlyphCache Members

        public override void Add(Glyph glyph, IGlyphRasterizer rasterizer, TextQuality quality)
        {
            if (rasterizer == null)
                throw new ArgumentNullException("rasterizer");

            bool inserted = false;

            using (Bitmap bmp = rasterizer.Rasterize(glyph, quality))
            {
                Rectangle rect = new Rectangle(0, 0, bmp.Width, bmp.Height);
                foreach (GlyphSheet<T> sheet in sheets)
                {
                     inserted = InsertGlyph(glyph, bmp, rect, sheet);
                     if (inserted)
                         break;
                }

                if (!inserted)
                {
                    GlyphSheet<T> sheet = new GlyphSheet<T>(SheetWidth, SheetHeight);
                    sheets.Add(sheet);
                    InsertGlyph(glyph, bmp, rect, sheet);
                }
            }
        }

        public override bool Contains(Glyph glyph)
        {
            return cached_glyphs.ContainsKey(glyph);
        }

        public override CachedGlyphInfo this[Glyph glyph]
        {
            get
            {
                return cached_glyphs[glyph];
            }
        }
        public override void Clear()
        {
            for (int i = 0; i < sheets.Count; i++)
                sheets[i].Dispose();

            sheets.Clear();
        }

        #endregion

        #region Private Members

        // Asks the packer for an empty space and writes the glyph there.
        bool InsertGlyph(Glyph glyph, Bitmap bmp, Rectangle source, GlyphSheet<T> sheet)
        {
            Rectangle target = new Rectangle();
            if (!sheet.Packer.TryAdd(source, out target))
                return false;

            sheet.Texture.WriteRegion(source, target, 0, bmp);
            cached_glyphs.Add(glyph, new CachedGlyphInfo(sheet.Texture, target));

            return true;
        }

        #endregion

        #region IDisposable Members

        public override void Dispose()
        {
             if (!disposed)
            {
                Clear();
                disposed = true;
             }
        }

        #endregion
    }
}

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html>

	<meta charset="utf-8">

	<title>Class LINE\LINEBot\Event\MessageEvent\LocationMessage | line-bot-sdk-php</title>

	<link rel="stylesheet" href="resources/style.css?c2f33731c1948fbed7c333554678bfa68d4817da">

		Overview

Namespaces

						LINE

						LINEBot

						Constant

						Event

						MessageEvent

						Parser

						Exception

						HTTPClient

						ImagemapActionBuilder

						MessageBuilder

						Imagemap

						TemplateBuilder

						TemplateActionBuilder

Classes

AudioMessage

FileMessage

ImageMessage

LocationMessage

StickerMessage

TextMessage

UnknownMessage

VideoMessage

	<form id="search">
		<input type="hidden" name="cx" value="">
		<input type="hidden" name="ie" value="UTF-8">
		<input type="text" name="q" class="text" placeholder="Search">
	</form>

				Overview

				Namespace

Class

Class LocationMessage

A class that represents the message event of location.

			LINE\LINEBot\Event\BaseEvent

			LINE\LINEBot\Event\MessageEvent

LINE\LINEBot\Event\MessageEvent\LocationMessage

		Namespace: LINE\LINEBot\Event\MessageEvent

		Package: LINE\LINEBot\Event\MessageEvent

			Located at LINEBot/Event/MessageEvent/LocationMessage.php

Methods summary

			 public

		#
		__construct( array <var>$event</var> )

LocationMessage constructor.

LocationMessage constructor.

Parameters

<var>$event</var>

Overrides

LINE\LINEBot\Event\MessageEvent::__construct()

			 public

			string

		#
		getTitle( )

Returns title of the location message.

Returns title of the location message.

Returns

					string

			 public

			string

		#
		getAddress( )

Returns address of the location message.

Returns address of the location message.

Returns

					string

			 public

			float

		#
		getLatitude( )

Returns latitude of the location message.

Returns latitude of the location message.

Returns

					float

			 public

			float

		#
		getLongitude( )

Returns longitude of the location message.

Returns longitude of the location message.

Returns

					float

Methods inherited from LINE\LINEBot\Event\MessageEvent

			getMessageId(),
			getMessageType()

Methods inherited from LINE\LINEBot\Event\BaseEvent

			getEventSourceId(),
			getGroupId(),
			getReplyToken(),
			getRoomId(),
			getTimestamp(),
			getType(),
			getUserId(),
			isGroupEvent(),
			isRoomEvent(),
			isUnknownEvent(),
			isUserEvent()

Properties inherited from LINE\LINEBot\Event\MessageEvent

			<var>$message</var>

Properties inherited from LINE\LINEBot\Event\BaseEvent

			<var>$event</var>

		line-bot-sdk-php API documentation generated by ApiGen


text:
#pragma once
#include <aws/medialive/MediaLive_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>

namespace Aws
{
namespace MediaLive
{
namespace Model
{
  enum class Scte35AposWebDeliveryAllowedBehavior
  {
    NOT_SET,
    FOLLOW,
    IGNORE
  };

namespace Scte35AposWebDeliveryAllowedBehaviorMapper
{
AWS_MEDIALIVE_API Scte35AposWebDeliveryAllowedBehavior GetScte35AposWebDeliveryAllowedBehaviorForName(const Aws::String& name);

AWS_MEDIALIVE_API Aws::String GetNameForScte35AposWebDeliveryAllowedBehavior(Scte35AposWebDeliveryAllowedBehavior value);
} // namespace Scte35AposWebDeliveryAllowedBehaviorMapper
} // namespace Model
} // namespace MediaLive
} // namespace Aws


text:
Rails.application.routes.draw do

  #Page routes
  root 'pages#index'
  get 'about', to: 'pages#about'
  get 'contact', to: 'pages#contact'
  get 'terms', to: 'pages#terms'

  #Repair routes
  get 'repairs', to: 'repairs#index', as: 'repair_index'
  get 'repair/new', to: 'repairs#new', as: 'new_repair'
  get 'repair/:id', to: 'repairs#show', as: 'repair'
  post 'repair', to: 'repairs#create', as: 'repairs'
  get 'repair/:id/edit', to: 'repairs#edit', as: 'edit_repair'
  patch 'repair/:id', to: 'repairs#update'
  put 'repair/:id', to: 'repairs#update'
  patch 'repair/:id/pick_up', to: 'repairs#pick_up', as: 'pick_up_repair'
  patch 'repair/:id/fix', to: 'repairs#fix', as: 'fix_repair'
  patch 'repair/:id/deliver', to: 'repairs#deliver', as: 'deliver_repair'
  patch 'repair/:id/cancel', to: 'repairs#cancel', as: 'cancel_repair'

  #Device routes
  get 'devices', to: 'devices#index', as: 'device_index'
  get 'device/:id', to: 'devices#show', as: 'device'
  get 'device/:id/edit', to: 'devices#edit', as: 'edit_device'
  patch 'device/:id', to: 'devices#update'
  put 'device/:id', to: 'devices#update'
  get 'device/:id/fix', to: 'devices#fix', as: 'fix_device'

  #Address routes
  get 'addresses', to: 'addresses#index', as: 'address_index'
  get 'address/:id', to: 'addresses#show', as: 'address'
  get 'address/:id/edit', to: 'addresses#edit', as: 'edit_address'
  patch 'address/:id', to: 'addresses#update'
  put 'address/:id', to: 'addresses#update'

  #User routes
  get '/dashboard', to: 'users#dashboard', as: 'user_root'
  devise_for :users

  #Admin routes
  get '/adash', to: 'admins#dashboard', as: 'admin_root'
  devise_for :admins

  #reps
  resources :reps, only: [:index, :show, :new, :create]

  # #Maintenance Page
  # root 'pages#maint'

  # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
end


text:
	{{errorMessage}}

Describe your evaluation

	<button ng-click="createTemplate()" class="my-small-button-close pull-right">SUBMIT EVALUATION</button>
	<form class="input-group col-lg-6 col-lg-offset-3 col-md-6 col-md-offset-3 col-sm-12 col-xs-12">

			<input type="text" class="form-control" ng-model="evalTitle" placeholder="Nafn kennslumats" required>
			<input type="text" class="form-control" ng-model="evalTitleEN" placeholder="Title of evalutaion" required>
			<input type="text" class="form-control" ng-model="evalIntro" placeholder="Inngangur" ng-maxlength=100>
			<input type="text" class="form-control" ng-model="evalIntroEN" placeholder="Introduction" ng-maxlength=100>

	</form>

Course questions

				Spurning
				Question (EN)
				Type
				# of ans

				{{q.Text}}
				{{q.TextEN}}
				{{q.Type}}
				{{q.Answers.length}}

Teacher questions

				Spurning
				Question (EN)
				Type
				# of ans

				{{x.Text}}
				{{x.TextEN}}
				{{x.Type}}
				{{x.Answers.length}}

		<form class="input-group">

Add a course question

			<input type="text" class="form-control" ng-model="cQText" placeholder="Spurning">
			<input type="text" class="form-control" ng-model="cQTextEN" placeholder="Question">

			<select ng-model="cQType"  class="form-control placeholder">
				<option value="" disabled selected style='display:none;'>Select question type</option>
				<option value="single">Single value question</option>
				<option value="multiple">Mutliple values question</option>
				<option value="text">Text question</option>
			</select>
		</form>
		<form class="input-group">

Add a answer for this question

			<input type="text" class="form-control" ng-model="cAText" placeholder="Svar">
			<input type="text" class="form-control" ng-model="cATextEN" placeholder="Answer">
			<input type="number" class="form-control" ng-model="cAWeight">
			<button class="my-button-blue" ng-click="addCAnswer()">Add answer</button>
		</form>

Answers to this question

						Text
						Text (EN)
						Weight

						{{a.Text}}
						{{a.TextEN}}
						{{a.Weight}}

		<button class="my-button" ng-click="addCQuestion()">Submit This question</button>

		<form class="input-group">

Add a teacher question

			<input type="text" class="form-control" ng-model="tQText" placeholder="Spurning">
			<input type="text" class="form-control" ng-model="tQTextEN" placeholder="Question">

			<select ng-model="tQType"  class="form-control placeholder">
				<option value="" disabled selected style='display:none;'>Select question type</option>
				<option value="single">Single value question</option>
				<option value="multiple">Mutliple values question</option>
				<option value="text">Text question</option>
			</select>
		</form>
		<form class="input-group">

Add a answer for this question

			<input type="text" class="form-control" ng-model="tAText" placeholder="Svar">
			<input type="text" class="form-control" ng-model="tATextEN" placeholder="Answer">
			<input type="number" class="form-control" ng-model="tAWeight">
			<button class="my-button-blue" ng-click="addTAnswer()">Add answer</button>
		</form>

Answers to this question

						Text
						Text (EN)
						Weight

						{{b.Text}}
						{{b.TextEN}}
						{{b.Weight}}

		<button class="my-button" ng-click="addTQuestion()">Submit This question</button>


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

namespace Band.Personalize.App.Universal.Converters
{
    using System;
    using Windows.UI.Xaml;
    using Windows.UI.Xaml.Data;

    /// <summary>
    /// Value converter that translates a <see cref="bool"/> to a <see cref="Visibility"/>.
    /// </summary>
    public class BooleanToVisibilityConverter : IValueConverter
    {
        #region IValueConverter Members

        /// <summary>
        /// Convert the <paramref name="value"/> to an equivalent representation of the <paramref name="targetType"/>,
        /// with an optional <paramref name="parameter"/> and <paramref name="language"/> for localization.
        /// </summary>
        /// <param name="value">The value to convert.</param>
        /// <param name="targetType">The target <see cref="Type"/> to which to convert the <paramref name="value"/>.</param>
        /// <param name="parameter">A custom parameter for the conversion operation.</param>
        /// <param name="language">The language to use for localization.</param>
        /// <returns>A <paramref name="targetType"/> representation of the <paramref name="value"/>.</returns>
        /// <exception cref="ArgumentNullException"><paramref name="value"/> or <paramref name="targetType"/> is <c>null</c>.</exception>
        /// <exception cref="ArgumentException"><paramref name="value"/> is not an instance of <see cref="bool"/> or <paramref name="targetType"/> is not <see cref="Visibility"/>.</exception>
        /// <remarks><paramref name="parameter"/> and <paramref name="language"/> are ignored.</remarks>
        public object Convert(object value, Type targetType, object parameter, string language)
        {
            if (value == null)
            {
                throw new ArgumentNullException(nameof(value));
            }
            else if (value.GetType() != typeof(bool))
            {
                throw new ArgumentException($"Can only convert from {typeof(bool)}", nameof(value));
            }
            else if (targetType == null)
            {
                throw new ArgumentNullException(nameof(targetType));
            }
            else if (targetType != typeof(Visibility))
            {
                throw new ArgumentException($"Can only convert to {typeof(Visibility)}", nameof(targetType));
            }

            var boolean = (bool)value;
            return boolean
                ? Visibility.Visible
                : Visibility.Collapsed;
        }

        /// <summary>
        /// Convert the <paramref name="value"/> back to an equivalent representation of the <paramref name="targetType"/>,
        /// with an optional <paramref name="parameter"/> and <paramref name="language"/> for localization.
        /// </summary>
        /// <param name="value">The value to convert back.</param>
        /// <param name="targetType">The target <see cref="Type"/> back to which to convert the <paramref name="value"/>.</param>
        /// <param name="parameter">A custom parameter for the conversion back operation.</param>
        /// <param name="language">The language to use for localization.</param>
        /// <returns>A <paramref name="targetType"/> representation of the <paramref name="value"/>.</returns>
        /// <exception cref="ArgumentNullException"><paramref name="value"/> or <paramref name="targetType"/> is <c>null</c>.</exception>
        /// <exception cref="ArgumentException"><paramref name="value"/> is not an instance of <see cref="Visibility"/> or <paramref name="targetType"/> is not <see cref="bool"/>.</exception>
        /// <exception cref="NotImplementedException"><paramref name="value"/> is not a handled value of <see cref="Visibility"/>.</exception>
        /// <remarks><paramref name="parameter"/> and <paramref name="language"/> are ignored.</remarks>
        public object ConvertBack(object value, Type targetType, object parameter, string language)
        {
            if (value == null)
            {
                throw new ArgumentNullException(nameof(value));
            }
            else if (value.GetType() != typeof(Visibility))
            {
                throw new ArgumentException($"Can only convert from {typeof(Visibility)}", nameof(value));
            }
            else if (targetType == null)
            {
                throw new ArgumentNullException(nameof(targetType));
            }
            else if (targetType != typeof(bool))
            {
                throw new ArgumentException($"Can only convert to {typeof(bool)}", nameof(targetType));
            }

            var visibility = (Visibility)value;
            switch (visibility)
            {
                case Visibility.Visible:
                    return true;
                case Visibility.Collapsed:
                    return false;
                default:
                    throw new NotImplementedException($"Unhandled {value.GetType()}: \"{value}\"");
            }
        }

        #endregion
    }
}


text:
require 'test_helper'

module Tilia
  module Dav
    class TreeTest < Minitest::Test
      def setup
        @tree = Tilia::Dav::TreeMock.new
      end

      def test_node_exists
        assert(@tree.node_exists('hi'))
        refute(@tree.node_exists('hello'))
      end

      def test_copy
        @tree.copy('hi', 'hi2')

        assert_has_key('hi2', @tree.node_for_path('').new_directories)
        assert_equal('foobar', @tree.node_for_path('hi/file').get)
        assert_equal({ 'test1' => 'value' }, @tree.node_for_path('hi/file').properties([]))
      end

      def test_move
        @tree.move('hi', 'hi2')

        assert_equal('hi2', @tree.node_for_path('hi').name)
        assert(@tree.node_for_path('hi').is_renamed)
      end

      def test_deep_move
        @tree.move('hi/sub', 'hi2')

        assert_has_key('hi2', @tree.node_for_path('').new_directories)
        assert(@tree.node_for_path('hi/sub').is_deleted)
      end

      def test_delete
        @tree.delete('hi')
        assert(@tree.node_for_path('hi').is_deleted)
      end

      def test_get_children
        children = @tree.children('')
        assert_equal(2, children.size)
        assert_equal('hi', children[0].name)
      end

      def test_get_multiple_nodes
        result = @tree.multiple_nodes(['hi/sub', 'hi/file'])
        assert_has_key('hi/sub', result)
        assert_has_key('hi/file', result)

        assert_equal('sub', result['hi/sub'].name)
        assert_equal('file', result['hi/file'].name)
      end

      def test_get_multiple_nodes2
        result = @tree.multiple_nodes(['multi/1', 'multi/2'])
        assert_has_key('multi/1', result)
        assert_has_key('multi/2', result)
      end
    end

    class TreeMock < Tree
      def initialize
        @nodes = []

        file = TreeFileTester.new('file')
        file.properties = { 'test1' => 'value' }
        file.data = 'foobar'

        super(
          TreeDirectoryTester.new(
            'root', [
              TreeDirectoryTester.new(
                'hi',
                [
                  TreeDirectoryTester.new('sub'),
                  file
                ]
              ),
              TreeMultiGetTester.new(
                'multi',
                [
                  TreeFileTester.new('1'),
                  TreeFileTester.new('2'),
                  TreeFileTester.new('3')
                ]
              )
            ]
          )
        )
      end
    end

    class TreeDirectoryTester < SimpleCollection
      attr_accessor :new_directories
      attr_accessor :new_files
      attr_accessor :is_deleted
      attr_accessor :is_renamed

      def initialize(*args)
        @new_directories = {}
        @new_files = {}
        @is_deleted = false
        @is_renamed = false
        super(*args)
      end

      def create_directory(name)
        @new_directories[name] = true
      end

      def create_file(name, data = nil)
        @new_files[name] = data
      end

      def child(name)
        return TreeDirectoryTester.new(name) if @new_directories.key?(name)
        return TreeFileTester.new(name, @new_files[name]) if @new_files[name]
        super(name)
      end

      def child_exists(name)
        !!child(name)
      end

      def delete
        @is_deleted = true
      end

      def name=(name)
        @is_renamed = true
        @name = name
      end
    end

    class TreeFileTester < File
      include IProperties

      attr_accessor :name
      attr_accessor :data
      attr_accessor :properties

      def initialize(name, data = nil)
        @name = name
        data = 'bla' if data.nil?
        @data = data
      end

      attr_reader :name

      def get
        @data
      end

      def properties(_properties)
        @properties
      end

      # Updates properties on this node.
      #
      # This method received a PropPatch object, which contains all the
      # information about the update.
      #
      # To update specific properties, call the 'handle' method on this object.
      # Read the PropPatch documentation for more information.
      #
      # @param array mutations
      # @return bool|array
      def prop_patch(prop_patch)
        @properties = prop_patch.mutations
        prop_patch.remaining_result_code = 200
      end
    end

    class TreeMultiGetTester < TreeDirectoryTester
      include IMultiGet

      # This method receives a list of paths in it's first argument.
      # It must return an array with Node objects.
      #
      # If any children are not found, you do not have to return them.
      #
      # @return array
      def multiple_children(paths)
        result = []
        paths.each do |path|
          begin
            child = child(path)
            result << child
          rescue Exception::NotFound => e
            # Do nothing
          end
        end

        result
      end
    end
  end
end


text:
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 08-02-2016 a las 20:25:04
-- Versión del servidor: 10.1.9-MariaDB
-- Versión de PHP: 5.5.30

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Base de datos: `contafamily2`
--
CREATE DATABASE IF NOT EXISTS `contafamily2` DEFAULT CHARACTER SET utf8 COLLATE utf8_spanish_ci;
USE `contafamily2`;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `estado`
--

CREATE TABLE IF NOT EXISTS `estado` (
  `id` smallint(6) NOT NULL AUTO_INCREMENT,
  `estado_nombre` varchar(45) COLLATE utf8_spanish_ci NOT NULL,
  `estado_valor` smallint(6) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci;

--
-- Volcado de datos para la tabla `estado`
--

INSERT INTO `estado` (`id`, `estado_nombre`, `estado_valor`) VALUES
(1, 'Activo', 10),
(2, 'Pendiente', 5);

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `genero`
--

CREATE TABLE IF NOT EXISTS `genero` (
  `id` smallint(6) UNSIGNED NOT NULL AUTO_INCREMENT,
  `genero_nombre` varchar(45) COLLATE utf8_spanish_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci;

--
-- Volcado de datos para la tabla `genero`
--

INSERT INTO `genero` (`id`, `genero_nombre`) VALUES
(1, 'Hombre'),
(2, 'Mujer');

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `migration`
--

CREATE TABLE IF NOT EXISTS `migration` (
  `version` varchar(180) COLLATE utf8_spanish_ci NOT NULL,
  `apply_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`version`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci;

--
-- Volcado de datos para la tabla `migration`
--

INSERT INTO `migration` (`version`, `apply_time`) VALUES
('m000000_000000_base', 1454348192),
('m130524_201442_init', 1454348195);

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `perfil`
--

CREATE TABLE IF NOT EXISTS `perfil` (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` int(11) UNSIGNED NOT NULL,
  `nombre` tinytext COLLATE utf8_spanish_ci,
  `apellidos` tinytext COLLATE utf8_spanish_ci,
  `fecha_nacimiento` datetime DEFAULT NULL,
  `genero_id` smallint(6) UNSIGNED NOT NULL,
  `created_at` datetime DEFAULT NULL,
  `update_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `rol`
--

CREATE TABLE IF NOT EXISTS `rol` (
  `id` smallint(6) NOT NULL AUTO_INCREMENT,
  `rol_nombre` varchar(45) COLLATE utf8_spanish_ci NOT NULL,
  `rol_valor` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci;

--
-- Volcado de datos para la tabla `rol`
--

INSERT INTO `rol` (`id`, `rol_nombre`, `rol_valor`) VALUES
(1, 'Administrador', 30),
(2, 'Usuario', 20),
(3, 'Familiar', 10);

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `tipo_usuario`
--

CREATE TABLE IF NOT EXISTS `tipo_usuario` (
  `id` smallint(6) NOT NULL AUTO_INCREMENT,
  `tipo_usuario_nombre` varchar(45) COLLATE utf8_spanish_ci NOT NULL,
  `tipo_usuario_valor` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci;

--
-- Volcado de datos para la tabla `tipo_usuario`
--

INSERT INTO `tipo_usuario` (`id`, `tipo_usuario_nombre`, `tipo_usuario_valor`) VALUES
(1, 'Autorizado', 10),
(2, 'Titular', 30);

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `user`
--

CREATE TABLE IF NOT EXISTS `user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `auth_key` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `password_hash` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `password_reset_token` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `rol_id` smallint(6) NOT NULL DEFAULT '1',
  `estado_id` smallint(6) NOT NULL DEFAULT '1',
  `tipo_usuario_id` smallint(6) NOT NULL DEFAULT '1',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`),
  UNIQUE KEY `email` (`email`),
  UNIQUE KEY `password_reset_token` (`password_reset_token`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;


text:
 Handles updating and visibility of the power prediction status bars.

 Widget

 PowerPrediction - A table containing `mainBar` and `altBar`.

 Sub-Widgets

 mainBar - A StatusBar used to represent power cost of spells, that consume
           your main power, e.g. mana for mages;
 altBar  - A StatusBar used to represent power cost of spells, that consume
           your additional power, e.g. mana for balance druids.

 Notes

 The default StatusBar texture will be applied if the UI widget doesn't have a
 status bar texture.

 Examples

   -- Position and size
   local mainBar = CreateFrame('StatusBar', nil, self.Power)
   mainBar:SetReverseFill(true)
   mainBar:SetPoint('TOP')
   mainBar:SetPoint('BOTTOM')
   mainBar:SetPoint('RIGHT', self.Power:GetStatusBarTexture(), 'RIGHT')
   mainBar:SetWidth(200)

   local altBar = CreateFrame('StatusBar', nil, self.DruidMana)
   altBar:SetReverseFill(true)
   altBar:SetPoint('TOP')
   altBar:SetPoint('BOTTOM')
   altBar:SetPoint('RIGHT', self.DruidMana:GetStatusBarTexture(), 'RIGHT')
   altBar:SetWidth(200)

   -- Register with oUF
   self.PowerPrediction = {
      mainBar = mainBar,
      altBar = altBar
   }

 Hooks

 Override(self) - Used to completely override the internal update function.
                  Removing the table key entry will make the element fall-back
                  to its internal function again.
]]

local _, ns = ...
local oUF = ns.oUF

local playerClass = select(2, UnitClass('player'))

local function Update(self, event, unit)
	if(self.unit ~= unit) then return end

	local pp = self.PowerPrediction

	if(pp.PreUpdate) then
		pp:PreUpdate(unit)
	end

	local _, _, _, _, startTime, endTime, _, _, _, spellID = UnitCastingInfo(unit)
	local mainPowerType = UnitPowerType(unit)
	local hasAltManaBar = ALT_MANA_BAR_PAIR_DISPLAY_INFO[playerClass] and ALT_MANA_BAR_PAIR_DISPLAY_INFO[playerClass][mainPowerType]
	local mainCost, altCost = 0, 0

	if(event == 'UNIT_SPELLCAST_START' or startTime ~= endTime) then
		local costTable = GetSpellPowerCost(spellID)

		for _, costInfo in pairs(costTable) do
			--[[costInfo content:
				-- name: string (powerToken)
				-- type: number (powerType)
				-- cost: number
				-- costPercent: number
				-- costPerSec: number
				-- minCost: number
				-- hasRequiredAura: boolean
				-- requiredAuraID: number
			]]
			if(costInfo.type == mainPowerType) then
				mainCost = costInfo.cost

				break
			elseif(costInfo.type == ADDITIONAL_POWER_BAR_INDEX) then
				altCost = costInfo.cost

				break
			end
		end
	end

	if(pp.mainBar) then
		pp.mainBar:SetMinMaxValues(0, UnitPowerMax(unit, mainPowerType))
		pp.mainBar:SetValue(mainCost)
		pp.mainBar:Show()
	end

	if(pp.altBar and hasAltManaBar) then
		pp.altBar:SetMinMaxValues(0, UnitPowerMax(unit, ADDITIONAL_POWER_BAR_INDEX))
		pp.altBar:SetValue(altCost)
		pp.altBar:Show()
	end

	if(pp.PostUpdate) then
		return pp:PostUpdate(unit, mainCost, altCost, hasAltManaBar)
	end
end

local function Path(self, ...)
	return (self.PowerPrediction.Override or Update) (self, ...)
end

local function ForceUpdate(element)
	return Path(element.__owner, 'ForceUpdate', element.__owner.unit)
end

local function Enable(self)
	local pp = self.PowerPrediction

	if(pp) then
		pp.__owner = self
		pp.ForceUpdate = ForceUpdate

		self:RegisterEvent('UNIT_SPELLCAST_START', Path)
		self:RegisterEvent('UNIT_SPELLCAST_STOP', Path)
		self:RegisterEvent('UNIT_SPELLCAST_FAILED', Path)
		self:RegisterEvent('UNIT_SPELLCAST_SUCCEEDED', Path)
		self:RegisterEvent('UNIT_DISPLAYPOWER', Path)

		if(pp.mainBar) then
			if(pp.mainBar:IsObjectType('StatusBar') and not pp.mainBar:GetStatusBarTexture()) then
				pp.mainBar:SetStatusBarTexture([[Interface\TargetingFrame\UI-StatusBar]])
			end
		end

		if(pp.altBar) then
			if(pp.altBar:IsObjectType('StatusBar') and not pp.altBar:GetStatusBarTexture()) then
				pp.altBar:SetStatusBarTexture([[Interface\TargetingFrame\UI-StatusBar]])
			end
		end

		return true
	end
end

local function Disable(self)
	local pp = self.PowerPrediction

	if(pp) then
		if(pp.mainBar) then
			pp.mainBar:Hide()
		end

		if(pp.altBar) then
			pp.altBar:Hide()
		end

		self:UnregisterEvent('UNIT_SPELLCAST_START', Path)
		self:UnregisterEvent('UNIT_SPELLCAST_STOP', Path)
		self:UnregisterEvent('UNIT_SPELLCAST_FAILED', Path)
		self:UnregisterEvent('UNIT_SPELLCAST_SUCCEEDED', Path)
		self:UnregisterEvent('UNIT_DISPLAYPOWER', Path)
	end
end

oUF:AddElement('PowerPrediction', Path, Enable, Disable)


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Rezolver.Tests.TestTypes
{
  /// <summary>
  /// doesn't do anything other than get created.
  /// </summary>
  public class SimpleType
  {
  }
}


text:
layout: event
title: Indigo Theory feat. Jérôme Li-Thiao-Té
date:   2016-02-05 20:23:00 +0200
is_updated: false
update:   ""

genre: concert
comments: true

cover-image-path: cover.jpg
imageurl: /assets/image/fixme1x1.jpg
start-date: 2016-02-05 23:30:00 +0200
end-date: ""
event-name: Indigo Theory feat. Jérôme Li-Thiao-Té
event-fee: "2500 Ft"
fb-event-url: "https://www.facebook.com/events/1690106621226953/"
ticket-url: "https://www.facebook.com/events/1690106621226953/"

venues:
  - name: TESLA
    address: Budapest, Kazinczy u. 21, 1075
    city: Budapest
    code: 1075
    country: Hungary
    embedd-gmap: "<iframe src=\"https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d5391.2291843958055!2d19.054106!3d47.497421!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x74faa9319266264d!2sTesla+Budapest+Klub!5e0!3m2!1sen!2shu!4v1478951306089\" width=\"100%\" height=\"450\" frameborder=\"0\" style=\border:0\" allowfullscreen></iframe>"
    gmap-url: https://www.google.com/maps/place/Tesla+Budapest+Klub/@47.497421,19.054106,16z/data=!4m5!3m4!1s0x0:0x74faa9319266264d!8m2!3d47.4980875!4d19.06358?hl=en-US

links:
  - name: ""
    url: ""
  - name: ""
    url: ""

categories:
  - event
# excerpt: HELLO WORLD Event. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.
---
BUDAPEST CALLING presents STIL VOR TALENT SHOWCASE

w/ TEENAGE MUTANTS & KLANGKUENSTLER

Two comet come to Budapest from the famous STIL VOR TALENT label / agency to bring us the freshest and newest house tunes from Berlin, the capital of the electronic music.

TEENAGE MUTANTS and KLANGKUENSTLER will start the year for the Budapest Calling on 5th of Ferbruary, who are headliners of the Stil Vor Talent Showcases and respected members of the label.

Stil Vor Talent means pure, quality music, great artists, fine and unique world of sounds. Deep basses, vibrating, pulsating tunes and catchy vocals are the trademarks of the brand. The colourful mix of music used to create magical moments at the parties, either in clubs or festivals.

The Stil Vor Talent label has supported numerous artistic careers and work with plenty of famous musicians, like Oliver Koletzki, HVOB, Sascha Braemer, Kellerkind, Animal Trainer, Niconé and of course the two stars of this night.

Teenage Mutants and KlangKuenstler will present an almost 5 hours musical journey for the deep house and house music fans in Budapest.

Please fasten your seatbelts, prepare for the journey and let the music take control!
SAVE THE DATE! See U at TESLA Club!

■ ENTRANCE: 2500 HUF

■ Belépő: 2500 Ft

Lineup:

- Teenage Mutants
- Klangkuenstler
- Indigo Theory (warmup)
- Alive (closing set)

[Teenage Mutants & Purple Disco Machine – The Path](https://www.youtube.com/watch?v=wYVk43ix6dM)

[KlangKuenstler – Hand In Hand](https://www.youtube.com/watch?v=43ELvNZowdI)

[Teenage Mutants – Barbès](https://www.youtube.com/watch?v=qAk5kHDAAb0)

[KlangKuenstler – Amelie (Rework)](https://www.youtube.com/watch?v=nRWRq9uTd5g)

[Teenage Mutants & Andre Crom – Hanging On](https://www.youtube.com/watch?v=erz7R5_LfN0)

[KlangKuenstler & Dan Caster – Devil (ft. Sway Clarke)](https://www.youtube.com/watch?v=8H-xvjDPaS)

[Oliver Koletzki ft. Leslie Clio – No Man No Cry (KlangKuenstler Remix)](https://www.youtube.com/watch?v=EyAs4YXfbHU)

[Kruse & Nuernberg vs. Teenage Mutants – Moving Forward](https://www.youtube.com/watch?v=AdRSWeNfJ5Q)

—– Facebook —–

[https://www.facebook.com/KlangKuenstler-185963664756887](https://www.facebook.com/KlangKuenstler-185963664756887)

[https://www.facebook.com/teenagemutants/](https://www.facebook.com/teenagemutants/)

—– Soundcloud —–

[https://soundcloud.com/klangkuenstler](https://soundcloud.com/klangkuenstler)

[https://soundcloud.com/teenage-mutants](https://soundcloud.com/teenage-mutants)

---

Jérôme Li-Thiao-Té

Jérôme Li-Thiao-Té drags his violin everywhere he can find people enjoying Music. He is the founding member of "J3ZZ", a producer, a composer and he coaches interdisciplinary improvisation using a violin and electronics. He enjoys working in an international and multicultural environment, always looking for exchanges and collaborations between different artists and societies.

From classical to contemporary music (taking part in Grecsó Zoltán's Willany Leó Improvizációs Táncszínház), spoken word, barn rock, bluegrass and pop music, he likes to jump from one world to another.

Jérôme Li-Thiao-Té is an active member of the European experimental scene and recently performed at Trafo Electrify Vol. 7 in collaboration with electronic artist Modeo, opening for Ben Frost and Vessel.

Events: [http://www.jeromelithiaote.com/categories/event/](http://www.jeromelithiaote.com/categories/event/) [http://www.facebook.com/jeromelithiaote/events](http://www.facebook.com/jeromelithiaote/events)

- J3ZZ: [http://www.j3zz.com/](http://www.j3zz.com/)
- Webpage: [http://www.jeromelithiaote.com/](http://www.jeromelithiaote.com/)
- Facebook: [https://www.facebook.com/jeromelithiaote](https://www.facebook.com/jeromelithiaote)
- Instagram: [http://www.instagram.com/jeromelithiaote](http://www.instagram.com/jeromelithiaote)
- Twitter: [http://www.twitter.com/jeromelithiaote](http://www.twitter.com/jeromelithiaote)
- Bandcamp: [http://goo.gl/4mCx3y](http://goo.gl/4mCx3y)


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

using antdlib.Network;
using Nancy;
using Nancy.Security;

namespace Antd.Modules {
    public class NetworkConfigModule : CoreModule {
        public NetworkConfigModule() {
            this.RequiresAuthentication();

            #region IPV4
            Post["/network/config/ipv4/add/address"] = x => {
                string address = Request.Form.Address;
                string range = Request.Form.Range;
                string interfaceName = Request.Form.Interface;
                string broadcast = Request.Form.Broadcast;
                var result = NetworkConfig.Iproute2.AddNewAddressIpv4(address, range, interfaceName, broadcast);
                return Response.AsJson(result);
            };

            Post["/network/config/ipv4/del/address"] = x => {
                string address = Request.Form.Address;
                string range = Request.Form.Range;
                string interfaceName = Request.Form.Interface;
                string broadcast = Request.Form.Broadcast;
                var result = NetworkConfig.Iproute2.DeleteAddressIpv4(address, range, interfaceName, broadcast);
                return Response.AsJson(result);
            };

            Post["/network/config/ipv4/flush"] = x => {
                string interfaceName = Request.Form.Interface;
                var i = interfaceName.Length > 0 ? interfaceName : null;
                var result = NetworkConfig.Iproute2.FlushConfigurationIpv4(i);
                return Response.AsJson(result);
            };

            Get["/network/config/ipv4/address/{interfaceName}"] = x => {
                string interfaceName = x.interfaceName;
                var result = NetworkConfig.Iproute2.ShowInterfaceAddr(interfaceName);
                return Response.AsJson(result);
            };

            Get["/network/config/ipv4/link/{interfaceName}"] = x => {
                string interfaceName = x.interfaceName;
                var result = NetworkConfig.Iproute2.ShowInterfaceLink(interfaceName);
                return Response.AsJson(result);
            };

            Get["/network/config/ipv4/stats/{interfaceName}"] = x => {
                string interfaceName = x.interfaceName;
                var result = NetworkConfig.Iproute2.ShowInterfaceStats(interfaceName);
                return Response.AsJson(result);
            };

            Post["/network/config/ipv4/add/route"] = x => {
                string gateway = Request.Form.Gateway;
                string destination = Request.Form.Destination;
                var i = destination.Length > 0 ? destination : null;
                var result = NetworkConfig.Iproute2.AddRouteIpv4(gateway, i);
                return Response.AsJson(result);
            };

            Post["/network/config/ipv4/del/route"] = x => {
                string gateway = Request.Form.Gateway;
                string destination = Request.Form.Destination;
                var i = destination.Length > 0 ? destination : null;
                var result = NetworkConfig.Iproute2.DeleteRouteIpv4(gateway, i);
                return Response.AsJson(result);
            };

            Post["/network/config/ipv4/add/route/multipath"] = x => {
                string network1 = Request.Form.Network1;
                string network2 = Request.Form.Network2;
                var result = NetworkConfig.Iproute2.AddMultipathRoute(network1, network2);
                return Response.AsJson(result);
            };

            Post["/network/config/ipv4/add/nat"] = x => {
                string address = Request.Form.Address;
                string via = Request.Form.Via;
                var result = NetworkConfig.Iproute2.AddNat(address, via);
                return Response.AsJson(result);
            };

            Get["/network/config/ipv4/routes/{interfaceName}"] = x => {
                string interfaceName = x.interfaceName;
                var result = NetworkConfig.Iproute2.ShowRoutes(interfaceName);
                return Response.AsJson(result);
            };

            Post["/network/config/ipv4/enable/if"] = x => {
                string interfaceName = Request.Form.Interface;
                var result = NetworkConfig.Iproute2.EnableInterface(interfaceName);
                return Response.AsJson(result);
            };

            Post["/network/config/ipv4/disable/if"] = x => {
                string interfaceName = Request.Form.Interface;
                var result = NetworkConfig.Iproute2.DisableInterface(interfaceName);
                return Response.AsJson(result);
            };

            Post["/network/config/ipv4/add/tunnel"] = x => {
                string interfaceName = Request.Form.Interface;
                string ttl = Request.Form.Ttl;
                string foreignTunnel = Request.Form.Tunnel;
                string address = Request.Form.Address;
                var result = NetworkConfig.Iproute2.AddTunnelPointToPointIpv4(interfaceName, ttl, foreignTunnel, address);
                return Response.AsJson(result);
            };

            Post["/network/config/ipv4/del/tunnel"] = x => {
                string interfaceName = Request.Form.Interface;
                var result = NetworkConfig.Iproute2.DeleteTunnelPointToPointIpv4(interfaceName);
                return Response.AsJson(result);
            };

            Get["/network/config/ipv4/tunnels/{interfaceName?}"] = x => {
                string interfaceName = x.interfaceName;
                var result = NetworkConfig.Iproute2.ShowTunnelsIpv4(interfaceName);
                return Response.AsJson(result);
            };
            #endregion

            #region IPV6
            Post["/network/config/ipv6/add/address"] = x => {
                string address = Request.Form.Address;
                string interfaceName = Request.Form.Interface;
                var result = NetworkConfig.Iproute2.AddNewAddressIpv6(address, interfaceName);
                return Response.AsJson(result);
            };

            Post["/network/config/ipv6/del/address"] = x => {
                string address = Request.Form.Address;
                string interfaceName = Request.Form.Interface;
                var result = NetworkConfig.Iproute2.DeleteAddressIpv6(address, interfaceName);
                return Response.AsJson(result);
            };

            Post["/network/config/ipv6/flush"] = x => {
                var result = NetworkConfig.Iproute2.FlushConfigurationIpv6();
                return Response.AsJson(result);
            };

            Get["/network/config/ipv6/neigh/{interfaceName}"] = x => {
                string interfaceName = x.interfaceName;
                var result = NetworkConfig.Iproute2.ShowNeighborsIpv6(interfaceName);
                return Response.AsJson(result);
            };

            Post["/network/config/ipv6/add/neigh"] = x => {
                string address = Request.Form.Address;
                string layer = Request.Form.Layer;
                string interfaceName = Request.Form.Interface;
                var result = NetworkConfig.Iproute2.AddNeighborsIpv6(address, layer, interfaceName);
                return Response.AsJson(result);
            };

            Post["/network/config/ipv6/del/neigh"] = x => {
                string address = Request.Form.Address;
                string layer = Request.Form.Layer;
                string interfaceName = Request.Form.Interface;
                var result = NetworkConfig.Iproute2.DeleteNeighborsIpv6(address, layer, interfaceName);
                return Response.AsJson(result);
            };

            Post["/network/config/ipv6/add/route/gw"] = x => {
                string address = Request.Form.Address;
                string gateway = Request.Form.Gateway;
                var g = gateway.Length > 0 ? gateway : null;
                var result = NetworkConfig.Iproute2.AddRouteIpv6Gateway(address, g);
                return Response.AsJson(result);
            };

            Post["/network/config/ipv6/del/route/gw"] = x => {
                string address = Request.Form.Address;
                string gateway = Request.Form.Gateway;
                var g = gateway.Length > 0 ? gateway : null;
                var result = NetworkConfig.Iproute2.DeleteRouteIpv6Gateway(address, g);
                return Response.AsJson(result);
            };

            Post["/network/config/ipv6/add/route/if"] = x => {
                string address = Request.Form.Address;
                string interfaceName = Request.Form.Interface;
                var i = interfaceName.Length > 0 ? interfaceName : null;
                var result = NetworkConfig.Iproute2.AddRouteIpv6Interface(address, i);
                return Response.AsJson(result);
            };

            Post["/network/config/ipv6/del/route/if"] = x => {
                string address = Request.Form.Address;
                string interfaceName = Request.Form.Interface;
                var i = interfaceName.Length > 0 ? interfaceName : null;
                var result = NetworkConfig.Iproute2.DeleteRouteIpv6Interface(address, i);
                return Response.AsJson(result);
            };

            Get["/network/config/ipv6/tunnels/{interfaceName?}"] = x => {
                string interfaceName = x.interfaceName;
                var result = NetworkConfig.Iproute2.ShowTunnelsIpv6(interfaceName);
                return Response.AsJson(result);
            };

            #endregion

            #region BRIDGE
            Post["/network/config/br/add"] = x => {
                string bridgeName = Request.Form.Bridge;
                var result = NetworkConfig.Brctl.AddBridgeName(bridgeName);
                return Response.AsJson(result);
            };

            Post["/network/config/br/del"] = x => {
                string bridgeName = Request.Form.Bridge;
                var result = NetworkConfig.Brctl.DeleteBridgeName(bridgeName);
                return Response.AsJson(result);
            };

            Post["/network/config/br/add/if"] = x => {
                string bridgeName = Request.Form.Bridge;
                string interfaceName = Request.Form.Interface;
                var result = NetworkConfig.Brctl.AddNetworkInterfaceToBridge(bridgeName, interfaceName);
                return Response.AsJson(result);
            };

            Post["/network/config/br/del/if"] = x => {
                string bridgeName = Request.Form.Bridge;
                string interfaceName = Request.Form.Interface;
                var result = NetworkConfig.Brctl.DeleteNetworkInterfaceToBridge(bridgeName, interfaceName);
                return Response.AsJson(result);
            };

            Post["/network/config/br/stp/on/bridge"] = x => {
                string bridgeName = Request.Form.Bridge;
                var result = NetworkConfig.Brctl.EnableStpOnBridge(bridgeName);
                return Response.AsJson(result);
            };

            Post["/network/config/br/stp/off/bridge"] = x => {
                string bridgeName = Request.Form.Bridge;
                var result = NetworkConfig.Brctl.DisableStpOnBridge(bridgeName);
                return Response.AsJson(result);
            };

            Get["/network/config/br/macs/{bridgeName}"] = x => {
                string bridgeName = x.bridgeName;
                var result = NetworkConfig.Brctl.ShowBridgeMacs(bridgeName);
                return Response.AsJson(result);
            };

            Get["/network/config/br/stp/{bridgeName}"] = x => {
                string bridgeName = x.bridgeName;
                var result = NetworkConfig.Brctl.ShowBridgeStp(bridgeName);
                return Response.AsJson(result);
            };

            Post["/network/config/br/path/cost"] = x => {
                string bridgeName = Request.Form.Bridge;
                string path = Request.Form.Path;
                string cost = Request.Form.Cost;
                var result = NetworkConfig.Brctl.SetBridgePathCost(bridgeName, path, cost);
                return Response.AsJson(result);
            };

            Post["/network/config/br/port/prio"] = x => {
                string bridgeName = Request.Form.Bridge;
                string port = Request.Form.Port;
                string prio = Request.Form.Priority;
                var result = NetworkConfig.Brctl.SetBridgePortPriority(bridgeName, port, prio);
                return Response.AsJson(result);
            };

            #endregion
        }
    }
}


text:
describe DropboxApi::Client, "#search" do
  before :each do
    @client = DropboxApi::Client.new
  end

  it "returns a list of matching results", :cassette => "search/success" do
    result = @client.search("image.png")

    expect(result).to be_a(DropboxApi::Results::SearchResult)
    file = result.matches.first.resource
    expect(file.name).to eq("image.png")
  end

  it "raises an error if the file can't be found", :cassette => "search/not_found" do
    expect {
      @client.search("/image.png", "/bad_folder")
    }.to raise_error(DropboxApi::Errors::NotFoundError)
  end
end


text:
<?php

 */

/**
 * An identity map containing objects in the scope of the
 * current request.
 *
 * If an object already exists in scope then no round trip is
 * required to retrieve it.
 *
 * @package repository
 * @subpackage store
 */
class LocalScope {

	/**
	 * Singleton static instance.
	 */
	static private $self;

	/**
	 * Map of current objects.
	 */
	private $map;

	/**
	 * Constructor expects to be passed a storage gateway.
	 */
	function __construct($storage) {
		$this->storage = $storage;
		$this->new = array();
		$this->map = array();
	}

	/**
	 * Returns a single static instance of the identity map.
	 */
	function instance() {
		if (!isset(self::$self)) {
			self::$self = new LocalScope(new MysqlGateway(new MysqlConnection));
		}
		return self::$self;
	}

	/**
	 * Looks up an object by id. If it doesn't exist in memory, it will be
	 * retrieved from the database.
	 */
	function selectById($table, $id) {
		if (!isset($this->map[$table][$id])) {
			$this->storage->selectById($table, $id);
			$this->map[$table][$id] = $this->storage->getArray();
		}
		return $this->map[$table][$id];
	}

	/**
	 * Removes a record from the identity map.
	 */
	function remove($table, $id) {
		unset($this->map[$table][$id]);
	}

	/**
	 * Saves an item persistently and assigns autogenerated id as key.
	 */
	function save($table, $properties) {
		if (!isset($properties['id'])) {
			$this->storage->insert($table, $properties);
			$id = $this->storage->insertId();
			$properties['id'] = $id;
		} else {
			$id = $properties['id'];
			$this->storage->update($table, array('id'=>$id), $properties);
		}
		$this->map[$table][$id] = $properties;
		return $properties;
	}
}


text:
var bUri = require("../bucketUri");
var initOpt = require("../util").initOpt;
var url = require("url");

//cos file API
var COS_API = {
    "getMeta": "/api/cos_get_meta",
    "setMeta": "/api/cos_set_meta",
    "list": "/api/cos_list_file",
    "rename": "/api/cos_rename",
    "del": "/api/cos_delete_file",
   // "compress": "/api/cos_compress_file",
    "mkdir": "/api/cos_mkdir",
    "rmdir": "/api/cos_rmdir"
};

var COS_DOWNLOAD_HOST = "cos.myqcloud.com",
    COS_DOWNLOAD_HOST_INNER = "cos.tencentyun.com";

var deleteFile = function (opt, callback) {
    this.request("del", COS_API.del, opt, function (error,data) {
        callback && callback(error,data);
    });
};

var list = function (opt, callback) {
    this.request("get", COS_API.list, opt, function (error,data) {
        callback && callback(error,data);
    });
};
var rename = function (opt, callback) {
    this.request("post", COS_API.rename, opt, function (error,data) {
        callback && callback(error,data);
    });
};

var getMeta = function (opt, callback) {
    this.request("get", COS_API.getMeta, opt, function (error,data) {
        callback && callback(error,data);
    });
};

var setMeta = function (opt, callback) {
    this.request("post", COS_API.setMeta, opt, function (error,data) {
        callback && callback(error,data);
    });
};

var mkdir = function (opt, callback) {
    this.request("post", COS_API.mkdir, opt, function (error,data) {
        callback && callback(error,data);
    });
};

var rmdir = function (opt, callback) {
    this.request("del", COS_API.rmdir, opt, function (error,data) {
        callback && callback(error,data);
    });
};

/**
 * 获得文件或目录的信息
 * @param {String} bucketUrl cos的文件路径
 * @param {[Function]} callback  回调函数
 */
exports.getMeta = function (bucketUrl, callback) {
    var uri = bUri.parse(bucketUrl);

    getMeta.call(this, {
        bucketId: uri.bucket,
        path: uri.href
    }, callback);
};

/**
 * 设置目录的属性
 * @param bucketUrl
 * @param opt
 * @param callback
 */
exports.setDirMeta = function (bucketUrl, opt, callback) {
    var uri = bUri.parse(bucketUrl);

    setMeta.call(this, initOpt({
        bucketId: uri.bucket,
        path: uri.href,
        expires: "",
        cacheControl: "",
        contentEncoding: "",
        contentDisposition: "",
        contentLanguage: ""
    }, opt), callback);
};

/**
 * 枚举出具体目录的文件
 *
 * @param bucketUrl
 * @param opt
 * @param callback
 */
exports.list = function (bucketUrl, opt, callback) {
    //接口的多态处理
    callback = callback || ((typeof opt == "function") ? opt : null);
    opt = ((typeof opt == "function") ? {} : opt) || {};

    var uri = bUri.parse(bucketUrl);

    list.call(this, initOpt({
        bucketId: uri.bucket,
        path: uri.href,
        offset: 0,
        count: 100,
        prefix: ""
    }, opt), callback);
};

/**
 * 更改bucket上的文件名
 * @param {string} bucketUrl bucket url 路径
 * @param {string} filename 新的名字名
 * @param {function} callback
 */
exports.rename = function (bucketUrl, filename, callback) {
    var uri = bUri.parse(bucketUrl);

    rename.call(this, {
        bucketId: uri.bucket,
        spath: uri.href,
        dpath: uri.path + "/" + filename
    }, callback);
};

/**
 * 删除一个文件
 * @param {string} bucketUrl bucket url 路径
 * @param {function} callback
 */
exports.del = function (bucketUrl, callback) {
    var uri = bUri.parse(bucketUrl);

    deleteFile.call(this, {
        bucketId: uri.bucket,
        path: uri.path,
        deleteObj: uri.file
    }, callback);
};

/**
 * 创建一个目录
 * @param {string} bucketUrl bucket url 路径
 * @param {object} opt 创建目录的参数
 * @param callback
 */
exports.mkdir = function (bucketUrl, opt, callback) {
    //接口的多态处理
    callback = callback || ((typeof opt == "function") ? opt : null);
    opt = ((typeof opt == "function") ? {} : opt) || {};

    var uri = bUri.parse(bucketUrl);

    mkdir.call(this, initOpt({
        bucketId: uri.bucket,
        path: uri.href,
        mkType: "p",
        expires: "",
        cacheControl: "",
        contentEncoding: "",
        contentDisposition: "",
        contentLanguage: ""
    }, opt), callback);
};

/**
 * 删除一个目录
 * @param {string} bucketUrl bucket url 路径
 * @param callback
 */
exports.rmdir = function (bucketUrl, callback) {
    var uri = bUri.parse(bucketUrl);

    rmdir.call(this, {
        bucketId: uri.bucket,
        path: uri.href
    }, callback);
};

/**
 * 返回一个bucketUrl的外网下载地址
 * @param {string} bucketUrl bucket url 路径
 * @param {boolean} signed 是否带签名,如果允许签名后,则可以允许私有bucket的文件被下载
 * @param {object} queryString 下载地址附加的query string
 * @returns {string}
 */
exports.getDownloadUrl = function (bucketUrl, signed, queryString) {
    var uri = bUri.parse(bucketUrl);
    var dl = COS_DOWNLOAD_HOST + "/" + this.accessId + "/" + uri.bucket + uri.href,
        queryString = queryString || {};

    if (signed) {
        dl = dl + this.signUrl("", initOpt({
            bucketId: uri.bucket,
            path: uri.href
        },queryString));
    }

    dl = url.parse(dl, true);

    dl.search = "";
    dl.query = initOpt(dl.query,queryString);
    delete dl.query.accessId;
    delete dl.query.path;
    delete dl.query.bucketId;

    return "http://" + url.format(dl);
}


text:
//
//  YKMKAnnotation.h
//  YelpIPhone
//
//  Created by Gabriel Handford on 10/14/10.
//  Copyright 2010 Yelp. All rights reserved.
//

#import <MapKit/MapKit.h>

@protocol YKMKAnnotationView, YKMKAnnotation;

@protocol YKMKAnnotationViewDelegate <NSObject>
- (void)annotationView:(MKAnnotationView<YKMKAnnotationView> *)annotationView didSelectAnnotation:(id<YKMKAnnotation>)annotation;
@end

@protocol YKMKAnnotationView <NSObject>
// Don't add required methods to this protocol
@optional
@property (assign, nonatomic) id<YKMKAnnotationViewDelegate> delegate;
- (NSString *)viewReuseIdentifier;
- (UIView *)view;
@end

@protocol YKMKAnnotation <MKAnnotation>
- (NSString *)viewReuseIdentifier;
- (MKAnnotationView<YKMKAnnotationView> *)view;
- (id<YKMKAnnotation>)annotationForCallout;
@optional
@property (readonly, nonatomic) NSInteger index;
@property (assign, nonatomic, getter=isSelected) BOOL selected;
- (UIImage *)annotationImageForSelected:(BOOL)selected; // If nil uses default
@end

/*!
 An implementation for MKAnnotation protocol.
 */
@interface YKMKAnnotation : NSObject <MKAnnotation, YKMKAnnotation> {
  CLLocationCoordinate2D _coordinate;
  NSString *_title;
  NSString *_subtitle;
  BOOL _draggable;
  BOOL _selected;
  BOOL _enabled;
  BOOL _canShowCallout;
  BOOL _animatesDrop;
  MKPinAnnotationColor _color;
  UIView *_leftCalloutAccessoryView;
  NSInteger _index;
}

@property (assign, nonatomic) CLLocationCoordinate2D coordinate;
@property (copy, nonatomic) NSString *title;
@property (copy, nonatomic) NSString *subtitle;
@property (assign, nonatomic, getter=isDraggable) BOOL draggable;
@property (assign, nonatomic, getter=isEnabled) BOOL enabled;
@property (assign, nonatomic) BOOL canShowCallout;
@property (assign, nonatomic) BOOL animatesDrop;
@property (assign, nonatomic) MKPinAnnotationColor color;
@property (retain, nonatomic) UIView *leftCalloutAccessoryView;
@property (assign, nonatomic) NSInteger index;

+ (YKMKAnnotation *)annotationWithCoordinate:(CLLocationCoordinate2D)coordinate title:(NSString *)title subtitle:(NSString *)subtitle leftCalloutAccessoryView:(UIView *)leftCalloutAccessoryView draggable:(BOOL)draggable;
@end


text:
package com.dal.fingerprinting.impl.transformers;

import com.dal.fingerprinting.transformers.FingerprintingTransformerConfigurationRule;
import org.junit.Before;
import org.junit.Test;

import java.util.regex.Pattern;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

/**
 * @author Kyle Giovannetti (kyle.giovannetti@dal.ca)
 */
public class FingerprintingTransformerConfigurationRuleImplTest {

    /**
     * Configuration rule.
     */
    private FingerprintingTransformerConfigurationRule rule;

    /**
     * Setup before each test.
     *
     * @throws Exception Any exception.
     */
    @Before
    public void setUp() throws Exception {
        // build a pattern
        Pattern pattern = Pattern.compile("^.*(?<!\\.html)$");
        // construct the rule
        this.rule = new FingerprintingTransformerConfigurationRuleImpl("img", "src", "lt_", pattern,  true);
    }

    /**
     * Test that the local name is as configured in the rule configuration.
     */
    @Test
    public void testGetLocalName() {
        assertEquals("img", this.rule.getLocalName());
    }

    /**
     * Test the attribute name is as configured in the rule configuration.
     */
    @Test
    public void testGetAttribute() {
        assertEquals("src", this.rule.getAttribute());
    }

    /**
     * Test the fingerprint prefix is as configured.
     */
    @Test
    public void testGetFingerprintPrefix() {
        assertEquals("lt_", this.rule.getFingerprintPrefix());
    }

    /**
     * Test that mapping is enabled if the configuration dictates so.
     */
    @Test
    public void testGetIsMappingEnabled() {
        assertEquals(true, this.rule.getIsMappingEnabled());
    }

    /**
     * Test that the rule matches (or does not match) paths that should (or should not) match.
     */
    @Test
    public void testMatches() {
        assertTrue(this.rule.matches("/content/test/image.png"));
        assertFalse(this.rule.matches("/content/test/page.html"));
    }

    /**
     * Test that the toString method produces the expected string for the given configuration.
     */
    @Test
    public void testToString() {
        assertEquals("Rule[localName=\"img\", attribute=\"src\", prefix=\"lt_\", mapping=\"true\", pattern=\"^.*(?<!\\.html)$\"]", this.rule.toString());
    }

}


text:
#pragma once

#include <reproc++/arguments.hpp>
#include <reproc++/environment.hpp>
#include <reproc++/export.hpp>
#include <reproc++/input.hpp>

#include <chrono>
#include <cstdint>
#include <memory>
#include <system_error>
#include <utility>

// Forward declare `reproc_t` so we don't have to include reproc.h in the
// header.
struct reproc_t;

/*! The `reproc` namespace wraps all reproc++ declarations. `process` wraps
reproc's API inside a C++ class. To avoid exposing reproc's API when using
reproc++ all structs, enums and constants of reproc have a replacement in
reproc++. Only differences in behaviour compared to reproc are documented. Refer
to reproc.h and the examples for general information on how to use reproc. */
namespace reproc {

/*! Conversion from reproc `errno` constants to `std::errc` constants:
https://en.cppreference.com/w/cpp/error/errc */
using error = std::errc;

namespace signal {

REPROCXX_EXPORT extern const int kill;
REPROCXX_EXPORT extern const int terminate;

}

/*! Timeout values are passed as `reproc::milliseconds` instead of `int` in
reproc++. */
using milliseconds = std::chrono::duration<int, std::milli>;

REPROCXX_EXPORT extern const milliseconds infinite;
REPROCXX_EXPORT extern const milliseconds deadline;
REPROCXX_EXPORT extern const milliseconds nonblocking;

enum class redirect { pipe, inherit, discard };

enum class stop { noop, wait, terminate, kill };

struct stop_action {
  stop action;
  milliseconds timeout;
};

struct stop_actions {
  stop_action first;
  stop_action second;
  stop_action third;
};

struct options {
  /*! Implicitly converts from any STL container of string pairs to the
  environment format expected by `reproc_start`. */
  class environment environment;
  const char *working_directory = nullptr;

  struct {
    redirect in;
    redirect out;
    redirect err;
  } redirect = {};

  struct stop_actions stop = {};
  reproc::milliseconds timeout = reproc::milliseconds(0);
  reproc::milliseconds deadline = reproc::milliseconds(0);
  bool inherit = false;
  bool discard = false;
  /*! Implicitly converts from string literals to the pointer size pair expected
  by `reproc_start`. */
  class input input;
};

enum class stream { in, out, err };

/*! Improves on reproc's API by adding RAII and changing the API of some
functions to be more idiomatic C++. */
class process {

public:
  REPROCXX_EXPORT process();
  REPROCXX_EXPORT ~process() noexcept;

  // Enforce unique ownership of child processes.
  REPROCXX_EXPORT process(process &&other) noexcept;
  REPROCXX_EXPORT process &operator=(process &&other) noexcept;

  /*! `reproc_start` but implicitly converts from STL containers to the
  arguments format expected by `reproc_start`. */
  REPROCXX_EXPORT std::error_code start(const arguments &arguments,
                                        const options &options = {}) noexcept;

  /*! Sets the `fork` option in `reproc_options` and calls `start`. Returns
  `true` in the child process and `false` in the parent process. */
  REPROCXX_EXPORT std::pair<bool, std::error_code>
  fork(const options &options = {}) noexcept;

  /*! `reproc_poll` but returns a pair of (stream, error). */
  REPROCXX_EXPORT std::pair<stream, std::error_code> poll(stream set);

  /*! `reproc_read` but returns a pair of (bytes read, error). */
  REPROCXX_EXPORT std::pair<size_t, std::error_code>
  read(stream stream, uint8_t *buffer, size_t size) noexcept;

  /*! reproc_write` but returns a pair of (bytes_written, error). */
  REPROCXX_EXPORT std::pair<size_t, std::error_code>
  write(const uint8_t *buffer, size_t size) noexcept;

  REPROCXX_EXPORT std::error_code close(stream stream) noexcept;

  /*! `reproc_wait` but returns a pair of (status, error). */
  REPROCXX_EXPORT std::pair<int, std::error_code>
  wait(milliseconds timeout) noexcept;

  REPROCXX_EXPORT std::error_code terminate() noexcept;

  REPROCXX_EXPORT std::error_code kill() noexcept;

  /*! `reproc_stop` but returns a pair of (status, error). */
  REPROCXX_EXPORT std::pair<int, std::error_code>
  stop(stop_actions stop) noexcept;

private:
  std::unique_ptr<reproc_t, void (*)(reproc_t *)> process_;
};

namespace event {

enum type {
  in = 1 << 0,
  out = 1 << 1,
  err = 1 << 2,
  exit = 1 << 3,
  timeout = 1 << 4
};

struct source {
  process process;
};

};

}


text:
#include "AcpiMetronome.h"

//
// Handle for the Metronome Architectural Protocol instance produced by this driver
//
EFI_HANDLE                  mMetronomeHandle = NULL;

//
// The Metronome Architectural Protocol instance produced by this driver
//
EFI_METRONOME_ARCH_PROTOCOL mMetronome = {
  WaitForTick,
  TICK_PERIOD // 30 uS
};

//
// The CPU I/O Protocol used to access system hardware
//
STATIC EFI_CPU_IO_PROTOCOL              *mCpuIo = NULL;

EFI_ACPI_DESCRIPTION      *mAcpiDescription;

EFI_ACPI_DESCRIPTION *
GetAcpiDescription (
  VOID
  )
{
  VOID                                     *HobList;
  EFI_STATUS                               Status;
  EFI_ACPI_DESCRIPTION                     *AcpiDescription;
  UINTN                                    BufferSize;

  //
  // Get Hob List from configuration table
  //
  Status = EfiLibGetSystemConfigurationTable (&gEfiHobListGuid, &HobList);
  if (EFI_ERROR (Status)) {
    return NULL;
  }

  //
  // Get AcpiDescription Hob
  //
  AcpiDescription = NULL;
  Status = GetNextGuidHob (&HobList, &gEfiAcpiDescriptionGuid, &AcpiDescription, &BufferSize);
  if (EFI_ERROR (Status)) {
    return NULL;
  }

  return AcpiDescription;
}

//
// Driver Entry Point
//
EFI_DRIVER_ENTRY_POINT (InstallAcpiMetronome)

EFI_STATUS
EFIAPI
InstallAcpiMetronome (
  IN EFI_HANDLE        ImageHandle,
  IN EFI_SYSTEM_TABLE  *SystemTable
  )
/*++

Routine Description:

  Install the AcpiMetronome driver.  Loads a Metronome Arch Protocol based
  on the ACPI timer.
  This driver assume the Acpi timer device has been initialized in PEI and ready to use.

Arguments:

  ImageHandle     - Handle for the image of this driver
  SystemTable     - Pointer to the EFI System Table

Returns:

  EFI_SUCCESS - Metronome Architectural Protocol Installed

--*/
{
  EFI_STATUS  Status;

  Status = EfiInitializeDriverLib (ImageHandle, SystemTable);
  ASSERT_EFI_ERROR (Status);

  //
  // Initialize AcpiDescription
  //
  mAcpiDescription = GetAcpiDescription ();
  if (mAcpiDescription == NULL) {
    return EFI_UNSUPPORTED;
  }

  if ((mAcpiDescription->PM_TMR_LEN != 4) ||
      (mAcpiDescription->PM_TMR_BLK.Address == 0) ||
      ((mAcpiDescription->PM_TMR_BLK.AddressSpaceId != ACPI_ADDRESS_ID_IO) &&
       (mAcpiDescription->PM_TMR_BLK.AddressSpaceId != ACPI_ADDRESS_ID_MEMORY))) {
    return EFI_UNSUPPORTED;
  }

  DEBUG ((EFI_D_ERROR, "ACPI Timer Base - %lx\n", mAcpiDescription->PM_TMR_BLK.Address));

  //
  // Make sure the Metronome Architectural Protocol is not already installed in the system
  //
  ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiMetronomeArchProtocolGuid);

  //
  // Get the CPU I/O Protocol and PCI Root Bridge I/O Protocol that this driver requires
  //
  Status = gBS->LocateProtocol (&gEfiCpuIoProtocolGuid, NULL, &mCpuIo);
  ASSERT_EFI_ERROR (Status);

  //
  // The legacy 8254 counter is a critical legacy hardware for many CSM bins and OSes to implement stall function,
  // so no matter whether we use it in Tiano, we should initialize the 8254 as a timer for compatibility.
  // We could do 8254 initialization somewhere outside this driver,  but for easy to replacy Legacy
  // Metronome drvier with this ACPI metronome driver,  and not need additional code, we add the 8254
  // initialization here to promise the 8254 is initialized.
  // Program port 61 timer 1 as refresh timer.
  //
  WriteIo8 (TIMER1_CONTROL_PORT, LOAD_COUNTER1_LSB);
  WriteIo8 (TIMER1_COUNT_PORT, COUNTER1_COUNT);

  //
  // Install on a new handle
  //
  Status = gBS->InstallMultipleProtocolInterfaces (
                  &mMetronomeHandle,
                  &gEfiMetronomeArchProtocolGuid,
                  &mMetronome,
                  NULL
                  );
  ASSERT_EFI_ERROR (Status);

  return Status;
}

UINT32
GetAcpiTick (
  VOID
  )
/*++

Routine Description:

  Get the current ACPI counter's value

Arguments:

  None

Returns:

  The value of the counter

--*/
{
  UINT32  Tick;

  switch (mAcpiDescription->PM_TMR_BLK.AddressSpaceId) {
  case ACPI_ADDRESS_ID_IO:
    mCpuIo->Io.Read (mCpuIo, EfiCpuIoWidthUint32, mAcpiDescription->PM_TMR_BLK.Address, 1, &Tick);
    break;
  case ACPI_ADDRESS_ID_MEMORY:
    mCpuIo->Mem.Read (mCpuIo, EfiCpuIoWidthUint32, mAcpiDescription->PM_TMR_BLK.Address, 1, &Tick);
    break;
  default:
    ASSERT (FALSE);
    Tick = 0;
    break;
  }

  //
  // Only 23:0 bit is true value
  //
  if (mAcpiDescription->TMR_VAL_EXT == 0) {
    Tick &= 0xffffff;
  }
  return Tick;
}

EFI_STATUS
EFIAPI
WaitForTick (
  IN EFI_METRONOME_ARCH_PROTOCOL  *This,
  IN UINT32                       TickNumber
  )
/*++

Routine Description:

  Waits for the TickNumber of ticks from ACPI timer.
  One Tick delay 30 uS.

Arguments:

  This                        Pointer to the protocol instance.
  TickNumber          Tick Number to be waited

Returns:

  EFI_SUCCESS         If number of ticks occurred.

--*/
{
  UINT64                Ticks;
  UINTN                 Counts;
  UINTN                 CurrentTick;
  UINTN                 LastTick;
  UINTN                 RemainingTick;

  if (TickNumber == 0) {
    return EFI_SUCCESS;
  }

  //
  // The timer frequency is 3.579545 MHz, so 1 us corresponds 3.58 clocks, so one one Tick (30 us) corresponds 107.39 clocks
  //
  CurrentTick  = GetAcpiTick ();
  LastTick = CurrentTick;
  Ticks = DivU64x32 (MultU64x32 (TickNumber, 10739), 100, &RemainingTick) + CurrentTick + 1;
  if (mAcpiDescription->TMR_VAL_EXT == 0) {
    Counts = (UINTN) RShiftU64 (Ticks, 24);
    RemainingTick = (UINTN)((UINT32)Ticks & 0xFFFFFF);
  } else {
    Counts = (UINTN) RShiftU64 (Ticks, 32);
    RemainingTick = (UINTN)((UINT32)Ticks & 0xFFFFFFFF);
  }

  //
  // The loops needed by timer overflow, remaining clocks within one loop
  //
  while (Counts > 0) {
    CurrentTick = GetAcpiTick ();
    //
    // If last tick > current tick, the timer has overfloweded once
    //
    if (CurrentTick < LastTick) {
      Counts --;
    }
    LastTick = CurrentTick;
  }

  while ((RemainingTick > CurrentTick) && (LastTick <= CurrentTick) ) {
    LastTick = CurrentTick;
    CurrentTick   = GetAcpiTick ();
  }

  return EFI_SUCCESS;
}

VOID
WriteIo8 (
  UINT16  Port,
  UINT8   Data
  )
/*++

Routine Description:

  Write an 8 bit value to an I/O port and save it to the S3 script

Arguments:

  Port - IO Port
  Data - Data in IO Port

Returns:

  None.

--*/
{
  mCpuIo->Io.Write (
              mCpuIo,
              EfiCpuIoWidthUint8,
              Port,
              1,
              &Data
              );
}


text:
//Copyright (c) Microsoft Corporation.  All rights reserved.

using System;
using System.Windows.Forms;
using Microsoft.WindowsAPICodePack;
using Microsoft.WindowsAPICodePack.Taskbar;

namespace TaskbarDemo
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            if (!TaskbarManager.IsPlatformSupported)
            {
                MessageBox.Show("This demo requires to be run on Windows 7", "Demo needs Windows 7", MessageBoxButtons.OK, MessageBoxIcon.Error);
                System.Environment.Exit(0);
                return;
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new TaskbarDemoMainForm());
        }
    }
}


text:
/**
 * This class is generated by jOOQ
 */
package us.fok.lenzenslijper.models.jooq.udt.records;

/**
 * This class is generated by jOOQ.
 */
@javax.annotation.Generated(value    = { "http://www.jooq.org", "3.3.0" },
                            comments = "This class is generated by jOOQ")
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class AddbandargRecord extends org.jooq.impl.UDTRecordImpl<us.fok.lenzenslijper.models.jooq.udt.records.AddbandargRecord> {

	private static final long serialVersionUID = -1807377580;

	/**
	 * Setter for public.addbandarg.index.
	 */
	public void setIndex(java.lang.Integer value) {
		setValue(us.fok.lenzenslijper.models.jooq.udt.Addbandarg.INDEX, value);
	}

	/**
	 * Getter for public.addbandarg.index.
	 */
	public java.lang.Integer getIndex() {
		return getValue(us.fok.lenzenslijper.models.jooq.udt.Addbandarg.INDEX);
	}

	/**
	 * Setter for public.addbandarg.pixeltype.
	 */
	public void setPixeltype(java.lang.String value) {
		setValue(us.fok.lenzenslijper.models.jooq.udt.Addbandarg.PIXELTYPE, value);
	}

	/**
	 * Getter for public.addbandarg.pixeltype.
	 */
	public java.lang.String getPixeltype() {
		return getValue(us.fok.lenzenslijper.models.jooq.udt.Addbandarg.PIXELTYPE);
	}

	/**
	 * Setter for public.addbandarg.initialvalue.
	 */
	public void setInitialvalue(java.lang.Double value) {
		setValue(us.fok.lenzenslijper.models.jooq.udt.Addbandarg.INITIALVALUE, value);
	}

	/**
	 * Getter for public.addbandarg.initialvalue.
	 */
	public java.lang.Double getInitialvalue() {
		return getValue(us.fok.lenzenslijper.models.jooq.udt.Addbandarg.INITIALVALUE);
	}

	/**
	 * Setter for public.addbandarg.nodataval.
	 */
	public void setNodataval(java.lang.Double value) {
		setValue(us.fok.lenzenslijper.models.jooq.udt.Addbandarg.NODATAVAL, value);
	}

	/**
	 * Getter for public.addbandarg.nodataval.
	 */
	public java.lang.Double getNodataval() {
		return getValue(us.fok.lenzenslijper.models.jooq.udt.Addbandarg.NODATAVAL);
	}

	/**
	 * Create a new public.addbandarg record
	 */
	public AddbandargRecord() {
		super(us.fok.lenzenslijper.models.jooq.udt.Addbandarg.ADDBANDARG);
	}
}


text:
ZoneUpdater = Class.create({

    initialize: function (spec) {
	    var $j = jQuery.noConflict();
        this.element = $j('[id="' + spec.elementId + '"]');
        this.listenerURI = spec.listenerURI;
	    $j.extend(this.element, {getStorage: function () {
            return {zoneId: spec.zoneId};
        }});
        this.element.data('zoneId', spec.zoneId);

        if (spec.clientEvent) {
            this.clientEvent = spec.clientEvent;
            this.element.on(this.clientEvent, this.updateZone.bindAsEventListener(this));
        }
    },

    updateZone: function () {
	    var $j = jQuery.noConflict();
        var zoneManager = Tapestry.findZoneManagerForZone(this.element.data('zoneId'));

        if (!zoneManager) {
            return;
        }

        var listenerURIWithValue = this.listenerURI;

        var parameters = {};
        if (this.element.val()) {
            var param = this.element.val();
            if (param) {
                //listenerURIWithValue = addQueryStringParameter(listenerURIWithValue, 'param', param);
                parameters["param"] = param;
            }
        }

        zoneManager.updateFromURL(listenerURIWithValue, parameters);
    }

});

function addQueryStringParameter(url, name, value) {
    if (url.indexOf('?') < 0) {
        url += '?'
    } else {
        url += '&';
    }
    value = escape(value);
    url += name + '=' + value;
    return url;
}


text:
package org.gwtbootstrap3.client.ui;

import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.Element;
import com.google.gwt.user.client.ui.Widget;
import org.gwtbootstrap3.client.ui.base.ComplexWidget;
import org.gwtbootstrap3.client.ui.base.HasResponsiveness;
import org.gwtbootstrap3.client.ui.base.helper.StyleHelper;
import org.gwtbootstrap3.client.ui.constants.DeviceSize;
import org.gwtbootstrap3.client.ui.constants.NavbarPull;
import org.gwtbootstrap3.client.ui.constants.Pull;
import org.gwtbootstrap3.client.ui.constants.Styles;

/**
 * @author Sven Jacobs
 * @author Joshua Godi
 * @see NavbarLink
 */
public class NavbarText extends ComplexWidget implements HasResponsiveness {

    public NavbarText() {
        setElement(Document.get().createPElement());
        setStyleName(Styles.NAVBAR_TEXT);
    }

    @Override
    public void setPull(final Pull pull) {
        NavbarPull navbarPull = NavbarPull.NONE;

        if (pull == Pull.LEFT) {
            navbarPull = NavbarPull.LEFT;
        } else {
            navbarPull = NavbarPull.RIGHT;
        }

        StyleHelper.addUniqueEnumStyleName(this, NavbarPull.class, navbarPull);
    }

    @Override
    public Pull getPull() {
        final NavbarPull navbarPull = NavbarPull.fromStyleName(getStyleName());

        if (navbarPull == NavbarPull.NONE) {
            return Pull.NONE;
        }

        return navbarPull == NavbarPull.RIGHT ? Pull.RIGHT : Pull.LEFT;
    }

    @Override
    public void add(final Widget child) {
        add(child, (Element) getElement());
    }

    @Override
    public void setVisibleOn(final DeviceSize deviceSize) {
        StyleHelper.setVisibleOn(this, deviceSize);
    }

    @Override
    public void setHiddenOn(final DeviceSize deviceSize) {
        StyleHelper.setHiddenOn(this, deviceSize);
    }
}


text:
IMAGE_NAME=centr

docker build -t $IMAGE_NAME .


text:
var foo = 42,
    bar,
    baz;

//Version a
if (foo >  12){
    bar = 'greater than';
}
else {
    bar = 'less than or equal to';
}

//Version b - functionally equivalent to b
baz = foo >  12 ? 'greater than' : 'less than or equal to';

//null/empty/no value check
var qux;
qux = qux ? qux : 'no longer empty';