text:
import debounce from 'lodash/debounce';
import {CredentialsManager} from 'neuroglancer/credentials_provider';
import {StatusMessage} from 'neuroglancer/status';
import {WatchableValue} from 'neuroglancer/trackable_value';
import {RefCounted} from 'neuroglancer/util/disposable';
import {responseJson} from 'neuroglancer/util/http_request';
import {urlSafeParse, verifyObject} from 'neuroglancer/util/json';
import {cancellableFetchSpecialOk, parseSpecialUrl} from 'neuroglancer/util/special_protocol_request';
import {getCachedJson, Trackable} from 'neuroglancer/util/trackable';

/**
 * @file Implements a binding between a Trackable value and the URL hash state.
 */

/**
 * Encodes a fragment string robustly.
 */
function encodeFragment(fragment: string) {
  return encodeURI(fragment).replace(/[!'()*;,]/g, function(c) {
    return '%' + c.charCodeAt(0).toString(16).toUpperCase();
  });
}

/**
 * An instance of this class manages a binding between a Trackable value and the URL hash state.
 * The binding is initialized in the constructor, and is removed when dispose is called.
 */
export class UrlHashBinding extends RefCounted {
  /**
   * Most recently parsed or set state string.
   */
  private prevStateString: string|undefined;

  /**
   * Generation number of previous state set.
   */
  private prevStateGeneration: number|undefined;

  /**
   * Most recent error parsing URL hash.
   */
  parseError = new WatchableValue<Error|undefined>(undefined);

  constructor(
      public root: Trackable, public credentialsManager: CredentialsManager,
      updateDelayMilliseconds = 200) {
    super();
    this.registerEventListener(window, 'hashchange', () => this.updateFromUrlHash());
    const throttledSetUrlHash = debounce(() => this.setUrlHash(), updateDelayMilliseconds);
    this.registerDisposer(root.changed.add(throttledSetUrlHash));
    this.registerDisposer(() => throttledSetUrlHash.cancel());
  }

  /**
   * Sets the URL hash to match the current state.
   */
  setUrlHash() {
    const cacheState = getCachedJson(this.root);
    const {generation} = cacheState;
    if (generation !== this.prevStateGeneration) {
      this.prevStateGeneration = cacheState.generation;
      let stateString = encodeFragment(JSON.stringify(cacheState.value));
      if (stateString !== this.prevStateString) {
        this.prevStateString = stateString;
        if (decodeURIComponent(stateString) === '{}') {
          history.replaceState(null, '', '#');
        } else {
          history.replaceState(null, '', '#!' + stateString);
        }
      }
    }
  }

