text:
<?php

namespace Glenn\Config;

use ArrayAccess;

use Glenn\Config\Contracts\ManagerContract;

class Manager implements ArrayAccess, ManagerContract
{
    /**
     * All of the configuration items.
     *
     * @var array
     */
    protected $items = [];

    /**
     * Construct a new Config Manager pre-loaded with items.
     *
     * @param array $items
     *
     * @author Glenn McEwan <glenn@web-dev.ninja>
     */
    public function __construct(array $items = [])
    {
        $this->items = $items;
    }

    /**
     * Check if a key exists in the config.
     *
     * @param string $key The key in the config to check for existence
     *
     * @return bool
     *
     * @author Glenn McEwan <glenn@web-dev.ninja>
     */
    public function has($key)
    {
        $items = $this->all();

        if (empty($items) || is_null($key)) {
            return false;
        }

        if (array_key_exists($key, $items)) {
            return true;
        }

        if ($this->get($key) === null) {
            return false;
        }

        return true;
    }

    /**
     * Retrieve a given config value by its key.
     *
     * @param string $key     Config key
     * @param mixed  $default Default value if the key doesn't exist
     *
     * @return mixed The config value
     *
     * @author Glenn McEwan <glenn@web-dev.ninja>
     */
    public function get($key, $default = null)
    {
        $items = $this->all();

        if (array_key_exists($key, $items)) {
            return $items[$key];
        }

        foreach (explode('.', $key) as $segment) {
            if (!is_array($items) || !array_key_exists($segment, $items)) {
                return $default;
            }

            $items = $items[$segment];
        }

        return $items;
    }

    /**
     * Retrieve all of the config items.
     *
     * @return array
     *
     * @author Glenn McEwan <glenn@web-dev.ninja>
     */
    public function all()
    {
        return $this->items;
    }

    /**
     * Set a config entry by key, optional value.
     *
     * @param string $key   Config key
     * @param mixed  $value Config value
     *
     * @return static return self / $this for chain-ability
     *
     * @author Glenn McEwan <glenn@web-dev.ninja>
     */
    public function set($key, $value = null)
    {
        $items = &$this->items;

        $keys = explode('.', $key);

        foreach ($keys as $key) {
            if (!isset($items[$key]) || !is_array($items[$key])) {
                $items[$key] = [];
            }

            $items = &$items[$key];
        }

        $items = $value;

        return $this;
    }

    /**
     * If a parent key is passed, for example, as 'deployment',
     * then the data will be put in to the Config as deployment.*,
     * otherwise it will be placed at the root level in the config.
     *
     * Optionally, a parent key in which the config data will reside.
     *
     * @param mixed  $value The array to set in to the config
     * @param string $key   [optional] A parent config key to set the array in to
     *
     * @author Glenn McEwan <glenn@web-dev.ninja>
     */
    public function setArray($value, $key = null)
    {
        if ($key !== null) {
            $this->set($key, $value);
        } else {
            foreach ($value as $head => $node) {
                $this->set($head, $node);
            }
        }

        return $this;
    }

    /*
    |--------------------------------------------------------------------------
    | Interface - ArrayAccess
    |--------------------------------------------------------------------------
    |
    */

    /**
     * Check if a key exists in the config.
     *
     * @param string $key The key in the config to check for existence
     *
     * @return bool
     *
     * @author Glenn McEwan <glenn@web-dev.ninja>
     */
    public function offsetExists($key)
    {
        return $this->has($key);
    }

    /**
     * Retrieve a given config value by its key.
     *
     * @param string $key Config key
     *
     * @return mixed The config value
     *
     * @author Glenn McEwan <glenn@web-dev.ninja>
     */
    public function offsetGet($key)
    {
        return $this->get($key);
    }

    /**
     * Set a config entry by key, optional value.
     *
     * @param string $key   Config key
     * @param mixed  $value Config value
     *
     * @author Glenn McEwan <glenn@web-dev.ninja>
     */
    public function offsetSet($key, $value)
    {
        $this->set($key, $value);
    }

    /**
     * Unset a configuration option.
     *
     * @param string $key
     *
     * @author Glenn McEwan <glenn@web-dev.ninja>
     */
    public function offsetUnset($key)
    {
        $this->set($key, null);
    }
}


text:
Notify.js is the best alternative of JavaScript alert, confirm and warning messages

 - It's easy to use inside the Angular 1.x.
 - Easy setup and installation
 - Easy customization of UI
 - One time add `alert-notification` directive

Demo : https://sachinkurkute.github.io/angular-notification-alert/

##Installation and setup
Download URL : https://github.com/SachinKurkute/angular-notification-alert

Add the ***notify.js*** reference just below the angular.js reference. as per given below
```javascript
<script type="text/javascript" src="resources/lib/angular.min.js"></script>
<script type="text/javascript" src="notify/notify.js"></script>
```
Add app module dependency '`notify`' for the your app.
```javascript
var myapp = angular.module('notifyApp',['notify']);
```
Inject the '***notification***' dependency with controller.
We can call the alert and warning messages using `notify()` function
Add `alert-notification` directive on your root page (`index.html`) inside the angular app
```javascript
<body ng-app="myApp">
<alert-notification></alert-notification>
</body>
```
Now you are ready to use the notification service.
##How to use
####**Create notification object**
Syntax:
Properties of Object:

 1. message - [`string`] : You can pass the message
 2. dismissal - [`bool`] : Default is false, you can set true is required
 3. buttons: [`Object Array`] : Set the number of button as a Object, it will return on callback function. Object properties are: `title`, `result`, `classes`
 4. classes : [`string`] : Set the classes for the notification container and buttons.

**Example**:
```javascript
var notiObj = {
	message:"Your notification message",
	dismissal:true, // On click of overlay alert will close
	buttons:[
	{
		title:"OK",
		result:"ok"
	}
	]
}
```
####**How to call notification message**
Call the `notification.notify()` function with the notification Object and write the callback function to get the response.
```javascript
notification.notify(notiObj, function(res){ // response is the button object
	console.log("You clicked button",res);
	//On the basis of response write your code.
	if(res.result == 'ok'){
		//----
	}
	else{
		// ----
	}
});
```

####Make **Synchronous **  call
We can make it synchronous easily using the nested call.
See the below syntax.
```javascript
notification.notify(notificationObj,function(res){
	// On the first call response we can call the otherfunction or alert
	if(res.result === 'ok'){
		callFUnction();
	}else{ // call another alert
		notification.notify(notificationObj2,function(res){
			// Next response
		});
	}
});
```

##About me:
I am JavaScript developer (Beginner),  Working on the Web applications and mobile app development. I am try to share my knowledge and Ideas through this platform.

## Table of contents

You can insert a table of contents using the marker `[TOC]`:

[TOC]

redpajama_set_name: RedPajamaGithub


text:
/**************************************************************************************************
 *   File:     NutritionSettingsActivity.java
 *   Author:   Abigail Jones
 *   Date:     10/28/15
 *   Class:    Capstone/Software Engineering
 *   Project:  PaperOrPlastic Application
 *   Purpose:  This activity will be the activity that is opened when the user chooses to
 *             look at the nutrition settings. This can happen through the settings button on the
 *             continue activity or through the settings tab when the nutrition button is pressed
 *             from the continue activity.
 ***************************************************************************************************/

package edu.pacificu.cs493f15_1.paperorplasticapp.nutrition;

import android.app.Activity;
import android.graphics.Typeface;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import edu.pacificu.cs493f15_1.paperorplasticapp.BaseActivity;
import edu.pacificu.cs493f15_1.paperorplasticapp.menu.ContinueActivity;
import edu.pacificu.cs493f15_1.paperorplasticapp.R;

/***************************************************************************************************
 *   Class:         NutritionSettingsActivity
 *   Description:   Creates NutritionSettingsActivity class that controls what occurs when the
 *                  user reaches the nutrition settings page. Specifically, handles what happens
 *                  when the user specifies whether the nutrition button should be displayed on
 *                  the continue activity.
 *   Parameters:    N/A
 *   Returned:      N/A
 **************************************************************************************************/
public class NutritionSettingsActivity extends BaseActivity implements View.OnClickListener
{
    //Used to change fonts
    private TextView titleText;

    @Override
    protected void onCreate (Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_nutrition_settings);

        titleText = (TextView) findViewById (R.id.NutritionSettingsTitleText);

        Typeface laneUpperFont = Typeface.createFromAsset (getAssets (), "fonts/laneWUnderLine.ttf");

        titleText.setTypeface(laneUpperFont);
    }

    /***********************************************************************************************
     *   Method:      onClick
     *   Description: Called when a click has been captured.
     *
     *   Parameters:  view - the view that has been clicked
     *   Returned:    N/A
     ***********************************************************************************************/
    public void onClick (View view)
    {

    }
}


