text:
package maildir

import (
	"bufio"
	"bytes"
	"crypto/rand"
	"encoding/hex"
	"fmt"
	"io"
	"net/mail"
	"net/textproto"
	"os"
	"path/filepath"
	"sort"
	"strconv"
	"strings"
	"sync/atomic"
	"time"
)

// The Separator separates a messages unique key from its flags in the filename.
// This should only be changed on operating systems where the colon isn't
// allowed in filenames.
var Separator rune = ':'

var id int64 = 10000

// CreateMode holds the permissions used when creating a directory.
const CreateMode = 0700

// A KeyError occurs when a key matches more or less than one message.
type KeyError struct {
	Key string // the (invalid) key
	N   int    // number of matches (!= 1)
}

func (e *KeyError) Error() string {
	return "maildir: key " + e.Key + " matches " + strconv.Itoa(e.N) + " files."
}

// A FlagError occurs when a non-standard info section is encountered.
type FlagError struct {
	Info         string // the encountered info section
	Experimental bool   // info section starts with 1
}

func (e *FlagError) Error() string {
	if e.Experimental {
		return "maildir: experimental info section encountered: " + e.Info[2:]
	}
	return "maildir: bad info section encountered: " + e.Info
}

// A Dir represents a single directory in a Maildir mailbox.
type Dir string

// Unseen moves messages from new to cur and returns their keys.
// This means the messages are now known to the application. To find out whether
// a user has seen a message, use Flags().
func (d Dir) Unseen() ([]string, error) {
	f, err := os.Open(filepath.Join(string(d), "new"))
	if err != nil {
		return nil, err
	}
	defer f.Close()
	names, err := f.Readdirnames(0)
	if err != nil {
		return nil, err
	}
	var keys []string
	for _, n := range names {
		if n[0] != '.' {
			split := strings.FieldsFunc(n, func(r rune) bool {
				return r == Separator
			})
			key := split[0]
			info := "2,"
			// Messages in new shouldn't have an info section but
			// we act as if, in case some other program didn't
			// follow the spec.
			if len(split) > 1 {
				info = split[1]
			}
			keys = append(keys, key)
			err = os.Rename(filepath.Join(string(d), "new", n),
				filepath.Join(string(d), "cur", key+string(Separator)+info))
		}
	}
	return keys, err
}

// UnseenCount returns the number of messages in new without looking at them.
func (d Dir) UnseenCount() (int, error) {
	f, err := os.Open(filepath.Join(string(d), "new"))
	if err != nil {
		return 0, err
	}
	defer f.Close()
	names, err := f.Readdirnames(0)
	if err != nil {
		return 0, err
	}
	c := 0
	for _, n := range names {
		if n[0] != '.' {
			c += 1
		}
	}
	return c, nil
}

// Keys returns a slice of valid keys to access messages by. This only returns
// keys for messages in cur. Use Unseen to access messages in new. All keys,
// whether returned here or by Unseen, point to messages in cur.
func (d Dir) Keys() ([]string, error) {
	f, err := os.Open(filepath.Join(string(d), "cur"))
	if err != nil {
		return nil, err
	}
	defer f.Close()
	names, err := f.Readdirnames(0)
	if err != nil {
		return nil, err
	}
	var keys []string
	for _, n := range names {
		if n[0] != '.' {
			split := strings.FieldsFunc(n, func(r rune) bool {
				return r == Separator
			})
			keys = append(keys, split[0])
		}
	}
	return keys, nil
}

func fileExists(filename string) bool {
	finfo, err := os.Stat(filename)
	return err == nil && finfo.Mode().IsRegular()
}

var suffices []string = []string{
	"",
	"S",
	"D",
	"F",
	"P",
	"R",
	"T",
	"DF",
	"DP",
	"DR",
	"DS",
	"DT",
	"FP",
	"FR",
	"FS",
	"FT",
	"PR",
	"PS",
	"PT",
	"RS",
	"RT",
	"ST",
	"DFP",
	"DFR",
	"DFS",
	"DFT",
	"DPR",
	"DPS",
	"DPT",
	"DRS",
	"DRT",
	"DST",
	"FPR",
	"FPS",
	"FPT",
	"FRS",
	"FRT",
	"FST",
	"PRS",
	"PRT",
	"PST",
	"RST",
	"DFPR",
	"DFPS",
	"DFPT",
	"DFRS",
	"DFRT",
	"DFST",
	"DPRS",
	"DPRT",
	"DPST",
	"DRST",
	"FPRS",
	"FPRT",
	"FPST",
	"FRST",
	"PRST",
	"DFPRS",
	"DFPRT",
	"DFPST",
	"DFRST",
	"DPRST",
	"FPRST",
	"DFPRST"}

// quick check for existance of legal (per DJB) file names for a key
func (d Dir) quickFilename(key string) string {
	// "cur" files must have :info suffix
	filePrefix := filepath.Join(string(d), "cur", key+string(Separator)+"2,")
	for _, suffix := range suffices {
		if filename := filePrefix + suffix; fileExists(filename) {
			return filename
		}
	}
	return ""
}

// Filename returns the path to the file corresponding to the key.
func (d Dir) Filename(key string) (string, error) {
	if matchedFile := d.quickFilename(key); matchedFile != "" {
		return matchedFile, nil
	}
	dirPath := filepath.Join(string(d), "cur")
	f, err := os.Open(dirPath)
	if err != nil {
		return "", err
	}
	defer f.Close()
	names, err := f.Readdirnames(-1)
	if err != nil {
		return "", err
	}
	for _, name := range names {
		if strings.HasPrefix(name, key) {
			return filepath.Join(dirPath, name), nil
		}
	}
	return "", &KeyError{key, 0}
}

// Header returns the corresponding mail header to a key.
func (d Dir) Header(key string) (header mail.Header, err error) {
	filename, err := d.Filename(key)
	if err != nil {
		return
	}
	file, err := os.Open(filename)
	if err != nil {
		return
	}
	defer file.Close()
	tp := textproto.NewReader(bufio.NewReader(file))
	hdr, err := tp.ReadMIMEHeader()
	if err != nil {
		return
	}
	header = mail.Header(hdr)
	return
}

// Message returns a Message by key.
func (d Dir) Message(key string) (*mail.Message, error) {
	filename, err := d.Filename(key)
	if err != nil {
		return &mail.Message{}, err
	}
	r, err := os.Open(filename)
	if err != nil {
		return &mail.Message{}, err
	}
	defer r.Close()
	buf := new(bytes.Buffer)
	_, err = io.Copy(buf, r)
	if err != nil {
		return &mail.Message{}, err
	}
	msg, err := mail.ReadMessage(buf)
	if err != nil {
		return msg, err
	}
	return msg, nil
}

type runeSlice []rune

func (s runeSlice) Len() int           { return len(s) }
func (s runeSlice) Swap(i, j int)      { s[i], s[j] = s[j], s[i] }
func (s runeSlice) Less(i, j int) bool { return s[i] < s[j] }

// Flags returns the flags for a message sorted in ascending order.
// See the documentation of SetFlags for details.
func (d Dir) Flags(key string) (string, error) {
	filename, err := d.Filename(key)
	if err != nil {
		return "", err
	}
	split := strings.FieldsFunc(filename, func(r rune) bool {
		return r == Separator
	})
	switch {
	case len(split[1]) < 2,
		split[1][1] != ',':
		return "", &FlagError{split[1], false}
	case split[1][0] == '1':
		return "", &FlagError{split[1], true}
	case split[1][0] != '2':
		return "", &FlagError{split[1], false}
	}
	rs := runeSlice(split[1][2:])
	sort.Sort(rs)
	return string(rs), nil
}

// SetFlags appends an info section to the filename according to the given flags.
// This function removes duplicates and sorts the flags, but doesn't check
// whether they conform with the Maildir specification.
//
// The following flags are listed in the specification
// (http://cr.yp.to/proto/maildir.html):
//
//	Flag "P" (passed): the user has resent/forwarded/bounced this message to someone else.
//	Flag "R" (replied): the user has replied to this message.
//	Flag "S" (seen): the user has viewed this message, though perhaps he didn't read all the way through it.
//	Flag "T" (trashed): the user has moved this message to the trash; the trash will be emptied by a later user action.
//	Flag "D" (draft): the user considers this message a draft; toggled at user discretion.
//	Flag "F" (flagged): user-defined flag; toggled at user discretion.
//
// Using only these standard flags will improve message retrieval speed.
func (d Dir) SetFlags(key string, flags string) error {
	info := "2,"
	rs := runeSlice(flags)
	sort.Sort(rs)
	for _, r := range rs {
		if []rune(info)[len(info)-1] != r {
			info += string(r)
		}
	}
	return d.SetInfo(key, info)
}

// Set the info part of the filename.
// Only use this if you plan on using a non-standard info part.
func (d Dir) SetInfo(key, info string) error {
	filename, err := d.Filename(key)
	if err != nil {
		return err
	}
	err = os.Rename(filename, filepath.Join(string(d), "cur", key+
		string(Separator)+info))
	return err
}

// Key exposes the internal unique key generation. This function is deprecated.
func Key() (string, error) {
	fmt.Println("maildir: Key() is deprecated without replacement. See https://github.com/luksen/maildir/issues/5 for details.")
	return generateKey()
}

