text:
package com.calendarfx.view;

import com.calendarfx.model.Calendar;
import com.calendarfx.model.Entry;
import impl.com.calendarfx.view.DayViewSkin;
import javafx.beans.Observable;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.scene.control.Skin;
import javafx.util.Callback;

import java.time.LocalDate;
import java.util.List;
import java.util.Optional;

import static java.util.Objects.requireNonNull;

/**
 * A view representing a single day. This view can be customized to show all 24
 * hours at equal height, compress the early and late hours (unused hours), or
 * to hide these hours altogether.
 *

 * The view uses a factory to create instances of {@link DayEntryView}.
 * Applications can plug in their own factory to customize the appearance of
 * entry views.
 *

 * New calendar entries can be created by double clicking in the background of
 * the view.
 *

 * The image below shows an example of this view with three entry views and
 * compressed early hours.
 *

 *
 *

 */
public class DayView extends DayViewBase {

    private static final String DAY_VIEW = "day-view"; //$NON-NLS-1$
    private static final String DAY_VIEW_TODAY = "today"; //$NON-NLS-1$
    private static final String DAY_VIEW_WEEKEND_DAY = "weekend-day"; //$NON-NLS-1$

    /**
     * Constructs a new day view.
     */
    public DayView() {
        getStyleClass().add(DAY_VIEW);

        todayProperty().addListener(evt -> updateStyleClasses());
        dateProperty().addListener(evt -> updateStyleClasses());
        selectionModeProperty().addListener(evt -> getSelections().clear());
        getWeekendDays().addListener((Observable it) -> updateStyleClasses());
        updateStyleClasses();

        setEntryViewFactory(DayEntryView::new);

        new CreateDeleteHandler(this);
    }

    @Override
    protected Skin<?> createDefaultSkin() {
        return new DayViewSkin<>(this);
    }

    private void updateStyleClasses() {
        LocalDate date = getDate();
        if (date.equals(getToday())) {
            if (!getStyleClass().contains(DAY_VIEW_TODAY)) {
                getStyleClass().add(DAY_VIEW_TODAY);
            }
        } else {
            getStyleClass().remove(DAY_VIEW_TODAY);
        }

        if (getWeekendDays().contains(date.getDayOfWeek())) {
            if (!getStyleClass().contains(DAY_VIEW_WEEKEND_DAY)) {
                getStyleClass().add(DAY_VIEW_WEEKEND_DAY);
            }
        } else {
            getStyleClass().remove(DAY_VIEW_WEEKEND_DAY);
        }
    }

    @Override
    public Optional<Calendar> getCalendarAt(double x, double y) {
        if (getLayout().equals(Layout.SWIMLANE)) {
            List<Calendar> visibleCalendars = getCalendars()
                    .filtered(this::isCalendarVisible);
            double calendarWidth = getWidth() / visibleCalendars.size();
            int index = (int) (x / calendarWidth);
            if (index < visibleCalendars.size()) {
                return Optional.of(visibleCalendars.get(index));
            }
        }

        return Optional.empty();
    }

    private final ObjectProperty<Callback<Entry<?>, DayEntryView>> entryViewFactory = new SimpleObjectProperty<>(
            this, "entryViewFactory"); //$NON-NLS-1$

    /**
     * A factory used for creating instances of {@link DayEntryView} for each
     * calendar entry that needs to be shown in this day view.
     *
     * @return the day entry view factory
     */
    public final ObjectProperty<Callback<Entry<?>, DayEntryView>> entryViewFactoryProperty() {
        return entryViewFactory;
    }

    /**
     * Returns the value of {@link #entryViewFactoryProperty()}.
     *
     * @return the entry view factory
     */
    public final Callback<Entry<?>, DayEntryView> getEntryViewFactory() {
        return entryViewFactoryProperty().get();
    }

    /**
     * Sets the value of {@link #entryViewFactoryProperty()}.
     *
     * @param factory
     *            the entry view factory
     */
    public final void setEntryViewFactory(
            Callback<Entry<?>, DayEntryView> factory) {
        requireNonNull(factory);
        entryViewFactoryProperty().set(factory);
    }
}


text:
import { Personel } from './../components/personels/personel';
import { PERSONELS } from  './dummies/personels';
import { PERSONEL } from './dummies/personel';
import {Injectable} from '@angular/core';
import {Http} from '@angular/http';
import 'rxjs/add/operator/map';

@Injectable()
export class PersonelService {
  constructor() { }

  createPersonel(personel: Personel) {
    return Promise.resolve({
      success: true
    });
  }

  getPersonels():Promise<Personel[]> {
    return Promise.resolve(PERSONELS);
  }

  getPersonel(personelId: number):Promise<Personel> {
    return Promise.resolve(PERSONEL);
  }

  updatePersonel(updatePersonel: Personel) {
    return Promise.resolve({
      success: true
    })
  }

  deletePersonel(id: number) {
    return Promise.resolve({
      success: true
    })
  }

}

  // deletePersonel(1).then((data) => {
  //
  // }, (data) => {
  //
  // })

}

redpajama_set_name: RedPajamaGithub


text:
package org.opencv.ximgproc;

import org.opencv.core.Algorithm;
import org.opencv.core.Mat;

// C++: class DTFilter
//javadoc: DTFilter

public class DTFilter extends Algorithm {

    protected DTFilter(long addr) { super(addr); }

    // internal usage only
    public static DTFilter __fromPtr__(long addr) { return new DTFilter(addr); }

    //
    // C++:  void filter(Mat src, Mat& dst, int dDepth = -1)
    //

    //javadoc: DTFilter::filter(src, dst, dDepth)
    public  void filter(Mat src, Mat dst, int dDepth)
    {

        filter_0(nativeObj, src.nativeObj, dst.nativeObj, dDepth);

        return;
    }

    //javadoc: DTFilter::filter(src, dst)
    public  void filter(Mat src, Mat dst)
    {

        filter_1(nativeObj, src.nativeObj, dst.nativeObj);

        return;
    }

    @Override
    protected void finalize() throws Throwable {
        delete(nativeObj);
    }

    // C++:  void filter(Mat src, Mat& dst, int dDepth = -1)
    private static native void filter_0(long nativeObj, long src_nativeObj, long dst_nativeObj, int dDepth);
    private static native void filter_1(long nativeObj, long src_nativeObj, long dst_nativeObj);

    // native support for java finalize()
    private static native void delete(long nativeObj);

}


text:
<?php

class FormStateType {
	const FILE = 1;
	const FORM = 2;
}

class FormState {

	const Type = FormStateType::FORM;

	protected static $strSerialized;

	public static function Save($obj) {
		self::$strSerialized = base64_encode(serialize($obj));
		file_put_contents('./cache/formstate/' . session_id(), self::$strSerialized);
	}

	public static function Retrieve() {
		$obj = null;
		$strFileName = './cache/formstate/' . session_id();
		if (file_exists($strFileName)) {
			self::$strSerialized = file_get_contents('./cache/formstate/' . session_id());
			if (self::$strSerialized) {
				$obj = unserialize(base64_decode(self::$strSerialized));
			}
		}
		return $obj;
	}

	public static function Get() {
		return self::$strSerialized;
	}
}
?>


text:
SET NTrials=200
SET packet=0

:packetloop

SET trial=0
:trialsloop
del *.txt
WaveletCoder.exe pendulum.cfg Target=375
BitStreamExtractor.exe stream.wfc stream_out.wfc QualityLevel=1 SpatialLevel=3 TemporalLevel=4 ploss=0.%packet% randomizer=0
WaveletCoder.exe decoder.cfg InputFile=stream_out.wfc OutputFile=dec.yuv
SET filename=..\PendulumEncoded\%packet%_%trial%.avi
del %filename%
avconv -s 160x360 -i dec.yuv -vf crop=160:330:0:0 %filename%
IF %trial%==%NTrials% GOTO finishedtrials
SET /A trial=trial+1
GOTO trialsloop
:finishedtrials

if %packet%==9 GOTO finishedpacket
SET /A packet=packet+1
GOTO packetloop
:finishedpacket

echo FINISHED


text:
/* 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.
 */
package org.flowable.test.ldap;

import java.lang.reflect.Method;
import java.util.Vector;

import javax.annotation.Resource;

import junit.framework.Test;

import org.flowable.spring.impl.test.SpringFlowableTestCase;
import org.springframework.security.ldap.server.ApacheDSContainer;

/**
 * Parts of this class come from http://www.kimchy.org/before_after_testcase_with_junit/
 *
 * @author Joram Barrez
 */
public class LDAPTestCase extends SpringFlowableTestCase {

  private static int testCount;
  private static int totalTestCount = -1;
  private static boolean disableAfterTestCase;

  @Resource(name = "org.springframework.security.apacheDirectoryServerContainer")
  private ApacheDSContainer apacheDSContainer;

  protected LDAPTestCase() {
    super();
  }

  public void runBare() throws Throwable {
    Throwable exception = null;
    if (totalTestCount == -1) {
      totalTestCount = countTotalTests();
    }
    if (testCount == 0) {
      beforeTestCase();
    }
    testCount++;
    try {
      super.runBare();
    } catch (Throwable running) {
      exception = running;
    }
    if (testCount == totalTestCount) {
      totalTestCount = -1;
      testCount = 0;
      if (!disableAfterTestCase) {
        try {
          afterTestCase();
        } catch (Exception afterTestCase) {
          if (exception == null)
            exception = afterTestCase;
        }
      } else {
        disableAfterTestCase = false;
      }
    }
    if (exception != null)
      throw exception;
  }

  protected static void disableAfterTestCase() {
    disableAfterTestCase = true;
  }

  protected void beforeTestCase() throws Exception {

  }

  protected void afterTestCase() throws Exception {
    // Need to do this 'manually', or otherwise the ldap server won't be
    // shut down properly
    // on the QA machine, failing the next tests
    apacheDSContainer.stop();
  }

  private int countTotalTests() {
    int count = 0;
    Class superClass = getClass();
    Vector names = new Vector();
    while (Test.class.isAssignableFrom(superClass)) {
      Method[] methods = superClass.getDeclaredMethods();
      for (Method method : methods) {
        String name = method.getName();
        if (names.contains(name))
          continue;
        names.addElement(name);
        if (isTestMethod(method)) {
          count++;
        }
      }
      superClass = superClass.getSuperclass();
    }
    return count;
  }

  private boolean isTestMethod(Method m) {
    String name = m.getName();
    Class[] parameters = m.getParameterTypes();
    Class returnType = m.getReturnType();
    return parameters.length == 0 && name.startsWith("test") && returnType.equals(Void.TYPE);
  }

}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="Congressive" content="">
    <meta name="Manvi Goyal" content="June 2015">

    <title>Congressive</title>

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

    <link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Merriweather:400,300,300italic,400italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="font-awesome/css/font-awesome.min.css" type="text/css">

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

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

                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    Toggle navigation

                </button>
                Congressive

                        About

                        Services

                        Contact

Congressive

Congress at Your Fingertips

                Find Out More

It's in the App Store!

Congressive is an application which enables users to contact their officials in Congress. Users can look up their home locations to more easily access information about their elected officials, including each elected official's top campaign contributors.

This application is not for profit, and is powered by the Sunlight Foundation's Congress and Influence Explorer APIs.

                    Download Now

At Your Service

Search

Search for your local representatives.

Contact

Find out how to contact them and where their offices are located.

Up to Date

Find out their top donors and basic information about them.

Reach Out

Your voice matters so reach out to your representatives!

Get in Touch!

Have a bug that has made Congressive stop working? Are you receiving the wrong representatives? Message Congressive Support here to get the app working again.

feedback@startbootstrap.com

©2015 Manvi Goyal


text:
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

$chartsStrings = return_module_language($GLOBALS['current_language'], 'Charts');