  /**
   * Sets the current state to match the URL hash.  If it is desired to initialize the state based
   * on the URL hash, then this should be called immediately after construction.
   */
  updateFromUrlHash() {
    try {
      let s = location.href.replace(/^[^#]+/, '');
      if (s === '' || s === '#' || s === '#!') {
        s = '#!{}';
      }
      // Handle remote JSON state
      if (s.match(/^#!(http|https|gs):\/\//)) {
        const url = s.substring(2);
        const {url: parsedUrl, credentialsProvider} = parseSpecialUrl(url, this.credentialsManager);
        StatusMessage.forPromise(
            cancellableFetchSpecialOk(credentialsProvider, parsedUrl, {}, responseJson)
                .then(json => {
                  verifyObject(json);
                  this.root.reset();
                  this.root.restoreState(json);
                }),
            {initialMessage: `Loading state from ${url}`, errorPrefix: `Error loading state:`});
      } else if (s.startsWith('#!+')) {
        s = s.slice(3);
        // Firefox always %-encodes the URL even if it is not typed that way.
        s = decodeURIComponent(s);
        let state = urlSafeParse(s);
        verifyObject(state);
        this.root.restoreState(state);
        this.prevStateString = undefined;
      } else if (s.startsWith('#!')) {
        s = s.slice(2);
        s = decodeURIComponent(s);
        if (s === this.prevStateString) {
          return;
        }
        this.prevStateString = s;
        this.root.reset();
        let state = urlSafeParse(s);
        verifyObject(state);
        this.root.restoreState(state);
      } else {
        throw new Error(`URL hash is expected to be of the form "#!{...}" or "#!+{...}".`);
      }
      this.parseError.value = undefined;
    } catch (parseError) {
      this.parseError.value = parseError;
    }
  }
}


text:
namespace GlobalsFramework.Actions
{
    internal interface IEntityAction
    {
        void Execute();
    }
}

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Nette\DI\Config\Adapters;

use Nette;
use Nette\DI\Config\Helpers;
use Nette\DI\Statement;
use Nette\Neon;

/**
 * Reading and generating NEON files.
 */
class NeonAdapter extends Nette\Object implements Nette\DI\Config\IAdapter
{
	/** @internal */
	const INHERITING_SEPARATOR = '<', // child < parent
		PREVENT_MERGING = '!';

	/**
	 * Reads configuration from NEON file.
	 * @param  string  file name
	 * @return array
	 */
	public function load($file)
	{
		return $this->process((array) Neon\Neon::decode(file_get_contents($file)));
	}

	private function process(array $arr)
	{
		$res = array();
		foreach ($arr as $key => $val) {
			if (substr($key, -1) === self::PREVENT_MERGING) {
				if (!is_array($val) && $val !== NULL) {
					throw new Nette\InvalidStateException("Replacing operator is available only for arrays, item '$key' is not array.");
				}
				$key = substr($key, 0, -1);
				$val[Helpers::EXTENDS_KEY] = Helpers::OVERWRITE;

			} elseif (preg_match('#^(\S+)\s+' . self::INHERITING_SEPARATOR . '\s+(\S+)\z#', $key, $matches)) {
				if (!is_array($val) && $val !== NULL) {
					throw new Nette\InvalidStateException("Inheritance operator is available only for arrays, item '$key' is not array.");
				}
				list(, $key, $val[Helpers::EXTENDS_KEY]) = $matches;
				if (isset($res[$key])) {
					throw new Nette\InvalidStateException("Duplicated key '$key'.");
				}
			}

			if (is_array($val)) {
				$val = $this->process($val);

			} elseif ($val instanceof Neon\Entity) {
				if ($val->value === Neon\Neon::CHAIN) {
					$tmp = NULL;
					foreach ($this->process($val->attributes) as $st) {
						$tmp = new Statement(
							$tmp === NULL ? $st->getEntity() : array($tmp, ltrim($st->getEntity(), ':')),
							$st->arguments
						);
					}
					$val = $tmp;
				} else {
					$tmp = $this->process(array($val->value));
					$val = new Statement($tmp[0], $this->process($val->attributes));
				}
			}
			$res[$key] = $val;
		}
		return $res;
	}

	/**
	 * Generates configuration in NEON format.
	 * @return string
	 */
	public function dump(array $data)
	{
		$tmp = array();
		foreach ($data as $name => $secData) {
			if ($parent = Helpers::takeParent($secData)) {
				$name .= ' ' . self::INHERITING_SEPARATOR . ' ' . $parent;
			}
			$tmp[$name] = $secData;
		}
		array_walk_recursive(
			$tmp,
			function (& $val) {
				if ($val instanceof Statement) {
					$val = NeonAdapter::statementToEntity($val);
				}
			}
		);

		return "# generated by Nette\n\n" . Neon\Neon::encode($tmp, Neon\Neon::BLOCK);
	}

	/**
	 * @return Neon\Entity
	 * @internal
	 */
	public static function statementToEntity(Statement $val)
	{
		array_walk_recursive(
			$val->arguments,
			function (& $val) {
				if ($val instanceof Statement) {
					$val = NeonAdapter::statementToEntity($val);
				}
			}
		);
		if (is_array($val->entity) && $val->entity[0] instanceof Statement) {
			return new Neon\Entity(
				Neon\Neon::CHAIN,
				array(
					self::statementToEntity($val->entity[0]),
					new Neon\Entity('::' . $val->entity[1], $val->arguments)
				)
			);
		} else {
			return new Neon\Entity($val->entity, $val->arguments);
		}
	}

}


text:
@implementation ProgressBar

- (instancetype)init
{
    self = [super init];
    if (self) {
        self.name = progressBarName;
        self.physicsBody = [SKPhysicsBody bodyWithRectangleOfSize:self.frame.size];
        self.physicsBody.dynamic = NO;
        self.maskNode = [SKSpriteNode spriteNodeWithColor:[SKColor redColor] size:CGSizeMake(50, 4)];
        SKSpriteNode* sprite = [SKSpriteNode spriteNodeWithImageNamed:@"progress"];

        [self addChild:sprite];
        SKSpriteNode* newMask = (SKSpriteNode*)self.maskNode;
        newMask.position = CGPointMake(0, 0);

    }
    return self;
}

-(void) setProgress:(CGFloat)progress {
    SKSpriteNode* newMask = (SKSpriteNode*)self.maskNode;
    newMask.size = CGSizeMake(progress, 4);
    newMask.position = CGPointMake(-25, 0);
}

@end


text:
package io.virtdata.libbasics.shared.from_double.to_double;

import io.virtdata.annotations.ThreadSafeMapper;

import java.util.function.DoubleUnaryOperator;

@ThreadSafeMapper
public class Min implements DoubleUnaryOperator {

    private final double min;

    public Min(double min) {
        this.min = min;
    }

    @Override
    public double applyAsDouble(double operand) {
        return Double.min(min,operand);
    }
}


text:
<?php

/**
 * Item option mysql4 resource model
 *
 * @category    Mage
 * @package     Mage_Wishlist
 * @author      Magento Core Team <core@magentocommerce.com>
 */
class Mage_Wishlist_Model_Mysql4_Item_Option extends Mage_Wishlist_Model_Resource_Item_Option
{
}


text:
<?php
/**
 *
 * Date: 16/1/26
 * Time: 下午3:52
 * @author jintanlu <jintanlu@meilishuo.com>
 */

namespace clicomposer;

use cli\Arguments;

class Cli
{
    private $plugins   = null;
    private $arguments = null;
    private $is_parsed = false;

    public function __construct(PluginList $plugin_list)
    {
        $this->plugins = $plugin_list;

        $this->arguments = new Arguments();

        foreach ($this->plugins as $plugin) {
            $this->arguments->addOption($plugin->getNamespace(), array(
                'default'     => '--help',
                'description' => $plugin->getDescription(),
            ));
        }
    }

    public function addFlag($flag, $setting)
    {
        $this->arguments->addFlag($flag, $setting);

        return $this;
    }

    public function getTarget()
    {
        $this->parse();
        $all_options   = array_keys(array_merge(
            $this->arguments->getOptions(),
            $this->arguments->getFlags()
        ));
        $target_option = null;
        foreach ($all_options as $option) {
            if (isset($this->arguments[$option])) {
                $target_option = $option;
                break;
            }
        }

        return $target_option;
    }

    public function getTargetVal()
    {
        $target_option = $this->getTarget();

        return $this->arguments[$target_option];
    }

    public function getHelpScreen($target = null)
    {
        $this->parse();

        return $this->arguments->getHelpScreen() . PHP_EOL . PHP_EOL;
    }

    public function trigger()
    {
        $target_option   = $this->getTarget();
        $target_plugin   = $this->plugins->getPluginByNamespace($target_option);
        $child_arguments = new Arguments(array(
            'input' => array_slice($_SERVER['argv'], 2)
        ));
        $child_arguments
            ->addFlag(array('version', 'v'), '查看版本信息')
            ->addFlag(array('help', 'h'), '查看帮助信息')
            ->addFlags($target_plugin->getFlags())
            ->addOptions($target_plugin->getOptions());

        $child_arguments->parse();

        if ($child_arguments['help']) {
            die($child_arguments->getHelpScreen() . PHP_EOL . PHP_EOL);
        } elseif ($child_arguments['version']) {
            die(
                $target_plugin->getNamespace()
                . ':'
                . $target_plugin->getVersion()
                . PHP_EOL
                . PHP_EOL
            );
        } else {
            $children_option    = array_keys(array_merge(
                $target_plugin->getOptions(),
                $target_plugin->getFlags()
            ));
            $child_option       = null;
            $child_argument_arr = array();
            foreach ($children_option as $option) {
                if (isset($child_arguments[$option])) {
                    $child_argument_arr[$option] = $child_arguments[$option];
                }
            }

            if (empty($child_argument_arr)) {
                die($child_arguments->getHelpScreen() . PHP_EOL . PHP_EOL);
            } else {
                $target_plugin->exec($child_argument_arr);
            }
        }
    }

    private function parse()
    {
        if (!$this->is_parsed) {
            $this->arguments->parse();
            $this->is_parsed = true;
        }
    }
}


text:
class WorkshopController < ApplicationController
  def index
  end
end


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.Editor.Shared.Utilities;
using Microsoft.CodeAnalysis.Shared.TestHooks;
using Roslyn.Utilities;

namespace Microsoft.CodeAnalysis.Editor.Shared.Threading
{
    // A helper class primarily used for the AsynchronousTagger that can handle the job of
    // scheduling work to be done on the UI thread and on a background thread.  This class wraps the
    // TPL and implements things in special ways to provide certain nice bits of functionality.
    // Specifically:
    //
    // 1) Background actions are run serially.  This allows you to enqueue a whole host of background
    // work to do, without having to worry about those same background tasks running simultaneously
    // and colliding with each other.
    //
    // 2) You can start a 'chain' of actions starting with an action that fires after a delay. After
    // that point you can continue adding actions to that chain.  You can then ask to wait until that
    // chain of actions completes (very useful for testing purposes). This chain can also be
    // cancelled very simply.
    internal class AsynchronousSerialWorkQueue : ForegroundThreadAffinitizedObject
    {
        #region Fields that can be accessed from either thread

        // The task schedulers that we can use to schedule work on the UI thread.
        private readonly IAsynchronousOperationListener _asyncListener;

        // Lock for serializing access to these objects.
        private readonly object _gate = new object();

        // The current task we are executing on the background.  Kept around so we can serialize
        // background tasks by continually calling 'SafeContinueWith' on this task.
        private Task _currentBackgroundTask;

        // The cancellation source for the current chain of work.
        private CancellationTokenSource _cancellationTokenSource = new CancellationTokenSource();

        #endregion

        public AsynchronousSerialWorkQueue(IThreadingContext threadingContext, IAsynchronousOperationListener asyncListener)
            : base(threadingContext, assertIsForeground: false)
        {
            Contract.ThrowIfNull(asyncListener);
            _asyncListener = asyncListener;

            // Initialize so we don't have to check for null below. Force the background task to run
            // on the threadpool.
            _currentBackgroundTask = Task.CompletedTask;
        }

        public CancellationToken CancellationToken => _cancellationTokenSource.Token;

        public void CancelCurrentWork()
            => CancelCurrentWork(remainCancelled: false);

        public void CancelCurrentWork(bool remainCancelled)
        {
            lock (_gate)
            {
                remainCancelled |= _cancellationTokenSource.IsCancellationRequested;
                _cancellationTokenSource.Cancel();
                if (!remainCancelled)
                {
                    _cancellationTokenSource = new CancellationTokenSource();
                }
            }
        }

        public void EnqueueBackgroundWork(Action action, string name, CancellationToken cancellationToken)
            => EnqueueBackgroundWork(action, name, afterDelay: 0, cancellationToken: cancellationToken);

        public void EnqueueBackgroundWork(Action action, string name, int afterDelay, CancellationToken cancellationToken)
        {
            Contract.ThrowIfNull(action);

            var asyncToken = _asyncListener.BeginAsyncOperation(name);

            lock (_gate)
            {
                if (afterDelay == 0)
                {
                    // Note that we serialized background tasks so that consumers of this type can issue
                    // multiple background tasks without having to worry about them running
                    // simultaneously.
                    _currentBackgroundTask = _currentBackgroundTask.SafeContinueWith(
                        _ => action(),
                        cancellationToken,
                        TaskContinuationOptions.None,
                        TaskScheduler.Default);
                }
                else
                {
                    _currentBackgroundTask = _currentBackgroundTask.ContinueWithAfterDelay(
                        action, cancellationToken, afterDelay, TaskContinuationOptions.None, TaskScheduler.Default);
                }

                _currentBackgroundTask.CompletesAsyncOperation(asyncToken);
            }
        }

        public void EnqueueBackgroundTask(
            Func<CancellationToken, Task> taskGeneratingFunctionAsync,
            string name,
            CancellationToken cancellationToken)
        {
            EnqueueBackgroundTask(taskGeneratingFunctionAsync, name, afterDelay: 0, cancellationToken: cancellationToken);
        }

        public void EnqueueBackgroundTask(
            Func<CancellationToken, Task> taskGeneratingFunctionAsync,
            string name, int afterDelay, CancellationToken cancellationToken)
        {
            Contract.ThrowIfNull(taskGeneratingFunctionAsync);

            var asyncToken = _asyncListener.BeginAsyncOperation(name);

            lock (_gate)
            {
                if (afterDelay == 0)
                {
                    // Note that we serialized background tasks so that consumers of this type can issue
                    // multiple background tasks without having to worry about them running
                    // simultaneously.
                    _currentBackgroundTask = _currentBackgroundTask.SafeContinueWithFromAsync(
                        _ => taskGeneratingFunctionAsync(cancellationToken),
                        cancellationToken,
                        TaskContinuationOptions.None,
                        TaskScheduler.Default);
                }
                else
                {
                    _currentBackgroundTask = _currentBackgroundTask.ContinueWithAfterDelayFromAsync(
                        _ => taskGeneratingFunctionAsync(cancellationToken),
                        cancellationToken,
                        afterDelay,
                        TaskContinuationOptions.None,
                        TaskScheduler.Default);
                }

                _currentBackgroundTask.CompletesAsyncOperation(asyncToken);
            }
        }

        /// <summary>
        /// Wait until all queued background tasks have been completed.  NOTE: This will NOT pump,
        /// and it won't wait for any timer foreground tasks to actually enqueue their respective
        /// background tasks - it just waits for the already enqueued background tasks to finish.
        /// </summary>
        public void WaitForPendingBackgroundWork()
        {
            AssertIsForeground();

            _currentBackgroundTask.Wait();
        }

        internal TestAccessor GetTestAccessor()
        {
            return new TestAccessor(this);
        }

        internal readonly struct TestAccessor
        {
            private readonly AsynchronousSerialWorkQueue _asynchronousSerialWorkQueue;

            internal TestAccessor(AsynchronousSerialWorkQueue asynchronousSerialWorkQueue)
            {
                _asynchronousSerialWorkQueue = asynchronousSerialWorkQueue;
            }

            /// <summary>
            /// Wait until all tasks have been completed.  NOTE that this will do a pumping wait if
            /// called on the UI thread. Also, it isn't guaranteed to be stable in the case of tasks
            /// enqueuing other tasks in arbitrary orders, though it does support our common pattern of
            /// "timer task->background task->foreground task with results"
            ///
            /// Use this method very judiciously.  Most of the time, we should be able to just use
            /// IAsynchronousOperationListener for tests.
            /// </summary>
            public void WaitUntilCompletion()
            {
                _asynchronousSerialWorkQueue.AssertIsForeground();

                _asynchronousSerialWorkQueue.WaitForPendingBackgroundWork();
            }
        }
    }
}


text:
""" Tasks Analysis Module """

import matplotlib.gridspec as gridspec
import matplotlib.pyplot as plt
import numpy as np
import pylab as pl
import re

from analysis_module import AnalysisModule
from devlib.utils.misc import memoized
from trappy.utils import listify

class TasksAnalysis(AnalysisModule):
    """
    Support for Tasks signals analysis.

    :param trace: input Trace object
    :type trace: :mod:`libs.utils.Trace`
    """

    def __init__(self, trace):
        super(TasksAnalysis, self).__init__(trace)

###############################################################################
# DataFrame Getter Methods
###############################################################################

    def _dfg_top_big_tasks(self, min_samples=100, min_utilization=None):
        """
        Tasks which had 'utilization' samples bigger than the specified
        threshold

        :param min_samples: minumum number of samples over the min_utilization
        :type min_samples: int

        :param min_utilization: minimum utilization used to filter samples
            default: capacity of a little cluster
        :type min_utilization: int
        """
        if not self._trace.hasEvents('sched_load_avg_task'):
            self._log.warning('Events [sched_load_avg_task] not found')
            return None

        if min_utilization is None:
            min_utilization = self._little_cap

        # Get utilization samples >= min_utilization
        df = self._dfg_trace_event('sched_load_avg_task')
        big_tasks_events = df[df.util_avg > min_utilization]
        if not len(big_tasks_events):
            self._log.warning('No tasks with with utilization samples > %d',
                              min_utilization)
            return None

        # Report the number of tasks which match the min_utilization condition
        big_tasks = big_tasks_events.pid.unique()
        self._log.info('%5d tasks with samples of utilization > %d',
                       len(big_tasks), min_utilization)

        # Compute number of samples above threshold
        big_tasks_stats = big_tasks_events.groupby('pid')\
                            .describe(include=['object'])
        big_tasks_stats = big_tasks_stats.unstack()['comm']\
                            .sort_values(by=['count'], ascending=False)

        # Filter for number of occurrences
        big_tasks_stats = big_tasks_stats[big_tasks_stats['count'] > min_samples]
        if not len(big_tasks_stats):
            self._log.warning('      but none with more than %d samples',
                              min_samples)
            return None

        self._log.info('      %d with more than %d samples',
                       len(big_tasks_stats), min_samples)

        # Add task name column
        big_tasks_stats['comm'] = big_tasks_stats.index.map(
            lambda pid: self._trace.getTaskByPid(pid))

        # Filter columns of interest
        big_tasks_stats = big_tasks_stats[['count', 'comm']]
        big_tasks_stats.rename(columns={'count': 'samples'}, inplace=True)

        return big_tasks_stats

    def _dfg_top_wakeup_tasks(self, min_wakeups=100):
        """
        Tasks which wakeup more frequently than a specified threshold.

        :param min_wakeups: minimum number of wakeups
        :type min_wakeups: int
        """
        if not self._trace.hasEvents('sched_wakeup'):
            self._log.warning('Events [sched_wakeup] not found')
            return None

        df = self._dfg_trace_event('sched_wakeup')

        # Compute number of wakeups above threshold
        wkp_tasks_stats = df.groupby('pid').describe(include=['object'])
        wkp_tasks_stats = wkp_tasks_stats.unstack()['comm']\
                          .sort_values(by=['count'], ascending=False)

        # Filter for number of occurrences
        wkp_tasks_stats = wkp_tasks_stats[
            wkp_tasks_stats['count'] > min_wakeups]
        if not len(df):
            self._log.warning('No tasks with more than %d wakeups',
                              len(wkp_tasks_stats))
            return None
        self._log.info('%5d tasks with more than %d wakeups',
                       len(df), len(wkp_tasks_stats))

        # Add task name column
        wkp_tasks_stats['comm'] = wkp_tasks_stats.index.map(
            lambda pid: self._trace.getTaskByPid(pid))

        # Filter columns of interest
        wkp_tasks_stats = wkp_tasks_stats[['count', 'comm']]
        wkp_tasks_stats.rename(columns={'count': 'samples'}, inplace=True)

        return wkp_tasks_stats

    def _dfg_rt_tasks(self, min_prio=100):
        """
        Tasks with RT priority

        NOTE: priorities uses scheduler values, thus: the lower the value the
              higher is the task priority.
              RT   Priorities: [  0..100]
              FAIR Priorities: [101..120]

        :param min_prio: minumum priority
        :type min_prio: int
        """
        if not self._trace.hasEvents('sched_switch'):
            self._log.warning('Events [sched_switch] not found')
            return None

        df = self._dfg_trace_event('sched_switch')

        # Filters tasks which have a priority bigger than threshold
        df = df[df.next_prio <= min_prio]

        # Filter columns of interest
        rt_tasks = df[['next_pid', 'next_prio']]

        # Remove all duplicateds
        rt_tasks = rt_tasks.drop_duplicates()

        # Order by priority
        rt_tasks.sort_values(by=['next_prio', 'next_pid'], ascending=True,
                             inplace=True)
        rt_tasks.rename(columns={'next_pid': 'pid', 'next_prio': 'prio'},
                        inplace=True)

        # Set PID as index
        rt_tasks.set_index('pid', inplace=True)

        # Add task name column
        rt_tasks['comm'] = rt_tasks.index.map(
            lambda pid: self._trace.getTaskByPid(pid))

        return rt_tasks

###############################################################################
# Plotting Methods
###############################################################################

    def plotTasks(self, tasks, signals=None):
        """
        Generate a common set of useful plots for each of the specified tasks

        This method allows to filter which signals should be plot, if data are
        available in the input trace. The list of signals supported are:
        Tasks signals plot:
                load_avg, util_avg, boosted_util, sched_overutilized
        Tasks residencies on CPUs:
                residencies, sched_overutilized
        Tasks PELT signals:
                load_sum, util_sum, period_contrib, sched_overutilized

        At least one of the previous signals must be specified to get a valid
        plot.

        Addidional custom signals can be specified and they will be represented
        in the "Task signals plots" if they represent valid keys of the task
        load/utilization trace event (e.g. sched_load_avg_task).

        Note:
            sched_overutilized: enable the plotting of overutilization bands on
                                top of each subplot
            residencies: enable the generation of the CPUs residencies plot

        :param tasks: the list of task names and/or PIDs to plot.
                      Numerical PIDs and string task names can be mixed
                      in the same list.
        :type tasks: list(str) or list(int)

        :param signals: list of signals (and thus plots) to generate
                        default: all the plots and signals available in the
                        current trace
        :type signals: list(str)
        """
        if not signals:
            signals = ['load_avg', 'util_avg', 'boosted_util',
                       'sched_overutilized',
                       'load_sum', 'util_sum', 'period_contrib',
                       'residencies']

        # Check for the minimum required signals to be available
        if not self._trace.hasEvents('sched_load_avg_task'):
            self._log.warning('Events [sched_load_avg_task] not found, '
                              'plot DISABLED!')
            return

        # Defined list of tasks to plot
        if tasks and \
            not isinstance(tasks, str) and \
            not isinstance(tasks, list):
            raise ValueError('Wrong format for tasks parameter')

        if tasks:
            tasks_to_plot = listify(tasks)
        else:
            raise ValueError('No tasks to plot specified')

        # Compute number of plots to produce
        plots_count = 0
        plots_signals = [
                # Fist plot: task's utilization
                {'load_avg', 'util_avg', 'boosted_util'},
                # Second plot: task residency
                {'residencies'},
                # Third plot: tasks's load
                {'load_sum', 'util_sum', 'period_contrib'}
        ]
        hr = []
        ysize = 0
        for plot_id, signals_to_plot in enumerate(plots_signals):
            signals_to_plot = signals_to_plot.intersection(signals)
            if len(signals_to_plot):
                plots_count = plots_count + 1
                # Use bigger size only for the first plot
                hr.append(3 if plot_id == 0 else 1)
                ysize = ysize + (8 if plot_id else 4)

        # Grid
        gs = gridspec.GridSpec(plots_count, 1, height_ratios=hr)
        gs.update(wspace=0.1, hspace=0.1)

        # Build list of all PIDs for each task_name to plot
        pids_to_plot = []
        for task in tasks_to_plot:
            # Add specified PIDs to the list
            if isinstance(task, int):
                pids_to_plot.append(task)
                continue
            # Otherwise: add all the PIDs for task with the specified name
            pids_to_plot.extend(self._trace.getTaskByName(task))

        for tid in pids_to_plot:
            savefig = False

            task_name = self._trace.getTaskByPid(tid)
            self._log.info('Plotting [%d:%s]...', tid, task_name)
            plot_id = 0

            # For each task create a figure with plots_count plots
            plt.figure(figsize=(16, ysize))
            plt.suptitle('Task Signals',
                         y=.94, fontsize=16, horizontalalignment='center')

            # Plot load and utilization
            signals_to_plot = {'load_avg', 'util_avg', 'boosted_util'}
            signals_to_plot = list(signals_to_plot.intersection(signals))
            if len(signals_to_plot) > 0:
                axes = plt.subplot(gs[plot_id, 0])
                axes.set_title('Task [{0:d}:{1:s}] Signals'
                               .format(tid, task_name))
                plot_id = plot_id + 1
                is_last = (plot_id == plots_count)
                self._plotTaskSignals(axes, tid, signals, is_last)
                savefig = True

            # Plot CPUs residency
            signals_to_plot = {'residencies'}
            signals_to_plot = list(signals_to_plot.intersection(signals))
            if len(signals_to_plot) > 0:
                axes = plt.subplot(gs[plot_id, 0])
                axes.set_title(
                    'Task [{0:d}:{1:s}] Residency (green: LITTLE, red: big)'
                    .format(tid, task_name)
                )
                plot_id = plot_id + 1
                is_last = (plot_id == plots_count)
                if 'sched_overutilized' in signals:
                    signals_to_plot.append('sched_overutilized')
                self._plotTaskResidencies(axes, tid, signals_to_plot, is_last)
                savefig = True

            # Plot PELT signals
            signals_to_plot = {'load_sum', 'util_sum', 'period_contrib'}
            signals_to_plot = list(signals_to_plot.intersection(signals))
            if len(signals_to_plot) > 0:
                axes = plt.subplot(gs[plot_id, 0])
                axes.set_title('Task [{0:d}:{1:s}] PELT Signals'
                               .format(tid, task_name))
                plot_id = plot_id + 1
                if 'sched_overutilized' in signals:
                    signals_to_plot.append('sched_overutilized')
                self._plotTaskPelt(axes, tid, signals_to_plot)
                savefig = True

            if not savefig:
                self._log.warning('Nothing to plot for %s', task_name)
                continue

            # Save generated plots into datadir
            if isinstance(task_name, list):
                task_name = re.sub('[:/]', '_', task_name[0])
            else:
                task_name = re.sub('[:/]', '_', task_name)
            figname = '{}/{}task_util_{}_{}.png'\
                      .format(self._trace.plots_dir, self._trace.plots_prefix,
                              tid, task_name)
            pl.savefig(figname, bbox_inches='tight')

    def plotBigTasks(self, max_tasks=10, min_samples=100,
                     min_utilization=None):
        """
        For each big task plot utilization and show the smallest cluster
        capacity suitable for accommodating task utilization.

        :param max_tasks: maximum number of tasks to consider
        :type max_tasks: int

        :param min_samples: minumum number of samples over the min_utilization
        :type min_samples: int

        :param min_utilization: minimum utilization used to filter samples
            default: capacity of a little cluster
        :type min_utilization: int
        """

        # Get PID of big tasks
        big_frequent_task_df = self._dfg_top_big_tasks(
            min_samples, min_utilization)
        if max_tasks > 0:
            big_frequent_task_df = big_frequent_task_df.head(max_tasks)
        big_frequent_task_pids = big_frequent_task_df.index.values

        big_frequent_tasks_count = len(big_frequent_task_pids)
        if big_frequent_tasks_count == 0:
            self._log.warning('No big/frequent tasks to plot')
            return

        # Get the list of events for all big frequent tasks
        df = self._dfg_trace_event('sched_load_avg_task')
        big_frequent_tasks_events = df[df.pid.isin(big_frequent_task_pids)]

        # Define axes for side-by-side plottings
        fig, axes = plt.subplots(big_frequent_tasks_count, 1,
                                 figsize=(16, big_frequent_tasks_count*4))
        plt.subplots_adjust(wspace=0.1, hspace=0.2)

        plot_idx = 0
        for pid, group in big_frequent_tasks_events.groupby('pid'):

            # # Build task names (there could be multiple, during the task lifetime)
            task_name = 'Task [%d:%s]'.format(pid, self._trace.getTaskByPid(pid))

            # Plot title
            if big_frequent_tasks_count == 1:
                ax = axes
            else:
                ax = axes[plot_idx]
            ax.set_title(task_name)

            # Left axis: utilization
            ax = group.plot(y=['util_avg', 'min_cluster_cap'],
                            style=['r.', '-b'],
                            drawstyle='steps-post',
                            linewidth=1,
                            ax=ax)
            ax.set_xlim(self._trace.x_min, self._trace.x_max)
            ax.set_ylim(0, 1100)
            ax.set_ylabel('util_avg')
            ax.set_xlabel('')
            ax.grid(True)
            self._trace.analysis.status.plotOverutilized(ax)

            plot_idx += 1

        ax.set_xlabel('Time [s]')

        self._log.info('Tasks which have been a "utilization" of %d for at least %d samples',
                       self._little_cap, min_samples)

    def plotWakeupTasks(self, max_tasks=10, min_wakeups=0, per_cluster=False):
        """
        Show waking up tasks over time and newly forked tasks in two separate
        plots.

        :param max_tasks: maximum number of tasks to consider
        :param max_tasks: int

        :param min_wakeups: minimum number of wakeups of each task
        :type min_wakeups: int

        :param per_cluster: if True get per-cluster wakeup events
        :type per_cluster: bool
        """
        if per_cluster is True and \
           not self._trace.hasEvents('sched_wakeup_new'):
            self._log.warning('Events [sched_wakeup_new] not found, '
                              'plots DISABLED!')
            return
        elif  not self._trace.hasEvents('sched_wakeup') and \
              not self._trace.hasEvents('sched_wakeup_new'):
            self._log.warning('Events [sched_wakeup, sched_wakeup_new] not found, '
                              'plots DISABLED!')
            return

        # Define axes for side-by-side plottings
        fig, axes = plt.subplots(2, 1, figsize=(14, 5))
        plt.subplots_adjust(wspace=0.2, hspace=0.3)

        if per_cluster:

            # Get per cluster wakeup events
            df = self._dfg_trace_event('sched_wakeup_new')
            big_frequent = (
                    (df.target_cpu.isin(self._big_cpus))
                    )
            ntbc = df[big_frequent]
            ntbc_count = len(ntbc)
            little_frequent = (
                    (df.target_cpu.isin(self._little_cpus))
                    )
            ntlc = df[little_frequent];
            ntlc_count = len(ntlc)

            self._log.info('%5d tasks forked on big cluster    (%3.1f %%)',
                           ntbc_count,
                           100. * ntbc_count / (ntbc_count + ntlc_count))
            self._log.info('%5d tasks forked on LITTLE cluster (%3.1f %%)',
                           ntlc_count,
                           100. * ntlc_count / (ntbc_count + ntlc_count))

            ax = axes[0]
            ax.set_title('Tasks Forks on big CPUs');
            ntbc.pid.plot(style=['g.'], ax=ax);
            ax.set_xlim(self._trace.x_min, self._trace.x_max);
            ax.set_xticklabels([])
            ax.set_xlabel('')
            ax.grid(True)
            self._trace.analysis.status.plotOverutilized(ax)

            ax = axes[1]
            ax.set_title('Tasks Forks on LITTLE CPUs');
            ntlc.pid.plot(style=['g.'], ax=ax);
            ax.set_xlim(self._trace.x_min, self._trace.x_max);
            ax.grid(True)
            self._trace.analysis.status.plotOverutilized(ax)

            return

        # Keep events of defined big tasks
        wkp_task_pids = self._dfg_top_wakeup_tasks(min_wakeups)
        if len(wkp_task_pids):
            wkp_task_pids = wkp_task_pids.index.values[:max_tasks]
            self._log.info('Plotting %d frequent wakeup tasks',
                           len(wkp_task_pids))

        ax = axes[0]
        ax.set_title('Tasks WakeUps Events')
        df = self._dfg_trace_event('sched_wakeup')
        if len(df):
            df = df[df.pid.isin(wkp_task_pids)]
            df.pid.astype(int).plot(style=['b.'], ax=ax)
            ax.set_xlim(self._trace.x_min, self._trace.x_max)
            ax.set_xticklabels([])
            ax.set_xlabel('')
            ax.grid(True)
            self._trace.analysis.status.plotOverutilized(ax)

        ax = axes[1]
        ax.set_title('Tasks Forks Events')
        df = self._dfg_trace_event('sched_wakeup_new')
        if len(df):
            df = df[df.pid.isin(wkp_task_pids)]
            df.pid.astype(int).plot(style=['r.'], ax=ax)
            ax.set_xlim(self._trace.x_min, self._trace.x_max)
            ax.grid(True)
            self._trace.analysis.status.plotOverutilized(ax)

    def plotBigTasksVsCapacity(self, min_samples=1,
                               min_utilization=None, big_cluster=True):
        """
        Draw a plot that shows whether tasks are placed on the correct cluster
        based on their utilization and cluster capacity. Green dots mean the
        task was placed on the correct cluster, Red means placement was wrong

        :param min_samples: minumum number of samples over the min_utilization
        :type min_samples: int

        :param min_utilization: minimum utilization used to filter samples
            default: capacity of a little cluster
        :type min_utilization: int

        :param big_cluster:
        :type big_cluster: bool
        """

        if not self._trace.hasEvents('sched_load_avg_task'):
            self._log.warning('Events [sched_load_avg_task] not found')
            return
        if not self._trace.hasEvents('cpu_frequency'):
            self._log.warning('Events [cpu_frequency] not found')
            return

        if big_cluster:
            cluster_correct = 'big'
            cpus = self._big_cpus
        else:
            cluster_correct = 'LITTLE'
            cpus = self._little_cpus

        # Get all utilization update events
        df = self._dfg_trace_event('sched_load_avg_task')

        # Keep events of defined big tasks
        big_task_pids = self._dfg_top_big_tasks(
            min_samples, min_utilization)
        if big_task_pids is not None:
            big_task_pids = big_task_pids.index.values
            df = df[df.pid.isin(big_task_pids)]
        if not df.size:
            self._log.warning('No events for tasks with more then %d utilization '
                              'samples bigger than %d, plots DISABLED!')
            return

        fig, axes = plt.subplots(2, 1, figsize=(14, 5))
        plt.subplots_adjust(wspace=0.2, hspace=0.3)

        # Add column of expected cluster depending on:
        # a) task utilization value
        # b) capacity of the selected cluster
        bu_bc = ( \
                (df['util_avg'] > self._little_cap) & \
                (df['cpu'].isin(self._big_cpus))
            )
        su_lc = ( \
                (df['util_avg'] <= self._little_cap) & \
                (df['cpu'].isin(self._little_cpus))
            )
        # The Cluster CAPacity Matches the UTILization (ccap_mutil) iff:
        # - tasks with util_avg  > little_cap are running on a BIG cpu
        # - tasks with util_avg <= little_cap are running on a LITTLe cpu
        df.loc[:,'ccap_mutil'] = np.select([(bu_bc | su_lc)], [True], False)

        df_freq = self._dfg_trace_event('cpu_frequency')
        df_freq = df_freq[df_freq.cpu == cpus[0]]

        ax = axes[0]
        ax.set_title('Tasks Utilization vs Allocation')
        for ucolor, umatch in zip('gr', [True, False]):
            cdata = df[df['ccap_mutil'] == umatch]
            if len(cdata) > 0:
                cdata['util_avg'].plot(ax=ax,
                        style=[ucolor+'.'], legend=False)
        ax.set_xlim(self._trace.x_min, self._trace.x_max)
        ax.set_xticklabels([])
        ax.set_xlabel('')
        ax.grid(True)
        self._trace.analysis.status.plotOverutilized(ax)

        ax = axes[1]
        ax.set_title('Frequencies on "{}" cluster'.format(cluster_correct))
        df_freq['frequency'].plot(style=['-b'], ax=ax, drawstyle='steps-post')
        ax.set_xlim(self._trace.x_min, self._trace.x_max);
        ax.grid(True)
        self._trace.analysis.status.plotOverutilized(ax)

        legend_y = axes[0].get_ylim()[1]
        axes[0].annotate('Utilization-Capacity Matches',
                         xy=(0, legend_y),
                         xytext=(-50, 45), textcoords='offset points',
                         fontsize=18)
        axes[0].annotate('Task schduled (green) or not (red) on min cluster',
                         xy=(0, legend_y),
                         xytext=(-50, 25), textcoords='offset points',
                         fontsize=14)

###############################################################################
# Utility Methods
###############################################################################

    def _plotTaskSignals(self, axes, tid, signals, is_last=False):
        """
        For task with ID `tid` plot the specified signals.

        :param axes: axes over which to generate the plot
        :type axes: :mod:`matplotlib.axes.Axes`

        :param tid: task ID
        :type tid: int

        :param signals: signals to be plot
        :param signals: list(str)

        :param is_last: if True this is the last plot
        :type is_last: bool
        """
        # Get dataframe for the required task
        util_df = self._dfg_trace_event('sched_load_avg_task')

        # Plot load and util
        signals_to_plot = set(signals).difference({'boosted_util'})
        for signal in signals_to_plot:
            if signal not in util_df.columns:
                continue
            data = util_df[util_df.pid == tid][signal]
            data.plot(ax=axes, drawstyle='steps-post', legend=True)

        # Plot boost utilization if available
        if 'boosted_util' in signals and \
           self._trace.hasEvents('sched_boost_task'):
            boost_df = self._dfg_trace_event('sched_boost_task')
            data = boost_df[boost_df.pid == tid][['boosted_util']]
            if len(data):
                data.plot(ax=axes, style=['y-'], drawstyle='steps-post')
            else:
                task_name = self._trace.getTaskByPid(tid)
                self._log.warning('No "boosted_util" data for task [%d:%s]',
                                  tid, task_name)

        # Add Capacities data if avilable
        if 'nrg_model' in self._platform:
            nrg_model = self._platform['nrg_model']
            max_lcap = nrg_model['little']['cpu']['cap_max']
            max_bcap = nrg_model['big']['cpu']['cap_max']
            tip_lcap = 0.8 * max_lcap
            tip_bcap = 0.8 * max_bcap
            self._log.debug(
                'LITTLE capacity tip/max: %d/%d, big capacity tip/max: %d/%d',
                tip_lcap, max_lcap, tip_bcap, max_bcap
            )
            axes.axhline(tip_lcap, color='y', linestyle=':', linewidth=2)
            axes.axhline(max_lcap, color='y', linestyle='--', linewidth=2)
            axes.axhline(tip_bcap, color='r', linestyle=':', linewidth=2)
            axes.axhline(max_bcap, color='r', linestyle='--', linewidth=2)

        axes.set_ylim(0, 1100)
        axes.set_xlim(self._trace.x_min, self._trace.x_max)
        axes.grid(True)
        if not is_last:
            axes.set_xticklabels([])
            axes.set_xlabel('')
        if 'sched_overutilized' in signals:
            self._trace.analysis.status.plotOverutilized(axes)

    def _plotTaskResidencies(self, axes, tid, signals, is_last=False):
        """
        For task with ID `tid` plot residency information.

        :param axes: axes over which to generate the plot
        :type axes: :mod:`matplotlib.axes.Axes`

        :param tid: task ID
        :type tid: int

        :param signals: signals to be plot
        :param signals: list(str)

        :param is_last: if True this is the last plot
        :type is_last: bool
        """
        util_df = self._dfg_trace_event('sched_load_avg_task')
        data = util_df[util_df.pid == tid][['cluster', 'cpu']]
        for ccolor, clabel in zip('gr', ['LITTLE', 'big']):
            cdata = data[data.cluster == clabel]
            if len(cdata) > 0:
                cdata.plot(ax=axes, style=[ccolor+'+'], legend=False)
        # Y Axis - placeholders for legend, acutal CPUs. topmost empty lane
        cpus = [str(n) for n in range(self._platform['cpus_count'])]
        ylabels = [''] + cpus
        axes.set_yticklabels(ylabels)
        axes.set_ylim(-1, self._platform['cpus_count'])
        axes.set_ylabel('CPUs')
        # X Axis
        axes.set_xlim(self._trace.x_min, self._trace.x_max)

        axes.grid(True)
        if not is_last:
            axes.set_xticklabels([])
            axes.set_xlabel('')
        if 'sched_overutilized' in signals:
            self._trace.analysis.status.plotOverutilized(axes)

    def _plotTaskPelt(self, axes, tid, signals):
        """
        For task with ID `tid` plot PELT-related signals.

        :param axes: axes over which to generate the plot
        :type axes: :mod:`matplotlib.axes.Axes`

        :param tid: task ID
        :type tid: int

        :param signals: signals to be plot
        :param signals: list(str)
        """
        util_df = self._dfg_trace_event('sched_load_avg_task')
        data = util_df[util_df.pid == tid][['load_sum',
                                            'util_sum',
                                            'period_contrib']]
        data.plot(ax=axes, drawstyle='steps-post')
        axes.set_xlim(self._trace.x_min, self._trace.x_max)
        axes.ticklabel_format(style='scientific', scilimits=(0, 0),
                              axis='y', useOffset=False)
        axes.grid(True)
        if 'sched_overutilized' in signals:
            self._trace.analysis.status.plotOverutilized(axes)

# vim :set tabstop=4 shiftwidth=4 expandtab


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Coniothyrium subcorticeum Kravtzev

### Remarks
null


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2015.03.02 at 09:35:21 AM CET
//

package uk.bl.odin.orcid.schema.messages.onepointtwo;

import java.math.BigInteger;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for anonymous complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType>
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element ref="{http://www.orcid.org/ns/orcid}funding-type"/>
 *         <element ref="{http://www.orcid.org/ns/orcid}organization-defined-type" minOccurs="0"/>
 *         <element ref="{http://www.orcid.org/ns/orcid}funding-title"/>
 *         <element ref="{http://www.orcid.org/ns/orcid}short-description" minOccurs="0"/>
 *         <element ref="{http://www.orcid.org/ns/orcid}amount" minOccurs="0"/>
 *         <element ref="{http://www.orcid.org/ns/orcid}url" minOccurs="0"/>
 *         <element name="start-date" type="{http://www.orcid.org/ns/orcid}fuzzy-date" minOccurs="0"/>
 *         <element name="end-date" type="{http://www.orcid.org/ns/orcid}fuzzy-date" minOccurs="0"/>
 *         <element ref="{http://www.orcid.org/ns/orcid}funding-external-identifiers" minOccurs="0"/>
 *         <element ref="{http://www.orcid.org/ns/orcid}funding-contributors" minOccurs="0"/>
 *         <element ref="{http://www.orcid.org/ns/orcid}organization"/>
 *         <element ref="{http://www.orcid.org/ns/orcid}source" minOccurs="0"/>
 *         <element ref="{http://www.orcid.org/ns/orcid}created-date" minOccurs="0"/>
 *         <element ref="{http://www.orcid.org/ns/orcid}last-modified-date" minOccurs="0"/>
 *       </sequence>
 *       <attGroup ref="{http://www.orcid.org/ns/orcid}visibility"/>
 *       <attGroup ref="{http://www.orcid.org/ns/orcid}put-code"/>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "fundingType",
    "organizationDefinedType",
    "fundingTitle",
    "shortDescription",
    "amount",
    "url",
    "startDate",
    "endDate",
    "fundingExternalIdentifiers",
    "fundingContributors",
    "organization",
    "source",
    "createdDate",
    "lastModifiedDate"
})
@XmlRootElement(name = "funding")
public class Funding {