// generateKey generates a new unique key as described in the Maildir
// specification.  For the third part of the key (delivery identifier) it uses
// an internal counter, the process id and a cryptographical random number to
// ensure uniqueness among messages delivered in the same second.
func generateKey() (string, error) {
	var key string
	key += strconv.FormatInt(time.Now().Unix(), 10)
	key += "."
	host, err := os.Hostname()
	if err != err {
		return "", err
	}
	host = strings.Replace(host, "/", "\057", -1)
	host = strings.Replace(host, string(Separator), "\072", -1)
	key += host
	key += "."
	key += strconv.FormatInt(int64(os.Getpid()), 10)
	key += strconv.FormatInt(id, 10)
	atomic.AddInt64(&id, 1)
	bs := make([]byte, 10)
	_, err = io.ReadFull(rand.Reader, bs)
	if err != nil {
		return "", err
	}
	key += hex.EncodeToString(bs)
	return key, nil
}

// Create creates the directory structure for a Maildir.
// If the main directory already exists, it tries to create the subdirectories
// in there. If an error occurs while creating one of the subdirectories, this
// function may leave a partially created directory structure.
func (d Dir) Create() error {
	err := os.Mkdir(string(d), os.ModeDir|CreateMode)
	if err != nil && !os.IsExist(err) {
		return err
	}
	err = os.Mkdir(filepath.Join(string(d), "tmp"), os.ModeDir|CreateMode)
	if err != nil && !os.IsExist(err) {
		return err
	}
	err = os.Mkdir(filepath.Join(string(d), "new"), os.ModeDir|CreateMode)
	if err != nil && !os.IsExist(err) {
		return err
	}
	err = os.Mkdir(filepath.Join(string(d), "cur"), os.ModeDir|CreateMode)
	if err != nil && !os.IsExist(err) {
		return err
	}
	return nil
}

// Delivery represents an ongoing message delivery to the mailbox.
// It implements the WriteCloser interface. On closing the underlying file is
// moved/relinked to new.
type Delivery struct {
	file *os.File
	d    Dir
	key  string
}

// NewDelivery creates a new Delivery.
func (d Dir) NewDelivery() (*Delivery, error) {
	key, err := generateKey()
	if err != nil {
		return nil, err
	}
	del := &Delivery{}
	time.AfterFunc(24*time.Hour, func() { del.Abort() })
	file, err := os.Create(filepath.Join(string(d), "tmp", key))
	if err != nil {
		return nil, err
	}
	del.file = file
	del.d = d
	del.key = key
	return del, nil
}

func (d *Delivery) Write(p []byte) (int, error) {
	return d.file.Write(p)
}

// Close closes the underlying file and moves it to new.
func (d *Delivery) Close() error {
	err := d.file.Close()
	if err != nil {
		return err
	}
	err = os.Link(filepath.Join(string(d.d), "tmp", d.key),
		filepath.Join(string(d.d), "new", d.key))
	if err != nil {
		return err
	}
	err = os.Remove(filepath.Join(string(d.d), "tmp", d.key))
	if err != nil {
		return err
	}
	return nil
}

// Abort closes the underlying file and removes it completely.
func (d *Delivery) Abort() error {
	err := d.file.Close()
	if err != nil {
		return err
	}
	err = os.Remove(filepath.Join(string(d.d), "tmp", d.key))
	if err != nil {
		return err
	}
	return nil
}

// Move moves a message from this Maildir to another.
func (d Dir) Move(target Dir, key string) error {
	path, err := d.Filename(key)
	if err != nil {
		return err
	}
	return os.Rename(path, filepath.Join(string(target), "cur", filepath.Base(path)))
}

// Purge removes the actual file behind this message.
func (d Dir) Purge(key string) error {
	f, err := d.Filename(key)
	if err != nil {
		return err
	}
	return os.Remove(f)
}

// Clean removes old files from tmp and should be run periodically.
// This does not use access time but modification time for portability reasons.
func (d Dir) Clean() error {
	f, err := os.Open(filepath.Join(string(d), "tmp"))
	if err != nil {
		return err
	}
	defer f.Close()
	names, err := f.Readdirnames(0)
	if err != nil {
		return err
	}
	now := time.Now()
	for _, n := range names {
		fi, err := os.Stat(filepath.Join(string(d), "tmp", n))
		if err != nil {
			continue
		}
		if now.Sub(fi.ModTime()).Hours() > 36 {
			err = os.Remove(filepath.Join(string(d), "tmp", n))
			if err != nil {
				return err
			}
		}
	}
	return nil
}


text:
layout: leetcode
date: 2016-07-11
title: Populating Next Right Pointers in Each Node II
tags: [Tree, Depth First Search]
---