$chartDefs = array(
	'pipeline_by_sales_stage'=>
		array( 	'type' => 'code',
				'id' => 'Chart_pipeline_by_sales_stage',
				'label' => $chartsStrings['LBL_CHART_PIPELINE_BY_SALES_STAGE'],
				'chartUnits' => $chartsStrings['LBL_OPP_SIZE'] . ' $1' . $chartsStrings['LBL_OPP_THOUSANDS'],
				'chartType' => 'horizontal group by chart',
				'groupBy' => array( 'sales_stage', 'user_name' ),
				'base_url'=>
					array( 	'module' => 'Opportunities',
							'action' => 'index',
							'query' => 'true',
							'searchFormTab' => 'advanced_search',
						 ),
				'url_params' => array( 'assigned_user_id', 'sales_stage', 'date_start', 'date_closed' ),
			),
	'lead_source_by_outcome'=>
		array(	'type' => 'code',
				'id' => 'Chart_lead_source_by_outcome',
				'label' => $chartsStrings['LBL_CHART_LEAD_SOURCE_BY_OUTCOME'],
				'chartUnits' => '',
				'chartType' => 'horizontal group by chart',
				'groupBy' => array( 'lead_source', 'sales_stage' ),
				'base_url'=>
					array( 	'module' => 'Opportunities',
							'action' => 'index',
							'query' => 'true',
							'searchFormTab' => 'advanced_search',
						 ),
				'url_params' => array( 'lead_source', 'sales_stage', 'date_start', 'date_closed' ),
			 ),
	'outcome_by_month'=>
		array(	'type' => 'code',
				'id' => 'Chart_outcome_by_month',
				'label' => $chartsStrings['LBL_CHART_OUTCOME_BY_MONTH'],
				'chartUnits' => $chartsStrings['LBL_OPP_SIZE'] . ' $1' . $chartsStrings['LBL_OPP_THOUSANDS'],
				'chartType' => 'stacked group by chart',
				'groupBy' => array( 'm', 'sales_stage', ),
				'base_url'=>
					array( 	'module' => 'Opportunities',
							'action' => 'index',
							'query' => 'true',
							'searchFormTab' => 'advanced_search',
						 ),
				'url_params' => array( 'sales_stage', 'date_closed' ),
			 ),
	'pipeline_by_lead_source'=>
		array(	'type' => 'code',
				'id' => 'Chart_pipeline_by_lead_source',
				'label' => $chartsStrings['LBL_CHART_PIPELINE_BY_LEAD_SOURCE'],
				'chartUnits' => $chartsStrings['LBL_OPP_SIZE'] . ' $1' . $chartsStrings['LBL_OPP_THOUSANDS'],
				'chartType' => 'pie chart',
				'groupBy' => array( 'lead_source', ),
				'base_url'=>
					array( 	'module' => 'Opportunities',
							'action' => 'index',
							'query' => 'true',
							'searchFormTab' => 'advanced_search',
						 ),
				'url_params' => array( 'lead_source', ),
			 ),

	'my_modules_used_last_30_days' =>
		array( 	'type' => 'code',
				'id' => 'my_modules_used_last_30_days',
				'label' => $chartsStrings['LBL_CHART_MY_MODULES_USED_30_DAYS'],
				'chartType' => 'horizontal bar chart',
				'chartUnits' => $chartsStrings['LBL_MY_MODULES_USED_SIZE'],
				'groupBy' => array( 'module_name'),
				'base_url'=>
					array( 	'module' => 'Trackers',
							'action' => 'index',
							'query' => 'true',
							'searchFormTab' => 'advanced_search',
						 ),

		),

);

if(file_exists('custom/Charts/chartDefs.ext.php')){
	include_once('custom/Charts/chartDefs.ext.php');
}
?>


text:
/**
 * Created by Peter on 2016. 11. 20..
 */
"use strict";

var assert  = require('assert');
var config = require('../../config/config');
var Logger = require('../../lib/log');
var controllerKeys = require('../../controllers/worldWeather/controllerKeys');
var mongoose = require('mongoose');

global.log  = new Logger(__dirname + "/debug.log");

describe('controller unit test - collector', function(){
    it('test controller keys', function(done){
        var cKeys = new controllerKeys();

        var owm = cKeys.getOwmKey();
        var wu = cKeys.getWuKey();
        var dsf = cKeys.getDsfKey();

        log.info('owm key : ', owm);
        log.info('wu key : ', wu);
        log.info('dsf key : ', dsf);

        cKeys.setKeyLimit('dsf', 3);
        cKeys.addKey('dsf', {key: '1111111111'});
        cKeys.addKey('dsf', {key: '2222222222'});
        cKeys.addKey('dsf', {key: '3333333333'});

        for(var i = 0 ; i< 12 ; i++){
            dsf = cKeys.getDsfKey();
            log.info('dsf key[', i, '] : ', dsf);
        }

        var nextDate = new Date();
        nextDate.setDate(nextDate.getDay() + 1);

        log.info('Set another day to dsf key info');

        cKeys.setDate('dsf', nextDate);

        for(var i = 0 ; i< 13 ; i++){
            dsf = cKeys.getDsfKey();
            log.info('dsf key[', i, '] : ', dsf);
        }

        done();
    });
});


text:
require 'gloves/version'

module Gloves; end


text:
import{doe}from             '/lib/core.static.js'
import PluginsPage from     './ControlPanel/PluginsPage.js'
import UsersPage from       './ControlPanel/UsersPage.js'
import SitesPage from       './ControlPanel/SitesPage.js'
import style from           './ControlPanel/style.js'
function ControlPanel(site){
    let
        focusedPage
    this.load=page=>{
        if(focusedPage)
            this._div_page.removeChild(focusedPage.mainDiv)
        focusedPage=this._pages[page]
        focusedPage.isInitialized||focusedPage.initialize()
        this._div_page.appendChild(focusedPage.mainDiv)
    }
    this.loadPlugins=site.applyPlugins('settings',this)
    this._pages={
        sites:      new SitesPage({
            getEnvironmentvariables:()=>
                site.send('getEnvironmentvariables'),
            updateEnvironmentvariableById:(id,content)=>
                site.send({
                    function:   'updateEnvironmentvariableById',
                    id,
                    content,
                })
        }),
        users:      new UsersPage(site),
        plugins:    new PluginsPage(site),
    }
}
ControlPanel.prototype.createUi=function(){
    return doe.div({className:'root'},
        doe.h1(doe.a({href:'control-panel'},'Control Panel')),
        doe.div({style:'width:100%'},
            this._div_menu=doe.div({
                    className:'menu',
                },
                doe.a({
                    href:'javascript:',
                    onclick:_=>this.load('sites'),
                },'Sites'),
                ' ',
                doe.a({
                    href:'javascript:',
                    onclick:_=>this.load('users'),
                },'Users'),
                ' ',
                doe.a({
                    href:'javascript:',
                    onclick:_=>this.load('plugins'),
                },'Plugins'),
            ),
            this._div_page=doe.div({
                className:'page',
                style:'width:100%'
            }),
        ),
    )
}
ControlPanel.style=doe.style(style)
export default ControlPanel


text:
package org.apache.tinkerpop.gremlin.tinkergraph.process.computer;

import org.apache.commons.lang3.concurrent.BasicThreadFactory;
import org.apache.tinkerpop.gremlin.process.computer.MapReduce;
import org.apache.tinkerpop.gremlin.process.computer.VertexProgram;
import org.apache.tinkerpop.gremlin.process.computer.util.MapReducePool;
import org.apache.tinkerpop.gremlin.process.computer.util.VertexProgramPool;

import java.util.concurrent.CompletionService;
import java.util.concurrent.ExecutorCompletionService;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.function.Consumer;

/**
 * @author Marko A. Rodriguez (http://markorodriguez.com)
 * @author Stephen Mallette (http://stephen.genoprime.com)
 */
public final class TinkerWorkerPool implements AutoCloseable {

    private static final BasicThreadFactory THREAD_FACTORY_WORKER = new BasicThreadFactory.Builder().namingPattern("tinker-worker-%d").build();

    private final int numberOfWorkers;
    private final ExecutorService workerPool;
    private final CompletionService<Object> completionService;

    private VertexProgramPool vertexProgramPool;
    private MapReducePool mapReducePool;

    public TinkerWorkerPool(final int numberOfWorkers) {
        this.numberOfWorkers = numberOfWorkers;
        this.workerPool = Executors.newFixedThreadPool(numberOfWorkers, THREAD_FACTORY_WORKER);
        this.completionService = new ExecutorCompletionService<>(this.workerPool);
    }

    public void setVertexProgram(final VertexProgram vertexProgram) {
        this.vertexProgramPool = new VertexProgramPool(vertexProgram, this.numberOfWorkers);
    }

    public void setMapReduce(final MapReduce mapReduce) {
        this.mapReducePool = new MapReducePool(mapReduce, this.numberOfWorkers);
    }

    public void executeVertexProgram(final Consumer<VertexProgram> worker) throws InterruptedException {
        for (int i = 0; i < this.numberOfWorkers; i++) {
            this.completionService.submit(() -> {
                final VertexProgram vp = this.vertexProgramPool.take();
                worker.accept(vp);
                this.vertexProgramPool.offer(vp);
                return null;
            });
        }
        for (int i = 0; i < this.numberOfWorkers; i++) {
            try {
                this.completionService.take().get();
            } catch (InterruptedException ie) {
                throw ie;
            } catch (final Exception e) {
                throw new IllegalStateException(e.getMessage(), e);
            }
        }
    }

    public void executeMapReduce(final Consumer<MapReduce> worker) throws InterruptedException {
        for (int i = 0; i < this.numberOfWorkers; i++) {
            this.completionService.submit(() -> {
                final MapReduce mr = this.mapReducePool.take();
                worker.accept(mr);
                this.mapReducePool.offer(mr);
                return null;
            });
        }
        for (int i = 0; i < this.numberOfWorkers; i++) {
            try {
                this.completionService.take().get();
            } catch (InterruptedException ie) {
                throw ie;
            } catch (final Exception e) {
                throw new IllegalStateException(e.getMessage(), e);
            }
        }
    }

    public void closeNow() throws Exception {
        this.workerPool.shutdownNow();
    }

    @Override
    public void close() throws Exception {
        this.workerPool.shutdown();
    }
}


text:
package stubs

import (
	"fmt"

	"google.golang.org/api/googleapi"
	"k8s.io/kubernetes/federation/pkg/dnsprovider/providers/google/clouddns/internal/interfaces"
)

// Compile time check for interface adeherence
var _ interfaces.ManagedZonesDeleteCall = ManagedZonesDeleteCall{}

type ManagedZonesDeleteCall struct {
	Service  *ManagedZonesService
	Project  string
	ZoneName string
	Error    *error // Use this to overide response for testing if required
}

func (call ManagedZonesDeleteCall) Do(opts ...googleapi.CallOption) error {
	if call.Error != nil { // Return the override value
		return *call.Error
	} else { // Just try to delete it from the in-memory array.
		project, ok := call.Service.Impl[call.Project]
		if ok {
			zone, ok := project[call.ZoneName]
			if ok {
				delete(project, zone.Name())
				return nil
			} else {
				return fmt.Errorf("Failed to find zone %s in project %s to delete it", call.ZoneName, call.Project)
			}
		} else {
			return fmt.Errorf("Failed to find project %s to delete zone %s from it", call.Project, call.ZoneName)
		}
	}
}


text:
package org.eclipse.ceylon.compiler.java.language;

/**
 * Error used by the compiler when an expression or statement
 * (that's not a declaration) has typechecker errors.
 */
public class UnresolvedCompilationError extends Error {

    private static final long serialVersionUID = -6034493434470699238L;

    public UnresolvedCompilationError() {
        super();
    }

    public UnresolvedCompilationError(String message, Throwable cause) {
        super(message, cause);
    }

    public UnresolvedCompilationError(String message) {
        super(message);
    }

    public UnresolvedCompilationError(Throwable cause) {
        super(cause);
    }

}


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

