text:
LinuxKit, a toolkit for building custom minimal, immutable Linux distributions.

- Secure defaults without compromising usability
- Everything is replaceable and customisable
- Immutable infrastructure applied to building Linux distributions
- Completely stateless, but persistent storage can be attached
- Easy tooling, with easy iteration
- Built with containers, for running containers
- Designed for building and running clustered applications, including but not limited to container orchestration such as Docker or Kubernetes
- Designed from the experience of building Docker Editions, but redesigned as a general-purpose toolkit
- Designed to be managed by external tooling, such as [Infrakit](https://github.com/docker/infrakit) or similar tools
- Includes a set of longer-term collaborative projects in various stages of development to innovate on kernel and userspace changes, particularly around security

## Getting Started

### Build the `moby` and `linuxkit` tools

LinuxKit uses the `moby` tool for image builds, and the `linuxkit` tool for pushing and running VM images.

Simple build instructions: use `make` to build. This will build the tools in `bin/`. Add this
to your `PATH` or copy it to somewhere in your `PATH` eg `sudo cp bin/* /usr/local/bin/`. Or you can use `sudo make install`.

If you already have `go` installed you can use `go get -u github.com/moby/tool/cmd/moby` to install
the `moby` build tool, and `go get -u github.com/linuxkit/linuxkit/src/cmd/linuxkit` to install the `linuxkit` tool.

On MacOS there is a `brew tap` available. Detailed instructions are at [linuxkit/homebrew-linuxkit](https://github.com/linuxkit/homebrew-linuxkit),
the short summary is
```
brew tap linuxkit/linuxkit
brew install --HEAD moby
brew install --HEAD linuxkit
```

Build requirements from source:
- GNU `make`
- Docker
- optionally `qemu`

### Building images

Once you have built the tool, use

```
moby build linuxkit.yml
```
to build the example configuration. You can also specify different output formats, eg `moby build -format raw linuxkit.yml` to
output a raw bootable disk image. See `moby build -help` for more information.

### Booting and Testing

You can use `linuxkit run <name>` or `linuxkit run <name>.<format>` to execute the image you created with `moby build <name>.yml`.
This will use a suitable backend for your platform or you can choose one, for example VMWare.
See `linuxkit run --help`.

Currently supported platforms are:
- Local hypervisors
  - [HyperKit (macOS)](docs/platform-hyperkit.md)
  - [Hyper-V (Windows)](docs/platform-hyperv.md)
  - [qemu (macOS, Linux, Windows)](docs/platform-qemu.md)
  - [VMware (macOS, Windows)](docs/platform-vmware.md)
- Cloud based platforms:
  - [Amazon Web Services](docs/platform-aws.md)
  - [Google Cloud](docs/platform-gcp.md)
  - [Microsoft Azure](docs/platform-azure.md)
  - [OpenStack](docs/platform-openstack.md)
  - [packet.net](docs/platform-packet.md)

#### Running the Tests

The test suite uses [`rtf`](https://github.com/linuxkit/rtf) To
install this you should use `make bin/rtf && make install`. You will
also need to install `expect` on your system as some tests use it.

To run the test suite:

```
cd test
rtf -x run
```

This will run the tests and put the results in a the `_results` directory!

Run control is handled using labels and with pattern matching.
To run add a label you may use:

```
rtf -x -l slow run
```

To run tests that match the pattern `linuxkit.examples` you would use the following command:

```
rtf -x run linuxkit.examples
```

## Building your own customised image

To customise, copy or modify the [`linuxkit.yml`](linuxkit.yml) to your own `file.yml` or use one of the [examples](examples/) and then run `moby build file.yml` to
generate its specified output. You can run the output with `linuxkit run file`.

The yaml file specifies a kernel and base init system, a set of containers that are built into the generated image and started at boot time. You can specify the type
of artifact to build with the `moby` tool eg `moby build -format vhd linuxkit.yml`.

If you want to build your own packages, see this [document](docs/packages.md).

### Yaml Specification

The yaml format specifies the image to be built:

- `kernel` specifies a kernel Docker image, containing a kernel and a filesystem tarball, eg containing modules. The example kernels are built from `kernel/`
- `init` is the base `init` process Docker image, which is unpacked as the base system, containing `init`, `containerd`, `runc` and a few tools. Built from `pkg/init/`
- `onboot` are the system containers, executed sequentially in order. They should terminate quickly when done.
- `services` is the system services, which normally run for the whole time the system is up
- `files` are additional files to add to the image

For a more detailed overview of the options see [yaml documentation](https://github.com/moby/tool/blob/master/docs/yaml.md)

## Architecture and security

There is an [overview of the architecture](docs/architecture.md) covering how the system works.

There is an [overview of the security considerations and direction](docs/security.md) covering the security design of the system.

## Roadmap

This project was extensively reworked from the code we are shipping in Docker Editions, and the result is not yet production quality. The plan is to return to production
quality during Q3 2017, and rebase the Docker Editions on this open source project during this quarter. We plan to start making stable releases on this timescale.

This is an open project without fixed judgements, open to the community to set the direction. The guiding principles are:
- Security informs design
- Infrastructure as code: immutable, manageable with code
- Sensible, secure, and well-tested defaults
- An open, pluggable platform for diverse use cases
- Easy to use and participate in the project
- Built with containers, for portability and reproducibility
- Run with system containers, for isolation and extensibility
- A base for robust products

## Development reports

There are weekly [development reports](reports/) summarizing work carried out in the week.

## FAQ

See [FAQ](docs/faq.md).

Released under the [Apache 2.0 license](LICENSE).


text:
<!DOCTYPE html>

	<meta charset="utf-8">
	<title>CollectionUtils object list subtract</title>

	<meta name="description" content="object list subtract via CollectionUtils">

	<meta name="author" content="thswave">

	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="naver-site-verification" content="64ea16ae1fd0d7506cf163ca55131d4302a46961"/>

	<link href="/assets/resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
	<link href="/assets/resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
	<link href="/assets/resources/syntax/syntax.css" rel="stylesheet">
	<link href="/assets/css/style.css" rel="stylesheet">

	<link rel="alternate" type="application/rss+xml" title="thswave" href="/feed.xml">

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

			</button>

				thswave

Home

Categories

Tags

		<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">

		</button>

Home

Categories

Tags

Top of Page

		<! -- sidebar.html -->

        thswave

	try hard, try hard!

Categories

Tags

<! -- sidebar.html end -->

CollectionUtils object list subtract

	   October
	   21st,

	   2015

상황

String이나 primitive 타입이 아닌 리스트 List<A> 간 subtract가 필요했습니다.

리스트 A와 리스트 B는 서로 다른 객체이지만 필드들이 같은 값을 가지고 있고 equals() 메소드도 Override

인터넷에 나와있는 대부분의 예시는 String이나 Primitive 타입(Integer, etc..)이라 CollectionUtils.subtract(a, b) 로 제거가 가능했지만 Object list는 제대로 차집합을 구하지 못해 여러차례 다른 방법 시도했습니다.

해결

List c = CollectionUtils.removeAll(listA, listB)

removeAll()의 경우 내부적으로 같은 아이템인지 확인하는 과정에 내부적으로 equals() 호출.

removeAll 이란 이름에서 혹시 listA 에서 중복이 제거되지 않을까 싶지만 실제로는 new ArrayList<>() 로 새 리스트를 반환

// package org.apache.commons.collections4.ListUtils
public static <E> List<E> removeAll(final Collection<E> collection, final Collection<?> remove) {
    final List<E> list = new ArrayList<E>();
    for (final E obj : collection) {
        if (!remove.contains(obj)) {
            list.add(obj);
        }
    }
    return list;
}

					java (17)

					java (18)
					,

					list (4)
					,

					subtract (1)
					,

					removeAll (1)
					,

					CollectionUtils (1)

Share Post

          Twitter

          Facebook

          Google+

thswave

try hard, try hard!

← Previous

Next →

    Please enable JavaScript to view the comments powered by Disqus.

	    Please enable JavaScript to view the comments powered by Disqus.

				© 2016 thswave with Jekyll. Theme: dbyll by dbtek.

redpajama_set_name: RedPajamaGithub


text:
from __future__ import unicode_literals
from ...tokenizer import Tokenizer
from ...symbols import ORTH, LEMMA, POS
from ...lang.en import English

def test_issue1250_cached_special_cases():
    nlp = English()
    nlp.tokenizer.add_special_case(u'reimbur', [{ORTH: u'reimbur', LEMMA: u'reimburse', POS: u'VERB'}])

    lemmas = [w.lemma_ for w in nlp(u'reimbur, reimbur...')]
    assert lemmas == ['reimburse', ',', 'reimburse', '...']
    lemmas = [w.lemma_ for w in nlp(u'reimbur, reimbur...')]
    assert lemmas == ['reimburse', ',', 'reimburse', '...']


text:
function main() {
	var div = document.createElement('div'),
		select = document.createElement('select'),
		insertBefore = document.getElementById('files');

	if (!insertBefore || document.getElementById('tab-size-changer')) { return; }

	select.id = 'tab-size-changer';
	for (var i = 0; i < 8; i++) {
		select.innerHTML += '<option>' + i + '</option>';
	}
	select.innerHTML += '<option>8</option>';

	select.onchange = function() {
		var selectedSize = this.options[this.options.selectedIndex].value,
			filesDiv = document.getElementById('files');

		filesDiv.style['-moz-tab-size'] = selectedSize;
		filesDiv.style['-o-tab-size'] = selectedSize;
		filesDiv.style['tab-size'] = selectedSize;
	};
	select.options[4].selected = true // default tabs size to 4
	select.onchange() // and fire the handler

	div.innerHTML = '<label>Select Tab Size: ';
	div.appendChild(select);

	insertBefore.parentNode.insertBefore(div, insertBefore);
}

main();
setInterval(main, 1000);


text:
using System.Collections.Generic;
//using System.Xml;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Services.Search;

namespace DotNetNuke.Modules.Angular.Components
{

    /// -----------------------------------------------------------------------------
    /// <summary>
    /// The Controller class for Angular
    ///
    /// The FeatureController class is defined as the BusinessController in the manifest file (.dnn)
    /// DotNetNuke will poll this class to find out which Interfaces the class implements.
    ///
    /// The IPortable interface is used to import/export content from a DNN module
    ///
    /// The ISearchable interface is used by DNN to index the content of a module
    ///
    /// The IUpgradeable interface allows module developers to execute code during the upgrade
    /// process for a module.
    ///
    /// Below you will find stubbed out implementations of each, uncomment and populate with your own data
    /// </summary>
    /// -----------------------------------------------------------------------------

    //uncomment the interfaces to add the support.
    public class FeatureController //: IPortable, ISearchable, IUpgradeable
    {

        #region Optional Interfaces

        /// -----------------------------------------------------------------------------
        /// <summary>
        /// ExportModule implements the IPortable ExportModule Interface
        /// </summary>
        /// <param name="ModuleID">The Id of the module to be exported</param>
        /// -----------------------------------------------------------------------------
        //public string ExportModule(int ModuleID)
        //{
        //string strXML = "";

        //List<AngularInfo> colAngulars = GetAngulars(ModuleID);
        //if (colAngulars.Count != 0)
        //{
        //    strXML += "<Angulars>";

        //    foreach (AngularInfo objAngular in colAngulars)
        //    {
        //        strXML += "<Angular>";
        //        strXML += "<content>" + DotNetNuke.Common.Utilities.XmlUtils.XMLEncode(objAngular.Content) + "</content>";
        //        strXML += "</Angular>";
        //    }
        //    strXML += "</Angulars>";
        //}

        //return strXML;

        //	throw new System.NotImplementedException("The method or operation is not implemented.");
        //}

        /// -----------------------------------------------------------------------------
        /// <summary>
        /// ImportModule implements the IPortable ImportModule Interface
        /// </summary>
        /// <param name="ModuleID">The Id of the module to be imported</param>
        /// <param name="Content">The content to be imported</param>
        /// <param name="Version">The version of the module to be imported</param>
        /// <param name="UserId">The Id of the user performing the import</param>
        /// -----------------------------------------------------------------------------
        //public void ImportModule(int ModuleID, string Content, string Version, int UserID)
        //{
        //XmlNode xmlAngulars = DotNetNuke.Common.Globals.GetContent(Content, "Angulars");
        //foreach (XmlNode xmlAngular in xmlAngulars.SelectNodes("Angular"))
        //{
        //    AngularInfo objAngular = new AngularInfo();
        //    objAngular.ModuleId = ModuleID;
        //    objAngular.Content = xmlAngular.SelectSingleNode("content").InnerText;
        //    objAngular.CreatedByUser = UserID;
        //    AddAngular(objAngular);
        //}

        //	throw new System.NotImplementedException("The method or operation is not implemented.");
        //}

        /// -----------------------------------------------------------------------------
        /// <summary>
        /// GetSearchItems implements the ISearchable Interface
        /// </summary>
        /// <param name="ModInfo">The ModuleInfo for the module to be Indexed</param>
        /// -----------------------------------------------------------------------------
        //public DotNetNuke.Services.Search.SearchItemInfoCollection GetSearchItems(DotNetNuke.Entities.Modules.ModuleInfo ModInfo)
        //{
        //SearchItemInfoCollection SearchItemCollection = new SearchItemInfoCollection();

        //List<AngularInfo> colAngulars = GetAngulars(ModInfo.ModuleID);

        //foreach (AngularInfo objAngular in colAngulars)
        //{
        //    SearchItemInfo SearchItem = new SearchItemInfo(ModInfo.ModuleTitle, objAngular.Content, objAngular.CreatedByUser, objAngular.CreatedDate, ModInfo.ModuleID, objAngular.ItemId.ToString(), objAngular.Content, "ItemId=" + objAngular.ItemId.ToString());
        //    SearchItemCollection.Add(SearchItem);
        //}

        //return SearchItemCollection;

        //	throw new System.NotImplementedException("The method or operation is not implemented.");
        //}

        /// -----------------------------------------------------------------------------
        /// <summary>
        /// UpgradeModule implements the IUpgradeable Interface
        /// </summary>
        /// <param name="Version">The current version of the module</param>
        /// -----------------------------------------------------------------------------
        //public string UpgradeModule(string Version)
        //{
        //	throw new System.NotImplementedException("The method or operation is not implemented.");
        //}

        #endregion

    }

}


text:
package ru.igarin.base.service;

import android.content.Intent;
import android.os.Bundle;
import android.os.Parcelable;

import ru.igarin.base.service.config.RestLibLog;
import ru.igarin.base.service.exception.ConnectionException;
import ru.igarin.base.service.exception.CustomRequestException;
import ru.igarin.base.service.exception.DataException;

/**
 * This class is called by the {@link RequestManager} through the
 * {@link Intent} system. Get the parameters stored in the {@link Intent} and
 * call the right Worker.
 */
public abstract class PoCService extends WorkerService {

    // Max number of parallel threads used
    private static final int MAX_THREADS = 3;

    public PoCService() {
        super(MAX_THREADS);
        RestLibLog.d("PoCService created");
    }

    @Override
    protected void onHandleIntent(final Intent intent) {
        RestLibLog.d("onHandleIntent");

        final String workerType = intent.getStringExtra(INTENT_EXTRA_WORKER_TYPE);

        RestLibLog.d("workerType:" + workerType);

        try {

            @SuppressWarnings("unchecked")
            Class<? extends IServiceWorker> newClass = (Class<? extends IServiceWorker>) Class.forName(workerType);
            IServiceWorker obj = (IServiceWorker) newClass.newInstance();
            Bundle result = obj.doWork(this, intent.getParcelableExtra(INTENT_EXTRA_REQUEST_PARAMS));
            this.sendSuccess(intent, result);

        } catch (ConnectionException e) {
            RestLibLog.e("ConnectionException", e);
            sendConnexionFailure(intent, e);
        } catch (DataException e) {
            RestLibLog.e("DataException", e);
            sendDataFailure(intent);
        } catch (CustomRequestException e) {
            RestLibLog.e("Custom Exception", e);
            Bundle ret = onCustomRequestException(workerType, e,
                    intent.getParcelableExtra(INTENT_EXTRA_REQUEST_PARAMS));
            sendCustomFailure(intent, ret);
        } catch (ClassNotFoundException e) {
            RestLibLog.e("URISyntaxException", e);
            sendDataFailure(intent);
        } catch (InstantiationException e) {
            RestLibLog.e("URISyntaxException", e);
            sendDataFailure(intent);
        } catch (IllegalAccessException e) {
            RestLibLog.e("URISyntaxException", e);
            sendDataFailure(intent);
        } catch (RuntimeException e) {
            RestLibLog.e("RuntimeException", e);
            sendDataFailure(intent);
        }
    }

    /**
     * Call if a {@link CustomRequestException} is thrown by an {@link IServiceWorker}. You may return a
     * Bundle containing data to return to the {@link RequestManager}.
     * <p/>
     * Default implementation return null. You may want to override this method in your
     * implementation of {@link PoCService} to execute specific action and/or return specific
     * data.
     *
     * @param iServiceWorkerClass The {@link IServiceWorker} which execution threw the exception.
     * @param exception           The {@link CustomRequestException} thrown.
     * @return A {@link Bundle} containing data to return to the {@link RequestManager}. Default
     * implementation return null.
     */
    protected Bundle onCustomRequestException(String iServiceWorkerClass, CustomRequestException exception, Parcelable requestParams) {
        return null;
    }
}


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

    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <item name="android:actionBarStyle">@style/MyActionBar</item>
        <item name="actionBarStyle">@style/MyActionBar</item>
        <item name="android:windowBackground">@color/primary_dark</item>
        <item name="android:windowTranslucentStatus">true</item>
        <item name="android:windowTranslucentNavigation">true</item>
        <item name="android:fitsSystemWindows">false</item>
        <item name="android:windowActionBar">false</item>
        <item name="windowActionBar">false</item>
    </style>
</resources>


text:
package formatter

import (
	"strings"

	"github.com/google/go-jsonnet/ast"
	"github.com/google/go-jsonnet/internal/pass"
)

// FixIndentation is a formatter pass that changes the indentation of new line
// fodder so that it follows the nested structure of the code.
type FixIndentation struct {
	pass.Base
	column  int
	Options Options
}

// indent is the representation of the indentation level.  The field lineUp is
// what is generally used to indent after a new line.  The field base is used to
// help derive a new Indent struct when the indentation level increases.  lineUp
// is generally > base.
//
// In the following case (where spaces are replaced with underscores):
// ____foobar(1,
// ___________2)
//
// At the AST representing the 2, the indent has base == 4 and lineUp == 11.
type indent struct {
	base   int
	lineUp int
}

// setIndents sets the indentation values within the fodder elements.
// The last one gets a special indentation value, all the others are set to the same thing.
func (c *FixIndentation) setIndents(
	fodder ast.Fodder, allButLastIndent int, lastIndent int) {

	// First count how many there are.
	count := 0
	for _, f := range fodder {
		if f.Kind != ast.FodderInterstitial {
			count++
		}
	}
	// Now set the indents.
	i := 0
	for index := range fodder {
		f := &fodder[index]
		if f.Kind != ast.FodderInterstitial {
			if i+1 < count {
				f.Indent = allButLastIndent
			} else {
				if i != count-1 {
					panic("Shouldn't get here")
				}
				f.Indent = lastIndent
			}
			i++
		}
	}
}

// fill sets the indentation on the fodder elements and adjusts the c.column
// counter as if it was printed.
// To understand fodder, crowded, separateToken, see the documentation of
// unparse.fill.
// allButLastIndent is the new indentation value for all but the final fodder
// element.
// lastIndent is the new indentation value for the final fodder element.
func (c *FixIndentation) fillLast(
	fodder ast.Fodder, crowded bool, separateToken bool,
	allButLastIndent int, lastIndent int) {
	c.setIndents(fodder, allButLastIndent, lastIndent)

	// A model of unparser.fill that just keeps track of the
	// c.column counter.
	for _, fod := range fodder {

		switch fod.Kind {
		case ast.FodderParagraph:
			c.column = fod.Indent
			crowded = false

		case ast.FodderLineEnd:
			c.column = fod.Indent
			crowded = false

		case ast.FodderInterstitial:
			if crowded {
				c.column++
			}
			c.column += len(fod.Comment[0])
			crowded = true
		}
	}
	if separateToken && crowded {
		c.column++
	}
}

// fill is like fillLast but where the final and prior fodder get the same
// currIndent.
func (c *FixIndentation) fill(
	fodder ast.Fodder, crowded bool, separateToken bool, indent int) {
	c.fillLast(fodder, crowded, separateToken, indent, indent)
}

// newIndent calculates the indentation of sub-expressions.
// If the first sub-expression is on the same line as the current node, then subsequent
// ones will be lined up, otherwise subsequent ones will be on the next line indented
// by 'indent'.
func (c *FixIndentation) newIndent(firstFodder ast.Fodder, old indent, lineUp int) indent {
	if len(firstFodder) == 0 || firstFodder[0].Kind == ast.FodderInterstitial {
		return indent{old.base, lineUp}
	}
	// Reset
	return indent{old.base + c.Options.Indent, old.base + c.Options.Indent}
}

// Calculate the indentation of sub-expressions.
// If the first sub-expression is on the same line as the current node, then
// subsequent ones will be lined up and further indentations in their
// subexpressions will be based from this c.column.
func (c *FixIndentation) newIndentStrong(firstFodder ast.Fodder, old indent, lineUp int) indent {
	if len(firstFodder) == 0 || firstFodder[0].Kind == ast.FodderInterstitial {
		return indent{lineUp, lineUp}
	}
	// Reset
	return indent{old.base + c.Options.Indent, old.base + c.Options.Indent}
}

// Calculate the indentation of sub-expressions.
// If the first sub-expression is on the same line as the current node, then
// subsequent ones will be lined up, otherwise subseqeuent ones will be on the
// next line with no additional currIndent.
func (c *FixIndentation) align(firstFodder ast.Fodder, old indent, lineUp int) indent {
	if len(firstFodder) == 0 || firstFodder[0].Kind == ast.FodderInterstitial {
		return indent{old.base, lineUp}
	}
	// Reset
	return old
}

// alignStrong calculates the indentation of sub-expressions.
// If the first sub-expression is on the same line as the current node, then
// subsequent ones will be lined up and further indentations in their
// subexpresssions will be based from this c.column.  Otherwise, subseqeuent ones
// will be on the next line with no additional currIndent.
func (c *FixIndentation) alignStrong(firstFodder ast.Fodder, old indent, lineUp int) indent {
	if len(firstFodder) == 0 || firstFodder[0].Kind == ast.FodderInterstitial {
		return indent{lineUp, lineUp}
	}
	// Reset
	return old
}

/** Does the given fodder contain at least one new line? */
func (c *FixIndentation) hasNewLines(fodder ast.Fodder) bool {
	for _, f := range fodder {
		if f.Kind != ast.FodderInterstitial {
			return true
		}
	}
	return false
}

// specs indents comprehension forspecs.
func (c *FixIndentation) specs(spec *ast.ForSpec, currIndent indent) {
	if spec.Outer != nil {
		c.specs(spec.Outer, currIndent)
	}
	c.fill(spec.ForFodder, true, true, currIndent.lineUp)
	c.column += 3 // for
	c.fill(spec.VarFodder, true, true, currIndent.lineUp)
	c.column += len(spec.VarName)
	c.fill(spec.InFodder, true, true, currIndent.lineUp)
	c.column += 2 // in
	newIndent := c.newIndent(*openFodder(spec.Expr), currIndent, c.column)
	c.Visit(spec.Expr, newIndent, true)
	for _, cond := range spec.Conditions {
		c.fill(cond.IfFodder, true, true, currIndent.lineUp)
		c.column += 2 // if
		newIndent := c.newIndent(*openFodder(spec.Expr), currIndent, c.column)
		c.Visit(spec.Expr, newIndent, true)
	}
}

func (c *FixIndentation) params(fodderL ast.Fodder, params []ast.Parameter,
	trailingComma bool, fodderR ast.Fodder, currIndent indent) {
	c.fill(fodderL, false, false, currIndent.lineUp)
	c.column++ // (
	var firstInside ast.Fodder
	gotFodder := false
	for _, param := range params {
		firstInside = param.NameFodder
		gotFodder = true
		break
	}
	if !gotFodder {
		firstInside = fodderR
	}
	newIndent := c.newIndent(firstInside, currIndent, c.column)
	first := true
	for _, param := range params {
		if !first {
			c.column++ // ','
		}
		c.fill(param.NameFodder, !first, true, newIndent.lineUp)
		c.column += len(param.Name)
		if param.DefaultArg != nil {
			c.fill(param.EqFodder, false, false, newIndent.lineUp)
			// default arg, no spacing: x=e
			c.column++
			c.Visit(param.DefaultArg, newIndent, false)
		}
		c.fill(param.CommaFodder, false, false, newIndent.lineUp)
		first = false
	}
	if trailingComma {
		c.column++
	}
	c.fillLast(fodderR, false, false, newIndent.lineUp, currIndent.lineUp)
	c.column++ // )
}

func (c *FixIndentation) fieldParams(field ast.ObjectField, currIndent indent) {
	m := field.Method
	if m != nil {
		c.params(m.ParenLeftFodder, m.Parameters, m.TrailingComma,
			m.ParenRightFodder, currIndent)
	}
}

// fields indents fields within an object.
// indent is the indent of the first field
// crowded is whether the first field is crowded (see unparser.fill)
func (c *FixIndentation) fields(fields ast.ObjectFields, currIndent indent, crowded bool) {
	newIndent := currIndent.lineUp
	for i, field := range fields {
		if i > 0 {
			c.column++ // ','
		}

		// An aux function so we don't repeat ourselves for the 3 kinds of
		// basic field.
		unparseFieldRemainder := func(field ast.ObjectField) {
			c.fieldParams(field, currIndent)
			c.fill(field.OpFodder, false, false, newIndent)
			if field.SuperSugar {
				c.column++
			}
			switch field.Hide {
			case ast.ObjectFieldInherit:
				c.column++
			case ast.ObjectFieldHidden:
				c.column += 2
			case ast.ObjectFieldVisible:
				c.column += 3
			}
			c.Visit(field.Expr2,
				c.newIndent(*openFodder(field.Expr2), currIndent, c.column),
				true)
		}

		switch field.Kind {
		case ast.ObjectLocal:
			c.fill(field.Fodder1, i > 0 || crowded, true, currIndent.lineUp)
			c.column += 5 // local
			c.fill(field.Fodder2, true, true, currIndent.lineUp)
			c.column += len(*field.Id)
			c.fieldParams(field, currIndent)
			c.fill(field.OpFodder, true, true, currIndent.lineUp)
			c.column++ // =
			newIndent2 := c.newIndent(*openFodder(field.Expr2), currIndent, c.column)
			c.Visit(field.Expr2, newIndent2, true)

		case ast.ObjectFieldID:
			c.fill(field.Fodder1, i > 0 || crowded, true, newIndent)
			c.column += len(*field.Id)
			unparseFieldRemainder(field)

		case ast.ObjectFieldStr:
			c.Visit(field.Expr1, currIndent, i > 0 || crowded)
			unparseFieldRemainder(field)

		case ast.ObjectFieldExpr:
			c.fill(field.Fodder1, i > 0 || crowded, true, newIndent)
			c.column++ // [
			c.Visit(field.Expr1, currIndent, false)
			c.fill(field.Fodder2, false, false, newIndent)
			c.column++ // ]
			unparseFieldRemainder(field)

		case ast.ObjectAssert:
			c.fill(field.Fodder1, i > 0 || crowded, true, newIndent)
			c.column += 6 // assert
			// + 1 for the space after the assert
			newIndent2 := c.newIndent(*openFodder(field.Expr2), currIndent, c.column+1)
			c.Visit(field.Expr2, currIndent, true)
			if field.Expr3 != nil {
				c.fill(field.OpFodder, true, true, newIndent2.lineUp)
				c.column++ // ":"
				c.Visit(field.Expr3, newIndent2, true)
			}
		}
		c.fill(field.CommaFodder, false, false, newIndent)
	}
}

// Visit has logic common to all nodes.
func (c *FixIndentation) Visit(expr ast.Node, currIndent indent, crowded bool) {
	separateToken := leftRecursive(expr) == nil
	c.fill(*expr.OpenFodder(), crowded, separateToken, currIndent.lineUp)
	switch node := expr.(type) {

	case *ast.Apply:
		initFodder := *openFodder(node.Target)
		newColumn := c.column
		if crowded {
			newColumn++
		}
		newIndent := c.align(initFodder, currIndent, newColumn)
		c.Visit(node.Target, newIndent, crowded)
		c.fill(node.FodderLeft, false, false, newIndent.lineUp)
		c.column++ // (
		firstFodder := node.FodderRight
		for _, arg := range node.Arguments.Named {
			firstFodder = arg.NameFodder
			break
		}
		for _, arg := range node.Arguments.Positional {
			firstFodder = *openFodder(arg.Expr)
			break
		}
		strongIndent := false
		// Need to use strong indent if any of the
		// arguments (except the first) are preceded by newlines.
		first := true
		for _, arg := range node.Arguments.Positional {
			if first {
				// Skip first element.
				first = false
				continue
			}
			if c.hasNewLines(*openFodder(arg.Expr)) {
				strongIndent = true
			}
		}
		for _, arg := range node.Arguments.Named {
			if first {
				// Skip first element.
				first = false
				continue
			}
			if c.hasNewLines(arg.NameFodder) {
				strongIndent = true
			}
		}
		var argIndent indent
		if strongIndent {
			argIndent = c.newIndentStrong(firstFodder, currIndent, c.column)
		} else {
			argIndent = c.newIndent(firstFodder, currIndent, c.column)
		}

		first = true
		for _, arg := range node.Arguments.Positional {
			if !first {
				c.column++ // ","
			}
			space := !first
			c.Visit(arg.Expr, argIndent, space)
			c.fill(arg.CommaFodder, false, false, argIndent.lineUp)
			first = false
		}
		for _, arg := range node.Arguments.Named {
			if !first {
				c.column++ // ","
			}
			space := !first
			c.fill(arg.NameFodder, space, false, argIndent.lineUp)
			c.column += len(arg.Name)
			c.column++ // "="
			c.Visit(arg.Arg, argIndent, false)
			c.fill(arg.CommaFodder, false, false, argIndent.lineUp)
			first = false
		}
		if node.TrailingComma {
			c.column++ // ","
		}
		c.fillLast(node.FodderRight, false, false, argIndent.lineUp, currIndent.base)
		c.column++ // )
		if node.TailStrict {
			c.fill(node.TailStrictFodder, true, true, currIndent.base)
			c.column += 10 // tailstrict
		}

	case *ast.ApplyBrace:
		initFodder := *openFodder(node.Left)
		newColumn := c.column
		if crowded {
			newColumn++
		}
		newIndent := c.align(initFodder, currIndent, newColumn)
		c.Visit(node.Left, newIndent, crowded)
		c.Visit(node.Right, newIndent, true)

	case *ast.Array:
		c.column++ // '['
		// First fodder element exists and is a newline
		var firstFodder ast.Fodder
		if len(node.Elements) > 0 {
			firstFodder = *openFodder(node.Elements[0].Expr)
		} else {
			firstFodder = node.CloseFodder
		}
		newColumn := c.column
		if c.Options.PadArrays {
			newColumn++
		}
		strongIndent := false
		// Need to use strong indent if there are not newlines before any of the sub-expressions
		for i, el := range node.Elements {
			if i == 0 {
				continue
			}
			if c.hasNewLines(*openFodder(el.Expr)) {
				strongIndent = true
			}
		}

		var newIndent indent
		if strongIndent {
			newIndent = c.newIndentStrong(firstFodder, currIndent, newColumn)
		} else {
			newIndent = c.newIndent(firstFodder, currIndent, newColumn)
		}

		for i, el := range node.Elements {
			if i > 0 {
				c.column++
			}
			c.Visit(el.Expr, newIndent, i > 0 || c.Options.PadArrays)
			c.fill(el.CommaFodder, false, false, newIndent.lineUp)
		}
		if node.TrailingComma {
			c.column++
		}

		// Handle penultimate newlines from expr.CloseFodder if there are any.
		c.fillLast(node.CloseFodder,
			len(node.Elements) > 0,
			c.Options.PadArrays,
			newIndent.lineUp,
			currIndent.base)
		c.column++ // ']'

	case *ast.ArrayComp:
		c.column++ // [
		newColumn := c.column
		if c.Options.PadArrays {
			newColumn++
		}
		newIndent :=
			c.newIndent(*openFodder(node.Body), currIndent, newColumn)
		c.Visit(node.Body, newIndent, c.Options.PadArrays)
		c.fill(node.TrailingCommaFodder, false, false, newIndent.lineUp)
		if node.TrailingComma {
			c.column++ // ','
		}
		c.specs(&node.Spec, newIndent)
		c.fillLast(node.CloseFodder, true, c.Options.PadArrays,
			newIndent.lineUp, currIndent.base)
		c.column++ // ]

	case *ast.Assert:

		c.column += 6 // assert
		// + 1 for the space after the assert
		newIndent := c.newIndent(*openFodder(node.Cond), currIndent, c.column+1)
		c.Visit(node.Cond, newIndent, true)
		if node.Message != nil {
			c.fill(node.ColonFodder, true, true, newIndent.lineUp)
			c.column++ // ":"
			c.Visit(node.Message, newIndent, true)
		}
		c.fill(node.SemicolonFodder, false, false, newIndent.lineUp)
		c.column++ // ";"
		c.Visit(node.Rest, currIndent, true)

	case *ast.Binary:
		firstFodder := *openFodder(node.Left)
		// Need to use strong indent in the case of
		/*
		   A
		   + B
		   or
		   A +
		   B
		*/

		innerColumn := c.column
		if crowded {
			innerColumn++
		}
		var newIndent indent
		if c.hasNewLines(node.OpFodder) || c.hasNewLines(*openFodder(node.Right)) {
			newIndent = c.alignStrong(firstFodder, currIndent, innerColumn)
		} else {
			newIndent = c.align(firstFodder, currIndent, innerColumn)
		}
		c.Visit(node.Left, newIndent, crowded)
		c.fill(node.OpFodder, true, true, newIndent.lineUp)
		c.column += len(node.Op.String())
		// Don't calculate a new indent for here, because we like being able to do:
		// true &&
		// true &&
		// true
		c.Visit(node.Right, newIndent, true)

	case *ast.Conditional:
		c.column += 2 // if
		condIndent := c.newIndent(*openFodder(node.Cond), currIndent, c.column+1)
		c.Visit(node.Cond, condIndent, true)
		c.fill(node.ThenFodder, true, true, currIndent.base)
		c.column += 4 // then
		trueIndent := c.newIndent(*openFodder(node.BranchTrue), currIndent, c.column+1)
		c.Visit(node.BranchTrue, trueIndent, true)
		if node.BranchFalse != nil {
			c.fill(node.ElseFodder, true, true, currIndent.base)
			c.column += 4 // else
			falseIndent := c.newIndent(*openFodder(node.BranchFalse), currIndent, c.column+1)
			c.Visit(node.BranchFalse, falseIndent, true)
		}

	case *ast.Dollar:
		c.column++ // $

	case *ast.Error:
		c.column += 5 // error
		newIndent := c.newIndent(*openFodder(node.Expr), currIndent, c.column+1)
		c.Visit(node.Expr, newIndent, true)

	case *ast.Function:
		c.column += 8 // function
		c.params(node.ParenLeftFodder, node.Parameters,
			node.TrailingComma, node.ParenRightFodder, currIndent)
		newIndent := c.newIndent(*openFodder(node.Body), currIndent, c.column+1)
		c.Visit(node.Body, newIndent, true)

	case *ast.Import:
		c.column += 6 // import
		newIndent := c.newIndent(*openFodder(node.File), currIndent, c.column+1)
		c.Visit(node.File, newIndent, true)

	case *ast.ImportStr:
		c.column += 9 // importstr
		newIndent := c.newIndent(*openFodder(node.File), currIndent, c.column+1)
		c.Visit(node.File, newIndent, true)

	case *ast.ImportBin:
		c.column += 9 // importbin
		newIndent := c.newIndent(*openFodder(node.File), currIndent, c.column+1)
		c.Visit(node.File, newIndent, true)

	case *ast.InSuper:
		c.Visit(node.Index, currIndent, crowded)
		c.fill(node.InFodder, true, true, currIndent.lineUp)
		c.column += 2 // in
		c.fill(node.SuperFodder, true, true, currIndent.lineUp)
		c.column += 5 // super

	case *ast.Index:
		c.Visit(node.Target, currIndent, crowded)
		c.fill(node.LeftBracketFodder, false, false, currIndent.lineUp) // Can also be DotFodder
		if node.Id != nil {
			c.column++ // "."
			newIndent := c.newIndent(node.RightBracketFodder, currIndent, c.column)
			c.fill(node.RightBracketFodder, false, false, newIndent.lineUp) // Can also be IdFodder
			c.column += len(*node.Id)
		} else {
			c.column++ // "["
			newIndent := c.newIndent(*openFodder(node.Index), currIndent, c.column)
			c.Visit(node.Index, newIndent, false)
			c.fillLast(node.RightBracketFodder, false, false, newIndent.lineUp, currIndent.base)
			c.column++ // "]"
		}

	case *ast.Slice:
		c.Visit(node.Target, currIndent, crowded)
		c.fill(node.LeftBracketFodder, false, false, currIndent.lineUp)
		c.column++ // "["
		var newIndent indent
		if node.BeginIndex != nil {
			newIndent = c.newIndent(*openFodder(node.BeginIndex), currIndent, c.column)
			c.Visit(node.BeginIndex, newIndent, false)
		}
		if node.EndIndex != nil {
			newIndent = c.newIndent(node.EndColonFodder, currIndent, c.column)
			c.fill(node.EndColonFodder, false, false, newIndent.lineUp)
			c.column++ // ":"
			c.Visit(node.EndIndex, newIndent, false)
		}
		if node.Step != nil {
			if node.EndIndex == nil {
				newIndent = c.newIndent(node.EndColonFodder, currIndent, c.column)
				c.fill(node.EndColonFodder, false, false, newIndent.lineUp)
				c.column++ // ":"
			}
			c.fill(node.StepColonFodder, false, false, newIndent.lineUp)
			c.column++ // ":"
			c.Visit(node.Step, newIndent, false)
		}
		if node.BeginIndex == nil && node.EndIndex == nil && node.Step == nil {
			newIndent = c.newIndent(node.EndColonFodder, currIndent, c.column)
			c.fill(node.EndColonFodder, false, false, newIndent.lineUp)
			c.column++ // ":"
		}
		c.column++ // "]"

	case *ast.Local:
		c.column += 5 // local
		if len(node.Binds) == 0 {
			panic("Not enough binds in local")
		}
		first := true
		newIndent := c.newIndent(node.Binds[0].VarFodder, currIndent, c.column+1)
		for _, bind := range node.Binds {
			if !first {
				c.column++ // ','
			}
			first = false
			c.fill(bind.VarFodder, true, true, newIndent.lineUp)
			c.column += len(bind.Variable)
			if bind.Fun != nil {
				c.params(bind.Fun.ParenLeftFodder,
					bind.Fun.Parameters,
					bind.Fun.TrailingComma,
					bind.Fun.ParenRightFodder,
					newIndent)
			}
			c.fill(bind.EqFodder, true, true, newIndent.lineUp)
			c.column++ // '='
			newIndent2 := c.newIndent(*openFodder(bind.Body), newIndent, c.column+1)
			c.Visit(bind.Body, newIndent2, true)
			c.fillLast(bind.CloseFodder, false, false, newIndent2.lineUp,
				currIndent.base)
		}
		c.column++ // ';'
		c.Visit(node.Body, currIndent, true)

	case *ast.LiteralBoolean:
		if node.Value {
			c.column += 4
		} else {
			c.column += 5
		}

	case *ast.LiteralNumber:
		c.column += len(node.OriginalString)

	case *ast.LiteralString:
		switch node.Kind {
		case ast.StringDouble:
			c.column += 2 + len(node.Value) // Include quotes
		case ast.StringSingle:
			c.column += 2 + len(node.Value) // Include quotes
		case ast.StringBlock:
			node.BlockIndent = strings.Repeat(" ", currIndent.base+c.Options.Indent)
			node.BlockTermIndent = strings.Repeat(" ", currIndent.base)
			c.column = currIndent.base // blockTermIndent
			c.column += 3              // "|||"
		case ast.VerbatimStringSingle:
			c.column += 3 // Include @, start and end quotes
			for _, r := range node.Value {
				if r == '\'' {
					c.column += 2
				} else {
					c.column++
				}
			}
		case ast.VerbatimStringDouble:
			c.column += 3 // Include @, start and end quotes
			for _, r := range node.Value {
				if r == '"' {
					c.column += 2
				} else {
					c.column++
				}
			}
		}

	case *ast.LiteralNull:
		c.column += 4 // null

	case *ast.Object:
		c.column++ // '{'
		var firstFodder ast.Fodder
		if len(node.Fields) == 0 {
			firstFodder = node.CloseFodder
		} else {
			if node.Fields[0].Kind == ast.ObjectFieldStr {
				firstFodder = *openFodder(node.Fields[0].Expr1)
			} else {
				firstFodder = node.Fields[0].Fodder1
			}
		}
		newColumn := c.column
		if c.Options.PadObjects {
			newColumn++
		}
		newIndent := c.newIndent(firstFodder, currIndent, newColumn)
		c.fields(node.Fields, newIndent, c.Options.PadObjects)
		if node.TrailingComma {
			c.column++
		}
		c.fillLast(node.CloseFodder,
			len(node.Fields) > 0,
			c.Options.PadObjects,
			newIndent.lineUp,
			currIndent.base)
		c.column++ // '}'

	case *ast.ObjectComp:
		c.column++ // '{'
		var firstFodder ast.Fodder
		if len(node.Fields) == 0 {
			firstFodder = node.CloseFodder
		} else {
			if node.Fields[0].Kind == ast.ObjectFieldStr {
				firstFodder = *openFodder(node.Fields[0].Expr1)
			} else {
				firstFodder = node.Fields[0].Fodder1
			}
		}
		newColumn := c.column
		if c.Options.PadObjects {
			newColumn++
		}
		newIndent := c.newIndent(firstFodder, currIndent, newColumn)

		c.fields(node.Fields, newIndent, c.Options.PadObjects)
		if node.TrailingComma {
			c.column++ // ','
		}
		c.specs(&node.Spec, newIndent)
		c.fillLast(node.CloseFodder,
			true,
			c.Options.PadObjects,
			newIndent.lineUp,
			currIndent.base)
		c.column++ // '}'

	case *ast.Parens:
		c.column++ // (
		newIndent := c.newIndentStrong(*openFodder(node.Inner), currIndent, c.column)
		c.Visit(node.Inner, newIndent, false)
		c.fillLast(node.CloseFodder, false, false, newIndent.lineUp, currIndent.base)
		c.column++ // )

	case *ast.Self:
		c.column += 4 // self

	case *ast.SuperIndex:
		c.column += 5 // super
		c.fill(node.DotFodder, false, false, currIndent.lineUp)
		if node.Id != nil {
			c.column++ // ".";
			newIndent := c.newIndent(node.IDFodder, currIndent, c.column)
			c.fill(node.IDFodder, false, false, newIndent.lineUp)
			c.column += len(*node.Id)
		} else {
			c.column++ // "[";
			newIndent := c.newIndent(*openFodder(node.Index), currIndent, c.column)
			c.Visit(node.Index, newIndent, false)
			c.fillLast(node.IDFodder, false, false, newIndent.lineUp, currIndent.base)
			c.column++ // "]";
		}

	case *ast.Unary:
		c.column += len(node.Op.String())
		newIndent := c.newIndent(*openFodder(node.Expr), currIndent, c.column)
		_, leftIsDollar := leftRecursiveDeep(node.Expr).(*ast.Dollar)
		c.Visit(node.Expr, newIndent, leftIsDollar)

	case *ast.Var:
		c.column += len(node.Id)
	}

}

// VisitFile corrects the whole file including the final fodder.
func (c *FixIndentation) VisitFile(body ast.Node, finalFodder ast.Fodder) {
	c.Visit(body, indent{0, 0}, false)
	c.setIndents(finalFodder, 0, 0)
}


text:
using System.Threading;
using System.Threading.Tasks;
using MediatR;
using Syrup.Core.Local.Events;
using Syrup.Core.Local.Services;
using Syrup.Core.Server.Events;

namespace Syrup.Core.Local.Handlers
{
    public class ReleaseInfoWasFetchedEventHandler :
        INotificationHandler<ReleaseInfoWasFetchedEvent>,
        INotificationHandler<LocalFileSystemWasSacanedEvent>
    {
        private readonly ILocalReleaseService _localReleaseService;
        private readonly IMediator _mediator;

        public ReleaseInfoWasFetchedEventHandler(IMediator mediator, ILocalReleaseService localReleaseService)
        {
            _mediator = mediator;
            _localReleaseService = localReleaseService;
        }

        public async Task Handle(LocalFileSystemWasSacanedEvent notification, CancellationToken cancellationToken)
        {

            _localReleaseService.MakeUpdateFromLocal(notification.LocalReleaseInfos);

            await _mediator.Publish(new LocalReleaseInfoListWasUpdatedEvent(), cancellationToken);
        }

        public async Task Handle(ReleaseInfoWasFetchedEvent notification, CancellationToken cancellationToken)
        {
            _localReleaseService.MakeUpdateFromServer(notification.RelaseInfos);
            await _mediator.Publish(new LocalReleaseInfoListWasUpdatedEvent(), cancellationToken);
        }
    }
}


text:
<?php

namespace Framework\Utility
{

    //use Framework\Utility\ArrayMethods as ArrayMethods;
    //use Framework\Utility\StringMethods as StringMethods;

    class Inspector
    {
        protected $_class;

        protected $_meta = array(
            "class" => array(),
            "properties" => array(),
            "methods" => array()
        );

        protected $_properties = array();
        protected $_methods = array();

        public function __construct($class)
        {
            $this->_class = $class;
        }

        protected function _getClassComment()
        {
            $reflection = new \ReflectionClass($this->_class);
            return $reflection->getDocComment();
        }

        protected function _getClassProperties()
        {
            $reflection = new \ReflectionClass($this->_class);
            return $reflection->getProperties();
        }

        protected function _getClassMethods()
        {
            $reflection = new \ReflectionClass($this->_class);
            return $reflection->getMethods();
        }

        protected function _getPropertyComment($property)
        {
            $reflection = new \ReflectionProperty($this->_class, $property);
            return $reflection->getDocComment();
        }

        protected function _getMethodComment($method)
        {
            $reflection = new \ReflectionMethod($this->_class, $method);
            return $reflection->getDocComment();
        }

        protected function _parse($comment)
        {
            $meta = array();
            $pattern = "(@[a-zA-Z]+\s*[a-zA-Z0-9, ()_]*)";
            $matches = StringMethods::match($comment, $pattern);

            if ($matches != null)
            {
                foreach ($matches as $match)
                {
                    $parts = ArrayMethods::clean(
                        ArrayMethods::trim(
                            StringMethods::split($match, "[\s]", 2)
                        )
                    );

                    $meta[$parts[0]] = true;

                    if (sizeof($parts) > 1)
                    {
                        $meta[$parts[0]] = ArrayMethods::clean(
                            ArrayMethods::trim(
                                StringMethods::split($parts[1], ",")
                            )
                        );
                    }
                }
            }

            return $meta;
        }

        public function getClassMeta()
        {
            if (!isset($_meta["class"]))
            {
                $comment = $this->_getClassComment();

                if (!empty($comment))
                {
                    $_meta["class"] = $this->_parse($comment);
                }
                else
                {
                    $_meta["class"] = null;
                }
            }

            return $_meta["class"];
        }

        public function getClassProperties()
        {
            if (count($this->_properties) == 0)
            {
                $properties = $this->_getClassProperties();

                foreach ($properties as $property)
                {
                    $this->_properties[] = $property->getName();
                }
            }

            return $this->_properties;
        }

        public function getClassMethods()
        {
            if (count($this->_methods) == 0)
            {
                $methods = $this->_getClassMethods();

                foreach ($methods as $method)
                {
                    $this->_methods[] = $method->getName();
                }
            }

            return $this->_methods;
        }

        public function getPropertyMeta($property)
        {
            if (!isset($_meta["properties"][$property]))
            {
                $comment = $this->_getPropertyComment($property);

                if (!empty($comment))
                {
                    $_meta["properties"][$property] = $this->_parse($comment);
                }
                else
                {
                    $_meta["properties"][$property] = null;
                }
            }

            return $_meta["properties"][$property];
        }

        public function getMethodMeta($method)
        {
            if (!isset($_meta["actions"][$method]))
            {
                $comment = $this->_getMethodComment($method);

                if (!empty($comment))
                {
                    $_meta["methods"][$method] = $this->_parse($comment);
                }
                else
                {
                    $_meta["methods"][$method] = null;
                }
            }

            return $_meta["methods"][$method];
        }
    }

}


text:
/* @noflow */

import { type Component } from 'react';
import packageJson from '../package.json';

const context = require.context('./implementations/', true, /index\.js$/);
const { dependencies } = packageJson;

type ComponentsType = {
  Box: Component,
  Dot: Component,
  Provider: Component,
  View: Component
};

type ImplementationType = {
  components: ComponentsType,
  name: string,
  version: string
};

const toImplementations = (context: Object): Array<ImplementationType> =>
  context.keys().map((path) => {
    const components = context(path).default;
    const name = path.split('/')[1];
    const version = dependencies[name] || '';
    return { components, name, version };
  });

const toObject = (impls: Array<ImplementationType>): Object =>
  impls.reduce((acc, impl) => {
    acc[impl.name] = impl;
    return acc;
  }, {});

const map = toObject(toImplementations(context));

export default map;


text:
            <f:render section="category-tree" arguments="{categories:categories, selectedCategory:selectedCategory}" />

    <button type="button" class="sapa-btn sapa-btn-sm tree-reset">

        Auswahl zurücksetzen
    </button>

<f:section name="category-tree">
    <f:if condition="{categories}">

            <f:for each="{categories}" as="category">

                    <f:if condition="{category -> f:format.identifier()} == {selectedCategory -> f:format.identifier()}">
                        <f:then> f:format.identifier()}">{category.name}</f:then>
                        <f:else> f:format.identifier()}">{category.name}</f:else>
                    </f:if>
                    <f:render section="category-tree" arguments="{categories:category.children, selectedCategory:selectedCategory}" />

            </f:for>

    </f:if>
</f:section>


text:
<!DOCTYPE html>

<?php session_start(); ?>

    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <title>Sistema financeiro</title>

    <link rel="icon" href="../../favicon.ico" type="image/x-icon">

    <link href="https://fonts.googleapis.com/css?family=Roboto:400,700&subset=latin,cyrillic-ext" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" type="text/css">

    <link href="../../plugins/bootstrap/css/bootstrap.css" rel="stylesheet">

    <link href="../../plugins/node-waves/waves.css" rel="stylesheet" />

    <link href="../../plugins/animate-css/animate.css" rel="stylesheet" />

    <link href="../../plugins/bootstrap-material-datetimepicker/css/bootstrap-material-datetimepicker.css" rel="stylesheet" />

    <link href="../../plugins/waitme/waitMe.css" rel="stylesheet" />

    <link href="../../plugins/bootstrap-select/css/bootstrap-select.css" rel="stylesheet" />

    <link href="../../css/style.css" rel="stylesheet">

    <link href="../../css/themes/all-themes.css" rel="stylesheet" />

Please wait...

        search

    <input type="text" placeholder="START TYPING...">

        close

            Admin - Sistema financeiro

MENU

                        home
                        Home

                        create
                        Lançamento de conta

                        view_list
                        Listar contas

                © <?php echo date("F j, Y"); ?> Admin - Financeiro.

                Version:  1.0

Lançamento de contas

Dados do lançamento

                    <?php
                    if(isset($_SESSION["erro"])){

                        echo "
Erro ".$_SESSION["erro"]. "
";
                    }
                    if(isset($_SESSION["sucesso"])) {
                        echo "
Sucesso " . $_SESSION["sucesso"] . "
";
                    }
                    ?>

                    <form id="form_validation" method="POST" action="../../controllers/direction.php">
                        <input name="create" value="true" type="hidden">

                                <input  type="text" class="form-control" name="name" required>
                                Cedente/Fornecedor

                                <textarea name="description" cols="10" rows="3" class="form-control no-resize" required></textarea>
                                Observações/Referências

                                Data de vencimento

                                                date_range

                                        <input name="vencimento" type="date" class="form-control date" placeholder="Ex: 30/07/2016" required>

                                Valor

                                                attach_money

                                        <input min="1" max="881.90" name="valor" type="number" class="form-control money-dollar" placeholder="Máximo 881.90" required>

                                Desconto

                                                attach_money

                                        <input value="0" min="0" name="desconto" type="number" class="form-control money-dollar" placeholder="Ex: 99,99 " required>

                                Tipo da conta

                                    <select name="tipo" class="form-control show-tick" required>
                                        <option value="">-- Selecione o tipo --</option>
                                        <option value="1">Conta a pagar</option>
                                        <option value="0">Conta a receber</option>

                                    </select>

                                Conta recorrente/Número de repedições

                                                add

                                        <input name="recorrente" value="0" type="number" class="form-control money-dollar" placeholder="1 a 12 vezes" required>

                        <button class="btn btn-primary waves-effect" type="submit">SALVAR</button>
                    </form>


text:
//
//  DKAppDelegate.m
//  Pixelmator Opacity Helper
//
//  Created by Dmitriy Kubyshkin on 10/24/13.
//  Copyright (c) 2013 Dmitriy Kubyshkin. All rights reserved.
//

#import "DKAppDelegate.h"

/*!
 From 10.9's AXUIElement.h in ApplicationServices.framework:

 @function AXIsProcessTrustedWithOptions
 @abstract Returns whether the current process is a trusted accessibility client.
 @param options A dictionary of options, or NULL to specify no options. The following options are available:

 KEY: kAXTrustedCheckOptionPrompt
 VALUE: ACFBooleanRef indicating whether the user will be informed if the current process is untrusted. This could be used, for example, on application startup to always warn a user if accessibility is not enabled for the current process. Prompting occurs asynchronously and does not affect the return value.

 @result Returns TRUE if the current process is a trusted accessibility client, FALSE if it is not.
 */
extern Boolean AXIsProcessTrustedWithOptions(CFDictionaryRef options) __attribute__((weak_import));
extern CFStringRef kAXTrustedCheckOptionPrompt __attribute__((weak_import));

@implementation DKAppDelegate

- (void) awakeFromNib {
  _statusBar = [[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength];

  // you can also set an image
  _statusBar.image = [NSImage imageNamed:@"statusicon.tif"];

  _statusBar.menu = _statusMenu;
  _statusBar.highlightMode = YES;
}

- (void)showAccessibilityApiWarningWithOSXTenNineOrNewer:(BOOL)isOSXTenNineOrNewer
{
  NSString * informationText;
  if(isOSXTenNineOrNewer) {
    informationText = @"Access can be granted in System Preferences. Please reopen Pixelmator Opacity Helper afterwards.";
  } else {
    informationText = @"Please click on \"access for assistive devices\" checkbox in System Preferences Universal Access pane and reopen Pixelmator Opacity Helper afterwards.";
  }
  NSAlert *alert = [NSAlert alertWithMessageText:@"Pixelmator Opacity Helper needs access to Accessibility APIs."
                                   defaultButton:@"Exit & Open System Preferences"
                                 alternateButton:@"Exit"
                                     otherButton:nil
                       informativeTextWithFormat:@""];
  [alert setInformativeText:informationText];
  [alert setAlertStyle:NSCriticalAlertStyle];

  // if user has chosen to go preferences
  if([alert runModal] == NSAlertDefaultReturn)
  {
    // execute applescript that opens preferences on appropriate pane
    NSString* path = [[NSBundle mainBundle] pathForResource:@"assistive" ofType:@"scpt"];
    NSURL* url = [NSURL fileURLWithPath:path];
    NSDictionary* errors = [NSDictionary dictionary];
    NSAppleScript* appleScript = [[NSAppleScript alloc] initWithContentsOfURL:url error:&errors];
    [appleScript executeAndReturnError:nil];
  }

  [NSApp terminate:self];
}

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
  // We first have to check if the Accessibility APIs are turned on.
  // If not, we have to tell the user to do it (they'll need to authenticate
  // to do it).  If you are an accessibility app (i.e., if you are getting
  // info about UI elements in other apps), the APIs won't work unless the
  // access for assitive decices is turned on.
  if (AXIsProcessTrustedWithOptions != NULL) { // OS X 10.9 or higher
    NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:(id)kCFBooleanFalse, kAXTrustedCheckOptionPrompt, nil];
    if (!AXIsProcessTrustedWithOptions((__bridge CFDictionaryRef)options)) {
      [self showAccessibilityApiWarningWithOSXTenNineOrNewer: YES];
    }
  } else if (!AXAPIEnabled()) { // OS X 10.5-10.8
    [self showAccessibilityApiWarningWithOSXTenNineOrNewer: NO];
  }

  // Now we can start watching for keys
  _opacityController = [DKOpacityController new];
}

@end


text:
/**
 *
 */
package jp.ambrosoli.quickrestclient.apache.response;

import java.io.IOException;
import java.io.InputStream;

import jp.ambrosoli.quickrestclient.exception.IORuntimeException;
import jp.ambrosoli.quickrestclient.response.HttpResponse;

import org.apache.http.HttpEntity;
import org.apache.http.client.ResponseHandler;

/**
 * Apache HttpComponents用のHttpResponseを生成するレスポンスハンドラです。
 *
 * @author willard379
 * @since 0.1.0
 */
public class ApacheResponseHandler implements ResponseHandler<HttpResponse> {

    /*
     * (non-Javadoc)
     *
     * @see
     * org.apache.http.client.ResponseHandler#handleResponse(org.apache.http
     * .HttpResponse)
     */
    public HttpResponse handleResponse(final org.apache.http.HttpResponse response) {
        try {
            return new ApacheHttpResponse(response);
        } finally {
            if (response != null) {
                this.consumeEntity(response.getEntity());
            }
        }
    }

    /**
     * エンティティをconsumeします。
     *
     * @param entity
     *            エンティティ
     */
    public void consumeEntity(final HttpEntity entity) {
        try {
            if (entity == null) {
                return;
            }
            if (entity.isStreaming()) {
                InputStream instream = entity.getContent();
                if (instream != null) {
                    instream.close();
                }
            }
        } catch (IOException e) {
            throw new IORuntimeException(e);
        }
    }

}


text:
DEPS = [
  'recipe_engine/context',
  'recipe_engine/json',
  'recipe_engine/path',
  'recipe_engine/python',
  'recipe_engine/raw_io',
  'recipe_engine/step',
]


text:
/* This file has been prepared for Doxygen automatic documentation generation.*/
/*! \file *********************************************************************
 *
 * \brief
 *      XMEGA USART driver source file.
 *
 *      This file contains the function implementations the XMEGA interrupt
 *      and polled USART driver.
 *
 *      The driver is not intended for size and/or speed critical code, since
 *      most functions are just a few lines of code, and the function call
 *      overhead would decrease code performance. The driver is intended for
 *      rapid prototyping and documentation purposes for getting started with
 *      the XMEGA ADC module.
 *
 *      For size and/or speed critical code, it is recommended to copy the
 *      function contents directly into your application instead of making
 *      a function call.
 *
 *      Some functions use the following construct:
 *          "some_register = ... | (some_parameter ? SOME_BIT_bm : 0) | ..."
 *      Although the use of the ternary operator ( if ? then : else ) is discouraged,
 *      in some occasions the operator makes it possible to write pretty clean and
 *      neat code. In this driver, the construct is used to set or not set a
 *      configuration bit based on a boolean input parameter, such as
 *      the "some_parameter" in the example above.
 *
 * \par Application note:
 *      AVR1307: Using the XMEGA USART
 *
 * \par Documentation
 *      For comprehensive code documentation, supported compilers, compiler
 *      settings and supported devices see readme.html
 *
 * \author
 *      Atmel Corporation: http://www.atmel.com \n
 *      Support email: avr@atmel.com
 *
 * $Revision: 1694 $
 * $Date: 2008-07-29 14:21:58 +0200 (ti, 29 jul 2008) $  \n
 *
 * Copyright (c) 2008, Atmel Corporation All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright notice,
 * this list of conditions and the following disclaimer in the documentation
 * and/or other materials provided with the distribution.
 *
 * 3. The name of ATMEL may not be used to endorse or promote products derived
 * from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
 * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *****************************************************************************/
#include "usart_driver.h"

/*! \brief Initializes buffer and selects what USART module to use.
 *
 *  Initializes receive and transmit buffer and selects what USART module to use,
 *  and stores the data register empty interrupt level.
 *
 *  \param usart_data           The struct serial struct instance.
 *  \param usart                The USART module.
 *  \param dreIntLevel          Data register empty interrupt level.
 */
void USART_InterruptDriver_Initialize(struct serial * usart_data,
                                      USART_t * usart,
                                      USART_DREINTLVL_t dreIntLevel)
{
	usart_data->usart = usart;
	usart_data->dreIntLevel = dreIntLevel;

	usart_data->buffer.RX_Tail = 0;
	usart_data->buffer.RX_Head = 0;
	usart_data->buffer.TX_Tail = 0;
	usart_data->buffer.TX_Head = 0;
}

/*! \brief Set USART DRE interrupt level.
 *
 *  Set the interrupt level on Data Register interrupt.
 *
 *  \note Changing the DRE interrupt level in the interrupt driver while it is
 *        running will not change the DRE interrupt level in the USART before the
 *        DRE interrupt have been disabled and enabled again.
 *
 *  \param usart_data         The struct serial struct instance
 *  \param dreIntLevel        Interrupt level of the DRE interrupt.
 */
void USART_InterruptDriver_DreInterruptLevel_Set(struct serial * usart_data,
                                                 USART_DREINTLVL_t dreIntLevel)
{
	usart_data->dreIntLevel = dreIntLevel;
}

/*! \brief Test if there is data in the transmitter software buffer.
 *
 *  This function can be used to test if there is free space in the transmitter
 *  software buffer.
 *
 *  \param usart_data The struct serial struct instance.
 *
 *  \retval true      There is data in the receive buffer.
 *  \retval false     The receive buffer is empty.
 */
bool USART_TXBuffer_FreeSpace(struct serial * usart_data)
{
	/* Make copies to make sure that volatile access is specified. */
	uint8_t tempHead = (usart_data->buffer.TX_Head + 1) & USART_TX_BUFFER_MASK;
	uint8_t tempTail = usart_data->buffer.TX_Tail;

	/* There are data left in the buffer unless Head and Tail are equal. */
	return (tempHead != tempTail);
}

/*! \brief Put data (5-8 bit character).
 *
 *  Stores data byte in TX software buffer and enables DRE interrupt if there
 *  is free space in the TX software buffer.
 *
 *  \param usart_data The struct serial struct instance.
 *  \param data       The data to send.
 */
bool USART_TXBuffer_PutByte(struct serial * usart_data, uint8_t data)
{
	uint8_t tempCTRLA;
	uint8_t tempTX_Head;
	bool TXBuffer_FreeSpace;
	USART_Buffer_t * TXbufPtr;

	TXbufPtr = &usart_data->buffer;
	TXBuffer_FreeSpace = USART_TXBuffer_FreeSpace(usart_data);

	if(TXBuffer_FreeSpace)
	{
	  	tempTX_Head = TXbufPtr->TX_Head;
	  	TXbufPtr->TX[tempTX_Head]= data;
		/* Advance buffer head. */
		TXbufPtr->TX_Head = (tempTX_Head + 1) & USART_TX_BUFFER_MASK;

		/* Enable DRE interrupt. */
		tempCTRLA = usart_data->usart->CTRLA;
		tempCTRLA = (tempCTRLA & ~USART_DREINTLVL_gm) | usart_data->dreIntLevel;
		usart_data->usart->CTRLA = tempCTRLA;
	}
	return TXBuffer_FreeSpace;
}

/*! \brief Test if there is data in the receive software buffer.
 *
 *  This function can be used to test if there is data in the receive software
 *  buffer.
 *
 *  \param usart_data         The struct serial struct instance
 *
 *  \retval true      There is data in the receive buffer.
 *  \retval false     The receive buffer is empty.
 */
bool USART_RXBufferData_Available(struct serial * usart_data)
{
	/* Make copies to make sure that volatile access is specified. */
	uint8_t tempHead = usart_data->buffer.RX_Head;
	uint8_t tempTail = usart_data->buffer.RX_Tail;

	/* There are data left in the buffer unless Head and Tail are equal. */
	return (tempHead != tempTail);
}

/*! \brief Get received data (5-8 bit character).
 *
 *  The function USART_RXBufferData_Available should be used before this
 *  function is used to ensure that data is available.
 *
 *  Returns data from RX software buffer.
 *
 *  \param usart_data       The struct serial struct instance.
 *
 *  \return         Received data.
 */
uint8_t USART_RXBuffer_GetByte(struct serial * usart_data)
{
	USART_Buffer_t * bufPtr;
	uint8_t ans;

	bufPtr = &usart_data->buffer;
	ans = (bufPtr->RX[bufPtr->RX_Tail]);

	/* Advance buffer tail. */
	bufPtr->RX_Tail = (bufPtr->RX_Tail + 1) & USART_RX_BUFFER_MASK;

	return ans;
}

/*! \brief RX Complete Interrupt Service Routine.
 *
 *  RX Complete Interrupt Service Routine.
 *  Stores received data in RX software buffer.
 *
 *  \param usart_data      The struct serial struct instance.
 */
bool USART_RXComplete(struct serial * usart_data)
{
	USART_Buffer_t * bufPtr;
	bool ans;

	bufPtr = &usart_data->buffer;
	/* Advance buffer head. */
	uint8_t tempRX_Head = (bufPtr->RX_Head + 1) & USART_RX_BUFFER_MASK;

	/* Check for overflow. */
	uint8_t tempRX_Tail = bufPtr->RX_Tail;
	uint8_t data = usart_data->usart->DATA;

	if (tempRX_Head == tempRX_Tail) {
	  	ans = false;
	}else{
		ans = true;
		usart_data->buffer.RX[usart_data->buffer.RX_Head] = data;
		usart_data->buffer.RX_Head = tempRX_Head;
	}
	return ans;
}

/*! \brief Data Register Empty Interrupt Service Routine.
 *
 *  Data Register Empty Interrupt Service Routine.
 *  Transmits one byte from TX software buffer. Disables DRE interrupt if buffer
 *  is empty. Argument is pointer to USART (struct serial).
 *
 *  \param usart_data      The struct serial struct instance.
 */
void USART_DataRegEmpty(struct serial * usart_data)
{
	USART_Buffer_t * bufPtr;
	bufPtr = &usart_data->buffer;

	/* Check if all data is transmitted. */
	uint8_t tempTX_Tail = usart_data->buffer.TX_Tail;
	if (bufPtr->TX_Head == tempTX_Tail){
	    /* Disable DRE interrupts. */
		uint8_t tempCTRLA = usart_data->usart->CTRLA;
		tempCTRLA = (tempCTRLA & ~USART_DREINTLVL_gm) | USART_DREINTLVL_OFF_gc;
		usart_data->usart->CTRLA = tempCTRLA;

	}else{
		/* Start transmitting. */
		uint8_t data = bufPtr->TX[usart_data->buffer.TX_Tail];
		usart_data->usart->DATA = data;

		/* Advance buffer tail. */
		bufPtr->TX_Tail = (bufPtr->TX_Tail + 1) & USART_TX_BUFFER_MASK;
	}
}


text:
layout: page
title: "About"
description: ""
---
{% include JB/setup %}

Well, there needs to be something here, so here goes...

*Genomics Life* started as a middle of the afternoon idea over a hangouts chat between `jkrillbu` (Mike) and `nturaga`(Nitesh). We are computational biologists who want to blog about science.

Learn more about us and our project [GitHub](https://github.com/genomicslife).

### Setup

Some fun facts about the setup of this project include:

* Built using [Jekyll](http://jekyllrb.com), using the jekyll theme lanyon.
* Developed on GitHub and hosted for free on [GitHub Pages](https://pages.github.com)
* Coded with [Atom](https://atom.io/), an amazing code editor
* Designed and developed while listening to music like (listen to this playlist on [spotify](https://open.spotify.com/user/1160665844/playlist/2sUnJwjAHuUU9Ums6jp6aA))

  <iframe src="https://embed.spotify.com/?uri=spotify%3Auser%3A1160665844%3Aplaylist%3A2sUnJwjAHuUU9Ums6jp6aA" width="300" height="380" frameborder="0" allowtransparency="true"></iframe>

  Have questions or suggestions? Feel free to [open an issue on GitHub](https://github.com/genomicslife/issues/new).

Thanks for reading!


text:
import React, {Component} from 'react'

export default class NoMatch extends Component {

  render() {
    return (

Page NOT Found

    )
  }

}


text:
#include <winpr/windows.h>
#include <freerdp/utils/stream.h>
#include <freerdp/utils/memory.h>
#include <freerdp/utils/hexdump.h>
#include <freerdp/utils/unicode.h>

#include "librail.h"

#include <freerdp/rail/window.h>

struct _WINDOW_STYLE
{
	uint32 style;
	const char* name;
	boolean multi;
};
typedef struct _WINDOW_STYLE WINDOW_STYLE;

static const WINDOW_STYLE WINDOW_STYLES[] =
{
	{ WS_BORDER, "WS_BORDER", false },
	{ WS_CAPTION, "WS_CAPTION", false },
	{ WS_CHILD, "WS_CHILD", false },
	{ WS_CLIPCHILDREN, "WS_CLIPCHILDREN", false },
	{ WS_CLIPSIBLINGS, "WS_CLIPSIBLINGS", false },
	{ WS_DISABLED, "WS_DISABLED", false },
	{ WS_DLGFRAME, "WS_DLGFRAME", false },
	{ WS_GROUP, "WS_GROUP", false },
	{ WS_HSCROLL, "WS_HSCROLL", false },
	{ WS_ICONIC, "WS_ICONIC", false },
	{ WS_MAXIMIZE, "WS_MAXIMIZE", false },
	{ WS_MAXIMIZEBOX, "WS_MAXIMIZEBOX", false },
	{ WS_MINIMIZE, "WS_MINIMIZE", false },
	{ WS_MINIMIZEBOX, "WS_MINIMIZEBOX", false },
	{ WS_OVERLAPPED, "WS_OVERLAPPED", false },
	{ WS_OVERLAPPEDWINDOW, "WS_OVERLAPPEDWINDOW", true },
	{ WS_POPUP, "WS_POPUP", false },
	{ WS_POPUPWINDOW, "WS_POPUPWINDOW", true },
	{ WS_SIZEBOX, "WS_SIZEBOX", false },
	{ WS_SYSMENU, "WS_SYSMENU", false },
	{ WS_TABSTOP, "WS_TABSTOP", false },
	{ WS_THICKFRAME, "WS_THICKFRAME", false },
	{ WS_VISIBLE, "WS_VISIBLE", false }
};

static const WINDOW_STYLE EXTENDED_WINDOW_STYLES[] =
{
	{ WS_EX_ACCEPTFILES, "WS_EX_ACCEPTFILES", false },
	{ WS_EX_APPWINDOW, "WS_EX_APPWINDOW", false },
	{ WS_EX_CLIENTEDGE, "WS_EX_CLIENTEDGE", false },
	{ WS_EX_COMPOSITED, "WS_EX_COMPOSITED", false },
	{ WS_EX_CONTEXTHELP, "WS_EX_CONTEXTHELP", false },
	{ WS_EX_CONTROLPARENT, "WS_EX_CONTROLPARENT", false },
	{ WS_EX_DLGMODALFRAME, "WS_EX_DLGMODALFRAME", false },
	{ WS_EX_LAYERED, "WS_EX_LAYERED", false },
	{ WS_EX_LAYOUTRTL, "WS_EX_LAYOUTRTL", false },
	{ WS_EX_LEFT, "WS_EX_LEFT", false },
	{ WS_EX_LEFTSCROLLBAR, "WS_EX_LEFTSCROLLBAR", false },
	{ WS_EX_LTRREADING, "WS_EX_LTRREADING", false },
	{ WS_EX_MDICHILD, "WS_EX_MDICHILD", false },
	{ WS_EX_NOACTIVATE, "WS_EX_NOACTIVATE", false },
	{ WS_EX_NOINHERITLAYOUT, "WS_EX_NOINHERITLAYOUT", false },
	{ WS_EX_NOPARENTNOTIFY, "WS_EX_NOPARENTNOTIFY", false },
	{ WS_EX_OVERLAPPEDWINDOW, "WS_EX_OVERLAPPEDWINDOW", true },
	{ WS_EX_PALETTEWINDOW, "WS_EX_PALETTEWINDOW", true },
	{ WS_EX_RIGHT, "WS_EX_RIGHT", false },
	{ WS_EX_RIGHTSCROLLBAR, "WS_EX_RIGHTSCROLLBAR", false },
	{ WS_EX_RTLREADING, "WS_EX_RTLREADING", false },
	{ WS_EX_STATICEDGE, "WS_EX_STATICEDGE", false },
	{ WS_EX_TOOLWINDOW, "WS_EX_TOOLWINDOW", false },
	{ WS_EX_TOPMOST, "WS_EX_TOPMOST", false },
	{ WS_EX_TRANSPARENT, "WS_EX_TRANSPARENT", false },
	{ WS_EX_WINDOWEDGE, "WS_EX_WINDOWEDGE", false }
};

void print_window_styles(uint32 style)
{
	int i;

	printf("Window Styles:\n{\n");
	for (i = 0; i < ARRAY_SIZE(WINDOW_STYLES); i++)
	{
		if (style & WINDOW_STYLES[i].style)
		{
			if (WINDOW_STYLES[i].multi)
			{
				if ((style & WINDOW_STYLES[i].style) != WINDOW_STYLES[i].style)
						continue;
			}

			printf("\t%s\n", WINDOW_STYLES[i].name);
		}
	}
	printf("}\n");
}

void print_extended_window_styles(uint32 style)
{
	int i;

	printf("Extended Window Styles:\n{\n");
	for (i = 0; i < ARRAY_SIZE(EXTENDED_WINDOW_STYLES); i++)
	{
		if (style & EXTENDED_WINDOW_STYLES[i].style)
		{
			if (EXTENDED_WINDOW_STYLES[i].multi)
			{
				if ((style & EXTENDED_WINDOW_STYLES[i].style) != EXTENDED_WINDOW_STYLES[i].style)
						continue;
			}

			printf("\t%s\n", EXTENDED_WINDOW_STYLES[i].name);
		}
	}
	printf("}\n");
}

void window_state_update(rdpWindow* window, WINDOW_ORDER_INFO* orderInfo, WINDOW_STATE_ORDER* window_state)
{
	window->fieldFlags = orderInfo->fieldFlags;

	if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_OWNER)
	{
		window->ownerWindowId = window_state->ownerWindowId;
		DEBUG_RAIL("ownerWindowId:0x%08X", window->ownerWindowId);
	}

	DEBUG_RAIL("windowId=0x%X ownerWindowId=0x%X",
			window->windowId, window->ownerWindowId);

	if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_STYLE)
	{
		window->style = window_state->style;
		window->extendedStyle = window_state->extendedStyle;

#ifdef WITH_DEBUG_RAIL
		print_window_styles(window->style);
		print_extended_window_styles(window->extendedStyle);
#endif
	}

	if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_SHOW)
	{
		window->showState = window_state->showState;
		DEBUG_RAIL("ShowState:%d", window->showState);
	}

	if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_TITLE)
	{
		window->titleInfo.length = window_state->titleInfo.length;
		window->titleInfo.string = xmalloc(window_state->titleInfo.length);
		memcpy(window->titleInfo.string, window_state->titleInfo.string, window->titleInfo.length);

#ifdef WITH_DEBUG_RAIL
		freerdp_hexdump(window->titleInfo.string, window->titleInfo.length);
#endif
	}

	if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_CLIENT_AREA_OFFSET)
	{
		window->clientOffsetX = window_state->clientOffsetX;
		window->clientOffsetY = window_state->clientOffsetY;

		DEBUG_RAIL("Client Area Offset: (%d, %d)",
				window->clientOffsetX, window->clientOffsetY);
	}

	if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_CLIENT_AREA_SIZE)
	{
		window->clientAreaWidth = window_state->clientAreaWidth;
		window->clientAreaHeight = window_state->clientAreaHeight;

		DEBUG_RAIL("Client Area Size: (%d, %d)",
				window->clientAreaWidth, window->clientAreaHeight);
	}

	if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_RP_CONTENT)
	{
		window->RPContent = window_state->RPContent;
	}

	if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_ROOT_PARENT)
	{
		window->rootParentHandle = window_state->rootParentHandle;
	}

	if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_WND_OFFSET)
	{
		window->windowOffsetX = window_state->windowOffsetX;
		window->windowOffsetY = window_state->windowOffsetY;

		DEBUG_RAIL("Window Offset: (%d, %d)",
				window->windowOffsetX, window->windowOffsetY);
	}

	if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_WND_CLIENT_DELTA)
	{
		window->windowClientDeltaX = window_state->windowClientDeltaX;
		window->windowClientDeltaY = window_state->windowClientDeltaY;

		DEBUG_RAIL("Window Client Delta: (%d, %d)",
				window->windowClientDeltaX, window->windowClientDeltaY);
	}

	if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_WND_SIZE)
	{
		window->windowWidth = window_state->windowWidth;
		window->windowHeight = window_state->windowHeight;

		DEBUG_RAIL("Window Size: (%d, %d)",
				window->windowWidth, window->windowHeight);
	}

	if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_WND_RECTS)
	{
		int i;

		if (window->windowRects != NULL)
			xfree(window->windowRects);

		window->windowRects = window_state->windowRects;
		window->numWindowRects = window_state->numWindowRects;

		for (i = 0; i < (int) window_state->numWindowRects; i++)
		{
			DEBUG_RAIL("Window Rect #%d: left:%d top:%d right:%d bottom:%d", i,
					window_state->windowRects[i].left, window_state->windowRects[i].top,
					window_state->windowRects[i].right, window_state->windowRects[i].bottom);
		}
	}

	if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_VIS_OFFSET)
	{
		window->visibleOffsetX = window_state->visibleOffsetX;
		window->visibleOffsetY = window_state->visibleOffsetY;

		DEBUG_RAIL("Window Visible Offset: (%d, %d)",
				window->visibleOffsetX, window->visibleOffsetY);
	}

	if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_VISIBILITY)
	{
		int i;

		if (window->visibilityRects != NULL)
			xfree(window->visibilityRects);

		window->visibilityRects = window_state->visibilityRects;
		window->numVisibilityRects = window_state->numVisibilityRects;

		for (i = 0; i < (int) window_state->numVisibilityRects; i++)
		{
			DEBUG_RAIL("Visibility Rect #%d: left:%d top:%d right:%d bottom:%d", i,
					window_state->visibilityRects[i].left, window_state->visibilityRects[i].top,
					window_state->visibilityRects[i].right, window_state->visibilityRects[i].bottom);
		}
	}
}