    @XmlElement(name = "funding-type", required = true)
    protected String fundingType;
    @XmlElement(name = "organization-defined-type")
    protected String organizationDefinedType;
    @XmlElement(name = "funding-title", required = true)
    protected FundingTitle fundingTitle;
    @XmlElement(name = "short-description")
    protected String shortDescription;
    protected Amount amount;
    protected Url url;
    @XmlElement(name = "start-date")
    protected FuzzyDate startDate;
    @XmlElement(name = "end-date")
    protected FuzzyDate endDate;
    @XmlElement(name = "funding-external-identifiers")
    protected FundingExternalIdentifiers fundingExternalIdentifiers;
    @XmlElement(name = "funding-contributors")
    protected FundingContributors fundingContributors;
    @XmlElement(required = true)
    protected Organization organization;
    protected Source source;
    @XmlElement(name = "created-date")
    protected CreatedDate createdDate;
    @XmlElement(name = "last-modified-date")
    protected LastModifiedDate lastModifiedDate;
    @XmlAttribute(name = "visibility")
    protected Visibility visibility;
    @XmlAttribute(name = "put-code")
    protected BigInteger putCode;

    /**
     * Gets the value of the fundingType property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getFundingType() {
        return fundingType;
    }

    /**
     * Sets the value of the fundingType property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setFundingType(String value) {
        this.fundingType = value;
    }

    /**
     * Gets the value of the organizationDefinedType property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getOrganizationDefinedType() {
        return organizationDefinedType;
    }

    /**
     * Sets the value of the organizationDefinedType property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setOrganizationDefinedType(String value) {
        this.organizationDefinedType = value;
    }

    /**
     * Gets the value of the fundingTitle property.
     *
     * @return
     *     possible object is
     *     {@link FundingTitle }
     *
     */
    public FundingTitle getFundingTitle() {
        return fundingTitle;
    }