<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:alignmentMode="alignBounds"
    android:columnCount="1" >

    <Spinner
        android:id="@+id/spinner"
        android:layout_gravity="fill_horizontal"
        android:drawSelectorOnTop="true" >
    </Spinner>

    <Button
        android:id="@+id/trigger"
        android:onClick="intentSelected"
        android:layout_gravity="fill_horizontal"
        android:text="@string/trigger" >
    </Button>
    <TextView>
        android:onClick="intentSelected"
        android:layout_gravity="fill_horizontal"
        android:text="@string/usage" >
    </TextView>

</GridLayout>


text:
<?php
namespace keeko\tools\command;

use keeko\framework\utils\NameUtils;
use keeko\tools\generator\ember\EmberSerializerGenerator;
use keeko\tools\model\Project;
use keeko\tools\ui\EmberUI;
use phootwork\file\File;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class GenerateEmberSerializerCommand extends AbstractEmberCommand {

	protected function configure() {
		$this
			->setName('generate:ember:serializer')
			->setDescription('Generates ember serializers');

		parent::configure();
	}

	protected function interact(InputInterface $input, OutputInterface $output) {
		$ui = new EmberUI($this);
		$ui->show();
	}

	protected function execute(InputInterface $input, OutputInterface $output) {
		$project = $this->getProject();
		$package = $project->getPackage();
		if ($package->getType() != 'keeko-module') {
			throw new \RuntimeException('Package must be of type `keeko-module`');
		}
		$module = $project->getPackage()->getKeeko()->getModule();
		$this->modelService->read($project);
		$models = $this->modelService->getModels();
		$generator = new EmberSerializerGenerator($this->service, $project);
		$output = $this->io->getOutput();

		foreach ($models as $model) {
			$contents = $generator->generate($model);
			if ($contents !== null) {
				$filename = sprintf('%s/ember/app/serializers/%s/%s.js', $this->project->getRootPath(),
					str_replace('.', '/', $module->getSlug()), NameUtils::dasherize($model->getPhpName()));
				$file = new File($filename);
				$file->write($contents);
				$output->writeln(sprintf('Serializer <info>%s</info> written at <info>%s</info>',
					$model->getOriginCommonName(), $filename));
			}
		}
	}

}


text:
using MathNet.Numerics.LinearAlgebra;
using MathNet.Numerics.LinearAlgebra.Double;
using NUnit.Framework;
using System;
using System.Collections.Generic;

namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Double
{
    ///
    /// Dense vector tests.
    ///
    public class DenseVectorTests : VectorTests
    {
        ///
        /// Creates a new instance of the Vector class.
        ///
        /// <param name="size">The size of the Vector to construct.</param>
        /// <returns>The new <c>Vector</c>.</returns>
        protected override Vector<double> CreateVector(int size)
        {
            return Vector<double>.Build.Dense(size);
        }

        ///
        /// Creates a new instance of the Vector class.
        ///
        /// <param name="data">The array to create this vector from.</param>
        /// <returns>The new <c>Vector</c>.</returns>
        protected override Vector<double> CreateVector(IList<double> data)
        {
            var vector = Vector<double>.Build.Dense(data.Count);
            for (var index = 0; index < data.Count; index++)
            {
                vector[index] = data[index];
            }

            return vector;
        }

        ///
        /// Can create a dense vector form array.
        ///
        [Test]
        public void CanCreateDenseVectorFromArray()
        {
            var data = new double[Data.Length];
            Array.Copy(Data, data, Data.Length);
            var vector = Vector<double>.Build.Dense(data);

            for (var i = 0; i < data.Length; i++)
            {
                Assert.AreEqual(data[i], vector[i]);
            }

            vector[0] = 100.0;
            Assert.AreEqual(100.0, data[0]);
        }

        ///
        /// Can create a dense vector from another dense vector.
        ///
        [Test]
        public void CanCreateDenseVectorFromAnotherDenseVector()
        {
            var vector = Vector<double>.Build.Dense(Data);
            var other = Vector<double>.Build.DenseOfVector(vector);

            Assert.AreNotSame(vector, other);
            for (var i = 0; i < Data.Length; i++)
            {
                Assert.AreEqual(vector[i], other[i]);
            }
        }

        ///
        /// Can create a dense vector from another vector.
        ///
        [Test]
        public void CanCreateDenseVectorFromAnotherVector()
        {
            var vector = Vector<double>.Build.Dense(Data);
            var other = Vector<double>.Build.DenseOfVector(vector);

            Assert.AreNotSame(vector, other);
            for (var i = 0; i < Data.Length; i++)
            {
                Assert.AreEqual(vector[i], other[i]);
            }
        }

        ///
        /// Can create a dense vector from user defined vector.
        ///
        [Test]
        public void CanCreateDenseVectorFromUserDefinedVector()
        {
            var vector = new UserDefinedVector(Data);
            var other = Vector<double>.Build.DenseOfVector(vector);

            for (var i = 0; i < Data.Length; i++)
            {
                Assert.AreEqual(vector[i], other[i]);
            }
        }

        ///
        /// Can create a dense vector with constant values.
        ///
        [Test]
        public void CanCreateDenseVectorWithConstantValues()
        {
            var vector = Vector<double>.Build.Dense(5, 5);
            foreach (var t in vector)
            {
                Assert.AreEqual(t, 5);
            }
        }

        ///
        /// Can create a dense matrix.
        ///
        [Test]
        public void CanCreateDenseMatrix()
        {
            var vector = Vector<double>.Build.Dense(3);
            var matrix = Matrix<double>.Build.SameAs(vector, 2, 3);
            Assert.IsInstanceOf<DenseMatrix>(matrix);
            Assert.AreEqual(2, matrix.RowCount);
            Assert.AreEqual(3, matrix.ColumnCount);
        }

        ///
        /// Can convert a dense vector to an array.
        ///
        [Test]
        public void CanConvertDenseVectorToArray()
        {
            var vector = new DenseVector(Data);
            var array = (double[])vector;
            Assert.IsInstanceOf(typeof(double[]), array);
            CollectionAssert.AreEqual(vector, array);
        }

        ///
        /// Can convert an array to a dense vector.
        ///
        [Test]
        public void CanConvertArrayToDenseVector()
        {
            var array = new[] { 0.0, 1.0, 2.0, 3.0, 4.0 };
            var vector = (DenseVector)array;
            Assert.IsInstanceOf(typeof(DenseVector), vector);
            CollectionAssert.AreEqual(array, array);
        }

        ///
        /// Can call unary plus operator on a vector.
        ///
        [Test]
        public void CanCallUnaryPlusOperatorOnDenseVector()
        {
            var vector = Vector<double>.Build.Dense(Data);
            var other = +vector;
            for (var i = 0; i < Data.Length; i++)
            {
                Assert.AreEqual(vector[i], other[i]);
            }
        }

        ///
        /// Can add two dense vectors using "+" operator.
        ///
        [Test]
        public void CanAddTwoDenseVectorsUsingOperator()
        {
            var vector = Vector<double>.Build.Dense(Data);
            var other = Vector<double>.Build.Dense(Data);
            var result = vector + other;
            CollectionAssert.AreEqual(Data, vector, "Making sure the original vector wasn't modified.");
            CollectionAssert.AreEqual(Data, other, "Making sure the original vector wasn't modified.");

            for (var i = 0; i < Data.Length; i++)
            {
                Assert.AreEqual(Data[i] * 2.0, result[i]);
            }
        }

        ///
        /// Can call unary negate operator on a dense vector.
        ///
        [Test]
        public void CanCallUnaryNegationOperatorOnDenseVector()
        {
            var vector = Vector<double>.Build.Dense(Data);
            var other = -vector;
            for (var i = 0; i < Data.Length; i++)
            {
                Assert.AreEqual(-Data[i], other[i]);
            }
        }

        ///
        /// Can subtract two dense vectors using "-" operator.
        ///
        [Test]
        public void CanSubtractTwoDenseVectorsUsingOperator()
        {
            var vector = Vector<double>.Build.Dense(Data);
            var other = Vector<double>.Build.Dense(Data);
            var result = vector - other;
            CollectionAssert.AreEqual(Data, vector, "Making sure the original vector wasn't modified.");
            CollectionAssert.AreEqual(Data, other, "Making sure the original vector wasn't modified.");

            for (var i = 0; i < Data.Length; i++)
            {
                Assert.AreEqual(0.0, result[i]);
            }
        }

        ///
        /// Can multiply a dense vector by a scalar using "*" operator.
        ///
        [Test]
        public void CanMultiplyDenseVectorByScalarUsingOperators()
        {
            var vector = Vector<double>.Build.Dense(Data);
            vector = vector * 2.0;

            for (var i = 0; i < Data.Length; i++)
            {
                Assert.AreEqual(Data[i] * 2.0, vector[i]);
            }

            vector = vector * 1.0;
            for (var i = 0; i < Data.Length; i++)
            {
                Assert.AreEqual(Data[i] * 2.0, vector[i]);
            }

            vector = Vector<double>.Build.Dense(Data);
            vector = 2.0 * vector;

            for (var i = 0; i < Data.Length; i++)
            {
                Assert.AreEqual(Data[i] * 2.0, vector[i]);
            }

            vector = 1.0 * vector;
            for (var i = 0; i < Data.Length; i++)
            {
                Assert.AreEqual(Data[i] * 2.0, vector[i]);
            }
        }

        ///
        /// Can divide a dense vector by a scalar using "/" operator.
        ///
        [Test]
        public void CanDivideDenseVectorByScalarUsingOperators()
        {
            var vector = Vector<double>.Build.Dense(Data);
            vector = vector / 2.0;

            for (var i = 0; i < Data.Length; i++)
            {
                Assert.AreEqual(Data[i] / 2.0, vector[i]);
            }

            vector = vector / 1.0;
            for (var i = 0; i < Data.Length; i++)
            {
                Assert.AreEqual(Data[i] / 2.0, vector[i]);
            }
        }

        ///
        /// Can calculate an outer product for a dense vector.
        ///
        [Test]
        public void CanCalculateOuterProductForDenseVector()
        {
            var vector1 = CreateVector(Data);
            var vector2 = CreateVector(Data);
            var m = Vector<double>.OuterProduct(vector1, vector2);
            for (var i = 0; i < vector1.Count; i++)
            {
                for (var j = 0; j < vector2.Count; j++)
                {
                    Assert.AreEqual(m[i, j], vector1[i] * vector2[j]);
                }
            }
        }

        [Test]
        public void VectorToVectorString()
        {
            var v = Vector<double>.Build.Dense(20);
            for (int i = 1; i < 25; i++)
            {
                GC.KeepAlive(v.ToVectorString(i, 80));
            }
        }
    }
}


text:
// [!output PROJECT_NAME].cpp : main source file for [!output PROJECT_NAME].exe
//

#include "stdafx.h"
[!if !WTL_USE_CPP_FILES]

#include <atlframe.h>
#include <atlctrls.h>
[!if WTL_USE_VIEW && WTL_VIEWTYPE_PROPSHEET]
#define _WTL_NEW_PAGE_NOTIFY_HANDLERS
#include <atldlgs.h>
[!endif]
[!if WTL_USE_STRING && !WTL_STRING_ATL]
#include <atlmisc.h>
[!endif]
[!if WTL_VIEW_SCROLL || WTL_VIEW_ZOOM]
[!if !WTL_USE_STRING || WTL_STRING_ATL]
#include <atlmisc.h>
[!endif]
#include <atlscrl.h>
[!else]
#define _WTL_CE_NO_ZOOMSCROLL
[!endif]
[!if !WTL_FULLSCREEN]
#define _WTL_CE_NO_FULLSCREEN
[!endif]
#include <atlwince.h>
[!endif]

//?ppc
#include "resourceppc.h"
//?sp
#include "resourcesp.h"
//?end

[!if WTL_APPTYPE_SDI && WTL_USE_VIEW_CLASS]
#include "[!output WTL_VIEW_FILE].h"
[!endif]
#include "AboutDlg.h"
#include "[!output WTL_APPWND_FILE].h"