void rail_CreateWindow(rdpRail* rail, rdpWindow* window)
{
	if (window->titleInfo.length > 0)
	{
		window->title = freerdp_uniconv_in(rail->uniconv, window->titleInfo.string, window->titleInfo.length);
	}
	else
	{
		window->title = (char*) xmalloc(sizeof("RAIL"));
		memcpy(window->title, "RAIL", sizeof("RAIL"));
	}

	IFCALL(rail->rail_CreateWindow, rail, window);

	if (window->fieldFlags & WINDOW_ORDER_FIELD_WND_RECTS)
	{
		IFCALL(rail->rail_SetWindowRects, rail, window);
	}
	if (window->fieldFlags & WINDOW_ORDER_FIELD_VISIBILITY)
	{
		IFCALL(rail->rail_SetWindowVisibilityRects, rail, window);
	}
}

void rail_UpdateWindow(rdpRail* rail, rdpWindow* window)
{
	if (window->fieldFlags & WINDOW_ORDER_FIELD_OWNER)
	{

	}

	if (window->fieldFlags & WINDOW_ORDER_FIELD_STYLE)
	{

	}

	if (window->fieldFlags & WINDOW_ORDER_FIELD_SHOW)
	{
		IFCALL(rail->rail_ShowWindow, rail, window, window->showState);
	}

	if (window->fieldFlags & WINDOW_ORDER_FIELD_TITLE)
	{
		if (window->title != NULL)
			xfree(window->title);

		window->title = freerdp_uniconv_in(rail->uniconv, window->titleInfo.string, window->titleInfo.length);

		IFCALL(rail->rail_SetWindowText, rail, window);
	}

	if (window->fieldFlags & WINDOW_ORDER_FIELD_CLIENT_AREA_OFFSET)
	{

	}

	if (window->fieldFlags & WINDOW_ORDER_FIELD_CLIENT_AREA_SIZE)
	{

	}

	if (window->fieldFlags & WINDOW_ORDER_FIELD_RP_CONTENT)
	{

	}

	if (window->fieldFlags & WINDOW_ORDER_FIELD_ROOT_PARENT)
	{

	}

	if ((window->fieldFlags & WINDOW_ORDER_FIELD_WND_OFFSET) ||
			(window->fieldFlags & WINDOW_ORDER_FIELD_WND_SIZE))
	{
		IFCALL(rail->rail_MoveWindow, rail, window);
	}

	if (window->fieldFlags & WINDOW_ORDER_FIELD_WND_CLIENT_DELTA)
	{

	}

	if (window->fieldFlags & WINDOW_ORDER_FIELD_WND_RECTS)
	{
		IFCALL(rail->rail_SetWindowRects, rail, window);
	}

	if (window->fieldFlags & WINDOW_ORDER_FIELD_VIS_OFFSET)
	{

	}

	if (window->fieldFlags & WINDOW_ORDER_FIELD_VISIBILITY)
	{
		IFCALL(rail->rail_SetWindowVisibilityRects, rail, window);
	}
}