    /**
     * Sets the value of the fundingTitle property.
     *
     * @param value
     *     allowed object is
     *     {@link FundingTitle }
     *
     */
    public void setFundingTitle(FundingTitle value) {
        this.fundingTitle = value;
    }

    /**
     * Gets the value of the shortDescription property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getShortDescription() {
        return shortDescription;
    }

    /**
     * Sets the value of the shortDescription property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setShortDescription(String value) {
        this.shortDescription = value;
    }

    /**
     * Gets the value of the amount property.
     *
     * @return
     *     possible object is
     *     {@link Amount }
     *
     */
    public Amount getAmount() {
        return amount;
    }

    /**
     * Sets the value of the amount property.
     *
     * @param value
     *     allowed object is
     *     {@link Amount }
     *
     */
    public void setAmount(Amount value) {
        this.amount = value;
    }

    /**
     * Gets the value of the url property.
     *
     * @return
     *     possible object is
     *     {@link Url }
     *
     */
    public Url getUrl() {
        return url;
    }

    /**
     * Sets the value of the url property.
     *
     * @param value
     *     allowed object is
     *     {@link Url }
     *
     */
    public void setUrl(Url value) {
        this.url = value;
    }

    /**
     * Gets the value of the startDate property.
     *
     * @return
     *     possible object is
     *     {@link FuzzyDate }
     *
     */
    public FuzzyDate getStartDate() {
        return startDate;
    }

