text:
<?php

namespace XeroPHP\Models\PracticeManager\Model;

use XeroPHP\Remote;

abstract class IdAndNameModel extends Remote\Model
{
    /**
     * @property string ID
     * @property string Name
     */

    /**
     * Get the resource uri of the class (AccountManagers) etc.
     *
     * @return string
     */
    public static function getResourceURI()
    {
        return '';
    }

    /**
     * Get the guid property.
     *
     * @return string
     */
    public static function getGUIDProperty()
    {
        return '';
    }

    /**
     * Get the stem of the API (core.xro) etc.
     *
     * @return string|null
     */
    public static function getAPIStem()
    {
        return Remote\URL::API_PRACTICE_MANAGER;
    }

    /**
     * Get the supported methods.
     */
    public static function getSupportedMethods()
    {
        return [
        ];
    }

    /**
     * Get the properties of the object.  Indexed by constants
     *  [0] - Mandatory
     *  [1] - Type
     *  [2] - PHP type
     *  [3] - Is an Array
     *  [4] - Saves directly.
     *
     * @return array
     */
    public static function getProperties()
    {
        return [
            'ID'         => [false, self::PROPERTY_TYPE_INT, null, false, false],
            'Name'       => [false, self::PROPERTY_TYPE_STRING, null, false, false],
        ];
    }

    public static function isPageable()
    {
        return false;
    }

    /**
     * @return int
     */
    public function getID()
    {
        return $this->_data['ID'];
    }

    /**
     * @param int $value
     *
     * @return self
     */
    public function setID($value)
    {
        $this->propertyUpdated('ID', $value);
        $this->_data['ID'] = $value;

        return $this;
    }

    /**
     * @return string
     */
    public function getName()
    {
        return $this->_data['Name'];
    }

    /**
     * @param string $value
     *
     * @return self
     */
    public function setName($value)
    {
        $this->propertyUpdated('Name', $value);
        $this->_data['Name'] = $value;

        return $this;
    }
}


text:
package io.cattle.platform.core.dao.impl;

import io.cattle.platform.core.dao.GenericResourceDao;
import io.cattle.platform.object.ObjectManager;
import io.cattle.platform.object.process.ObjectProcessManager;
import io.cattle.platform.object.process.StandardProcess;
import io.cattle.platform.util.type.CollectionUtils;
import io.github.ibuildthecloud.gdapi.util.TransactionDelegate;

import java.util.Map;

import javax.inject.Inject;
import javax.inject.Named;

@Named
public class GenericResourceDaoImpl implements GenericResourceDao {

    @Inject
    ObjectManager objectManager;
    @Inject
    ObjectProcessManager processManager;
    @Inject
    TransactionDelegate transaction;

    @Override
    public <T> T createAndSchedule(Class<T> clz, Map<String, Object> properties) {
        return transaction.doInTransactionResult(() -> {
            T obj = objectManager.create(clz, properties);
            processManager.scheduleStandardProcess(StandardProcess.CREATE, obj, properties);

            return objectManager.reload(obj);
        });
    }

    @Override
    public <T> T createAndSchedule(Class<T> clz, Object key, Object... values) {
        Map<Object,Object> properties = CollectionUtils.asMap(key, values);
        return createAndSchedule(clz, objectManager.convertToPropertiesFor(clz, properties));
    }

    @SuppressWarnings("unchecked")
    @Override
    public <T> T createAndSchedule(T objIn, Map<String, Object> processData) {
        return transaction.doInTransactionResult(() -> {
            Object obj = objectManager.create(objIn);
            processManager.scheduleStandardProcess(StandardProcess.CREATE, obj, processData);
            return (T)objectManager.reload(obj);
        });
    }

    @Override
    public <T> T createAndSchedule(T o) {
        return transaction.doInTransactionResult(() -> {
            T obj = objectManager.create(o);
            processManager.scheduleStandardProcess(StandardProcess.CREATE, obj, null);
            return objectManager.reload(o);
        });
    }

    @Override
    public <T> T updateAndSchedule(T o) {
        return transaction.doInTransactionResult(() -> {
            T obj = objectManager.persist(o);
            processManager.scheduleStandardProcess(StandardProcess.UPDATE, obj, null);
            return objectManager.reload(o);
        });
    }

    @Override
    public <T> T updateAndSchedule(T oIn, Map<String, Object> fields) {
        return transaction.doInTransactionResult(() -> {
            Object o = objectManager.reload(oIn);
            T obj = objectManager.setFields(o, fields);
            processManager.scheduleStandardProcess(StandardProcess.UPDATE, obj, null);
            return objectManager.reload(oIn);
        });
    }

    @Override
    public <T> T create(Class<T> clz, Object key, Object... values) {
        Map<Object,Object> properties = CollectionUtils.asMap(key, values);
        return create(clz, objectManager.convertToPropertiesFor(clz, properties));
    }

    @Override
    public <T> T create(Class<T> clz, Map<String, Object> properties) {
        return transaction.doInTransactionResult(() -> {
            T obj = objectManager.create(clz, properties);
            processManager.executeStandardProcess(StandardProcess.CREATE, obj, properties);

            return objectManager.reload(obj);
        });
    }
}

redpajama_set_name: RedPajamaGithub


text:
title: Pipes
---

# Pipes

#### Motivation

Output data transformations. They ensure data is in a desirable format by the time it loads onto the user's screen. Normally data transforms behind the scenes. With pipes, transforming data can take place in the template HTML. Pipes transform template data directly.

Pipes look nice and are convenient. They help keep the component's class lean of basic transformations. To put it technically, pipes encapsulate data transformation logic.

#### Output Transformation

As mentioned in the prior section, pipes transform data inline. The syntax of pipes correlate shell scripting. In many scripts, the output of one part of the command gets *piped* as output into the next part as input. That same trend characterizes Angular pipes.

In Angular, there exists many ways to interact with data in the template HTML. Pipes can apply anywhere data gets parsed into the template HTML. They can occur within microsyntax logic and innerHTML variable interpolations. Pipes account for all transformations without adding onto the component class.

Pipes are also *chainable*. You can integrate pipes one after the other to perform increasingly complex transformations. As specialized data transformers, pipes are hardly trivial.

#### Use Cases

Angular comes prepackaged with a basic set of pipes. Working with a couple of them will develop the intuition to handle the rest. The following list provides two examples.

* AsyncPipe

* DatePipe

These two perform simple tasks. Their simplicity is massively beneficial.

##### AsyncPipe

This sections requires a basic understanding of Promises or Observables to fully appreciate. The AsyncPipe operates on either of the two. AsyncPipe extracts data from Promises/Observables as output for whatever comes next.

In the case of Obervables, AsyncPipe subscribes automatically to the data source. Regardless of where the data comes from, the AsyncPipe subscribes to the source observable. `async` is the syntactical name of AsyncPipe as shown below.

```html
<ul *ngFor="let potato of (potatoSack$ | async); let i=index">
  <li>Potatoe {{i + 1}}: {{potato}}</li>
</ul>
```

In the example, `potatoSack$` is an Observable pending an upload of potatoes. Once the potatoes arrive, either synchronously or asynchronously, the AsyncPipe receives them as an *iterable* array. The list element then fills up with potatoes.

##### DatePipe

Formatting date strings takes a fair bit of hacking with the JavaScript `Date` object. The DatePipe provides a powerful way to format dates assuming the given input is a valid time format.

```typescript
// example.component.ts

@Component({
  templateUrl: './example.component.html'
})
export class ExampleComponent {
  timestamp:string = '2018-05-24T19:38:11.103Z';
}
```
```html
<!-- example.component.html -->

<div>Current Time: {{timestamp | date:'short'}}</div>
```

