text:
#include "modules/prediction/predictor/free_move/free_move_predictor.h"

#include <cmath>
#include <limits>
#include <utility>
#include <vector>
#include "Eigen/Dense"

#include "modules/common/log.h"
#include "modules/common/math/math_utils.h"
#include "modules/prediction/common/prediction_gflags.h"
#include "modules/prediction/common/prediction_util.h"

namespace apollo {
namespace prediction {

using ::apollo::common::PathPoint;
using ::apollo::common::TrajectoryPoint;
using ::apollo::common::math::KalmanFilter;
using ::apollo::perception::PerceptionObstacle;

void FreeMovePredictor::Predict(Obstacle* obstacle) {
  Clear();

  CHECK_NOTNULL(obstacle);
  CHECK_GT(obstacle->history_size(), 0);

  const Feature& feature = obstacle->latest_feature();

  if (!feature.has_position() || !feature.has_velocity() ||
      !feature.position().has_x() || !feature.position().has_y()) {
    AERROR << "Obstacle [" << obstacle->id()
           << " is missing position or velocity";
    return;
  }

  Eigen::Vector2d position(feature.position().x(), feature.position().y());
  Eigen::Vector2d velocity(feature.velocity().x(), feature.velocity().y());
  Eigen::Vector2d acc(feature.acceleration().x(), feature.acceleration().y());
  double theta = feature.velocity_heading();

  std::vector<TrajectoryPoint> points(0);
  double prediction_total_time = FLAGS_prediction_duration;
  if (obstacle->type() == PerceptionObstacle::PEDESTRIAN) {
    prediction_total_time = FLAGS_prediction_pedestrian_total_time;
  }
  DrawFreeMoveTrajectoryPoints(position, velocity, acc, theta,
      prediction_total_time, FLAGS_prediction_period, &points);

  Trajectory trajectory = GenerateTrajectory(points);
  int start_index = 0;
  trajectories_.push_back(std::move(trajectory));
  SetEqualProbability(1.0, start_index);
  ADEBUG << "Obstacle [" << obstacle->id() << "] has " << trajectories_.size()
         << " trajectories.";
}

void FreeMovePredictor::DrawFreeMoveTrajectoryPoints(
    const Eigen::Vector2d& position, const Eigen::Vector2d& velocity,
    const Eigen::Vector2d& acc, const double theta,
    const double total_time, const double period,
    std::vector<TrajectoryPoint>* points) {
  Eigen::Matrix<double, 6, 1> state;
  state.setZero();
  state(0, 0) = 0.0;
  state(1, 0) = 0.0;
  state(2, 0) = velocity(0);
  state(3, 0) = velocity(1);
  state(4, 0) = common::math::Clamp(acc(0), FLAGS_min_acc, FLAGS_max_acc);
  state(5, 0) = common::math::Clamp(acc(1), FLAGS_min_acc, FLAGS_max_acc);

  Eigen::Matrix<double, 6, 6> transition;
  transition.setIdentity();
  transition(0, 2) = period;
  transition(0, 4) = 0.5 * period * period;
  transition(1, 3) = period;
  transition(1, 5) = 0.5 * period * period;
  transition(2, 4) = period;
  transition(3, 5) = period;

  size_t num = static_cast<size_t>(total_time / period);
  ::apollo::prediction::predictor_util::GenerateFreeMoveTrajectoryPoints(
      &state, transition, theta, num, period, points);

  for (size_t i = 0; i < points->size(); ++i) {
    ::apollo::prediction::predictor_util::TranslatePoint(
        position[0], position[1], &(points->operator[](i)));
  }
}

}  // namespace prediction
}  // namespace apollo


text:
import { RequestAuthOptionsInterface } from '.';

/**
 * Request options.
 * @interface RequestOptionsInterface
 */
interface RequestOptionsInterface {
  /**
   * Request headers.
   * @type {Object}
   */
  headers: {};

  /**
   * Request authentication options.
   * @type {RequestAuthOptionsInterface}
   */
  auth: RequestAuthOptionsInterface;

  /**
   * Convert request body to JSON string?
   * @type {Boolean}
   */
  json: boolean;
}

export { RequestOptionsInterface };

redpajama_set_name: RedPajamaGithub


text:
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.model.psi;

import com.intellij.codeInsight.lookup.LookupElement;
import org.jetbrains.annotations.NotNull;

import java.util.Collection;

/**
 * Implement this interface to support reference-based completion.
 */
public interface PsiCompletableReference extends PsiSymbolReference {

  /**
   * @return the collection {@link LookupElement} instances representing all identifiers that are visible at the location of the reference.
   * The contents of the returned collection is used to build the lookup list for basic code completion.
   * The list of visible identifiers may not be filtered by the completion prefix string, the filtering is performed later by the IDE.
   */
  @NotNull Collection<@NotNull LookupElement> getCompletionVariants();
}


text:
import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
import { get } from '@ember/object';
import { hash } from 'rsvp';

export default Route.extend({
  globalStore: service(),

  model() {
    const gs = get(this, 'globalStore');

    return hash({
      azureADConfig: gs.find('authconfig', 'azuread', { forceReload: true }),
      principals:    gs.all('principal')
    });
  },

  resetController(controller, isExiting, transition) {
    if (isExiting && transition.targetName !== 'error') {
      controller.set('editing', false);
    }
  }

});


text:
//
//  SHKDiigo.m
//  ShareKit
//
//  Created by saturngod on 11 Jan 2012

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

/**
 Private helper methods
 */
@interface SHKDiigo ()
- (void)authFinished:(SHKRequest *)aRequest;
- (void)sendFinished:(SHKRequest *)aRequest;
@end

@implementation SHKDiigo

#pragma mark -
#pragma mark Configuration : Service Defination

+ (NSString *)sharerTitle
{
	return SHKLocalizedString(@"Diigo");
}

+ (BOOL)canShareURL
{
	return YES;
}

#pragma mark -
#pragma mark Authorization

+ (NSString *)authorizationFormCaption
{
	return SHKLocalizedString(@"Create an account at %@", @"http://www.diigo.com");
}

- (void)authorizationFormValidate:(SHKFormController *)form
{
	// Display an activity indicator
	if (!self.quiet)
		[[SHKActivityIndicator currentIndicator] displayActivity:SHKLocalizedString(@"Logging In...")];

	// Authorize the user through the server
	NSDictionary *formValues = [form formValues];

	NSString *password = [SHKEncode([formValues objectForKey:@"password"]) stringByReplacingOccurrencesOfString:@"/" withString:@"%2F"];
	self.request = [[[SHKRequest alloc] initWithURL:[NSURL URLWithString:
													[NSString stringWithFormat:@"https://%@:%@@secure.diigo.com/api/v2/bookmarks?key=%@&count=1&user=%@",
													 SHKEncode([formValues objectForKey:@"username"]),
													 password,SHKCONFIG(diigoKey),SHKEncode([formValues objectForKey:@"username"])
													 ]]
											params:nil
										  delegate:self
								isFinishedSelector:@selector(authFinished:)
											method:@"GET"
										 autostart:YES] autorelease];

	self.pendingForm = form;
}

- (void)authFinished:(SHKRequest *)aRequest
{
	// Hide the activity indicator
	[[SHKActivityIndicator currentIndicator] hide];

	if (aRequest.success)
	{
		[self.pendingForm saveForm];
	}
    else
    {
        if (aRequest.response.statusCode == 401)
        {
            [self authShowBadCredentialsAlert];
        }
        else
        {
            [self authShowOtherAuthorizationErrorAlert];
        }
    }

	[self authDidFinish:aRequest.success];
}

#pragma mark -
#pragma mark Share Form

- (NSArray *)shareFormFieldsForType:(SHKShareType)type
{
	if (type == SHKShareTypeURL)
		return [NSArray arrayWithObjects:
				[SHKFormFieldSettings label:SHKLocalizedString(@"Title") key:@"title" type:SHKFormFieldTypeText start:self.item.title],
				[SHKFormFieldSettings label:SHKLocalizedString(@"Tag, tag") key:@"tags" type:SHKFormFieldTypeText start:[self.item.tags componentsJoinedByString:@", "]],
				[SHKFormFieldSettings label:SHKLocalizedString(@"Notes") key:@"text" type:SHKFormFieldTypeText start:self.item.text],
				[SHKFormFieldSettings label:SHKLocalizedString(@"Shared") key:@"shared" type:SHKFormFieldTypeSwitch start:SHKFormFieldSwitchOff],
				nil];

	return nil;
}

#pragma mark -
#pragma mark Share API Methods

- (BOOL)send
{
	if ([self validateItem])
	{

        NSMutableCharacterSet *allowedCharacters = [NSMutableCharacterSet alphanumericCharacterSet];
        [allowedCharacters formUnionWithCharacterSet:[NSCharacterSet punctuationCharacterSet]];
        [allowedCharacters removeCharactersInString:@","];
        NSString *params = [NSMutableString stringWithFormat:@"key=%@&url=%@&title=%@&tags=%@&desc=%@&shared=%@",SHKCONFIG(diigoKey),SHKEncodeURL(self.item.URL),SHKEncode(self.item.title),SHKEncode([self tagStringJoinedBy:@"," allowedCharacters:allowedCharacters tagPrefix:nil tagSuffix:nil]),SHKEncode(self.item.text),[self.item customBoolForSwitchKey:@"shared"]?@"yes":@"no"];

		NSString *password = [SHKEncode([self getAuthValueForKey:@"password"]) stringByReplacingOccurrencesOfString:@"/" withString:@"%2F"];

    NSString* address =[NSString stringWithFormat:@"https://%@:%@@secure.diigo.com/api/v2/bookmarks",
                        SHKEncode([self getAuthValueForKey:@"username"]),
                        password];

		self.request = [[[SHKRequest alloc] initWithURL:[NSURL URLWithString:address]
												params:params
											  delegate:self
									isFinishedSelector:@selector(sendFinished:)
												method:@"POST"
											 autostart:YES] autorelease];

		// Notify delegate
		[self sendDidStart];

		return YES;
	}

	return NO;
}

- (void)sendFinished:(SHKRequest *)aRequest
{
	if (aRequest.success)
	{
		[self sendDidFinish];
	}
    else
    {
        if (aRequest.response.statusCode == 401)
        {
        [self shouldReloginWithPendingAction:SHKPendingSend];
        }
        else
        {
        [self sendShowSimpleErrorAlert];
        }
    }
}

@end


text:
<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:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:paddingBottom="@dimen/activity_vertical_margin"
    tools:context=".MainActivity">

    <EditText
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:inputType="number"
        android:ems="10"
        android:id="@+id/num1"
        android:layout_marginTop="19dp"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"/>

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:text="@string/add"
        android:id="@+id/textView"
        android:layout_below="@+id/num1"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="29dp"/>

    <EditText
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:inputType="number"
        android:ems="10"
        android:id="@+id/num2"
        android:layout_below="@+id/textView"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="11dp"/>

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:text="@string/euqals"
        android:id="@+id/textView2"
        android:layout_below="@+id/num2"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="21dp"/>

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/result"
        android:id="@+id/result"
        android:layout_below="@+id/textView2"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="28dp"
        android:editable="true"/>

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/eval"
        android:id="@+id/add"
        android:layout_below="@+id/result"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="41dp"
        android:onClick="evaluateNumber"/>

</RelativeLayout>


text:
import React from 'react';
import {connect} from 'react-redux';
import FontAwesome from 'react-fontawesome';

import {logout} from '../actions';
import {userSelector, loginInfoSelector} from '../selectors';