    /**
     * Sets the value of the startDate property.
     *
     * @param value
     *     allowed object is
     *     {@link FuzzyDate }
     *
     */
    public void setStartDate(FuzzyDate value) {
        this.startDate = value;
    }

    /**
     * Gets the value of the endDate property.
     *
     * @return
     *     possible object is
     *     {@link FuzzyDate }
     *
     */
    public FuzzyDate getEndDate() {
        return endDate;
    }

    /**
     * Sets the value of the endDate property.
     *
     * @param value
     *     allowed object is
     *     {@link FuzzyDate }
     *
     */
    public void setEndDate(FuzzyDate value) {
        this.endDate = value;
    }

    /**
     * Gets the value of the fundingExternalIdentifiers property.
     *
     * @return
     *     possible object is
     *     {@link FundingExternalIdentifiers }
     *
     */
    public FundingExternalIdentifiers getFundingExternalIdentifiers() {
        return fundingExternalIdentifiers;
    }

    /**
     * Sets the value of the fundingExternalIdentifiers property.
     *
     * @param value
     *     allowed object is
     *     {@link FundingExternalIdentifiers }
     *
     */
    public void setFundingExternalIdentifiers(FundingExternalIdentifiers value) {
        this.fundingExternalIdentifiers = value;
    }

    /**
     * Gets the value of the fundingContributors property.
     *
     * @return
     *     possible object is
     *     {@link FundingContributors }
     *
     */
    public FundingContributors getFundingContributors() {
        return fundingContributors;
    }