* Contents
{:toc #toc_of_keans_blog}

## Question

> Follow up for problem "Populating Next Right Pointers in Each Node".
>
>What if the given tree could be any binary tree? Would your previous solution still work?
>
>**Note:**
>
>You may only use constant extra space.
>For example,
>Given the following binary tree,
>
>              1
>            /  \
>           2    3
>          / \    \
>         4   5    7
>
> After calling your function, the tree should look like:
>
>              1 -> NULL
>            /  \
>           2 -> 3 -> NULL
>          / \    \
>         4-> 5 -> 7 -> NULL
>
>

***

## Solution

**Result:** Accepted **Time:** 8 ms

Here should be some explanations.

```c
struct TreeLinkNode * stck[1024];
void dfs(struct TreeLinkNode * root ,int depth)
{
    if(root == NULL) return ;
    root->next = NULL;
    if(stck[depth])
        stck[depth]->next = root;
    stck[depth] = root;
    dfs(root->left,depth + 1);
    dfs(root->right,depth + 1);
}
void connect(struct TreeLinkNode *root) {
    memset(stck,0,sizeof(stck));
    dfs(root,0);
}
```

**Complexity Analytics**

- Time Complexity: $$O(n)$$
- Space Complexity: $$O(1)$$

redpajama_set_name: RedPajamaGithub


text:
/**
 * Name: Simplify Path
 * Number: 71
 * Tag: Stack
 * Main Points:
   path -> split by "/" -> string[] parts
   for each p in parts
   if p != . && p!= .., push p into stack
   if p == . continue
   if p == .. stack.pop()
 * Time Complexity: O(path.length)
 * Space Complexity: O(path.length)
**/
class Solution {
    public String simplifyPath(String path) {
        if (path == null || path.length() == 0) return "";

        Deque<String> stack = new LinkedList<>();
        String[] parts = path.split("/");
        for (String p : parts) {
            if (p.equals(".")) {
                continue;
            } else if (p.equals("..")) {
                if (!stack.isEmpty()) {
                    stack.pop();
                }
            } else if (!p.equals("")) {
                stack.push(p);
            }
        }

        if (stack.isEmpty()) return "/";
        StringBuilder sb = new StringBuilder();
        while (!stack.isEmpty()) {
            sb.append("/").append(stack.pollLast());
        }
        return sb.toString();
    }
}


text:
class Motor
	#¿mixins?

	#atributos; exponen el estado del objeto (guardado en las variables de instancia) al exterior
	attr_accessor :base_resultado, :laboratorio_escaneados, :stock_escaneados, :no_encontrados
	attr_reader :diferencias, :no_escaneados

	#metodo constructor de la clase
	def initialize() #recibe como parametro el input ingresado por el usuario (tipo String)
		@base_resultado = Hash.new
		@laboratorio_escaneados = Hash.new #hash que almacena los codigos de barras de TODOS los productos del laboratorio ingresado como 'key', y un arreglo como 'value' con el nombre del producto en 0 y el stock en 1
		@stock_escaneados = Hash.new(0) #hash que almacena los codigos de barras escaneados (sin repeticiones) como 'key', y la cantidad de veces que se repite cada uno (stock) como 'value'
		@no_encontrados = Hash.new #hash que almacena codigos de barra como 'key', y un arreglo con un String predefinido y el stock real del producto como 'value'
		@diferencias = Hash.new #hash que almacena codigos de barra como 'key', y un arreglo con el nombre del producto y la diferencia entre stock real y stock teorico como 'value'
		@no_escaneados = Hash.new #hash que almacena codigos de barra como 'key', y un arreglo con el nombre del producto y el stock teorico que figura en la base de datos como 'value'
	end

	#para cada producto escaneado, verifica si el mismo pertenece al laboratorio ingresado, y si la diferencia entre stock real y stock teorico es distinta de 0
	def calcular_diferencias
		@laboratorio_escaneados.each do |lab, productos|
			productos.each do |prod|
				if prod.stock - @stock_escaneados[prod.codigo] != 0
					@diferencias[prod.codigo] = [prod.nombre, @stock_escaneados[prod.codigo] - prod.stock]
				end
			end
		end
	end

	#
	#def calcular_no_encontrados
	#	@laboratorio_escaneados.each do |lab, productos|
	#		productos.each do |prod|
	#			if !@base_resultado[lab].include?(prod)
	#				@no_encontrados[prod.codigo] = ["(NOMBRE DESCONOCIDO)", @stock_escaneados[prod.codigo]]
	#			end
	#		end
	#	end
	#end

	#para cada producto del laboratorio ingresado, verifica si el mismo NO fue escaneado, y si su stock teorico es distinto de 0
	def calcular_no_escaneados
		@base_resultado.each do |lab, productos|
			if @laboratorio_escaneados.member?(lab)
				productos.each do |prod|
					if !@stock_escaneados.member?(prod.codigo) && prod.stock != 0
						@no_escaneados[prod.codigo] = [prod.nombre, prod.stock]
					end
				end
			end
		end
	end
end


text:
package com.google.cloud.demo.iot.nirvana.frontend.datastore.entity;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

import com.google.cloud.demo.iot.nirvana.common.City;
import com.google.cloud.demo.iot.nirvana.frontend.datastore.CityEntity;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

/** Unit tests for {@link CityEntity}. */
@RunWith(JUnit4.class)
public final class CityEntityTest {

  @Test
  public void constructor_resultOk() throws Exception {
    CityEntity cityEntity = new CityEntity(
        "8762723AE028CAA144CBF8B7069003C3",
        City.newBuilder()
            .setCity("Paris")
            .setLat(41.3275459)
            .setLng(19.81869819999997)
            .setAvgTemperature(31.0)
            .build());
    assertEquals(cityEntity.getId(), "8762723AE028CAA144CBF8B7069003C3");
    assertEquals(cityEntity.getName(), "Paris");
    assertTrue(cityEntity.getLat() == 41.3275459);
    assertTrue(cityEntity.getLng() == 19.81869819999997);
    assertTrue(cityEntity.getAvgTemperature() == 31.0);
  }
}


text:
require File.expand_path('../app_settings', __FILE__)
include AppSettings
app_config = AppSettings.load_app_settings

# set the defaults
# Rails was complaining about all the changes being made to a "constant"
app_config = {
  :recent_activity_on_login => true,
  :top_level_container_name => 'investigation',
  :host => nil
}.merge(app_config)

site_url = URI.parse(app_config[:site_url])
app_config[:protocol] = site_url.scheme
app_config[:host] = site_url.to_s.gsub("http://","").gsub("https://","")

USING_RITES = app_config[:theme] && (app_config[:theme] == 'default' || app_config[:theme] == 'rites')
NOT_USING_RITES = !USING_RITES

APP_CONFIG = app_config # It's constant now

TOP_LEVEL_CONTAINER_NAME = APP_CONFIG[:top_level_container_name]

TOP_LEVEL_CONTAINER_SYM         = TOP_LEVEL_CONTAINER_NAME.to_sym

TOP_LEVEL_CONTAINER_NAME_PLURAL = TOP_LEVEL_CONTAINER_NAME.pluralize

TOP_LEVEL_CONTAINER_SYM_PLURAL  = TOP_LEVEL_CONTAINER_NAME_PLURAL.to_sym


text:
package org.smoothbuild.compile.ps.ast;

import org.smoothbuild.compile.lang.base.Loc;
import org.smoothbuild.compile.lang.base.NalImpl;
import org.smoothbuild.compile.ps.ast.expr.StringP;

import com.google.common.base.Objects;

/**
 * Annotation.
 */
public final class AnnP extends NalImpl {
  private final StringP path;

  public AnnP(String name, StringP path, Loc loc) {
    super(name, loc);
    this.path = path;
  }

  public StringP path() {
    return path;
  }

  @Override
  public boolean equals(Object object) {
    return object instanceof AnnP that
        && this.name().equals(that.name())
        && this.path().equals(that.path())
        && this.loc().equals(that.loc());
  }

  @Override
  public int hashCode() {
    return Objects.hashCode(this.name(), this.path, this.loc());
  }
}


text:
title: Can I Buy Balsamiq Wireframes for Google Drive for my Company or Someone Else?
date: '2015-05-09T14:46:35.000+00:00'
weight: 620
menu:
  menusales:
    weight: 620
draft: ''

---

Yes! With the latest version of Balsamiq Wireframes for Google Drive, you have the ability to purchase a subscription for multiple people (we call these _Editors_).

After subscribing to the desired plan, there will be a section called **Balsamiq Wireframes Editors** on your billing page. That's where you will be able to add the Google email addresses of the people you wish to pay for. By adding them to your subscription, you are providing them with the ability to create and edit wireframes with the Balsamiq Wireframes for Google Drive plugin.

More details here: [Choosing and Managing a Team Plan](/sales/gdrivesubscription/#choosing-and-managing-a-team-plan)


text:
This codelab will teach you how to use the Web Animations API to enhance a popup containing icons, with an effect inspired by Android's homescreen folders.
You'll use animations, groups and learn about playback rate.

The final version will run on both desktop and mobile, in all modern browsers. Check out this preview-

![Preview](resources/preview.gif)

## Introduction

Before we start, let's perform some introduction steps.

### Get the sample site

You'll need to get a copy of the source code - for more information, head to [the GitHub repository](https://github.com/web-animations/web-animations-codelabs). In this codelab, we'll just use the `iconpopups` folder.

### Open the sample site

Take a look at the popup we're going to enhance, by opening the `iconpopups/start/index.html` file. This just has a few icons, each of which can be clicked to open a folder of further icons. This happens instantaneously, without any effect &emdash; this is most unexciting!

Our base site also has some boilerplate CSS and JavaScript to get us started. If you're curious about this boilerplate code, it lives in the `iconpopups/shared` folder. In this codelab, we won't modify it at all.

### (optional) Open the final site

If you'd like to open the final version of the site to see what you'll be building, you can find the code in the `iconpopups/final` folder. It contains the entire codelab's work.

## Next Step

**Next, let's head on over to [Step 1: Include Web Animations »](step1.md)**


text:
<?php

include_once '../library/cvp.php';
$cvp = new cvp;

if ( $cvp->getUrlVar('remote') === NULL ){
?>
<!DOCTYPE HTML>

</style>

    <iframe id="site" src="<?php echo $cvp->delUrlVar( 'url' , $cvp->getUrl() ) . 'remote=' . $cvp->getUrlVar('url') ;?>" width="100%" frameborder="0">

        URL: <a target="_blank" href="<?php echo $cvp->getUrlVar('url'); ?>"><?php echo $cvp->getUrlVar('url'); ?>

<?php
} else {
    echo $cvp->getRemoteContent( $cvp->getUrlVar('remote') );
}?>


text:
namespace Irony.Parsing
{
	/// <summary>
	/// Reduces list created by MakePlusRule or MakeListRule methods.
	/// </summary>
	public class ReduceListBuilderParserAction : ReduceParserAction
	{
		public ReduceListBuilderParserAction(Production production) : base(production)
		{ }

		protected override ParseTreeNode GetResultNode(ParsingContext context)
		{
			var childCount = Production.RValues.Count;
			var firstChildIndex = context.ParserStack.Count - childCount;

			// Get the list already created - it is the first child node
			var listNode = context.ParserStack[firstChildIndex];
			listNode.Span = context.ComputeStackRangeSpan(childCount);

			// Next list member is the last child - at the top of the stack
			var listMember = context.ParserStack.Top;
			if (listMember.IsPunctuationOrEmptyTransient())
				return listNode;

			listNode.ChildNodes.Add(listMember);

			return listNode;
		}
	}

	/// <summary>
	/// List container is an artificial non-terminal created by MakeStarRule method; the actual list is a direct child.
	/// </summary>
	public class ReduceListContainerParserAction : ReduceParserAction
	{
		public ReduceListContainerParserAction(Production production) : base(production)
		{ }

		protected override ParseTreeNode GetResultNode(ParsingContext context)
		{
			var childCount = this.Production.RValues.Count;
			var firstChildIndex = context.ParserStack.Count - childCount;
			var span = context.ComputeStackRangeSpan(childCount);
			var newNode = new ParseTreeNode(this.Production.LValue, span);

			// If it is not empty production - might happen for MakeStarRule
			if (childCount > 0)
			{
				// Get the transient list with all members - it is the first child node
				var listNode = context.ParserStack[firstChildIndex];

				// Copy all list members
				newNode.ChildNodes.AddRange(listNode.ChildNodes);
			}

			return newNode;
		}
	}

	/// <summary>
	/// Base class for more specific reduce actions.
	/// </summary>
	public partial class ReduceParserAction : ParserAction
	{
		public readonly Production Production;

		public ReduceParserAction(Production production)
		{
			this.Production = production;
		}

		/// <summary>
		/// Factory method for creating a proper type of reduce parser action.
		/// </summary>
		/// <param name="production">A Production to reduce.</param>
		/// <returns>Reduce action.</returns>
		public static ReduceParserAction Create(Production production)
		{
			var nonTerm = production.LValue;

			// List builder (non-empty production for list non-terminal) is a special case
			var isList = nonTerm.Flags.IsSet(TermFlags.IsList);
			var isListBuilderProduction = isList && production.RValues.Count > 0 && production.RValues[0] == production.LValue;

			if (isListBuilderProduction)
				return new ReduceListBuilderParserAction(production);
			else if (nonTerm.Flags.IsSet(TermFlags.IsListContainer))
				return new ReduceListContainerParserAction(production);
			else if (nonTerm.Flags.IsSet(TermFlags.IsTransient))
				return new ReduceTransientParserAction(production);
			else
				return new ReduceParserAction(production);
		}

		public override void Execute(ParsingContext context)
		{
			var savedParserInput = context.CurrentParserInput;
			context.CurrentParserInput = this.GetResultNode(context);
			this.CompleteReduce(context);
			context.CurrentParserInput = savedParserInput;
		}

		public override string ToString()
		{
			return string.Format(Resources.LabelActionReduce, this.Production.ToStringQuoted());
		}

		/// <summary>
		/// Completes reduce: pops child nodes from the stack and pushes result node into the stack
		/// </summary>
		/// <param name="context"></param>
		protected void CompleteReduce(ParsingContext context)
		{
			var resultNode = context.CurrentParserInput;
			var childCount = Production.RValues.Count;

			// Pop stack
			context.ParserStack.Pop(childCount);

			// Copy comment block from first child; if comments precede child node, they precede the parent as well.
			if (resultNode.ChildNodes.Count > 0)
				resultNode.Comments = resultNode.ChildNodes[0].Comments;

			// Inherit precedence and associativity, to cover a standard case: BinOp->+|-|*|/;
			// BinOp node should inherit precedence from underlying operator symbol.
			// TODO: this special case will be handled differently. A ToTerm method should be expanded to allow "combined" terms like "NOT LIKE".
			// OLD COMMENT: A special case is SQL operator "NOT LIKE" which consists of 2 tokens. We therefore inherit "max" precedence from any children
			if (this.Production.LValue.Flags.IsSet(TermFlags.InheritPrecedence))
				this.InheritPrecedence(resultNode);

			// Push new node into stack and move to new state
			// First read the state from top of the stack
			context.CurrentParserState = context.ParserStack.Top.State;
			if (context.TracingEnabled)
				context.AddTrace(Resources.MsgTracePoppedState, this.Production.LValue.Name);

			#region comments on special case

			// Special case: if a non-terminal is Transient (ex: BinOp), then result node is not this NonTerminal, but its its child (ex: symbol).
			// Shift action will invoke OnShifting on actual term being shifted (symbol); we need to invoke Shifting even on NonTerminal itself
			// - this would be more expected behavior in general. ImpliedPrecHint relies on this

			#endregion comments on special case

			// Special case
			if (resultNode.Term != this.Production.LValue)
				this.Production.LValue.OnShifting(context.SharedParsingEventArgs);

			// Shift to new state - execute shift over the non-terminal of the production.
			var shift = context.CurrentParserState.Actions[this.Production.LValue];

			// Execute shift to new state
			shift.Execute(context);

			// Invoke Reduce event
			this.Production.LValue.OnReduced(context, this.Production, resultNode);
		}

		protected virtual ParseTreeNode GetResultNode(ParsingContext context)
		{
			var childCount = Production.RValues.Count;
			var firstChildIndex = context.ParserStack.Count - childCount;
			var span = context.ComputeStackRangeSpan(childCount);
			var newNode = new ParseTreeNode(Production.LValue, span);

			for (int i = 0; i < childCount; i++)
			{
				var childNode = context.ParserStack[firstChildIndex + i];

				// Skip punctuation or empty transient nodes
				if (childNode.IsPunctuationOrEmptyTransient())
					continue;

				newNode.ChildNodes.Add(childNode);
			}

			return newNode;
		}

		/// <summary>
		/// This operation helps in situation when Bin expression is declared as BinExpr.Rule = expr + BinOp + expr;
		/// where BinOp is an OR-combination of operators.
		/// During parsing, when 'expr, BinOp, expr' is on the top of the stack,
		/// and incoming symbol is operator, we need to use precedence rule for deciding on the action.
		/// </summary>
		/// <param name="node"></param>
		private void InheritPrecedence(ParseTreeNode node)
		{
			for (int i = 0; i < node.ChildNodes.Count; i++)
			{
				var child = node.ChildNodes[i];
				if (child.Precedence == Terminal.NoPrecedence)
					continue;

				node.Precedence = child.Precedence;
				node.Associativity = child.Associativity;

				return;
			}
		}
	}

	/// <summary>
	/// Reduces non-terminal marked as Transient by MarkTransient method.
	/// </summary>
	public class ReduceTransientParserAction : ReduceParserAction
	{
		public ReduceTransientParserAction(Production production) : base(production)
		{ }

		protected override ParseTreeNode GetResultNode(ParsingContext context)
		{
			var topIndex = context.ParserStack.Count - 1;
			var childCount = Production.RValues.Count;
			for (int i = 0; i < childCount; i++)
			{
				var child = context.ParserStack[topIndex - i];
				if (child.IsPunctuationOrEmptyTransient())
					continue;

				return child;
			}

			// Otherwise return an empty transient node;
			// if it is part of the list, the list will skip it
			var span = context.ComputeStackRangeSpan(childCount);
			return new ParseTreeNode(Production.LValue, span);
		}
	}
}


text:
using System;
using System.Collections.Generic;
using System.Text;
using Cosmos.Logging.Core;
using Cosmos.Logging.Events;
using Cosmos.Logging.Formattings;

namespace Cosmos.Logging.Sinks.File.Renderers {
    /// <summary>
    /// Interface for output preferences renderer
    /// </summary>
    public interface IOutputPreferencesRenderer {

        /// <summary>
        /// Gets name
        /// </summary>
        string Name { get; }

        /// <summary>
        /// Gets is null or not.
        /// </summary>
        bool IsNull { get; }

        /// <summary>
        /// To string
        /// </summary>
        /// <param name="format"></param>
        /// <param name="paramsText"></param>
        /// <param name="logEvent"></param>
        /// <param name="targetMessageBuilder"></param>
        /// <param name="formatProvider"></param>
        /// <returns></returns>
        string ToString(string format, string paramsText,
            LogEvent logEvent, StringBuilder targetMessageBuilder, IFormatProvider formatProvider = null);

        /// <summary>
        /// To string
        /// </summary>
        /// <param name="formattingEvents"></param>
        /// <param name="paramsText"></param>
        /// <param name="logEvent"></param>
        /// <param name="targetMessageBuilder"></param>
        /// <param name="formatProvider"></param>
        /// <returns></returns>
        string ToString(IList<FormatEvent> formattingEvents, string paramsText,
            LogEvent logEvent, StringBuilder targetMessageBuilder, IFormatProvider formatProvider = null);

        /// <summary>
        /// To string
        /// </summary>
        /// <param name="formattingFuncs"></param>
        /// <param name="paramsText"></param>
        /// <param name="logEvent"></param>
        /// <param name="targetMessageBuilder"></param>
        /// <param name="formatProvider"></param>
        /// <returns></returns>
        string ToString(IList<Func<object, IFormatProvider, object>> formattingFuncs, string paramsText,
            LogEvent logEvent, StringBuilder targetMessageBuilder, IFormatProvider formatProvider = null);

        /// <summary>
        /// Render
        /// </summary>
        /// <param name="format"></param>
        /// <param name="paramsText"></param>
        /// <param name="stringBuilder"></param>
        /// <param name="logEvent"></param>
        /// <param name="targetMessageBuilder"></param>
        /// <param name="formatProvider"></param>
        void Render(string format, string paramsText, StringBuilder stringBuilder,
            LogEvent logEvent, StringBuilder targetMessageBuilder, IFormatProvider formatProvider = null);

        /// <summary>
        /// Render
        /// </summary>
        /// <param name="formattingEvents"></param>
        /// <param name="paramsText"></param>
        /// <param name="stringBuilder"></param>
        /// <param name="logEvent"></param>
        /// <param name="targetMessageBuilder"></param>
        /// <param name="formatProvider"></param>
        void Render(IList<FormatEvent> formattingEvents, string paramsText, StringBuilder stringBuilder,
            LogEvent logEvent, StringBuilder targetMessageBuilder, IFormatProvider formatProvider = null);

        /// <summary>
        /// Render
        /// </summary>
        /// <param name="formattingFuncs"></param>
        /// <param name="paramsText"></param>
        /// <param name="stringBuilder"></param>
        /// <param name="logEvent"></param>
        /// <param name="targetMessageBuilder"></param>
        /// <param name="formatProvider"></param>
        void Render(IList<Func<object, IFormatProvider, object>> formattingFuncs, string paramsText, StringBuilder stringBuilder,
            LogEvent logEvent, StringBuilder targetMessageBuilder, IFormatProvider formatProvider = null);
    }
}


text:
package com.intellij.codeInsight.editorActions;

import com.intellij.application.options.CodeStyle;
import com.intellij.codeInsight.template.impl.editorActions.TypedActionHandlerBase;
import com.intellij.lang.Language;
import com.intellij.lang.java.JavaLanguage;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.actionSystem.DataContext;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.editor.EditorModificationUtil;
import com.intellij.openapi.editor.actionSystem.TypedActionHandler;
import com.intellij.openapi.editor.ex.EditorEx;
import com.intellij.openapi.editor.highlighter.HighlighterIterator;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.registry.Registry;
import com.intellij.psi.JavaTokenType;
import com.intellij.psi.PsiDocumentManager;
import com.intellij.psi.PsiFile;
import com.intellij.psi.TokenType;
import com.intellij.psi.codeStyle.CodeStyleSettings;
import com.intellij.psi.codeStyle.CommonCodeStyleSettings;
import com.intellij.psi.tree.IElementType;
import com.intellij.psi.util.PsiUtilBase;
import com.intellij.util.containers.ContainerUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.TestOnly;

import java.util.List;

public class AutoFormatTypedHandler extends TypedActionHandlerBase {
  private static boolean myIsEnabledInTests;

  private static final char[] NO_SPACE_AFTER = {
    '+', '-', '*', '/', '%', '&', '^', '|', '<', '>', '!', '=', ' '
  };

  private static final List<IElementType> COMPLEX_ASSIGNMENTS = ContainerUtil.newArrayList(
    JavaTokenType.PLUSEQ, JavaTokenType.MINUSEQ,
    JavaTokenType.ASTERISKEQ, JavaTokenType.DIVEQ,
    JavaTokenType.PERCEQ,
    JavaTokenType.ANDEQ, JavaTokenType.XOREQ, JavaTokenType.OREQ,
    JavaTokenType.LTLTEQ, JavaTokenType.GTGTEQ
  );

  public AutoFormatTypedHandler(@Nullable TypedActionHandler originalHandler) {
    super(originalHandler);
  }

  private static boolean isEnabled(Editor editor) {
    boolean isEnabled = myIsEnabledInTests && ApplicationManager.getApplication().isUnitTestMode()
                        || Registry.is("editor.reformat.on.typing");

    if (!isEnabled) {
      return false;
    }

    Project project = editor.getProject();
    Language language = null;
    if (project != null) {
      PsiFile file = PsiDocumentManager.getInstance(project).getPsiFile(editor.getDocument());
      if (file != null) {
        language = file.getLanguage();
      }
    }

    return language == JavaLanguage.INSTANCE;
  }

  @TestOnly
  public static void setEnabledInTests(boolean value) {
    myIsEnabledInTests = value;
  }

  @Override
  public void execute(@NotNull Editor editor, char charTyped, @NotNull DataContext dataContext) {
    if (!isEnabled(editor)) {
      executeOriginalHandler(editor, charTyped, dataContext);
      return;
    }

    if (isInsertSpaceAtCaret(editor, charTyped, dataContext)) {
      EditorModificationUtil.insertStringAtCaret(editor, " ");
    }

    executeOriginalHandler(editor, charTyped, dataContext);
  }

  private static boolean isInsertSpaceAtCaret(@NotNull Editor editor, char charTyped, @NotNull DataContext dataContext) {
    if (!isSpaceAroundAssignment(editor, dataContext)) {
      return false;
    }

    int caretOffset = editor.getCaretModel().getOffset();
    CharSequence text = editor.getDocument().getImmutableCharSequence();

    HighlighterIterator lexerIterator = createLexerIterator(editor, caretOffset);
    if (lexerIterator == null || lexerIterator.getTokenType() == JavaTokenType.STRING_LITERAL) {
      return false;
    }

    boolean insertBeforeEq = charTyped == '=' && isInsertSpaceBeforeEq(caretOffset, text);
    boolean insertAfterEq = caretOffset > 0 && caretOffset - 1 < text.length() && text.charAt(caretOffset - 1) == '='
                            && isAssignmentOperator(lexerIterator) && isInsertSpaceAfterEq(charTyped);

    return (insertBeforeEq || insertAfterEq);
  }

  private static boolean isAssignmentOperator(HighlighterIterator iterator) {
    IElementType type = iterator.getTokenType();
    if (type == TokenType.WHITE_SPACE) {
      iterator.retreat();
      type = iterator.getTokenType();
    }

    if (COMPLEX_ASSIGNMENTS.indexOf(type) >= 0) {
      return true;
    }

    if (type == JavaTokenType.EQ) {
      iterator.retreat();
      type = iterator.getTokenType();
      if (type == JavaTokenType.GT) {
        iterator.retreat();
        type = iterator.getTokenType();
        if (type == JavaTokenType.GT) {
          return true;
        }
      }

      else if (type == TokenType.WHITE_SPACE || type == JavaTokenType.IDENTIFIER) {
        return true;
      }
    }

    return false;
  }

  private static boolean isInsertSpaceAfterEq(char charTyped) {
    return charTyped != '=' && charTyped != ' ';
  }

  private static HighlighterIterator createLexerIterator(Editor editor, int offset) {
    if (editor.getDocument().getTextLength() == 0) return null;
    return editor instanceof EditorEx
           ? ((EditorEx)editor).getHighlighter().createIterator(offset)
           : null;
  }

  private void executeOriginalHandler(@NotNull Editor editor, char charTyped, @NotNull DataContext dataContext) {
    if (myOriginalHandler != null) myOriginalHandler.execute(editor, charTyped, dataContext);
  }

  private static boolean isInsertSpaceBeforeEq(int caretOffset, CharSequence text) {
    if (caretOffset == 0) return false;
    char charBefore = text.charAt(caretOffset - 1);

    for (char c : NO_SPACE_AFTER) {
      if (c == charBefore) {
        return false;
      }
    }

    return true;
  }

  private static boolean isSpaceAroundAssignment(Editor editor, DataContext dataContext) {
    final Project project = CommonDataKeys.PROJECT.getData(dataContext);
    PsiFile file = project == null ? null : PsiUtilBase.getPsiFileInEditor(editor, project);
    if (file != null) {
      Language language = file.getLanguage();
      CodeStyleSettings settings = CodeStyle.getSettings(editor);
      CommonCodeStyleSettings common = settings.getCommonSettings(language);
      return common.SPACE_AROUND_ASSIGNMENT_OPERATORS;
    }
    return false;
  }

}


text:
package in

import (
	"bufio"
	"compress/gzip"
	"io"
	"os"
	"os/exec"
	"path/filepath"

	"github.com/h2non/filetype"
)

const (
	mimeTypeZip  = "application/zip"
	mimeTypeTar  = "application/x-tar"
	mimeTypeGzip = "application/gzip"
)

func isSupportedMimeType(mimeType string) bool {
	return mimeType == mimeTypeZip ||
		mimeType == mimeTypeTar ||
		mimeType == mimeTypeGzip
}

func getMimeType(path string) (string, error) {
	f, err := os.Open(path)
	if err != nil {
		return "", err
	}
	defer f.Close()

	bs, err := bufio.NewReader(f).Peek(512)
	if err != nil && err != io.EOF {
		return "", err
	}

	kind, err := filetype.Match(bs)
	if err != nil {
		return "", err
	}

	return kind.MIME.Value, nil
}

func unpack(mimeType, sourcePath string) error {
	for mimeType == mimeTypeGzip {
		var err error
		sourcePath, err = unpackGzip(sourcePath)
		if err != nil {
			return err
		}

		mimeType, err = getMimeType(sourcePath)
		if err != nil {
			return err
		}
	}

	destinationDir := filepath.Dir(sourcePath)

	switch mimeType {
	case mimeTypeZip:
		return unpackZip(sourcePath, destinationDir)
	case mimeTypeTar:
		return unpackTar(sourcePath, destinationDir)
	}

	return nil
}

func unpackZip(sourcePath, destinationDir string) error {
	cmd := exec.Command("unzip", "-d", destinationDir, sourcePath)

	return cmd.Run()
}

func unpackGzip(sourcePath string) (string, error) {
	reader, err := os.Open(sourcePath)
	if err != nil {
		return "", err
	}
	defer reader.Close()

	archive, err := gzip.NewReader(reader)
	if err != nil {
		return "", err
	}
	defer archive.Close()

	var destinationPath string
	if archive.Name != "" {
		destinationPath = filepath.Join(filepath.Dir(sourcePath), archive.Name)
	} else {
		destinationPath = sourcePath + ".uncompressed"
	}

	writer, err := os.Create(destinationPath)
	if err != nil {
		return "", err
	}
	defer writer.Close()

	_, err = io.Copy(writer, archive)
	return destinationPath, err
}

func unpackTar(sourcePath, destinationDir string) error {
	cmd := exec.Command("tar", "xf", sourcePath, "-C", destinationDir)

	return cmd.Run()
}


text:
<?php
// eveg/AppBundle/Form/Type/FeedbackMapDepFrType.php

namespace eveg\AppBundle\Form\Type;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;

class FeedbackMapDepFrType extends AbstractType
{

	public function buildForm(FormBuilderInterface $builder, array $options)
	{

		$builder->add('about', 'hidden');
		$builder->add('email', EmailType::class);
		$builder->add('type', ChoiceType::class, array(
			'choices' => array(
				'other' => 'eveg.app.show_one.feedback.syntaxon.type.repartition'
			),
			'attr' => array(
				'class' => 'form-control'
			),
		));
		$builder->add('syntaxon', 'hidden');
		$builder->add('message', 'textarea', array(
			'attr' => array('rows' => 6, 'class' => 'form-control'),
		));
	}

	public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'eveg\AppBundle\Entity\Feedback',
            'cascade_validation' => true,
            'choice_translation_domain' => true,
        ));
    }

    public function getName()
    {
        return 'feedbackMapDepFr';
    }

}