void rail_DestroyWindow(rdpRail* rail, rdpWindow* window)
{
	IFCALL(rail->rail_DestroyWindow, rail, window);

	if (window != NULL)
	{
		xfree(window);
	}
}


text:
package org.apache.lucene.queries;

import org.apache.lucene.index.Term;
import org.apache.lucene.index.TermContext;
import org.apache.lucene.search.BooleanClause;
import org.apache.lucene.search.BooleanClause.Occur;
import org.apache.lucene.search.BooleanQuery;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.TermQuery;

import org.elasticsearch.common.lucene.search.Queries;

/**
 * Extended version of {@link CommonTermsQuery} that allows to pass in a
 * <tt>minimumNumberShouldMatch</tt> specification that uses the actual num of high frequent terms
 * to calculate the minimum matching terms.
 */
public class ExtendedCommonTermsQuery extends CommonTermsQuery {

    public ExtendedCommonTermsQuery(Occur highFreqOccur, Occur lowFreqOccur, float maxTermFrequency, boolean disableCoord) {
        super(highFreqOccur, lowFreqOccur, maxTermFrequency, disableCoord);
    }

    public ExtendedCommonTermsQuery(Occur highFreqOccur, Occur lowFreqOccur, float maxTermFrequency) {
        super(highFreqOccur, lowFreqOccur, maxTermFrequency);
    }