    /**
     * Sets the value of the fundingContributors property.
     *
     * @param value
     *     allowed object is
     *     {@link FundingContributors }
     *
     */
    public void setFundingContributors(FundingContributors value) {
        this.fundingContributors = value;
    }

    /**
     * Gets the value of the organization property.
     *
     * @return
     *     possible object is
     *     {@link Organization }
     *
     */
    public Organization getOrganization() {
        return organization;
    }

    /**
     * Sets the value of the organization property.
     *
     * @param value
     *     allowed object is
     *     {@link Organization }
     *
     */
    public void setOrganization(Organization value) {
        this.organization = value;
    }

    /**
     * Gets the value of the source property.
     *
     * @return
     *     possible object is
     *     {@link Source }
     *
     */
    public Source getSource() {
        return source;
    }

    /**
     * Sets the value of the source property.
     *
     * @param value
     *     allowed object is
     *     {@link Source }
     *
     */
    public void setSource(Source value) {
        this.source = value;
    }

    /**
     * Gets the value of the createdDate property.
     *
     * @return
     *     possible object is
     *     {@link CreatedDate }
     *
     */
    public CreatedDate getCreatedDate() {
        return createdDate;
    }

    /**
     * Sets the value of the createdDate property.
     *
     * @param value
     *     allowed object is
     *     {@link CreatedDate }
     *
     */
    public void setCreatedDate(CreatedDate value) {
        this.createdDate = value;
    }