text:
package es.upm.oeg.camel.euia.model;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

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

@EqualsAndHashCode
@ToString
public class Context {

    @Getter
    private List<Publication> publications = new ArrayList<Publication>();

    @Getter
    @Setter
    private Source source;

    public void add(Publication publication){
        publications.add(publication);
    }

}


text:
:orphan:

.. _reference:

Reference guides
================

.. toctree::
   :maxdepth: 1

   fixtures
   plugin_list
   customize
   reference
   exit-codes


text:
<?php
$lang = array(

'install_lock_warning' =>
'Waarschuwing: Uw installatie map is nog aanwezig op uw server',

'install_lock_removal' =>
'Verwijder de map uit veiligheidsoverwegingen van uw server d.m.v. een FTP programma.',

'checksum_changed_warning' =>
'Eén of meer bestanden zijn veranderd:',

'checksum_changed_accept' =>
'Wijzigingen Doorvoeren',

'checksum_email_subject' =>
'Een hoofdbestand is gewijzigd op uw website.',

'checksum_email_message' =>
'ExpressionEngine heeft een verandering aan een hoofdbestand gedeteceerd op: {url}  De volgende bestanden zijn gewijzigd: {changed}  Als u deze wijzigingen heeft gemaakt, accepteer deze dan op de homepage van het control panel.  Als u deze wijzigingen niet heeft doorgevoerd kan het zijn dat u gehackt bent. Controleer de bestanden op verdachte inhoud (JavaScript or iFrames) en neem contact op met ExpressionEngine support: http://expressionengine.com/forums/viewcategory/4/  Bekijk de support policy voordat u een post plaatst op het forum: http://expressionengine.com/support/policy/',

'new_version_notice' =>
'ExpressionEngine versie %s is nu beschikbaar. Download hier en volg de Versie Update Documentatie.',

'new_version_notice_high_priority' =>
'Veiligheids Update Release
 Een ExpressionEngine versie %s, build %s is uitgekomen als een veiligheids release.  De laatste versie is: %s, en de laatste build is: %s.

 Download alstublieft hier en volg de update documentatie om zeker te zijn dat u de meest recente versie draait.',

'new_version_error' =>
'Er is een onverwachte fout opgetreden bij het downloaden van het huidige ExpressionEngine versie nummer. Bezoek uw Download Account om de controleren of u over de recentste versie beschikt. Als deze fout blijft optreden, neem dan contact op met uw beheerder.',

'important_messages' =>
'Opmerking',

'cp_home' =>
'Mijn Homepage',

'current_user' =>
'Huidige Gebruiker',

'system_status' =>
'Systeem Status',

'offline' =>
'Offline',

'online' =>
'Online',

'member_search' =>
'Leden Zoeken',

'search_instructions' =>
'Voer een volledig of gedeeltelijk woord in',

'member_group' =>
'Leden Groep',

'search_by' =>
'Zoek Veld',

'screen_name' =>
'Schermnaam',

'email_address' =>
'E-mailadres',

'url' =>
'URL',

'site_statistics' =>
'Site Statistieken',

'value' =>
'Waarde',

'total_members' =>
'Totaal aantal Leden',

'total_validating_members' =>
'Leden wachtend op activatie',

'total_validating_comments' =>
'Reacties wachtend op activatie',

'total_entries' =>
'Totaal aantal Berichten',

'total_comments' =>
'Totaal Aantal Reacties',

'most_recent_entries' =>
'Meest Recente Bericht',

'most_recent_comments' =>
'Meest Recente Reactie',

'no_comments' =>
'Er zijn op dit moment geen reacties',

'no_entries' =>
'Er zijn op dit moment geen berichten',

'entry_title' =>
'Bericht Titel',

'comments' =>
'Reacties',

'no_channels_exist' =>
'Er zijn op dit moment geen Channels',

'no_templates_available' =>
'Geen Templates Beschikbaar. Create a Template Group',

'select_channel_to_post_in' =>
'Kies een Channel om in te plaatsen',

'recent_members' =>
'Meest Recente Nieuwe Leden',

'join_date' =>
'Inschrijfdatum',

'total_hits' =>
'Totaal aantal gecombineerde paginahits ',

'demo_expiration' =>
'Uw demoaccount zal verlopen over:',

'bulletin_board' =>
'Bulletin Bord',

'no_bulletins' =>
'Geen Bulletins',

'bulletin_sender' =>
'Bulletin Afzender',

'bulletin_date' =>
'Bulletin Datum',

'exact_match' =>
'Exacte Match',

'no_news' =>
'Geen Nieuws Beschikbaar',

'more_news' =>
'Meer Nieuws...',

'site_status' =>
'Site Status',

'close' =>
'Sluit',

'translate' =>
'Update',

''=>''
);

