text:
/*
  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)

  Permission to use, copy, modify, and distribute this software
  and its documentation for any purpose and without fee is hereby
  granted, provided that the above copyright notice appear in all
  copies and that both that the copyright notice and this
  permission notice and warranty disclaimer appear in supporting
  documentation, and that the name of the author not be used in
  advertising or publicity pertaining to distribution of the
  software without specific, written prior permission.

  The author disclaim all warranties with regard to this
  software, including all implied warranties of merchantability
  and fitness.  In no event shall the author be liable for any
  special, indirect or consequential damages or any damages
  whatsoever resulting from loss of use, data or profits, whether
  in an action of contract, negligence or other tortious action,
  arising out of or in connection with the use or performance of
  this software.
*/

/** \file
 *
 *  Target-related functions for the PDI Protocol decoder.
 */

#define  INCLUDE_FROM_PDITARGET_C
#include "PDITarget.h"

#if defined(ENABLE_PDI_PROTOCOL) || defined(__DOXYGEN__)

/** Flag to indicate if the USART is currently in Tx or Rx mode. */
volatile bool               IsSending;

#if !defined(PDI_VIA_HARDWARE_USART)
/** Software USART raw frame bits for transmission/reception. */
volatile uint16_t           SoftUSART_Data;

/** Bits remaining to be sent or received via the software USART - set as a GPIOR for speed. */
#define SoftUSART_BitCount  GPIOR2

/** ISR to manage the software USART when bit-banged USART mode is selected. */
ISR(TIMER1_COMPA_vect, ISR_BLOCK)
{
	/* Toggle CLOCK pin in a single cycle (see AVR datasheet) */
	BITBANG_PDICLOCK_PIN |= BITBANG_PDICLOCK_MASK;

	/* If not sending or receiving, just exit */
	if (!(SoftUSART_BitCount))
	  return;

	/* Check to see if we are at a rising or falling edge of the clock */
	if (BITBANG_PDICLOCK_PORT & BITBANG_PDICLOCK_MASK)
	{
		/* If at rising clock edge and we are in send mode, abort */
		if (IsSending)
		  return;

		/* Wait for the start bit when receiving */
		if ((SoftUSART_BitCount == BITS_IN_FRAME) && (BITBANG_PDIDATA_PIN & BITBANG_PDIDATA_MASK))
		  return;

		/* Shift in the bit one less than the frame size in position, so that the start bit will eventually
		 * be discarded leaving the data to be byte-aligned for quick access */
		if (BITBANG_PDIDATA_PIN & BITBANG_PDIDATA_MASK)
		  SoftUSART_Data |= (1 << (BITS_IN_FRAME - 1));

		SoftUSART_Data >>= 1;
		SoftUSART_BitCount--;
	}
	else
	{
		/* If at falling clock edge and we are in receive mode, abort */
		if (!IsSending)
		  return;

		/* Set the data line to the next bit value */
		if (SoftUSART_Data & 0x01)
		  BITBANG_PDIDATA_PORT |=  BITBANG_PDIDATA_MASK;
		else
		  BITBANG_PDIDATA_PORT &= ~BITBANG_PDIDATA_MASK;

		SoftUSART_Data >>= 1;
		SoftUSART_BitCount--;
	}
}
#endif

/** Enables the target's PDI interface, holding the target in reset until PDI mode is exited. */
void PDITarget_EnableTargetPDI(void)
{
#if defined(PDI_VIA_HARDWARE_USART)
	/* Set Tx and XCK as outputs, Rx as input */
	DDRD |=  (1 << 5) | (1 << 3);
	DDRD &= ~(1 << 2);

	/* Set DATA line high for at least 90ns to disable /RESET functionality */
	PORTD |= (1 << 3);
	asm volatile ("NOP"::);
	asm volatile ("NOP"::);

	/* Set up the synchronous USART for XMEGA communications -
	   8 data bits, even parity, 2 stop bits */
	UBRR1  = (F_CPU / 1000000UL);
	UCSR1B = (1 << TXEN1);
	UCSR1C = (1 << UMSEL10) | (1 << UPM11) | (1 << USBS1) | (1 << UCSZ11) | (1 << UCSZ10) | (1 << UCPOL1);

	/* Send two BREAKs of 12 bits each to enable PDI interface (need at least 16 idle bits) */
	PDITarget_SendBreak();
	PDITarget_SendBreak();
#else
	/* Set DATA and CLOCK lines to outputs */
	BITBANG_PDIDATA_DDR  |= BITBANG_PDIDATA_MASK;
	BITBANG_PDICLOCK_DDR |= BITBANG_PDICLOCK_MASK;

	/* Set DATA line high for at least 90ns to disable /RESET functionality */
	BITBANG_PDIDATA_PORT |= BITBANG_PDIDATA_MASK;
	asm volatile ("NOP"::);
	asm volatile ("NOP"::);

	/* Fire timer compare ISR every 100 cycles to manage the software USART */
	OCR1A   = 80;
	TCCR1B  = (1 << WGM12) | (1 << CS10);
	TIMSK1  = (1 << OCIE1A);

	PDITarget_SendBreak();
	PDITarget_SendBreak();
#endif
}

/** Disables the target's PDI interface, exits programming mode and starts the target's application. */
void PDITarget_DisableTargetPDI(void)
{
#if defined(PDI_VIA_HARDWARE_USART)
	/* Turn off receiver and transmitter of the USART, clear settings */
	UCSR1A |= (1 << TXC1) | (1 << RXC1);
	UCSR1B  = 0;
	UCSR1C  = 0;

	/* Set all USART lines as input, tristate */
	DDRD  &= ~((1 << 5) | (1 << 3));
	PORTD &= ~((1 << 5) | (1 << 3) | (1 << 2));
#else
	/* Set DATA and CLOCK lines to inputs */
	BITBANG_PDIDATA_DDR   &= ~BITBANG_PDIDATA_MASK;
	BITBANG_PDICLOCK_DDR  &= ~BITBANG_PDICLOCK_MASK;

	/* Tristate DATA and CLOCK lines */
	BITBANG_PDIDATA_PORT  &= ~BITBANG_PDIDATA_MASK;
	BITBANG_PDICLOCK_PORT &= ~BITBANG_PDICLOCK_MASK;

	TCCR0B  = 0;
#endif
}

/** Sends a byte via the USART.
 *
 *  \param[in] Byte  Byte to send through the USART
 */
void PDITarget_SendByte(const uint8_t Byte)
{
#if defined(PDI_VIA_HARDWARE_USART)
	/* Switch to Tx mode if currently in Rx mode */
	if (!(IsSending))
	{
		PORTD  |=  (1 << 3);
		DDRD   |=  (1 << 3);

		UCSR1B |=  (1 << TXEN1);
		UCSR1B &= ~(1 << RXEN1);

		IsSending = true;
	}

	/* Wait until there is space in the hardware Tx buffer before writing */
	while (!(UCSR1A & (1 << UDRE1)));
	UCSR1A |= (1 << TXC1);
	UDR1    = Byte;
#else
	/* Switch to Tx mode if currently in Rx mode */
	if (!(IsSending))
	{
		BITBANG_PDIDATA_PORT |= BITBANG_PDIDATA_MASK;
		BITBANG_PDIDATA_DDR  |= BITBANG_PDIDATA_MASK;

		IsSending = true;
	}

	/* Calculate the new USART frame data here while while we wait for a previous byte (if any) to finish sending */
	uint16_t NewUSARTData = ((1 << 11) | (1 << 10) | (0 << 9) | ((uint16_t)Byte << 1) | (0 << 0));

	/* Compute Even parity - while a bit is still set, chop off lowest bit and toggle parity bit */
	uint8_t ParityData    = Byte;
	while (ParityData)
	{
		NewUSARTData ^= (1 << 9);
		ParityData   &= (ParityData - 1);
	}

	/* Wait until transmitter is idle before writing new data */
	while (SoftUSART_BitCount);

	/* Data shifted out LSB first, START DATA PARITY STOP STOP */
	SoftUSART_Data     = NewUSARTData;
	SoftUSART_BitCount = BITS_IN_FRAME;
#endif
}

/** Receives a byte via the software USART, blocking until data is received.
 *
 *  \return Received byte from the USART
 */
uint8_t PDITarget_ReceiveByte(void)
{
#if defined(PDI_VIA_HARDWARE_USART)
	/* Switch to Rx mode if currently in Tx mode */
	if (IsSending)
	{
		while (!(UCSR1A & (1 << TXC1)));
		UCSR1A |=  (1 << TXC1);

		UCSR1B &= ~(1 << TXEN1);
		UCSR1B |=  (1 << RXEN1);

		DDRD   &= ~(1 << 3);
		PORTD  &= ~(1 << 3);

		IsSending = false;
	}

	/* Wait until a byte has been received before reading */
	while (!(UCSR1A & (1 << RXC1)));
	return UDR1;
#else
	/* Switch to Rx mode if currently in Tx mode */
	if (IsSending)
	{
		while (SoftUSART_BitCount);

		BITBANG_PDIDATA_DDR  &= ~BITBANG_PDIDATA_MASK;
		BITBANG_PDIDATA_PORT &= ~BITBANG_PDIDATA_MASK;

		IsSending = false;
	}

	/* Wait until a byte has been received before reading */
	SoftUSART_BitCount = BITS_IN_FRAME;
	while (SoftUSART_BitCount);

	/* Throw away the parity and stop bits to leave only the data (start bit is already discarded) */
	return (uint8_t)SoftUSART_Data;
#endif
}

/** Sends a BREAK via the USART to the attached target, consisting of a full frame of idle bits. */
void PDITarget_SendBreak(void)
{
#if defined(PDI_VIA_HARDWARE_USART)
	/* Switch to Tx mode if currently in Rx mode */
	if (!(IsSending))
	{
		PORTD  |=  (1 << 3);
		DDRD   |=  (1 << 3);

		UCSR1B &= ~(1 << RXEN1);
		UCSR1B |=  (1 << TXEN1);

		IsSending = true;
	}

	/* Need to do nothing for a full frame to send a BREAK */
	for (uint8_t i = 0; i < BITS_IN_FRAME; i++)
	{
		/* Wait for a full cycle of the clock */
		while (PIND & (1 << 5));
		while (!(PIND & (1 << 5)));
	}
#else
	/* Switch to Tx mode if currently in Rx mode */
	if (!(IsSending))
	{
		BITBANG_PDIDATA_PORT |= BITBANG_PDIDATA_MASK;
		BITBANG_PDIDATA_DDR  |= BITBANG_PDIDATA_MASK;

		IsSending = true;
	}

	while (SoftUSART_BitCount);

	/* Need to do nothing for a full frame to send a BREAK */
	SoftUSART_Data     = 0x0FFF;
	SoftUSART_BitCount = BITS_IN_FRAME;
#endif
}

/** Busy-waits while the NVM controller is busy performing a NVM operation, such as a FLASH page read or CRC
 *  calculation.
 *
 *  \return Boolean true if the NVM controller became ready within the timeout period, false otherwise
 */