const user = ({user, loginInfo, logout}) => {
  if (!user || !loginInfo) {
    return null;
  }

  return (

      {user.returnData[loginInfo.username]}
      <FontAwesome name="sign-out" className="pull-right" onClick={logout} />

  );
};

const mapStateToProps = state =>
({
  user: userSelector(state),
  loginInfo: loginInfoSelector(state),
});

export default connect(mapStateToProps, {logout})(user);


text:
using Borg.Cloud.Resources;
using Carbon.Platform.Storage;

namespace Carbon.Rds.Services
{
    public class RegisterDatabaseInstanceRequest
    {
        public RegisterDatabaseInstanceRequest() { }

        public RegisterDatabaseInstanceRequest(
            long databaseId,
            ManagedResource resource,
            int priority = 1,
            DatabaseFlags flags = DatabaseFlags.Primary)
        {
            Ensure.IsValidId(databaseId, nameof(databaseId));

            DatabaseId = databaseId;
            Resource   = resource;
            Priority   = priority;
            Flags      = flags;
        }

        public long DatabaseId { get; set; }

        public long ClusterId { get; set; }

        public ManagedResource Resource { get; set; }

        public int Priority { get; set; }

        public DatabaseFlags Flags { get; set; }
    }
}


text:
__author__ = "Mari Wahl"
__copyright__ = "Copyright 2014, The Cogent Project"
__credits__ = ["Mari Wahl"]
__license__ = "GPL"
__version__ = "2.0"
__maintainer__ = "Mari Wahl"
__email__ = "marina.w4hl@gmail.com"

''' This program divide the sets for cross validation '''

import random, os
import numpy as np
from constants import PERCENTAGE, INPUT_FOLDER, OUTPUT_FOLDER

def save_result_split(final, name):
    ''' Save in a file the results of spliting'''

    with open(name , "w") as f:
        for i in range(len(final)):
            f.write(str(final[i]) + "\n")

def split_data(input_file, output_file):
    ''' split data for training and test sets '''

    with open(input_file, "rb") as f:
        data = f.read().split('\n')

    border = int(PERCENTAGE*len(data))
    random.shuffle(data)

    train_data = data[:border][:]
    test_data = data[border:][:]

    out_file_train = output_file + "_train_" + str(PERCENTAGE) + ".data"
    out_file_test = output_file + "_test_" + str(PERCENTAGE) + ".data"

    save_result_split(train_data, out_file_train)
    save_result_split(test_data, out_file_test)

def main():
    ''' Load and split data from entire file'''

    input_folder = INPUT_FOLDER
    output_folder = OUTPUT_FOLDER

    if not os.path.exists(output_folder):
        os.makedirs(output_folder)

    ''' Load and split data from files divided by order'''

    output_folder = OUTPUT_FOLDER
    if not os.path.exists(output_folder):
        os.makedirs(output_folder)

    # for each set of files
    input_file = INPUT_FOLDER + 'together1.data'
    split_data(input_file, output_folder + 'together1')

    input_file = INPUT_FOLDER + 'together2.data'
    split_data(input_file, output_folder + 'together2')

    input_file = INPUT_FOLDER + 'together3.data'
    split_data(input_file, output_folder + 'together3')

    input_file = INPUT_FOLDER + 'together4.data'
    split_data(input_file, output_folder + 'together4')

    input_file = INPUT_FOLDER + 'together5.data'
    split_data(input_file, output_folder + 'together5')

    # with outliers
    input_file = INPUT_FOLDER + 'together1.data' + '_with_outlier'
    split_data(input_file, output_folder + 'together1_' + 'with_outlier')

    input_file = INPUT_FOLDER + 'together2.data' + '_with_outlier'
    split_data(input_file, output_folder + 'together2_'+ 'with_outlier')

    input_file = INPUT_FOLDER + 'together3.data' + '_with_outlier'
    split_data(input_file, output_folder + 'together3_'+ 'with_outlier')

    input_file = INPUT_FOLDER + 'together4.data' + '_with_outlier'
    split_data(input_file, output_folder + 'together4_'+ 'with_outlier')

    input_file = INPUT_FOLDER + 'together5.data' + '_with_outlier'
    split_data(input_file, output_folder + 'together5_'+ 'with_outlier')

    print 'Output generate at ' + output_folder

    print 'Done!'

if __name__ == '__main__':
    main()