    private String lowFreqMinNumShouldMatchSpec;
    private String highFreqMinNumShouldMatchSpec;

    @Override
    protected int calcLowFreqMinimumNumberShouldMatch(int numOptional) {
        return calcMinimumNumberShouldMatch(lowFreqMinNumShouldMatchSpec, numOptional);
    }

    protected int calcMinimumNumberShouldMatch(String spec, int numOptional) {
        if (spec == null) {
            return 0;
        }
        return Queries.calculateMinShouldMatch(numOptional, spec);
    }

    protected int calcHighFreqMinimumNumberShouldMatch(int numOptional) {
        return calcMinimumNumberShouldMatch(highFreqMinNumShouldMatchSpec, numOptional);
    }

    public void setHighFreqMinimumNumberShouldMatch(String spec) {
        this.highFreqMinNumShouldMatchSpec = spec;
    }

    public String getHighFreqMinimumNumberShouldMatch() {
        return highFreqMinNumShouldMatchSpec;
    }

    public void setLowFreqMinimumNumberShouldMatch(String spec) {
        this.lowFreqMinNumShouldMatchSpec = spec;
    }

    public String getLowFreqMinimumNumberShouldMatch() {
        return lowFreqMinNumShouldMatchSpec;
    }

    @Override
    protected Query buildQuery(final int maxDoc, final TermContext[] contextArray, final Term[] queryTerms) {
        BooleanQuery lowFreq = new BooleanQuery(disableCoord);
        BooleanQuery highFreq = new BooleanQuery(disableCoord);
        highFreq.setBoost(highFreqBoost);
        lowFreq.setBoost(lowFreqBoost);
        BooleanQuery query = new BooleanQuery(true);

        for (int i = 0; i < queryTerms.length; i++) {
            TermContext termContext = contextArray[i];
            if (termContext == null) {
                lowFreq.add(new TermQuery(queryTerms[i]), lowFreqOccur);
            } else {
                if ((maxTermFrequency >= 1f && termContext.docFreq() > maxTermFrequency) || (termContext.docFreq() > (int) Math.ceil(maxTermFrequency * (float) maxDoc))) {
                    highFreq.add(new TermQuery(queryTerms[i], termContext), highFreqOccur);
                } else {
                    lowFreq.add(new TermQuery(queryTerms[i], termContext), lowFreqOccur);
                }
            }
        }

        final int numLowFreqClauses = lowFreq.clauses().size(),
                  numHighFreqClauses = highFreq.clauses().size();

        if (lowFreqOccur == Occur.SHOULD && numLowFreqClauses > 0) {
            int minMustMatch = calcLowFreqMinimumNumberShouldMatch(numLowFreqClauses);
            lowFreq.setMinimumNumberShouldMatch(minMustMatch);
        }

        if (highFreqOccur == Occur.SHOULD && numHighFreqClauses > 0) {
            int minMustMatch = calcHighFreqMinimumNumberShouldMatch(numHighFreqClauses);
            highFreq.setMinimumNumberShouldMatch(minMustMatch);
        }

        if (lowFreq.clauses().isEmpty()) {
            /*
             * if lowFreq is empty we rewrite the high freq terms in a conjunction to
             * prevent slow queries.
             * Only if a specic high_freq should_match is not specified.
             */
            if (highFreqMinNumShouldMatchSpec == null && highFreqOccur != Occur.MUST) {
                for (BooleanClause booleanClause : highFreq) {
                    booleanClause.setOccur(Occur.MUST);
                }
            }
            highFreq.setBoost(getBoost());
            return highFreq;
        } else if (highFreq.clauses().isEmpty()) {
            // only do low freq terms - we don't have high freq terms
            lowFreq.setBoost(getBoost());
            return lowFreq;
        } else {
            query.add(highFreq, Occur.SHOULD);
            query.add(lowFreq, Occur.MUST);
            query.setBoost(getBoost());
            return query;
        }
    }
}