bool PDITarget_WaitWhileNVMBusBusy(void)
{
	TCNT0 = 0;
	TIFR0 = (1 << OCF1A);

	uint8_t TimeoutMS = PDI_NVM_TIMEOUT_MS;

	/* Poll the STATUS register to check to see if NVM access has been enabled */
	while (TimeoutMS)
	{
		/* Send the LDCS command to read the PDI STATUS register to see the NVM bus is active */
		PDITarget_SendByte(PDI_CMD_LDCS | PDI_STATUS_REG);
		if (PDITarget_ReceiveByte() & PDI_STATUS_NVM)
		  return true;

		if (TIFR0 & (1 << OCF1A))
		{
			TIFR0 = (1 << OCF1A);
			TimeoutMS--;
		}
	}

	return false;
}

#endif


text:
{{-- page level styles --}}
@push('header_styles_stack')
    <link rel="stylesheet" type="text/css" href="{{ asset('assets/vendors/jasny-bootstrap/css/jasny-bootstrap.min.css') }}">
    <link rel="stylesheet" type="text/css" href="{{ asset('assets/vendors/datepicker/css/datepicker.css') }}">

    <link rel="stylesheet" type="text/css" href="{{ asset('assets/vendors/datatables/extensions/bootstrap/dataTables.bootstrap.css') }}" />
    <link href="{{ asset('css/tables.css') }}" rel="stylesheet" type="text/css" />

@endpush

first('pic', 'has-error') }}">

                    @if($user != null && $user->pic)
                        pic !!}" alt="profile pic" class="img-max img-rounded"/>
                    @else

                    @endif

                        Select image
                        Change
                        <input type="file" name="pic" id="pic" />

                    Remove

            {{ $errors->first('pic', ':message') }}

first('gender', 'has-error') }}">
                    {!! Form::label('gender', 'Gender') !!}
                    {!! Form::select('gender', $genders, null, ['class' => 'form-control']) !!}
                    {{ $errors->first('gender', ':message') }}

first('first_name', 'has-error') }}">
                    {!! Form::label('first_name', 'First name') !!}
                    {!! Form::text('first_name', null, ['class' => 'form-control', 'placeholder' => 'First name']) !!}
                    {{ $errors->first('first_name', ':message') }}

first('last_name', 'has-error') }}">
                    {!! Form::label('last_name', 'Last name') !!}
                    {!! Form::text('last_name', null, ['class' => 'form-control', 'placeholder' => 'Last name']) !!}
                    {{ $errors->first('last_name', ':message') }}

first('username', 'has-error') }}">
                    {!! Form::label('username', 'Username') !!}
                    {!! Form::text('username', null, ['class' => 'form-control', 'placeholder' => 'Username']) !!}
                    {{ $errors->first('username', ':message') }}

first('birthday', 'has-error') }}">
                    {!! Form::label('birthday', 'Birthday') !!}
                    {!! Form::text('birthday', ($user != null && $user->birthday != null ? $user->birthday->format(config('jlourenco.support.Dates_Format')) : ''), ['class' => 'form-control JQCalendar', 'placeholder' => 'Birthday', 'maxlength' => '10']) !!}
                    {{ $errors->first('birthday', ':message') }}

first('email', 'has-error') }}">
                    {!! Form::label('email', 'Email') !!}
                    {!! Form::text('email', null, ['class' => 'form-control', 'placeholder' => 'Email']) !!}
                    {{ $errors->first('email', ':message') }}

first('status', 'has-error') }}">
                    {!! Form::label('status', 'Status') !!}
                    {!! Form::select('status', $statusList, ($status != null ? $status : 0), ['class' => 'form-control']) !!}
                    {{ $errors->first('status', ':message') }}

first('created_at', 'has-error') }}">
                    {!! Form::label('created_at', 'Created at') !!}
                    {!! Form::text('created_at', ($user != null && $user->created_at != null ? $user->created_at->format(config('jlourenco.support.Dates_Format')) : ''), ['class' => 'form-control', 'readonly', 'placeholder' => 'Never']) !!}
                    {{ $errors->first('created_at', ':message') }}

first('ip', 'has-error') }}">
                    {!! Form::label('ip', 'Last ip') !!}
                    {!! Form::text('ip', null, ['class' => 'form-control', 'readonly', 'placeholder' => 'None']) !!}
                    {{ $errors->first('ip', ':message') }}

first('last_login', 'has-error') }}">
                    {!! Form::label('last_login', 'Last login') !!}
                    {!! Form::text('last_login', ($user != null && $user->last_login != null ? $user->last_login->format(config('jlourenco.support.DateTime_Format')) : ''), ['class' => 'form-control', 'readonly', 'placeholder' => 'Never']) !!}
                    {{ $errors->first('last_login', ':message') }}

first('password', 'has-error') }}">
                    {!! Form::label('password', 'Password') !!}

                        {!! Form::password('password', ['class' => 'form-control', 'placeholder' => 'Password']) !!}

                            <input type="checkbox" id="check_see" aria-label="See password" title="See password">

                    {{ $errors->first('password', ':message') }}

first('password_confirm', 'has-error') }}">
                    {!! Form::label('password_confirm', 'Confirm password') !!}
                    {!! Form::password('password_confirm', ['class' => 'form-control', 'placeholder' => 'Confirm password']) !!}
                    {{ $errors->first('password_confirm', ':message') }}

first('generate_password', 'has-error') }}">
                    {!! Form::label('generate_password', 'Generate password') !!}

                            {{ Form::submit('Generate', ['class' => 'btn btn-primary form-control', 'id' => 'generate_password']) }}

                            {{ Form::submit('Clear', ['class' => 'btn btn-primary form-control', 'id' => 'clear_password']) }}

                    {{ $errors->first('generate_password', ':message') }}

first('force_new_password', 'has-error') }}">
                    {!! Form::label('force_new_password', 'Force new password after login') !!}
                    {{ Form::checkbox('force_new_password') }}

                    {!! Form::label('send_new_password_email', 'Send new password to users email') !!}
                    {{ Form::checkbox('send_new_password_email') }}
                    {{ $errors->first('force_new_password', ':message') }}

first('description', 'has-error') }}">
            {!! Form::label('description', 'Description') !!}
            {!! Form::textarea('description', null, ['class' => 'form-control', 'placeholder' => 'Description']) !!}
            {{ $errors->first('description', ':message') }}

            {!! Form::submit($submitButton, ['class' => 'btn btn-primary form-control']) !!}

{{-- page level scripts --}}
@push('footer_scripts_stack')

@endpush

redpajama_set_name: RedPajamaGithub


text:
Test Data
=========

Contains a number of prepared files for testing processing.

Data contained here is genuine sets of Ordinance Survery data maniplulated into various use cases.

Files contain releated rows - so a complete address is available with all corresponding facets of the address base premium product - ie Street / Street Description / LPI  etc

### addressbase/

Several subfolders containing Address Base Premium files, with varying good/bad rows.

### codepoint/

Several Code Point files, with good/bad rows.


text:
Implement pdfmake to export PDF using custom font (TH Sarabun PSK)