CAppModule _Module;

int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR lpstrCmdLine, int nCmdShow)
{
	HRESULT hRes = [!output WTL_APPWND_CLASS]::ActivatePreviousInstance(hInstance, lpstrCmdLine);

	if(FAILED(hRes) || S_FALSE == hRes)
	{
		return hRes;
	}

	hRes = ::CoInitializeEx(NULL, COINIT_MULTITHREADED);
	ATLASSERT(SUCCEEDED(hRes));

	AtlInitCommonControls(ICC_DATE_CLASSES);
	SHInitExtraControls();
[!if WTL_VIEWTYPE_HTML]
	InitHTMLControl(hInstance);
[!endif]
[!if WTL_VIEWTYPE_INKX]
	InitInkX();
[!endif]
[!if WTL_VIEWTYPE_RICHINK]
	InitRichInkDLL();
[!endif]

	hRes = _Module.Init(NULL, hInstance);
	ATLASSERT(SUCCEEDED(hRes));

[!if WTL_ENABLE_AX]
	AtlAxWinInit();

[!endif]
	int nRet = [!output WTL_APPWND_CLASS]::AppRun(lpstrCmdLine, nCmdShow);

[!if WTL_ENABLE_AX]
	AtlAxWinTerm();

[!endif]
	_Module.Term();
	::CoUninitialize();

	return nRet;
}


text:
package com.spotify.helios.system;

import static com.spotify.helios.common.descriptors.HostStatus.Status.UP;
import static com.spotify.helios.common.descriptors.ThrottleState.IMAGE_MISSING;
import static java.util.concurrent.TimeUnit.SECONDS;
import static org.junit.Assert.assertEquals;

import com.google.common.collect.ImmutableList;
import com.spotify.helios.client.HeliosClient;
import com.spotify.helios.common.descriptors.HostStatus;
import com.spotify.helios.common.descriptors.JobId;
import com.spotify.helios.common.descriptors.TaskStatus;
import org.junit.Test;

public class ImageMissingTest extends SystemTestBase {

  @Test
  public void test() throws Exception {
    startDefaultMaster();
    startDefaultAgent(testHost());

    final HeliosClient client = defaultClient();

    awaitHostStatus(client, testHost(), UP, LONG_WAIT_SECONDS, SECONDS);

    final JobId jobId = createJob(testJobName, testJobVersion, "this_sould_not_exist",
                                  ImmutableList.of("/bin/true"));

    deployJob(jobId, testHost());
    awaitJobThrottle(client, testHost(), jobId, IMAGE_MISSING, LONG_WAIT_SECONDS, SECONDS);

    final HostStatus hostStatus = client.hostStatus(testHost()).get();
    final TaskStatus taskStatus = hostStatus.getStatuses().get(jobId);
    assertEquals(TaskStatus.State.FAILED, taskStatus.getState());
  }
}


text:
-------------------------------------------------------------------------------
-- <copyright company="Sherlock">
--     Copyright 2013 Sherlock. Licensed under the Apache License, Version 2.0.
-- </copyright>
-------------------------------------------------------------------------------

CREATE PROCEDURE [Environments].[UpdateApplication]
    @id INT,
    @name NVARCHAR(50),
    @major INT,
    @minor INT,
    @patch INT,
    @build INT
AS
    IF NOT EXISTS(
        SELECT *
        FROM [Environments].[Application]
        WHERE [pk_ApplicationId] = @id)
    BEGIN
        RAISERROR
            (
                N'An entry for an application %s (%d.%d.%d.%d) does not exist',
                11,
                1,
                @name,
                @major,
                @minor,
                @patch,
                @build
            )
        RETURN
    END

    BEGIN TRANSACTION

        UPDATE [Environments].[Application]
        SET
            [Name]  = @name,
            [VersionMajor] = @major,
            [VersionMinor] = @minor,
            [VersionPatch] = @patch,
            [VersionBuild] = @build
        WHERE [pk_ApplicationId] = @id

        IF @@ERROR <> 0
        BEGIN
            ROLLBACK

            RAISERROR
                (
                    'Failed to update application with ID %s.',
                    11,
                    1,
                    @id
                )
            RETURN
        END

    COMMIT
RETURN 0


text:
#!/bin/bash

filename="./Source/Version.cpp"
major=$(cat Include/Version.hh | tr -d '\n' | sed -r 's/.*RAYON_MAJOR_VERSION ([0-9]+).*/\1/')
minor=$(cat Include/Version.hh | tr -d '\n' | sed -r 's/.*RAYON_MINOR_VERSION ([0-9]+).*/\1/')
tagname=$(git describe --abbrev=0 --tags 2> /dev/null)
if [ $? -ne 0 ] ; then
	build=$(git rev-list HEAD | wc -l | tr -d '\n' | tr -d ' ')
else
	build=$(git rev-list  "$tagname..HEAD" --count)
fi
chash=$(git rev-parse --short HEAD | tr -d '\n' | tr -d ' ')

echo "/*******************************************************************************" > $filename
echo "" >> $filename
echo "                         Generated file : do not edit" >> $filename
echo "" >> $filename
echo "*******************************************************************************/" >> $filename
echo "" >> $filename
echo "#include \"Version.hh\"" >> $filename
echo "#include <string>" >> $filename
echo "" >> $filename
echo "using namespace std;" >> $filename
echo "" >> $filename

echo -n "const int RAYON_BUILD_VERSION = " >> $filename
echo -n $build >> $filename
echo ";" >> $filename
echo "" >> $filename

echo -n "const char* const RAYON_COMMIT_HASH = \"" >> $filename
echo -n $chash >> $filename
echo "\";" >> $filename
echo "" >> $filename

echo "const char* Rayon::version()" >> $filename
echo "{" >> $filename
echo "  return \"$major.$minor.$build ($chash)\";" >> $filename
echo "}" >> $filename

exit 0


text:
cask "jetbrains-space" do
  version "2021.2.2"
  sha256 "a029af727734b0ebc7a06842846157869a31d9c743409eb3f7b713d1bc455798"

  url "https://download-cdn.jetbrains.com/space/jetbrains-space-#{version}.zip"
  name "JetBrains Space"
  desc "Team communication and collaboration software"
  homepage "https://www.jetbrains.com/space/"

  livecheck do
    url "https://download-cdn.jetbrains.com/space/latest-mac.yml"
    strategy :electron_builder
  end

  auto_updates true

  app "JetBrains Space.app"

  zap trash: [
    "~/Library/Application Support/JetBrains Space",
    "~/Library/Logs/JetBrains Space",
    "~/Library/Preferences/com.jetbrains.space.desktop.plist",
    "~/Library/Saved Application State/com.jetbrains.space.desktop.savedState",
  ]
end


text:
<?php

namespace yiiunit\framework\db;

class AnyValue extends CompareValue
{
    /**
     * @var self
     */
    private static $_instance;

    public static function getInstance()
    {
        if (self::$_instance === null) {
            self::$_instance = new self();
        }

        return self::$_instance;
    }
}


text:
import { Ejemplo0023Page } from './app.po';

describe('ejemplo0023 App', function() {
  let page: Ejemplo0023Page;

  beforeEach(() => {
    page = new Ejemplo0023Page();
  });

  it('should display message saying app works', () => {
    page.navigateTo();
    expect(page.getParagraphText()).toEqual('app works!');
  });
});


text:
"""Module which provides compatibility with older Python versions.
This is more future-compatible rather than the opposite (prefer latest
Python 3 way of doing things).
"""

import collections
import contextlib
import errno
import functools
import os
import sys
import types

__all__ = [
    # constants
    "PY3",
    # builtins
    "long", "range", "super", "unicode", "basestring",
    # literals
    "u", "b",
    # collections module
    "lru_cache",
    # shutil module
    "which", "get_terminal_size",
    # contextlib module
    "redirect_stderr",
    # python 3 exceptions
    "FileNotFoundError", "PermissionError", "ProcessLookupError",
    "InterruptedError", "ChildProcessError", "FileExistsError"]

PY3 = sys.version_info[0] == 3
_SENTINEL = object()

if PY3:
    long = int
    xrange = range
    unicode = str
    basestring = str
    range = range

    def u(s):
        return s

    def b(s):
        return s.encode("latin-1")
else:
    long = long
    range = xrange
    unicode = unicode
    basestring = basestring

    def u(s):
        return unicode(s, "unicode_escape")

    def b(s):
        return s

# --- builtins

# Python 3 super().
# Taken from "future" package.
# Credit: Ryan Kelly
if PY3:
    super = super
else:
    _builtin_super = super

    def super(type_=_SENTINEL, type_or_obj=_SENTINEL, framedepth=1):
        """Like Python 3 builtin super(). If called without any arguments
        it attempts to infer them at runtime.
        """
        if type_ is _SENTINEL:
            f = sys._getframe(framedepth)
            try:
                # Get the function's first positional argument.
                type_or_obj = f.f_locals[f.f_code.co_varnames[0]]
            except (IndexError, KeyError):
                raise RuntimeError('super() used in a function with no args')
            try:
                # Get the MRO so we can crawl it.
                mro = type_or_obj.__mro__
            except (AttributeError, RuntimeError):
                try:
                    mro = type_or_obj.__class__.__mro__
                except AttributeError:
                    raise RuntimeError('super() used in a non-newstyle class')
            for type_ in mro:
                #  Find the class that owns the currently-executing method.
                for meth in type_.__dict__.values():
                    # Drill down through any wrappers to the underlying func.
                    # This handles e.g. classmethod() and staticmethod().
                    try:
                        while not isinstance(meth, types.FunctionType):
                            if isinstance(meth, property):
                                # Calling __get__ on the property will invoke
                                # user code which might throw exceptions or
                                # have side effects
                                meth = meth.fget
                            else:
                                try:
                                    meth = meth.__func__
                                except AttributeError:
                                    meth = meth.__get__(type_or_obj, type_)
                    except (AttributeError, TypeError):
                        continue
                    if meth.func_code is f.f_code:
                        break  # found
                else:
                    # Not found. Move onto the next class in MRO.
                    continue
                break  # found
            else:
                raise RuntimeError('super() called outside a method')

        # Dispatch to builtin super().
        if type_or_obj is not _SENTINEL:
            return _builtin_super(type_, type_or_obj)
        return _builtin_super(type_)

# --- exceptions

if PY3:
    FileNotFoundError = FileNotFoundError  # NOQA
    PermissionError = PermissionError  # NOQA
    ProcessLookupError = ProcessLookupError  # NOQA
    InterruptedError = InterruptedError  # NOQA
    ChildProcessError = ChildProcessError  # NOQA
    FileExistsError = FileExistsError  # NOQA
else:
    # https://github.com/PythonCharmers/python-future/blob/exceptions/
    #     src/future/types/exceptions/pep3151.py
    import platform

    def _instance_checking_exception(base_exception=Exception):
        def wrapped(instance_checker):
            class TemporaryClass(base_exception):

                def __init__(self, *args, **kwargs):
                    if len(args) == 1 and isinstance(args[0], TemporaryClass):
                        unwrap_me = args[0]
                        for attr in dir(unwrap_me):
                            if not attr.startswith('__'):
                                setattr(self, attr, getattr(unwrap_me, attr))
                    else:
                        super(TemporaryClass, self).__init__(*args, **kwargs)

                class __metaclass__(type):
                    def __instancecheck__(cls, inst):
                        return instance_checker(inst)

                    def __subclasscheck__(cls, classinfo):
                        value = sys.exc_info()[1]
                        return isinstance(value, cls)

            TemporaryClass.__name__ = instance_checker.__name__
            TemporaryClass.__doc__ = instance_checker.__doc__
            return TemporaryClass

        return wrapped

    @_instance_checking_exception(EnvironmentError)
    def FileNotFoundError(inst):
        return getattr(inst, 'errno', _SENTINEL) == errno.ENOENT

    @_instance_checking_exception(EnvironmentError)
    def ProcessLookupError(inst):
        return getattr(inst, 'errno', _SENTINEL) == errno.ESRCH

    @_instance_checking_exception(EnvironmentError)
    def PermissionError(inst):
        return getattr(inst, 'errno', _SENTINEL) in (
            errno.EACCES, errno.EPERM)

    @_instance_checking_exception(EnvironmentError)
    def InterruptedError(inst):
        return getattr(inst, 'errno', _SENTINEL) == errno.EINTR

    @_instance_checking_exception(EnvironmentError)
    def ChildProcessError(inst):
        return getattr(inst, 'errno', _SENTINEL) == errno.ECHILD

    @_instance_checking_exception(EnvironmentError)
    def FileExistsError(inst):
        return getattr(inst, 'errno', _SENTINEL) == errno.EEXIST

    if platform.python_implementation() != "CPython":
        try:
            raise OSError(errno.EEXIST, "perm")
        except FileExistsError:
            pass
        except OSError:
            raise RuntimeError(
                "broken or incompatible Python implementation, see: "
                "https://github.com/giampaolo/psutil/issues/1659")