// End of File


text:
package conflicts;

import edu.cornell.lassp.houle.RngPack.RandomElement;

public class Population_BS extends Population {

	 /**
	 * @param dim the dimension of the decision space
	 * @param problem the problem which contains the fitness functions
	 */
	public Population_BS(int dim, Problem_BS problem) {
		super();

		this.ds_dim = dim;
		this.mu = (new Double(Math.pow(2,ds_dim))).intValue();
		this.problem = problem;

		/* Constructing all possible decision vectors */
		boolean[] vector = new boolean[dim];
		Individual_BS individuum;
		for (int i=0;i<mu;i++) {
			individuum = new Individual_BS(i, ds_dim, problem.getObjectiveSpaceDimension(), vector, problem.getFitness(vector));
			ind.add(i, individuum);
			vector = increase(vector);
		}
	}

	 /**
	  * manipulates the boolean vector a.
	  * Pre: a is the bit representation of the number n
	  * Post: a ist the bit representation of number n+1
	  *
	  * @param a a boolean vector
	  */
	 private boolean[] increase(boolean[] a) {
		 boolean[] b = new boolean[a.length];
		 for (int i=0;i<a.length;i++) {
			 b[i] = a[i];
		 }
		 int i = b.length-1;
		 while (i>=0) {
			 if (b[i]) {
				 b[i] = false;
			 } else {
				 b[i] = true;
				 break;
			 }
			 i--;
		 }
		 return b;
	 }