text:
import React from 'react'
import { Feed } from 'shengnian-ui-react'

const FeedExampleSummaryDate = () => (
  <Feed>
    <Feed.Event>
      <Feed.Label image='/assets/images/avatar/small/jenny.jpg' />
      <Feed.Content>
        <Feed.Summary
          content='You added Jenny Hess to your coworker group.'
          date='3 days ago'
        />
      </Feed.Content>
    </Feed.Event>
  </Feed>
)

export default FeedExampleSummaryDate


text:
package com.zoctan.solar.post.presenter;

import com.zoctan.solar.beans.PostDetailBean;
import com.zoctan.solar.post.model.PostModel;
import com.zoctan.solar.post.model.PostModelImpl;
import com.zoctan.solar.post.view.PostDetailView;

/**
 * Post详情回调实现类
 */

public class PostDetailPresenter {
    private PostDetailView mPostDetailView;
    private PostModel mPostModel;

    public PostDetailPresenter(PostDetailView postDetailView){
        this.mPostDetailView=postDetailView;
        mPostModel=new PostModelImpl();
    }
    public void loadPostDetail(final String id){
        mPostDetailView.showLoading();
        mPostModel.loadPostDetail(id,new OnLoadPostDetailListener());
    }
    private class OnLoadPostDetailListener implements PostModel.OnLoadPostDetailListener{
        @Override
        public void onSuccess(final PostDetailBean postDetailBean){
            if(postDetailBean!=null){
                mPostDetailView.showPostDetailContent(postDetailBean.getPost_content());
                if(Integer.parseInt(postDetailBean.getPost_comments())>0){
                    mPostDetailView.addComment(postDetailBean.postCommentBeen);
                }
            }
            mPostDetailView.hideLoading();
        }
        @Override
        public void onFailure(final String msg,Exception e){
            mPostDetailView.hideLoading();
        }
    }