# --- stdlib additions

# py 3.2 functools.lru_cache
# Taken from: http://code.activestate.com/recipes/578078
# Credit: Raymond Hettinger
try:
    from functools import lru_cache
except ImportError:
    try:
        from threading import RLock
    except ImportError:
        from dummy_threading import RLock

    _CacheInfo = collections.namedtuple(
        "CacheInfo", ["hits", "misses", "maxsize", "currsize"])

    class _HashedSeq(list):
        __slots__ = 'hashvalue'

        def __init__(self, tup, hash=hash):
            self[:] = tup
            self.hashvalue = hash(tup)

        def __hash__(self):
            return self.hashvalue

    def _make_key(args, kwds, typed,
                  kwd_mark=(_SENTINEL, ),
                  fasttypes=set((int, str, frozenset, type(None))),  # noqa
                  sorted=sorted, tuple=tuple, type=type, len=len):
        key = args
        if kwds:
            sorted_items = sorted(kwds.items())
            key += kwd_mark
            for item in sorted_items:
                key += item
        if typed:
            key += tuple(type(v) for v in args)
            if kwds:
                key += tuple(type(v) for k, v in sorted_items)
        elif len(key) == 1 and type(key[0]) in fasttypes:
            return key[0]
        return _HashedSeq(key)

    def lru_cache(maxsize=100, typed=False):
        """Least-recently-used cache decorator, see:
        http://docs.python.org/3/library/functools.html#functools.lru_cache
        """
        def decorating_function(user_function):
            cache = dict()
            stats = [0, 0]
            HITS, MISSES = 0, 1
            make_key = _make_key
            cache_get = cache.get
            _len = len
            lock = RLock()
            root = []
            root[:] = [root, root, None, None]
            nonlocal_root = [root]
            PREV, NEXT, KEY, RESULT = 0, 1, 2, 3
            if maxsize == 0:
                def wrapper(*args, **kwds):
                    result = user_function(*args, **kwds)
                    stats[MISSES] += 1
                    return result
            elif maxsize is None:
                def wrapper(*args, **kwds):
                    key = make_key(args, kwds, typed)
                    result = cache_get(key, root)
                    if result is not root:
                        stats[HITS] += 1
                        return result
                    result = user_function(*args, **kwds)
                    cache[key] = result
                    stats[MISSES] += 1
                    return result
            else:
                def wrapper(*args, **kwds):
                    if kwds or typed:
                        key = make_key(args, kwds, typed)
                    else:
                        key = args
                    lock.acquire()
                    try:
                        link = cache_get(key)
                        if link is not None:
                            root, = nonlocal_root
                            link_prev, link_next, key, result = link
                            link_prev[NEXT] = link_next
                            link_next[PREV] = link_prev
                            last = root[PREV]
                            last[NEXT] = root[PREV] = link
                            link[PREV] = last
                            link[NEXT] = root
                            stats[HITS] += 1
                            return result
                    finally:
                        lock.release()
                    result = user_function(*args, **kwds)
                    lock.acquire()
                    try:
                        root, = nonlocal_root
                        if key in cache:
                            pass
                        elif _len(cache) >= maxsize:
                            oldroot = root
                            oldroot[KEY] = key
                            oldroot[RESULT] = result
                            root = nonlocal_root[0] = oldroot[NEXT]
                            oldkey = root[KEY]
                            root[KEY] = root[RESULT] = None
                            del cache[oldkey]
                            cache[key] = oldroot
                        else:
                            last = root[PREV]
                            link = [last, root, key, result]
                            last[NEXT] = root[PREV] = cache[key] = link
                        stats[MISSES] += 1
                    finally:
                        lock.release()
                    return result

            def cache_info():
                """Report cache statistics"""
                lock.acquire()
                try:
                    return _CacheInfo(stats[HITS], stats[MISSES], maxsize,
                                      len(cache))
                finally:
                    lock.release()

            def cache_clear():
                """Clear the cache and cache statistics"""
                lock.acquire()
                try:
                    cache.clear()
                    root = nonlocal_root[0]
                    root[:] = [root, root, None, None]
                    stats[:] = [0, 0]
                finally:
                    lock.release()

            wrapper.__wrapped__ = user_function
            wrapper.cache_info = cache_info
            wrapper.cache_clear = cache_clear
            return functools.update_wrapper(wrapper, user_function)

        return decorating_function

# python 3.3
try:
    from shutil import which
except ImportError:
    def which(cmd, mode=os.F_OK | os.X_OK, path=None):
        """Given a command, mode, and a PATH string, return the path which
        conforms to the given mode on the PATH, or None if there is no such
        file.

        `mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result
        of os.environ.get("PATH"), or can be overridden with a custom search
        path.
        """
        def _access_check(fn, mode):
            return (os.path.exists(fn) and os.access(fn, mode) and
                    not os.path.isdir(fn))

        if os.path.dirname(cmd):
            if _access_check(cmd, mode):
                return cmd
            return None

        if path is None:
            path = os.environ.get("PATH", os.defpath)
        if not path:
            return None
        path = path.split(os.pathsep)

        if sys.platform == "win32":
            if os.curdir not in path:
                path.insert(0, os.curdir)

            pathext = os.environ.get("PATHEXT", "").split(os.pathsep)
            if any(cmd.lower().endswith(ext.lower()) for ext in pathext):
                files = [cmd]
            else:
                files = [cmd + ext for ext in pathext]
        else:
            files = [cmd]

        seen = set()
        for dir in path:
            normdir = os.path.normcase(dir)
            if normdir not in seen:
                seen.add(normdir)
                for thefile in files:
                    name = os.path.join(dir, thefile)
                    if _access_check(name, mode):
                        return name
        return None

# python 3.3
try:
    from shutil import get_terminal_size
except ImportError:
    def get_terminal_size(fallback=(80, 24)):
        try:
            import fcntl
            import struct
            import termios
        except ImportError:
            return fallback
        else:
            try:
                # This should work on Linux.
                res = struct.unpack(
                    'hh', fcntl.ioctl(1, termios.TIOCGWINSZ, '1234'))
                return (res[1], res[0])
            except Exception:
                return fallback

# python 3.3
try:
    from subprocess import TimeoutExpired as SubprocessTimeoutExpired
except ImportError:
    class SubprocessTimeoutExpired:
        pass

# python 3.5
try:
    from contextlib import redirect_stderr
except ImportError:
    @contextlib.contextmanager
    def redirect_stderr(new_target):
        original = sys.stderr
        try:
            sys.stderr = new_target
            yield new_target
        finally:
            sys.stderr = original


text:
<?php

namespace Doctrine\ORM\Query\AST;

/**
 * IdentificationVariableDeclaration ::= RangeVariableDeclaration [IndexBy] {JoinVariableDeclaration}*
 *
 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
 * @link    www.doctrine-project.org
 * @since   2.0
 * @version $Revision: 3938 $
 * @author  Guilherme Blanco <guilhermeblanco@hotmail.com>
 * @author  Jonathan Wage <jonwage@gmail.com>
 * @author  Roman Borschel <roman@code-factory.org>
 */
class IdentificationVariableDeclaration extends Node
{
    public $rangeVariableDeclaration = null;
    public $indexBy = null;
    public $joinVariableDeclarations = array();

    public function __construct($rangeVariableDecl, $indexBy, array $joinVariableDecls)
    {
        $this->rangeVariableDeclaration = $rangeVariableDecl;
        $this->indexBy = $indexBy;
        $this->joinVariableDeclarations = $joinVariableDecls;
    }

    public function dispatch($sqlWalker)
    {
        return $sqlWalker->walkIdentificationVariableDeclaration($this);
    }
}


text:
package net.sf.jasperreports.engine;

import java.util.List;

/**
 * Interface of an sub dataset instantiation.
 *

 * Once a dataset is declared inside a report template, it can be used only if it's actually
 * referenced by a chart, crosstab or other component. Simply declaring a dataset at the report
 * level does not have any effect.
 *

 * When a dataset is referenced by a report component, a dataset run is instantiated. The
 * dataset runs through the supplied data source performing all the variable calculations and
 * the required data grouping.
 *

 * A dataset run declaration supplies the values for the dataset parameters as well as the
 * data source through which the dataset will iterate. Optionally, a java.sql.Connection
 * can be passed to the dataset instead of a {@link net.sf.jasperreports.engine.JRDataSource} instance,
 * when there is a SQL query associated with the dataset. This query is executed by the engine using the
 * JDBC connection and the java.sql.ResultSet object obtained is iterated through.
 *

 * Dataset runs resemble subreports in the way parameters and the data source/connection
 * are passed in.
 *

 * Charts, crosstabs and other report components can reference datasets by instantiating and configuring dataset
 * runs. If no dataset run is specified for a component, the main dataset of the report is
 * used.
 *
 * @see net.sf.jasperreports.engine.JRDataset
 * @see net.sf.jasperreports.engine.JRChartDataset#getDatasetRun()
 * @author Lucian Chirita (lucianc@users.sourceforge.net)
 * @version $Id: JRDatasetRun.java 7199 2014-08-27 13:58:10Z teodord $
 */
public interface JRDatasetRun extends JRCloneable, JRIdentifiable, JRPropertiesHolder
{
	/**
	 * Returns the sub dataset name.
	 *
	 * @return the sub dataset name
	 */
	public String getDatasetName();

	/**
	 * Returns the parameters map expression.
	 *

	 * The result of this expression is used as the parameters map when instantiating the dataset.
	 *
	 * @return the parameters map expression
	 */
	public JRExpression getParametersMapExpression();

	/**
	 * Returns the list of parameter values.
	 *
	 * @return the list of parameter values
	 */
	public JRDatasetParameter[] getParameters();

	/**
	 * Returns the DB connection expression.
	 *

	 * The result of this expression is used as the DB connection when instantiating the dataset.
	 *
	 * @return the DB connection expression
	 */
	public JRExpression getConnectionExpression();

	/**
	 * Returns the data source expression.
	 *

	 * The result of this expression is used as the data source when instantiating the dataset.
	 *
	 * @return the data source expression
	 */
	public JRExpression getDataSourceExpression();

	/**
	 * Returns the list of values to be copied from the subdataset.
	 *
	 * @return the list of copied values.
	 */
	public List<ReturnValue> getReturnValues();

}


text:
See https://www.pantsbuild.org/v2.3/docs/release-notes-2-3 for an overview of the changes in this release series.

## 2.3.3 (Jun 16, 2021)

The fourth stable release of the `2.3.x` series, with no changes since the previous `rc`.

## 2.3.3rc0 (Jun 02, 2021)

### Bug fixes