	/**
	 * @param mu number of individuals in the population
	 * @param dim dimension of the decision space
	 * @param problem the problem which contains the fitness functions
	 */
	public Population_BS(int mu, int dim, Problem_BS problem) {
		super();

		this.ds_dim = dim;
		this.mu = mu;
		this.problem = problem;

		Individual_BS individuum;

		for (int i=0;i<mu;i++) {
			boolean[] vector = new boolean[dim];
			for (int j=0;j<ds_dim;j++) {
				// construct vector[j] randomly as true or false
				RandomElement re = getRandomElement();
				double random = re.uniform(0,1);
				if (random > 0.5) {
					vector[j] = true;
				} else {
					vector[j] = false;
				}
			}
			individuum = new Individual_BS(i, ds_dim, problem.getObjectiveSpaceDimension(), vector, problem.getFitness(vector));
			ind.add(i, individuum);
		}
	}

	public void print() {
		for (Individual individual : ind) {
			System.out.println(((Individual_BS)individual).toString());
		}
	}

}


text:
/* ###
 * IP: GHIDRA
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package ghidra.app.plugin.core.debug.gui.listing;

import static ghidra.app.plugin.core.debug.gui.DebuggerResources.*;

import java.awt.Color;
import java.util.List;
import java.util.function.Consumer;
import java.util.stream.Collectors;

import org.jdom.Element;

import docking.ActionContext;
import docking.action.MenuData;
import ghidra.app.events.*;
import ghidra.app.plugin.PluginCategoryNames;
import ghidra.app.plugin.core.codebrowser.AbstractCodeBrowserPlugin;
import ghidra.app.plugin.core.codebrowser.CodeViewerProvider;
import ghidra.app.plugin.core.debug.DebuggerCoordinates;
import ghidra.app.plugin.core.debug.DebuggerPluginPackage;
import ghidra.app.plugin.core.debug.event.*;
import ghidra.app.plugin.core.debug.gui.DebuggerResources.AbstractNewListingAction;
import ghidra.app.plugin.core.debug.gui.action.LocationTrackingSpec;
import ghidra.app.plugin.core.debug.gui.action.NoneLocationTrackingSpec;
import ghidra.app.services.*;
import ghidra.app.util.viewer.format.FormatManager;
import ghidra.app.util.viewer.listingpanel.ListingPanel;
import ghidra.framework.options.AutoOptions;
import ghidra.framework.options.SaveState;
import ghidra.framework.options.annotation.AutoOptionDefined;
import ghidra.framework.options.annotation.HelpInfo;
import ghidra.framework.plugintool.*;
import ghidra.framework.plugintool.annotation.AutoServiceConsumed;
import ghidra.framework.plugintool.util.PluginStatus;
import ghidra.program.model.address.*;
import ghidra.program.model.listing.Program;
import ghidra.program.util.ProgramLocation;
import ghidra.program.util.ProgramSelection;
import ghidra.trace.model.program.TraceProgramView;
import ghidra.util.Swing;
import utilities.util.SuppressableCallback;
import utilities.util.SuppressableCallback.Suppression;

@PluginInfo(
	shortDescription = "View and annotate listings of trace (possibly live) memory",
	description = "Provides the memory listing display window. Functions similarly to " +
		"the main program listing display window, but for traces. If the trace is the " +
		"destination of a live recording, the view(s) retrieve live memory on demand.",
	category = PluginCategoryNames.DEBUGGER,
	packageName = DebuggerPluginPackage.NAME,
	status = PluginStatus.RELEASED,
	eventsConsumed = {
		// ProgramHighlightPluginEvent.class, // TODO: Later or remove
		ProgramOpenedPluginEvent.class, // For auto-open log cleanup
		ProgramClosedPluginEvent.class, // For marker set cleanup
		ProgramActivatedPluginEvent.class, // To track the static program for sync
		ProgramLocationPluginEvent.class, // For static listing sync
		ProgramSelectionPluginEvent.class, // For static listing sync
		TraceActivatedPluginEvent.class, // Trace/thread activation and register tracking
		TraceClosedPluginEvent.class,
	},
	eventsProduced = {
		ProgramLocationPluginEvent.class,
		ProgramSelectionPluginEvent.class,
		TraceLocationPluginEvent.class,
		TraceSelectionPluginEvent.class
	},
	servicesRequired = {
		DebuggerModelService.class, // For memory capture
		DebuggerStaticMappingService.class, // For static listing sync. TODO: Optional?
		DebuggerEmulationService.class, // TODO: Optional?
		ProgramManager.class, // For static listing sync
		//GoToService.class, // For static listing sync
		ClipboardService.class,
		MarkerService.class // TODO: Make optional?
	},
	servicesProvided = {
		DebuggerListingService.class,
	})
public class DebuggerListingPlugin extends AbstractCodeBrowserPlugin<DebuggerListingProvider>
		implements DebuggerListingService {
	private static final String KEY_CONNECTED_PROVIDER = "connectedProvider";
	private static final String KEY_DISCONNECTED_COUNT = "disconnectedCount";
	private static final String PREFIX_DISCONNECTED_PROVIDER = "disconnectedProvider";

	protected class NewListingAction extends AbstractNewListingAction {
		public static final String GROUP = GROUP_TRANSIENT_VIEWS;

		public NewListingAction() {
			super(DebuggerListingPlugin.this);
			setMenuBarData(new MenuData(new String[] { "Window", DebuggerPluginPackage.NAME, NAME },
				ICON, GROUP));
			tool.addAction(this);
			setEnabled(true);
		}

		@Override
		public void actionPerformed(ActionContext context) {
			createNewDisconnectedProvider();
		}
	}

	/**
	 * TODO: If I intend to color any location pointed to by a "pointer-typed" register, I should do
	 * it here or in a separate plugin. Should such markers also be mapped and shown in static
	 * programs? Well, if I'm using the marker service, that's probably the only way to make it
	 * work...
	 */

	protected NewListingAction actionNewListing;

	//@AutoServiceConsumed
	//private GoToService goToService;
	@AutoServiceConsumed
	private ProgramManager programManager;
	// NOTE: This plugin doesn't extend AbstractDebuggerPlugin
	@SuppressWarnings("unused")
	private AutoService.Wiring autoServiceWiring;

	@AutoOptionDefined(
		name = OPTION_NAME_COLORS_STALE_MEMORY,
		description = "Color of memory addresses whose content is not known in the view's " +
			"snap",
		help = @HelpInfo(anchor = "colors"))
	private Color staleMemoryColor = DEFAULT_COLOR_BACKGROUND_STALE;
	@AutoOptionDefined( //
		name = OPTION_NAME_COLORS_ERROR_MEMORY, //
		description = "Color of memory addresses whose content could not be read in the " +
			"view's snap", //
		help = @HelpInfo(anchor = "colors"))
	private Color errorMemoryColor = DEFAULT_COLOR_BACKGROUND_ERROR;
	// NOTE: Static programs are marked via markerSet. Dynamic are marked via custom color model
	@AutoOptionDefined( //
		name = OPTION_NAME_COLORS_TRACKING_MARKERS, //
		description = "Background color for locations referred to by a tracked register", //
		help = @HelpInfo(anchor = "colors"))
	private Color trackingColor = DEFAULT_COLOR_REGISTER_MARKERS;
	@SuppressWarnings("unused")
	private AutoOptions.Wiring autoOptionsWiring;

	private final SuppressableCallback<Void> cbProgramLocationEvents = new SuppressableCallback<>();
	private final SuppressableCallback<Void> cbProgramSelectionEvents =
		new SuppressableCallback<>();

	private DebuggerCoordinates current = DebuggerCoordinates.NOWHERE;

	public DebuggerListingPlugin(PluginTool tool) {
		super(tool);
		autoServiceWiring = AutoService.wireServicesProvidedAndConsumed(this);
		autoOptionsWiring = AutoOptions.wireOptions(this);

		createActions();
	}

	@Override
	public MultiBlendedListingBackgroundColorModel createListingBackgroundColorModel(
			ListingPanel listingPanel) {
		MultiBlendedListingBackgroundColorModel colorModel =
			new MultiBlendedListingBackgroundColorModel();
		colorModel.addModel(new MemoryStateListingBackgroundColorModel(this, listingPanel));
		colorModel.addModel(new CursorBackgroundColorModel(this, listingPanel));
		return colorModel;
	}

	@Override
	protected DebuggerListingProvider createProvider(FormatManager formatManager,
			boolean isConnected) {
		return new DebuggerListingProvider(this, formatManager, isConnected);
	}

	private void createActions() {
		actionNewListing = new NewListingAction();
	}

	public DebuggerListingProvider createListingIfMissing(LocationTrackingSpec spec,
			boolean followsCurrentThread) {
		synchronized (disconnectedProviders) {
			for (DebuggerListingProvider provider : disconnectedProviders) {
				if (provider.getTrackingSpec() != spec) {
					continue;
				}
				if (provider.isFollowsCurrentThread() != followsCurrentThread) {
					continue;
				}
				return provider;
			}
			DebuggerListingProvider provider = createNewDisconnectedProvider();
			provider.setTrackingSpec(spec);
			provider.setFollowsCurrentThread(followsCurrentThread);
			provider.goToCoordinates(current);
			return provider;
		}
	}

	@Override
	protected void viewChanged(AddressSetView addrSet) {
		TraceProgramView view = current.getView();
		if (view == null) {
			super.viewChanged(new AddressSet());
		}
		else {
			super.viewChanged(view.getMemory());
		}
	}

	@Override
	protected void updateBackgroundColorModel() {
		// Nothing. Each provider manages its own
	}

	@Override
	public void locationChanged(CodeViewerProvider provider, ProgramLocation location) {
		// TODO: Fix cursor?
		// Do not fire ProgramLocationPluginEvent.
		firePluginEvent(new TraceLocationPluginEvent(getName(), location));
	}

	@Override
	public void selectionChanged(CodeViewerProvider provider, ProgramSelection selection) {
		TraceProgramView view = current.getView();
		if (view == null) {
			return;
		}
		// Do not fire ProgramSelectionPluginEvent.
		firePluginEvent(new TraceSelectionPluginEvent(getName(), selection, view));
	}

	@Override
	public void highlightChanged(CodeViewerProvider codeViewerProvider,
			ProgramSelection highlight) {
		// TODO Nothing, yet
	}

	protected boolean heedLocationEvent(PluginEvent ev) {
		PluginEvent trigger = ev.getTriggerEvent();
		/*Msg.debug(this, "Location event");
		Msg.debug(this, "   Program: " + ev.getProgram());
		Msg.debug(this, "   Location: " + ev.getLocation());
		Msg.debug(this, "   Trigger: " + trigger);
		if (trigger != null) {
			Msg.debug(this, "   Trigger Class: " + trigger.getClass());
		}*/

		if (trigger instanceof TraceActivatedPluginEvent) {
			return false;
		}
		if (trigger instanceof ProgramActivatedPluginEvent) {
			return false;
		}
		if (trigger instanceof TreeSelectionPluginEvent) {
			return false;
		}
		if (trigger instanceof ViewChangedPluginEvent) {
			return false;
		}
		//Msg.debug(this, "   Heeded");
		return true;
	}

	protected boolean heedSelectionEvent(PluginEvent ev) {
		return heedLocationEvent(ev);
	}

	@Override
	public void processEvent(PluginEvent event) {
		if (event instanceof ProgramLocationPluginEvent) {
			cbProgramLocationEvents.invoke(() -> {
				ProgramLocationPluginEvent ev = (ProgramLocationPluginEvent) event;
				if (heedLocationEvent(ev)) {
					connectedProvider.staticProgramLocationChanged(ev.getLocation());
				}
			});
		}
		if (event instanceof ProgramSelectionPluginEvent) {
			cbProgramSelectionEvents.invoke(() -> {
				ProgramSelectionPluginEvent ev = (ProgramSelectionPluginEvent) event;
				if (heedSelectionEvent(ev)) {
					connectedProvider.staticProgramSelectionChanged(ev.getProgram(),
						ev.getSelection());
				}
			});
		}
		if (event instanceof ProgramOpenedPluginEvent) {
			ProgramOpenedPluginEvent ev = (ProgramOpenedPluginEvent) event;
			allProviders(p -> p.programOpened(ev.getProgram()));
		}
		if (event instanceof ProgramClosedPluginEvent) {
			ProgramClosedPluginEvent ev = (ProgramClosedPluginEvent) event;
			allProviders(p -> p.programClosed(ev.getProgram()));
		}
		if (event instanceof ProgramActivatedPluginEvent) {
			ProgramActivatedPluginEvent ev = (ProgramActivatedPluginEvent) event;
			allProviders(p -> p.staticProgramActivated(ev.getActiveProgram()));
		}
		if (event instanceof TraceActivatedPluginEvent) {
			TraceActivatedPluginEvent ev = (TraceActivatedPluginEvent) event;
			current = ev.getActiveCoordinates();
			allProviders(p -> p.coordinatesActivated(current));
		}
		if (event instanceof TraceClosedPluginEvent) {
			TraceClosedPluginEvent ev = (TraceClosedPluginEvent) event;
			if (current.getTrace() == ev.getTrace()) {
				current = DebuggerCoordinates.NOWHERE;
			}
			allProviders(p -> p.traceClosed(ev.getTrace()));
		}
		// TODO: Sync selection and highlights?
	}

	void fireStaticLocationEvent(ProgramLocation staticLoc) {
		assert Swing.isSwingThread();
		try (Suppression supp = cbProgramLocationEvents.suppress(null)) {
			// Use this instead of GoToService to avoid event loopback
			programManager.setCurrentProgram(staticLoc.getProgram());
			tool.firePluginEvent(new ProgramLocationPluginEvent(getName(), staticLoc,
				staticLoc.getProgram()));
			//goToService.goTo(staticLoc);
		}
	}

	void fireStaticSelectionEvent(Program staticProg, ProgramSelection staticSel) {
		assert Swing.isSwingThread();
		try (Suppression supp = cbProgramSelectionEvents.suppress(null)) {
			tool.firePluginEvent(new ProgramSelectionPluginEvent(getName(), staticSel, staticProg));
		}
	}

	protected void allProviders(Consumer<DebuggerListingProvider> action) {
		action.accept(connectedProvider);
		for (DebuggerListingProvider provider : disconnectedProviders) {
			action.accept(provider);
		}
	}

	@AutoServiceConsumed
	public void setTraceManager(DebuggerTraceManagerService traceManager) {
		DebuggerListingProvider provider = connectedProvider;
		if (provider == null || traceManager == null) {
			return;
		}
		provider.coordinatesActivated(current = traceManager.getCurrent());
	}

	@Override
	public void setTrackingSpec(LocationTrackingSpec spec) {
		connectedProvider.setTrackingSpec(spec);
	}

	@Override
	public LocationTrackingSpec getTrackingSpec() {
		return connectedProvider.getTrackingSpec();
	}

	@Override
	public void addTrackingSpecChangeListener(LocationTrackingSpecChangeListener listener) {
		connectedProvider.addTrackingSpecChangeListener(listener);
	}

	@Override
	public void removeTrackingSpecChangeListener(LocationTrackingSpecChangeListener listener) {
		connectedProvider.removeTrackingSpecChangeListener(listener);
	}

	@Override
	public void setCurrentSelection(ProgramSelection selection) {
		connectedProvider.setSelection(selection);
	}

	@Override
	public boolean goTo(ProgramLocation location, boolean centerOnScreen) {
		boolean result = super.goTo(location, centerOnScreen);
		if (!result) {
			return false;
		}
		DebuggerListingProvider provider = connectedProvider;
		provider.doAutoSyncCursorIntoStatic(location);
		provider.doCheckCurrentModuleMissing();
		return true;
	}

	@Override
	public boolean goTo(Address address, boolean centerOnScreen) {
		TraceProgramView view = connectedProvider.current.getView();
		if (view == null) {
			return false;
		}
		ProgramLocation loc = new ProgramLocation(view, address);
		return goTo(loc, centerOnScreen);
	}

	/**
	 * {@inheritDoc}
	 *
	 * <p>
	 * This is only used by the ProgramManager. I don't need state per program. It would be nice to
	 * have state per Trace, but this facility is usurped only for the ProgramManager. Here, it gets
	 * in my way, since it restores previous, now incorrect, state on program switch. It tends to
	 * override the static sync.
	 */
	@Override
	public Object getTransientState() {
		// ProgramManager does all this for programs. I don't need that here.
		return new Object[] {};
	}

	/**
	 * {@inheritDoc}
	 *
	 * @see #getTransientState()
	 */
	@Override
	public void restoreTransientState(Object objectState) {
		/*try (Suppression supp = cbGoTo.suppress(null)) {
			super.restoreTransientState(objectState);
		}*/
	}

	@Override
	public void writeDataState(SaveState saveState) {
		SaveState connectedProviderState = new SaveState();
		connectedProvider.writeDataState(connectedProviderState);
		saveState.putXmlElement(KEY_CONNECTED_PROVIDER, connectedProviderState.saveToXml());

		/**
		 * Arrange the follows ones first, so that we reload them into corresponding providers
		 * restored from config state
		 */
		List<DebuggerListingProvider> disconnected = disconnectedProviders.stream()
				.filter(p -> p.isFollowsCurrentThread())
				.collect(Collectors.toList());
		for (DebuggerListingProvider p : disconnectedProviders) {
			if (!disconnected.contains(p)) {
				disconnected.add(p);
			}
		}
		int disconnectedCount = disconnected.size();
		saveState.putInt(KEY_DISCONNECTED_COUNT, disconnectedCount);
		for (int index = 0; index < disconnectedCount; index++) {
			DebuggerListingProvider provider = disconnected.get(index);
			String stateName = PREFIX_DISCONNECTED_PROVIDER + index;
			SaveState providerState = new SaveState();
			provider.writeDataState(providerState);
			saveState.putXmlElement(stateName, providerState.saveToXml());
		}
	}

	protected void ensureProviders(int count, boolean followCurrentThread, SaveState configState) {
		while (disconnectedProviders.size() < count) {
			int index = disconnectedProviders.size();
			String stateName = PREFIX_DISCONNECTED_PROVIDER + index;
			DebuggerListingProvider provider = createNewDisconnectedProvider();
			provider.setFollowsCurrentThread(false);
			Element providerElement = configState.getXmlElement(stateName);
			// Read transient configs, which are not saved in tool
			if (providerElement != null) {
				SaveState providerState = new SaveState(providerElement);
				provider.readConfigState(providerState); // Yes, config
			}
			else {
				provider.setTrackingSpec(NoneLocationTrackingSpec.INSTANCE);
			}
		}
	}

	@Override
	public void readDataState(SaveState saveState) {
		Element connectedProviderElement = saveState.getXmlElement(KEY_CONNECTED_PROVIDER);
		if (connectedProviderElement != null) {
			SaveState connectedProviderState = new SaveState(connectedProviderElement);
			connectedProvider.readDataState(connectedProviderState);
		}

		int disconnectedCount = saveState.getInt(KEY_DISCONNECTED_COUNT, 0);
		ensureProviders(disconnectedCount, false, saveState);

		List<DebuggerListingProvider> disconnected = disconnectedProviders;
		for (int index = 0; index < disconnectedCount; index++) {
			String stateName = PREFIX_DISCONNECTED_PROVIDER + index;
			Element providerElement = saveState.getXmlElement(stateName);
			if (providerElement != null) {
				SaveState providerState = new SaveState(providerElement);
				DebuggerListingProvider provider = disconnected.get(index);
				provider.readDataState(providerState);
			}
		}
	}

	@Override
	public void writeConfigState(SaveState saveState) {
		SaveState connectedProviderState = new SaveState();
		connectedProvider.writeConfigState(connectedProviderState);
		saveState.putXmlElement(KEY_CONNECTED_PROVIDER, connectedProviderState.saveToXml());

		List<DebuggerListingProvider> disconnected = disconnectedProviders.stream()
				.filter(p -> p.isFollowsCurrentThread())
				.collect(Collectors.toList());
		int disconnectedCount = disconnected.size();
		saveState.putInt(KEY_DISCONNECTED_COUNT, disconnectedCount);
		for (int index = 0; index < disconnectedCount; index++) {
			DebuggerListingProvider provider = disconnected.get(index);
			String stateName = PREFIX_DISCONNECTED_PROVIDER + index;
			SaveState providerState = new SaveState();
			provider.writeConfigState(providerState);
			saveState.putXmlElement(stateName, providerState.saveToXml());
		}
	}

	@Override
	public void readConfigState(SaveState saveState) {
		Element connectedProviderElement = saveState.getXmlElement(KEY_CONNECTED_PROVIDER);
		if (connectedProviderElement != null) {
			SaveState connectedProviderState = new SaveState(connectedProviderElement);
			connectedProvider.readConfigState(connectedProviderState);
		}

		int disconnectedCount = saveState.getInt(KEY_DISCONNECTED_COUNT, 0);
		ensureProviders(disconnectedCount, true, saveState);
	}

	@Override
	public ViewManagerService getViewManager(CodeViewerProvider codeViewerProvider) {
		// The view manager applies to Programs, and need not be heeded for viewing Traces
		// Overlay spaces can bleed in and cause the DebuggerListingProvider to flip out.
		return null;
	}
}