text:
{% extends "base.html" %}
{% block title %}Nouvelle conversation{% endblock title %}
{% block content %}
{% load crispy_forms_tags %}
{# Path #}

Accueil

Messages privés

Nouveau message

{# Form #}

        {% crispy form %}

    {% include "smileys.html" %}

{% endblock %}


text:
Upload a Letter

           Browse... <input type="file" nv-file-select="" uploader="uploader" multiple />

          OR

              Drop Images Here

              Name
              Size
              Progress
              Status
              Actions

                {{ item.file.name }}

              {{ item.file.size/1024/1024|number:2 }} MB

                <button type="button" class="btn btn-success btn-xs" ng-click="item.upload()" ng-disabled="item.isReady || item.isUploading || item.isSuccess">
                   Upload
                </button>
                <button type="button" class="btn btn-warning btn-xs" ng-click="item.cancel()" ng-disabled="!item.isUploading">
                   Cancel
                </button>
                <button type="button" class="btn btn-danger btn-xs" ng-click="item.remove()">
                   Remove
                </button>

            Upload progress:

          <button type="button" class="btn btn-success btn-s" ng-click="uploader.uploadAll()" ng-disabled="!uploader.getNotUploadedItems().length">
             Upload all
          </button>
          <button type="button" class="btn btn-warning btn-s" ng-click="uploader.cancelAll()" ng-disabled="!uploader.isUploading">
             Cancel all
          </button>
          <button type="button" class="btn btn-danger btn-s" ng-click="uploader.clearQueue()" ng-disabled="!uploader.queue.length">
             Remove all
          </button>

      <button class="btn btn-primary" type="button" ng-click="uploadLetter()" ng-disabled="!uploader.queue.length || uploader.getNotUploadedItems().length"> Upload Letter</button>
      <button class="btn btn-warning" type="button" ng-click="cancelUpload()"> Cancel</button>


text:
' Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

Imports System.Xml.Linq
Imports Microsoft.CodeAnalysis.Editor.UnitTests.AutomaticCompletion
Imports Microsoft.CodeAnalysis.Editor.UnitTests.Extensions
Imports Microsoft.CodeAnalysis.Editor.UnitTests.Workspaces
Imports Microsoft.CodeAnalysis.Editor.Implementation.AutomaticCompletion

Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.AutomaticCompletion
    Public Class AutomaticBracketCompletionTests
        Inherits AbstractAutomaticBraceCompletionTests

        <WpfFact, Trait(Traits.Feature, Traits.Features.AutomaticCompletion)>
        Public Sub TestCreation()
            Using session = CreateSession("$$")
                Assert.NotNull(session)
            End Using
        End Sub

        <WpfFact, Trait(Traits.Feature, Traits.Features.AutomaticCompletion)>
        Public Sub TestBracket()
            Using session = CreateSession("$$")
                Assert.NotNull(session)
                CheckStart(session.Session)
            End Using
        End Sub

        <WpfFact, Trait(Traits.Feature, Traits.Features.AutomaticCompletion)>
        Public Sub TestBracket2()
            Using session = CreateSession("Imports System$$")
                Assert.NotNull(session)
                CheckStart(session.Session)
            End Using
        End Sub

        <WpfFact, Trait(Traits.Feature, Traits.Features.AutomaticCompletion)>
        Public Sub TestInvalidLocation_Bracket()
            Dim code = Class C
    Dim s As String = "$$
End Class

            Using session = CreateSession(code)
                Assert.Null(session)
            End Using
        End Sub

        <WpfFact, Trait(Traits.Feature, Traits.Features.AutomaticCompletion)>
        Public Sub TestInvalidLocation_Comment()
            Dim code = Class C
    ' $$
End Class

            Using session = CreateSession(code)
                Assert.Null(session)
            End Using
        End Sub

        <WpfFact, Trait(Traits.Feature, Traits.Features.AutomaticCompletion)>
        Public Sub TestInvalidLocation_DocComment()
            Dim code = Class C
    ''' $$
End Class

            Using session = CreateSession(code)
                Assert.Null(session)
            End Using
        End Sub

        <WpfFact, Trait(Traits.Feature, Traits.Features.AutomaticCompletion)>
        Public Sub TestInvalidLocation_Comment_CloseBracket()
            Dim code = Class C
    Sub Method()
        Dim $$
    End Sub
End Class

            Using session = CreateSession(code)
                Assert.NotNull(session)
                CheckStart(session.Session)
                Type(session.Session, "'")
                CheckOverType(session.Session, allowOverType:=False)
            End Using
        End Sub

        <WpfFact, Trait(Traits.Feature, Traits.Features.AutomaticCompletion)>
        Public Sub TestInvalidLocation_Comment_Tab()
            Dim code = Class C
    Sub Method()
        Dim $$
    End Sub
End Class

            Using session = CreateSession(code)
                Assert.NotNull(session)
                CheckStart(session.Session)
                Type(session.Session, "'")
                CheckTab(session.Session)
            End Using
        End Sub

        Friend Overloads Function CreateSession(code As XElement) As Holder
            Return CreateSession(code.NormalizedValue())
        End Function

        Friend Overloads Function CreateSession(code As String) As Holder
            Return CreateSession(
TestWorkspace.CreateVisualBasic(code),
BraceCompletionSessionProvider.Bracket.OpenCharacter, BraceCompletionSessionProvider.Bracket.CloseCharacter)
        End Function
    End Class
End Namespace


text:
namespace acl
{
	ACL_IMPL_VERSION_NAMESPACE_BEGIN

	inline track::track() noexcept
		: m_allocator(nullptr)
		, m_data(nullptr)
		, m_num_samples(0)
		, m_stride(0)
		, m_data_size(0)
		, m_sample_rate(0.0F)
		, m_type(track_type8::float1f)
		, m_category(track_category8::scalarf)
		, m_sample_size(0)
		, m_desc()
		, m_name()
	{}

	inline track::track(track&& other) noexcept
		: m_allocator(other.m_allocator)
		, m_data(other.m_data)
		, m_num_samples(other.m_num_samples)
		, m_stride(other.m_stride)
		, m_data_size(other.m_data_size)
		, m_sample_rate(other.m_sample_rate)
		, m_type(other.m_type)
		, m_category(other.m_category)
		, m_sample_size(other.m_sample_size)
		, m_desc(other.m_desc)
		, m_name(std::move(other.m_name))
	{
		other.m_allocator = nullptr;
		other.m_data = nullptr;
	}

	inline track::~track()
	{
		if (is_owner())
		{
			// We own the memory, free it
			m_allocator->deallocate(m_data, m_data_size);
		}
	}

	inline track& track::operator=(track&& other) noexcept
	{
		std::swap(m_allocator, other.m_allocator);
		std::swap(m_data, other.m_data);
		std::swap(m_num_samples, other.m_num_samples);
		std::swap(m_stride, other.m_stride);
		std::swap(m_data_size, other.m_data_size);
		std::swap(m_sample_rate, other.m_sample_rate);
		std::swap(m_type, other.m_type);
		std::swap(m_category, other.m_category);
		std::swap(m_sample_size, other.m_sample_size);
		std::swap(m_desc, other.m_desc);
		std::swap(m_name, other.m_name);
		return *this;
	}

	inline void* track::operator[](uint32_t index)
	{
		ACL_ASSERT(index < m_num_samples, "Invalid sample index. %u >= %u", index, m_num_samples);
		return m_data + (size_t(index) * m_stride);
	}

	inline const void* track::operator[](uint32_t index) const
	{
		ACL_ASSERT(index < m_num_samples, "Invalid sample index. %u >= %u", index, m_num_samples);
		return m_data + (size_t(index) * m_stride);
	}

	inline uint32_t track::get_output_index() const
	{
		switch (m_category)
		{
		default:
		case track_category8::scalarf:		return m_desc.scalar.output_index;
		case track_category8::transformf:	return m_desc.transform.output_index;
		}
	}

	template<>
	inline track_desc_scalarf& track::get_description()
	{
		ACL_ASSERT(track_desc_scalarf::category == m_category, "Unexpected track category");
		return m_desc.scalar;
	}

	template<>
	inline track_desc_transformf& track::get_description()
	{
		ACL_ASSERT(track_desc_transformf::category == m_category, "Unexpected track category");
		return m_desc.transform;
	}

	template<>
	inline const track_desc_scalarf& track::get_description() const
	{
		ACL_ASSERT(track_desc_scalarf::category == m_category, "Unexpected track category");
		return m_desc.scalar;
	}

	template<>
	inline const track_desc_transformf& track::get_description() const
	{
		ACL_ASSERT(track_desc_transformf::category == m_category, "Unexpected track category");
		return m_desc.transform;
	}

	inline track track::get_copy(iallocator& allocator) const
	{
		track track_;
		get_copy_impl(allocator, track_);
		return track_;
	}

	inline track track::get_ref() const
	{
		track track_;
		get_ref_impl(track_);
		return track_;
	}

	inline error_result track::is_valid() const
	{
		if (m_data == nullptr)
			return error_result();

		if (m_num_samples == 0xFFFFFFFFU)
			return error_result("Too many samples");

		if (m_sample_rate <= 0.0F || !rtm::scalar_is_finite(m_sample_rate))
			return error_result("Invalid sample rate");

		switch (m_category)
		{
		case track_category8::scalarf:		return m_desc.scalar.is_valid();
		case track_category8::transformf:	return m_desc.transform.is_valid();
		default:							return error_result("Invalid category");
		}
	}

	inline track::track(track_type8 type, track_category8 category) noexcept
		: m_allocator(nullptr)
		, m_data(nullptr)
		, m_num_samples(0)
		, m_stride(0)
		, m_data_size(0)
		, m_sample_rate(0.0F)
		, m_type(type)
		, m_category(category)
		, m_sample_size(0)
		, m_desc()
		, m_name()
	{}

	inline track::track(iallocator* allocator, uint8_t* data, uint32_t num_samples, uint32_t stride, size_t data_size, float sample_rate, track_type8 type, track_category8 category, uint8_t sample_size) noexcept
		: m_allocator(allocator)
		, m_data(data)
		, m_num_samples(num_samples)
		, m_stride(stride)
		, m_data_size(data_size)
		, m_sample_rate(sample_rate)
		, m_type(type)
		, m_category(category)
		, m_sample_size(sample_size)
		, m_desc()
		, m_name()
	{}

	inline void track::get_copy_impl(iallocator& allocator, track& out_track) const
	{
		out_track.m_allocator = &allocator;
		out_track.m_data = reinterpret_cast<uint8_t*>(allocator.allocate(m_data_size));
		out_track.m_num_samples = m_num_samples;
		out_track.m_stride = m_stride;
		out_track.m_data_size = m_data_size;
		out_track.m_sample_rate = m_sample_rate;
		out_track.m_type = m_type;
		out_track.m_category = m_category;
		out_track.m_sample_size = m_sample_size;
		out_track.m_desc = m_desc;
		out_track.m_name = m_name.get_copy(allocator);

		std::memcpy(out_track.m_data, m_data, m_data_size);
	}

	inline void track::get_ref_impl(track& out_track) const
	{
		out_track.m_allocator = nullptr;
		out_track.m_data = m_data;
		out_track.m_num_samples = m_num_samples;
		out_track.m_stride = m_stride;
		out_track.m_data_size = m_data_size;
		out_track.m_sample_rate = m_sample_rate;
		out_track.m_type = m_type;
		out_track.m_category = m_category;
		out_track.m_sample_size = m_sample_size;
		out_track.m_desc = m_desc;
		out_track.m_name = m_name.get_copy();
	}

	template<track_type8 track_type_>
	inline typename track_typed<track_type_>::sample_type& track_typed<track_type_>::operator[](uint32_t index)
	{
		ACL_ASSERT(index < m_num_samples, "Invalid sample index. %u >= %u", index, m_num_samples);
		return *reinterpret_cast<sample_type*>(m_data + (size_t(index) * m_stride));
	}

	template<track_type8 track_type_>
	inline const typename track_typed<track_type_>::sample_type& track_typed<track_type_>::operator[](uint32_t index) const
	{
		ACL_ASSERT(index < m_num_samples, "Invalid sample index. %u >= %u", index, m_num_samples);
		return *reinterpret_cast<const sample_type*>(m_data + (size_t(index) * m_stride));
	}

	template<track_type8 track_type_>
	inline typename track_typed<track_type_>::sample_type* track_typed<track_type_>::get_data()
	{
		ACL_ASSERT(m_stride == sizeof(sample_type), "Samples are not contiguous in memory, this function is unsafe");
		return reinterpret_cast<sample_type*>(m_data);
	}

	template<track_type8 track_type_>
	inline const typename track_typed<track_type_>::sample_type* track_typed<track_type_>::get_data() const
	{
		ACL_ASSERT(m_stride == sizeof(sample_type), "Samples are not contiguous in memory, this function is unsafe");
		return reinterpret_cast<const sample_type*>(m_data);
	}

	template<track_type8 track_type_>
	inline typename track_typed<track_type_>::desc_type& track_typed<track_type_>::get_description()
	{
		return track::get_description<desc_type>();
	}

	template<track_type8 track_type_>
	inline const typename track_typed<track_type_>::desc_type& track_typed<track_type_>::get_description() const
	{
		return track::get_description<desc_type>();
	}

	template<track_type8 track_type_>
	inline track_typed<track_type_> track_typed<track_type_>::get_copy(iallocator& allocator) const
	{
		track_typed track_;
		track::get_copy_impl(allocator, track_);
		return track_;
	}

	template<track_type8 track_type_>
	inline track_typed<track_type_> track_typed<track_type_>::get_ref() const
	{
		track_typed track_;
		track::get_ref_impl(track_);
		return track_;
	}

	template<track_type8 track_type_>
	inline track_typed<track_type_> track_typed<track_type_>::make_copy(const typename track_typed<track_type_>::desc_type& desc, iallocator& allocator, const sample_type* data, uint32_t num_samples, float sample_rate, uint32_t stride)
	{
		const size_t num_samples_ = num_samples;
		const size_t data_size = num_samples_ * sizeof(sample_type);
		const uint8_t* data_raw = reinterpret_cast<const uint8_t*>(data);

		// Copy the data manually to avoid preserving the stride
		sample_type* data_copy = reinterpret_cast<sample_type*>(allocator.allocate(data_size));
		for (size_t index = 0; index < num_samples_; ++index)
			data_copy[index] = *reinterpret_cast<const sample_type*>(data_raw + (index * stride));

		return track_typed<track_type_>(&allocator, reinterpret_cast<uint8_t*>(data_copy), num_samples, sizeof(sample_type), data_size, sample_rate, desc);
	}

	template<track_type8 track_type_>
	inline track_typed<track_type_> track_typed<track_type_>::make_reserve(const typename track_typed<track_type_>::desc_type& desc, iallocator& allocator, uint32_t num_samples, float sample_rate)
	{
		const size_t data_size = size_t(num_samples) * sizeof(sample_type);
		return track_typed<track_type_>(&allocator, reinterpret_cast<uint8_t*>(allocator.allocate(data_size)), num_samples, sizeof(sample_type), data_size, sample_rate, desc);
	}

	template<track_type8 track_type_>
	inline track_typed<track_type_> track_typed<track_type_>::make_owner(const typename track_typed<track_type_>::desc_type& desc, iallocator& allocator, sample_type* data, uint32_t num_samples, float sample_rate, uint32_t stride)
	{
		const size_t data_size = size_t(num_samples) * stride;
		return track_typed<track_type_>(&allocator, reinterpret_cast<uint8_t*>(data), num_samples, stride, data_size, sample_rate, desc);
	}

	template<track_type8 track_type_>
	inline track_typed<track_type_> track_typed<track_type_>::make_ref(const typename track_typed<track_type_>::desc_type& desc, sample_type* data, uint32_t num_samples, float sample_rate, uint32_t stride)
	{
		const size_t data_size = size_t(num_samples) * stride;
		return track_typed<track_type_>(nullptr, reinterpret_cast<uint8_t*>(data), num_samples, stride, data_size, sample_rate, desc);
	}

	template<track_type8 track_type_>
	inline track_typed<track_type_>::track_typed(iallocator* allocator, uint8_t* data, uint32_t num_samples, uint32_t stride, size_t data_size, float sample_rate, const typename track_typed<track_type_>::desc_type& desc) noexcept
		: track(allocator, data, num_samples, stride, data_size, sample_rate, type, category, sizeof(sample_type))
	{
		m_desc = track_desc_untyped(desc);
	}

	template<typename track_type>
	inline track_type& track_cast(track& track_)
	{
		ACL_ASSERT(track_type::type == track_.get_type() || track_.is_empty(), "Unexpected track type");
		return static_cast<track_type&>(track_);
	}

	template<typename track_type>
	inline const track_type& track_cast(const track& track_)
	{
		ACL_ASSERT(track_type::type == track_.get_type() || track_.is_empty(), "Unexpected track type");
		return static_cast<const track_type&>(track_);
	}

	template<typename track_type>
	inline track_type* track_cast(track* track_)
	{
		if (track_ == nullptr || (track_type::type != track_->get_type() && !track_->is_empty()))
			return nullptr;

		return static_cast<track_type*>(track_);
	}

	template<typename track_type>
	inline const track_type* track_cast(const track* track_)
	{
		if (track_ == nullptr || (track_type::type != track_->get_type() && !track_->is_empty()))
			return nullptr;

		return static_cast<const track_type*>(track_);
	}

	ACL_IMPL_VERSION_NAMESPACE_END
}


text:
<?php

namespace SimpleJsonRPC2;

class SimpleJsonRPC2Exception extends \Exception{ }


text:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:id="@+id/context_main_addtofavorite"
        android:title="@string/ContextMainAddToFavorite"
        android:alphabeticShortcut="A"
        android:icon="@android:drawable/ic_menu_add"/>
    <item
        android:id="@+id/context_main_removefromfavorite"
        android:title="@string/ContextMainRemoveFromFavorite"
        android:alphabeticShortcut="R"
        android:icon="@android:drawable/ic_menu_delete"/>
</menu>


text:
. _meta_dir.sh
. _python.sh
METASHARE_DIR=$METASHARE_SW_DIR/metashare
SOLR_ROOT=$METASHARE_SW_DIR/solr
. _conf.sh
. _solr.sh
. _django.sh
. _light.sh

stop_django $DJANGO_PID

stop_light "$LIGHTTPD_PID"

echo "DJANGO_PORT = $DJANGO_PORT"
export DJANGO_PORT
export DATABASE_FILE
export STORAGE_PATH
export SOLR_PORT

start_solr "$SOLR_ROOT" $SOLR_PORT $SOLR_STOP_PORT "$SOLR_STOP_KEY" "$SOLR_LOG"

sleep 5 # give SOLR time to start up before trying to verify that it is there

# Register scheduled task(s) for synchronization
cd "$METASHARE_DIR"
"$PYTHON" manage.py installtasks

# Start the Django + lighttpd server:
start_django $PYTHON_PORT "$DJANGO_PID"
#"$PYTHON" manage.py runfcgi host=localhost port=$DJANGO_PORT method=threaded pidfile=$DJANGO_PID

start_light "$LIGHT_CONF_FILE"
#lighttpd -f "$METASHARE_SW_DIR/misc/tools/ssl-config/lighttpd-ssl.conf


text:
package ge.edu.freeuni.sdp.iot.service.camera_object_recognizer.data;

import com.microsoft.azure.storage.StorageException;
import ge.edu.freeuni.sdp.iot.service.camera_object_recognizer.model.ObjectEntity;

public interface Repository {

    void insertOrUpdate(ObjectEntity object) throws StorageException;

    ObjectEntity delete(String houseId, String id) throws StorageException;

    ObjectEntity find(String houseId, String id) throws StorageException;

    Iterable<ObjectEntity> getAll(String houseId);
}


text:
package com.blog.common.service;

import com.blog.common.httpclient.HttpResult;
import org.apache.http.HttpEntity;
import org.apache.http.NameValuePair;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpPut;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity;
import org.apache.http.entity.mime.HttpMultipartMode;
import org.apache.http.entity.mime.MultipartEntityBuilder;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.net.URISyntaxException;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * Created by liuhb on 2017/1/12.
 */
@Service
public class ApiService implements BeanFactoryAware{

    private BeanFactory beanFactory;

    @Autowired(required = false)
    private RequestConfig requestConfig;

    /**
     * 执行GET请求,响应200返回内容,404返回null
     *
     * @param url
     * @return
     * @throws ClientProtocolException
     * @throws IOException
     */
    public String doGet(String url) throws ClientProtocolException, IOException {
        // 创建http GET请求
        HttpGet httpGet = new HttpGet(url);
        httpGet.setConfig(requestConfig);
        CloseableHttpResponse response = null;
        try {
            // 执行请求
            response = getHttpClient().execute(httpGet);
            // 判断返回状态是否为200
            if (response.getStatusLine().getStatusCode() == 200) {
                return EntityUtils.toString(response.getEntity(), "UTF-8");
            }
        } finally {
            if (response != null) {
                response.close();
            }
        }
        return null;
    }

    /**
     * 带有参数的GET请求,响应200返回内容,404返回null
     *
     * @param url
     * @param params
     * @return
     * @throws ClientProtocolException
     * @throws IOException
     * @throws URISyntaxException
     */
    public String doGet(String url, Map<String, String> params) throws ClientProtocolException, IOException,
            URISyntaxException {
        URIBuilder builder = new URIBuilder(url);
        for (Map.Entry<String, String> entry : params.entrySet()) {
            builder.setParameter(entry.getKey(), entry.getValue());
        }
        return doGet(builder.build().toString());
    }

    /**
     * 执行post请求
     *
     * @param url
     * @param params
     * @return
     * @throws IOException
     */
    public HttpResult doPost(String url, Map<String, String> params) throws IOException {
        // 创建http POST请求
        HttpPost httpPost = new HttpPost(url);
        httpPost.setConfig(requestConfig);
        if (null != params) {
            List<NameValuePair> parameters = new ArrayList<NameValuePair>(0);
            for (Map.Entry<String, String> entry : params.entrySet()) {
                parameters.add(new BasicNameValuePair(entry.getKey(), entry.getValue()));
            }
            // 构造一个form表单式的实体
            UrlEncodedFormEntity formEntity = new UrlEncodedFormEntity(parameters, "UTF-8");
            // 将请求实体设置到httpPost对象中
            httpPost.setEntity(formEntity);
        }

        CloseableHttpResponse response = null;
        try {
            // 执行请求
            response = getHttpClient().execute(httpPost);
            return new HttpResult(response.getStatusLine().getStatusCode(), EntityUtils.toString(
                    response.getEntity(), "UTF-8"));
        } finally {
            if (response != null) {
                response.close();
            }
        }
    }

    /**
     * 执行post请求,发送json数据
     *
     * @param url
     * @param json
     * @return
     * @throws IOException
     */
    public HttpResult doPostJson(String url, String json) throws IOException {
        // 创建http POST请求
        HttpPost httpPost = new HttpPost(url);
        httpPost.setConfig(requestConfig);
        if (null != json) {
            // 构造一个字符串的实体
            StringEntity stringEntity = new StringEntity(json, ContentType.APPLICATION_JSON);
            // 将请求实体设置到httpPost对象中
            httpPost.setEntity(stringEntity);
        }

        CloseableHttpResponse response = null;
        try {
            // 执行请求
            response = getHttpClient().execute(httpPost);
            return new HttpResult(response.getStatusLine().getStatusCode(), EntityUtils.toString(
                    response.getEntity(), "UTF-8"));
        } finally {
            if (response != null) {
                response.close();
            }
        }
    }

    /**
     * 执行put请求
     *
     * @param url
     * @param params
     * @return
     * @throws IOException
     */
    public HttpResult doPut(String url, Map<String, String> params) throws IOException {
        // 创建http POST请求
        HttpPut httpPut = new HttpPut(url);
        httpPut.setConfig(requestConfig);
        if (null != params) {
            List<NameValuePair> parameters = new ArrayList<NameValuePair>(0);
            for (Map.Entry<String, String> entry : params.entrySet()) {
                parameters.add(new BasicNameValuePair(entry.getKey(), entry.getValue()));
            }
            // 构造一个form表单式的实体
            UrlEncodedFormEntity formEntity = new UrlEncodedFormEntity(parameters, "UTF-8");
            // 将请求实体设置到httpPost对象中
            httpPut.setEntity(formEntity);
        }

        CloseableHttpResponse response = null;
        try {
            // 执行请求
            response = getHttpClient().execute(httpPut);
            return new HttpResult(response.getStatusLine().getStatusCode(), EntityUtils.toString(
                    response.getEntity(), "UTF-8"));
        } finally {
            if (response != null) {
                response.close();
            }
        }
    }

    /**
     * 中转文件
     *
     * @param file
     *            上传的文件
     * @return 响应结果
     */
    public String doUploadFile(String url,MultipartFile file) throws IOException {
        CloseableHttpResponse response = null;
        try {
            String fileName = file.getOriginalFilename();
            HttpPost httpPost = new HttpPost(url);
            MultipartEntityBuilder builder = MultipartEntityBuilder.create();
            builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
            builder.addBinaryBody("uploadFile", file.getInputStream(), ContentType.MULTIPART_FORM_DATA, fileName);// 文件流
//            builder.addTextBody("filename", fileName);// 类似浏览器表单提交,对应input的name和value
            HttpEntity entity = builder.build();
            httpPost.setEntity(entity);
            response = getHttpClient().execute(httpPost);// 执行提交
            HttpEntity responseEntity = response.getEntity();
            if (responseEntity != null) {
                // 将响应内容转换为字符串
                return EntityUtils.toString(responseEntity, Charset.forName("UTF-8"));
            }
        }  finally {
            if (response != null) {
                response.close();
            }
        }
        return null;
    }

    private CloseableHttpClient getHttpClient(){
        return this.beanFactory.getBean(CloseableHttpClient.class);
    }

    @Override
    public void setBeanFactory(BeanFactory beanFactory) {
        this.beanFactory = beanFactory;
    }
}


text:
BookManager.Collections.Books = Backbone.Collection.extend({
    model: BookManager.Models.Book
});


text:
AcousticBrainz Submit Plugin
============================

The `absubmit` plugin uses the `streaming_extractor_music`_ program to analyze an audio file and calculate different acoustic properties of the audio. The plugin then uploads this metadata to the AcousticBrainz server. The plugin does this when calling the ``beet absumbit [QUERY]`` command or on importing if the `auto` configuration option is set to ``yes``.

Installation
------------

The `absubmit` plugin requires the `streaming_extractor_music`_ program to run. Its source can be found on `GitHub`_, and while it is possible to compile the extractor from source, AcousticBrainz would prefer if you used their binary (see the AcousticBrainz `FAQ`_).

The `absubmit` also plugin requires `requests`_, which you can install using `pip_` by typing:

    pip install requests

After installing both the extractor binary and requests you can enable the plugin ``absubmit`` in your configuration (see :ref:`using-plugins`).

Configuration
-------------

To configure the plugin, make a ``absubmit:`` section in your configuration file. The available options are:

- **auto**: Analyze every file on import. Otherwise, you need to use the ``beet absubmit`` command explicitly.
  Default: ``no``
- **extractor**: The path to the `streaming_extractor_music`_ binary.
  Default: search for the program in your ``$PATH``

.. _streaming_extractor_music: http://acousticbrainz.org/download
.. _FAQ: http://acousticbrainz.org/faq
.. _pip: http://www.pip-installer.org/
.. _requests: http://docs.python-requests.org/en/master/
.. _github: https://github.com/MTG/essentia


text: This is my first repository for test.


text:
// @flow

import { Component } from 'react';

export type Props = {

    /**
     * Whether or not the conference is in audio only mode.
     */
    _audioOnly: boolean,

    /**
     * Invoked to obtain translated strings.
     */
    t: Function
};

/**
 * Abstract class for the {@code VideoQualityLabel} component.
 */
export default class AbstractVideoQualityLabel<P: Props> extends Component<P> {

}

/**
 * Maps (parts of) the Redux state to the associated
 * {@code AbstractVideoQualityLabel}'s props.
 *
 * @param {Object} state - The Redux state.
 * @private
 * @returns {{
 *     _audioOnly: boolean
 * }}
 */
export function _abstractMapStateToProps(state: Object) {
    const { enabled: audioOnly } = state['features/base/audio-only'];

    return {
        _audioOnly: audioOnly
    };
}


text:
package com.kma.ais_dekanat.controller;

import com.kma.ais_dekanat.model.Room;
import com.kma.ais_dekanat.service.RoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

@Controller
public class HomeController {
    @Autowired
    RoomService roomService;

    @RequestMapping(value = {"/", "/index"}, method = RequestMethod.GET)
    public String helloWorld(Model model) {
        return "/index";
    }

}


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

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="de.volzo.miscreen.MainActivity">

    <TextView
        android:id="@+id/textView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Start as" />

    <Spinner
        android:id="@+id/spRole"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentEnd="true"
        android:layout_alignParentStart="true"
        android:layout_below="@+id/textView"
        android:layout_centerHorizontal="true"
        android:entries="@array/roleNames"
        android:spinnerMode="dropdown"
        android:textAlignment="viewEnd" />

    <Button
        android:id="@+id/btOk"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignEnd="@+id/spRole"
        android:layout_alignParentBottom="true"
        android:layout_alignParentEnd="true"
        android:layout_alignParentStart="true"
        android:enabled="true"
        android:text="ok"
        android:layout_below="@+id/imageView" />

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Listen"
        android:id="@+id/btListen"
        android:layout_above="@+id/btOk"
        android:layout_alignParentStart="true" />

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Advertise"
        android:id="@+id/btAdvertise"
        android:layout_above="@+id/btOk"
        android:layout_toEndOf="@+id/btListen" />

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Kill NSD"
        android:id="@+id/btKill"
        android:layout_above="@+id/btOk"
        android:layout_toEndOf="@+id/btAdvertise" />

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="sendToHost"
        android:id="@+id/btSendJson"
        android:layout_above="@+id/btListen"
        android:layout_alignParentStart="true" />

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Serve"
        android:id="@+id/btServe"
        android:layout_above="@+id/btAdvertise"
        android:layout_toEndOf="@+id/btSendJson" />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:text=""
        android:id="@+id/logView"
        android:layout_above="@+id/btSendJson"
        android:layout_centerHorizontal="true" />

    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/imageView"
        android:layout_centerVertical="true"
        android:layout_centerHorizontal="true" />

</RelativeLayout>


text:
package org.moe;

import apple.uikit.UIViewController;
import org.moe.natj.general.Pointer;
import org.moe.natj.general.ann.Owned;
import org.moe.natj.objc.ann.ObjCClassName;
import org.moe.natj.objc.ann.Selector;

@ObjCClassName("IgnoredController")
public class IgnoredController extends UIViewController {

    @Owned
    @Selector("alloc")
    public static native IgnoredController alloc();

    @Selector("init")
    public native IgnoredController init();

    protected IgnoredController(Pointer peer) {
        super(peer);
    }
}


text:
'use strict'

var createScene = require('gl-scene3d')
var createMesh = require('gl-simplicial-complex')
var bunny = require('bunny')
var fit = require('canvas-fit')
var loop = require('../loop')

var canvas = document.createElement('canvas')
document.body.appendChild(canvas)
window.addEventListener('resize', fit(canvas))

//Subdivide
bunny = loop(bunny.cells, bunny.positions)

var scene = createScene(canvas)
var mesh = createMesh(scene.gl, {
  cells:      bunny.cells,
  positions:  bunny.positions,
  colormap:   'jet'
})

scene.addObject(mesh)


text:
//
// Copyright 2019 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
//
import {HttpErrorResponse} from '@angular/common/http';
import {ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Inject, OnDestroy, OnInit, ViewChild} from '@angular/core';
import {MatSnackBar} from '@angular/material/snack-bar';
import {Sort, SortDirection} from '@angular/material/sort';
import {BehaviorSubject, merge} from 'rxjs';
import {switchMap} from 'rxjs/operators';

import {Checkpoint, CheckpointValue, CollectionParameters, CpuIdleWaitLayer, CpuRunningLayer, CpuWaitQueueLayer, Interval, Layer} from '../models';
import {CollectionDataService} from '../services/collection_data_service';
import {ColorService} from '../services/color_service';
import {compress, decompress, parseHashFragment, serializeHashFragment, showErrorSnackBar, SystemTopology, Viewport} from '../util';
import {COLLECTION_NAME_KEY, SHARE_KEY} from '../util/hash_keys';

/**
 * The SchedViz dashboard.
 */
@Component({
  selector: 'dashboard',
  templateUrl: './dashboard.ng.html',
  styleUrls: ['./dashboard.css'],
  // Default change detection disabled here and elsewhere. Diff checks are
  // triggered manually in the interest of performance.
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class Dashboard implements OnInit, OnDestroy {
  private readonly global = window;
  @ViewChild('filterInput', {static: false}) filterInput!: ElementRef;

  loading = new BehaviorSubject<boolean>(true);
  // TODO(sainsley): Move the following properties into a global state.
  cpuFilter = new BehaviorSubject<string>('');
  preview = new BehaviorSubject<Interval|undefined>(undefined);
  layers = new BehaviorSubject<Array<BehaviorSubject<Layer>>>([]);
  viewport = new BehaviorSubject<Viewport>(new Viewport());
  tab = new BehaviorSubject<number>(0);
  threadSort = new BehaviorSubject<Sort>({active: '', direction: ''});
  filter = new BehaviorSubject<string>('');
  showMigrations = new BehaviorSubject<boolean>(false);
  showSleeping = new BehaviorSubject<boolean>(true);
  maxIntervalCount = new BehaviorSubject<number>(5000);
  expandedThread = new BehaviorSubject<string|undefined>(undefined);
  // End Global State

  cpuRunLayer = new CpuRunningLayer();
  cpuIdleWaitLayer = new CpuIdleWaitLayer();
  cpuWaitQueueLayer = new CpuWaitQueueLayer();
  collectionName?: string;
  collectionParameters =
      new BehaviorSubject<CollectionParameters|undefined>(undefined);
  systemTopology?: SystemTopology;
  title = 'SchedViz';
  tabs = [
    'threads',
    'tasks',
    'events',
    'layers',
  ];

  // Force cast initial value to checkpoint because the real values will be
  // populated by the subscriptions to its component's BehaviorSubjects.
  private checkpoint = {displayOptions: {}} as Checkpoint;

  constructor(
      @Inject('CollectionDataService') public collectionDataService:
          CollectionDataService, public colorService: ColorService,
      private readonly cdr: ChangeDetectorRef,
      private readonly snackBar: MatSnackBar) {}

  hashState() {
    const shareValue = compress(this.checkpoint);
    const hash = parseHashFragment(this.global.location.hash);
    hash[SHARE_KEY] = shareValue;
    const serializedHash = serializeHashFragment(hash);
    const newURL = `${this.global.location.pathname}${serializedHash}`;
    this.global.history.replaceState(null, '', newURL);
  }

  updateShareURL<T extends CheckpointValue>(propName: string) {
    return (prop: T) => {
      // This cast is an external index signature for displayOptions
      // tsickle does not generate the proper Closure types for interfaces
      // with index signatures and statically defined fields, so we can't
      // include the index signature on the type itself.
      const dO = this.checkpoint.displayOptions as unknown as
          {[k: string]: CheckpointValue};
      dO[propName] = prop;
      this.hashState();
    };
  }

  ngOnInit() {
    this.initFromUrl(this.global.location.hash);
    this.cpuFilter.subscribe(this.updateShareURL('cpuFilter'));
    this.filter.subscribe(filter => {
      if (!isNaN(Number(filter.trim()))) {
        // pidFilter will always be a number because PIDs are numbers.
        this.checkpoint.displayOptions.pidFilter = filter;
        this.checkpoint.displayOptions.commandFilter = '';
      } else {
        this.checkpoint.displayOptions.commandFilter = filter;
        this.checkpoint.displayOptions.pidFilter = '';
      }
      this.hashState();
    });
    this.tab.subscribe(this.updateShareURL('tab'));
    this.showMigrations.subscribe(this.updateShareURL('showMigrations'));
    this.showSleeping.subscribe(this.updateShareURL('showSleeping'));
    this.expandedThread.subscribe(this.updateShareURL('expandedThread'));
    this.maxIntervalCount.subscribe(this.updateShareURL('maxIntervalCount'));
    this.threadSort.subscribe(sort => {
      this.checkpoint.displayOptions.threadListSortField = sort.active;
      // -1 is unused in schedviz 1, use it to mean undefined here.
      this.checkpoint.displayOptions.threadListSortOrder =
          Dashboard.serializeSortDirection(sort.direction);
      this.hashState();
    });
    this.viewport.subscribe(this.updateShareURL('viewport'));
    this.layers.pipe(switchMap(layers => merge(...layers)))
        .subscribe(
            () => this.updateShareURL('layers')(this.layers.value.map(
                layer => new Layer(
                    layer.value.name, layer.value.dataType, layer.value.ids,
                    layer.value.color, [], layer.value.visible))));
    const layers = this.layers.value;
    layers.push(new BehaviorSubject(this.cpuRunLayer as unknown as Layer));
    layers.push(new BehaviorSubject(this.cpuIdleWaitLayer));
    layers.push(new BehaviorSubject(this.cpuWaitQueueLayer));
    this.layers.next(layers);
  }

  ngOnDestroy() {
    // Close all Subjects to prevent leaks.
    this.cpuFilter.complete();
    this.preview.complete();
    for (const layer of this.layers.value) {
      layer.complete();
    }
    this.layers.complete();
    this.viewport.complete();
    this.tab.complete();
    this.threadSort.complete();
    this.filter.complete();
    this.showMigrations.complete();
    this.showSleeping.complete();
    this.expandedThread.complete();
  }

  initFromUrl(hash: string) {
    const hashMap = parseHashFragment(decodeURIComponent(hash));
    if (hashMap[COLLECTION_NAME_KEY]) {
      this.collectionName = hashMap[COLLECTION_NAME_KEY];
      if (this.collectionName) {
        this.getCollectionParameters(this.collectionName, hashMap);
      }
    }
    if (hashMap[SHARE_KEY]) {
      const compressed = hashMap[SHARE_KEY];
      if (compressed) {
        const share = decompress<Checkpoint>(compressed);
        if (share) {
          this.checkpoint = share;
          const dO = share.displayOptions;
          this.cpuFilter.next((dO.cpuFilter || '').trim().toLowerCase());
          this.tab.next(Math.max(Number(dO.tab), 0));
          this.viewport.next(new Viewport(dO.viewport));
          this.filter.next(dO.commandFilter || dO.pidFilter);
          this.showMigrations.next(dO.showMigrations);
          this.showSleeping.next(dO.showSleeping);
          this.expandedThread.next(dO.expandedThread);
          this.maxIntervalCount = new BehaviorSubject<number>(
              dO.maxIntervalCount != null ? dO.maxIntervalCount : 5000);
          this.threadSort.next({
            active: dO.threadListSortField,
            direction:
                Dashboard.deserializeSortDirection(dO.threadListSortOrder),
          });
          if (dO.layers) {
            const layerSubjects: Array<BehaviorSubject<Layer>> = [];
            for (const layer of dO.layers) {
              // Check saved visibility for CPU layers
              if (layer.name === this.cpuRunLayer.name) {
                this.cpuRunLayer.visible = layer.visible;
              } else if (layer.name === this.cpuWaitQueueLayer.name) {
                this.cpuWaitQueueLayer.visible = layer.visible;
              } else if (layer.name === this.cpuIdleWaitLayer.name) {
                this.cpuIdleWaitLayer.visible = layer.visible;
              } else {
                // Create new layer
                layerSubjects.push(new BehaviorSubject(new Layer(
                    layer.name, layer.dataType, layer.ids, layer.color, [],
                    layer.visible)));
                this.colorService.setColorFor(layer.name, layer.color);
              }
            }
            this.layers.next(layerSubjects);
          }
        }
      }
    }
  }

  /**
   * Fetch Observable for collection parameters, given collection name.
   */
  getCollectionParameters(
      collectionName: string, urlFilterHash?: {[k: string]: string}) {
    this.loading.next(true);
    this.collectionDataService.getCollectionParameters(collectionName)
        .subscribe(
            (parameters) => {
              this.loading.next(false);
              this.collectionParameters.next(parameters);
              this.getSystemTopology(parameters);
            },
            (err: HttpErrorResponse) => {
              this.loading.next(false);
              showErrorSnackBar(
                  this.snackBar,
                  `Failed to get parameters for ${collectionName}`, err);
            });
  }

  /**
   * Fetches system topology on parameters ready.
   */
  getSystemTopology(collectionParameters: CollectionParameters) {
    this.loading.next(true);
    this.collectionDataService.getSystemTopology(collectionParameters)
        .subscribe(
            topology => {
              this.loading.next(false);
              this.systemTopology = topology;
              this.cdr.detectChanges();
            },
            () => {
              this.loading.next(false);
              this.systemTopology =
                  new SystemTopology(collectionParameters.cpus);
              this.cdr.detectChanges();
            });
  }

  static serializeSortDirection(direction: SortDirection): number {
    return direction === 'desc' ? 1 : (direction === 'asc' ? 0 : -1);
  }

  static deserializeSortDirection(direction: number): SortDirection {
    return direction === 1 ? 'desc' : (direction === 0 ? 'asc' : '');
  }
}


text:
package parReg.tx;

import java.util.*;
import java.io.Serializable;

import com.gemstone.gemfire.distributed.*;

import util.*;
import hydra.*;

public class ModResult implements Serializable {

  private SerializableDistributedMember sdm;
  private int numKeys;
  private List hashList;

  // Takes a String key constructed by NameFactory
  ModResult(DistributedMember dm, int numKeys, List list) {
    this.sdm = new SerializableDistributedMember(dm);
    this.numKeys = numKeys;
    this.hashList = list;
  }

  // getters
  public SerializableDistributedMember getDM() {
    return this.sdm;
  }

  public List getHashList() {
    return this.hashList;
  }

  public int getNumKeys() {
    return this.numKeys;
  }

  public String toString() {
     return this.sdm.toString() + this.hashList;
  }
}


text:
package com.sun.xml.xsom.util;

import com.sun.xml.xsom.XSAnnotation;
import com.sun.xml.xsom.parser.AnnotationContext;
import com.sun.xml.xsom.parser.AnnotationParser;
import com.sun.xml.xsom.parser.AnnotationParserFactory;
import javax.xml.XMLConstants;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.xml.sax.ContentHandler;
import org.xml.sax.EntityResolver;
import org.xml.sax.ErrorHandler;

import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.dom.DOMResult;
import javax.xml.transform.sax.SAXTransformerFactory;
import javax.xml.transform.sax.TransformerHandler;

/**
 * {@link AnnotationParserFactory} that parses annotations into a W3C DOM.
 *
 *

 * If you use this parser factory, you'll get {@link Element} that represents
 * {@code <xs:annotation>} from {@link XSAnnotation#getAnnotation()}.
 *
 *

 * When multiple {@code <xs:annotation>s} are found for the given schema component,
 * you'll see all {@code <xs:appinfo>s} and {@code <xs:documentation>s} combined under
 * one {@code <xs:annotation>} element.
 *
 * @author Kohsuke Kawaguchi
 */
public class DomAnnotationParserFactory implements AnnotationParserFactory {

    /**
     * Default constructor.
     */
    public DomAnnotationParserFactory() {}

    public AnnotationParser create() {
        return new AnnotationParserImpl();
    }

    public AnnotationParser create(boolean disableSecureProcessing) {
        return new AnnotationParserImpl(disableSecureProcessing);
    }

    private static final ContextClassloaderLocal<SAXTransformerFactory> stf = new ContextClassloaderLocal<>() {
        @Override
        protected SAXTransformerFactory initialValue() throws Exception {
            return (SAXTransformerFactory) SAXTransformerFactory.newInstance();
        }
    };

    private static class AnnotationParserImpl extends AnnotationParser {

        /**
         * Identity transformer used to parse SAX into DOM.
         */
        private final TransformerHandler transformer;
        private DOMResult result;

        AnnotationParserImpl() {
            this(false);
        }

        AnnotationParserImpl(boolean disableSecureProcessing) {
            try {
                SAXTransformerFactory factory = stf.get();
                factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, disableSecureProcessing);
                transformer = factory.newTransformerHandler();
            } catch (TransformerConfigurationException e) {
                throw new Error(e); // impossible
            }
        }

        public ContentHandler getContentHandler(AnnotationContext context, String parentElementName, ErrorHandler errorHandler, EntityResolver entityResolver) {
            result = new DOMResult();
            transformer.setResult(result);
            return transformer;
        }

        public Object getResult(Object existing) {
            Document dom = (Document)result.getNode();
            Element e = dom.getDocumentElement();
            if(existing instanceof Element) {
                // merge all the children
                Element prev = (Element) existing;
                Node anchor = e.getFirstChild();
                while(prev.getFirstChild()!=null) {
                    Node move = prev.getFirstChild();
                    e.insertBefore(e.getOwnerDocument().adoptNode(move), anchor );
                }
            }
            return e;
        }
    }
}


text:
loader = function(game) {
    Phaser.State.call(this);

    this._game = game;
    this.ticks = 0;
    this._game.stage.smoothed = false;
}

//Extend the loader object to be a Phaser.State
loader.prototype = Object.create(Phaser.State.prototype);
loader.prototype.constructor = loader;

loader.prototype.preload = function(){
    this.loaderEmpty = this.add.sprite(this.camera.width/2 - (365/2), this.camera.height/2 - (49/2), 'loaderEmpty');
    this.preloadBar = this.add.sprite(this.camera.width/2  - (365/2), this.camera.height/2 - (49/2), 'loaderFull');

    this.load.setPreloadSprite(this.preloadBar);

    //general game sprites
    this.load.image('message_bg', 'assets/message_bg.png');
    this.load.spritesheet('heart', 'assets/heart.png', 8, 7);
    //this.load.text('font', 'http://fonts.googleapis.com/css?family=Press+Start+2P');
    this.load.image('space', 'assets/spaaaaaaace.png');

    //Main menu sprites
    this.load.image('logo', 'assets/logo.png');
    this.load.image('background', 'assets/pixel_bg.png');

    //Pixel state sprites
    this.load.spritesheet('player_pixel1', 'assets/character_pixel.png', 16, 16);
    this.load.spritesheet('player_pixel2', 'assets/character_pixel2.png', 90, 90);
    this.load.spritesheet('player_pixel3', 'assets/character_pixel3.png', 90, 90);
    this.load.image('tiles_pixel', 'assets/tiles_pixel.png');
    this.load.image('collectable_pixel1', 'assets/collectable_pixel1.png');
    this.load.image('collectable_pixel2', 'assets/collectable_pixel2.png');
    this.load.image('collectable_pixel3', 'assets/collectable_pixel3.png');
    this.load.image('collectable_pixel4', 'assets/black_pixel.png');
    this.load.image('collectable_pixel5', 'assets/black_pixel.png');
    this.load.image('collectable_pixel6', 'assets/black_pixel.png');
    this.load.image('collectable_pixel7', 'assets/black_pixel.png');

    //Pacman state sprites
    this.load.spritesheet('player_pacman1', 'assets/character_pacman.png', 18, 18);
    this.load.spritesheet('player_pacman2', 'assets/character_pacman2.png', 24, 24);
    this.load.spritesheet('player_pacman3', 'assets/character_pacman3.png', 24, 24);
    this.load.spritesheet('enemy_pacman1', 'assets/enemy_01.png', 32, 32);
    this.load.spritesheet('enemy_pacman2', 'assets/enemy_02.png', 32, 32);
    this.load.spritesheet('enemy_pacman3', 'assets/enemy_03.png', 32, 32);
    this.load.spritesheet('enemy_pacman4', 'assets/enemy_04.png', 32, 32);
    this.load.image('tiles_pacman', 'assets/tiles_pacman.png');
    this.load.image('collectable_pacman', 'assets/collectable_pacman.png');

    //Dungeon state sprites
    this.load.spritesheet('player_dungeon1', 'assets/character_dungeon1.png', 28, 36);
    this.load.spritesheet('player_dungeon2', 'assets/character_dungeon2.png', 28, 36);
    this.load.spritesheet('player_dungeon3', 'assets/character_dungeon3.png', 28, 36);

    this.load.spritesheet('sword_dungeon', 'assets/sword_dungeon.png', 20, 34);
    this.load.image('tiles_dungeon', 'assets/tiles_dungeon.png');
    this.load.image('collectable_dungeon', 'assets/chest.png');
    this.load.image('key_dungeon', 'assets/dungeon_key.png');
    this.load.image('door_dungeon', 'assets/keyhole_block.png');
    this.load.spritesheet('enemy_dungeon1', 'assets/enemy_dungeon1.png', 28, 36);

    //RPG state sprites
    this.load.spritesheet('player_rpg', 'assets/character_rpg_new.png', 40, 49);
    this.load.image('tiles_rpg', 'assets/tiles_rpg.png');
    this.load.image('collectable_rpg', 'assets/chest.png');
    this.load.image('npc1_rpg', 'assets/npc_01.png');
    this.load.image('npc2_rpg', 'assets/npc_02.png');
    this.load.image('npc3_rpg', 'assets/npc_03.png');
    this.load.image('npc4_rpg', 'assets/npc_04.png');
    this.load.image('npc5_rpg', 'assets/npc_05.png');
    this.load.image('npc6_rpg', 'assets/npc_06.png');
    this.load.image('npc7_rpg', 'assets/npc_07.png');
    this.load.image('fragile_tree', 'assets/cuttable_tree.png');
    this.load.spritesheet('enemy_rpg', 'assets/enemy_rpg.png', 32, 34);
    this.load.image('orange_box', 'assets/orange_box.png');

    //Preload music
    this.load.audio('music', ['assets/sounds.mp3'], false);
}

loader.prototype.create = function(){
    this._game.state.start('menu');
}


text:
class FaasCli < Formula
  desc "CLI for templating and/or deploying FaaS functions"
  homepage "https://docs.get-faas.com/"
  url "https://github.com/openfaas/faas-cli.git",
      :tag => "0.7.5",
      :revision => "dcddef2ae92880f50444103963408451abe82cc4"

  bottle do
    cellar :any_skip_relocation
    sha256 "6f70d2bb26883a18f9fb5a534d448e628cb33e45b44e29ad588d79039d6ca3ff" => :mojave
    sha256 "7a776588782889b105e0dab34fec8e859c8074359c1827c06a4bacdc8c1c29c6" => :high_sierra
    sha256 "20e2ffdbf1c095d83743393111a78e0d908b2f7fff9afb73511d8453ff64b03c" => :sierra
  end

  depends_on "go" => :build

  def install
    ENV["XC_OS"] = "darwin"
    ENV["XC_ARCH"] = MacOS.prefer_64_bit? ? "amd64" : "386"
    ENV["GOPATH"] = buildpath
    (buildpath/"src/github.com/openfaas/faas-cli").install buildpath.children
    cd "src/github.com/openfaas/faas-cli" do
      project = "github.com/openfaas/faas-cli"
      commit = Utils.popen_read("git", "rev-parse", "HEAD").chomp
      system "go", "build", "-ldflags",
             "-s -w -X #{project}/version.GitCommit=#{commit} -X #{project}/version.Version=#{version}", "-a",
             "-installsuffix", "cgo", "-o", bin/"faas-cli"
      bin.install_symlink "faas-cli" => "faas"
      prefix.install_metafiles
    end
  end

  test do
    require "socket"

    server = TCPServer.new("localhost", 0)
    port = server.addr[1]
    pid = fork do
      loop do
        socket = server.accept
        response = "OK"
        socket.print "HTTP/1.1 200 OK\r\n" \
                    "Content-Length: #{response.bytesize}\r\n" \
                    "Connection: close\r\n"
        socket.print "\r\n"
        socket.print response
        socket.close
      end
    end

    (testpath/"test.yml").write <<~EOS
      provider:
        name: faas
        gateway: http://localhost:#{port}
        network: "func_functions"

      functions:
        dummy_function:
          lang: python
          handler: ./dummy_function
          image: dummy_image
    EOS

    expected = <<~EOS
      Deploying: dummy_function.
      Function dummy_function already exists, attempting rolling-update.

      Deployed. 200 OK.
      URL: http://localhost:#{port}/function/dummy_function
    EOS

    begin
      output = shell_output("#{bin}/faas-cli deploy -yaml test.yml 2>&1", 1)
      assert_match "stat ./template/python/template.yml", output

      assert_match "ruby", shell_output("#{bin}/faas-cli template pull 2>&1")
      assert_match "node", shell_output("#{bin}/faas-cli new --list")

      output = shell_output("#{bin}/faas-cli deploy -yaml test.yml")
      assert_equal expected, output.chomp

      stable_resource = stable.instance_variable_get(:@resource)
      commit = stable_resource.instance_variable_get(:@specs)[:revision]
      faas_cli_version = shell_output("#{bin}/faas-cli version")
      assert_match /\s#{commit}$/, faas_cli_version
      assert_match /\s#{version}$/, faas_cli_version
    ensure
      Process.kill("TERM", pid)
      Process.wait(pid)
    end
  end
end


text:
/***********************************************************************
    created:    7/8/2010
    author:     Martin Preisler

    purpose:    Defines the interface for the AnimationInstance class
*************************************************************************/
/***************************************************************************
 *   Copyright (C) 2004 - 2010 Paul D Turner & The CEGUI Development Team
 *
 *   Permission is hereby granted, free of charge, to any person obtaining
 *   a copy of this software and associated documentation files (the
 *   "Software"), to deal in the Software without restriction, including
 *   without limitation the rights to use, copy, modify, merge, publish,
 *   distribute, sublicense, and/or sell copies of the Software, and to
 *   permit persons to whom the Software is furnished to do so, subject to
 *   the following conditions:
 *
 *   The above copyright notice and this permission notice shall be
 *   included in all copies or substantial portions of the Software.
 *
 *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
 *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 *   OTHER DEALINGS IN THE SOFTWARE.
 ***************************************************************************/
#ifndef _CEGUIAnimationInstance_h_
#define _CEGUIAnimationInstance_h_

#include "CEGUI/EventArgs.h"
#include "CEGUI/Event.h"
#include <map>
#include <vector>

#if defined(_MSC_VER)
#   pragma warning(push)
#   pragma warning(disable : 4251)
#endif

namespace CEGUI
{
class Animation;

/*!
\brief
    EventArgs based class that holds information about which animation instnace
    fired given event.
*/
class CEGUIEXPORT AnimationEventArgs : public EventArgs
{
public:
    AnimationEventArgs(AnimationInstance* inst) : instance(inst) {}
    //! pointer to a AnimationInstance object of relevance to the event.
    AnimationInstance* instance;
};

/*!
\brief
    Defines an 'animation instance' class

    Animation classes hold definition of the animation. Whilst this class holds
    data needed to use the animation definition - target PropertySet, event
    receiver, animation position, ...

    You have to define animation first and then instantiate it via
    AnimationManager::instantiateAnimation

\see
    Animation
*/
class CEGUIEXPORT AnimationInstance final
{
public:
    //! Namespace for animation instance events
    //! these are fired on event receiver, not this animation instance!
    static const String EventNamespace;

    //! fired when animation instance starts
    static const String EventAnimationStarted;
    //! fired when animation instance is aborted manually or ended in PlayOnce mode
    static const String EventAnimationStopped;
    //! fired when animation instance pauses
    static const String EventAnimationPaused;
    //! fired when animation instance unpauses
    static const String EventAnimationUnpaused;
    //! fired when animation instance is manually fast-forwarded to the end
    static const String EventAnimationFinished;
    //! fired when animation instance ends playing in PlayOnce mode or due to zero duration
    static const String EventAnimationEnded;
    //! fired when animation instance loops
    static const String EventAnimationLooped;

    //! internal constructor, please use AnimationManager::instantiateAnimation
    AnimationInstance(Animation* definition);

    /** internal destructor, please use
     * AnimationManager::destroyAnimationInstance
     */
    ~AnimationInstance();

    /*!
    \brief
        Retrieves the animation definition that is used in this instance
    */
    Animation* getDefinition() const { return d_definition; }

    /*!
    \brief
        Sets the target property set - this class will get it's properties
        affected by the Affectors!
    */
    void setTarget(PropertySet* target);

    /*!
    \brief
        Retrieves the target property set
    */
    PropertySet* getTarget() const { return d_target; }

    /*!
    \brief
        Sets event receiver - this class will receive events when something
        happens to the playback of this animation - it starts, stops, pauses,
        unpauses, ends and loops
    */
    void setEventReceiver(EventSet* receiver) { d_eventReceiver = receiver; }

    /*!
    \brief
        Retrieves the event receiver
    */
    EventSet* getEventReceiver() const { return d_eventReceiver; }

    /*!
    \brief
        Sets event sender - this class will send events and can affect this
        animation instance if there are any auto subscriptions defined in the
        animation definition
    */
    void setEventSender(EventSet* sender);

    /*!
    \brief
        Retrieves the event sender
    */
    EventSet* getEventSender() const { return d_eventSender; }

    /*!
    \brief
        Helper method, sets given window as target property set, event receiver
        and event set
    */
    void setTargetWindow(Window* target);

    /*!
    \brief
        Sets playback position. Has to be higher or equal to 0.0 and lower or
        equal to Animation definition's duration.
    */
    void setPosition(float position);

    /*!
    \brief
        Retrieves current playback position
    */
    float getPosition() const { return d_position; }

    /*!
    \brief
        Sets playback speed - you can speed up / slow down individual instances
        of the same animation. 1.0 means normal playback.
    */
    void setSpeed(float speed);

    /*!
    \brief
        Retrieves current playback speed
    */
    float getSpeed() const { return d_speed; }

    /*!
    \brief
        Controls whether the next time step is skipped
    */
    void setSkipNextStep(bool skip) { d_skipNextStep = skip; }

    /*!
    \brief
        Returns true if the next step is *going* to be skipped

    \par
        If it was skipped already, this returns false as step resets
        it to false after it skips one step.
    */
    bool getSkipNextStep() const { return d_skipNextStep; }

    /*!
    \brief
        Sets the max delta before step skipping occurs

    \param
        maxDelta delta in seconds, if this value is reached, the step is skipped
                 (use -1.0f if you never want to skip - this is the default)

    \par
        If you want to ensure your animation is not skipped entirely after layouts
        are loaded or other time consuming operations are done, use this method.

        For example setMaxStepDeltaSkip(1.0f / 25.0f) ensures that if FPS drops
        below 25, the animation just stops progressing and waits till FPS raises.
    */
    void setMaxStepDeltaSkip(float maxDelta) { d_maxStepDeltaSkip = maxDelta; }

    /*!
    \brief
        Gets the max delta before step skipping occurs
    */
    float getMaxStepDeltaSkip() const { return d_maxStepDeltaSkip; }

    /*!
    \brief
        Sets the max delta before step clamping occurs

    \param
        maxDelta delta in seconds, if this value is reached, the step is clamped.
                 (use -1.0f if you never want to clamp - this is the default)

    \par
        If you want to ensure the animation steps at most 1.0 / 60.0 seconds at a timem
        you should call setMaxStepDeltaClamp(1.0f / 60.0f). This essentially slows
        the animation down in case the FPS drops below 60.
    */
    void setMaxStepDeltaClamp(float maxDelta) { d_maxStepDeltaClamp = maxDelta; }

    /*!
    \brief
        Gets the max delta before step clamping occurs
    */
    float getMaxStepDeltaClamp() const { return d_maxStepDeltaClamp; }

    /*!
    \brief
        Starts this animation instance - sets position to 0.0 and unpauses

    \param
        skipNextStep if true the next injected time pulse is skipped

    \par
        This also causes base values to be purged!
    */
    void start(bool skipNextStep = true);

    /*!
    \brief
        Stops this animation instance - sets position to 0.0 and pauses
    */
    void stop();

    /*!
    \brief
        Pauses this animation instance - stops it from stepping forward
    */
    void pause();

    /*!
    \brief
       Unpauses this animation instance - allows it to step forward again

    \param
        skipNextStep if true the next injected time pulse is skipped
    */
    void unpause(bool skipNextStep = true);

    /*!
    \brief
       Pauses the animation if it's running and unpauses it if it isn't

       \param
        skipNextStep if true the next injected time pulse is skipped
                       (only applies when unpausing!)
    */
    void togglePause(bool skipNextStep = true);

    /*!
    \brief
       Finishes and stops the animation
    */
    void finish();

    /*!
    \brief
        Returns true if this animation instance is currently unpaused,
        if it is stepping forward.
    */
    bool isRunning() const { return d_running; }

    /*!
    \brief
    	Controls whether auto stepping is enabled

    \par
    	If auto stepping is enabled, CEGUI will step this animation instance forward
    	whenever CEGUI::System::injectTimePulse is called
     */
    void setAutoSteppingEnabled(bool enabled) { d_autoSteppingEnabled = enabled; }

    /*!
    \brief
    	Checks whether auto stepping is enabled
    */
    bool isAutoSteppingEnabled() const { return d_autoSteppingEnabled; }

    /*!
    \brief
        Steps the animation forward by the given delta

    \par
    	You don't need to call this unless AutoStepping is disabled (it is enabled by default)
    */
    void step(float delta);

    /*!
    \brief
        handler that starts the animation instance
    */
    bool handleStart(const EventArgs& e);

    /*!
    \brief
        handler that stops the animation instance
    */
    bool handleStop(const EventArgs& e);

    /*!
    \brief
        handler that pauses the animation instance
    */
    bool handlePause(const EventArgs& e);

    /*!
    \brief
        handler that unpauses the animation instance
    */
    bool handleUnpause(const EventArgs& e);

    /*!
    \brief
        handler that toggles pause on this animation instance
    */
    bool handleTogglePause(const EventArgs& e);

    /*!
    \brief
        handler that finishes the animation instance
    */
    bool handleFinish(const EventArgs& e);

    /*!
    \brief
        Internal method, saves given property (called before it's affected)
    */
    void savePropertyValue(const String& propertyName);

    /** this purges all saved values forcing this class to gather new ones fresh
     * from the properties
     */
    void purgeSavedPropertyValues();

    /** retrieves saved value, if it isn't cached already, it retrieves it fresh
     * from the properties
     */
    const String& getSavedPropertyValue(const String& propertyName);

    /*!
    \brief
        Internal method, adds reference to created auto connection

    \par
        DO NOT USE THIS DIRECTLY
    */
    void addAutoConnection(Event::Connection conn);

    /*!
    \brief
        Internal method, unsubscribes auto connections

    \par
        DO NOT USE THIS DIRECTLY
    */
    void unsubscribeAutoConnections();

    /*!
    \brief
    	Applies this animation instance

    \par
    	You should not need to use this directly unless your requirements are very special.
    	CEGUI calls this automatically in most cases.
	*/
    void apply();

private:
    //! this is called when animation starts
    void onAnimationStarted();
    //! this is called when animation stops
    void onAnimationStopped();
    //! this is called when animation pauses
    void onAnimationPaused();
    //! this is called when animation unpauses
    void onAnimationUnpaused();
    //! this is called when animation finishes
    void onAnimationFinished();

    //! this is called when animation ends
    void onAnimationEnded();
    //! this is called when animation loops (in ReplayMode::LOOP or ReplayMode::BOUNCE mode)
    void onAnimationLooped();

    //! parent Animation definition
    Animation* d_definition;

    //! target property set, properties of this are affected by Affectors
    PropertySet* d_target = nullptr;
    //! event receiver, receives events about this animation instance
    EventSet* d_eventReceiver = nullptr;
    /** event sender, sends events and can control this animation instance if
     * there are any auto subscriptions
     */
    EventSet* d_eventSender = nullptr;

    /** position of this animation instance,
     * should always be higher or equal to 0.0 and lower or equal to duration of
     * animation definition
     */
    float d_position = 0.f;
    //! playback speed, 1.0 means normal playback
    float d_speed = 1.f;
    //! needed for ReplayMode::BOUNCE mode, if true, we bounce backwards
    bool d_bounceBackwards = false;
    //! true if this animation is unpaused
    bool d_running = false;
    //! skip next update (true if the next update should be skipped entirely)
    bool d_skipNextStep = false;
    //! skip the update if the step is larger than this value
    float d_maxStepDeltaSkip = -1.f;
    //! always clamp step delta to this value
    float d_maxStepDeltaClamp = -1.f;
    //! true if auto stepping is enabled
    bool d_autoSteppingEnabled = true;

    /** cached saved values, used for relative application method
     *  and keyframe property source, see Affector and KeyFrame classes
     */
    std::map<String, String> d_savedPropertyValues;

    //! tracks auto event connections we make.
    std::vector<Event::Connection> d_autoConnections;
};

} // End of  CEGUI namespace section

#if defined(_MSC_VER)
#   pragma warning(pop)
#endif

#endif  // end of guard _CEGUIAnimationInstance_h_


text:
package fr.openwide.core.basicapp.web.application.common.renderer;

import java.util.Locale;

import fr.openwide.core.basicapp.core.business.user.model.User;
import fr.openwide.core.wicket.more.rendering.Renderer;

public final class UserRenderer extends Renderer<User> {

	private static final long serialVersionUID = 5707691630314666729L;

	private static final UserRenderer INSTANCE = new UserRenderer();

	public static UserRenderer get() {
		return INSTANCE;
	}

	private UserRenderer() {
	}

	@Override
	public String render(User value, Locale locale) {
		if (value == null) {
			return null;
		} else {
			return value.getFullName();
		}
	}

}


text:
using System;

namespace InControl
{
	/// <summary>
	/// An enumeration of input controls.
	/// This includes both the standardized set of controls and a variety
	/// of non-standard and generic unnamed controls.
	/// </summary>
	public enum InputControlType : int
	{
		None,

		// Standardized controls.
		//
		LeftStickUp,
		LeftStickDown,
		LeftStickLeft,
		LeftStickRight,

		LeftStickButton,

		RightStickUp,
		RightStickDown,
		RightStickLeft,
		RightStickRight,

		RightStickButton,

		DPadUp,
		DPadDown,
		DPadLeft,
		DPadRight,

		Action1,
		Action2,
		Action3,
		Action4,

		LeftTrigger,
		RightTrigger,

		LeftBumper,
		RightBumper,

		// This standardized control is an alias that maps onto all command buttons.
		//
		Command,

		// Command buttons.
		Back,
		Start,
		Select,
		System,
		Options,
		Pause,
		Menu,
		Share,
		Home,
		View,
		Power,

		// Unusual controls.
		//
		TiltX,
		TiltY,
		TiltZ,
		ScrollWheel,
		TouchPadTap,
		TouchPadXAxis,
		TouchPadYAxis,

		// Generic controls (usually assigned to unknown devices).
		//
		Analog0,
		Analog1,
		Analog2,
		Analog3,
		Analog4,
		Analog5,
		Analog6,
		Analog7,
		Analog8,
		Analog9,
		Analog10,
		Analog11,
		Analog12,
		Analog13,
		Analog14,
		Analog15,
		Analog16,
		Analog17,
		Analog18,
		Analog19,

		Button0,
		Button1,
		Button2,
		Button3,
		Button4,
		Button5,
		Button6,
		Button7,
		Button8,
		Button9,
		Button10,
		Button11,
		Button12,
		Button13,
		Button14,
		Button15,
		Button16,
		Button17,
		Button18,
		Button19,

		// Internal. Must be last.
		//
		Count
	}
}


text:
package hu.akarnokd.reactive;

import java.util.concurrent.SubmissionPublisher;

import org.junit.Test;

public class SubmissionPublisherTest {

    @Test
    public void test() {
        SubmissionPublisher<Integer> sp = new SubmissionPublisher<>();
        sp.submit(1);
        sp.submit(2);
        sp.close();

        sp.consume(System.out::println).join();
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace OfficeDevPnP.PartnerPack.SiteProvisioning.Models
{
    public class UpdateSiteTemplateViewModel : JobViewModel
    {
        public String TargetSiteUrl { get; set; }
    }
}


text:
import { FC, useContext, useEffect, useRef } from 'react';
import { Waypoint } from '../waypoint';
import { ElevatorContext } from './context';

export interface IElevatorAnchorProps {
  link: string;
}

export const ElevatorAnchor: FC<IElevatorAnchorProps> = ({
  link,
  children,
}) => {
  const {
    offsetTop,
    getContainer,
    onAnchorEnter,
    registerAnchor,
    unRegisterAnchor,
  } = useContext(ElevatorContext);

  const ref = useRef<HTMLDivElement>(null);

  const handleAnchorEnter = () => {
    onAnchorEnter(link);
  };

  useEffect(() => {
    registerAnchor(link, ref.current);

    return () => {
      unRegisterAnchor(link);
    };
  }, [link, registerAnchor, unRegisterAnchor]);

  return (
    <Waypoint
      bottomOffset={offsetTop}
      onEnter={handleAnchorEnter}
      scrollableAncestor={getContainer?.() || window}
    >
      <div className="zent-elevator-anchor" ref={ref}>
        {children}
      </div>
    </Waypoint>
  );
};


text:
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";

module.metadata = {
  "stability": "deprecated"
};

const { deprecateUsage } = require('../util/deprecate');

Object.defineProperty(exports, "Worker", {
  get: function() {
    deprecateUsage('`sdk/content/content` is deprecated. Please use `sdk/content/worker` directly.');
    return require('./worker').Worker;
  }
});


text:
Program for one hump iterator visualization. Allows the user to pick a one hump iterator and change the r value while visualizing the result. Four compositions of the iterator are shown to indicate fixed points inheritance between iterator composition. The leading iterator composition is always shown as the thickest line in the graph. Watch how every time a function loses its stability the next iterator composition takes over.

### How should I use the program?

If you want to alter/change/modify the program you need to clone this git repo.
The program is written in C# as Windows Forms application using the .NET Framework 4.6.

### Manual
To get the up to date code visit the github page https://github.com/Weenkus/One-Hump-Iterator-Visualization

Contact vinko.kodzoman@fer.hr

The program draws four compositions, of a function that the user chooses at the top of the form.
Every function has a variable r and the user can change it by using the slider found on the bottom of the form.
The value of r is printed on the right of the graph together with all fixed points (FT) from all founction compositions.

f^2(x) represent the second composition of f(x), f^2(x) = f(f(x))

FT1 is the first fixed point of a function (or the composition)

FT2 is the second fixed point of a function (or the composition) and so on...

In the bottom right coner there are four check boxes witch allow the user to choose which compositions of the function f(x) will be shown.

### Contact

If you have any problems, questions or suggestions send me a mail at vinko.kodzoman@yahoo.com