    /**
     * Gets the value of the lastModifiedDate property.
     *
     * @return
     *     possible object is
     *     {@link LastModifiedDate }
     *
     */
    public LastModifiedDate getLastModifiedDate() {
        return lastModifiedDate;
    }

    /**
     * Sets the value of the lastModifiedDate property.
     *
     * @param value
     *     allowed object is
     *     {@link LastModifiedDate }
     *
     */
    public void setLastModifiedDate(LastModifiedDate value) {
        this.lastModifiedDate = value;
    }

    /**
     * Gets the value of the visibility property.
     *
     * @return
     *     possible object is
     *     {@link Visibility }
     *
     */
    public Visibility getVisibility() {
        return visibility;
    }

    /**
     * Sets the value of the visibility property.
     *
     * @param value
     *     allowed object is
     *     {@link Visibility }
     *
     */
    public void setVisibility(Visibility value) {
        this.visibility = value;
    }

    /**
     * Gets the value of the putCode property.
     *
     * @return
     *     possible object is
     *     {@link BigInteger }
     *
     */
    public BigInteger getPutCode() {
        return putCode;
    }

    /**
     * Sets the value of the putCode property.
     *
     * @param value
     *     allowed object is
     *     {@link BigInteger }
     *
     */
    public void setPutCode(BigInteger value) {
        this.putCode = value;
    }

}


text:
namespace DromundKaasII.Engine
{
    /// <summary>
    /// Game Speed options, for the rate at which the Engine is updated.
    /// </summary>
    public enum GameSpeedOptions
    {
        /// <summary>
        /// Slow game speed, at 1500ms per Engine step.
        /// </summary>
        Slow = 1500,