text:
package com.thoughtworks.selenium.corebased;

import com.thoughtworks.selenium.InternalSelenseTestBase;

import org.junit.jupiter.api.Test;

public class TestElementIndex extends InternalSelenseTestBase {
  @Test
  void testElementIndex() {
    selenium.open("test_element_order.html");
    assertEquals(selenium.getElementIndex("d2"), "1");
    assertEquals(selenium.getElementIndex("d1.1.1"), "0");
    verifyEquals(selenium.getElementIndex("d2"), "1");
    verifyEquals(selenium.getElementIndex("d1.2"), "5");
    assertNotEquals("2", selenium.getElementIndex("d2"));
    verifyNotEquals("2", selenium.getElementIndex("d2"));
  }
}


text:
using LeadPipe.Net.Collections;
using NUnit.Framework;

namespace LeadPipe.Net.Tests.StackedListTests
{
    /// <summary>
    /// Tests for the StackedList Remove method.
    /// </summary>
    [TestFixture]
    public class RemoveShould
    {
        /// <summary>
        /// Test to ensure that removing an item underneath the last item added does not change the peeked item.
        /// </summary>
        [Test]
        public void NotChangeThePeekedValueGivenRemovalOfAnItemBelow()
        {
            // Arrange
            var stackedList = new StackedList<int>();
            stackedList.Push(0);
            stackedList.Push(1);
            stackedList.Push(2);
            stackedList.Push(3);
            stackedList.Push(4);

            // Act
            stackedList.Remove(2);

            // Assert
            Assert.That(stackedList.Peek() == 4);
        }