## How to change to another font
You can see instruction from [_here_](https://github.com/bpampuch/pdfmake/wiki/Custom-Fonts---client-side).

1. Following instruction then bring new **build/vfs_fonts.js** and replace in **app/libs/vfs_fonts.js**.
2. Modidy code in app.js to add the new font.
3. Change font style.

## Credit
Big thank to @bpampuch to making this https://github.com/bpampuch/pdfmake/ happen and easy to use.

Thanks to http://www.f0nt.com/ to contribute many font for us.


text:
package guitests;

import org.junit.Test;

import seedu.unburden.commons.core.Messages;
import seedu.unburden.commons.exceptions.IllegalValueException;
import seedu.unburden.testutil.TestTask;

import static org.junit.Assert.assertTrue;

public class FindCommandTest extends ListOfTaskGuiTest {

    //@Test
    public void find_nonEmptyList() throws IllegalValueException {
        assertFindResult("find Mark"); //no results
        assertFindResult("find Meier", td.benson, td.daniel); //multiple results

        //find after deleting one result
        commandBox.runCommand("delete 1");
        assertFindResult("find Meier",td.daniel);
    }

    //@Test
    public void find_emptyList() throws IllegalValueException {
        commandBox.runCommand("clear");
        assertFindResult("find Jean"); //no results
    }

    //@Test
    public void find_invalidCommand_fail() {
        commandBox.runCommand("findgeorge");
        assertResultMessage(Messages.MESSAGE_UNKNOWN_COMMAND);
    }

    private void assertFindResult(String command, TestTask... expectedHits ) throws IllegalValueException {
        commandBox.runCommand(command);
        assertListSize(expectedHits.length);
        assertResultMessage(expectedHits.length + " persons listed!");
        assertTrue(taskListPanel.isListMatching(expectedHits));
    }
}


text:
title: "May Matches Info"
layout: article
categories: Announcements
---

Time for some updates on the matches this month. For the 3 Gun match the round count is 114 pistol, 66 rifle, 66 birdshot, 4 slugs. For the State IDPA match the round count is 129. As always these are the minimums, you should bring more ammo based on how accurate you are. Additionally, Courses of Fire (COFs) have been posted for the two matches ([3 Gun](http://www.udpl.net/files/cofs/2015-05-16_cof.pdf), [IDPA](http://www.udpl.net/files/cofs/2015-05-23_state_cof.pdf)).

## 3 Gun Match

This match is Pistol Caliber Carbine (PCC) friendly. If you want to substitute a rifle for a PCC make sure you registered in the PCC division. This is a great chance to shoot that 9mm AR-15, MP5 clone, or various other pistol caliber guns. Carey Palmer needs some help setting up this Friday May 15th. He'll be at the range from 9AM until dark getting the match ready. If you can spare some time on Friday just come on out to the range with a pair of gloves and help set up.

Additionally it's looking like it will rain for the match. Bring some rain gear and plan on mud in the new shooting bays that don't have gravel.

## Utah State IDPA match

Staff shoot Friday May 22nd, everyone else shoots Saturday May 23rd. Make sure you've reviewed the new 2015  IDPA rules and especially the section on equipment. It would be no fun to not read the rules and bring the wrong equipment. We will be checking holsters, concealment, and firearms to make sure they meet IDPA rules. Additionally your ammo will be chronographed to ensure you meet power factor. Leave the brass buckets at home, **this is a lost brass match** to ensure that we finish before sunset.

The State matches always have the most challenging stages and Evan Woolley has done a great job putting this match together. We're hoping for good weather.


text:
package pamasich.strategy.objects.structures;

import java.util.ArrayList;
import java.util.List;

import pamasich.pamautils.collections.Pair;
import pamasich.strategy.objects.Player;
import pamasich.strategy.objects.resources.Food;
import pamasich.strategy.objects.resources.Stone;
import pamasich.strategy.objects.resources.Wood;
import pamasich.strategy.objects.structures.interfaces.ResourceProduction;

public class Farm extends Structure implements ResourceProduction {

	public Farm(Player owner) {
		super(owner, 20, 1, initCost());
	}

	@Override
	public void yieldResources() {
		Player.getCurrentPlayer().addResource(Food.class.getSimpleName(), 20);
	}

	private static List<Pair<String, Integer>> initCost() {
		List<Pair<String, Integer>> cost = new ArrayList<>();

		cost.add(new Pair<>(Wood.class.getSimpleName(), 50));
		cost.add(new Pair<>(Stone.class.getSimpleName(), 10));

		return cost;
	}

}


text:
<?php

namespace Sdz\MainBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class DefaultController extends Controller
{
    public function indexAction($name)
    {
        return $this->render('SdzMainBundle:Default:index.html.twig', array('name' => $name));
    }
}


text:
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

docker run \
    --publish 5432:5432 \
    --volume br-pgdata:/pgdata \
    --volume br-backups:/backrestrepo \
    --env PG_MODE=primary \
    --env PG_USER=testuser \
    --env PG_PASSWORD=password \
    --env PG_DATABASE=userdb \
    --env PG_PRIMARY_USER=primaryuser \
    --env PG_PRIMARY_PORT=5432 \
    --env PG_PRIMARY_PASSWORD=password \
    --env PG_ROOT_PASSWORD=password \
    --env PGHOST=/tmp \
    --env PGBACKREST=true \
    --env PGBACKREST_PG1_PATH=/pgdata/backrest \
    --env PGBACKREST_REPO1_PATH=/backrestrepo/backrest-backups \
    --env PGDATA_PATH_OVERRIDE=backrest \
    --name=backrest-delta-restored \
    --hostname=backrest-delta-restored \
    --detach ${CCP_IMAGE_PREFIX?}/crunchy-postgres:${CCP_IMAGE_TAG?}


text:
package fr.bourgmapper.tub.data.entity;

import com.google.gson.annotations.SerializedName;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.NotNull;

/**
 * Stop Entity used in the data layer.
 */
@Entity
public class StopEntity {
    public static final String TABLE_NAME = "Stops";

    @SerializedName("id")
    @Id
    public long stopId;

    @SerializedName("label")
    @NotNull
    public String label;

    @SerializedName("latitude")
    @NotNull
    public String latitude;

    @SerializedName("longitude")
    @NotNull
    public String longitude;

    @Generated(hash = 3792568)
    public StopEntity(long stopId, @NotNull String label, @NotNull String latitude,
                      @NotNull String longitude) {
        this.stopId = stopId;
        this.label = label;
        this.latitude = latitude;
        this.longitude = longitude;
    }

    @Generated(hash = 779355278)
    public StopEntity() {
    }

    public long getStopId() {
        return this.stopId;
    }

    public void setStopId(long stopId) {
        this.stopId = stopId;
    }

    public String getLabel() {
        return this.label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public String getLatitude() {
        return this.latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public String getLongitude() {
        return this.longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }
}


text:
echo
echo "Building and passing tests"

cd "$TRAVIS_BUILD_DIR/qtreports-tests"
qmake -spec ${USING_QT_MKSPEC} "CONFIG+=${BUILD_TYPE}" qtreports-tests.pro
make -j$(nproc)
if [[ $? -ne 0 ]]; then
	echo
	echo "Building tests program FAILED"
	exit 1
fi

echo
echo "Tests program has been built"

./qtreports-tests
if [[ $? -ne 0 ]]; then
	echo "Some of the tests FAILED"
	exit 1
fi
echo "Tests PASSED"

cd "$TRAVIS_BUILD_DIR"


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.mlflow</groupId>
    <artifactId>mlflow-parent</artifactId>
    <version>2.0.2-SNAPSHOT</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <artifactId>mlflow-client</artifactId>
  <packaging>jar</packaging>
  <name>MLflow Tracking API</name>
  <url>http://mlflow.org</url>
  <properties>
    <mlflow.shade.packageName>org.mlflow_project</mlflow.shade.packageName>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpclient</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.protobuf</groupId>
      <artifactId>protobuf-java</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.protobuf</groupId>
      <artifactId>protobuf-java-util</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
    </dependency>
    <dependency>
      <groupId>org.ini4j</groupId>
      <artifactId>ini4j</artifactId>
    </dependency>

    <!-- Test dependencies -->
    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-jdk14</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <sourcepath>${project.basedir}/src/main/java</sourcepath>
          <excludePackageNames>com.databricks.api.proto.databricks:org.mlflow.scalapb_interface:org.mlflow.tracking.samples:org.mlflow.artifacts</excludePackageNames>
          <groups>
            <group>
              <title>Tracking API</title>
              <packages>org.mlflow.tracking:org.mlflow.tracking.*</packages>
            </group>
          </groups>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>

      <plugin>
        <!--
        We construct a comprehensive shaded artifact so that we do not require that downstream
        clients pick particular versions of protobuf, guava, apache http, and apache commons.
        -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <configuration>
          <minimizeJar>false</minimizeJar>
          <shadedArtifactAttached>false</shadedArtifactAttached>
          <artifactSet>
            <includes>
              <include>com.google.protobuf:protobuf-java</include>
              <include>com.google.protobuf:protobuf-java-util</include>
              <include>org.apache.httpcomponents:httpclient</include>
              <include>com.google.guava:guava</include>
              <include>com.google.code.gson:gson</include>
              <include>commons-codec:commons-codec</include>
              <include>commons-io:commons-io</include>
              <include>commons-logging:commons-logging</include>
              <include>org.apache.httpcomponents:httpcore</include>
              <include>org.ini4j:ini4j</include>
            </includes>
          </artifactSet>
          <relocations>
            <relocation>
              <pattern>com.google</pattern>
              <shadedPattern>${mlflow.shade.packageName}.google</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.apache.commons</pattern>
              <shadedPattern>${mlflow.shade.packageName}.apachecommons</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.apache.http</pattern>
              <shadedPattern>${mlflow.shade.packageName}.apachehttp</shadedPattern>
            </relocation>
            <relocation>
              <!-- We have to move this package as it conflicts with other Databricks jars. -->
              <pattern>com.databricks.api.proto.databricks</pattern>
              <shadedPattern>${mlflow.shade.packageName}.databricks</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.ini4j</pattern>
              <shadedPattern>${mlflow.shade.packageName}.ini4j</shadedPattern>
            </relocation>
          </relocations>
          <transformers>
            <transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
              <resources>
                <resource>public-suffix-list.txt</resource>
                <resource>log4j.properties</resource>
                <resource>.proto</resource>
              </resources>
            </transformer>
          </transformers>
        </configuration>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      </plugins>
  </build>
  <profiles>
    <profile>
      <id>do-sign</id>
    </profile>
  </profiles>
</project>


text:
import com.notarealtree.eve.misc.controller.RequestProcessor;
import com.notarealtree.eve.misc.controller.SolarSystemIDConverter;
import com.notarealtree.eve.misc.controller.TypeIDConverter;
import com.notarealtree.eve.misc.model.SolarSystem;
import com.notarealtree.eve.misc.model.Type;
import org.junit.BeforeClass;
import org.junit.Test;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.List;

import static junit.framework.TestCase.assertEquals;

/**
 * Created by Francis on 11/17/2015.
 */
public class RequestProcessorTest {
    private static RequestProcessor requestProcessor;

    @BeforeClass
    public static void setUp() throws IOException {
        SolarSystemIDConverter solarSystemIDConverter = new SolarSystemIDConverter(Files.readAllLines(Paths.get("src/main/resources/solarSystemIDs.csv")).stream().map(i -> i + "\n").reduce((i1, i2) -> i1 + i2).get());
        TypeIDConverter typeIDConverter = new TypeIDConverter(Files.readAllLines(Paths.get("src/main/resources/typeIDs.csv")).stream().map(i -> i + "\n").reduce((i1, i2) -> i1 + i2).get());
        solarSystemIDConverter.parse();
        typeIDConverter.parse();
        requestProcessor = new RequestProcessor(typeIDConverter, solarSystemIDConverter);
    }

    @Test
    public void testSingleTypeIDToName(){
        // Given
        String typeID = "193";
        String expectedName = "EMP M";

        // When
        String actualName = requestProcessor.typeIDToTypeName(typeID).getTypes().get(0).getTypeName();

        // Then
        assertEquals("Result matches expected type name", expectedName, actualName);
    }

    @Test
    public void testMultipleTypeIDToName(){
        // Given
        String typeIDs = "193;194";
        String firstExpectedName = "EMP M";
        String secondExpectedName = "Carbonized Lead L";

        // When
        List<Type> responses = requestProcessor.typeIDToTypeName(typeIDs).getTypes();
        String actualFirstName = responses.get(0).getTypeName();
        String actualSecondName = responses.get(1).getTypeName();

        // Then
        assertEquals("Result matches expected type name", firstExpectedName, actualFirstName);
        assertEquals("Result matches expected type name", secondExpectedName, actualSecondName);
    }

    @Test
    public void testSingleTypeNameToID(){
        // Given
        long expectedTypeID = 193;
        String name = "EMP M";

        // When
        long actualTypeID = requestProcessor.typeNameToTypeID(name).getTypes().get(0).getTypeID();

        // Then
        assertEquals("Result matches expected type name", expectedTypeID, actualTypeID);
    }

    @Test
    public void testMultipleTypeNameToID(){
        // Given
        String names = "EMP M;Carbonized Lead L";
        long firstExpectedTypeID = 193;
        long secondExpectedTypeID = 194;

        // When
        List<Type> responses = requestProcessor.typeNameToTypeID(names).getTypes();
        long actualFirstID = responses.get(0).getTypeID();
        long actualSecondID = responses.get(1).getTypeID();

        // Then
        assertEquals("Result matches expected type name", firstExpectedTypeID, actualFirstID);
        assertEquals("Result matches expected type name", secondExpectedTypeID, actualSecondID);
    }

    @Test
    public void testSingleSystemIDToName(){
        // Given
        String typeID = "30002187";
        String expectedName = "Amarr";

        // When
        String actualName = requestProcessor.systemIDToName(typeID).getSystems().get(0).getSystemName();

        // Then
        assertEquals("Result matches expected type name", expectedName, actualName);
    }

    @Test
    public void testMultipleSystemIDToName(){
        // Given
        String systemIDs = "30002187;30000021";
        String firstExpectedName = "Amarr";
        String secondExpectedName = "Kuharah";

        // When
        List<SolarSystem> responses = requestProcessor.systemIDToName(systemIDs).getSystems();
        String actualFirstName = responses.get(0).getSystemName();
        String actualSecondName = responses.get(1).getSystemName();

        // Then
        assertEquals("Result matches expected type name", firstExpectedName, actualFirstName);
        assertEquals("Result matches expected type name", secondExpectedName, actualSecondName);
    }

    @Test
    public void testSingleSystemNameToID(){
        // Given
        long expectedSystemID = 30002187;
        String name = "Amarr";

        // When
        long actualSystemID = requestProcessor.systemNameToID(name).getSystems().get(0).getSystemID();

        // Then
        assertEquals("Result matches expected type name", expectedSystemID, actualSystemID);
    }

    @Test
    public void testMultipleSystemNameToID(){
        // Given
        String names = "Amarr;Kuharah";
        long firstExpectedSystemID = 30002187;
        long secondExpectedSystemID = 30000021;

        // When
        List<SolarSystem> responses = requestProcessor.systemNameToID(names).getSystems();
        long actualFirstID = responses.get(0).getSystemID();
        long actualSecondID = responses.get(1).getSystemID();

        // Then
        assertEquals("Result matches expected type name", firstExpectedSystemID, actualFirstID);
        assertEquals("Result matches expected type name", secondExpectedSystemID, actualSecondID);
    }

}


text:
package com.signalcollect.admm.graph

import com.signalcollect._
import com.signalcollect.interfaces._

case class DummyEdge(val targetId: Int) extends Edge[Int] {
  override def id: EdgeId[_] = throw new UnsupportedOperationException
  override def sourceId: Any = throw new UnsupportedOperationException
  override def source: Source = throw new UnsupportedOperationException
  override def onAttach(source: Vertex[_, _, _, _], graphEditor: GraphEditor[Any, Any]) = throw new UnsupportedOperationException
  override def weight: Double = 1
  override def toString = s"DummyEdge(targetId=$targetId)"
  override def hashCode = throw new UnsupportedOperationException
  override def equals(other: Any): Boolean = throw new UnsupportedOperationException
  override def executeSignalOperation(sourceVertex: Vertex[_, _, _, _], graphEditor: GraphEditor[Any, Any]) = throw new UnsupportedOperationException
}


text:
<?php

class Cookie {

  // configuration
  static public $salt = 'KirbyToolkitCookieSalt';

  /**
   * Set a new cookie
   *
   *
   *
   * cookie::set('mycookie', 'hello', 60);
   * // expires in 1 hour
   *
   *
   *
   * @param  string  $key The name of the cookie
   * @param  string  $value The cookie content
   * @param  int     $expires The number of minutes until the cookie expires
   * @param  string  $path The path on the server to set the cookie for
   * @param  string  $domain the domain
   * @param  boolean $secure only sets the cookie over https
   * @return boolean true: the cookie has been created, false: cookie creation failed
   */
  static public function set($key, $value, $expires = 0, $path = '/', $domain = null, $secure = false) {

    // convert minutes to seconds
    if($expires > 0) $expires = time() + ($expires * 60);

    // convert array values to json
    if(is_array($value)) $value = a::json($value);

    // hash the value
    $value = static::hash($value) . '+' . $value;

    // store that thing in the cookie global
    $_COOKIE[$key] = $value;

    // store the cookie
    return setcookie($key, $value, $expires, $path, $domain, $secure);

  }

  /**
   * Stores a cookie forever
   *
   *
   *
   * cookie::forever('mycookie', 'hello');
   * // never expires
   *
   *
   *
   * @param  string  $key The name of the cookie
   * @param  string  $value The cookie content
   * @param  string  $path The path on the server to set the cookie for
   * @param  string  $domain the domain
   * @param  boolean $secure only sets the cookie over https
   * @return boolean true: the cookie has been created, false: cookie creation failed
   */
  static public function forever($key, $value, $path = '/', $domain = null, $secure = false) {
    return static::set($key, $value, 2628000, $path, $domain, $secure);
  }

  /**
   * Get a cookie value
   *
   *
   *
   * cookie::get('mycookie', 'peter');
   * // sample output: 'hello' or if the cookie is not set 'peter'
   *
   *
   *
   * @param  string  $key The name of the cookie
   * @param  string  $default The default value, which should be returned if the cookie has not been found
   * @return mixed   The found value
   */
  static public function get($key = null, $default = null) {
    if(is_null($key)) return $_COOKIE;
    $value = isset($_COOKIE[$key]) ? $_COOKIE[$key] : null;
    return empty($value) ? $default : static::parse($value);
  }

  /**
   * Checks if a cookie exists
   *
   * @return boolean
   */
  static public function exists($key) {
    return !is_null(static::get($key));
  }

  /**
   * Creates a hash for the cookie value
   * salted with the secret cookie salt string from the defaults
   *
   * @param string $value
   * @return string
   */
  static protected function hash($value) {
    return sha1($value . static::$salt);
  }

  /**
   * Parses the hashed value from a cookie
   * and tries to extract the value
   *
   * @param string $hash
   * @return mixed
   */
  static protected function parse($string) {

    // extract hash and value
    $parts = str::split($string, '+');
    $hash  = a::first($parts);
    $value = a::last($parts);

    // if the hash or the value is missing at all return null
    if(empty($hash) or empty($value)) return null;

    // compare the extracted hash with the hashed value
    if($hash !== static::hash($value)) return null;

    return $value;

  }

  /**
   * Remove a cookie
   *
   *
   *
   * cookie::remove('mycookie');
   * // mycookie is now gone
   *
   *
   *
   * @param  string  $key The name of the cookie
   * @param  string  $domain The domain of the cookie
   * @return mixed   true: the cookie has been removed, false: the cookie could not be removed
   */
  static public function remove($key, $path = '/', $domain = null, $secure = false) {
    unset($_COOKIE[$key]);
    return setcookie($key, false, -3600, $path, $domain, $secure);
  }

}


text:
FROM ubuntu:14.04

ENV NV_DRIV_SH http://uk.download.nvidia.com/XFree86/Linux-x86_64/352.63/NVIDIA-Linux-x86_64-352.63.run
ENV CUDA_RUN http://developer.download.nvidia.com/compute/cuda/7_0/Prod/local_installers/cuda_7.0.28_linux.run
RUN apt-get update              \
    && apt-get install -y       \
        dh-autoreconf           \
        cmake                   \
        curl                    \
        gfortran                \
        git-core                \
        g++>4.9                 \
        libtie-persistent-perl  \
        libreadline-dev         \
        make                    \
        module-init-tools       \
        openssl                 \
        unzip                   \
        wget                    \
        libzmq3-dev             \
    && apt-get clean

# NVIDIA drivers & CUDA runtime
RUN cd /tmp && wget -nv $NV_DRIV_SH -O driver.run && \
               sh driver.run -s --no-kernel-module && \
               wget -nv $CUDA_RUN -O cuda.run && \
               sh cuda.run --toolkit --silent && \
               rm *

# cudnn6.5 from https://raw.githubusercontent.com/NVIDIA/nvidia-docker/master/ubuntu-14.04/cuda/7.0/runtime/cudnn2/Dockerfile
ENV CUDNN_DOWNLOAD_SUM 4b02cb6bf9dfa57f63bfff33e532f53e2c5a12f9f1a1b46e980e626a55f380aa
RUN curl -fsSL http://developer.download.nvidia.com/compute/redist/cudnn/v2/cudnn-6.5-linux-x64-v2.tgz -O && \
    echo "$CUDNN_DOWNLOAD_SUM cudnn-6.5-linux-x64-v2.tgz" | sha256sum -c --strict - && \
    tar -xzf cudnn-6.5-linux-x64-v2.tgz && \
    mv cudnn-6.5-linux-x64-v2/libcudnn.so* /usr/local/cuda/lib64 && \
    rm -rf cudnn-6.5-linux-x64-v2* && \
    ldconfig

RUN apt-get update \
    && apt-get install -y \
        libpython-dev \
        libpython3-dev \
        python-numpy \
        python \
        python-pip \
    && apt-get clean

RUN pip install nltk

# OpenBLAS
RUN git clone https://github.com/xianyi/OpenBLAS.git -b v0.2.15 /tmp/openblas && \
    cd /tmp/openblas && \
    make NO_AFFINITY=1 USE_OPENMP=1 DYNAMIC_ARCH=1 NUM_THREADS=8 && \
    make install && \
    cd /tmp && rm -r *

# Setup paths - torch installation requires nvcc to be on the path to install cutorch
ENV PATH=/usr/local/cuda/bin:/opt/torch/install/bin:${PATH} \
    LD_LIBRARY_PATH=/usr/local/cuda/lib64:/opt/torch/install/lib:${LD_LIBRARY_PATH}

# Torch7
RUN git clone https://github.com/torch/distro.git /opt/torch && \
    cd /opt/torch && \
    ./install.sh -b && \
    ls | grep -v "^install$" | xargs rm -r && rm -r .git

# Extra Torch dependencies
RUN luarocks install hash && \
    luarocks install nngraph && \
    luarocks install optim && \
    luarocks install moses && \
    luarocks install underscore && \
    luarocks install json && \
    luarocks install lub && \
    luarocks install yaml && \
    luarocks install https://raw.githubusercontent.com/bshillingford/autobw.torch/master/autobw-scm-1.rockspec

ADD fblualib_install_all.sh /tmp
RUN bash /tmp/fblualib_install_all.sh


text:
package com.google.j2cl.transpiler.ast;

import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkState;

import com.google.j2cl.common.InternalCompilerError;
import com.google.j2cl.common.visitor.Processor;
import com.google.j2cl.common.visitor.Visitable;

/** Number literal node. */
@Visitable
public class NumberLiteral extends Literal {
  public static NumberLiteral fromInt(int value) {
    return new NumberLiteral(PrimitiveTypes.INT, value);
  }

  public static NumberLiteral fromChar(int value) {
    return new NumberLiteral(PrimitiveTypes.CHAR, value);
  }

  public static NumberLiteral fromLong(long value) {
    return new NumberLiteral(PrimitiveTypes.LONG, value);
  }

  private final PrimitiveTypeDescriptor typeDescriptor;
  private final Number value;

  public NumberLiteral(PrimitiveTypeDescriptor typeDescriptor, Number value) {
    this.typeDescriptor = checkNotNull(typeDescriptor);
    this.value = coerceValue(typeDescriptor, value);
    // Make sure numberLiterals never store a Float value. Value is emitted directly by
    // ExpressionTranspiler float literals would have a shorter but less precise representation.
    checkState(!(this.value instanceof Float));
  }

  private Number coerceValue(PrimitiveTypeDescriptor typeDescriptor, Number value) {
    checkState(TypeDescriptors.isNumericPrimitive(typeDescriptor));
    if (TypeDescriptors.isPrimitiveByte(typeDescriptor)) {
      return value.byteValue();
    } else if (TypeDescriptors.isPrimitiveShort(typeDescriptor)) {
      return value.shortValue();
    } else if (TypeDescriptors.isPrimitiveChar(typeDescriptor)) {
      // Force narrowing then box to Integer.
      return Integer.valueOf((char) value.intValue());
    } else if (TypeDescriptors.isPrimitiveInt(typeDescriptor)) {
      return value.intValue();
    } else if (TypeDescriptors.isPrimitiveLong(typeDescriptor)) {
      return value.longValue();
    } else if (TypeDescriptors.isPrimitiveFloat(typeDescriptor)) {
      // Do not use floatValue() here, since J2cl does not honor 32-bit float semantics.
      return value.doubleValue();
    } else if (TypeDescriptors.isPrimitiveDouble(typeDescriptor)) {
      return value.doubleValue();
    }
    throw new InternalCompilerError("Not a numeric type: %s.", typeDescriptor);
  }

  public Number getValue() {
    return value;
  }

  @Override
  public PrimitiveTypeDescriptor getTypeDescriptor() {
    return typeDescriptor;
  }

  @Override
  public NumberLiteral clone() {
    // Number literals are value types do not need to actually clone.
    return this;
  }

  @Override
  public String getSourceText() {
    return value.toString();
  }

  @Override
  public Node accept(Processor processor) {
    return Visitor_NumberLiteral.visit(processor, this);
  }
}


text:
{-# LANGUAGE LambdaCase #-}
module River.Source.Concrete.Annotation (
    annotOfProgram
  , annotOfBlock
  , annotOfStatement
  , annotOfSimple
  , annotOfControl
  , annotOfLValue
  ) where

import           River.Source.Concrete.Syntax

annotOfProgram :: Program a -> a
annotOfProgram = \case
  Program a _ ->
    a

annotOfBlock :: Block a -> a
annotOfBlock = \case
  Block a _ ->
    a

annotOfStatement :: Statement a -> a
annotOfStatement = \case
  SSimple a _ ->
    a
  SControl a _ ->
    a
  SBlock a _ ->
    a

annotOfSimple :: Simple a -> a
annotOfSimple = \case
  Assign a _ _ _ ->
    a
  Post a _ _ ->
    a
  Declare a _ _ _ ->
    a

annotOfControl :: Control a -> a
annotOfControl = \case
  If a _ _ _ ->
    a
  While a _ _ ->
    a
  For a _ _ _ _ ->
    a
  Return a _ ->
    a

annotOfLValue :: LValue a -> a
annotOfLValue = \case
  LIdentifier a _ ->
    a


text:
require File.dirname(__FILE__) + '/../../../test_helper'

module SourceControl
  class Git::LogParserTest < Test::Unit::TestCase

SIMPLE_LOG_ENTRY = <<EOF
commit e51d66aa4f708fff1c87eb9afc9c48eaa8d5ffce
tree 913027773a63829c82eeb8b626949436b216c857
parent bb52b2f82fea03b7531496c77db01f9348edbbdb
author Alexey Verkhovsky <alexey.verkhovsky@gmail.com> 1209921867 -0600
committer Alexey Verkhovsky <alexey.verkhovsky@gmail.com> 1209921867 -0600

    a comment
EOF

BIGGER_LOG_ENTRY = <<EOF
commit d8f6735bcf7d2aa4a46572109d4e091a5d0e1497
tree 06f8ce9a102edb2ca96bba58f02e710f62af63df
parent 5c881c8da857dee2735349c5a36f1f525a347652
author Scott Tamosunas and Brian Jenkins <bob-development@googlegroups.com> 1224202833 -0700
committer Scott Tamosunas and Brian Jenkins <bob-development@googlegroups.com> 1224202833 -0700

    improved rake cruise messags.

 iphone/Rakefile |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

commit 5c881c8da857dee2735349c5a36f1f525a347652
tree 1a3bcfaa37a254e84f0956bedfa250e6485ee04c
parent d8120fc9372c95dd521bb77d02396c53019c4996
parent ffebfacce8baee80f9f03a2abeea8cdb9dcc7701
author Scott Tamosunas and Brian Jenkins <bob-development@googlegroups.com> 1224202700 -0700
committer Scott Tamosunas and Brian Jenkins <bob-development@googlegroups.com> 1224202700 -0700

    renamed "Unit Test" target to "UnitTest" for developer sanity.
    fixed iphone cruise Rakefile

 iphone/Rakefile                            |    2 +-
 iphone/ibob/ibob.xcodeproj/pivotal.pbxuser | 2009 +++-------------------------
 iphone/ibob/ibob.xcodeproj/project.pbxproj |  Bin 26641 -> 26654 bytes
 6 files changed, 273 insertions(+), 1875 deletions(-)
EOF

    def test_parse_should_work
      expected_revision = Git::Revision.new(
                              :number => 'e51d66a',
                              :author => 'Alexey Verkhovsky <alexey.verkhovsky@gmail.com>',
                              :time => Time.at(1209921867))
      revisions = Git::LogParser.new.parse(SIMPLE_LOG_ENTRY.split("\n"))
      assert_equal [expected_revision], revisions

      assert_equal expected_revision.number, revisions.first.number
      assert_equal expected_revision.author, revisions.first.author
      assert_equal expected_revision.time, revisions.first.time
    end

    def test_should_split_into_separate_revisions
      revisions = Git::LogParser.new.parse(BIGGER_LOG_ENTRY.split("\n"))
      assert_equal 2, revisions.size

      revision = revisions[1]
      assert_equal "5c881c8", revision.number
      assert_equal "renamed \"Unit Test\" target to \"UnitTest\" for developer sanity.\nfixed iphone cruise Rakefile",
                   revision.message
      assert_equal ["iphone/Rakefile                            |    2 +-",
                    "iphone/ibob/ibob.xcodeproj/pivotal.pbxuser | 2009 +++-------------------------",
                    "iphone/ibob/ibob.xcodeproj/project.pbxproj |  Bin 26641 -> 26654 bytes"],
                   revision.changeset
      assert_equal "6 files changed, 273 insertions(+), 1875 deletions(-)", revision.summary
    end

    def test_parse_line_should_recognize_author
      parser = Git::LogParser.new
      author, time = parser.send(:read_author_and_time, "author Alexey Verkhovsky <alexey.verkhovsky@gmail.com> 1209921867 -0600")
      assert_equal 'Alexey Verkhovsky <alexey.verkhovsky@gmail.com>', author
      assert_equal Time.at(1209921867), time
    end
  end
end


text:
CHAPTER_SECTION=28
INSTALL_NAME=patch

echo ""
echo "### ---------------------------"
echo "###            PATCH        ###"
echo "###        CHAPTER 5.$CHAPTER_SECTION     ###"
echo "### Patch-2.7.5"
echo "### Must be run as \"lfs\" user"
echo ""
echo "### Time estimate:"
echo "### real  0m29.185s"
echo "### user  0m12.505s"
echo "### sys   0m3.876s"
echo "### ---------------------------"

echo ""
echo "... Loading commun functions and variables"
if [ ! -f ./script-all_commun-functions.sh ]
then
  echo "!! Fatal Error 1: './script-all_commun-functions.sh' not found."
  exit 1
fi
source ./script-all_commun-functions.sh

if [ ! -f ./script-all_commun-variables.sh ]
then
  echo "!! Fatal Error 1: './script-all_commun-variables.sh' not found."
  exit 1
fi
source ./script-all_commun-variables.sh

echo ""
echo "... Validating the environment"
check_partitions
is_user lfs
check_tools

echo ""
echo "... Setup building environment"
BUILD_DIRECTORY=$INSTALL_NAME-build
LOG_FILE=$LFS_BUILD_LOGS_5$CHAPTER_SECTION-$INSTALL_NAME
cd $LFS_MOUNT_SOURCES
check_tarball_uniqueness
init_tarball
cd $(ls -d $LFS_MOUNT_SOURCES/$INSTALL_NAME*/)

echo ""
echo "... Installation starts now"
time {

  echo ".... Configuring $SOURCE_FILE_NAME"
  ./configure       \
    --prefix=/tools \
    &> $LOG_FILE-configure.log

  echo ".... Making $SOURCE_FILE_NAME"
  make $PROCESSOR_CORES &> $LOG_FILE-make.log

  echo ".... Checking make $SOURCE_FILE_NAME"
  make check $PROCESSOR_CORES &> $LOG_FILE-make-check.log

  echo ".... Installing $SOURCE_FILE_NAME"
  make install $PROCESSOR_CORES &> $LOG_FILE-make-install.log

}

echo ""
echo "... Cleaning up $SOURCE_FILE_NAME"
cd $LFS_MOUNT_SOURCES
[ ! $SHOULD_NOT_CLEAN ] && rm -rf $(ls -d  $LFS_MOUNT_SOURCES/$INSTALL_NAME*/)
rm -rf $BUILD_DIRECTORY

get_build_errors_5

echo ""
echo "######### END OF CHAPTER 5.$CHAPTER_SECTION ########"
echo "### Warning Counter: $WARNINGS_COUNTER"
echo "### Error Counter: $ERRORS_COUNTER"
echo "///// HUMAN REQUIRED \\\\\\\\\\\\\\\\\\\\"
echo "### Please run the next step:"
echo "### ./5.29-lfs_perl-5.22.0.sh"
echo ""

if [ $ERRORS_COUNTER -ne 0 ]
then
  exit 6
else
  exit 0
fi


text:
namespace mbus {

class CustomPolicy : public IRoutingPolicy {
private:
    bool                  _selectOnRetry;
    std::vector<uint32_t> _consumableErrors;
    std::vector<Route>    _routes;

public:
    CustomPolicy(bool selectOnRetry,
                 const std::vector<uint32_t> consumableErrors,
                 const std::vector<Route> &routes);
    ~CustomPolicy();

    void select(RoutingContext &context) override;
    void merge(RoutingContext &context) override;
};

class CustomPolicyFactory : public SimpleProtocol::IPolicyFactory {
private:
    bool                  _selectOnRetry;
    std::vector<uint32_t> _consumableErrors;

public:
    CustomPolicyFactory();
    CustomPolicyFactory(bool selectOnRetry);
    CustomPolicyFactory(bool selectOnRetry, uint32_t consumableError);
    CustomPolicyFactory(bool selectOnRetry, const std::vector<uint32_t> consumableErrors);

    IRoutingPolicy::UP create(const string &param) override;
    static void parseRoutes(const string &str, std::vector<Route> &routes);
};

} // namespace mbus


text:
import React from 'react'
import cx from 'classnames'

import FieldErrors from './FieldErrors'

export default ({
  id,
  label,
  className,
  type = 'text',

  errors = [],

  children,
  ...rest
}) => (

 0 })}>
    {label}

    {
      (children && React.cloneElement(children, { id, type, ...rest })) ||
      <input type={type} id={id} {...rest} />
    }

    <FieldErrors errors={errors} />

)


text:
MathJax.Localization.addTranslation("diq","MathML",{
        version: "2.7.5",
        isLoaded: true,
        strings: {

        }
});

MathJax.Ajax.loadComplete("[MathJax]/localization/diq/MathML.js");


text:
using System;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
using FluentAssertions;
using NUnit.Framework;

namespace hello.busyindicator
{
    [TestFixture]
    // ReSharper disable InconsistentNaming
    class TaskAction_Should
    {
        [Test]
        public void Copy_names()
        {
            const string taskName = nameof(Copy_names);

            // test all ctors
            using (var sut = new TaskAction((c, p) => { }, taskName))
                sut.Name.Should().Be(taskName);

            using (var sut = new TaskAction(() => { }, taskName))
                sut.Name.Should().Be(taskName);
        }

        [Test]
        public async Task Support_cancelable_tasks()
        {
            const string taskName = nameof(Support_cancelable_tasks);
            // ReSharper disable once ObjectCreationAsStatement
            0.Invoking(x => new TaskAction((Action<CancellationToken, IProgress<int>>) null, taskName))
                .Should().Throw<ArgumentNullException>();

            using (var sut = new TaskAction((t,p) => throw new NotImplementedException(), taskName))
            {
                await sut.Run().ShouldThrow<NotImplementedException>();
            }

            using (var sut = new TaskAction((t, p) =>
                {
                    for (int i = 1; i <= 10; i++)
                    {
                        t.ThrowIfCancellationRequested();
                        Thread.Sleep(20);
                        p?.Report(i * 10);
                    }
                }, taskName))
            {
                var task = sut.Run(new Progress<int>(p => Trace.TraceInformation($"{p}%")));
                Thread.Sleep(100);
                sut.Cancel();
                await task.ShouldThrow<OperationCanceledException>();
            }
        }

        [Test]
        public async Task Support_blocking_threads()
        {
            // ReSharper disable once ObjectCreationAsStatement
            0.Invoking(x => new TaskAction((Action) null, "test"))
                .Should().Throw<ArgumentNullException>();

            using (var sut = new TaskAction(() =>
            {
                while (true)
                    Thread.Sleep(500);
                // ReSharper disable once FunctionNeverReturns
            }, "test"))
            {
                var task = sut.Run();
                Thread.Sleep(100);
                sut.Cancel();
                await task.ShouldThrow<OperationCanceledException>();
            }
        }
    }
}


text:
<?php

namespace Tests\Lib\Nimbles\Core;

use Nimbles\Core\TestCase,
    Nimbles\Core\Plugin;

/**
 * @category   Nimbles
 * @package    Nimbles-Plugin
 * @subpackage PluginTest
 * @copyright  Copyright (c) 2010 Nimbles Framework (http://nimbl.es)
 * @license    http://nimbl.es/license/mit MIT License
 * @version    $Id$
 *
 * @uses       \Nimbles\Plugin\TestSuite
 *
 * @group      Nimbles
 * @group      Nimbles-Plugin
 */
class PluginTest extends TestCase {
    /**
     * Test that the plugin object extends a Nimbles\Core\Collection
     * @return void
     */
    public function testAbstract() {
        $plugin = new Plugin();
        $this->assertInstanceOf('Nimbles\Core\Collection', $plugin);
        $this->assertEquals(Plugin::INDEX_ASSOCIATIVE, $plugin->getIndexType());
    }

    /**
     * Tests that changing index type and readonly cannot be overriden
     * @return void
     */
    public function testFixedOptions() {
        $plugin = new Plugin(null, array(
            'indexType' => Plugin::INDEX_MIXED,
            'readonly'  => true
        ));

        $this->assertEquals(Plugin::INDEX_ASSOCIATIVE, $plugin->getIndexType());
        $this->assertFalse($plugin->isReadOnly());
    }

    /**
     * Tests getting and setting the type
     * @return void
     */
    public function testName() {
        $plugin = new Plugin();
        $plugin->setName('foo');
        $this->assertEquals('foo', $plugin->getName());

        $plugin = new Plugin(null, array('name' => 'bar'));
        $this->assertEquals('bar', $plugin->getName());

        $this->setExpectedException('Nimbles\Core\Plugin\Exception\InvalidName');
        $plugin->setName(123);
    }

    /**
     * Tests attaching and detaching plugins
     * @return void
     */
    public function testAttachDetach() {
        $plugin = new Plugin(array(
            'foo' => 'bar'
        ), array(
            'type' => 'string'
        ));

        $this->assertEquals('bar', $plugin['foo']);
        $this->assertEquals('bar', $plugin->foo);
        $this->assertEquals(1, $plugin->count());

        $plugin->attach('baz', 'quz');

        $this->assertEquals('quz', $plugin['baz']);
        $this->assertEquals('quz', $plugin->baz);
        $this->assertEquals(2, $plugin->count());

        $plugin->detach('foo');
        $this->assertFalse($plugin->offsetExists('foo'));
        $this->assertEquals(1, $plugin->count());
    }
}


text:
package ru.job4j.professions;

/**.
 * Class Profession solving part 2 task 3
 * @author Mikhail Vlasov
 * @since 5.7.2017
 * @version 1
 */
public class Profession {

    /**.
     * Name
     */
    private String name;

    /**.
     * Age
     */
    private int age;

    /**.
     * Specialization
     */
    private String specialization;

    /**.
     * Setter
     * @param name string
     */
    public void setName(String name) {
        this.name = name;
    }

    /**.
     * Getter
     * @return String
     */
    public String getName() {
        return this.name;
    }
}


text:
typedef struct __sFILE {
  unsigned char *_p;
} FILE;
FILE *fopen(const char * restrict, const char * restrict) __asm("_" "fopen" );
int fputc(int, FILE *);
int fputs(const char * restrict, FILE * restrict) __asm("_" "fputs" );
int fclose(FILE *);
void exit(int);

// The following is a fake system header function
typedef struct __FileStruct {
  FILE * p;
} FileStruct;
void fakeSystemHeaderCall(FileStruct *);


text:
"""
Compare volume average temperature profiles, Tv, from 1-D model and 3-D Comsol
simulation of white oak particles with Feret diameters of DF = 200 um to 20 mm.
Surface area to volume diameter, Dsv, is used for the 1-D model.

Requirements: Python 3, NumPy, SciPy, Matplotlib, funcHeatCond, funcOther
"""

import numpy as np
import matplotlib.pyplot as py
from funcHeatCond import hc2
from funcOther import vol, Tvol, dsv

# Parameters
# -----------------------------------------------------------------------------

Gb = 0.72       # basic specific gravity, Wood Handbook Table 4-7, (-)
k = 0.16        # thermal conductivity, W/mK
x = 0           # moisture content, %
h = 350         # heat transfer coefficient, W/m^2*K
Ti = 293        # initial particle temp, K
Tinf = 773      # ambient temp, K

# Comsol Data for Particle Geometry and Temperatures
# -----------------------------------------------------------------------------

# geometry and temperature data for DF = 200 um
sa200 = 5.355e-8                    # surface area of Comsol particle, m^2
v200 = 8.895e-13                    # volume of Comsol particle, m^3
file200 = 'comsol/200tempsOak.txt'  # time and temperatures
t200, Tv200, _, _, _, _, _ = np.loadtxt(file200, skiprows=5, unpack=True)

# geometry and temperature data for DF = 400 um
sa400 = 1.879e-7                    # surface area of Comsol particle, m^2
v400 = 5.553e-12                    # volume of Comsol particle, m^3
file400 = 'comsol/400tempsOak.txt'  # time and temperatures
t400, Tv400, _, _, _, _, _ = np.loadtxt(file400, skiprows=5, unpack=True)

# geometry and temperature data for DF = 700 um
sa700 = 4.836e-7                    # surface area of Comsol particle, m^2
v700 = 2.11e-11                     # volume of Comsol particle, m^3
file700 = 'comsol/700tempsOak.txt'  # time and temperatures
t700, Tv700, _, _, _, _, _ = np.loadtxt(file700, skiprows=5, unpack=True)

# geometry and temperature data for DF = 1400 um
sa1400 = 1.394e-6                       # surface area of Comsol particle, m^2
v1400 = 8.442e-11                       # volume of Comsol particle, m^3
file1400 = 'comsol/1400tempsOak.txt'    # time and temperatures
t1400, Tv1400, _, _, _, _, _ = np.loadtxt(file1400, skiprows=5, unpack=True)

# geometry and temperature data for DF = 2800 um
sa2800 = 4.614e-6                       # surface area of Comsol particle, m^2
v2800 = 4.011e-10                       # volume of Comsol particle, m^3
file2800 = 'comsol/2800tempsOak.txt'    # time and temperatures
t2800, Tv2800, _, _, _, _, _ = np.loadtxt(file2800, skiprows=5, unpack=True)

# geometry and temperature data for DF = 5400 um
sa5400 = 1.716e-5                       # surface area of Comsol particle, m^2
v5400 = 2.877e-9                        # volume of Comsol particle, m^3
file5400 = 'comsol/5400tempsOak.txt'    # time and temperatures
t5400, Tv5400, _, _, _, _, _ = np.loadtxt(file5400, skiprows=5, unpack=True)

# geometry and temperature data for DF = 10000 um
sa10000 = 5.885e-5                      # surface area of Comsol particle, m^2
v10000 = 1.827e-8                       # volume of Comsol particle, m^3
file10000 = 'comsol/10000tempsOak.txt'  # time and temperatures
t10000, Tv10000, _, _, _, _, _ = np.loadtxt(file10000, skiprows=5, unpack=True)

# geometry and temperature data for DF = 20000 um
sa20000 = 2.354e-4                      # surface area of Comsol particle, m^2
v20000 = 1.462e-7                       # volume of Comsol particle, m^3
file20000 = 'comsol/20000tempsOak.txt'  # time and temperatures
t20000, Tv20000, _, _, _, _, _ = np.loadtxt(file20000, skiprows=5, unpack=True)

# 1-D Transient Heat Conduction using Dsv
# -----------------------------------------------------------------------------

# number of nodes from center of particle (m=0) to surface (m)
m = 1000

# time vector from 0 to max time
tmax = 2.0                      # max time, s
nt = 1000                       # number of time steps
dt = tmax/nt                    # time step, s
t = np.arange(0, tmax+dt, dt)   # time vector, s

tmax2 = 20.0                    # max time for large particles, s
t2 = np.arange(0, tmax2+dt, dt) # time vector for large particles, s

# 1-D Transient Heat Conduction for DF = 200 um
# -----------------------------------------------------------------------------

# surface area to volume equivalent sphere diameter Dsv, m
dsv200 = dsv(sa200, v200)

# intraparticle temperature array [T] in Kelvin for Dsv case, b = 2 for sphere
# row = time step, column = node point from 0 to m
Tsv200 = hc2(dsv200, x, k, Gb, h, Ti, Tinf, 2, m, t)

# volume average temperature at each time step
vol200 = vol(dsv200, m)         # volumes in the sphere
Tvol200 = Tvol(Tsv200, vol200)  # Dsv volume average temperature profile

# 1-D Transient Heat Conduction for DF = 400 um
# -----------------------------------------------------------------------------

# surface area to volume equivalent sphere diameter Dsv, m
dsv400 = dsv(sa400, v400)

# intraparticle temperature array [T] in Kelvin for Dsv case, b = 2 for sphere
# row = time step, column = node point from 0 to m
Tsv400 = hc2(dsv400, x, k, Gb, h, Ti, Tinf, 2, m, t)

# volume average temperature at each time step
vol400 = vol(dsv400, m)         # volumes in the sphere
Tvol400 = Tvol(Tsv400, vol400)  # Dsv volume average temperature profile

# 1-D Transient Heat Conduction for DF = 700 um
# -----------------------------------------------------------------------------

# surface area to volume equivalent sphere diameter Dsv, m
dsv700 = dsv(sa700, v700)

# intraparticle temperature array [T] in Kelvin for Dsv case, b = 2 for sphere
# row = time step, column = node point from 0 to m
Tsv700 = hc2(dsv700, x, k, Gb, h, Ti, Tinf, 2, m, t)

# volume average temperature at each time step
vol700 = vol(dsv700, m)          # volumes in the sphere
Tvol700 = Tvol(Tsv700, vol700)   # Dsv volume average temperature profile

# 1-D Transient Heat Conduction for DF = 1400 um
# -----------------------------------------------------------------------------

# surface area to volume equivalent sphere diameter Dsv, m
dsv1400 = dsv(sa1400, v1400)

# intraparticle temperature array [T] in Kelvin for Dsv case, b = 2 for sphere
# row = time step, column = node point from 0 to m
Tsv1400 = hc2(dsv1400, x, k, Gb, h, Ti, Tinf, 2, m, t)

# volume average temperature at each time step
vol1400 = vol(dsv1400, m)           # volumes in the sphere
Tvol1400 = Tvol(Tsv1400, vol1400)   # Dsv volume average temperature profile

# 1-D Transient Heat Conduction for DF = 2800 um
# -----------------------------------------------------------------------------

# surface area to volume equivalent sphere diameter Dsv, m
dsv2800 = dsv(sa2800, v2800)

# intraparticle temperature array [T] in Kelvin for Dsv case, b = 2 for sphere
# row = time step, column = node point from 0 to m
Tsv2800 = hc2(dsv2800, x, k, Gb, h, Ti, Tinf, 2, m, t)

# volume average temperature at each time step
vol2800 = vol(dsv2800, m)           # volumes in the sphere
Tvol2800 = Tvol(Tsv2800, vol2800)   # Dsv volume average temperature profile

# 1-D Transient Heat Conduction for DF = 5400 um
# -----------------------------------------------------------------------------

# surface area to volume equivalent sphere diameter Dsv, m
dsv5400 = dsv(sa5400, v5400)

# intraparticle temperature array [T] in Kelvin for Dsv case, b = 2 for sphere
# row = time step, column = node point from 0 to m
Tsv5400 = hc2(dsv5400, x, k, Gb, h, Ti, Tinf, 2, m, t2)

# volume average temperature at each time step
vol5400 = vol(dsv5400, m)           # volumes in the sphere
Tvol5400 = Tvol(Tsv5400, vol5400)   # Dsv volume average temperature profile

# 1-D Transient Heat Conduction for DF = 10000 um
# -----------------------------------------------------------------------------

# surface area to volume equivalent sphere diameter Dsv, m
dsv10000 = dsv(sa10000, v10000)

# intraparticle temperature array [T] in Kelvin for Dsv case, b = 2 for sphere
# row = time step, column = node point from 0 to m
Tsv10000 = hc2(dsv10000, x, k, Gb, h, Ti, Tinf, 2, m, t2)

# volume average temperature at each time step
vol10000 = vol(dsv10000, m)            # volumes in the sphere
Tvol10000 = Tvol(Tsv10000, vol10000)   # Dsv volume average temperature profile

# 1-D Transient Heat Conduction for DF = 20000 um
# -----------------------------------------------------------------------------

# surface area to volume equivalent sphere diameter Dsv, m
dsv20000 = dsv(sa20000, v20000)

# intraparticle temperature array [T] in Kelvin for Dsv case, b = 2 for sphere
# row = time step, column = node point from 0 to m
Tsv20000 = hc2(dsv20000, x, k, Gb, h, Ti, Tinf, 2, m, t2)

# volume average temperature at each time step
vol20000 = vol(dsv20000, m)            # volumes in the sphere
Tvol20000 = Tvol(Tsv20000, vol20000)   # Dsv volume average temperature profile

# Plot Results
# -----------------------------------------------------------------------------

py.ion()
py.close('all')

def despine():
    ax = py.gca()
    ax.spines['top'].set_visible(False)
    ax.spines['right'].set_visible(False)
    py.tick_params(axis='both', bottom='off', top='off', left='off', right='off')

py.figure(1)
py.plot(t200, Tv200, 'co', mec='c', mew=2, mfc='none', label='Tv')
py.plot(t400, Tv400, 'co', mec='c', mew=2, mfc='none')
py.plot(t700, Tv700, 'co', mec='c', mew=2, mfc='none')
py.plot(t1400, Tv1400, 'co', mec='c', mew=2, mfc='none')
py.plot(t2800, Tv2800, 'co', mec='c', mew=2, mfc='none')
py.plot(t, Tvol200, 'r', lw=2, label='0.2 mm')
py.plot(t, Tvol400, 'g', lw=2, label ='0.4 mm')
py.plot(t, Tvol700, 'b', lw=2, label='0.7 mm')
py.plot(t, Tvol1400, 'm', lw=2, label='1.4 mm')
py.plot(t, Tvol2800, 'y', lw=2, label='2.8 mm')
py.axhline(Tinf, c='k', ls='--')
py.ylim(250, 800)
py.xlim(0, tmax)
py.title('White Oak with DF = 200-2800 um')
py.ylabel('Temperature (K)')
py.xlabel('Time (s)')
py.legend(loc='best', numpoints=1, frameon=False)
py.grid()
despine()

py.figure(2)
py.plot(t5400, Tv5400, 'co', mec='c', mew=2, mfc='none', label='Tv')
py.plot(t10000, Tv10000, 'co', mec='c', mew=2, mfc='none')
py.plot(t20000, Tv20000, 'co', mec='c', mew=2, mfc='none')
py.plot(t2, Tvol5400, lw=2, label ='5.4 mm')
py.plot(t2, Tvol10000, lw=2, label='10 mm')
py.plot(t2, Tvol20000, lw=2, label='20 mm')
py.axhline(Tinf, c='k', ls='--')
py.ylim(250, 800)
py.xlim(0, tmax2)
py.title('White Oak with DF = 5.4-20 mm')
py.ylabel('Temperature (K)')
py.xlabel('Time (s)')
py.legend(loc='best', numpoints=1, frameon=False)
py.grid()
despine()


text:
namespace System.Threading
{
    using System;
    using System.Runtime.Serialization;
    using System.Runtime.InteropServices;

    [Serializable]
    public sealed class ThreadStartException : SystemException
    {
        private ThreadStartException()
            : base(Environment.GetResourceString("Arg_ThreadStartException"))
        {
            SetErrorCode(__HResults.COR_E_THREADSTART);
        }

        private ThreadStartException(Exception reason)
            : base(Environment.GetResourceString("Arg_ThreadStartException"), reason)
        {
            SetErrorCode(__HResults.COR_E_THREADSTART);
        }

        //required for serialization
        internal ThreadStartException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }

    }
}


text:
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
import { FormItemRole } from '../../app/javascript/graphqlTypes.generated';
import {
  CommonFormFieldsFragment,
  CommonFormSectionFieldsFragment,
  CommonFormItemFieldsFragment,
} from '../../app/javascript/Models/commonFormFragments.generated';

export default function formFromExportJSON(exportJSON: any): CommonFormFieldsFragment {
  let formSectionId = 1;
  const formSections: CommonFormSectionFieldsFragment[] = [];

  exportJSON.sections.forEach((section: any) => {
    const { section_items: sectionItems, ...sectionProps } = section;

    const formItems: CommonFormItemFieldsFragment[] = [];
    let formItemId = 1;

    sectionItems.forEach((item: any) => {
      const {
        item_type: itemType,
        identifier,
        admin_description: adminDescription,
        public_description: publicDescription,
        default_value: defaultValue,
        ...properties
      } = item;

      formItems.push({
        __typename: 'FormItem',
        id: formItemId.toString(),
        position: formItemId,
        item_type: itemType,
        identifier,
        default_value: JSON.stringify(defaultValue ?? null),
        rendered_properties: JSON.stringify(properties),
        visibility: FormItemRole.Normal,
        writeability: FormItemRole.Normal,
      });
      formItemId += 1;
    });

    formSections.push({
      ...sectionProps,
      id: formSectionId.toString(),
      position: formSectionId,
      form_items: formItems,
    });

    formSectionId += 1;
  });

  return {
    __typename: 'Form',
    id: '1',
    title: exportJSON.title,
    form_type: exportJSON.form_type,
    form_sections: formSections,
  };
}


text:
package org.uberfire.ext.wires.core.client.layers;

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.event.Event;
import javax.inject.Inject;

import com.ait.lienzo.client.core.event.NodeMouseClickEvent;
import com.ait.lienzo.client.core.event.NodeMouseClickHandler;
import com.ait.lienzo.client.core.shape.Group;
import com.ait.lienzo.client.core.shape.Rectangle;
import com.ait.lienzo.client.core.shape.Text;
import com.ait.lienzo.shared.core.types.TextBaseLine;
import com.google.gwt.user.client.ui.Composite;
import org.uberfire.ext.wires.core.api.events.ShapeSelectedEvent;
import org.uberfire.ext.wires.core.api.factories.ShapeFactory;
import org.uberfire.ext.wires.core.api.factories.ShapeGlyph;
import org.uberfire.ext.wires.core.api.shapes.OverridesFactoryDescription;
import org.uberfire.ext.wires.core.api.shapes.WiresBaseShape;
import org.uberfire.ext.wires.core.client.util.ShapeFactoryUtil;

@ApplicationScoped
public class StencilLayerBuilder extends Composite {

    private static final int GLYPH_WIDTH = 25;
    private static final int GLYPH_HEIGHT = 25;

    @Inject
    private Event<ShapeSelectedEvent> shapeSelectedEvent;

    public LayerShape build(final WiresBaseShape shape,
                            final ShapeFactory factory) {
        final LayerShape layerShape = new LayerShape();
        final Rectangle bounding = drawBoundingBox();
        final ShapeGlyph glyph = factory.getGlyph();

        //Get display name to show in Panel
        final String name = (shape instanceof OverridesFactoryDescription) ? ((OverridesFactoryDescription) shape).getDescription() : factory.getShapeDescription();
        final Text description = drawDescription(name);

        //Clicking on the Shape selects it - Lienzo doesn't support bubbling click events down through
        //overlapping items as it uses a bitmap SelectionLayer to detect mouse-clicks. Therefore we need
        //to attach the handler to all elements
        final NodeMouseClickHandler handler = new NodeMouseClickHandler() {
            @Override
            public void onNodeMouseClick(final NodeMouseClickEvent nodeMouseClickEvent) {
                shapeSelectedEvent.fire(new ShapeSelectedEvent(shape));
            }
        };
        layerShape.addNodeMouseClickHandler(handler);

        //Build Layer Shape
        layerShape.setBounding(bounding);
        layerShape.setDescription(description);
        layerShape.setGroup(scaleGlyph(glyph));

        return layerShape;
    }

    private Group scaleGlyph(final ShapeGlyph glyph) {
        final double sx = GLYPH_WIDTH / glyph.getWidth();
        final double sy = GLYPH_HEIGHT / glyph.getHeight();
        final Group group = glyph.getGroup();
        return group.setX(ShapeFactoryUtil.HEIGHT_BOUNDING_LAYER / 2).setY(ShapeFactoryUtil.HEIGHT_BOUNDING_LAYER / 2).setScale(sx,
                                                                                sy);
    }

    private Rectangle drawBoundingBox() {
        final Rectangle boundingBox = new Rectangle(ShapeFactoryUtil.WIDTH_BOUNDING_LAYER,
                                                    ShapeFactoryUtil.HEIGHT_BOUNDING_LAYER);
        boundingBox.setStrokeColor(ShapeFactoryUtil.RGB_STROKE_BOUNDING)
                .setStrokeWidth(1)
                .setFillColor(ShapeFactoryUtil.RGB_FILL_BOUNDING)
                .setDraggable(false);
        return boundingBox;
    }

    private Text drawDescription(final String description) {
        Text text = new Text(description,
                             ShapeFactoryUtil.FONT_FAMILY_DESCRIPTION,
                             ShapeFactoryUtil.FONT_SIZE_DESCRIPTION);
        text.setFillColor(ShapeFactoryUtil.RGB_TEXT_DESCRIPTION);
        text.setTextBaseLine(TextBaseLine.MIDDLE);
        text.setX(40);
        text.setY(15);
        return text;
    }
}


text:
package ws.epigraph.url.parser.psi;

import java.util.List;
import org.jetbrains.annotations.*;
import com.intellij.psi.PsiElement;

public interface UrlReqParam extends PsiElement {

  @NotNull
  UrlDatum getDatum();

  @NotNull
  UrlQid getQid();

  @NotNull
  PsiElement getEq();

  @NotNull
  PsiElement getSemicolon();

}


text:
/**
 * BooleanWrapper
 * Constant signal of 0 or 1
 * v 0. 1. 0: first version
 */
"use strict";

var timbre = require("../timbre");
// __BEGIN__

var BooleanWrapper = (function() {
    var BooleanWrapper = function() {
        initialize.apply(this, arguments);
    }, $this = timbre.fn.buildPrototype(BooleanWrapper, {
        base: "kr-only",
        properties: {
            value: {
                set: function(val) {
                    this._.value = !!val;
                    changeTheValue.call(this);
                },
                get: function() { return this._.value; }
            },
            mul: {
                set: function(val) {
                    if (typeof val === "number") {
                        this._.mul = val;
                        changeTheValue.call(this);
                    }
                },
                get: function() { return this._.mul; }
            },
            add: {
                set: function(val) {
                    if (typeof val === "number") {
                        this._.add = val;
                        changeTheValue.call(this);
                    }
                },
                get: function() { return this._.mul; }
            },
        } // properties
    });

    var initialize = function(_args) {
        this._ = {};
        if (typeof _args[0] === "boolean") {
            this._.value = _args[0];
        } else{
            this._.value = false;
        }
    };

    var changeTheValue = function() {
        var x, cell, i, _ = this._;
        x = (_.value ? 1 : 0) * _.mul + _.add;
        cell = this.cell;
        for (i = cell.length; i--; ) {
            cell[i] = x;
        }
    };

    $this._.init = function() {
        this.value = this._.value;
    };

    $this.clone = function(deep) {
        var newone = timbre(this._.value);
        newone._.mul = this._.mul;
        newone._.add = this._.add;
        changeTheValue.call(newone);
        return timbre.fn.copyBaseArguments(this, newone, deep);
    };

    $this.bang = function() {
        this._.value = !this._.value;
        changeTheValue.call(this);
        timbre.fn.doEvent(this, "bang");
        return this;
    };

    return BooleanWrapper;
}());
timbre.fn.register("boolean", BooleanWrapper);

// __END__
global.BooleanWrapper = BooleanWrapper;

if (module.parent && !module.parent.parent) {
    describe("BooleanWrapper", function() {
        object_test(BooleanWrapper, true);
        describe("#value", function() {
            it("should equal true", function() {
                var instance = timbre(true);
                instance.value.should.equal(true);
            });
            it("should changed", function() {
                var instance = timbre(true);
                instance.value = false;
                instance.value.should.equal(false);
                instance.cell.should.eql(timbre(0).cell);

                instance.value = true;
                instance.value.should.equal(true);
                instance.cell.should.eql(timbre(1).cell);

                instance.value = false;
                instance.value = 1000;
                instance.value.should.equal(true);
            });
            it("should multiply", function() {
                var instance = timbre(true);
                instance.mul = 2;
                instance.cell.should.eql(timbre(2).cell);
            });
            it("should add", function() {
                var instance = timbre(false);
                instance.add = 3;
                instance.cell.should.eql(timbre(3).cell);
            });
            it("should multiply and add", function() {
                var instance = timbre(false);
                instance.mul = 2;
                instance.add = 3;
                instance.value = 10;
                instance.cell.should.eql(timbre(5).cell);
            });
        });
        describe("#bang()", function() {
            it("should toggle values", function() {
                var instance = timbre(true);
                instance.cell.should.eql(timbre(1).cell);
                instance.bang();
                instance.cell.should.eql(timbre(0).cell);
                instance.bang();
                instance.cell.should.eql(timbre(1).cell);
            });
        });
        describe("#clone()", function() {
            it("should have same values", function() {
                var instance = timbre(true);
                timbre(instance).value.should.equal(instance.value);
            });
        });
    });
}


text:
<?xml version="1.0" encoding="utf-8"?>
<GitBill xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Name> HB 118</Name>
  <Title> "An Act making an appropriation from the general fund to the community revenue sharing fund."
	</Title>
  <ShortTitle> APPROP: COMMUNITY REVENUE SHARING FUND   </ShortTitle>
  <StatusDate> 02/13/13</StatusDate>
  <StatusCopy><![CDATA[ (H) FIN                  ]]></StatusCopy>
  <Sponsors> REPRESENTATIVE(S) JOSEPHSON, Tuck</Sponsors>
  <Activity>
    <Description>(H)READ THE FIRST TIME - REFERRALS</Description>
    <Date>2013-02-13T00:00:00</Date>
    <Journal>02/13/13</Journal>
  </Activity>
  <Activity>
    <Description>(H)FIN</Description>
    <Date>2013-02-13T00:00:00</Date>
    <Journal>02/13/13</Journal>
  </Activity>
  <Activity>
    <Description>(H)REFERRED TO FINANCE</Description>
    <Date>2013-02-13T00:00:00</Date>
    <Journal>02/13/13</Journal>
  </Activity>
  <History>
    <Offered>02/13/2013</Offered>
    <OfferDate>2013-02-13T00:00:00</OfferDate>
    <PassedHouse xsi:nil="true" />
    <PassSenate xsi:nil="true" />
    <Version>HB0118A</Version>
    <Title>HB 118</Title>
  </History>
  <Revisions>
    <Version>HB0118A</Version>
    <Offer>02/13/2013</Offer>
    <Date>2013-02-13T00:00:00</Date>
    <BlobId>d35562a2174bb75f3df0e93d6837f034bf396942</BlobId>
  </Revisions>
  <CDataElement><![CDATA[
00                            HOUSE BILL NO. 118
01 "An Act making an appropriation from the general fund to the community revenue
02 sharing fund."
03 BE IT ENACTED BY THE LEGISLATURE OF THE STATE OF ALASKA:
04    * Section 1. FUND CAPITALIZATION. The sum of $90,000,000 is appropriated from the
05 general fund to the community revenue sharing fund (AS 29.60.850) for the purpose of
06 making community revenue sharing payments to municipalities, reserves, and communities
07 for any public purpose.
08    * Sec. 2.  LAPSE.  The appropriation made by sec. 1 of this Act is for the capitalization of a
09 fund and does not lapse under AS 29.60.850(a).
]]></CDataElement>
</GitBill>


text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/discoveryengine/v1beta/user_event.proto

package com.google.cloud.discoveryengine.v1beta;

public interface DocumentInfoOrBuilder
    extends
    // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.DocumentInfo)
    com.google.protobuf.MessageOrBuilder {

  /**
   *
   *
   *

   * Required. The Document resource ID.
   *

   *
   * string id = 1 [(.google.api.field_behavior) = REQUIRED];
   *
   * @return Whether the id field is set.
   */
  boolean hasId();
  /**
   *
   *
   *

   * Required. The Document resource ID.
   *

   *
   * string id = 1 [(.google.api.field_behavior) = REQUIRED];
   *
   * @return The id.
   */
  java.lang.String getId();
  /**
   *
   *
   *

   * Required. The Document resource ID.
   *

   *
   * string id = 1 [(.google.api.field_behavior) = REQUIRED];
   *
   * @return The bytes for id.
   */
  com.google.protobuf.ByteString getIdBytes();

  /**
   *
   *
   *

   * Required. The Document resource full name, of the form:
   * projects/<project_id>/locations/<location>/dataStores/<data_store_id>/branches/<branch_id>/documents/<document_id>
   *

   *
   *
   * string name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
   *
   *
   * @return Whether the name field is set.
   */
  boolean hasName();
  /**
   *
   *
   *

   * Required. The Document resource full name, of the form:
   * projects/<project_id>/locations/<location>/dataStores/<data_store_id>/branches/<branch_id>/documents/<document_id>
   *

   *
   *
   * string name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
   *
   *
   * @return The name.
   */
  java.lang.String getName();
  /**
   *
   *
   *

   * Required. The Document resource full name, of the form:
   * projects/<project_id>/locations/<location>/dataStores/<data_store_id>/branches/<branch_id>/documents/<document_id>
   *

   *
   *
   * string name = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
   *
   *
   * @return The bytes for name.
   */
  com.google.protobuf.ByteString getNameBytes();

  /**
   *
   *
   *

   * Quantity of the Document associated with the user event. Defaults to 1.
   * For example, this field will be 2 if two quantities of the same Document
   * are involved in a `add-to-cart` event.
   * Required for events of the following event types:
   * * `add-to-cart`
   * * `purchase`
   *

   *
   * optional int32 quantity = 3;
   *
   * @return Whether the quantity field is set.
   */
  boolean hasQuantity();
  /**
   *
   *
   *

   * Quantity of the Document associated with the user event. Defaults to 1.
   * For example, this field will be 2 if two quantities of the same Document
   * are involved in a `add-to-cart` event.
   * Required for events of the following event types:
   * * `add-to-cart`
   * * `purchase`
   *

   *
   * optional int32 quantity = 3;
   *
   * @return The quantity.
   */
  int getQuantity();

  /**
   *
   *
   *

   * The promotion IDs associated with this Document.
   * Currently, this field is restricted to at most one ID.
   *

   *
   * repeated string promotion_ids = 4;
   *
   * @return A list containing the promotionIds.
   */
  java.util.List<java.lang.String> getPromotionIdsList();
  /**
   *
   *
   *

   * The promotion IDs associated with this Document.
   * Currently, this field is restricted to at most one ID.
   *

   *
   * repeated string promotion_ids = 4;
   *
   * @return The count of promotionIds.
   */
  int getPromotionIdsCount();
  /**
   *
   *
   *

   * The promotion IDs associated with this Document.
   * Currently, this field is restricted to at most one ID.
   *

   *
   * repeated string promotion_ids = 4;
   *
   * @param index The index of the element to return.
   * @return The promotionIds at the given index.
   */
  java.lang.String getPromotionIds(int index);
  /**
   *
   *
   *

   * The promotion IDs associated with this Document.
   * Currently, this field is restricted to at most one ID.
   *

   *
   * repeated string promotion_ids = 4;
   *
   * @param index The index of the value to return.
   * @return The bytes of the promotionIds at the given index.
   */
  com.google.protobuf.ByteString getPromotionIdsBytes(int index);

  public com.google.cloud.discoveryengine.v1beta.DocumentInfo.DocumentDescriptorCase
      getDocumentDescriptorCase();
}


text:
package org.spongepowered.common.registry.type.world;

import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.Maps;
import org.spongepowered.api.registry.util.RegisterCatalog;
import org.spongepowered.api.world.schematic.BlockPaletteType;
import org.spongepowered.api.world.schematic.BlockPaletteTypes;
import org.spongepowered.common.registry.SpongeAdditionalCatalogRegistryModule;
import org.spongepowered.common.world.schematic.BimapPalette;
import org.spongepowered.common.world.schematic.GlobalPalette;
import org.spongepowered.common.world.schematic.SpongePaletteType;

import java.util.Collection;
import java.util.Locale;
import java.util.Map;
import java.util.Optional;

public class PaletteTypeRegistryModule implements SpongeAdditionalCatalogRegistryModule<BlockPaletteType> {

    @RegisterCatalog(BlockPaletteTypes.class) private final Map<String, BlockPaletteType> paletteMappings = Maps.newHashMap();

    @Override
    public void registerAdditionalCatalog(BlockPaletteType extraCatalog) {
        checkNotNull(extraCatalog);
        String id = extraCatalog.getId();
        checkArgument(id.indexOf(' ') == -1, "Palette Type ID " + id + " may not contain a space");
        this.paletteMappings.put(id.toLowerCase(Locale.ENGLISH), extraCatalog);
    }

    @Override
    public Optional<BlockPaletteType> getById(String id) {
        return Optional.ofNullable(this.paletteMappings.get(id));
    }

    @Override
    public Collection<BlockPaletteType> getAll() {
        return ImmutableList.copyOf(this.paletteMappings.values());
    }

    @Override
    public void registerDefaults() {
        registerAdditionalCatalog(new SpongePaletteType("global", () -> GlobalPalette.instance));
        registerAdditionalCatalog(new SpongePaletteType("local", BimapPalette::new));
    }

    @Override
    public boolean allowsApiRegistration() {
        return true;
    }

}