    public void sendPostComment(String post_id,String comment,String user_id){
        mPostModel.sendPostComment(post_id,comment,user_id,new OnSendPostCommentListener());
    }

    private class OnSendPostCommentListener implements PostModel.OnSendPostCommentListener{
        @Override
        public void onSuccess(){
            mPostDetailView.queryAction();
        }
        @Override
        public void onFailure(final String msg,Exception e){
            mPostDetailView.showFailMessage();
        }
    }
}


text:
@echo off
:recompile
cls
javac *.java && java Game
set /P restart=Recompile Game? (yes)
If /I "%restart%"=="yes" goto recompile


text:
require 'ffi'
require_relative 'enums'

module Wslay
  module Event
    extend FFI::Library
    ffi_lib :wslay

    class OnFrameRecvStartArg < FFI::Struct
      layout  :fin,             :uint8,
              :rsv,             :uint8,
              :opcode,          :uint8,
              :payload_length,  :uint64
    end

    class OnFrameRecvChunkArg < FFI::Struct
      layout  :data,        :pointer,
              :data_length, :size_t
    end

    class OnMsgRecvArg < FFI::Struct
      layout  :rsv,         :uint8,
              :opcode,      :uint8,
              :msg,         :pointer,
              :msg_length,  :size_t,
              :status_code, :uint16
    end

    class Callbacks < FFI::Struct
      layout  :recv_callback,                 :pointer,
              :send_callback,                 :pointer,
              :genmask_callback,              :pointer,
              :on_frame_recv_start_callback,  :pointer,
              :on_frame_recv_chunk_callback,  :pointer,
              :on_frame_recv_end_callback,    :pointer,
              :on_msg_recv_callback,          :pointer

      def recv_callback(&block)
        self[:recv_callback] = FFI::Function.new(:ssize_t, [:pointer, :buffer_in, :size_t, :int, :pointer], blocking: true) do |ctx, buf, len, flags, user_data|
          yield(ctx, buf, len, flags, user_data)
        end
      end

      def send_callback(&block)
        self[:send_callback] = FFI::Function.new(:ssize_t, [:pointer, :buffer_out, :size_t, :int, :pointer], blocking: true) do |ctx, data, len, flags, user_data|
          yield(ctx, data, len, flags, user_data)
        end
      end

      def genmask_callback(&block)
        self[:genmask_callback] = FFI::Function.new(:int, [:pointer, :buffer_in, :size_t, :pointer], blocking: true) do |ctx, buf, len, user_data|
          yield(ctx, buf, len, user_data)
        end
      end

      def on_frame_recv_start_callback(&block)
        self[:on_frame_recv_start_callback] = FFI::Function.new(:void, [:pointer, OnFrameRecvStartArg.ptr, :pointer], blocking: true) do |ctx, arg, user_data|
          yield(ctx, arg, user_data)
        end
      end

      def on_frame_recv_chunk_callback(&block)
        self[:on_frame_recv_chunk_callback] = FFI::Function.new(:void, [:pointer, OnFrameRecvChunkArg.ptr, :pointer], blocking: true) do |ctx, arg, user_data|
          yield(ctx, arg, user_data)
        end
      end

      def on_frame_recv_end_callback(&block)
        self[:on_frame_recv_end_callback] = FFI::Function.new(:void [:pointer, :pointer], blocking: true) do |ctx, user_data|
          yield(ctx, user_data)
        end
      end

      def on_msg_recv_callback(&block)
        self[:on_msg_recv_callback] = FFI::Function.new(:void, [:pointer, OnMsgRecvArg.ptr, :pointer], blocking: true) do |ctx, arg, user_data|
          yield(ctx, arg, user_data)
        end
      end
    end

    class Msg < FFI::Struct
      layout  :opcode,      :uint8,
              :msg,         :pointer,
              :msg_length,  :size_t
    end

    attach_function :read,  :wslay_event_recv,  [:pointer], Error, blocking: true
    attach_function :write, :wslay_event_send,  [:pointer], Error, blocking: true

    attach_function :queue_msg,   :wslay_event_queue_msg,   [:pointer, Msg.ptr],  Error, blocking: true
    attach_function :queue_close, :wslay_event_queue_close, [:pointer, StatusCode, :buffer_in, :size_t],  Error, blocking: true

    attach_function :set_error, :wslay_event_set_error, [:pointer, Error],  :void

    attach_function :want_read,   :wslay_event_want_read,   [:pointer], :bool, blocking: true
    attach_function :want_write,  :wslay_event_want_write,  [:pointer], :bool, blocking: true

    attach_function :get_close_received,        :wslay_event_get_close_received,        [:pointer], :bool, blocking: true
    attach_function :get_close_sent,            :wslay_event_get_close_sent,            [:pointer], :bool, blocking: true
    attach_function :get_status_code_received,  :wslay_event_get_status_code_received,  [:pointer], StatusCode, blocking: true
    attach_function :get_status_code_sent,      :wslay_event_get_status_code_sent,      [:pointer], StatusCode, blocking: true
    attach_function :get_queued_msg_count,      :wslay_event_get_queued_msg_count,      [:pointer], :size_t, blocking: true
    attach_function :get_queued_msg_length,     :wslay_event_get_queued_msg_length,     [:pointer], :size_t, blocking: true
  end