        /// <summary>
        /// Test to ensure remove actually removes an item.
        /// </summary>
        [Test]
        public void RemoveAnItem()
        {
            // Arrange
            var stackedList = new StackedList<int>();
            stackedList.Push(0);
            stackedList.Push(1);
            stackedList.Push(2);
            stackedList.Push(3);

            // Act
            stackedList.Remove(3);

            // Assert
            Assert.That(!stackedList.Items.Contains(3));
        }

        /// <summary>
        /// Test to ensure remove actually removes an item in the middle of the stack.
        /// </summary>
        [Test]
        public void RemoveAnItemFromTheMiddleOfTheStack()
        {
            // Arrange
            var stackedList = new StackedList<int>();
            stackedList.Push(0);
            stackedList.Push(1);
            stackedList.Push(2);
            stackedList.Push(3);
            stackedList.Push(4);

            // Act
            stackedList.Remove(2);

            // Assert
            Assert.That(!stackedList.Items.Contains(2));
        }
    }
}


text:
Provide code examples and explanations of how to get the project.

## API Reference

Depending on the size of the project, if it is small and simple enough the reference docs can be added to the README. For medium size to larger projects it is important to at least provide a link to where the API reference docs live.

## Tests

Describe and show how to run the tests with code examples.

## Contributors

Let people know how they can dive into the project, include important links to things like issue trackers, irc, twitter accounts if applicable.

## License

A short snippet describing the license (MIT, Apache, etc.)