The format of the above `timestamp` is [ISO 86011](https://en.wikipedia.org/wiki/ISO_8601)—not the easiest to read. The DatePipe (`date`) transforms the ISO date format into a more conventional `mm/dd/yy, hh:mm AM|PM`. There are many other formatting options. All these options are in the [official documentation](https://angular.io/api/common/DatePipe).

#### Creating Pipes

While Angular only has a set number of pipes, the `@Pipe` decorator lets developers create their own. The process begins with `ng generate pipe [name-of-pipe]`, replacing `[name-of-pipe]` with a preferable filename. This is an [Angular CLI](https://cli.angular.io) command. It yields the following.

```typescript
import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
  name: 'example'
})
export class ExamplePipe implements PipeTransform {
  transform(value: any, args?: any): any {
      return null;
  }
}
```

This pipe template simplifies custom pipe creation. The `@Pipe` decorator tells Angular the class is a pipe. The value of `name: 'example'`, in this case being `example`, is the value Angular recognizes when scanning template HTML for custom pipes.

On to the class logic. The `PipeTransform` implementation provides the instructions for the `transform` function. This function has special meaning within context of the `@Pipe` decorator. It receives two parameters by default.

`value: any` is the output that the pipe receives. Think of `<div>{{ someValue | example }}</div>`. The value of someValue gets passed to the `transform` function's `value: any` parameter. This is the same `transform` function defined in the ExamplePipe class.

`args?: any` is any argument that the pipe optionally receives. Think of `<div>{{ someValue | example:[some-argument] }}</div>`. `[some-argument]` can be replace by any one value. This value gets passed to the `transform` function's `args?: any` parameter. That is, the `transform` function defined in ExamplePipe's class.

Whatever the function returns (`return null;`) becomes the output of the pipe operation. Take a look at the next example to see a complete example of ExamplePipe. Depending on the variable the pipe receives, it either uppercases or lowercases the input as new output. An invalid or nonexistent argument will cause the pipe to return the same input as output.

```typescript
// example.pipe.ts

@Pipe({
  name: 'example'
})
export class ExamplePipe implements PipeTransform {
  transform(value:string, args?:string): any {
    switch(args || null) {
      case 'uppercase':
        return value.toUpperCase();
      case 'lowercase':
        return value.toLowerCase();
      default:
        return value;
    }
  }
}
```
```typescript
// app.component.ts

@Component({
  templateUrl: 'app.component.html'
})
export class AppComponent {
  someValue:string = "HeLlO WoRlD!";
}
```
```html
<!-- app.component.html -->

<!-- Outputs "HeLlO WoRlD!" -->
<h6>{{ someValue | example }}</h6>

<!-- Outputs "HELLO WORLD!" -->
<h6>{{ someValue | example:'uppercase' }}</h6>

<!-- Outputs "hello world!" -->
<h6>{{ someValue | example:'lowercase' }}</h6>
```

Understanding the above example means you understand Angular pipes. There is only one more topic left to discuss.

#### Pure and Impure Pipes

Everything you have seen so far has been a *pure* pipe. `pure: true` is set by default in the `@Pipe` decorator's metadata. The difference between the two constitutes Angular's change detection.

Pure pipes update automatically whenever the value of its derived input changes. The pipe will re-execute to produce new output upon a detectable change in the input value. Detectable changes are determined by Angular's change detection loop.

Impure pipes update automatically whenever a change detection cycle occurs. Angular's change detection happens quite often. It signals if changes have occurred in the component class' member data. If so, the template HTML updates with the updated data. Otherwise, nothing will happen.

In the case of an impure pipe, it will update regardless of whether there is a detectable change or not. An impure pipe updates whenever change detection loops. Impure pipes usually consume lots of resources and are generally ill-advised. That said, they operate more as an escape hatch. If you ever need a detection-sensitive pipe, toggle `pure: false` in the `@Pipe` decorator's metadata.

#### Conclusion

That covers pipes. Pipes have plenty of potential beyond the scope of this article. Pipes contribute succinct data transformations to your components' template HTML. They are good practice in situations where data must undergo small transformations.

## Sources

1. [Wiki Community. *ISO 8601*. Wikipedia. Accessed 27 May 2018](https://en.wikipedia.org/wiki/ISO_8601)

## Resources

- [Angular Documentation](https://angular.io/guide/pipes)
- [Angular GitHub Repository](https://github.com/angular/angular)
- [List of Pipes Pre-packaged with Angular](https://angular.io/api?query=pipe)
- [Angular CLI](https://cli.angular.io)


text:
import ma = require('azure-pipelines-task-lib/mock-answer');
import tmrm = require('azure-pipelines-task-lib/mock-run');
import path = require('path');

const nock = require('nock');
const taskPath = path.join(__dirname, '..', '..', 'index.js');
const tmr: tmrm.TaskMockRunner = new tmrm.TaskMockRunner(taskPath);

// inputs
tmr.setInput('enableTelemetry', 'false');
tmr.setInput('rootDirectory', '/rootDirectory');

// http requests
nock('https://dc.services.visualstudio.com')
    .post('/v2/track')
    .reply(418);

// sdk answers
let answers = {
    'checkPath': {
        '/rootDirectory': false
    }
}
tmr.setAnswers(answers);

// act
tmr.run();


text:
> While not always necessary, sometimes you need to put your DOM in a box. For those situations, try the panel component.
By Bootstrap

## Basic

    {{#bs-panel heading="Simple Panel" footer="Panel Footer"}}

Panel content goes here...!

    {{/bs-panel}}

``` html
\{\{#bs-panel heading="Simple Panel" footer="Panel Footer"\}\}
    <p>Panel content goes here...!</p>
\{\{/bs-panel\}\}
```

## Contextual alternatives

> Like other components, easily make a panel more meaningful to a particular context by adding any of the contextual state classes.
By Bootstrap

    {{#bs-panel heading="Primary Panel" type="primary"}}

Panel content.

    {{/bs-panel}}
    {{#bs-panel heading="Success Panel" type="success"}}

Panel content.

    {{/bs-panel}}
    {{#bs-panel heading="Info Panel" type="info"}}

Panel content.

    {{/bs-panel}}
    {{#bs-panel heading="Warning Panel" type="warning"}}

Panel content.

    {{/bs-panel}}
    {{#bs-panel heading="Danger Panel" type="danger"}}

Panel content.

    {{/bs-panel}}

``` html
    \{\{#bs-panel heading="Primary Panel" type="primary"\}\}
        <p>Panel content.</p>
    \{\{/bs-panel\}\}
    \{\{#bs-panel heading="Success Panel" type="success"\}\}
        <p>Panel content.</p>
    \{\{/bs-panel\}\}
    \{\{#bs-panel heading="Info Panel" type="info"\}\}
        <p>Panel content.</p>
    \{\{/bs-panel\}\}
    \{\{#bs-panel heading="Warning Panel" type="warning"\}\}
        <p>Panel content.</p>
    \{\{/bs-panel}}
    \{\{#bs-panel heading="Danger Panel" type="danger"\}\}
        <p>Panel content.</p>
    \{\{/bs-panel\}\}
```

## Dismissable Panels

This goes beyond what Bootstrap offers and let you create a closable panels by adding the `dismiss=true` property

    {{#bs-panel heading="Primary Panel" type="primary" dismiss=true onClose="panelClosed"}}

Panel content.

    {{/bs-panel}}

``` html
\{\{#bs-panel heading="Primary Panel" type="primary" dismiss=true onClose="panelClosed"\}\}
    <p>Panel content.</p>
\{\{/bs-panel\}\}
```

## Clickable Panels

Panels can also be clickable, the click is propagated to the _current controller_ via the _clicked_ property

    {{#bs-panel heading="Primary Panel" type="primary" clicked="panelClicked"}}

Panel content.

    {{/bs-panel}}

``` html
\{\{#bs-panel heading="Primary Panel" type="primary" clicked="panelClicked"\}\}
    <p>Panel content.</p>
\{\{/bs-panel\}\}
```

## Collapsible Panels

Panels can be collapsible, to enable collapsible support set `collapsible=true` on the component tag:

{{#bs-panel heading="Simple Panel" collapsible=true dismiss=true footer="Panel Footer"}}

Panel content goes here...!

{{/bs-panel}}

``` html
\{\{#bs-panel heading="Simple Panel" collapsible=true dismiss=true footer="Panel Footer"\}\}
    <p>Panel content goes here...!</p>
\{\{/bs-panel\}\}
```

Collapsible panels can also be closed by default by setting `open=false`.

{{#bs-panel heading="Open me!" collapsible=true dismiss=true open=false}}

IM OPEN NOW!

{{/bs-panel}}

``` html
\{\{#bs-panel heading="Simple Panel" collapsible=true dismiss=true footer="Panel Footer"\}\}
    <p>Panel content goes here...!</p>
\{\{/bs-panel\}\}
```


text:
cask "adguard" do
  version "2.5.2.949"
  sha256 "a38b91ca238094604edd3988f22f92eaa0f5a9e99f0dbc5cc7b440a29f301f6b"

  url "https://static.adguard.com/mac/release/AdGuard-#{version}.dmg"
  name "Adguard"
  desc "Stand alone ad blocker"
  homepage "https://adguard.com/"

  livecheck do
    url "https://static.adguard.com/mac/adguard-release-appcast.xml"
    strategy :sparkle do |item|
      item.short_version.sub(/ release.*/, "")
    end
  end

  auto_updates true

  pkg "AdGuard.pkg"

  uninstall pkgutil: "com.adguard.mac.adguard-pkg"

  zap trash: [
    "/Library/Application Support/com.adguard.Adguard",
    "~/Library/Application Support/Adguard",
    "~/Library/Application Support/com.adguard.Adguard",
    "~/Library/Caches/com.adguard.Adguard",
    "~/Library/Cookies/com.adguard.Adguard.binarycookies",
    "~/Library/Logs/Adguard",
    "~/Library/Preferences/com.adguard.Adguard.plist",
  ]
end


text:
// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package org.chromium.chrome.browser.safety_check;

import org.chromium.base.Callback;

import java.lang.ref.WeakReference;

/**
 * Interface to interact with the version updater.
 *
 * Because the current {@link OmahaBase} implementation is in //chrome/android,
 * it is necessary to have some glue code in chrome_java that implements this
 * interface. Once Omaha is componentized, this pattern will no longer be
 * needed.
 */
public interface SafetyCheckUpdatesDelegate {
    /**
     * Asynchronously checks for updates and invokes the provided callback with
     * the result.
     * @param statusCallback A callback to invoke with the result. Takes an element of
     *                       {@link SafetyCheckProperties.UpdatesState} as an argument.
     */
    void checkForUpdates(WeakReference<Callback<Integer>> statusCallback);
}


text:
package com.amazonaws.services.glue.model.transform;

import javax.annotation.Generated;

import com.amazonaws.SdkClientException;
import com.amazonaws.services.glue.model.*;

import com.amazonaws.protocol.*;
import com.amazonaws.annotation.SdkInternalApi;

/**
 * CrawlerMetricsMarshaller
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class CrawlerMetricsMarshaller {

    private static final MarshallingInfo<String> CRAWLERNAME_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("CrawlerName").build();
    private static final MarshallingInfo<Double> TIMELEFTSECONDS_BINDING = MarshallingInfo.builder(MarshallingType.DOUBLE)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("TimeLeftSeconds").build();
    private static final MarshallingInfo<Boolean> STILLESTIMATING_BINDING = MarshallingInfo.builder(MarshallingType.BOOLEAN)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("StillEstimating").build();
    private static final MarshallingInfo<Double> LASTRUNTIMESECONDS_BINDING = MarshallingInfo.builder(MarshallingType.DOUBLE)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("LastRuntimeSeconds").build();
    private static final MarshallingInfo<Double> MEDIANRUNTIMESECONDS_BINDING = MarshallingInfo.builder(MarshallingType.DOUBLE)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("MedianRuntimeSeconds").build();
    private static final MarshallingInfo<Integer> TABLESCREATED_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("TablesCreated").build();
    private static final MarshallingInfo<Integer> TABLESUPDATED_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("TablesUpdated").build();
    private static final MarshallingInfo<Integer> TABLESDELETED_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("TablesDeleted").build();

    private static final CrawlerMetricsMarshaller instance = new CrawlerMetricsMarshaller();

    public static CrawlerMetricsMarshaller getInstance() {
        return instance;
    }

    /**
     * Marshall the given parameter object.
     */
    public void marshall(CrawlerMetrics crawlerMetrics, ProtocolMarshaller protocolMarshaller) {

        if (crawlerMetrics == null) {
            throw new SdkClientException("Invalid argument passed to marshall(...)");
        }

        try {
            protocolMarshaller.marshall(crawlerMetrics.getCrawlerName(), CRAWLERNAME_BINDING);
            protocolMarshaller.marshall(crawlerMetrics.getTimeLeftSeconds(), TIMELEFTSECONDS_BINDING);
            protocolMarshaller.marshall(crawlerMetrics.getStillEstimating(), STILLESTIMATING_BINDING);
            protocolMarshaller.marshall(crawlerMetrics.getLastRuntimeSeconds(), LASTRUNTIMESECONDS_BINDING);
            protocolMarshaller.marshall(crawlerMetrics.getMedianRuntimeSeconds(), MEDIANRUNTIMESECONDS_BINDING);
            protocolMarshaller.marshall(crawlerMetrics.getTablesCreated(), TABLESCREATED_BINDING);
            protocolMarshaller.marshall(crawlerMetrics.getTablesUpdated(), TABLESUPDATED_BINDING);
            protocolMarshaller.marshall(crawlerMetrics.getTablesDeleted(), TABLESDELETED_BINDING);
        } catch (Exception e) {
            throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
        }
    }

}


text:
package chromiumbuildstats

// ninja_log.go provides /ninja_log endpoints.

import (
	"bufio"
	"bytes"
	"compress/gzip"
	"encoding/json"
	"fmt"
	"html/template"
	"net/http"
	"path"
	"sort"
	"strings"

	"appengine"
	"appengine/user"

	"github.com/golang/oauth2/google"

	"logstore"
	"ninjalog"
	"ninjalog/traceviewer"
)

type outputFunc func(http.ResponseWriter, string, *ninjalog.NinjaLog) error

var (
	outputs = map[string]outputFunc{
		"lastbuild":     outputFunc(lastBuild),
		"table":         outputFunc(table),
		"metadata.json": outputFunc(metadataJSON),
		"trace.json":    outputFunc(traceJSON),
		"trace.html":    outputFunc(traceHTML),
	}

	formTmpl = template.Must(template.New("form").Parse(`

 <title>ninja_log</title>

{{if .User}}

{{.User.Email}} logout

<form action="/ninja_log/" method="post" enctype="multipart/form-data">
.ninja_log file:<input type="file" name="file" />
<input type="submit" name="upload" value="upload"><input type="submit" name="trace" value="trace"><input type="reset">
</form>
{{else}}

login

You need to login to upload .ninja_log file.
{{end}}

`))

	// logstore.URL(path) won't be accessible by user.
	indexTmpl = template.Must(template.New("index").Parse(`

 <title>{{.Path}}</title>

{{.Path}}

.ninja_log

.ninja_log in table format

metadata.json

trace viewer [trace.json]

`))

	tableTmpl = template.Must(template.New("table").Parse(`

 <title>{{.Filename}}</title>

{{.Filename}}

Platform: {{.Metadata.Platform}}
Cmdline: {{.Metadata.Cmdline}}
Exit:{{.Metadata.Exit}}

 n
 duration
 start
 end
 restat
 output

{{range $i, $step := .Steps}}

 {{$i}}
 {{$step.Duration}}
 {{$step.Start}}
 {{$step.End}}
 {{if gt $step.Restat 0}}{{$step.Restat}}{{end}}
 {{$step.Out}}

{{end}}

`))

	traceViewerTmpl = traceviewer.Must(traceviewer.Parse("tmpl/trace-viewer.html"))
)

func init() {
	http.Handle("/ninja_log/", http.StripPrefix("/ninja_log/", http.HandlerFunc(ninjaLogHandler)))
}

// ninjaLogHandler handles /<path>/<format> for ninja_log file in gs://chrome-goma-log/<path>
func ninjaLogHandler(w http.ResponseWriter, req *http.Request) {
	if req.URL.Path == "" {
		ninjalogForm(w, req)
		return
	}

	ctx := appengine.NewContext(req)

	// should we set access control like /file?

	config := google.NewAppEngineConfig(ctx, []string{
		"https://www.googleapis.com/auth/devstorage.read_only",
	})
	client := &http.Client{Transport: config.NewTransport()}

	logPath, outFunc, err := ninjalogPath(req.URL.Path)
	if err != nil {
		ctx.Errorf("failed to parse request path: %s: %v", req.URL.Path, err)
		http.Error(w, err.Error(), http.StatusBadRequest)
		return
	}

	njl, _, err := ninjalogFetch(client, logPath)
	if err != nil {
		ctx.Errorf("failed to fetch %s: %v", logPath, err)
		http.Error(w, err.Error(), http.StatusNotFound)
		return
	}

	err = outFunc(w, logPath, njl)
	if err != nil {
		ctx.Errorf("failed to output %v", err)
		http.Error(w, err.Error(), http.StatusInternalServerError)
		return
	}
}

func ninjalogForm(w http.ResponseWriter, req *http.Request) {
	if req.Method == "POST" {
		ninjalogUpload(w, req)
		return
	}
	ctx := appengine.NewContext(req)
	u := user.Current(ctx)
	login, err := user.LoginURL(ctx, "/ninja_log/")
	if err != nil {
		http.Error(w, err.Error(), http.StatusInternalServerError)
		return
	}
	logout, err := user.LogoutURL(ctx, "/ninja_log/")
	if err != nil {
		http.Error(w, err.Error(), http.StatusInternalServerError)
		return
	}
	w.Header().Set("Content-Type", "text/html")
	w.WriteHeader(http.StatusOK)
	data := struct {
		User   *user.User
		Login  string
		Logout string
	}{
		User:   u,
		Login:  login,
		Logout: logout,
	}
	err = formTmpl.Execute(w, data)
	if err != nil {
		ctx.Errorf("formTmpl: %v", err)
	}

}

func ninjalogUpload(w http.ResponseWriter, req *http.Request) {
	ctx := appengine.NewContext(req)
	u := user.Current(ctx)
	if u == nil {
		http.Error(w, "unauthorized", http.StatusUnauthorized)
		return
	}
	// TODO(ukai): allow only @google.com and @chromium.org?
	ctx.Infof("upload by %s", u.Email)
	f, _, err := req.FormFile("file")
	if err != nil {
		http.Error(w, err.Error(), http.StatusBadRequest)
		return
	}
	defer f.Close()
	njl, err := ninjalog.Parse("ninja_log", f)
	if err != nil {
		ctx.Errorf("bad format: %v", err)
		http.Error(w, fmt.Sprintf("malformed ninja_log file %v", err), http.StatusBadRequest)
		return
	}
	var data bytes.Buffer
	err = ninjalog.Dump(&data, njl.Steps)
	if err != nil {
		ctx.Errorf("dump error: %v", err)
		http.Error(w, err.Error(), http.StatusInternalServerError)
		return
	}
	config := google.NewAppEngineConfig(ctx, []string{
		"https://www.googleapis.com/auth/devstorage.read_write",
	})
	client := &http.Client{Transport: config.NewTransport()}

	logPath, err := logstore.Upload(client, "ninja_log", data.Bytes())
	if err != nil {
		ctx.Errorf("upload error: %v", err)
		http.Error(w, err.Error(), http.StatusInternalServerError)
		return
	}
	ctx.Infof("%s upload to %s", u.Email, logPath)

	if req.FormValue("trace") != "" {
		http.Redirect(w, req, "/ninja_log/"+logPath+"/trace.html", http.StatusSeeOther)
		return
	}
	http.Redirect(w, req, "/ninja_log/"+logPath, http.StatusSeeOther)
}

func ninjalogPath(reqPath string) (string, outputFunc, error) {
	basename := path.Base(reqPath)
	for format, f := range outputs {
		if basename == format {
			logPath := path.Dir(reqPath)
			return logPath, f, nil
		}
	}
	if !strings.HasPrefix(basename, "ninja_log.") {
		return "", nil, fmt.Errorf("unexpected path %s", reqPath)
	}
	return strings.TrimSuffix(reqPath, "/"), outputFunc(indexPage), nil
}

func ninjalogFetch(client *http.Client, logPath string) (*ninjalog.NinjaLog, http.Header, error) {
	resp, err := logstore.Fetch(client, logPath)
	if err != nil {
		return nil, nil, err
	}
	defer resp.Body.Close()
	const bufsize = 512 * 1024
	rd, err := gzip.NewReader(bufio.NewReaderSize(resp.Body, bufsize))
	if err != nil {
		return nil, nil, err
	}
	nl, err := ninjalog.Parse(logPath, rd)
	return nl, resp.Header, err
}

func indexPage(w http.ResponseWriter, logPath string, njl *ninjalog.NinjaLog) error {
	w.Header().Set("Content-Type", "text/html")
	w.WriteHeader(http.StatusOK)
	data := struct {
		Path     string
		Filename string
	}{
		Path:     logPath,
		Filename: path.Base(njl.Filename),
	}
	return indexTmpl.Execute(w, data)
}

func lastBuild(w http.ResponseWriter, logPath string, njl *ninjalog.NinjaLog) error {
	w.Header().Set("Content-Type", "text/plain")
	w.WriteHeader(http.StatusOK)
	return ninjalog.Dump(w, njl.Steps)
}

func table(w http.ResponseWriter, logPath string, njl *ninjalog.NinjaLog) error {
	w.Header().Set("Content-Type", "text/html")
	w.WriteHeader(http.StatusOK)
	sort.Sort(sort.Reverse(ninjalog.ByDuration{Steps: njl.Steps}))
	return tableTmpl.Execute(w, njl)
}

func metadataJSON(w http.ResponseWriter, logPath string, njl *ninjalog.NinjaLog) error {
	js, err := json.Marshal(njl.Metadata)
	if err != nil {
		return err
	}
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(http.StatusOK)
	_, err = w.Write(js)
	return err
}

func traceJSON(w http.ResponseWriter, logPath string, njl *ninjalog.NinjaLog) error {
	steps := ninjalog.Dedup(njl.Steps)
	flow := ninjalog.Flow(steps)
	traces := ninjalog.ToTraces(flow, 1)
	js, err := json.Marshal(traces)
	if err != nil {
		return err
	}
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(http.StatusOK)
	_, err = w.Write(js)
	return err
}

func traceHTML(w http.ResponseWriter, logPath string, njl *ninjalog.NinjaLog) error {
	steps := ninjalog.Dedup(njl.Steps)
	flow := ninjalog.Flow(steps)
	traces := ninjalog.ToTraces(flow, 1)
	b, err := traceViewerTmpl.HTML(logPath, traces)
	if err != nil {
		return err
	}
	w.Header().Set("Content-Type", "text/html; charset=utf-8")
	w.WriteHeader(http.StatusOK)
	_, err = w.Write(b)
	return err
}


text:
from django.shortcuts import render

def MUSE_filter_integers(request, input_dict, output_dict, widget):
    return render(request, 'interactions/MUSE_filter_integers.html',
                  {'widget': widget, 'intList': input_dict['intList']})

def MUSE_string_to_file(request, input_dict, output_dict, widget):
    from mothra.settings import MEDIA_ROOT
    from workflows.helpers import ensure_dir

    basename = '/'.join([str(request.user.id), str(widget.id) + str(input_dict['fending'])])
    destination = '/'.join([MEDIA_ROOT, basename])
    ensure_dir(destination)
    with open(destination, 'w') as f:
        f.write(str(input_dict['data']))
    return render(request, 'visualizations/MUSE_string_to_file.html', {'widget': widget, 'fileURL': basename})


text:
class EventHandler:
    def __init__(self):
        self.events_queue = {}
        self.last_events = {}
        self.using_events = True
        self.MAX_QUEUE_LENGTH = 20

    def pop_queue(self, event_stream_port):
        while True:
            data = self.events_queue[event_stream_port].get()
            yield data


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace WKFramework.WPF.Navigation
{
    public class NavigationService : INavigationService
    {
        private IWindowManager _windowManager;
        private IViewModelFactory _vmFactory = new ViewModelFactory();

        public NavigationService()
        {
            _windowManager = new WindowManager(_vmFactory);
        }

        public NavigationService(IViewModelFactory viewModelFactory)
        {
            _vmFactory = viewModelFactory;
            _windowManager = new WindowManager(viewModelFactory);
        }

        public NavigationService(IWindowManager windowManager)
        {
            _windowManager = windowManager;
        }

        public NavigationService(IViewModelFactory viewModelFactory, IWindowManager windowManager)
        {
            _windowManager = windowManager;
            _vmFactory = viewModelFactory;
        }

        public INavigationService<TViewModel> GetWindow<TViewModel>()
        {
            return new NavigationService<TViewModel>(_windowManager, _vmFactory.Get<TViewModel>());
        }
    }

    public class NavigationService<TVM> : INavigationService<TVM>
    {
        private IWindowManager _windowManager;
        private TVM _viewModel;
        private Action<TVM> _successAction;
        private Action<TVM> _cancelAction;
        private Action<TVM> _closeAction;

        public NavigationService(IWindowManager windowManager, TVM viewModel)
        {
            _windowManager = windowManager;
            _viewModel = viewModel;
        }

        public INavigationService<TVM> WithParam<TProperty>(Expression<Func<TVM, TProperty>> property, TProperty value)
        {
            var prop = (PropertyInfo)((MemberExpression)property.Body).Member;
            prop.SetValue(_viewModel, value, null);

            return this;
        }

        public INavigationService<TVM> SetupViewModel(Action<TVM> action)
        {
            if (action != null)
            {
                action(_viewModel);
            }
            return this;
        }

        public INavigationService<TVM> DoIfAccepted(Action<TVM> action)
        {
            _successAction = action;
            return this;
        }

        public INavigationService<TVM> DoIfCancelled(Action<TVM> action)
        {
            _cancelAction = action;
            return this;
        }

        public INavigationService<TVM> DoAfterClose(Action<TVM> action)
        {
            _closeAction = action;
            return this;
        }

        public void ShowWindow()
        {
            _windowManager.ShowWindow(_viewModel, _closeAction);
        }

        public bool ShowDialog()
        {
            bool result = _windowManager.ShowDialog(_viewModel) ?? false;

            if (_closeAction != null)
                _closeAction(_viewModel);

            if (result && _successAction != null)
            {
                _successAction(_viewModel);
            }
            else if (!result && _cancelAction != null)
            {
                _cancelAction(_viewModel);
            }

            return result;
        }
    }
}


text:
public class Groundhog2 extends Groundhog {
  public Groundhog2(int n) { super(n); }
  public int hashCode() { return number; }
  public boolean equals(Object o) {
    return o instanceof Groundhog2 &&
      (number == ((Groundhog2)o).number);
  }
} ///:~


text:
nanoc-skeleton
==============

[![Dependency Status](https://gemnasium.com/alessandro1997/nanoc-skeleton.svg)](https://gemnasium.com/alessandro1997/nanoc-skeleton)

[nanoc-skeleton](https://github.com/alessandro1997/nanoc-skeleton) is a starter
template for the [nanoc](https://nanoc.ws) static website generator.

## Features

This starter template provides the following features out of the box:

  - [Compass](http://compass-style.org/)
  - [bootstrap-sass](https://github.com/twbs/bootstrap-sass)
  - [Bootstrap's JavaScript](http://getbootstrap.com/javascript) (through a CDN)
  - [guard-nanoc](https://github.com/guard/guard-nanoc)

## Usage

Using this template is pretty simple:

```console
$ git clone git://github.com/alessandro1997/nanoc-skeleton.git
$ cd nanoc-skeleton
$ bundle install
$ bundle exec guard
```

This will compile your new shining nanoc site and start watching for changes.

To start a web server run:

```console
$ bundle exec nanoc view
```

You can now access your site at [http://localhost:3000](http://localhost:3000)!

## Assets

To customize your site, open ```content/assets/styles/main.scss```. By default
it should look something like this:

```scss
@import "bootstrap/bootstrap";

body {
  padding-top: 60px;
}
```

You're free to edit ```main.scss``` directly, but we recommend splitting your
layout into separate files.

### Assets compilation

All assets beginning with an underscore will not be routed by nanoc. This allows
you to output your CSS in a single file while providing the benefit of multiple
stylesheets.

For example, you can put all your mixins into a ```_mixins.scss``` file. Then,
wherever you want to use them, you can import the file:

```scss
@import "mixins";

// ...
```

Nice, right?

## Contributing

1. [Fork it](http://github.com/alessandro1997/nanoc-skeleton/fork)
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

## Authors

nanoc-skeleton is developed and mantained by [Alessandro Desantis](http://alessandro1997.github.io).

## License

nanoc-skeleton is released under the [MIT license](https://github.com/alessandro1997/nanoc-skeleton/blob/master/LICENSE.txt).


text:
import syntaxOptionalCatchBinding from "babel-plugin-syntax-optional-catch-binding";

export default function() {
  return {
    inherits: syntaxOptionalCatchBinding,

    visitor: {
      CatchClause(path) {
        if (!path.node.param) {
          const uid = path.scope.generateUidIdentifier("unused");
          const paramPath = path.get("param");
          paramPath.replaceWith(uid);
        }
      },
    },
  };
}


text:
static void kernel_aot_test(TiArch arch) {
  uint32_t kArrLen = 32;
  int arg0_val = 0;

  const auto folder_dir = getenv("TAICHI_AOT_FOLDER_PATH");

  std::stringstream aot_mod_ss;
  aot_mod_ss << folder_dir;

  ti::Runtime runtime(arch);

  ti::NdArray<int32_t> arg1_array =
      runtime.allocate_ndarray<int32_t>({kArrLen}, {1}, true);
  ti::AotModule aot_mod = runtime.load_aot_module(aot_mod_ss.str().c_str());
  ti::Kernel k_run = aot_mod.get_kernel("run");

  std::vector<int> arg2_v = {1, 2, 3};

  // This is just to make sure clear_args() does its work.
  k_run.push_arg(arg0_val);
  k_run.clear_args();

  k_run.push_arg(arg0_val);
  k_run.push_arg(arg1_array);
  k_run.push_arg(arg2_v);
  k_run.launch();
  runtime.wait();

  // Check Results
  int32_t *data = reinterpret_cast<int32_t *>(arg1_array.map());

  for (int i = 0; i < kArrLen; ++i) {
    EXPECT_EQ(data[i], i + arg0_val + arg2_v[0]);
  }

  arg1_array.unmap();
}

static void field_aot_test(TiArch arch) {
  int base_val = 10;

  const auto folder_dir = getenv("TAICHI_AOT_FOLDER_PATH");

  std::stringstream aot_mod_ss;
  aot_mod_ss << folder_dir;

  ti::Runtime runtime(arch);
  ti::AotModule aot_mod = runtime.load_aot_module(aot_mod_ss.str().c_str());

  ti::Kernel k_init_fields = aot_mod.get_kernel("init_fields");
  ti::Kernel k_check_init_x = aot_mod.get_kernel("check_init_x");
  ti::Kernel k_check_init_y = aot_mod.get_kernel("check_init_y");
  ti::Kernel k_deactivate_pointer_fields =
      aot_mod.get_kernel("deactivate_pointer_fields");
  ti::Kernel k_activate_pointer_fields =
      aot_mod.get_kernel("activate_pointer_fields");
  ti::Kernel k_check_deactivate_pointer_fields =
      aot_mod.get_kernel("check_deactivate_pointer_fields");
  ti::Kernel k_check_activate_pointer_fields =
      aot_mod.get_kernel("check_activate_pointer_fields");

  k_init_fields[0] = base_val;
  k_init_fields.launch();
  k_check_init_x[0] = base_val;
  k_check_init_x.launch();
  k_check_init_y.launch();
  k_deactivate_pointer_fields.launch();
  k_check_deactivate_pointer_fields.launch();
  k_activate_pointer_fields.launch();
  k_check_activate_pointer_fields.launch();
  runtime.wait();

  // Check Results
  capi::utils::check_runtime_error(runtime);
}

TEST_F(CapiTest, AotTestCpuField) {
  TiArch arch = TiArch::TI_ARCH_X64;
  field_aot_test(arch);
}

TEST_F(CapiTest, AotTestCudaField) {
  if (capi::utils::is_cuda_available()) {
    TiArch arch = TiArch::TI_ARCH_CUDA;
    field_aot_test(arch);
  }
}

TEST_F(CapiTest, AotTestCpuKernel) {
  TiArch arch = TiArch::TI_ARCH_X64;
  kernel_aot_test(arch);
}

TEST_F(CapiTest, AotTestCudaKernel) {
  if (capi::utils::is_cuda_available()) {
    TiArch arch = TiArch::TI_ARCH_CUDA;
    kernel_aot_test(arch);
  }
}

TEST_F(CapiTest, AotTestVulkanKernel) {
  if (capi::utils::is_vulkan_available()) {
    TiArch arch = TiArch::TI_ARCH_VULKAN;
    kernel_aot_test(arch);
  }
}

TEST_F(CapiTest, AotTestOpenglKernel) {
  if (capi::utils::is_opengl_available()) {
    TiArch arch = TiArch::TI_ARCH_OPENGL;
    kernel_aot_test(arch);
  }
}


text:
// Copyright 2019 Google LLC
//
// 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
//
//     https://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 com.google.sps.servlets;

import com.google.appengine.api.datastore.DatastoreService;
import com.google.appengine.api.datastore.DatastoreServiceFactory;
import com.google.appengine.api.datastore.Entity;
import com.google.appengine.api.datastore.EntityNotFoundException;
import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory;
import com.google.appengine.api.datastore.PreparedQuery;
import com.google.appengine.api.datastore.Query;
import com.google.appengine.api.datastore.Query.FilterOperator;
import com.google.appengine.api.datastore.Query.FilterPredicate;
import com.google.appengine.api.users.UserService;
import com.google.appengine.api.users.UserServiceFactory;
import com.google.common.flogger.FluentLogger;
import com.google.sps.data.UtilityClass;
import freemarker.template.Configuration;
import freemarker.template.Template;
import freemarker.template.TemplateException;
import freemarker.template.TemplateExceptionHandler;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Servlet to display the form to create a group.
 *
 * @author Aidan Molloy
 */
@WebServlet("/groups")
public class GroupsServlet extends HttpServlet {
  private static final FluentLogger logger = FluentLogger.forEnclosingClass();
  Configuration cfg;

  /**
   * Set up the configuration once.
   */
  public void init(ServletConfig config) throws ServletException {
    super.init(config);
    cfg = new Configuration(Configuration.VERSION_2_3_30);
    String path = getServletContext().getRealPath("/WEB-INF/templates/");
    try {
      cfg.setDirectoryForTemplateLoading(new File(path));
    } catch (IOException e) {
      logger.atWarning().log("Could not set directory for template loading: %s", e);
    }
    // Recommended settings for new projects:
    cfg.setDefaultEncoding("UTF-8");
    cfg.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);
    cfg.setLogTemplateExceptions(false);
    cfg.setWrapUncheckedExceptions(true);
    cfg.setFallbackOnNullLoopVariable(false);
  }

  /**
   * Display groups you own and are a member of,
   * Display form for creating groups,
   * If groupID is provided display specific group details.
   *
   * @param request  provides request information from the HTTP servlet
   * @param response response object where servlet will write information to
   */
  @Override
  public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
    // Only logged in users should access this page.
    UserService userService = UserServiceFactory.getUserService();
    if (!userService.isUserLoggedIn()
        || !userService.getCurrentUser().getEmail().contains("@google.com")) {
      logger.atWarning().log("User is not logged in.");
      response.sendRedirect("/");
      return;
    }
    logger.atInfo().log("user=%s", userService.getCurrentUser());
    Map data = new HashMap();
    String groupID = UtilityClass.getParameter(request, "groupID", null);
    logger.atInfo().log("groupID: %s", groupID);
    Entity groupEntity = null;
    String groupContent = "";

    if (groupID != null) {
      // If an exam has been selected remove html tags and trim the ID
      groupID = UtilityClass.processExternalText(groupID);
      try {
        DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
        Key key = KeyFactory.createKey("Group", Long.parseLong(groupID));
        groupEntity = datastore.get(key);
      } catch (EntityNotFoundException e) {
        groupContent += ("
Selected group is not available.
");
        logger.atInfo().log("Group ID does not exist: %s", e);
      }
      if (groupEntity != null) {
        // If group exists, then display the group and members
        String name = (String) groupEntity.getProperty("name");
        String description = (String) groupEntity.getProperty("description");
        final String ownerID = (String) groupEntity.getProperty("ownerID");
        List<String> members = null;
        try {
          members = (List<String>) groupEntity.getProperty("members");
        } catch (Exception e) {
          logger.atWarning().log("There was an error getting the members list: %s", e);
        }
        groupContent += ("
Group Name: " + name + "
");
        groupContent += ("
Description: " + description + "
");
        groupContent += ("
Owner: " + ownerID + "
");

        // If the current user is the owner they can add and remove members
        if (ownerID.equals(userService.getCurrentUser().getEmail())) {
          if (members != null) {
            groupContent += ("
");
            groupContent += ("
User Email	Remove
");
            for (String member : members) {
              // For each member display their email and a button to remove
              groupContent += ("
" + member + "	");
              groupContent += ("<form action=\"/editGroup\" method=\"POST\">");
              groupContent += ("<input type=\"hidden\" id=\"groupID\" name=\"groupID\" "
                  + "value=" + groupID + ">");
              groupContent += ("<input type=\"hidden\" id=\"editType\" name=\"editType\" "
                  + "value=\"remove\">");
              groupContent += ("<input type=\"hidden\" id=\"email\" name=\"email\" "
                  + "value=" + member + ">");
              groupContent += ("<input type=\"submit\" id=\"removeMember\" name=\"removeMember\""
                  + "value=\"Remove\">
");
              groupContent += ("</form>");
            }
          } else {
            groupContent += ("
There are no members in this group yet
");
          }
          groupContent += ("

");
          groupContent += ("
Add Member
");
          groupContent += ("<form action=\"/editGroup\" method=\"POST\">");
          groupContent += ("<input type=\"hidden\" id=\"groupID\" name=\"groupID\" "
              + "value=" + groupID + ">");
          groupContent += ("<input type=\"hidden\" id=\"editType\" name=\"editType\" value=\"add\">");
          groupContent += ("Enter User's Email:
");
          groupContent += ("<input type=\"text\" id=\"email\" name=\"email\" required>");
          groupContent += ("<input type=\"submit\" id=\"addMember\" name=\"addMember\" "
              + "value=\"Add Member\">");
          groupContent += ("</form>");

        } else {
          if (members != null) {
            groupContent += ("
Number of members: " + members.size() + "
");
          } else {
            groupContent += ("
There are no members in this group yet
");
          }
        }
        groupContent += ("");
      }
    }

    if (groupID == null || groupEntity == null) {
      groupContent += ("
Create a Group
");
      groupContent += ("<form id=\"createGroup\" action=\"/editGroup\" method=\"POST\">");
      groupContent += ("<input type=\"hidden\" id=\"editType\" name=\"editType\" value=\"create\">");
      groupContent += ("Enter Group Name:
");
      groupContent += ("<input type=\"text\" id=\"name\" name=\"name\" onclick=\"startDictation(this.id)\" required>
");
      groupContent += ("Enter Group Description:
");
      groupContent += ("<input type=\"text\" id=\"description\" name=\"description\" onclick=\"startDictation(this.id)\">
");
      groupContent += ("<input type=\"submit\" value=\"Submit\">");
      groupContent += ("</form>");

      try {
        Query getUserGroups = new Query("UserGroup").setFilter(new FilterPredicate("email",
            FilterOperator.EQUAL, userService.getCurrentUser().getEmail()));
        DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
        PreparedQuery pq = datastore.prepare(getUserGroups);
        Entity userGroupEntity = pq.asSingleEntity();
        List<Long> owner = null;
        List<Long> member = null;
        if (userGroupEntity != null) {
          owner = (List<Long>) userGroupEntity.getProperty("owner");
          if (owner == null) {
            owner = new ArrayList<>();
          }
          member = (List<Long>) userGroupEntity.getProperty("member");
          if (member == null) {
            member = new ArrayList<>();
          }
        }
        groupContent += ("
Owned groups
");
        if (owner == null) {
          groupContent += ("
You do not own any groups.
");
        } else {
          groupContent += ("

Group name	Members
");
          for (Long ownerIndex : owner) {
            try {
              Key key = KeyFactory.createKey("Group", ownerIndex);
              Entity gs = datastore.get(key);
              String groupName = (String) gs.getProperty("name");
              List<String> members = (List<String>) gs.getProperty("members");
              if (members == null) {
                members = new ArrayList<String>();
              }
              long id = gs.getKey().getId();
              groupContent += ("
");
              groupContent += ("" + groupName + "	");
              groupContent += ("" + members.size() + "	");
              groupContent += ("View/Edit	");
              groupContent += ("
");
            } catch (EntityNotFoundException e) {
              logger.atWarning().log("Problem while searching groups user owns: %s", e);
              response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
                  "Problem while searching groups user owns");
              return;
            }
          }
          groupContent += ("
");
        }
        groupContent += ("
Groups you are a member of
");
        if (member == null) {
          groupContent += ("
You are not a member of any group.
");
        } else {
          groupContent += ("

Group name	Members
");
          for (Long memberIndex : member) {
            try {
              Key key = KeyFactory.createKey("Group", memberIndex);
              Entity gs = datastore.get(key);
              String groupName = (String) gs.getProperty("name");
              List<String> members = (List<String>) gs.getProperty("members");
              if (members == null) {
                members = new ArrayList<>();
              }
              long id = gs.getKey().getId();
              groupContent += ("
");
              groupContent += ("" + groupName + "	");
              groupContent += ("" + members.size() + "	");
              groupContent += ("View	");
              groupContent += ("
");
            } catch (EntityNotFoundException e) {
              logger.atWarning().log("Problem while searching groups user is a member of: %s", e);
              response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
                  "Problem while searching groups user is a member of");
              return;
            }
          }
          groupContent += ("
");
        }
      } catch (Exception e) {
        logger.atWarning().log("Problem while adding group to users groups: %s", e);
        response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
            "Problem while adding group to users groups");
      }
    }
    data.put("groupContent", groupContent);
    // run to freemarker template
    try {
      Template template = cfg.getTemplate("Groups.ftl");
      PrintWriter out = response.getWriter();
      template.process(data, out);
      logger.atInfo().log("Groups page was displayed correctly for the User:"
          + "%s", userService.getCurrentUser());
    } catch (TemplateException e) {
      logger.atWarning().log("There was a problem with processing the template %s", e);
      response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
          "Internal Error occurred when trying to display the Groups Page");
    }
  }
}


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Malpighia 11: 514 (1897)

#### Original name
Nectria xanthostroma Penz. & Sacc., 1897

### Remarks
null


text:
<?php

declare(strict_types=1);

namespace Bluz\Proxy;

use Bluz\EventManager\EventManager as Instance;

/**
 * Proxy to EventManager
 *
 * Example of usage
 * <code>
 *     use Bluz\Proxy\EventManager;
 *
 *     EvenManager::attach('event name', function() {
 *         // ... some logic
 *     });
 *
 *     EventManager::trigger('event name');
 * </code>
 *
 * @package  Bluz\Proxy
 * @author   Anton Shevchuk
 *
 * @method   static Instance getInstance()
 *
 * @method   static Instance attach($eventName, $callback, $priority = 1)
 * @see      Instance::attach()
 *
 * @method   static string|object trigger($event, $target = null, $params = null)
 * @see      Instance::trigger()
 */
final class EventManager
{
    use ProxyTrait;

    /**
     * Init instance
     *
     * @return Instance
     */
    private static function initInstance(): Instance
    {
        return new Instance();
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<Configurations xmlns:i="http://www.w3.org/2001/XMLSchema-instance" z:Id="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" xmlns="DefaultValues">
	<Configurations>
		<Configuration z:Id="i2">
			<Compiler_dictionary xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>DebugLevel</d4p1:Key>
					<d4p1:Value>None</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>IncludePaths</d4p1:Key>
					<d4p1:Value>NDEBUG</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>MiscellaneousSettings</d4p1:Key>
					<d4p1:Value>-std=gnu99</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>OptimizationLevel</d4p1:Key>
					<d4p1:Value>Optimize for size (-Os)</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>SymbolDefines</d4p1:Key>
					<d4p1:Value>NDEBUG</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>SymbolUndefines</d4p1:Key>
					<d4p1:Value></d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>Verbose</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>WarningsAsErrors</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.general.CLanguageExp</d4p1:Key>
					<d4p1:Value>True</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.general.ChangeDefaultCharTypeUnsigned</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.general.ChangeDefaultBitFieldUnsigned</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.general.processormode</d4p1:Key>
					<d4p1:Value></d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.preprocessor.DoNotSearchSystemDirectories</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.preprocessor.PreprocessOnly</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.symbols.Default</d4p1:Key>
					<d4p1:Value></d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.directories.DefaultIncludePath</d4p1:Key>
					<d4p1:Value>True</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.optimization.OtherFlags</d4p1:Key>
					<d4p1:Value></d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.optimization.PrepareFunctionsForGarbageCollection</d4p1:Key>
					<d4p1:Value>True</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.optimization.PrepareDataForGarbageCollection</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.optimization.EnableUnsafeMatchOptimizations</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.optimization.EnableFastMath</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.optimization.GeneratePositionIndependentCode</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.optimization.EnableLongCalls</d4p1:Key>
					<d4p1:Value>True</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.optimization.OtherDebuggingFlags</d4p1:Key>
					<d4p1:Value></d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.optimization.GenerateGprofInformation</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.optimization.GenerateProfInformation</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.warnings.AllWarnings</d4p1:Key>
					<d4p1:Value>True</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.warnings.ExtraWarnings</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.warnings.Undefined</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.warnings.CheckSyntaxOnly</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.warnings.Pedantic</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.warnings.PedanticWarningsAsErrors</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.warnings.InhibitAllWarnings</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.miscellaneous.Device</d4p1:Key>
					<d4p1:Value>True</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.miscellaneous.CompileOnly</d4p1:Key>
					<d4p1:Value>True</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.miscellaneous.SupportAnsiPrograms</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.miscellaneous.MakeFileDependent</d4p1:Key>
					<d4p1:Value>True</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
			</Compiler_dictionary>
			<Linker_dictionary xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>Libraries</d4p1:Key>
					<d4p1:Value>libm</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>LibrarySearchPath</d4p1:Key>
					<d4p1:Value>$(ProjectDir)\Device_Startup</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>MiscellaneousSettings</d4p1:Key>
					<d4p1:Value>-Tsaml11e16a_flash.ld</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.general.DoNotUseStandardStartFiles</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.general.DoNotUseDefaultLibraries</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.general.NoStartupOrDefaultLibs</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.general.OmitAllSymbolInformation</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.general.NoSharedLibraries</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.general.GenerateMAPFile</d4p1:Key>
					<d4p1:Value>True</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.general.UseNewlibNano</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.general.AdditionalSpecs</d4p1:Key>
					<d4p1:Value>None</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.optimization.GarbageCollectUnusedSections</d4p1:Key>
					<d4p1:Value>True</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.optimization.EnableUnsafeMatchOptimizations</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.optimization.EnableFastMath</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.optimization.GeneratePositionIndependentCode</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.memorysettings.Flash</d4p1:Key>
					<d4p1:Value></d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.memorysettings.Sram</d4p1:Key>
					<d4p1:Value></d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.memorysettings.ExternalRAM</d4p1:Key>
					<d4p1:Value></d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.miscellaneous.OtherOptions</d4p1:Key>
					<d4p1:Value></d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.miscellaneous.OtherObjects</d4p1:Key>
					<d4p1:Value></d4p1:Value>
				</d4p1:KeyValueOfstringstring>
			</Linker_dictionary>
			<Name>Release</Name>
		</Configuration>
		<Configuration z:Id="i3">
			<Compiler_dictionary xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>DebugLevel</d4p1:Key>
					<d4p1:Value>Maximum (-g3)</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>IncludePaths</d4p1:Key>
					<d4p1:Value>DEBUG</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>MiscellaneousSettings</d4p1:Key>
					<d4p1:Value>-std=gnu99</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>OptimizationLevel</d4p1:Key>
					<d4p1:Value>Optimize (-O1)</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>SymbolDefines</d4p1:Key>
					<d4p1:Value>DEBUG</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>SymbolUndefines</d4p1:Key>
					<d4p1:Value></d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>Verbose</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>WarningsAsErrors</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.general.CLanguageExp</d4p1:Key>
					<d4p1:Value>True</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.general.ChangeDefaultCharTypeUnsigned</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.general.ChangeDefaultBitFieldUnsigned</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.general.processormode</d4p1:Key>
					<d4p1:Value></d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.preprocessor.DoNotSearchSystemDirectories</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.preprocessor.PreprocessOnly</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.symbols.Default</d4p1:Key>
					<d4p1:Value></d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.directories.DefaultIncludePath</d4p1:Key>
					<d4p1:Value>True</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.optimization.OtherFlags</d4p1:Key>
					<d4p1:Value></d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.optimization.PrepareFunctionsForGarbageCollection</d4p1:Key>
					<d4p1:Value>True</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.optimization.PrepareDataForGarbageCollection</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.optimization.EnableUnsafeMatchOptimizations</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.optimization.EnableFastMath</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.optimization.GeneratePositionIndependentCode</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.optimization.EnableLongCalls</d4p1:Key>
					<d4p1:Value>True</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.optimization.OtherDebuggingFlags</d4p1:Key>
					<d4p1:Value></d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.optimization.GenerateGprofInformation</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.optimization.GenerateProfInformation</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.warnings.AllWarnings</d4p1:Key>
					<d4p1:Value>True</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.warnings.ExtraWarnings</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.warnings.Undefined</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.warnings.CheckSyntaxOnly</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.warnings.Pedantic</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.warnings.PedanticWarningsAsErrors</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.warnings.InhibitAllWarnings</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.miscellaneous.Device</d4p1:Key>
					<d4p1:Value>True</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.miscellaneous.CompileOnly</d4p1:Key>
					<d4p1:Value>True</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.miscellaneous.SupportAnsiPrograms</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.compiler.miscellaneous.MakeFileDependent</d4p1:Key>
					<d4p1:Value>True</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
			</Compiler_dictionary>
			<Linker_dictionary xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>Libraries</d4p1:Key>
					<d4p1:Value>libm</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>LibrarySearchPath</d4p1:Key>
					<d4p1:Value>$(ProjectDir)\Device_Startup</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>MiscellaneousSettings</d4p1:Key>
					<d4p1:Value>-Tsaml11e16a_flash.ld</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.general.DoNotUseStandardStartFiles</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.general.DoNotUseDefaultLibraries</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.general.NoStartupOrDefaultLibs</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.general.OmitAllSymbolInformation</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.general.NoSharedLibraries</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.general.GenerateMAPFile</d4p1:Key>
					<d4p1:Value>True</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.general.UseNewlibNano</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.general.AdditionalSpecs</d4p1:Key>
					<d4p1:Value>None</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.optimization.GarbageCollectUnusedSections</d4p1:Key>
					<d4p1:Value>True</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.optimization.EnableUnsafeMatchOptimizations</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.optimization.EnableFastMath</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.optimization.GeneratePositionIndependentCode</d4p1:Key>
					<d4p1:Value>False</d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.memorysettings.Flash</d4p1:Key>
					<d4p1:Value></d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.memorysettings.Sram</d4p1:Key>
					<d4p1:Value></d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.memorysettings.ExternalRAM</d4p1:Key>
					<d4p1:Value></d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.miscellaneous.OtherOptions</d4p1:Key>
					<d4p1:Value></d4p1:Value>
				</d4p1:KeyValueOfstringstring>
				<d4p1:KeyValueOfstringstring>
					<d4p1:Key>armgcc.linker.miscellaneous.OtherObjects</d4p1:Key>
					<d4p1:Value></d4p1:Value>
				</d4p1:KeyValueOfstringstring>
			</Linker_dictionary>
			<Name>Debug</Name>
		</Configuration>
	</Configurations>
</Configurations>


text:
<?php
namespace Brainteaser\Domain\Fixture\Exercise\ColoredTiles;

use Brainteaser\Domain\Exercise\ColoredTiles\ColoredTilesExercise;
use Brainteaser\Domain\Exercise\Difficulty;
use Brainteaser\Domain\Exercise\GridSize;
use Brainteaser\Domain\Exercise\SequenceNumber;
use Brainteaser\Domain\Exercise\Tile;
use Brainteaser\Domain\Exercise\TileSet;
use Brainteaser\Domain\Training\Training;
use DateTime;

class ColoredTilesExerciseFixture
{
    /**
     * @return ColoredTilesExercise
     */
    public static function getUnsolved() : ColoredTilesExercise
    {
        return new ColoredTilesExercise(
            'xy',
            new SequenceNumber(1),
            new Training(
                'tr',
                new DateTime
            ),
            new Difficulty(1),
            new GridSize(4,4),
            new TileSet(
                [
                    new Tile(0,0),
                    new Tile(1,0),
                    new Tile(2,0),
                    new Tile(3,0),
                ]
            ),
            new DateTime('2016-05-01 18:00:00')
        );
    }

    /**
     * @param int $difficulty
     * @return ColoredTilesExercise
     */
    public static function getSolved(int $difficulty = 1) : ColoredTilesExercise
    {
        return new ColoredTilesExercise(
            'xy',
            new SequenceNumber(1),
            new Training(
                'tr',
                new DateTime
            ),
            new Difficulty($difficulty),
            new GridSize(4,4),
            new TileSet(
                [
                    new Tile(0,0),
                    new Tile(1,0),
                    new Tile(2,0),
                    new Tile(3,0),
                ]
            ),
            new DateTime('2016-05-01 18:00:00'),
            new DateTime('2016-05-01 18:00:05'),
            50
        );
    }

    /**
     * @return ColoredTilesExercise
     */
    public static function getSolvedPerfectly() : ColoredTilesExercise
    {
        return new ColoredTilesExercise(
            'xy',
            new SequenceNumber(1),
            new Training(
                'tr',
                new DateTime
            ),
            new Difficulty(1),
            new GridSize(4,4),
            new TileSet(
                [
                    new Tile(0,0),
                    new Tile(1,0),
                    new Tile(2,0),
                    new Tile(3,0),
                ]
            ),
            new DateTime('2016-05-01 18:00:00'),
            new DateTime('2016-05-01 18:00:05'),
            100
        );
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace EverReader.Models
{
    public class SearchResults : ISearchResults
    {
        public List<INoteMetadata> NotesMetadata { get; set; }
        public int TotalResults { get; set; }
    }
}


text:
		function createTableHeaderCell(text, row){
			var cell = document.createElement('th');
			var cellText = document.createTextNode(text);
			cell.appendChild(cellText);
			row.appendChild(cell);
		}

		function createTableCell(text, row){
			var cell = document.createElement('td');
			var cellText = document.createTextNode(text);
			cell.appendChild(cellText);
			row.appendChild(cell);
		}

		function filterBuildsForApp(builds, appTitle, minBuildNum, maxBuildNum){
			currentBuilds = [];
			for (var index = builds.length - 1; index > 0 ; index--){
				if (builds[index].applicationName == appTitle && builds[index].number > minBuildNum && maxBuildNum >= builds[index].number){
					currentBuilds.push(builds[index]);
				}
			}
			return currentBuilds;
		}

		function getBuildsForApp(builds, appTitle){
			currentBuilds = [];
			for (var index = builds.length - 1; index > 0 ; index--){
				if (builds[index].applicationName == appTitle){
					currentBuilds.push(builds[index]);
				}
			}
			return currentBuilds;
		}

		function getMinMaxChecked(arr){
			var checkedNumArr = [];
			for (var cbNum = 0; arr.length>cbNum; cbNum++){
				if (arr[cbNum].checked){
					checkedNumArr.push(arr[cbNum].id);
				}
			}
			var buildNum = {min:0, max:0};
			buildNum.min = Math.min.apply(Math, checkedNumArr);
			buildNum.max = Math.max.apply(Math, checkedNumArr);
			return buildNum;
		}

		function appendMetaDataTableBodyRows(tableBody, arr){
			for (var i = 0; arr.length >i; i++){
				var row = document.createElement('tr');
				var metaDataEntry = arr[i];

				for (var key in metaDataEntry) {
					createTableCell(metaDataEntry[key], row)
				}
				tableBody.appendChild(row);
			}
		}

		function redrawInfoTable(){

				var appTitle = getAppTitleFromUrl();
				var builds = getBuilds();

				var arr = document.getElementsByName('chBox');
				var buildMinMaxNum = getMinMaxChecked(arr);
				currentBuilds = filterBuildsForApp(builds, appTitle, buildMinMaxNum.min, buildMinMaxNum.max);

				if (currentBuilds.length == 0)
					return;

				var table = document.getElementById('buildInfoTable');
				var head = document.createElement('thead');
				var tableBody = document.createElement('tbody');
				var headRow = document.createElement('tr');

				var info = currentBuilds[0].metaData;

				if (document.getElementById('radioCommits').checked){
					createTableHeaderCell('author', headRow);
					createTableHeaderCell('id', headRow);
					createTableHeaderCell('message', headRow);
					head.appendChild(headRow);
					for (var index = 0; currentBuilds.length > index ; index++){
						var commits = currentBuilds[index].metaData.commits;
						appendMetaDataTableBodyRows(tableBody, commits);
					}

				}else{

					createTableHeaderCell('id', headRow);
					createTableHeaderCell('title', headRow);
					head.appendChild(headRow);
					for (var index = 0; currentBuilds.length > index ; index++){
						var tickets = currentBuilds[index].metaData.tickets;
						appendMetaDataTableBodyRows(tableBody, tickets);
					}
				}
				if (tableBody.childNodes.length>0){
					table.replaceChild(head, document.getElementById('tableHead'));
				}
				table.replaceChild(tableBody, document.getElementById('tableBody'));
				head.id = 'tableHead';
				tableBody.id = 'tableBody';

		}

		// generate appTable
		var appTitle = getAppTitleFromUrl();
		var builds = getBuilds();
		var accordion = document.getElementById('accordion');
		var tableBody = document.getElementById('appTableBody');

		var buildList = getBuildsForApp(builds, appTitle);

		document.getElementById('headerAppName').innerHTML = appTitle;
		document.getElementById('headerAppNum').innerHTML = buildList.length + ' Builds';

		for (var buildNum = buildList.length-1; buildNum >=0; buildNum--){

			var row = document.createElement('tr');

			// create checkbox column
			var cell = document.createElement('td');
			var box = document.createElement('input');
			box.type = 'checkbox';
			box.name = 'chBox';
			box.id = buildList[buildNum].number;
			box.onclick = function(){

				var counter = 0;
				var arr = document.getElementsByName('chBox');
				var radios = document.getElementsByName('radioB');
				var unCheckedArr = [];
				for (var cbNum = arr.length-1; cbNum>=0; cbNum--){
					if (arr[cbNum].checked){
						counter++;
					}else{
						unCheckedArr.push(arr[cbNum]);
					}
				}
				if (counter >= 2){
					for (var cbNum = unCheckedArr.length-1; cbNum>=0; cbNum--){
						unCheckedArr[cbNum].disabled = true;
					}
					radios[0].disabled = false;
					radios[1].disabled = false;
					redrawInfoTable();
				}else{
					for (var cbNum = arr.length-1; cbNum>=0; cbNum--){
						arr[cbNum].disabled = false;
					}
					radios[0].disabled = true;
					radios[1].disabled = true;
				}

			};
			cell.appendChild(box);
			row.appendChild(cell);

			// create other columns
			createTableCell(buildList[buildNum].buildVersion, row);
			createTableCell(buildList[buildNum].applicationName, row);

			cell =  document.createElement('td');
			var a = document.createElement('a');
			a.href =  '/'+buildList[buildNum].buildUrl;
			a.innerHTML = buildList[buildNum].jobName +" #"+ buildList[buildNum].number;
			cell.appendChild(a);
			row.appendChild(cell);

			createTableCell(buildList[buildNum].builtAt, row);

			tableBody.appendChild(row);
		}


text:
package org.testmonkeys.jentitytest.test.unit.strategies.entityComparator;

import org.junit.Test;
import org.testmonkeys.jentitytest.EntityComparator;

public class EntityComparatorTests {

    @Test
    public void unit_strategy_entityComparator_expectedNull() {
        EntityComparator comparator = new EntityComparator();
        comparator.compare(new SimpleModel("test", 123), null);
    }

    @Test
    public void unit_strategy_entityComparator_actualNull() {
        EntityComparator comparator = new EntityComparator();
        comparator.compare(null, new SimpleModel("test", 123));
    }

    @Test
    public void unit_strategy_entityComparator_bothNull() {
        EntityComparator comparator = new EntityComparator();
        comparator.compare(null, null);

    }
}


text:
FROM ubuntu:trusty
MAINTAINER Henri Dwyer <henri@dwyer.io>

ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y postfix supervisor syslog-ng-core && apt-get clean && rm -rf /var/lib/apt/lists/*

EXPOSE 25

# fix syslog conf
RUN	sed -i -E 's/^(\s*)system\(\);/\1unix-stream("\/dev\/log");/' /etc/syslog-ng/syslog-ng.conf # Uncomment 'SYSLOGNG_OPTS="--no-caps"' to avoid the following warning: # syslog-ng: Error setting capabilities, capability management disabled; error='Operation not permitted' # http://serverfault.com/questions/524518/error-setting-capabilities-capability-management-disabled# RUN	sed -i 's/^#\(SYSLOGNG_OPTS="--no-caps"\)/\1/g' /etc/default/syslog-ng

ADD ./postfix.sh /opt/postfix.sh
ADD ./virtual /etc/postfix/virtual
ADD ./supervisord.conf /supervisord.conf

CMD /usr/bin/supervisord -c /supervisord.conf


text:
<?php

namespace Sylius\Bundle\SettingsBundle\Templating\Helper;

use Sylius\Bundle\SettingsBundle\Manager\SettingsManagerInterface;
use Symfony\Component\Templating\Helper\Helper;

class SettingsHelper extends Helper
{
    /**
     * @var SettingsManagerInterface
     */
    private $settingsManager;

    /**
     * @param SettingsManagerInterface $settingsManager
     */
    public function __construct(SettingsManagerInterface $settingsManager)
    {
        $this->settingsManager = $settingsManager;
    }

    /**
     * @param string $namespace
     *
     * @return array
     */
    public function getSettings($namespace)
    {
        return $this->settingsManager->loadSettings($namespace);
    }

    /**
     * @param string $name
     *
     * @return mixed
     *
     * @throws \InvalidArgumentException
     */
    public function getSettingsParameter($name)
    {
        if (false === strpos($name, '.')) {
            throw new \InvalidArgumentException(sprintf('Parameter must be in format "namespace.name", "%s" given.', $name));
        }

        list($namespace, $name) = explode('.', $name);

        $settings = $this->settingsManager->loadSettings($namespace);

        return $settings->get($name);
    }

    /**
     * {@inheritdoc}
     */
    public function getName()
    {
        return 'sylius_settings';
    }
}


text:
"use strict";

const prettier = require("prettier-local");
const runPrettier = require("../runPrettier.js");

test("allows custom parser provided as object", () => {
  const output = prettier.format("1", {
    parser(text) {
      expect(text).toBe("1");
      return {
        type: "Literal",
        value: 2,
        raw: "2",
      };
    },
  });
  expect(output).toBe("2");
});

test("allows usage of prettier's supported parsers", () => {
  const output = prettier.format("foo ( )", {
    parser(text, parsers) {
      expect(typeof parsers.babel).toBe("function");
      const ast = parsers.babel(text);
      ast.program.body[0].expression.callee.name = "bar";
      return ast;
    },
  });
  expect(output).toBe("bar();\n");
});

test("parsers should allow omit optional arguments", () => {
  let parsers;
  try {
    prettier.format("{}", {
      parser(text, builtinParsers) {
        parsers = builtinParsers;
      },
    });
  } catch {
    // noop
  }

  expect(typeof parsers.babel).toBe("function");
  const code = {
    graphql: "type A {hero: Character}",
    default: "{}",
  };
  for (const [name, parse] of Object.entries(parsers)) {
    // Private parser should not be used by users
    if (name.startsWith("__")) {
      continue;
    }

    expect(() => parse(code[name] || code.default)).not.toThrow();
  }
});

test("allows add empty `trailingComments` array", () => {
  const output = prettier.format("(foo /* comment */)( )", {
    parser(text, parsers) {
      const ast = parsers.babel(text);

      // This may happens in this use case https://github.com/prettier/prettier/pull/5497#issuecomment-439841965
      // Simply simulate it
      const callExpression = ast.program.body[0].expression;
      callExpression.extra = { parenthesized: true };
      callExpression.trailingComments = [];

      return ast;
    },
  });
  expect(output).toBe("foo(/* comment */);\n");
});

describe("allows passing a string to resolve a parser", () => {
  runPrettier("./custom-parsers/", [
    "--end-of-line",
    "lf",
    "./custom-rename-input.js",
    "--parser",
    "./custom-rename-parser",
  ]).test({
    status: 0,
  });
});


text:
package com.untamedears.PrisonPearl;

import java.util.UUID;

import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;

import com.untamedears.PrisonPearl.events.PrisonPearlEvent;

import vg.civcraft.mc.mercury.events.AsyncPluginBroadcastMessageEvent;

public class MercuryListener implements Listener{

	public static String[] channels = {
		"PrisonPearlUpdate",
		"PrisonPearlTransfer",
		"PrisonPearlMove"
	};

	private final PrisonPearlPlugin plugin;
	private final PrisonPearlStorage pearls;

	public MercuryListener(PrisonPearlPlugin plugin, PrisonPearlStorage storage){
		this.plugin = plugin;
		pearls = storage;
	}

	@EventHandler()
	public void merucyrListener(AsyncPluginBroadcastMessageEvent event){
		String channel = event.getChannel();
		String message = event.getMessage();

		if(channel.equals(channels[0]))
			pearlUpdate(message);
		else if(channel.equals(channels[1]))
			pearlTransfer(message);
		else if(channel.equals(channels[2]))
			PrisonPearlMove(message);
	}

	private void pearlTransfer(String message){
		String[] parts = message.split(" ");
		UUID holder = UUID.fromString(parts[0]);
		UUID pearl = UUID.fromString(parts[1]);
		PrisonPearl pp = pearls.getByImprisoned(pearl);
		Player p = Bukkit.getPlayer(holder);
		if (p == null) // Player is not on the server.
			return; // Some other server will pick it up.
		pp.setHolder(p);
	}

	private void pearlUpdate(String message){
		String[] parts = message.split(" ");
		PrisonPearlEvent.Type type = PrisonPearlEvent.Type.valueOf(parts[0]);
		UUID id = UUID.fromString(parts[1]);
		String name = parts[2];
		short damage = Short.parseShort(parts[3]);
		FakeLocation loc = new FakeLocation(parts[4], Double.parseDouble(parts[5]), Double.parseDouble(parts[6]),
				Double.parseDouble(parts[7]));
		String player = null;
		if (parts.length == 9)
			player = parts[8];

		if (type.equals(PrisonPearlEvent.Type.NEW)){

			PrisonPearl pp = new PrisonPearl(damage, name, id, loc);
			pearls.addPearl(pp);
			return;
		}
		else if (type.equals(PrisonPearlEvent.Type.DROPPED) ||
				type.equals(PrisonPearlEvent.Type.HELD)){
			PrisonPearl pp = pearls.getByImprisoned(id);
			pp.setHolder(loc);
		}
		else if (type.equals(PrisonPearlEvent.Type.FREED)){
			PrisonPearl pp = pearls.getByImprisoned(id);
			pearls.deletePearl(pp, "This pearl was freed on another server. Removing instance.");
		}
	}

	private void PrisonPearlMove(String message){
		String[] parts = message.split(" ");
		UUID uuid = UUID.fromString(parts[0]);
		FakeLocation loc = new FakeLocation(parts[1], Double.parseDouble(parts[2]), Double.parseDouble(parts[3]),
				Double.parseDouble(parts[4]));
	}
}


text:
package com.intellij.diff.util;

import com.intellij.openapi.progress.ProgressIndicator;
import com.intellij.openapi.progress.util.BackgroundTaskUtil;
import com.intellij.util.Function;
import com.intellij.util.concurrency.annotations.RequiresEdt;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public class DiffTaskQueue {
  @Nullable private ProgressIndicator myProgressIndicator;

  @RequiresEdt
  public void abort() {
    if (myProgressIndicator != null) myProgressIndicator.cancel();
    myProgressIndicator = null;
  }

  @RequiresEdt
  public void executeAndTryWait(@NotNull Function<? super ProgressIndicator, ? extends Runnable> backgroundTask,
                                @Nullable Runnable onSlowAction,
                                long waitMillis) {
    executeAndTryWait(backgroundTask, onSlowAction, waitMillis, false);
  }

  @RequiresEdt
  public void executeAndTryWait(@NotNull Function<? super ProgressIndicator, ? extends Runnable> backgroundTask,
                                @Nullable Runnable onSlowAction,
                                long waitMillis,
                                boolean forceEDT) {
    abort();
    myProgressIndicator = BackgroundTaskUtil.executeAndTryWait(backgroundTask, onSlowAction, waitMillis, forceEDT);
  }
}