end


text:
<?php

namespace Sylius\Behat\Service;

use Sylius\Behat\Service\Setter\CookieSetterInterface;
use Sylius\Component\Core\Model\UserInterface;
use Sylius\Component\User\Repository\UserRepositoryInterface;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;

/**
 * @author Arkadiusz Krakowiak <arkadiusz.krakowiak@lakion.com>
 * @author Kamil Kokot <kamil.kokot@lakion.com>
 */
final class SecurityService implements SecurityServiceInterface
{
    /**
     * @var UserRepositoryInterface
     */
    private $userRepository;

    /**
     * @var SessionInterface
     */
    private $session;

    /**
     * @var CookieSetterInterface
     */
    private $cookieSetter;

    /**
     * @var string
     */
    private $sessionTokenVariable;

    /**
     * @param UserRepositoryInterface $userRepository
     * @param SessionInterface $session
     * @param CookieSetterInterface $cookieSetter
     * @param string $contextKey
     */
    public function __construct(
        UserRepositoryInterface $userRepository,
        SessionInterface $session,
        CookieSetterInterface $cookieSetter,
        $contextKey
    ) {
        $this->userRepository = $userRepository;
        $this->session = $session;
        $this->cookieSetter = $cookieSetter;
        $this->sessionTokenVariable = sprintf('_security_%s', $contextKey);
    }