        /// <summary>
        /// Normal game speed, at 1000ms per Engine step.
        /// </summary>
        Normal = 1000,

        /// <summary>
        /// Fast game speed, at 500ms per Engine step.
        /// </summary>
        Fast = 500
    }
}


text:
package net.lshift.hibernate.migrations;

import net.lshift.hibernate.migrations.dialects.DialectExtension;
import org.hibernate.cfg.Configuration;
import org.hibernate.dialect.Dialect;
import org.hibernate.mapping.Column;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

public class IntColumnWidener implements MigrationElement {

  private final Dialect dialect;
  private final DialectExtension dialectExtension;
  private final Configuration config;
  private final String table;
  private String column = null;
  private List<String> statements = new ArrayList<String>();

  private CreateTableBuilder tempTable = null;

  public IntColumnWidener(Configuration config, Dialect dialect, DialectExtension dialectExtension, String table) {
    this.config = config;
    this.dialectExtension = dialectExtension;
    this.dialect = dialect;
    this.table = table;
    this.tempTable = new CreateTableBuilder(dialect, dialectExtension, getTempTableName());
  }

  public IntColumnWidener column(String column) {
    this.column = column;
    return this;
  }

  private String getTempTableName() {
    return table + "_temp";
  }

  public CreateTableBuilder getTempTable() {
    return tempTable;
  }

  public boolean requiresNewTable() {
    return !dialectExtension.supportsColumnTypeChanges();
  }

  @Override
  public void apply(Connection conn) throws SQLException {

    if (requiresNewTable()) {

      TransplantTableBuilder transplantTableBuilder =
          new TransplantTableBuilder(config, dialect, dialectExtension, table, tempTable);

      transplantTableBuilder.apply(conn);

    }
    else {

      dialectExtension.widenIntColumn(conn, table, column);

    }

  }

  @Override
  public List<String> getStatements() {
    return statements;
  }
}


text:
#pragma once

#include <stdbool.h>
#include <stdint.h>

#include "AppEvent.h"
#include "K32W0FactoryDataProvider.h"
#include "LightingManager.h"

#include <app/clusters/identify-server/identify-server.h>
#include <platform/CHIPDeviceLayer.h>

#include "FreeRTOS.h"
#include "timers.h"

// Application-defined error codes in the CHIP_ERROR space.
#define APP_ERROR_EVENT_QUEUE_FAILED CHIP_APPLICATION_ERROR(0x01)
#define APP_ERROR_CREATE_TASK_FAILED CHIP_APPLICATION_ERROR(0x02)
#define APP_ERROR_UNHANDLED_EVENT CHIP_APPLICATION_ERROR(0x03)
#define APP_ERROR_CREATE_TIMER_FAILED CHIP_APPLICATION_ERROR(0x04)
#define APP_ERROR_START_TIMER_FAILED CHIP_APPLICATION_ERROR(0x05)
#define APP_ERROR_STOP_TIMER_FAILED CHIP_APPLICATION_ERROR(0x06)

class AppTask
{
public:
    CHIP_ERROR StartAppTask();
    static void AppTaskMain(void * pvParameter);

    void PostTurnOnActionRequest(int32_t aActor, LightingManager::Action_t aAction);
    void PostEvent(const AppEvent * event);

    void UpdateClusterState(void);
    void UpdateDeviceState(void);

    // Identify cluster callbacks.
    static void OnIdentifyStart(Identify * identify);
    static void OnIdentifyStop(Identify * identify);
    static void OnTriggerEffect(Identify * identify);
    static void OnTriggerEffectComplete(chip::System::Layer * systemLayer, void * appState);

private:
    friend AppTask & GetAppTask(void);

    CHIP_ERROR Init();

    static void ActionInitiated(LightingManager::Action_t aAction, int32_t aActor);
    static void ActionCompleted(LightingManager::Action_t aAction);

    void CancelTimer(void);

    void DispatchEvent(AppEvent * event);

    static void FunctionTimerEventHandler(AppEvent * aEvent);
    static void KBD_Callback(uint8_t events);
    static void HandleKeyboard(void);
    static void OTAHandler(AppEvent * aEvent);
    static void BleHandler(AppEvent * aEvent);
    static void BleStartAdvertising(intptr_t arg);
    static void LightActionEventHandler(AppEvent * aEvent);
    static void OTAResumeEventHandler(AppEvent * aEvent);
    static void ResetActionEventHandler(AppEvent * aEvent);
    static void InstallEventHandler(AppEvent * aEvent);

    static void ButtonEventHandler(uint8_t pin_no, uint8_t button_action);
    static void TimerEventHandler(TimerHandle_t xTimer);

    static void MatterEventHandler(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg);
    void StartTimer(uint32_t aTimeoutInMs);

    static void RestoreLightingState(void);

#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
    static void InitOTA(intptr_t arg);
    static void StartOTAQuery(intptr_t arg);
    static void PostOTAResume();
    static void OnScheduleInitOTA(chip::System::Layer * systemLayer, void * appState);
#endif

    static void UpdateClusterStateInternal(intptr_t arg);
    static void UpdateDeviceStateInternal(intptr_t arg);
    static void InitServer(intptr_t arg);

    enum Function_t
    {
        kFunction_NoneSelected   = 0,
        kFunction_SoftwareUpdate = 0,
        kFunction_FactoryReset,
        kFunctionTurnOnTurnOff,
        kFunction_Identify,
        kFunction_TriggerEffect,

        kFunction_Invalid
    } Function;

    Function_t mFunction            = kFunction_NoneSelected;
    bool mResetTimerActive          = false;
    bool mSyncClusterToButtonAction = false;

    static AppTask sAppTask;
};

inline AppTask & GetAppTask(void)
{
    return AppTask::sAppTask;
}


text:
layout: default
title: Page non trouvée
permalink: /404.html
sitemap: false
---

{{ page.title }}

Désolé, il n'y a rien par ici Revenez à l'accueil.


text:
<?php

namespace app\models\notebook;

use app\libraries\CodeMirrorUtils;
use app\libraries\Core;

/**
 * @method string getLanguage()
 * @method string getCodeMirrorMode()
 * @method int getRowCount()
 */
class SubmissionCodeBox extends AbstractNotebookInput {

    /** @prop @var string The programming language of the text box */
    protected $language;

    /** @prop @var string The mode to use for code mirror */
    protected $codeMirrorMode;

    /** @prop @var int The row height for the text box */
    protected $row_count;

    public function __construct(Core $core, array $details) {
        parent::__construct($core, $details);

        $this->language = $details['programming_language'] ?? null;
        $this->codeMirrorMode = $details['codemirror_mode'] ?? CodeMirrorUtils::getCodeMirrorMode($this->language);
        $this->row_count = $details['rows'] ?? 0;
    }
}