* Fix `Key` interning race causing `panic while processing panic` failure (Cherry-pick of #12152) ([#12160](https://github.com/pantsbuild/pants/pull/12160))

## 2.3.2 (May 6, 2021)

The third stable release of the `2.3.x` series, with no changes since the previous `rc`.

## 2.3.2rc0 (Apr 29, 2021)

### User API Changes

* Add back `interpreter_constraints` field to `pex_binary` and `python_awslambda` ([#11980](https://github.com/pantsbuild/pants/pull/11980))

## 2.3.1 (Apr 20, 2021)

The second stable release of the `2.3.x` series, with no changes since the previous `rc`.

## 2.3.1rc3 (Apr 14, 2021)

### Bug fixes

* Allow Python files without a file ending (Cherry-pick of #11905) ([#11917](https://github.com/pantsbuild/pants/pull/11917))

* Fix bug in Python 2.7 string dep inference. (Cherry-pick of #11900) ([#11903](https://github.com/pantsbuild/pants/pull/11903))

## 2.3.1rc2 (Apr 10, 2021)

### Bug fixes

* Fix a bug in unicode string dep inference. (cherrypick of #11879) ([#11882](https://github.com/pantsbuild/pants/pull/11882))

### Documentation

* Fix typo in `tags` help message ([#11838](https://github.com/pantsbuild/pants/pull/11838))

## 2.3.1rc1 (Mar 25, 2021)

### Bug fixes

* Upgrade to Pex 2.1.35 to fix interpreter-rexec loop. (cherrypick of #11799) ([#11801](https://github.com/pantsbuild/pants/pull/11801))

* Kill `SETTABLE_ENV_VARS` allow list to allow passing ssh-agent config. (cherrypick of #11743) ([#11791](https://github.com/pantsbuild/pants/pull/11791))

## 2.3.1rc0 (Mar 21, 2021)

### Bug fixes

* Fix remote execution: use `append_only_caches` in Pex processes. (#11760) ([#11765](https://github.com/pantsbuild/pants/pull/11765))

## 2.3.0 (Mar 18, 2021)

The first stable release in the `2.3.x` series, with no changes since the previous rc.

## 2.3.0rc4 (Mar 17, 2021)

### Bug fixes

* Fix a deadlock involving `scheduler.all_digests`, and add a note. (cherrypick of #11723) ([#11726](https://github.com/pantsbuild/pants/pull/11726))

* Upgrade to Pex 2.1.34 to pull in a fix for an import race. (#11711) ([#11713](https://github.com/pantsbuild/pants/pull/11713))

## 2.3.0rc3 (Mar 12, 2021)

### Bug fixes

* Fix PYTHONPATH not including protobuf targets using `python_source_root`  (#11673) ([#11675](https://github.com/pantsbuild/pants/pull/11675))

* Do not interpret passthrough args. (cherrypick of #11656) ([#11660](https://github.com/pantsbuild/pants/pull/11660))

## 2.3.0rc2 (Mar 08, 2021)

### Bug fixes

* Upgrade to Pex 2.1.33 to fix `et-xmlfile` issue. (Cherry-pick of #11647) ([#11651](https://github.com/pantsbuild/pants/pull/11651))

* Ensure that ancestor files at the buildroot are found (Cherry-pick of #11632) ([#11637](https://github.com/pantsbuild/pants/pull/11637))

* Handle two edge cases with `./pants tailor` (Cherry-pick of #11625) ([#11637](https://github.com/pantsbuild/pants/pull/11637))

## 2.3.0rc1 (Feb 25, 2021)

### Bug fixes

* Upgrade Pex to 2.1.32 to fix venv shebangs being too long for some Linux systems. (Cherry-pick of #11604) ([#11606](https://github.com/pantsbuild/pants/pull/11606))

### Documentation

* Less chatty plugin resolution logging (Cherry-pick of #11593) ([#11595](https://github.com/pantsbuild/pants/pull/11595))

## 2.3.0rc0 (Feb 23, 2021)

### New Features

* A `tailor` goal to generate BUILD file targets automatically ([#11517](https://github.com/pantsbuild/pants/pull/11517))

* Generate `protobuf_library` targets with `./pants tailor` ([#11582](https://github.com/pantsbuild/pants/pull/11582))

* Support `--venv` mode for `pex_binary` targets. ([#11510](https://github.com/pantsbuild/pants/pull/11510))

* Auto-discover CA certs if TLS is used and `--remote-ca-certs-path` is unset ([#11572](https://github.com/pantsbuild/pants/pull/11572))

### User API Changes

* Deprecate --setuptools-{entry-point,interpreter-constraints} ([#11539](https://github.com/pantsbuild/pants/pull/11539))

* Deprecate `--remote-store-server` and `--remote-execution-server` in favor of `--remote-store-address` and `--remote-execution-address` ([#11570](https://github.com/pantsbuild/pants/pull/11570))

* Deprecate unused `--remote-store-initial-timeout`, `--remote-store-timeout-multiplier`, `--remote-store-maximum-timeout`, `--remote-store-connection-limit`, and `--remote-store-thread-count` ([#11577](https://github.com/pantsbuild/pants/pull/11577))

* Upgrade Pex to 2.1.31. ([#11588](https://github.com/pantsbuild/pants/pull/11588))

### Bug fixes

* Fix Black to work by default with Python 3.9 ([#11541](https://github.com/pantsbuild/pants/pull/11541))

* Fix MyPy to work by default with Python 3.9 ([#11537](https://github.com/pantsbuild/pants/pull/11537))

### Performance

* Use --venv mode for internal PEXes. ([#11557](https://github.com/pantsbuild/pants/pull/11557))

### Documentation

* Improve error message for unrecognized BUILD file symbols ([#11564](https://github.com/pantsbuild/pants/pull/11564))

## 2.3.0.dev3 (Feb 3, 2021)

### New Features

* Add `--remote-auth-plugin` ([#11503](https://github.com/pantsbuild/pants/pull/11503))

### User API Changes

* Stop pinning `zipp` by default in `[pytest].pytest_plugins` ([#11512](https://github.com/pantsbuild/pants/pull/11512))

* Change default for `[pytest].pytest_plugins` to use pytest-cov 2.11.x ([#11514](https://github.com/pantsbuild/pants/pull/11514))

* Change default versions for `setuptools` options ([#11515](https://github.com/pantsbuild/pants/pull/11515))

### Plugin API Changes

* Upgrade packaging from 20.8 to 20.9 ([#11508](https://github.com/pantsbuild/pants/pull/11508))

## 2.3.0.dev2 (Jan 31, 2021)

### New Features

* Allow specifying files with `--url-template`. ([#11499](https://github.com/pantsbuild/pants/pull/11499))

### User API Changes

* Bump default MyPy version to 0.800 ([#11506](https://github.com/pantsbuild/pants/pull/11506))

* Add `--remote-store-headers` and fix `--remote-execution-headers` to not impact remote caching ([#11501](https://github.com/pantsbuild/pants/pull/11501))

* Deprecate `[python-setup].resolver_version` defaulting to pip legacy resolver ([#11497](https://github.com/pantsbuild/pants/pull/11497))

### Performance

* Make remote cache writes async ([#11479](https://github.com/pantsbuild/pants/pull/11479))

## 2.3.0.dev1 (Jan 21, 2021)

### New Features

* Support Pex CLI `--unzip` and `--include-tools`. ([#11483](https://github.com/pantsbuild/pants/pull/11483))

### User API Changes

* Remove deprecated `--pants-bootstrapdir` and `--pants-configdir` options ([#11491](https://github.com/pantsbuild/pants/pull/11491))

### Plugin API Changes

* Remove `RunInfo` class ([#11456](https://github.com/pantsbuild/pants/pull/11456))

### Bug fixes

* Fix use of remote store when in eager cache mode ([#11468](https://github.com/pantsbuild/pants/pull/11468))

* Workaround Rust 1.49 breaking macOS processes with a materialized argv0 ([#11452](https://github.com/pantsbuild/pants/pull/11452))

### Performance

* Use speculation for remote cache reads ([#11429](https://github.com/pantsbuild/pants/pull/11429))

### Documentation

* Change logging level for Scrubbed PYTHONPATH to be debug ([#11480](https://github.com/pantsbuild/pants/pull/11480))

* Add failure logging to the StoreGCService. ([#11460](https://github.com/pantsbuild/pants/pull/11460))

* Document address storage in AsyncFieldMixin. ([#11448](https://github.com/pantsbuild/pants/pull/11448))

## 2.3.0.dev0 (Jan 10, 2021)

### User API Changes

* Remove support for pex_binary sources. ([#11445](https://github.com/pantsbuild/pants/pull/11445))

* Remove custom targets for Pylint and MyPy. ([#11441](https://github.com/pantsbuild/pants/pull/11441))

* Remove deprecated --pantsd-pailgun-quit-timeout option. ([#11440](https://github.com/pantsbuild/pants/pull/11440))

* Remove DeprecatedRunTracker. ([#11439](https://github.com/pantsbuild/pants/pull/11439))

* Remove deprecated PythonAwsLambda fields. ([#11438](https://github.com/pantsbuild/pants/pull/11438))

### Plugin API Changes

* Remove support for 'Lite' request object hacks. ([#11444](https://github.com/pantsbuild/pants/pull/11444))

* Remove support for docstring help. ([#11442](https://github.com/pantsbuild/pants/pull/11442))

* Remove deprecated v1 Subsystem facilities ([#11424](https://github.com/pantsbuild/pants/pull/11424))

* Remove python workunits ([#11416](https://github.com/pantsbuild/pants/pull/11416))

### Bug fixes

* Add `--remote-cache-eager-fetch` to reduce unreliability ([#11396](https://github.com/pantsbuild/pants/pull/11396))

* Fix older versions of `tar` not working when creating an `archive` ([#11413](https://github.com/pantsbuild/pants/pull/11413))

* Fix `--opt` options in constraints.txt files erroring ([#11407](https://github.com/pantsbuild/pants/pull/11407))

* Move to having the Scheduler directly handle SIGINT to cancel all relevant Sessions. ([#11399](https://github.com/pantsbuild/pants/pull/11399))

### Documentation

* docs: fix simple typo, processs -> process ([#11402](https://github.com/pantsbuild/pants/pull/11402))


text:
let React;
let ReactNoop;
let Scheduler;
let act;
let Suspense;
let useState;
let textCache;

let readText;
let resolveText;
// let rejectText;

describe('ReactSuspenseWithNoopRenderer', () => {
  beforeEach(() => {
    jest.resetModules();

    React = require('react');
    ReactNoop = require('react-noop-renderer');
    Scheduler = require('scheduler');
    act = require('jest-react').act;
    Suspense = React.Suspense;
    useState = React.useState;

    textCache = new Map();

    readText = text => {
      const record = textCache.get(text);
      if (record !== undefined) {
        switch (record.status) {
          case 'pending':
            throw record.promise;
          case 'rejected':
            throw Error('Failed to load: ' + text);
          case 'resolved':
            return text;
        }
      } else {
        let ping;
        const promise = new Promise(resolve => (ping = resolve));
        const newRecord = {
          status: 'pending',
          ping: ping,
          promise,
        };
        textCache.set(text, newRecord);
        throw promise;
      }
    };

    resolveText = text => {
      const record = textCache.get(text);
      if (record !== undefined) {
        if (record.status === 'pending') {
          record.ping();
          record.ping = null;
          record.status = 'resolved';
          record.promise = null;
        }
      } else {
        const newRecord = {
          ping: null,
          status: 'resolved',
          promise: null,
        };
        textCache.set(text, newRecord);
      }
    };

    // rejectText = text => {
    //   const record = textCache.get(text);
    //   if (record !== undefined) {
    //     if (record.status === 'pending') {
    //       Scheduler.unstable_yieldValue(`Promise rejected [${text}]`);
    //       record.ping();
    //       record.status = 'rejected';
    //       clearTimeout(record.promise._timer);
    //       record.promise = null;
    //     }
    //   } else {
    //     const newRecord = {
    //       ping: null,
    //       status: 'rejected',
    //       promise: null,
    //     };
    //     textCache.set(text, newRecord);
    //   }
    // };
  });

  function Text(props) {
    Scheduler.unstable_yieldValue(props.text);
    return props.text;
  }

  function AsyncText(props) {
    const text = props.text;
    try {
      readText(text);
      Scheduler.unstable_yieldValue(text);
      return text;
    } catch (promise) {
      if (typeof promise.then === 'function') {
        Scheduler.unstable_yieldValue(`Suspend! [${text}]`);
      } else {
        Scheduler.unstable_yieldValue(`Error! [${text}]`);
      }
      throw promise;
    }
  }

  it('skips CPU-bound trees on initial mount', async () => {
    function App() {
      return (
        <>
          <Text text="Outer" />

            <Suspense
              unstable_expectedLoadTime={2000}
              fallback={<Text text="Loading..." />}>
              <Text text="Inner" />
            </Suspense>

        </>
      );
    }

    const root = ReactNoop.createRoot();
    await act(async () => {
      root.render(<App />);
      expect(Scheduler).toFlushUntilNextPaint(['Outer', 'Loading...']);
      expect(root).toMatchRenderedOutput(
        <>
          Outer

Loading...

        </>,
      );
    });
    // Inner contents finish in separate commit from outer
    expect(Scheduler).toHaveYielded(['Inner']);
    expect(root).toMatchRenderedOutput(
      <>
        Outer

Inner

      </>,
    );
  });

  it('does not skip CPU-bound trees during updates', async () => {
    let setCount;

    function App() {
      const [count, _setCount] = useState(0);
      setCount = _setCount;
      return (
        <>
          <Text text="Outer" />

            <Suspense
              unstable_expectedLoadTime={2000}
              fallback={<Text text="Loading..." />}>
              <Text text={`Inner [${count}]`} />
            </Suspense>

        </>
      );
    }

    // Initial mount
    const root = ReactNoop.createRoot();
    await act(async () => {
      root.render(<App />);
    });
    // Inner contents finish in separate commit from outer
    expect(Scheduler).toHaveYielded(['Outer', 'Loading...', 'Inner [0]']);
    expect(root).toMatchRenderedOutput(
      <>
        Outer

Inner [0]

      </>,
    );

    // Update
    await act(async () => {
      setCount(1);
    });
    // Entire update finishes in a single commit
    expect(Scheduler).toHaveYielded(['Outer', 'Inner [1]']);
    expect(root).toMatchRenderedOutput(
      <>
        Outer

Inner [1]

      </>,
    );
  });

  it('suspend inside CPU-bound tree', async () => {
    function App() {
      return (
        <>
          <Text text="Outer" />

            <Suspense
              unstable_expectedLoadTime={2000}
              fallback={<Text text="Loading..." />}>
              <AsyncText text="Inner" />
            </Suspense>

        </>
      );
    }

    const root = ReactNoop.createRoot();
    await act(async () => {
      root.render(<App />);
      expect(Scheduler).toFlushUntilNextPaint(['Outer', 'Loading...']);
      expect(root).toMatchRenderedOutput(
        <>
          Outer

Loading...

        </>,
      );
    });
    // Inner contents suspended, so we continue showing a fallback.
    expect(Scheduler).toHaveYielded(['Suspend! [Inner]']);
    expect(root).toMatchRenderedOutput(
      <>
        Outer

Loading...

      </>,
    );

    // Resolve the data and finish rendering
    await act(async () => {
      await resolveText('Inner');
    });
    expect(Scheduler).toHaveYielded(['Inner']);
    expect(root).toMatchRenderedOutput(
      <>
        Outer

Inner

      </>,
    );
  });

  it('nested CPU-bound trees', async () => {
    function App() {
      return (
        <>
          <Text text="A" />

            <Suspense
              unstable_expectedLoadTime={2000}
              fallback={<Text text="Loading B..." />}>
              <Text text="B" />

                <Suspense
                  unstable_expectedLoadTime={2000}
                  fallback={<Text text="Loading C..." />}>
                  <Text text="C" />
                </Suspense>

            </Suspense>

        </>
      );
    }

    const root = ReactNoop.createRoot();
    await act(async () => {
      root.render(<App />);
    });
    // Each level commits separately
    expect(Scheduler).toHaveYielded([
      'A',
      'Loading B...',
      'B',
      'Loading C...',
      'C',
    ]);
    expect(root).toMatchRenderedOutput(
      <>
        A

          B
C

      </>,
    );
  });
});


text:
const __ = Symbol('@@lando/placeholder')

export const isPlaceholder = x =>
  typeof x === 'symbol'
  && x === __

export default __


text:
{% extends "admin/change_form.html" %}
{% load url from future %}
{% load impersonation_url %}

{% block object-tools %}
{% if change %}{% if not is_popup %}

            Log in as this user

{% endif %}{% endif %}
{% endblock %}


text:
var gInvalidFormPopup = document.getElementById('invalid-form-popup');
ok(gInvalidFormPopup,
   "The browser should have a popup to show when a form is invalid");

function checkPopupShow()
{
  ok(gInvalidFormPopup.state == 'showing' || gInvalidFormPopup.state == 'open',
     "The invalid form popup should be shown");
}

function checkPopupHide()
{
  ok(gInvalidFormPopup.state != 'showing' && gInvalidFormPopup.state != 'open',
     "The invalid form popup should not be shown");
}

function checkPopupMessage(doc)
{
  is(gInvalidFormPopup.firstChild.textContent,
     doc.getElementById('i').validationMessage,
     "The panel should show the message from validationMessage");
}

let gObserver = {
  QueryInterface : XPCOMUtils.generateQI([Ci.nsIFormSubmitObserver]),

  notifyInvalidSubmit : function (aFormElement, aInvalidElements)
  {
  }
};

function test()
{
  waitForExplicitFinish();

  test1();
}

/**
 * In this test, we check that no popup appears if the form is valid.
 */
function test1() {
  let uri = "data:text/html,<form target='t' action='data:text/html,'><input><input id='s' type='submit'></form>";
  let tab = gBrowser.addTab();

  tab.linkedBrowser.addEventListener("load", function(aEvent) {
    tab.linkedBrowser.removeEventListener("load", arguments.callee, true);
    let doc = gBrowser.contentDocument;

    doc.getElementById('s').click();

    executeSoon(function() {
      checkPopupHide();

      // Clean-up
      gBrowser.removeTab(gBrowser.selectedTab);

      // Next test
      executeSoon(test2);
    });
  }, true);

  gBrowser.selectedTab = tab;
  gBrowser.selectedTab.linkedBrowser.loadURI(uri);
}

/**
 * In this test, we check that, when an invalid form is submitted,
 * the invalid element is focused and a popup appears.
 */
function test2()
{
  let uri = "data:text/html,<form target='t' action='data:text/html,'><input required id='i'><input id='s' type='submit'></form>";
  let tab = gBrowser.addTab();

  gInvalidFormPopup.addEventListener("popupshown", function() {
    gInvalidFormPopup.removeEventListener("popupshown", arguments.callee, false);

    let doc = gBrowser.contentDocument;
    is(doc.activeElement, doc.getElementById('i'),
       "First invalid element should be focused");

    checkPopupShow();
    checkPopupMessage(doc);

    // Clean-up and next test.
    gBrowser.removeTab(gBrowser.selectedTab);
    executeSoon(test3);
  }, false);

  tab.linkedBrowser.addEventListener("load", function(aEvent) {
    tab.linkedBrowser.removeEventListener("load", arguments.callee, true);

    gBrowser.contentDocument.getElementById('s').click();
  }, true);

  gBrowser.selectedTab = tab;
  gBrowser.selectedTab.linkedBrowser.loadURI(uri);
}

/**
 * In this test, we check that, when an invalid form is submitted,
 * the first invalid element is focused and a popup appears.
 */
function test3()
{
  let uri = "data:text/html,<form target='t' action='data:text/html,'><input><input id='i' required><input required><input id='s' type='submit'></form>";
  let tab = gBrowser.addTab();

  gInvalidFormPopup.addEventListener("popupshown", function() {
    gInvalidFormPopup.removeEventListener("popupshown", arguments.callee, false);

    let doc = gBrowser.contentDocument;
    is(doc.activeElement, doc.getElementById('i'),
       "First invalid element should be focused");

    checkPopupShow();
    checkPopupMessage(doc);

    // Clean-up and next test.
    gBrowser.removeTab(gBrowser.selectedTab);
    executeSoon(test4a);
  }, false);

  tab.linkedBrowser.addEventListener("load", function(aEvent) {
    tab.linkedBrowser.removeEventListener("load", arguments.callee, true);

    gBrowser.contentDocument.getElementById('s').click();
  }, true);

  gBrowser.selectedTab = tab;
  gBrowser.selectedTab.linkedBrowser.loadURI(uri);
}

/**
 * In this test, we check that, we hide the popup by interacting with the
 * invalid element if the element becomes valid.
 */
function test4a()
{
  let uri = "data:text/html,<form target='t' action='data:text/html,'><input id='i' required><input id='s' type='submit'></form>";
  let tab = gBrowser.addTab();

  gInvalidFormPopup.addEventListener("popupshown", function() {
    gInvalidFormPopup.removeEventListener("popupshown", arguments.callee, false);

    let doc = gBrowser.contentDocument;
    is(doc.activeElement, doc.getElementById('i'),
       "First invalid element should be focused");

    checkPopupShow();
    checkPopupMessage(doc);

    EventUtils.synthesizeKey("a", {});

    executeSoon(function () {
      checkPopupHide();

      // Clean-up and next test.
      gBrowser.removeTab(gBrowser.selectedTab);
      executeSoon(test4b);
    });
  }, false);

  tab.linkedBrowser.addEventListener("load", function(aEvent) {
    tab.linkedBrowser.removeEventListener("load", arguments.callee, true);

    gBrowser.contentDocument.getElementById('s').click();
  }, true);

  gBrowser.selectedTab = tab;
  gBrowser.selectedTab.linkedBrowser.loadURI(uri);
}

/**
 * In this test, we check that, we don't hide the popup by interacting with the
 * invalid element if the element is still invalid.
 */
function test4b()
{
  let uri = "data:text/html,<form target='t' action='data:text/html,'><input type='email' id='i' required><input id='s' type='submit'></form>";
  let tab = gBrowser.addTab();

  gInvalidFormPopup.addEventListener("popupshown", function() {
    gInvalidFormPopup.removeEventListener("popupshown", arguments.callee, false);

    let doc = gBrowser.contentDocument;
    is(doc.activeElement, doc.getElementById('i'),
       "First invalid element should be focused");

    checkPopupShow();
    checkPopupMessage(doc);

    EventUtils.synthesizeKey("a", {});

    executeSoon(function () {
      checkPopupShow();

      // Clean-up and next test.
      gBrowser.removeTab(gBrowser.selectedTab);
      executeSoon(test5);
    });
  }, false);

  tab.linkedBrowser.addEventListener("load", function(aEvent) {
    tab.linkedBrowser.removeEventListener("load", arguments.callee, true);

    gBrowser.contentDocument.getElementById('s').click();
  }, true);

  gBrowser.selectedTab = tab;
  gBrowser.selectedTab.linkedBrowser.loadURI(uri);
}

/**
 * In this test, we check that we can hide the popup by blurring the invalid
 * element.
 */
function test5()
{
  let uri = "data:text/html,<form target='t' action='data:text/html,'><input id='i' required><input id='s' type='submit'></form>";
  let tab = gBrowser.addTab();

  gInvalidFormPopup.addEventListener("popupshown", function() {
    gInvalidFormPopup.removeEventListener("popupshown", arguments.callee, false);

    let doc = gBrowser.contentDocument;
    is(doc.activeElement, doc.getElementById('i'),
       "First invalid element should be focused");

    checkPopupShow();
    checkPopupMessage(doc);

    doc.getElementById('i').blur();

    executeSoon(function () {
      checkPopupHide();

      // Clean-up and next test.
      gBrowser.removeTab(gBrowser.selectedTab);
      executeSoon(test6);
    });
  }, false);

  tab.linkedBrowser.addEventListener("load", function(aEvent) {
    tab.linkedBrowser.removeEventListener("load", arguments.callee, true);

    gBrowser.contentDocument.getElementById('s').click();
  }, true);

  gBrowser.selectedTab = tab;
  gBrowser.selectedTab.linkedBrowser.loadURI(uri);
}

/**
 * In this test, we check that we can hide the popup by pressing TAB.
 */
function test6()
{
  let uri = "data:text/html,<form target='t' action='data:text/html,'><input id='i' required><input id='s' type='submit'></form>";
  let tab = gBrowser.addTab();

  gInvalidFormPopup.addEventListener("popupshown", function() {
    gInvalidFormPopup.removeEventListener("popupshown", arguments.callee, false);

    let doc = gBrowser.contentDocument;
    is(doc.activeElement, doc.getElementById('i'),
       "First invalid element should be focused");

    checkPopupShow();
    checkPopupMessage(doc);

    EventUtils.synthesizeKey("VK_TAB", {});

    executeSoon(function () {
      checkPopupHide();

      // Clean-up and next test.
      gBrowser.removeTab(gBrowser.selectedTab);
      executeSoon(test7);
    });
  }, false);

  tab.linkedBrowser.addEventListener("load", function(aEvent) {
    tab.linkedBrowser.removeEventListener("load", arguments.callee, true);

    gBrowser.contentDocument.getElementById('s').click();
  }, true);

  gBrowser.selectedTab = tab;
  gBrowser.selectedTab.linkedBrowser.loadURI(uri);
}

/**
 * In this test, we check that the popup will hide if we move to another tab.
 */
function test7()
{
  let uri = "data:text/html,<form target='t' action='data:text/html,'><input id='i' required><input id='s' type='submit'></form>";
  let tab = gBrowser.addTab();

  gInvalidFormPopup.addEventListener("popupshown", function() {
    gInvalidFormPopup.removeEventListener("popupshown", arguments.callee, false);

    let doc = gBrowser.contentDocument;
    is(doc.activeElement, doc.getElementById('i'),
       "First invalid element should be focused");

    checkPopupShow();
    checkPopupMessage(doc);

    // Create a new tab and move to it.
    gBrowser.selectedTab  = gBrowser.addTab("about:blank", {skipAnimation: true});

    executeSoon(function() {
      checkPopupHide();

      // Clean-up and next test.
      gBrowser.removeTab(gBrowser.selectedTab);
      gBrowser.removeTab(gBrowser.selectedTab);
      executeSoon(test8);
    });
  }, false);

  tab.linkedBrowser.addEventListener("load", function(aEvent) {
    tab.linkedBrowser.removeEventListener("load", arguments.callee, true);

    gBrowser.contentDocument.getElementById('s').click();
  }, true);

  gBrowser.selectedTab = tab;
  gBrowser.selectedTab.linkedBrowser.loadURI(uri);
}

/**
 * In this test, we check that nothing happen (no focus nor popup) if the
 * invalid form is submitted in another tab than the current focused one
 * (submitted in background).
 */
function test8()
{
  let uri = "data:text/html,<form target='t' action='data:text/html,'><input id='i' required><input id='s' type='submit'></form>";
  let tab = gBrowser.addTab();

  gObserver.notifyInvalidSubmit = function() {
    executeSoon(function() {
      let doc = tab.linkedBrowser.contentDocument;
      isnot(doc.activeElement, doc.getElementById('i'),
            "We should not focus the invalid element when the form is submitted in background");

      checkPopupHide();

      // Clean-up
      Services.obs.removeObserver(gObserver, "invalidformsubmit");
      gObserver.notifyInvalidSubmit = function () {};
      gBrowser.removeTab(tab);

      // Next test
      executeSoon(test9);
    });
  };

  Services.obs.addObserver(gObserver, "invalidformsubmit", false);

  tab.linkedBrowser.addEventListener("load", function(aEvent) {
    tab.linkedBrowser.removeEventListener("load", arguments.callee, true);

    isnot(gBrowser.selectedTab, tab,
          "This tab should have been loaded in background");

    tab.linkedBrowser.contentDocument.getElementById('s').click();
  }, true);

  tab.linkedBrowser.loadURI(uri);
}

/**
 * In this test, we check that the author defined error message is shown.
 */
function test9()
{
  let uri = "data:text/html,<form target='t' action='data:text/html,'><input x-moz-errormessage='foo' required id='i'><input id='s' type='submit'></form>";
  let tab = gBrowser.addTab();

  gInvalidFormPopup.addEventListener("popupshown", function() {
    gInvalidFormPopup.removeEventListener("popupshown", arguments.callee, false);

    let doc = gBrowser.contentDocument;
    is(doc.activeElement, doc.getElementById('i'),
       "First invalid element should be focused");

    checkPopupShow();

    is(gInvalidFormPopup.firstChild.textContent, "foo",
       "The panel should show the author defined error message");

    // Clean-up and next test.
    gBrowser.removeTab(gBrowser.selectedTab);
    executeSoon(test10);
  }, false);

  tab.linkedBrowser.addEventListener("load", function(aEvent) {
    tab.linkedBrowser.removeEventListener("load", arguments.callee, true);

    gBrowser.contentDocument.getElementById('s').click();
  }, true);

  gBrowser.selectedTab = tab;
  gBrowser.selectedTab.linkedBrowser.loadURI(uri);
}

/**
 * In this test, we check that the message is correctly updated when it changes.
 */
function test10()
{
  let uri = "data:text/html,<form target='t' action='data:text/html,'><input type='email' required id='i'><input id='s' type='submit'></form>";
  let tab = gBrowser.addTab();

  gInvalidFormPopup.addEventListener("popupshown", function() {
    gInvalidFormPopup.removeEventListener("popupshown", arguments.callee, false);

    let doc = gBrowser.contentDocument;
    let input = doc.getElementById('i');
    is(doc.activeElement, input, "First invalid element should be focused");

    checkPopupShow();

    is(gInvalidFormPopup.firstChild.textContent, input.validationMessage,
       "The panel should show the current validation message");

    input.addEventListener('input', function() {
      input.removeEventListener('input', arguments.callee, false);

      executeSoon(function() {
        // Now, the element suffers from another error, the message should have
	// been updated.
        is(gInvalidFormPopup.firstChild.textContent, input.validationMessage,
           "The panel should show the current validation message");

        // Clean-up and next test.
        gBrowser.removeTab(gBrowser.selectedTab);
        executeSoon(finish);
      });
    }, false);

    EventUtils.synthesizeKey('f', {});
  }, false);

  tab.linkedBrowser.addEventListener("load", function(aEvent) {
    tab.linkedBrowser.removeEventListener("load", arguments.callee, true);

    gBrowser.contentDocument.getElementById('s').click();
  }, true);

  gBrowser.selectedTab = tab;
  gBrowser.selectedTab.linkedBrowser.loadURI(uri);
}


text:
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>{{ settings.TITLE }} - gitstat</title>

    {% if settings.GITHUB_RIBBON %}

    {% endif %}

        <menu id="toc" style="border:1px">
Index

Summary

Authors by Group

Author Index

Authors

        </menu>

{{ settings.TITLE }} Repository status

        {% if settings.REPO_URL %}

{{ settings.REPO_URL }}

        {% endif %}

      {% set TOP = '[#Top]' %}

{{ TOP }}
Summary

Statistics from {{ total.commits[-1].date.short }} to {{ total.commits[0].date.short }}

{{ numformat(authors|length) }} contributors

{{ numformat(total.commits|length) }} commits

{{ actives.authors|length }} active contributors in {{ settings.ACTIVE_DAYS }} days

And they contributed {{ active_commits.commits|length }} commits

{{ newfaces.authors|length }} new contributors in {{ settings.ACTIVE_DAYS }} days

And they contributed {{ newfaces.commits|length }} commits

{{ mauthors|length }} mergers merged {{ mcommits|length }} commits

{{ TOP }}
Author by Group

          {% for group in [actives, newfaces] + groups %}
          {% if group.authors|length %}

{{ TOP }}
{{ group.groupname }}

          {% if group.url %}

{{ group.url }}
          {% endif %}
          {% if group.description %}

{{ group.description }}

          {% endif %}

{{ group.authors|length }} users contributed {{ numformat(group.commits|length) }} commits

{{ (group.authors|length * 100 / authors|length)|round(1) }}% of users

{{ (group.commits|length * 100 / total.commits|length)|round(1) }}% of commits, impacts {{ group.commit_impact }} of {{ total.commit_impact }}

Members are: {% for author in group.authors %}{{ author.names[0] }} {% endfor %}

          {% endif %}
          {% endfor %}

{{ TOP }}
Mergers

{{ mauthors|length }} users merged {{ mcommits|length }} commits

{{ (mcommits|length * 100 / total.commits|length)|round(1) }}% of commits, but not counted in total

Members are:

            {% for author in mauthors %}

{{ author.name }} merged {{ mcommitd[author.email]|length }} commits

            {% endfor %}

{{ TOP }}
Author Index

        {%- for author in authors %}

#{{ author.rank }} {{ author.name }}({{ author.commits|length }} commits
            {%- if author in newfaces.authors %}, New!{% elif author in actives.authors %}, Active!{% endif -%}
          )

        {%- endfor %}

{{ TOP }}
Authors

      {% for author in authors %}

{{ TOP }}
{{ author.names[0] }}

            {% if author.names|length > 1 %}

Other names:

{% for name in author.names[1:] %}{{ name }} {% endfor %}

            {% endif %}

Groups:

{% for group in [actives, newfaces] + groups %}{% if author in group.authors %}{{ group.groupname }} {% endif %}{% endfor %}

Commit Count:

{{ author.commits|length }} (#{{ author.rank }})

Commit Rate:

{{ (author.commits|length * 100 / total.commits|length) |round(1) }}%

Commit Impact:

{{ author.commit_impact }} of {{ total.commit_impact }}

Search on Github:

{{ author.names[0] }} on Github or {{ author.email.split('@')[0] }} on Github

Commits

            {% for commit in author.commits[:settings.COMMIT_LIST_COUNT + 1] -%}
            {% if loop.index <= settings.COMMIT_LIST_COUNT -%}
              {{ commit.id[:7] }}
              {%- if loop.index <= settings.COMMIT_ABSTRACT_COUNT %}: {{ commit.date.short }} {{ commit.title }}
                {%- if commit.content -%}
                  {% if loop.index <= settings.COMMIT_DETAIL_COUNT -%}

{{ commit.content|escape }}

                  {%- else -%}
                    (...)
                  {%- endif %}
                {% endif -%}
                {% if commit.mergeset %}

++merge++ {% for merge in commit.mergeset %}{{ merge.id[:7] }}{% if author.email != merge.author.email %}({{ merge.author.name }}){% endif %}{% if not loop.last %} + {% endif %}{% endfor %}

                {% endif %}
                {% if not loop.last %}

{% endif -%}
              {% else %} {% endif -%}
            {%- else -%}
              and other {{ author.commits|length - settings.COMMIT_LIST_COUNT }} commits.
            {%- endif %}
            {%- endfor %}

      {% endfor %}

Generated by gitstat

Generated at {{ gentime }}

        {% if settings.GOOGLE_ANALYTICS %}

        {% endif %}


text:
package oauth.controller;

import javax.inject.Inject;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import oauth.service.MyServiceImpl;

@Controller
@RequestMapping("/np")
public class AuthController {

	@Inject
	MyServiceImpl myService;

	@ResponseBody
	@RequestMapping(method = RequestMethod.GET, value="/")
	public String np() {
		return myService.publicInfo();
	}

	@RequestMapping(method = RequestMethod.GET, value="/private")
	@ResponseBody
	public String returnPrivate() {
		return myService.privateInfo();
	}

	@RequestMapping(method = RequestMethod.GET, value="/admin")
	@ResponseBody
	public String adminInfo() {
		return myService.adminInfo();
	}

}