text:
[![CI Status](http://img.shields.io/travis/root/CTVideoView.svg?style=flat)](https://travis-ci.org/root/CTVideoView)
[![Version](https://img.shields.io/cocoapods/v/CTVideoView.svg?style=flat)](http://cocoapods.org/pods/CTVideoView)
[![License](https://img.shields.io/cocoapods/l/CTVideoView.svg?style=flat)](http://cocoapods.org/pods/CTVideoView)
[![Platform](https://img.shields.io/cocoapods/p/CTVideoView.svg?style=flat)](http://cocoapods.org/pods/CTVideoView)

## Usage

To run the example project, clone the repo, and run `pod install` from the Example directory first.

## Requirements

## Installation

CTVideoView is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

## How To Use

```
- (void)packageWithUrl:(NSString *)url hasSound:(BOOL)hasSound play:(BOOL)play{

[self.videoView packageWithUrl:url hasSound:hasSound play:play];
}

- (CTVideoView *)videoView{
if (!_videoView) {
_videoView = [[CTVideoView alloc]init];
_videoView.frame = CGRectMake(0, 30, 160, 90);
}
return _videoView;
}
```

you can see CTTestViewController

```ruby
pod "CTVideoView"
```

## preview

![image](http://7xpas5.com1.z0.glb.clouddn.com/ctvideoview_screen_1.png?imageView/1/w/187/h/333)
![image](http://7xpas5.com1.z0.glb.clouddn.com/ctvideoview_screen_2.png?imageView/1/w/187/h/333)
![image](http://7xpas5.com1.z0.glb.clouddn.com/ctvideoview_screen_3.png?imageView/1/w/187/h/333)

## Author

root, 632300630@qq.com

## License

CTVideoView is available under the MIT license. See the LICENSE file for more info.


text:
<?php

namespace VideoGamesRecords\CoreBundle\Admin;

use Sonata\AdminBundle\Admin\AbstractAdmin;
use Sonata\AdminBundle\Datagrid\DatagridMapper;
use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\Form\FormMapper;
use Sonata\AdminBundle\Route\RouteCollectionInterface;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\TextType;

class ChartTypeAdmin extends AbstractAdmin
{
    /**
     * @param RouteCollectionInterface $collection
     */
    protected function configureRoutes(RouteCollectionInterface $collection): void
    {
        $collection
            ->remove('delete')
            ->remove('export');
    }

    /**
     * @param FormMapper $form
     */
    protected function configureFormFields(FormMapper $form): void
    {
        $form
            ->add('idType', TextType::class, [
                'label' => 'label.id',
                'attr' => [
                    'readonly' => true,
                ]
            ])
            ->add('name', TextType::class, [
                'label' => 'label.name',
                'required' => true,
            ])
            ->add('mask', TextType::class, [
                'label' => 'label.mask',
                'required' => true,
            ])
            ->add(
                'orderBy',
                ChoiceType::class,
                [
                    'label' => 'label.orderBy',
                    'choices' => [
                        'label.orderBy.asc' => 'ASC',
                        'label.orderBy.desc' => 'DESC',
                    ]
                ]
            );
    }

    /**
     * @param DatagridMapper $filter
     */
    protected function configureDatagridFilters(DatagridMapper $filter): void
    {
        $filter
            ->add('idType', null, ['label' => 'label.id'])
            ->add('name', null, ['label' => 'label.name']);
    }

    /**
     * @param ListMapper $list
     */
    protected function configureListFields(ListMapper $list): void
    {
        $list
            ->addIdentifier('idType', null, ['label' => 'label.id'])
            ->add('name', null, ['label' => 'label.name'])
            ->add('mask', null, ['label' => 'label.mask'])
            ->add('orderBy', null, ['label' => 'label.orderBy'])
            ->add('_action', 'actions', [
                'actions' => [
                    'edit' => [],
                ]
            ]);
    }
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MTB CAT1 Peripheral driver library: cy_stc_mpu_cfg_t Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

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

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

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

MTB CAT1 Peripheral driver library

Data Fields

cy_stc_mpu_cfg_t Struct Reference
Prot         (Protection Unit) » Data Structures

Description

Configuration structure for MPU Struct initialization.

Data Fields

uint32_t * 	address

 	Base address of the memory region.

cy_en_prot_size_t 	regionSize

 	Size of the memory region.

uint8_t 	subregions

 	Mask of the 8 subregions to disable.

cy_en_prot_perm_t 	userPermission

 	User permissions for the region.

cy_en_prot_perm_t 	privPermission

 	Privileged permissions for the region.

bool 	secure

 	Non Secure = 0, Secure = 1.


text:
def extractHoneypeachtxtHomeBlog(item):
	'''
	Parser for 'honeypeachtxt.home.blog'
	'''

	vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
	if not (chp or vol) or "preview" in item['title'].lower():
		return None

	if item['tags'] == ['tidak dikategorikan']:
		titlemap = [
			('Long Live Your Majesty Chapter ',           'Long Live Your Majesty',               'translated'),
			('Across A Millennium to Love You Chapter ',  'Across A Millennium to Love You',      'translated'),
			('Your Majesty Please Calm Down Chapter ',    'Your Majesty Please Calm Down',        'translated'),
			('War Love Snow Chapter ',                    'War Love Snow',                        'translated'),
			('Tensei Shoujo no Rirekisho',                'Tensei Shoujo no Rirekisho',           'translated'),
			('Master of Dungeon',                         'Master of Dungeon',                    'oel'),
		]

		for titlecomponent, name, tl_type in titlemap:
			if titlecomponent.lower() in item['title'].lower():
				return buildReleaseMessageWithType(item, name, vol, chp, frag=frag, postfix=postfix, tl_type=tl_type)

	tagmap = [
		('war love snow',                       'war love snow',                                      'translated'),
		('Your Majesty Please Calm Down',       'Your Majesty Please Calm Down',                      'translated'),
		('long live your majesty',              'long live your majesty',                             'translated'),
		('PRC',       'PRC',                      'translated'),
		('Loiterous', 'Loiterous',                'oel'),
	]

	for tagname, name, tl_type in tagmap:
		if tagname in item['tags']:
			return buildReleaseMessageWithType(item, name, vol, chp, frag=frag, postfix=postfix, tl_type=tl_type)

	return False


text:
module.exports = {
  unknown: { email: 'unknown@thisdomainisfake.com', password: 'nonono' },
  known: { email: 'fake@chriswal.es', password: '123456password' },
  invalid: { email: 'invalid@com', password: 'correcthorsebatterystaple' },
  toDelete: {
    email: 'test@example.com',
    password: 'correcthorsebatterystaple',
    newPassword: 'chipsahoy'
  }
};


text:
docker kill proxy
docker kill tmpnb
docker rm proxy
docker rm tmpnb


text:
"""Migration for the Submitty system."""
import os
import json
from pathlib import Path
import shutil

def up(config):
    """
    Run up migration.

    :param config: Object holding configuration details about Submitty
    :type config: migrator.config.Config
    """
    old_stack_trace_path = os.path.join(config.submitty['autograding_log_path'], 'stack_traces')
    new_stack_trace_path = os.path.join(config.submitty['site_log_path'], 'autograding_stack_traces')

    # If the old path exists and the new one does not, move old to new
    if os.path.exists(old_stack_trace_path) and not os.path.exists(new_stack_trace_path):
        shutil.move(old_stack_trace_path, new_stack_trace_path)
    # If neither the new nor old path exists, make the new stack trace directory
    elif not os.path.exists(new_stack_trace_path):
        os.mkdir(new_stack_trace_path)

def down(config):
    old_stack_trace_path = os.path.join(config.submitty['autograding_log_path'], 'stack_traces')
    new_stack_trace_path = os.path.join(config.submitty['site_log_path'], 'autograding_stack_traces')

    # If the new path exists and the old one does not, move new to old
    if os.path.exists(new_stack_trace_path) and not os.path.exists(old_stack_trace_path):
        shutil.move(new_stack_trace_path, old_stack_trace_path)
    # If neither the new nor old path exists, make the new stack trace directory
    elif not os.path.exists(old_stack_trace_path):
        os.mkdir(old_stack_trace_path)


text:
package net.sf.jabref.gui.specialfields;

import java.util.List;
import java.util.Objects;

import net.sf.jabref.Globals;
import net.sf.jabref.gui.JabRefFrame;
import net.sf.jabref.gui.actions.BaseAction;
import net.sf.jabref.gui.undo.NamedCompound;
import net.sf.jabref.gui.undo.UndoableFieldChange;
import net.sf.jabref.logic.l10n.Localization;
import net.sf.jabref.logic.specialfields.SpecialFieldsUtils;
import net.sf.jabref.model.FieldChange;
import net.sf.jabref.model.entry.BibEntry;
import net.sf.jabref.model.entry.specialfields.SpecialField;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class SpecialFieldAction implements BaseAction {

    private final JabRefFrame frame;
    private final SpecialField specialField;
    private final String value;
    private final boolean nullFieldIfValueIsTheSame;
    private final String undoText;

    private static final Log LOGGER = LogFactory.getLog(SpecialFieldAction.class);

    /**
     * @param nullFieldIfValueIsTheSame - false also causes that doneTextPattern has two place holders %0 for the value and %1 for the sum of entries
     */
    public SpecialFieldAction(
            JabRefFrame frame,
            SpecialField specialField,
            String value,
            boolean nullFieldIfValueIsTheSame,
            String undoText) {
        this.frame = frame;
        this.specialField = specialField;
        this.value = value;
        this.nullFieldIfValueIsTheSame = nullFieldIfValueIsTheSame;
        this.undoText = undoText;
    }

    @Override
    public void action() {
        try {
            List<BibEntry> bes = frame.getCurrentBasePanel().getSelectedEntries();
            if ((bes == null) || bes.isEmpty()) {
                return;
            }
            NamedCompound ce = new NamedCompound(undoText);
            for (BibEntry be : bes) {
                // if (value==null) and then call nullField has been omitted as updatefield also handles value==null
                List<FieldChange> changes = SpecialFieldsUtils.updateField(specialField, value, be, nullFieldIfValueIsTheSame, Globals.prefs.isKeywordSyncEnabled(), Globals.prefs.getKeywordDelimiter());
                for(FieldChange change: changes) {
                    ce.addEdit(new UndoableFieldChange(change));
                }
            }
            ce.end();
            if (ce.hasEdits()) {
                frame.getCurrentBasePanel().getUndoManager().addEdit(ce);
                frame.getCurrentBasePanel().markBaseChanged();
                frame.getCurrentBasePanel().updateEntryEditorIfShowing();
                String outText;
                if (nullFieldIfValueIsTheSame || value == null) {
                    outText = getTextDone(specialField, Integer.toString(bes.size()));
                } else {
                    outText = getTextDone(specialField, value, Integer.toString(bes.size()));
                }
                frame.output(outText);
            } else {
                // if user does not change anything with his action, we do not do anything either
                // even no output message
            }
        } catch (Throwable ex) {
            LOGGER.error("Problem setting special fields", ex);
        }
    }

    private String getTextDone(SpecialField field, String... params) {
        Objects.requireNonNull(params);

        SpecialFieldViewModel viewModel = new SpecialFieldViewModel(field);

        if (field.isSingleValueField() && (params.length == 1) && (params[0] != null)) {
            // Single value fields can be toggled only
            return Localization.lang("Toggled '%0' for %1 entries", viewModel.getLocalization(), params[0]);
        } else if (!field.isSingleValueField() && (params.length == 2) && (params[0] != null) && (params[1] != null)) {
            // setting a multi value special field - the setted value is displayed, too
            String[] allParams = {viewModel.getLocalization(), params[0], params[1]};
            return Localization.lang("Set '%0' to '%1' for %2 entries", allParams);
        } else if (!field.isSingleValueField() && (params.length == 1) && (params[0] != null)) {
            // clearing a multi value specialfield
            return Localization.lang("Cleared '%0' for %1 entries", viewModel.getLocalization(), params[0]);
        } else {
            // invalid usage
            LOGGER.info("Creation of special field status change message failed: illegal argument combination.");
            return "";
        }
    }

}


text:
#ifndef __FSL_LPUART_DMA_DRIVER_H__
#define __FSL_LPUART_DMA_DRIVER_H__

#include <stdint.h>
#include <stdbool.h>
#include "fsl_os_abstraction.h"
#include "fsl_lpuart_hal.h"
#include "fsl_dma_driver.h"
#include "fsl_clock_manager.h"

/*!
 * @addtogroup lpuart_driver
 * @{
 */

/*******************************************************************************
 * Variables
 ******************************************************************************/

/*! @brief Table of base addresses for LPUART instances. */
extern LPUART_Type * const g_lpuartBase[LPUART_INSTANCE_COUNT];

/*******************************************************************************
 * Definitions
 ******************************************************************************/

/*!
 * @brief Runtime state structure for UART driver with DMA.
 */
typedef struct LpuartDmaState {
    volatile bool isTxBusy;     /*!< True if there is an active transmit. */
    volatile bool isRxBusy;     /*!< True if there is an active receive. */
    volatile bool isTxBlocking; /*!< True if transmit is blocking transaction. */
    volatile bool isRxBlocking; /*!< True if receive is blocking transaction. */
    semaphore_t txIrqSync;      /*!< Used to wait for ISR to complete its TX business. */
    semaphore_t rxIrqSync;      /*!< Used to wait for ISR to complete its RX business. */
    dma_channel_t dmaLpuartTx; /*!< Structure definition for the DMA channel */
    dma_channel_t dmaLpuartRx; /*!< Structure definition for the DMA channel */
} lpuart_dma_state_t;

/*! @brief LPUART configuration structure*/
typedef struct LpuartDmaUserConfig {
    clock_lpuart_src_t clockSource;      /*!< LPUART clock source in fsl_sim_hal_<device>.h */
    uint32_t baudRate;                   /*!< LPUART baud rate*/
    lpuart_parity_mode_t parityMode;     /*!< parity mode, disabled (default), even, odd */
    lpuart_stop_bit_count_t stopBitCount;/*!< number of stop bits, 1 stop bit (default) or 2 stop bits*/
    lpuart_bit_count_per_char_t bitCountPerChar; /*!< number of bits, 8-bit (default) or 9-bit in a
                                                   char (up to 10-bits in some LPUART instances.*/
} lpuart_dma_user_config_t;

/*******************************************************************************
 * API
 ******************************************************************************/

#if defined(__cplusplus)
extern "C" {
#endif

/*!
 * @name LPUART DMA Driver
 * @{
 */

/*!
 * @brief Initializes an LPUART instance to work with DMA.
 *
 * This function initializes the run-time state structure to keep track of the on-going
 * transfers, un-gates the clock to the LPUART module, initializes the module
 * to user-defined settings and default settings, configures the IRQ state structure and enables
 * the module-level interrupt to the core, and enables the LPUART module transmitter and receiver.
 * This example shows how to set up the lpuart_dma_state_t and the
 * lpuart_user_config_t parameters and how to call the LPUART_DRV_DmaInit function by passing
 * in these parameters:
   @code
    lpuart_user_config_t lpuartConfig;
    lpuartConfig.baudRate = 9600;
    lpuartConfig.bitCountPerChar = kLpuart8BitsPerChar;
    lpuartConfig.parityMode = kLpuartParityDisabled;
    lpuartConfig.stopBitCount = kLpuartOneStopBit;
    lpuart_dma_state_t lpuartDmaState;
    LPUART_DRV_DmaInit(instance, &lpuartDmaState, &lpuartConfig);
   @endcode
 *
 * @param instance The LPUART instance number.
 * @param lpuartDmaStatePtr A pointer to the LPUART driver state structure memory. The user
 *  passes in the memory for the run-time state structure. The LPUART driver
 *  populates the members. This run-time state structure keeps track of the
 *  current transfer in progress.
 * @param lpuartUserConfig The user configuration structure of type lpuart_user_config_t. The user
 *  populates the members of this structure and passes the pointer of this structure
 *  into this function.
 * @return An error code or kStatus_LPUART_Success.
 */
lpuart_status_t LPUART_DRV_DmaInit(uint32_t instance, lpuart_dma_state_t * lpuartDmaStatePtr,
                               const lpuart_dma_user_config_t * lpuartUserConfig);
/*!
 * @brief Shuts down the LPUART.
 *
 * This function disables the LPUART-DMA trigger, the transmitter, and the receiver.
 *
 * @param instance The LPUART instance number.
 * @return An error code or kStatus_LPUART_Success.
 */
lpuart_status_t LPUART_DRV_DmaDeinit(uint32_t instance);

/*!
 * @brief Sends (transmits) data out through the LPUART-DMA module using a blocking method.
 *
 * @param instance The LPUART instance number.
 * @param txBuff A pointer to the source buffer containing 8-bit data chars to send.
 * @param txSize The number of bytes to send.
 * @param timeout A timeout value for RTOS abstraction sync control in milliseconds (ms).
 * @return An error code or kStatus_LPUART_Success.
 */
lpuart_status_t LPUART_DRV_DmaSendDataBlocking(uint32_t instance,
                                        const uint8_t * txBuff,
                                        uint32_t txSize,
                                        uint32_t timeout);

/*!
 * @brief Sends (transmits) data through the LPUART-DMA module using a non-blocking method.
 *
 * @param instance The LPUART module base address.
 * @param txBuff A pointer to the source buffer containing 8-bit data chars to send.
 * @param txSize The number of bytes to send.
 * @return An error code or kStatus_LPUART_Success.
 */
lpuart_status_t LPUART_DRV_DmaSendData(uint32_t instance,
                                const uint8_t * txBuff,
                                uint32_t txSize);
/*!
 * @brief Returns whether the previous LPUART-DMA transmit has finished.
 *
 * @param instance The LPUART module base address.
 * @param bytesRemaining A pointer to a value that is populated with the number of bytes that
 *                       are remaining in the active transfer.
 * @return Current transmit status.
 * @retval kStatus_LPUART_Success The transmit has completed successfully.
 * @retval kStatus_LPUART_TxBusy The transmit is still in progress. @a bytesTransmitted is
 *     filled with the number of bytes which are transmitted up to that point.
 */
lpuart_status_t LPUART_DRV_DmaGetTransmitStatus(uint32_t instance, uint32_t * bytesRemaining);

/*!
 * @brief Terminates a non-blocking LPUART-DMA transmission early.
 *
 * @param instance The LPUART module base address.
 * @return Whether the abort of transmitting was successful or not.
 * @retval kStatus_LPUART_Success The transmit was successful.
 * @retval kStatus_LPUART_NoTransmitInProgress No transmission is currently in progress.
 */
lpuart_status_t LPUART_DRV_DmaAbortSendingData(uint32_t instance);

/*!
 * @brief Gets (receives) data from the LPUART-DMA module using a blocking method.
 *
 * @param instance The LPUART module base address.
 * @param rxBuff A pointer to the buffer containing 8-bit read data chars received.
 * @param rxSize The number of bytes to receive.
 * @param timeout A timeout value for RTOS abstraction sync control in milliseconds (ms).
 * @return An error code or kStatus_LPUART_Success.
 */
lpuart_status_t LPUART_DRV_DmaReceiveDataBlocking(uint32_t instance, uint8_t * rxBuff,
                                              uint32_t rxSize, uint32_t timeout);
/*!
 * @brief Gets (receives) data from the LPUART-DMA module using a non-blocking method.
 *
 * @param instance The LPUART module base address.
 * @param rxBuff  A pointer to the buffer containing 8-bit read data chars received.
 * @param rxSize The number of bytes to receive.
 * @return An error code or kStatus_LPUART_Success.
 */
lpuart_status_t LPUART_DRV_DmaReceiveData(uint32_t instance, uint8_t * rxBuff, uint32_t rxSize);

/*!
 * @brief Returns whether the previous LPUART-DMA receive is complete.
 *
 * @param instance The LPUART module base address.
 * @param bytesRemaining A pointer to a value that populated with the number of bytes which
 *                       still need to be received in the active transfer.
 * @return Current receiving status.
 * @retval kStatus_LPUART_Success The receive has completed successfully.
 * @retval kStatus_LPUART_RxBusy The receive is still in progress. @a bytesReceived is
 *     filled with the number of bytes which are received up to that point.
 */
lpuart_status_t LPUART_DRV_DmaGetReceiveStatus(uint32_t instance, uint32_t * bytesRemaining);

/*!
 * @brief Terminates a non-blocking LPUART-DMA receive early.
 *
 * @param instance The LPUART module base address.
 * @return Whether the abort of receiving was successful or not.
 * @retval kStatus_LPUART_Success The receive was successful.
 * @retval kStatus_LPUART_NoTransmitInProgress No receive is currently in progress.
 */
lpuart_status_t LPUART_DRV_DmaAbortReceivingData(uint32_t instance);

/*@}*/

#if defined(__cplusplus)
}
#endif

/*! @}*/

#endif /* __FSL_LPUART_DMA_DRIVER_H__ */
/******************************************************************************/
/* EOF */
/******************************************************************************/


text:
/*
 * Copyright (C) 2016 ScyllaDB Ltd.
 */

#pragma once

// An unbounded FIFO queue of objects of type T.
//
// It provides operations to push items in one end of the queue, and pop them
// from the other end of the queue - both operations are guaranteed O(1)
// (not just amortized O(1)). The size() operation is also O(1).
// chunked_fifo also guarantees that the largest contiguous memory allocation
// it does is O(1). The total memory used is, of course, O(N).
//
// How does chunked_fifo differ from std::list<>, circular_buffer<> and
// std::deque()?
//
// std::list<> can also make all the above guarantees, but is inefficient -
// both at run speed (every operation requires an allocation), and in memory
// use. Much more efficient than std::list<> is our circular_buffer<>, which
// allocates a contiguous array to hold the items and only reallocates it,
// exponentially, when the queue grows. On one test of several different
// push/pop scenarios, circular_buffer<> was between 5 and 20 times faster
// than std::list, and also used considerably less memory.
// The problem with circular_buffer<> is that gives up on the last guarantee
// we made above: circular_buffer<> allocates all the items in one large
// contiguous allocation - that might not be possible when the memory is
// highly fragmented.
// std::deque<> aims to solve the contiguous allocation problem by allocating
// smaller chunks of the queue, and keeping a list of them in an array. This
// array is necessary to allow for O(1) random access to any element, a
// feature which we do not need; But this array is itself contiguous so
// std::deque<> attempts larger contiguous allocations the larger the queue
// gets: std::deque<>'s contiguous allocation is still O(N) and in fact
// exactly 1/64 of the size of circular_buffer<>'s contiguous allocation.
// So it's an improvement over circular_buffer<>, but not a full solution.
//
// chunked_fifo<> is such a solution: it also allocates the queue in fixed-
// size chunks (just like std::deque) but holds them in a linked list, not
// a contiguous array, so there are no large contiguous allocations.
//
// Unlike std::deque<> or circular_buffer<>, chunked_fifo only provides the
// operations needed by std::queue, i.e.,: empty(), size(), front(), back(),
// push_back() and pop_front(). For simplicity, we do *not* implement other
// possible operations, like inserting or deleting elements from the "wrong"
// side of the queue or from the middle, nor random-access to items in the
// middle of the queue or iteration over the items without popping them.
//
// Another feature of chunked_fifo which std::deque is missing is the ability
// to control the chunk size, as a template parameter. In std::deque the
// chunk size is undocumented and fixed - in gcc, it is always 512 bytes.
// chunked_fifo, on the other hand, makes the chunk size (in number of items
// instead of bytes) a template parameter; In situations where the queue is
// expected to become very long, using a larger chunk size might make sense
// because it will result in fewer allocations.
//
// chunked_fifo uses uninitialized storage for unoccupied elements, and thus
// uses move/copy constructors instead of move/copy assignments, which are
// less efficient.

#include <memory>
#include <algorithm>

template <typename T, size_t items_per_chunk = 128>
class chunked_fifo {
    static_assert((items_per_chunk & (items_per_chunk - 1)) == 0,
            "chunked_fifo chunk size must be power of two");
    // Note: a "chunk" struct should be allocated but not constructed, so that
    // the individual items are not constructed until first pushed.
    struct chunk {
        T items[items_per_chunk];
        struct chunk* next;
        // begin and end interpreted mod items_per_chunk
        unsigned begin;
        unsigned end;
    };
    // We pop from the chunk at _front_chunk. This chunk is then linked to
    // the following chunks via the "next" link. _back_chunk points to the
    // last chunk in this list, and it is where we push.
    chunk* _front_chunk = nullptr; // where we pop
    chunk* _back_chunk = nullptr; // where we push
    // We want an O(1) size but don't want to maintain a size() counter
    // because this will slow down every push and pop operation just for
    // the rare size() call. Instead, we just keep a count of chunks (which
    // doesn't change on every push or pop), from which we can calculate
    // size() when needed, and still be O(1).
    // This assumes the invariant that all middle chunks (except the front
    // and back) are always full.
    size_t _nchunks = 0;
    // A list of freed chunks, to support reserve() and to improve
    // performance of repeated push and pop, especially on an empty queue.
    // It is a performance/memory tradeoff how many freed chunks to keep
    // here (see save_free_chunks constant below).
    chunk* _free_chunks = nullptr;
    size_t _nfree_chunks = 0;
public:
    using value_type = T;
    using size_type = size_t;
    using reference = T&;
    using pointer = T*;
    using const_reference = const T&;
    using const_pointer = const T*;
public:
    chunked_fifo() = default;
    chunked_fifo(chunked_fifo&& x) noexcept;
    chunked_fifo(const chunked_fifo& X) = delete;
    ~chunked_fifo();
    chunked_fifo& operator=(const chunked_fifo&) = delete;
    chunked_fifo& operator=(chunked_fifo&&) noexcept;
    inline void push_back(const T& data);
    inline void push_back(T&& data);
    T& back();
    const T& back() const;
    template <typename... A>
    inline void emplace_back(A&&... args);
    inline T& front() const noexcept;
    inline void pop_front() noexcept;
    inline bool empty() const noexcept;
    inline size_t size() const noexcept;
    void clear() noexcept;
    // reserve(n) ensures that at least (n - size()) further push() calls can
    // be served without needing new memory allocation.
    // Calling pop()s between these push()es is also allowed and does not
    // alter this guarantee.
    // Note that reserve() does not reduce the amount of memory already
    // reserved - use shrink_to_fit() for that.
    void reserve(size_t n);
    // shrink_to_fit() frees memory held, but unused, by the queue. Such
    // unused memory might exist after pops, or because of reserve().
    void shrink_to_fit();
private:
    void back_chunk_new();
    void front_chunk_delete() noexcept;
    inline void ensure_room_back();
    void undo_room_back();
    inline size_t mask(size_t idx) const noexcept;

};

template <typename T, size_t items_per_chunk>
inline
chunked_fifo<T, items_per_chunk>::chunked_fifo(chunked_fifo&& x) noexcept
        : _front_chunk(x._front_chunk)
        , _back_chunk(x._back_chunk)
        , _nchunks(x._nchunks)
        , _free_chunks(x._free_chunks)
        , _nfree_chunks(x._nfree_chunks) {
    x._front_chunk = nullptr;
    x._back_chunk = nullptr;
    x._nchunks = 0;
    x._free_chunks = nullptr;
    x._nfree_chunks = 0;
}

template <typename T, size_t items_per_chunk>
inline
chunked_fifo<T, items_per_chunk>&
chunked_fifo<T, items_per_chunk>::operator=(chunked_fifo&& x) noexcept {
    if (&x != this) {
        this->~chunked_fifo();
        new (this) chunked_fifo(std::move(x));
    }
    return *this;
}

template <typename T, size_t items_per_chunk>
inline size_t
chunked_fifo<T, items_per_chunk>::mask(size_t idx) const noexcept {
    return idx & (items_per_chunk - 1);
}

template <typename T, size_t items_per_chunk>
inline bool
chunked_fifo<T, items_per_chunk>::empty() const noexcept {
    return _front_chunk == nullptr;
}

template <typename T, size_t items_per_chunk>
inline size_t
chunked_fifo<T, items_per_chunk>::size() const noexcept{
    if (_front_chunk == nullptr) {
        return 0;
    } else if (_back_chunk == _front_chunk) {
        // Single chunk.
        return _front_chunk->end - _front_chunk->begin;
    } else {
        return _front_chunk->end - _front_chunk->begin
                +_back_chunk->end - _back_chunk->begin
                + (_nchunks - 2) * items_per_chunk;
    }
}

template <typename T, size_t items_per_chunk>
void chunked_fifo<T, items_per_chunk>::clear() noexcept {
#if 1
    while (!empty()) {
        pop_front();
    }
#else
    // This is specialized code to free the contents of all the chunks and the
    // chunks themselves. but since destroying a very full queue is not an
    // important use case to optimize, the simple loop above is preferable.
    if (!_front_chunk) {
        // Empty, nothing to do
        return;
    }
    // Delete front chunk (partially filled)
    for (auto i = _front_chunk->begin; i != _front_chunk->end; ++i) {
        _front_chunk->items[mask(i)].~T();
    }
    chunk *p = _front_chunk->next;
    operator delete(_front_chunk, sizeof(chunk));
    // Delete all the middle chunks (all completely filled)
    if (p) {
        while (p != _back_chunk) {
            // These are full chunks
            chunk *nextp = p->next;
            for (auto i = 0; i != items_per_chunk; ++i) {
                // Note we delete out of order (we don't start with p->begin).
                // That should be fine..
                p->items[i].~T();
        }
            operator delete(p, sizeof(chunk));
            p = nextp;
        }
        // Finally delete back chunk (partially filled)
        for (auto i = _back_chunk->begin; i != _back_chunk->end; ++i) {
            _back_chunk->items[mask(i)].~T();
        }
        operator delete(_back_chunk, sizeof(chunk));
    }
    _front_chunk = nullptr;
    _back_chunk = nullptr;
    _nchunks = 0;
#endif
}

template <typename T, size_t items_per_chunk> void
chunked_fifo<T, items_per_chunk>::shrink_to_fit() {
    while (_free_chunks) {
        auto next = _free_chunks->next;
        operator delete(_free_chunks, sizeof(chunk));
        _free_chunks = next;
    }
    _nfree_chunks = 0;
}

template <typename T, size_t items_per_chunk>
chunked_fifo<T, items_per_chunk>::~chunked_fifo() {
    clear();
    shrink_to_fit();
}

template <typename T, size_t items_per_chunk>
void
chunked_fifo<T, items_per_chunk>::back_chunk_new() {
    chunk *old = _back_chunk;
    if (_free_chunks) {
        _back_chunk = _free_chunks;
        _free_chunks = _free_chunks->next;
        --_nfree_chunks;
    } else {
        _back_chunk = static_cast<chunk*>(operator new(sizeof(chunk)));
    }
    _back_chunk->next = nullptr;
    _back_chunk->begin = 0;
    _back_chunk->end = 0;
    if (old) {
        old->next = _back_chunk;
    }
    if (_front_chunk == nullptr) {
        _front_chunk = _back_chunk;
    }
    _nchunks++;
}

template <typename T, size_t items_per_chunk>
inline void
chunked_fifo<T, items_per_chunk>::ensure_room_back() {
    // If we don't have a back chunk or it's full, we need to create a new one
    if (_back_chunk == nullptr ||
            (_back_chunk->end - _back_chunk->begin) == items_per_chunk) {
        back_chunk_new();
    }
}

template <typename T, size_t items_per_chunk>
void
chunked_fifo<T, items_per_chunk>::undo_room_back() {
    // If we failed creating a new item after ensure_room_back() created a
    // new empty chunk, we must remove it, or empty() will be incorrect
    // (either immediately, if the fifo was empty, or when all the items are
    // popped, if it already had items).
    if (_back_chunk->begin == _back_chunk->end) {
        operator delete(_back_chunk, sizeof(chunk));
        --_nchunks;
        if (_nchunks == 0) {
            _back_chunk = nullptr;
            _front_chunk = nullptr;
        } else {
            // Because we don't usually pop from the back, we don't have a "prev"
            // pointer so we need to find the previous chunk the hard and slow
            // way. B
            chunk *old = _back_chunk;
            _back_chunk = _front_chunk;
            while (_back_chunk->next != old) {
                _back_chunk = _back_chunk->next;
            }
            _back_chunk->next = nullptr;
        }
    }

}

template <typename T, size_t items_per_chunk>
template <typename... Args>
inline void
chunked_fifo<T, items_per_chunk>::emplace_back(Args&&... args) {
    ensure_room_back();
    auto p = &_back_chunk->items[mask(_back_chunk->end)];
    try {
        new(p) T(std::forward<Args>(args)...);
    } catch(...) {
        undo_room_back();
        throw;
    }
    ++_back_chunk->end;
}

template <typename T, size_t items_per_chunk>
inline void
chunked_fifo<T, items_per_chunk>::push_back(const T& data) {
    ensure_room_back();
    auto p = &_back_chunk->items[mask(_back_chunk->end)];
    try {
        new(p) T(data);
    } catch(...) {
        undo_room_back();
        throw;
    }
    ++_back_chunk->end;
}

template <typename T, size_t items_per_chunk>
inline void
chunked_fifo<T, items_per_chunk>::push_back(T&& data) {
    ensure_room_back();
    auto p = &_back_chunk->items[mask(_back_chunk->end)];
    try {
        new(p) T(std::move(data));
    } catch(...) {
        undo_room_back();
        throw;
    }
    ++_back_chunk->end;
}

template <typename T, size_t items_per_chunk>
inline
T&
chunked_fifo<T, items_per_chunk>::back() {
    return _back_chunk->items[mask(_back_chunk->end - 1)];
}

template <typename T, size_t items_per_chunk>
inline
const T&
chunked_fifo<T, items_per_chunk>::back() const {
    return _back_chunk->items[mask(_back_chunk->end - 1)];
}

template <typename T, size_t items_per_chunk>
inline T&
chunked_fifo<T, items_per_chunk>::front() const noexcept {
    return _front_chunk->items[mask(_front_chunk->begin)];
}

template <typename T, size_t items_per_chunk>
inline void
chunked_fifo<T, items_per_chunk>::front_chunk_delete() noexcept {
    chunk *next = _front_chunk->next;
    // Certain use cases may need to repeatedly allocate and free a chunk -
    // an obvious example is an empty queue to which we push, and then pop,
    // repeatedly. Another example is pushing and popping to a non-empty queue
    // we push and pop at different chunks so we need to free and allocate a
    // chunk every items_per_chunk operations.
    // The solution is to keep a list of freed chunks instead of freeing them
    // immediately. There is a performance/memory tradeoff of how many freed
    // chunks to save: If we save them all, the queue can never shrink from
    // its maximum memory use (this is how circular_buffer behaves).
    // The ad-hoc choice made here is to limit the number of saved chunks to 1,
    // but this could easily be made a configuration option.
    static constexpr int save_free_chunks = 1;
    if (_nfree_chunks < save_free_chunks) {
        _front_chunk->next = _free_chunks;
        _free_chunks = _front_chunk;
        ++_nfree_chunks;
    } else {
        operator delete(_front_chunk, sizeof(chunk));
    }
    // If we only had one chunk, _back_chunk is gone too.
    if (_back_chunk == _front_chunk) {
        _back_chunk = nullptr;
    }
    _front_chunk = next;
    --_nchunks;
}

template <typename T, size_t items_per_chunk>
inline void
chunked_fifo<T, items_per_chunk>::pop_front() noexcept {
    front().~T();
    // If the front chunk has become empty, we need to free remove it and use
    // the next one.
    if (++_front_chunk->begin == _front_chunk->end) {
        front_chunk_delete();
    }
}

template <typename T, size_t items_per_chunk>
void chunked_fifo<T, items_per_chunk>::reserve(size_t n) {
    // reserve() guarantees that (n - size()) additional push()es will
    // succeed without reallocation:
    size_t need = n - size();
    // If we already have a back chunk, it might have room for some pushes
    // before filling up, so decrease "need":
    if (_back_chunk) {
        need -= items_per_chunk - (_back_chunk->end - _back_chunk->begin);
    }
    size_t needed_chunks = (need + items_per_chunk - 1) / items_per_chunk;
    // If we already have some freed chunks saved, we need to allocate fewer
    // additional chunks, or none at all
    if (needed_chunks <= _nfree_chunks) {
        return;
    }
    needed_chunks -= _nfree_chunks;
    while (needed_chunks--) {
        chunk *c = static_cast<chunk*>(operator new(sizeof(chunk)));
        c->next = _free_chunks;
        _free_chunks = c;
        ++_nfree_chunks;
    }
}


text:
define([
        '../Core/defaultValue',
        '../Core/defined',
        '../Core/defineProperties',
        '../Core/DeveloperError',
        '../Core/Event',
        './createMaterialPropertyDescriptor',
        './createPropertyDescriptor'
    ], function(
        defaultValue,
        defined,
        defineProperties,
        DeveloperError,
        Event,
        createMaterialPropertyDescriptor,
        createPropertyDescriptor) {
    'use strict';

    /**
     * Describes a polygon defined by an hierarchy of linear rings which make up the outer shape and any nested holes.
     * The polygon conforms to the curvature of the globe and can be placed on the surface or
     * at altitude and can optionally be extruded into a volume.
     *
     * @alias PolygonGraphics
     * @constructor
     *
     * @param {Object} [options] Object with the following properties:
     * @param {Property} [options.hierarchy] A Property specifying the {@link PolygonHierarchy}.
     * @param {Property} [options.height=0] A numeric Property specifying the altitude of the polygon relative to the ellipsoid surface.
     * @param {Property} [options.heightReference] A Property specifying what the height is relative to.
     * @param {Property} [options.extrudedHeight] A numeric Property specifying the altitude of the polygon's extruded face relative to the ellipsoid surface.
     * @param {Property} [options.extrudedHeightReference] A Property specifying what the extrudedHeight is relative to.
     * @param {Property} [options.show=true] A boolean Property specifying the visibility of the polygon.
     * @param {Property} [options.fill=true] A boolean Property specifying whether the polygon is filled with the provided material.
     * @param {MaterialProperty} [options.material=Color.WHITE] A Property specifying the material used to fill the polygon.
     * @param {Property} [options.outline=false] A boolean Property specifying whether the polygon is outlined.
     * @param {Property} [options.outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline.
     * @param {Property} [options.outlineWidth=1.0] A numeric Property specifying the width of the outline.
     * @param {Property} [options.stRotation=0.0] A numeric property specifying the rotation of the polygon texture counter-clockwise from north.
     * @param {Property} [options.granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the angular distance between each latitude and longitude point.
     * @param {Property} [options.perPositionHeight=false] A boolean specifying whether or not the the height of each position is used.
     * @param {Boolean} [options.closeTop=true] When false, leaves off the top of an extruded polygon open.
     * @param {Boolean} [options.closeBottom=true] When false, leaves off the bottom of an extruded polygon open.
     * @param {Property} [options.shadows=ShadowMode.DISABLED] An enum Property specifying whether the polygon casts or receives shadows from each light source.
     * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this polygon will be displayed.
     * @param {ConstantProperty} [options.zIndex=0] A property specifying the zIndex used for ordering ground geometry.  Only has an effect if the polygon is constant and neither height or extrudedHeight are specified.
     *
     * @see Entity
     * @demo {@link https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Polygon.html|Cesium Sandcastle Polygon Demo}
     */
    function PolygonGraphics(options) {
        this._show = undefined;
        this._showSubscription = undefined;
        this._material = undefined;
        this._materialSubscription = undefined;
        this._hierarchy = undefined;
        this._hierarchySubscription = undefined;
        this._height = undefined;
        this._heightSubscription = undefined;
        this._heightReference = undefined;
        this._heightReferenceSubscription = undefined;
        this._extrudedHeight = undefined;
        this._extrudedHeightSubscription = undefined;
        this._extrudedHeightReference = undefined;
        this._extrudedHeightReferenceSubscription = undefined;
        this._granularity = undefined;
        this._granularitySubscription = undefined;
        this._stRotation = undefined;
        this._stRotationSubscription = undefined;
        this._perPositionHeight = undefined;
        this._perPositionHeightSubscription = undefined;
        this._outline = undefined;
        this._outlineSubscription = undefined;
        this._outlineColor = undefined;
        this._outlineColorSubscription = undefined;
        this._outlineWidth = undefined;
        this._outlineWidthSubscription = undefined;
        this._fill = undefined;
        this._fillSubscription = undefined;
        this._closeTop = undefined;
        this._closeTopSubscription = undefined;
        this._closeBottom = undefined;
        this._closeBottomSubscription = undefined;
        this._shadows = undefined;
        this._shadowsSubscription = undefined;
        this._distanceDisplayCondition = undefined;
        this._distanceDisplayConditionSubscription = undefined;
        this._classificationType = undefined;
        this._classificationTypeSubscription = undefined;
        this._zIndex = undefined;
        this._zIndexSubscription = undefined;
        this._definitionChanged = new Event();

        this.merge(defaultValue(options, defaultValue.EMPTY_OBJECT));
    }

    defineProperties(PolygonGraphics.prototype, {
        /**
         * Gets the event that is raised whenever a property or sub-property is changed or modified.
         * @memberof PolygonGraphics.prototype
         *
         * @type {Event}
         * @readonly
         */
        definitionChanged : {
            get : function() {
                return this._definitionChanged;
            }
        },

        /**
         * Gets or sets the boolean Property specifying the visibility of the polygon.
         * @memberof PolygonGraphics.prototype
         * @type {Property}
         * @default true
         */
        show : createPropertyDescriptor('show'),

        /**
         * Gets or sets the Property specifying the material used to fill the polygon.
         * @memberof PolygonGraphics.prototype
         * @type {MaterialProperty}
         * @default Color.WHITE
         */
        material : createMaterialPropertyDescriptor('material'),

        /**
         * Gets or sets the Property specifying the {@link PolygonHierarchy}.
         * @memberof PolygonGraphics.prototype
         * @type {Property}
         */
        hierarchy : createPropertyDescriptor('hierarchy'),

        /**
         * Gets or sets the numeric Property specifying the constant altitude of the polygon.
         * @memberof PolygonGraphics.prototype
         * @type {Property}
         * @default 0.0
         */
        height : createPropertyDescriptor('height'),

        /**
         * Gets or sets the Property specifying the {@link HeightReference}.
         * @memberof PolygonGraphics.prototype
         * @type {Property}
         * @default HeightReference.NONE
         */
        heightReference : createPropertyDescriptor('heightReference'),

        /**
         * Gets or sets the numeric Property specifying the altitude of the polygon extrusion.
         * If {@link PolygonGraphics#perPositionHeight} is false, the volume starts at {@link PolygonGraphics#height} and ends at this altitude.
         * If {@link PolygonGraphics#perPositionHeight} is true, the volume starts at the height of each {@link PolygonGraphics#hierarchy} position and ends at this altitude.
         * @memberof PolygonGraphics.prototype
         * @type {Property}
         */
        extrudedHeight : createPropertyDescriptor('extrudedHeight'),

        /**
         * Gets or sets the Property specifying the extruded {@link HeightReference}.
         * @memberof PolygonGraphics.prototype
         * @type {Property}
         * @default HeightReference.NONE
         */
        extrudedHeightReference : createPropertyDescriptor('extrudedHeightReference'),

        /**
         * Gets or sets the numeric Property specifying the angular distance between points on the polygon.
         * @memberof PolygonGraphics.prototype
         * @type {Property}
         * @default {CesiumMath.RADIANS_PER_DEGREE}
         */
        granularity : createPropertyDescriptor('granularity'),

        /**
         * Gets or sets the numeric property specifying the rotation of the polygon texture counter-clockwise from north.
         * @memberof PolygonGraphics.prototype
         * @type {Property}
         * @default 0
         */
        stRotation : createPropertyDescriptor('stRotation'),

        /**
         * Gets or sets the boolean Property specifying whether the polygon is filled with the provided material.
         * @memberof PolygonGraphics.prototype
         * @type {Property}
         * @default true
         */
        fill : createPropertyDescriptor('fill'),

        /**
         * Gets or sets the Property specifying whether the polygon is outlined.
         * @memberof PolygonGraphics.prototype
         * @type {Property}
         * @default false
         */
        outline : createPropertyDescriptor('outline'),

        /**
         * Gets or sets the Property specifying the {@link Color} of the outline.
         * @memberof PolygonGraphics.prototype
         * @type {Property}
         * @default Color.BLACK
         */
        outlineColor : createPropertyDescriptor('outlineColor'),

        /**
         * Gets or sets the numeric Property specifying the width of the outline.
         * @memberof PolygonGraphics.prototype
         * @type {Property}
         * @default 1.0
         */
        outlineWidth : createPropertyDescriptor('outlineWidth'),

        /**
         * Gets or sets the boolean specifying whether or not the the height of each position is used.
         * If true, the shape will have non-uniform altitude defined by the height of each {@link PolygonGraphics#hierarchy} position.
         * If false, the shape will have a constant altitude as specified by {@link PolygonGraphics#height}.
         * @memberof PolygonGraphics.prototype
         * @type {Property}
         */
        perPositionHeight : createPropertyDescriptor('perPositionHeight'),

        /**
         * Gets or sets a boolean specifying whether or not the top of an extruded polygon is included.
         * @memberof PolygonGraphics.prototype
         * @type {Property}
         */
        closeTop : createPropertyDescriptor('closeTop'),

        /**
         * Gets or sets a boolean specifying whether or not the bottom of an extruded polygon is included.
         * @memberof PolygonGraphics.prototype
         * @type {Property}
         */
        closeBottom : createPropertyDescriptor('closeBottom'),

        /**
         * Get or sets the enum Property specifying whether the polygon
         * casts or receives shadows from each light source.
         * @memberof PolygonGraphics.prototype
         * @type {Property}
         * @default ShadowMode.DISABLED
         */
        shadows : createPropertyDescriptor('shadows'),

        /**
         * Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this polygon will be displayed.
         * @memberof PolygonGraphics.prototype
         * @type {Property}
         */
        distanceDisplayCondition : createPropertyDescriptor('distanceDisplayCondition'),

        /**
         * Gets or sets the {@link ClassificationType} Property specifying whether this polygon will classify terrain, 3D Tiles, or both when on the ground.
         * @memberof PolygonGraphics.prototype
         * @type {Property}
         * @default ClassificationType.TERRAIN
         */
        classificationType : createPropertyDescriptor('classificationType'),

        /**
         * Gets or sets the zIndex Prperty specifying the ordering of ground geometry.  Only has an effect if the polygon is constant and neither height or extrudedHeight are specified.
         * @memberof PolygonGraphics.prototype
         * @type {ConstantProperty}
         * @default 0
         */
        zIndex : createPropertyDescriptor('zIndex')
    });

    /**
     * Duplicates this instance.
     *
     * @param {PolygonGraphics} [result] The object onto which to store the result.
     * @returns {PolygonGraphics} The modified result parameter or a new instance if one was not provided.
     */
    PolygonGraphics.prototype.clone = function(result) {
        if (!defined(result)) {
            return new PolygonGraphics(this);
        }
        result.show = this.show;
        result.material = this.material;
        result.hierarchy = this.hierarchy;
        result.height = this.height;
        result.heightReference = this.heightReference;
        result.extrudedHeight = this.extrudedHeight;
        result.extrudedHeightReference = this.extrudedHeightReference;
        result.granularity = this.granularity;
        result.stRotation = this.stRotation;
        result.fill = this.fill;
        result.outline = this.outline;
        result.outlineColor = this.outlineColor;
        result.outlineWidth = this.outlineWidth;
        result.perPositionHeight = this.perPositionHeight;
        result.closeTop = this.closeTop;
        result.closeBottom = this.closeBottom;
        result.shadows = this.shadows;
        result.distanceDisplayCondition = this.distanceDisplayCondition;
        result.classificationType = this.classificationType;
        result.zIndex = this.zIndex;

        return result;
    };

    /**
     * Assigns each unassigned property on this object to the value
     * of the same property on the provided source object.
     *
     * @param {PolygonGraphics} source The object to be merged into this object.
     */
    PolygonGraphics.prototype.merge = function(source) {
        //>>includeStart('debug', pragmas.debug);
        if (!defined(source)) {
            throw new DeveloperError('source is required.');
        }
        //>>includeEnd('debug');

        this.show = defaultValue(this.show, source.show);
        this.material = defaultValue(this.material, source.material);
        this.hierarchy = defaultValue(this.hierarchy, source.hierarchy);
        this.height = defaultValue(this.height, source.height);
        this.heightReference = defaultValue(this.heightReference, source.heightReference);
        this.extrudedHeight = defaultValue(this.extrudedHeight, source.extrudedHeight);
        this.extrudedHeightReference = defaultValue(this.extrudedHeightReference,  source.extrudedHeightReference);
        this.granularity = defaultValue(this.granularity, source.granularity);
        this.stRotation = defaultValue(this.stRotation, source.stRotation);
        this.fill = defaultValue(this.fill, source.fill);
        this.outline = defaultValue(this.outline, source.outline);
        this.outlineColor = defaultValue(this.outlineColor, source.outlineColor);
        this.outlineWidth = defaultValue(this.outlineWidth, source.outlineWidth);
        this.perPositionHeight = defaultValue(this.perPositionHeight, source.perPositionHeight);
        this.closeTop = defaultValue(this.closeTop, source.closeTop);
        this.closeBottom = defaultValue(this.closeBottom, source.closeBottom);
        this.shadows = defaultValue(this.shadows, source.shadows);
        this.distanceDisplayCondition = defaultValue(this.distanceDisplayCondition, source.distanceDisplayCondition);
        this.classificationType = defaultValue(this.classificationType, source.classificationType);
        this.zIndex = defaultValue(this.zIndex, source.zIndex);
    };

    return PolygonGraphics;
});


text:
using csly.whileLang.model;

namespace csly.whileLang.compiler
{
    public class SemanticChecker
    {
        private ExpressionTyper expressionTyper;

        public CompilerContext SemanticCheck(WhileAST ast, bool isQuiet = false)
        {
            expressionTyper = new ExpressionTyper();
            var context = new CompilerContext();
            context.IsQuiet = isQuiet;
            return SemanticCheck(ast, context);
        }

        private CompilerContext SemanticCheck(WhileAST ast, CompilerContext context)
        {
            if (ast is AssignStatement assign) SemanticCheck(assign, context);
            if (ast is SequenceStatement seq) SemanticCheck(seq, context);
            if (ast is SkipStatement skip)
            {
                //SemanticCheck(skip, context);
            }

            if (ast is PrintStatement print) SemanticCheck(print, context);
            if (ast is ReturnStatement ret) SemanticCheck(ret, context);
            if (ast is IfStatement si) SemanticCheck(si, context);
            if (ast is WhileStatement tantque) SemanticCheck(tantque, context);
            return context;
        }

        private void SemanticCheck(AssignStatement ast, CompilerContext context)
        {
            var valType = expressionTyper.TypeExpression(ast.Value, context);
            var varExists = context.VariableExists(ast.VariableName);
            //ast.CompilerScope = context.CurrentScope;
            if (varExists)
            {
                var varType = context.GetVariableType(ast.VariableName);
                if (varType != valType) throw new TypingException($"bad assignment : {valType} expecting {varType}");
            }
            else
            {
                var creation = context.SetVariableType(ast.VariableName, valType);
                ast.IsVariableCreation = creation;
                ast.CompilerScope = context.CurrentScope;
            }
        }

        private void SemanticCheck(PrintStatement ast, CompilerContext context)
        {
            var val = expressionTyper.TypeExpression(ast.Value, context);
        }

        private void SemanticCheck(ReturnStatement ast, CompilerContext context)
        {
            var valType = expressionTyper.TypeExpression(ast.Value, context);
            if (valType != WhileType.INT) throw new TypingException($"bad return type : {valType} expecting INT");
        }

        private void SemanticCheck(SequenceStatement ast, CompilerContext context)
        {
            context.OpenNewScope();
            ast.CompilerScope = context.CurrentScope;
            for (var i = 0; i < ast.Count; i++)
            {
                var stmt = ast.Get(i);
                SemanticCheck(stmt, context);
            }

            context.CloseScope();
        }

        private void SemanticCheck(IfStatement ast, CompilerContext context)
        {
            var val = expressionTyper.TypeExpression(ast.Condition, context);
            if (val != WhileType.BOOL)
                throw new SignatureException($"invalid condition type {ast.Condition.Dump("")} at {ast.Position}");
            ast.CompilerScope = context.CurrentScope;

            context.OpenNewScope();
            SemanticCheck(ast.ThenStmt,context);
            context.CloseScope();

            context.OpenNewScope();
            SemanticCheck(ast.ElseStmt,context);
            context.CloseScope();
        }

        private void SemanticCheck(WhileStatement ast, CompilerContext context)
        {
            var cond = expressionTyper.TypeExpression(ast.Condition, context);
            if (cond != WhileType.BOOL)
                throw new SignatureException($"invalid condition type {ast.Condition.Dump("")} at {ast.Position}");
            ast.CompilerScope = context.CurrentScope;

            context.OpenNewScope();
            SemanticCheck(ast.BlockStmt, context);
            context.CloseScope();
        }
    }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Annls Sci. Nat. , Bot. , sér. 4 3: 119 (1855)

#### Original name
Hypoxylon scriblita Mont.

### Remarks
null


text:
FROM openjdk:8-jre

WORKDIR /srv
RUN /usr/bin/env curl -sS -D - http://dynamodb-local.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest \
	| grep '^Location: ' | cut -d' ' -f 2 > dynamodb.url
RUN /usr/bin/env curl -L http://dynamodb-local.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest | /bin/tar xz

COPY bin/* /usr/local/bin/
CMD dynamodb


text:
package org.apache.hadoop.hbase.tmpl.master;

// 21, 1
import org.apache.hadoop.hbase.HRegionInfo;
// 22, 1
import org.apache.hadoop.hbase.master.AssignmentManager;
// 23, 1
import org.apache.hadoop.hbase.master.AssignmentManager.RegionState;
// 24, 1
import java.util.Iterator;
// 25, 1
import java.util.Map;

@org.jamon.annotations.Template(
  signature = "3C49EE1B6C5A45F59779801683F3057B",
  requiredArguments = {
    @org.jamon.annotations.Argument(name = "assignmentManager", type = "AssignmentManager")},
  optionalArguments = {
    @org.jamon.annotations.Argument(name = "limit", type = "int")})
public class AssignmentManagerStatusTmpl
  extends org.jamon.AbstractTemplateProxy
{

  public AssignmentManagerStatusTmpl(org.jamon.TemplateManager p_manager)
  {
     super(p_manager);
  }

  public AssignmentManagerStatusTmpl()
  {
     super("/org/apache/hadoop/hbase/tmpl/master/AssignmentManagerStatusTmpl");
  }

  protected interface Intf
    extends org.jamon.AbstractTemplateProxy.Intf{

    void renderNoFlush(final java.io.Writer jamonWriter) throws java.io.IOException;

  }
  public static class ImplData
    extends org.jamon.AbstractTemplateProxy.ImplData
  {
    // 28, 1
    public void setAssignmentManager(AssignmentManager assignmentManager)
    {
      // 28, 1
      m_assignmentManager = assignmentManager;
    }
    public AssignmentManager getAssignmentManager()
    {
      return m_assignmentManager;
    }
    private AssignmentManager m_assignmentManager;
    // 29, 1
    public void setLimit(int limit)
    {
      // 29, 1
      m_limit = limit;
      m_limit__IsNotDefault = true;
    }
    public int getLimit()
    {
      return m_limit;
    }
    private int m_limit;
    public boolean getLimit__IsNotDefault()
    {
      return m_limit__IsNotDefault;
    }
    private boolean m_limit__IsNotDefault;
  }
  @Override
  protected ImplData makeImplData()
  {
    return new ImplData();
  }
  @Override @SuppressWarnings("unchecked") public ImplData getImplData()
  {
    return (ImplData) super.getImplData();
  }

  protected int limit;
  public final org.apache.hadoop.hbase.tmpl.master.AssignmentManagerStatusTmpl setLimit(int p_limit)
  {
    (getImplData()).setLimit(p_limit);
    return this;
  }

  @Override
  public org.jamon.AbstractTemplateImpl constructImpl(Class<? extends org.jamon.AbstractTemplateImpl> p_class){
    try
    {
      return p_class
        .getConstructor(new Class [] { org.jamon.TemplateManager.class, ImplData.class })
        .newInstance(new Object [] { getTemplateManager(), getImplData()});
    }
    catch (RuntimeException e)
    {
      throw e;
    }
    catch (Exception e)
    {
      throw new RuntimeException(e);
    }
  }

  @Override
  protected org.jamon.AbstractTemplateImpl constructImpl(){
    return new AssignmentManagerStatusTmplImpl(getTemplateManager(), getImplData());
  }
  public org.jamon.Renderer makeRenderer(final AssignmentManager assignmentManager)
  {
    return new org.jamon.AbstractRenderer() {
      @Override
      public void renderTo(final java.io.Writer jamonWriter)
        throws java.io.IOException
      {
        render(jamonWriter, assignmentManager);
      }
    };
  }

  public void render(final java.io.Writer jamonWriter, final AssignmentManager assignmentManager)
    throws java.io.IOException
  {
    renderNoFlush(jamonWriter, assignmentManager);
    jamonWriter.flush();
  }
  public void renderNoFlush(final java.io.Writer jamonWriter, final AssignmentManager assignmentManager)
    throws java.io.IOException
  {
    ImplData implData = getImplData();
    implData.setAssignmentManager(assignmentManager);
    Intf instance = (Intf) getTemplateManager().constructImpl(this);
    instance.renderNoFlush(jamonWriter);
    reset();
  }

}


text:
<?php include_once APPPATH . 'views/templates/header.php';?>

Cargar fichas

				<?php echo form_open_multipart('Fichas/importar_fichas2');?>

					Seleccione un demandante
					<?php echo form_dropdown('demandante_id', $demandantes, '' ,array('class' => 'form-control','required' => 'true')) ?>

					Seleccione archivo para la carga
					<input type="file" name="file" size="20" />

				<?= form_hidden ( 'process', TRUE );?>
				<input type="submit" value="Cargar" class="btn btn-primary"/>


text:
-- +goose Up
-- SQL in section 'Up' is executed when this migration is applied
alter table deliveryservice add geolimit_redirect_url varchar(255) default NULL;

-- +goose Down
-- SQL section 'Down' is executed when this migration is rolled back
alter table deliveryservice drop column geolimit_redirect_url;


text:
package com.viva.vivalistening.data;

public interface IDataSource {

	public void setTotalTime(int nTotalTime);
	public int getTotalTime();

	public int getDayTimeItemCount();
	public DayTimeItem getDayTimeItem(int index);
	public void addDayTimeItem(DayTimeItem item);

	public int getListeningItemCount();
	public ListeningItem getListeningItem(int index);
	public void addListeningItem(ListeningItem item);
}


text:
=head1 LICENSE

See the NOTICE file distributed with this work for additional information
regarding copyright ownership.

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.

=cut

=head1 CONTACT

  Please email comments or questions to the public Ensembl
  developers list at <http://lists.ensembl.org/mailman/listinfo/dev>.

  Questions may also be sent to the Ensembl help desk at
  <http://www.ensembl.org/Help/Contact>.

=head1 NAME

Bio::EnsEMBL::Compara::RunnableDB::GeneTrees::PantherParalogs

=head1 DESCRIPTION

Like OtherParalogs, this analysis will load a super gene tree and insert
the extra paralogs into the homology tables. The difference is that it does
not care about node-types, duplication confidence scores, etc and does not
require the super-tree to be binary.

=head1 AUTHORSHIP

Ensembl Team. Individual contributions can be found in the GIT log.

=head1 APPENDIX

The rest of the documentation details each of the object methods.
Internal methods are usually preceded with an underscore (_)

=cut

package Bio::EnsEMBL::Compara::RunnableDB::GeneTrees::PantherParalogs;

use strict;
use warnings;

use Bio::EnsEMBL::Compara::Graph::Link;

use base ('Bio::EnsEMBL::Compara::RunnableDB::GeneTrees::OtherParalogs');

# Just override rec_add_paralogs to allow multifurcations and not bother
# about the node annotation. OtherParalogs does the rest.
sub rec_add_paralogs {
    my $self = shift;
    my $ancestor = shift;

    # Skip the terminal nodes
    return 0 unless $ancestor->get_child_count;

    my $ngenepairlinks = 0;

    # Iterate over all pairs of children
    my @children = @{$ancestor->children};
    while (@children) {
        my $child1 = shift @children;
        foreach my $child2 (@children) {

            # Paralogues
            my $n_para = $self->add_other_paralogs_for_pair($ancestor, $child1, $child2);
            $ngenepairlinks += $n_para;

            # When checking all the genome_db_ids we should find some paralogues
            unless ($n_para or $self->param('genome_db_id')) {
                # If not, the sub-families are across different parts of the taxonomy and we are missing some orthologs. Let's add them !
                my $gene_hash1 = $child1->get_value_for_tag('gene_hash');
                my $gene_hash2 = $child2->get_value_for_tag('gene_hash');
                my $n_ortho = 0;
                foreach my $gdb_id1 (keys %$gene_hash1) {
                    foreach my $gdb_id2 (keys %$gene_hash2) {
                        # NOTE I feel like there is a risk of annotating 1-to-1 from the same gene to
                        # the same species several times, but it doesn't seem to happen in practice ...
                        next if $gdb_id1 == $gdb_id2;   # Orthologues are between different species
                        foreach my $gene1 (@{$gene_hash1->{$gdb_id1}}) {
                            foreach my $gene2 (@{$gene_hash2->{$gdb_id2}}) {
                                my $genepairlink = new Bio::EnsEMBL::Compara::Graph::Link($gene1, $gene2);
                                $genepairlink->add_tag("ancestor", $ancestor);
                                $genepairlink->add_tag("subtree1", $child1);
                                $genepairlink->add_tag("subtree2", $child2);
                                $self->tag_genepairlink($genepairlink, $self->tag_orthologues($genepairlink), 0);
                            }
                        }
                        $n_ortho += scalar(@{$gene_hash1->{$gdb_id1}}) * scalar(@{$gene_hash2->{$gdb_id2}});
                    }
                }
                $self->warning("Added $n_ortho orthologues between node_id=" . $child1->node_id . " and node_id=". $child2->node_id);
                $ngenepairlinks += $n_ortho;
            }
        }
    }
    foreach my $child (@{$ancestor->children}) {
        $ngenepairlinks += $self->rec_add_paralogs($child);
    }
    return $ngenepairlinks;
}

1;


text:
<?php
if (!headers_sent()) header('Content-Type: text/html; charset=UTF-8');
require_once __DIR__.'/../../../autoload.php';

if (file_exists(__DIR__ . '/../sandbox/c3.php')) {
    require __DIR__ . '/../sandbox/c3.php';
} else {
    require __DIR__ . '/../claypit/c3.php';
}

require_once('glue.php');
require_once('data.php');
require_once('controllers.php');

$urls = array(
    '/' => 'index',
    '/info' => 'info',
    '/cookies' => 'cookies',
    '/search.*' => 'search',
    '/login' => 'login',
    '/redirect' => 'redirect',
    '/facebook\??.*' => 'facebookController',
    '/form/(field|select|checkbox|file|textarea|hidden|complex|button|radio|select_multiple|empty|popup|example1|image)(#)?' => 'form',
    '/articles\??.*' => 'articles'
);

glue::stick($urls);


text:
<?php

/**  */
namespace Core\Form;

use Core\Entity\FileMetadata;
use Core\Service\FileManager;
use Interop\Container\ContainerInterface;
use Interop\Container\Exception\ContainerException;
use Laminas\Hydrator\HydratorPluginManager;
use Laminas\ServiceManager\Exception\ServiceNotCreatedException;
use Laminas\ServiceManager\Exception\ServiceNotFoundException;
use Laminas\ServiceManager\Factory\FactoryInterface;
use Laminas\ServiceManager\ServiceLocatorInterface;
use Core\Entity\Hydrator\EntityHydrator;
use Core\Entity\Hydrator\Strategy\FileUploadStrategy;
use Auth\Entity\AnonymousUser;
use Core\Entity\Hydrator\FileCollectionUploadHydrator;
use Laminas\Stdlib\AbstractOptions;

/**
 * Factory for creating file upload formular elements.
 *
 * @author Mathias Gelhausen <gelhausen@cross-solution.de>
 * @author Anthonius Munthi <me@itstoni.com>
 */
class FileUploadFactory implements FactoryInterface
{
    /**
     * Service name of the form element used.
     *
     * @var string
     */
    protected $fileElement = 'Core/FileUpload';

    /**
     * Name of the form element.
     *
     * @var string
     */
    protected $fileName = 'file';

    /**
     * Class name of the file entity to use.
     */
    protected $fileEntityClass = '\Core\Form\FileEntity';

    protected $fileMetadataClass = FileMetadata::class;

    /**
     * Should the factored element allow multiple files to be selected?
     *
     * @var bool
     */
    protected $multiple = false;

    /**
     * The config key in the FileUploadFactory configuration entry.
     * @var string
     */
    protected $configKey;

    /**
     * The configuration stored in the FileUploadFactory configuration entry under {@link $configKey}.
     *
     * @var array|null
     */
    protected $config;

    /**
     * Optional Module Options. eg. "Jobs/Options" or "Applications/Options"
     *
     * @var string|null
     */
    protected $options;

    public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
    {
        /* @var $formElementManager \Laminas\Form\FormElementManager\FormElement */
        $formElementManager = $container->get('FormElementManager');
        $options=null;
        if ($this->options) {
            $options = $container->get($this->options);
        }

        // Retrieve configuration.
        if ($this->configKey) {
            $config   = $container->get('config');
            $config   = isset($config['form_elements_config']['file_upload_factories'][$this->configKey])
                ? $config['form_elements_config']['file_upload_factories'][$this->configKey]
                : array();
            $this->config = $config;
        }

        $form = new Form();
        $formElementManager->injectFactory($formElementManager, $form);
        $form->add(
            array(
                'type' => $this->fileElement,
                'name' => $this->fileName,
                'options' => array(
                    /* @TODO: [ZF3] set this value to false will make upload field invisible in organization and user profile profile */
                    'use_formrow_helper' => true,
                ),
                'attributes' => array(
                    'class' => 'hide',
                ),
            )
        );
        /* @var $element \Core\Form\Element\FileUpload */
        $element = $form->get($this->fileName);
        $element->setIsMultiple($this->multiple);

        $user = $container->get('AuthenticationService')->getUser();

        if (isset($this->config['hydrator']) && $this->config['hydrator']) {
            /** @noinspection PhpUndefinedVariableInspection */
            $hydrator = $container->get('HydratorManager')->get($this->config['hydrator']);
        } else {
            /* @var $fileEntity \Core\Entity\FileInterface */
            /*
            $fileEntity = new $this->fileEntityClass();
            if ($user instanceof AnonymousUser) {
                $fileEntity->getMetadata()->getPermissions()->grant($user, 'all');
            } else {
                $fileEntity->getMetadata()->setUser($user);
            }*/
            $fileManager = $container->get(FileManager::class);
            $strategy = new FileUploadStrategy(
                $fileManager,
                $user,
                $this->fileMetadataClass,
                $this->fileEntityClass
            );
            if ($this->multiple) {
                $hydrator = new FileCollectionUploadHydrator($this->fileName, $strategy);
                $form->add(
                    array(
                        'type' => 'button',
                        'name' => 'remove',
                        'options' => array(
                            'label' => /*@translate*/ 'Remove all',
                        ),
                        'attributes' => array(
                            'class' => 'fu-remove-all btn btn-danger btn-xs pull-right'
                        ),
                    )
                );
            } else {
                $hydrator = new EntityHydrator();
                $hydrator->addStrategy($this->fileName, $strategy);
            }
        }

        $form->setHydrator($hydrator);
        $form->setOptions(array('use_files_array' => true));

        $this->configureForm($form, $options);
        return $form;
    }

    /**
     * The configuration from the FileUploadFactory configuration
     *
     * @param ServiceLocatorInterface $serviceLocator
     * @return Form
     */
    public function createService(ServiceLocatorInterface $serviceLocator)
    {
        return $this($serviceLocator, static::class);
    }

    /**
     * Configures the factored form.
     *
     * @param \Core\Form\Form $form
     * @param AbstractOptions $options
     */
    protected function configureForm($form, AbstractOptions $options)
    {
    }
}


text:
#ifndef _OS_TYPES_H_
#define _OS_TYPES_H_

#define DSM_VENDOR_ERROR_SHIFT (0)
#define DSM_MAILBOX_ERROR_SHIFT (16)
#define DSM_BACKGROUND_OP_STATE_SHIFT (24)
#define DSM_VENDOR_ERROR(status) ((status & 0xFFFF) >> DSM_VENDOR_ERROR_SHIFT)
#define DSM_EXTENDED_ERROR(status) ((status & 0xFFFF0000) >> DSM_MAILBOX_ERROR_SHIFT)
#define DSM_MAX_RETRIES 5

#define BUILD_DSM_OPCODE(Opcode, SubOpcode) (UINT32)(SubOpcode << 8 | Opcode)

#define COMMON_LOG_ENTRY()
#define COMMON_LOG_ERROR(error) \
	//printf(error "\n")

#define COMMON_LOG_EXIT_RETURN_I(rc)
#define COMMON_LOG_DEBUG_F(fmt, ...) \
	//printf(fmt "\n", __VA_ARGS__)

#define COMMON_LOG_ERROR_F(fmt, ...)\
	//printf(fmt "\n", __VA_ARGS__)

#define COMMON_LOG_DEBUG(str)
#define COMMON_LOG_EXIT()
#define COMMON_LOG_HANDOFF_F(fmt, ...)

enum bios_emulated_opcode {
	BIOS_EMULATED_COMMAND = 0xFD,
};

enum bios_emulated_command_subop {
	SUBOP_GET_PAYLOAD_SIZE = 0x00,
	SUBOP_WRITE_LARGE_PAYLOAD_INPUT = 0x01,
	SUBOP_READ_LARGE_PAYLOAD_OUTPUT = 0x02,
	SUBOP_GET_BOOT_STATUS = 0x03,
	SUBOP_EXTENDED_VENDOR_SPECIFIC_CMD = 0x05,
};

/*
* Error codes for the vendor specific DSM command
*/
enum dsm_vendor_error {
   DSM_VENDOR_SUCCESS = 0x0000,
   DSM_VENDOR_ERR_NOT_SUPPORTED = 0x0001,
   DSM_VENDOR_ERR_NONEXISTING = 0x0002,
   DSM_VENDOR_INVALID_INPUT = 0x0003,
   DSM_VENDOR_HW_ERR = 0x0004,
   DSM_VENDOR_RETRY_SUGGESTED = 0x0005,
   DSM_VENDOR_UNKNOWN = 0x0006,
   DSM_VENDOR_SPECIFIC_ERR = 0x0007,
};

#define DSM_ERROR(A)        (A != DSM_VENDOR_SUCCESS)
#define IN_MB_SIZE          (1 << 20)   //!< Size of the OS mailbox large input payload
#define OUT_MB_SIZE         (1 << 20)   //!< Size of the OS mailbox large output payload
#define IN_PAYLOAD_SIZE     (128)       //!< Total size of the input payload registers
#define OUT_PAYLOAD_SIZE    (128)       //!< Total size of the output payload registers

#define MB_COMPLETE 0x1
#define STATUS_MASK 0xFF

#pragma pack(push)
#pragma pack(1)
struct input_payload_smbus_os_passthru{
  unsigned char Opcode;
  unsigned char SubOpcode;
  unsigned char TransportInterface;
  unsigned char Reserved[5];
  unsigned int Timeout;
  unsigned char Data[IN_PAYLOAD_SIZE];
};
#pragma pack(pop)

// Additional bytes to deal with DSM calls
// Different name for now to avoid naming conflict, but same value as in FwUtility.h
#define IN_PAYLOAD_SIZE_EXT_PAD_OS (sizeof(struct input_payload_smbus_os_passthru) - IN_PAYLOAD_SIZE)

#pragma pack(push)
#pragma pack(1)
struct fw_cmd {
   unsigned int InputPayloadSize;
   unsigned int LargeInputPayloadSize;
   unsigned int OutputPayloadSize;
   unsigned int LargeOutputPayloadSize;
   unsigned char InputPayload[IN_PAYLOAD_SIZE + IN_PAYLOAD_SIZE_EXT_PAD_OS];
   unsigned char LargeInputPayload[IN_MB_SIZE];
   unsigned char OutPayload[OUT_PAYLOAD_SIZE];
   unsigned char LargeOutputPayload[OUT_MB_SIZE];
   unsigned int DimmID;
   unsigned char Opcode;
   unsigned char SubOpcode;
   unsigned char Status;
   unsigned char DsmStatus;
};
#pragma pack(pop)

#define DSM_ERROR(A)                  (A != DSM_VENDOR_SUCCESS)

int fw_mb_err_to_nvm_lib_err(int status);
int dsm_err_to_nvm_lib_err(unsigned int status);
#endif // _OS_TYPES_H_


text:
using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class HPEvent : MonoBehaviour {
    public Slider Hp;
	// Use this for initialization
	void Start () {
        InvokeRepeating("ReduceHp", 1, 1);
	}

    void ReduceHp() {
        Hp.value -= 1;
    }
}


text:
while true; do
    read -p "Do you want to publish a patch? [y/n]: " yn
    case $yn in
        [Yy]* ) npm version patch; break;;
        [Nn]* ) exit;;
        * ) echo "Please answer yes or no.";;
    esac
done

while true; do
    read -p "please, update version on bower.json. Did you do it? [y/n]: " yn
    case $yn in
        [Yy]* ) git add .; git commit -m'bower updating version'; git push; sudo npm publish .; break;;
        [Nn]* ) exit;;
        * ) echo "Please answer yes or no.";;
    esac
done


text:
package sandbox

import (
	"fmt"
	"regexp"
	"strings"

	"github.com/freneticmonkey/migrate/go/util"
)

const (
	preserveBegin = "PRESERVE_BEGIN"
	preserveEnd   = "PRESERVE_END"
)

type contentMap map[string]string

var content contentMap

func contentSlice(contentName string) (contents string) {
	if contents, ok := content[contentName]; ok {
		return contents
	}
	return ""
}

func parseContent(fileContents string) error {
	content = make(contentMap)

	exp := fmt.Sprintf("%s|%s", preserveBegin, preserveEnd)
	pattern, err := regexp.Compile(exp)
	if err != nil {
		util.LogErrorf("Couldn't compile: %v", err)
		return err
	}

	// Extract each section
	sections := pattern.Split(fileContents, -1)

	for i := 1; i < len(sections); i += 2 {
		section := sections[i]
		// Extract the name
		sectionLines := strings.Split(section, "\n")
		name := strings.Trim(sectionLines[0], "[] ")
		content[name] = strings.TrimSpace(strings.Join(sectionLines[1:len(sectionLines)-1], "\n"))

	}

	return nil
}


text:
package io.sarl.eclipse.typehierarchy;

import org.eclipse.osgi.util.NLS;

/** NLS Messages.
 *
 * @author $Author: sgalland$
 * @version $FullVersion$
 * @mavengroupid $GroupId$
 * @mavenartifactid $ArtifactId$
 * @ExcludeFromApidoc
 */
@SuppressWarnings("all")
public class Messages extends NLS {
	private static final String BUNDLE_NAME = Messages.class.getPackage().getName() + ".messages"; //$NON-NLS-1$
	public static String SarlScriptTypeSelector_0;
	public static String SarlScriptTypeSelector_1;
	public static String SarlScriptTypeSelector_2;
	static {
		// initialize resource bundle
		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
	}

	private Messages() {
	}
}