    /**
     * {@inheritdoc}
     */
    public function logIn($email)
    {
        /** @var UserInterface $user */
        $user = $this->userRepository->findOneBy(['username' => $email]);
        if (null === $user) {
            throw new \InvalidArgumentException(sprintf('There is no user with email %s', $email));
        }

        $this->logUserIn($user);
    }

    public function logOut()
    {
        $this->setSerializedToken(null);

        $this->cookieSetter->setCookie($this->session->getName(), $this->session->getId());
    }

    /**
     * {@inheritdoc}
     */
    public function performActionAs(UserInterface $user, callable $action)
    {
        $previousToken = $this->getToken();
        $this->logUserIn($user);
        $action();

        if (null !== $previousToken) {
            $this->restorePreviousSessionToken($previousToken);

            return;
        }

        $this->logOut();
    }

    /**
     * @param UserInterface $user
     */
    private function logUserIn(UserInterface $user)
    {
        $token = new UsernamePasswordToken($user, $user->getPassword(), 'randomstringbutnotnull', $user->getRoles());
        $serializedToken = serialize($token);

        $this->setSerializedToken($serializedToken);

        $this->cookieSetter->setCookie($this->session->getName(), $this->session->getId());
    }

    /**
     * @param string $token
     */
    private function restorePreviousSessionToken($token)
    {
        $this->setSerializedToken($token);

        $this->cookieSetter->setCookie($this->session->getName(), $this->session->getId());
    }

    /**
     * @param string $token
     */
    private function setSerializedToken($token)
    {
        $this->session->set($this->sessionTokenVariable, $token);
        $this->session->save();
    }

    /**
     * @return string
     */
    private function getToken()
    {
        return $this->session->get($this->sessionTokenVariable);
    }
}


text:
<?php

namespace Plancke\HypixelPHP\exceptions;

/**
 * Class ExceptionCodes
 * @package Plancke\HypixelPHP\exceptions
 */
class ExceptionCodes {

    const NO_KEY = 1;
    const INVALID_KEY = 2;
    const INVALID_HYPIXEL_OBJECT = 3;
    const INVALID_UUID = 4;
    const NO_PAIRS = 5;
    const INVALID_ADAPTER_KEY = 6;
    const INVALID_ARGUMENT = 7;
    const BAD_RESPONSE_CODE = 8;
    const FILE_GET_CONTENTS = 9;
    const CURL = 10;

}


text:
  1. Run: npm install --save-dev
  2. Run: gulp

#### After that a tab will pop up in your default browser, you'll find what to do next in there. Good luck & Enjoy!