text:
Prebuilt Pony binaries are available on a number of platforms. They are built using a very generic CPU instruction set and as such, will not provide maximum performance. If you need to get the best performance possible from your Pony program, we strongly recommend [building from source](BUILD.md).

All prebuilt releases are currently AMD64 only. If you want to install on different CPU architecture, you'll need to [build from source](BUILD.md).

Prebuilt Pony installations will use clang as the default C compiler and clang++ as the default C++ compiler. If you prefer to use different compilers, such as gcc and g++, these defaults can be overridden by setting the `$CC` and `$CXX` environment variables to your compiler of choice.

## FreeBSD 13.0

Prebuilt FreeBSD 13.0 packages are available via [ponyup](https://github.com/ponylang/ponyup).

```bash
ponyup default freebsd-13.0
ponyup update ponyc release
```

## Linux

Prebuilt Linux packages are available via [ponyup](https://github.com/ponylang/ponyup) for Glibc and musl libc based Linux distribution. You can install nightly builds as well as official releases using ponyup.

### Select your Linux platform

```bash
ponyup default PLATFORM
```

where `PLATFORM` is from the table below

Distribution | PLATFORM String
--- | ---
Alpine | musl
Linux Mint 19.3 | ubuntu18.04
Rocky 8 | rocky8
Ubuntu 18.04 | ubuntu18.04
Ubuntu 20.04 | ubuntu20.04
Ubuntu 22.04 | ubuntu22.04

N.B. If you platform isn't listed, skip to the next section and ponyup will install, as appropriate a Glibc or musl libc build of ponyc.

### Install the latest release

```bash

ponyup update ponyc release
```

### Additional requirements

All ponyc Linux installations need to have a C compiler such as clang installed. Compilers other than clang might work, but clang is the officially supported C compiler. The following distributions have additional requirements:

Distribution | Requires
--- | ---
Alpine | libexecinfo
CentOS | libatomic
Fedora | libatomic
Rocky | libatomic
Void | libatomic libatomic-devel

### Troubleshooting Glibc compatibility

Most Linux distributions are based on Glibc and all software for them must use the same version of Glibc. You might see an error like the following when trying to use ponyc:

```console
ponyc: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by ponyc)
```

If you get that error, it means that the Glibc we compiled ponyc with isn't compatible with your distribution. If your distribution is a long term support release, please [open an issue](https://github.com/ponylang/ponyc/issues) and we'll work towards adding prebuilt images for your distribution. Otherwise, you'll have to [build ponyc from source](BUILD.md).

## macOS

Prebuilt macOS packages are available via [ponyup](https://github.com/ponylang/ponyup). You can also install nightly builds using ponyup.

To install the most recent ponyc on macOS:

```bash
ponyup update ponyc release
```

## Windows

Windows users will need to install:

- Visual Studio 2022 or 2019 (available [here](https://www.visualstudio.com/vs/community/)) or the Microsoft C++ Build Tools (available [here](https://visualstudio.microsoft.com/visual-cpp-build-tools/)).
  - Install the `Desktop Development with C++` workload, along with the latest `Windows 10 SDK (10.x.x.x) for Desktop` individual component.

Once you have installed the prerequisites, you can get prebuilt release or nightly builds via [ponyup](https://github.com/ponylang/ponyup).  To install the most recent ponyc on Windows:

```pwsh
ponyup update ponyc release
```

You can also download the latest ponyc release from [Cloudsmith](https://dl.cloudsmith.io/public/ponylang/releases/raw/versions/latest/ponyc-x86-64-pc-windows-msvc.zip). Unzip the release file in a convenient location, and you will find `ponyc.exe` in the `bin` directory. Following extraction, to make `ponyc.exe` globally available, add it to your `PATH` either by using Advanced System Settings->Environment Variables to extend `PATH` or by using the `setx` command, e.g. `setx PATH "%PATH%;<directory you unzipped to>\bin"`


text:
/**
 * Servlet filters.
 */
package io.github.pascalgrimaud.web.filter;

redpajama_set_name: RedPajamaGithub


text:
package org.springframework.stereotype;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.springframework.core.annotation.AliasFor;

/**
 * Indicates that an annotated class is a "Service", originally defined by Domain-Driven
 * Design (Evans, 2003) as "an operation offered as an interface that stands alone in the
 * model, with no encapsulated state."
 *
 *
May also indicate that a class is a "Business Service Facade" (in the Core J2EE
 * patterns sense), or something similar. This annotation is a general-purpose stereotype
 * and individual teams may narrow their semantics and use as appropriate.
 *
 *
This annotation serves as a specialization of {@link Component @Component},
 * allowing for implementation classes to be autodetected through classpath scanning.
 *
 * @author Juergen Hoeller
 * @since 2.5
 * @see Component
 * @see Repository
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Component
public @interface Service {

	/**
	 * The value may indicate a suggestion for a logical component name,
	 * to be turned into a Spring bean in case of an autodetected component.
	 * @return the suggested component name, if any (or empty String otherwise)
	 */
	@AliasFor(annotation = Component.class)
	String value() default "";

}


text:
 Display common settings, mapping worker => topology , schedule-jobs

Worker Assign Topic

					Worker:

					<select class="input" id="slWorker">

					</select>

					Topic:

					<select class="input" id="slTopic">
						<option value="">Choose topic</option>
					</select>

					Partition:

					<input type="text" class="input" style="width: 50px;" id="txtBeginPartition" value="0" /> - <input type="text" class="input" style="width: 50px;"
						id="txtEndPartition" value="0" />

					<input data-loading-text="Loading..." class="btn btn-primary btn-success" type="button"
						id="btnSubmitWorker" value="Submit" />


text:
/*
 * Created on Mar 13, 2005
 */
package org.lobobrowser.request;

import org.cobraparser.ua.UserAgent;
import org.cobraparser.util.ID;
import org.cobraparser.util.LRUCache;

import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.*;

/**
 * @author J. H. S.
 */
public class UserAgentImpl implements UserAgent {
  private static final UserAgentImpl instance = new UserAgentImpl();

  // private static final Logger logger =
  // Logger.getLogger(UserAgentImpl.class.getName());

  private UserAgentImpl() {
  }

  public static UserAgentImpl getInstance() {
    return instance;
  }

  private static final String UAName = "";
  private static final String UAMajorVersion = "";
  private static final String UAMinorVersion = "";
  private static final String UAString = ""; // TODO: Update to UAName + "/" + UAMajorVersion

  public String getName() {
    return UAName;
  }

  public String getMajorVersion() {
    return UAMajorVersion;
  }

  public String getMinorVersion() {
    return UAMinorVersion;
  }

  public String getVersion() {
    return this.getMajorVersion() + "." + this.getMinorVersion();
  }

  // private volatile String textValue = null;

  public String getUserAgentString() {
    return UAString;
  }

  @Override
  public String toString() {
    return this.getUserAgentString();
  }

  /**
   * Removes cached user agent string.
   */
  public void invalidateUserAgent() {
    // this.textValue = null;
  }

  /*
   * (non-Javadoc)
   *
   * @see org.xamjwg.clientlet.UserAgent#getNameAndVersion()
   */
  public String getNameAndVersion() {
    return this.getName() + " " + this.getVersion();
  }

  public String getInfoUrl() {
    return "";
  }

  /*
  private static String getOs() {
    return "";
  } */

  // //Note: This is not being used, but generally use of Strings a WeakHashMap
  // //keys should be revised.
  // private Map<String,String> sessionIDMap = new WeakHashMap<String,String>();
  //
  // public String getSessionID(java.net.URL url) {
  // //TODO: Should be a LRU cache instead of a weak hash map.
  // String host = url.getHost();
  // String key = url.getProtocol().toLowerCase() + "#" + (host == null ? "" :
  // host.toLowerCase());
  // synchronized(this) {
  // String sessionID = this.sessionIDMap.get(key);
  // if(sessionID == null) {
  // StringBuffer rawIdentifier = new StringBuffer(key);
  // rawIdentifier.append(ID.getGlobalProcessID());
  // sessionID = ID.getHexString(ID.getMD5Bytes(rawIdentifier.toString()));
  // this.sessionIDMap.put(key, sessionID);
  // }
  // return sessionID;
  // }
  // }

}


text:
require 'capistrano'

# = Purpose
# Apt is a Capistrano plugin module providing a set of methods
# that invoke the *apt* package manager (as used in Debian and Ubuntu)
#
# Installs within Capistrano as the plugin _apt_.
#
# =Usage
#
#    require 'vmbuilder_plugins/apt'
#
# Prefix all calls to the library with <tt>apt.</tt>
#
module Apt

  # Default apt-get command - reduces any interactivity to the minimum.
  APT_GET="DEBCONF_TERSE='yes' DEBIAN_PRIORITY='critical' DEBIAN_FRONTEND=noninteractive apt-get"

  # Run the apt install program across the package list in 'packages'.
  # Select those packages referenced by <tt>:base</tt> and the +version+
  # of the distribution you want to use.
  def install(packages, version, options={})
    update
    special_options="--allow-unauthenticated" if version != :stable
    send(run_method, %{
      sh -c "#{APT_GET} -qyu --force-yes #{special_options.to_s} install #{package_list(packages, version)}"
    }, options)
  end

  # Run an apt clean
  def clean(options={})
    send(run_method, %{sh -c "#{APT_GET} -qy clean"}, options)
  end

  # Run an apt autoclean
  def autoclean(options={})
    send(run_method, %{sh -c "#{APT_GET} -qy autoclean"}, options)
  end

  # Run an apt distribution upgrade
  def dist_upgrade(options={})
    update
    send(run_method, %{sh -c "#{APT_GET} -qy dist-upgrade"}, options)
  end

  # Run an apt upgrade. Use dist_upgrade instead if you want to upgrade
  # the critical base packages.
  def upgrade(options={})
    update
    send(run_method, %{sh -c "#{APT_GET} -qy upgrade"}, options)
  end

  # Run an apt update.
  def update(options={})
    send(run_method, %{sh -c "#{APT_GET} -qy update"}, options)
  end

  # RPM package install via alien
  def rpm_install(packages, options={})
    install({:base => %w(wget alien) }, :base)
    send(run_method, "wget -Ncq #{packages.join(' ')}", options)
    files=packages.collect { |package| File.basename(package) }
    send(run_method, "alien -i #{files.join(' ')}", options)
  end

  # Clear the source list and package cache
  def clear_cache(options={})
    clean
    cmd="rm -f /var/cache/apt/*.bin /var/lib/apt/lists/*_* /var/lib/apt/lists/partial/*"
    send(run_method, cmd, options)
  end

private

  # Provides a string containing all the package names in the base
  #list plus those in +version+.
  def package_list(packages, version)
    Array(packages[:base]).join(' ') + ' ' + Array(packages[version]).join(' ')
  end

end

Capistrano.plugin :apt, Apt

# vim: nowrap sw=2 sts=2 ts=8 ff=unix ft=ruby:


text:
package eventbus

import (
	"context"
	"errors"
	"fmt"
	"math/rand"
	"sync"
	"testing"
	"time"

	"github.com/kr/pretty"

	eh "github.com/looplab/eventhorizon"
	"github.com/looplab/eventhorizon/middleware/eventhandler/observer"
	"github.com/looplab/eventhorizon/mocks"
	"github.com/looplab/eventhorizon/uuid"
)

func TestAddHandler(t *testing.T, bus1 eh.EventBus) {
	ctx := context.Background()

	// Error on nil matcher.
	if err := bus1.AddHandler(ctx, nil, mocks.NewEventHandler("no-matcher")); err != eh.ErrMissingMatcher {
		t.Error("the error should be correct:", err)
	}

	// Error on nil handler.
	if err := bus1.AddHandler(ctx, eh.MatchAll{}, nil); err != eh.ErrMissingHandler {
		t.Error("the error should be correct:", err)
	}

	// Error on multiple registrations.
	if err := bus1.AddHandler(ctx, eh.MatchAll{}, mocks.NewEventHandler("multi")); err != nil {
		t.Fatal("there should be no error:", err)
	}

	if err := bus1.AddHandler(ctx, eh.MatchAll{}, mocks.NewEventHandler("multi")); err != eh.ErrHandlerAlreadyAdded {
		t.Error("the error should be correct:", err)
	}
}

// AcceptanceTest is the acceptance test that all implementations of EventBus
// should pass. It should manually be called from a test case in each
// implementation:
//
//   func TestEventBus(t *testing.T) {
//       bus1 := NewEventBus()
//       bus2 := NewEventBus()
//       eventbus.AcceptanceTest(t, bus1, bus2)
//   }
//
func AcceptanceTest(t *testing.T, bus1, bus2 eh.EventBus, timeout time.Duration) {
	ctx := context.Background()
	ctx = mocks.WithContextOne(ctx, "testval")

	// Without handler.
	id := uuid.New()
	timestamp := time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC)
	event1 := eh.NewEvent(mocks.EventType, &mocks.EventData{Content: "event1"}, timestamp,
		eh.ForAggregate(mocks.AggregateType, id, 1),
		eh.WithMetadata(map[string]interface{}{"meta": "data", "num": 42.0}),
	)

	if err := bus1.HandleEvent(ctx, event1); err != nil {
		t.Error("there should be no error:", err)
	}

	// Event without data (tested in its own handler).
	otherHandler := mocks.NewEventHandler("other-handler")
	if err := bus1.AddHandler(ctx, eh.MatchEvents{mocks.EventOtherType}, otherHandler); err != nil {
		t.Fatal("there should be no error:", err)
	}

	time.Sleep(timeout) // Need to wait here for handlers to be added.

	eventWithoutData := eh.NewEvent(mocks.EventOtherType, nil, timestamp,
		eh.ForAggregate(mocks.AggregateType, uuid.New(), 1))
	if err := bus1.HandleEvent(ctx, eventWithoutData); err != nil {
		t.Error("there should be no error:", err)
	}

	if !otherHandler.Wait(timeout) {
		t.Error("did not receive event in time")
	}

	expectedEvents := []eh.Event{eventWithoutData}
	if !eh.CompareEventSlices(otherHandler.Events, expectedEvents) {
		t.Error("the events were incorrect:")
		t.Log(otherHandler.Events)

		if len(otherHandler.Events) == 1 {
			t.Log(pretty.Sprint(otherHandler.Events[0]))
		}
	}

	const (
		handlerName  = "handler"
		observerName = "observer"
	)

	// Add handlers and observers.
	handlerBus1 := mocks.NewEventHandler(handlerName)
	if err := bus1.AddHandler(ctx, eh.MatchEvents{mocks.EventType}, handlerBus1); err != nil {
		t.Fatal("there should be no error:", err)
	}

	handlerBus2 := mocks.NewEventHandler(handlerName)
	if err := bus2.AddHandler(ctx, eh.MatchEvents{mocks.EventType}, handlerBus2); err != nil {
		t.Fatal("there should be no error:", err)
	}

	anotherHandlerBus2 := mocks.NewEventHandler("another_handler")
	if err := bus2.AddHandler(ctx, eh.MatchEvents{mocks.EventType}, anotherHandlerBus2); err != nil {
		t.Fatal("there should be no error:", err)
	}

	// Add observers using the observer middleware.
	observerBus1 := mocks.NewEventHandler(observerName)
	if err := bus1.AddHandler(ctx, eh.MatchAll{}, eh.UseEventHandlerMiddleware(observerBus1, observer.Middleware)); err != nil {
		t.Fatal("there should be no error:", err)
	}

	observerBus2 := mocks.NewEventHandler(observerName)
	if err := bus2.AddHandler(ctx, eh.MatchAll{}, eh.UseEventHandlerMiddleware(observerBus2, observer.Middleware)); err != nil {
		t.Fatal("there should be no error:", err)
	}

	time.Sleep(timeout) // Need to wait here for handlers to be added.

	// Event with data.
	event2 := eh.NewEvent(mocks.EventType, &mocks.EventData{Content: "event2"}, timestamp,
		eh.ForAggregate(mocks.AggregateType, id, 2),
		eh.WithMetadata(map[string]interface{}{"meta": "data", "num": 42.0}),
	)
	if err := bus1.HandleEvent(ctx, event2); err != nil {
		t.Error("there should be no error:", err)
	}

	// Check for correct event in handler 1 or 2.
	if !(handlerBus1.Wait(timeout) || handlerBus2.Wait(timeout)) {
		t.Error("did not receive event in time")
	}

	expectedEvents = []eh.Event{event2}
	if !(eh.CompareEventSlices(handlerBus1.Events, expectedEvents) ||
		eh.CompareEventSlices(handlerBus2.Events, expectedEvents)) {
		t.Error("the events were incorrect:")
		t.Log(handlerBus1.Events)
		t.Log(handlerBus2.Events)

		if len(handlerBus1.Events) == 1 {
			t.Log(pretty.Sprint(handlerBus1.Events[0]))
		}

		if len(handlerBus2.Events) == 1 {
			t.Log(pretty.Sprint(handlerBus2.Events[0]))
		}
	}

	if eh.CompareEventSlices(handlerBus1.Events, handlerBus2.Events) {
		t.Error("only one handler should receive the events")
		t.Log(handlerBus1.Events)
		t.Log(handlerBus2.Events)
	}

	correctCtx1 := false
	if val, ok := mocks.ContextOne(handlerBus1.Context); ok && val == "testval" {
		correctCtx1 = true
	}

	correctCtx2 := false
	if val, ok := mocks.ContextOne(handlerBus2.Context); ok && val == "testval" {
		correctCtx2 = true
	}

	if !correctCtx1 && !correctCtx2 {
		t.Error("the context should be correct")
	}

	// Check the other handler.
	if !anotherHandlerBus2.Wait(timeout) {
		t.Error("did not receive event in time")
	}

	if !eh.CompareEventSlices(anotherHandlerBus2.Events, expectedEvents) {
		t.Error("the events were incorrect:")
		t.Log(anotherHandlerBus2.Events)
	}

	if val, ok := mocks.ContextOne(anotherHandlerBus2.Context); !ok || val != "testval" {
		t.Error("the context should be correct:", anotherHandlerBus2.Context)
	}

	// Check observer 1.
	if !observerBus1.Wait(timeout) {
		t.Error("did not receive event in time")
	}

	for i, event := range observerBus1.Events {
		if err := eh.CompareEvents(event, expectedEvents[i]); err != nil {
			t.Error("the event was incorrect:", err)
		}
	}

	if val, ok := mocks.ContextOne(observerBus1.Context); !ok || val != "testval" {
		t.Error("the context should be correct:", observerBus1.Context)
	}

	// Check observer 2.
	if !observerBus2.Wait(timeout) {
		t.Error("did not receive event in time")
	}

	for i, event := range observerBus2.Events {
		if err := eh.CompareEvents(event, expectedEvents[i]); err != nil {
			t.Error("the event was incorrect:", err)
		}
	}

	if val, ok := mocks.ContextOne(observerBus2.Context); !ok || val != "testval" {
		t.Error("the context should be correct:", observerBus2.Context)
	}

	// Check and clear all errors before the error tests.
	checkBusErrors(t, bus1)
	checkBusErrors(t, bus2)

	// Test async errors from handlers.
	errorHandler := mocks.NewEventHandler("error_handler")
	errorHandler.Err = errors.New("handler error")

	if err := bus1.AddHandler(ctx, eh.MatchAll{}, errorHandler); err != nil {
		t.Fatal("there should be no error:", err)
	}

	time.Sleep(timeout) // Need to wait here for handlers to be added.

	event3 := eh.NewEvent(mocks.EventType, &mocks.EventData{Content: "event3"}, timestamp,
		eh.ForAggregate(mocks.AggregateType, id, 3),
		eh.WithMetadata(map[string]interface{}{"meta": "data", "num": 42.0}),
	)
	if err := bus1.HandleEvent(ctx, event3); err != nil {
		t.Error("there should be no error:", err)
	}
	select {
	case <-time.After(timeout):
		t.Error("there should be an async error")
	case err := <-bus1.Errors():
		// Good case.
		if err.Error() != "event bus: could not handle event (error_handler): handler error [Event("+id.String()+", v3)]" {
			t.Error("incorrect error sent on event bus:", err)
		}
	}

	// TODO: Test context cancellation.

	if err := bus1.Close(); err != nil {
		t.Error("there should be no error:", err)
	}

	if err := bus2.Close(); err != nil {
		t.Error("there should be no error:", err)
	}
}

func checkBusErrors(t *testing.T, bus eh.EventBus) {
	t.Helper()

	for {
		select {
		case err := <-bus.Errors():
			if err != nil {
				t.Error("there should be no previous error:", err)
			}
		default:
			return
		}
	}
}

// LoadTest is a load test for an event bus implementation.
func LoadTest(t *testing.T, bus eh.EventBus) {
	benchmark(&testAsBench{t}, bus, 20, 10, 1000)
}

// Benchmark is a benchmark for an event bus implementation.
func Benchmark(b *testing.B, bus eh.EventBus) {
	benchmark(b, bus, 20, 10, b.N)
}

type bench interface {
	Log(args ...interface{})
	Error(args ...interface{})
	Fatal(args ...interface{})

	ResetTimer()
	StopTimer()
}

type testAsBench struct {
	*testing.T
}

func (b *testAsBench) ResetTimer() {}
func (b *testAsBench) StopTimer()  {}

func benchmark(t bench, bus eh.EventBus, numAggregates, numHandlers, numEvents int) {
	ctx, cancel := context.WithCancel(context.Background())

	handlers := make([]*mocks.EventHandler, numHandlers)
	for i := range handlers {
		h := mocks.NewEventHandler(fmt.Sprintf("handler-%d", i))
		if err := bus.AddHandler(ctx, eh.MatchAll{}, h); err != nil {
			t.Fatal("there should be no error:", err)
		}

		handlers[i] = h
	}

	time.Sleep(time.Second) // Need to wait here for handler to be added.
	t.Log("setup complete")
	t.Log("num events:", numEvents)

	var wg sync.WaitGroup
	for _, h := range handlers {
		wg.Add(1)

		go func(h *mocks.EventHandler) {
			defer wg.Done()

			numEventsReceived := 0

			for {
				if numEventsReceived == numEvents {
					return
				}
				select {
				case <-h.Recv:
					numEventsReceived++

					continue
				case <-ctx.Done():
					return
				case <-time.After(30 * time.Second):
					t.Error("did not receive message within timeout")

					return
				}
			}
		}(h)
	}

	var aggregates []*struct {
		id      uuid.UUID
		version int
	}

	for i := 0; i < numAggregates; i++ {
		aggregates = append(aggregates, &struct {
			id      uuid.UUID
			version int
		}{uuid.New(), 0})
	}

	t.ResetTimer()

	for n := 0; n < numEvents; n++ {
		a := aggregates[rand.Intn(len(aggregates))]
		a.version++

		timestamp := time.Date(2009, time.November, 10, 23, n, 0, 0, time.UTC)
		e := eh.NewEvent(
			mocks.EventType, &mocks.EventData{Content: fmt.Sprintf("event%d", n)}, timestamp,
			eh.ForAggregate(mocks.AggregateType, a.id, a.version))

		if err := bus.HandleEvent(ctx, e); err != nil {
			t.Error("there should be no error:", err)
		}
	}

	wg.Wait() // Wait for all events to be received.
	t.StopTimer()
	cancel() // Stop receiving goroutines.

	if err := bus.Close(); err != nil {
		t.Error("there should be no error:", err)
	}
}


text:
namespace ExtractExcelReportsFromZip
{
    using System;
    using System.Data.OleDb;
    using System.IO;
    using MSSQLSupermarketEntityFramework;

    public class ExcelToMySqlParser
    {
        private string reportsDirectory;
        private static readonly string ExcelConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=""Excel 8.0;HDR=YES"";";

        public ExcelToMySqlParser(string reportsDirectory)
        {
            this.ReportsDirectory = reportsDirectory;
        }

        public void ReadFilesFromExcel()
        {
            string[] directories = Directory.GetDirectories(this.reportsDirectory);

            foreach (var directory in directories)
            {
                ReadExcelReport(directory);
            }
        }

        private void ReadExcelReport(string directory)
        {
            string[] files = Directory.GetFiles(directory);

            foreach (var file in files)
            {
                OleDbConnection excelConnection = new OleDbConnection(string.Format(ExcelConnectionString, file));

                excelConnection.Open();

                using (excelConnection)
                {
                    OleDbCommand oleCmdSelect = new OleDbCommand("SELECT * FROM [Sales$]", excelConnection);

                    OleDbDataReader reader = oleCmdSelect.ExecuteReader();

                    // Skip the table name
                    reader.Read();
                    string [] tokens = directory.Split('\\');
                    DateTime reportDate = DateTime.Parse(tokens[tokens.Length - 1]);
                    string supermarketName = reader[0].ToString();
                    // Skip the identifiers names
                    reader.Read();

                    while (reader.Read())
                    {
                        if (reader[0].ToString() == "…")
                        {
                            break;
                        }

                        int productId = int.Parse(reader[0].ToString());
                        int quantity = int.Parse(reader[1].ToString());
                        decimal unitPrice = decimal.Parse(reader[2].ToString());
                        decimal sum = decimal.Parse(reader[3].ToString());

                        AddRecordToDatabase(productId, quantity, unitPrice, sum, reportDate, supermarketName);
                    }

                    reader.Close();
                }
            }
        }

        private void AddRecordToDatabase(int productId, int quantity, decimal unitPrice, decimal sum, DateTime reportDate, string supermarketName)
        {
            using (var supermarketEntities = new SupermarketEntities())
            {
                var report = new Report()
                {
                    ProductId = productId,
                    Quantity = quantity,
                    UnitPrice = unitPrice,
                    Sum = sum,
                    ReportDate = reportDate,
                    Supermarket = supermarketName
                };

                supermarketEntities.Reports.Add(report);
                supermarketEntities.SaveChanges();
            }
        }

        public string ReportsDirectory
        {
            get
            {
                return this.reportsDirectory;
            }
            set
            {
                this.reportsDirectory = value;
            }
        }
    }
}


text:
function [transfer] = sb_transfer(vol,sens)

% SB_TRANSFER
%
% INPUT:
% vol.wf.nd,vol.wf.el: nodes and elements of head grid (nodes in mm)
% vol.wf.field: vector assigning a conductivity to teach element (in S/mm)
% elc: vector containing the electrode positions (in mm)
%
% OUTPUT:
% vol.transfer: transfer matrix
%
% $Id: sb_transfer.m 8776 2013-11-14 09:04:48Z roboos $

%--------------------------------------------------------------------------
%TODO: tissuecond: vector with the conductivities of the respective labels,
%right now not used
%--------------------------------------------------------------------------
%TODO: automated setting of conductivities?
%disp('Setting conductivities...')
%vol.wf.field = sb_set_cond(vol.wf.labels,tissuecond); %gucken, wo tissuecond herkommt...
%--------------------------------------------------------------------------
%TODO: this probably needs to be expanded so that the node is a surface
%node if no ECoG-flag is set - solution: find a surface first...
%--------------------------------------------------------------------------

disp('Find electrode positions...')
vol.elecnodes = sb_find_elec(vol,sens);
%calculate transfermatrix
disp('Calculate transfer matrix...')
transfer = zeros(length(vol.elecnodes),size(vol.pos,1));
%--------------------------------------------------------------------------
%TODO: add possibility for parallel computation
%matlabpool local 2;
for i=2:length(vol.elecnodes)
    str = ['Electrode ',num2str(i),' of ',num2str(size(vol.elecnodes,1))];
    disp(str)
    vecb = zeros(size(vol.stiff,1),1);
    vecb(vol.elecnodes(i)) = 1;
    transfer(i,:) = sb_calc_vecx(vol.stiff,vecb,vol.elecnodes(1));
    clear vecb;
end
%matlabpool close;
end


text:
WARNING: This project is UNSUPPORTED and ABANDONED
==============

[![Build Status](https://travis-ci.org/pinepain/amqpy.png?branch=master)](https://travis-ci.org/pinepain/amqpy)

AMQPy
=====

Lightweight AMQP framework built on top of the [php-amqp](https://github.com/pdezwart/php-amqp) extension.

Requirementes
-------------

 * [php-amqp](http://pecl.php.net/package/amqp) >= 1.4.0 (for now master branch only) (with [librabbitmq]() >= 0.4.1)

It is aimed to provide painless as much as possible AMQP integration in your applications.

You can find some examples in `/demo` folder but they are incomplete and non-documented now (and probably doesn't work now),
sorry guys.

If you have questions of feature request or even found a bug (wow! you are really awesome) please create an issue
or even send pull request or old-style patch.

*NOTE* demos are completely outdated

TODO
====

- [ ] - update demo
- [ ] - update readme
- [ ] - add some docs
- [ ] - container and events support (should we? it may be done with inheritance and callbacks (before, after, etc.))
- [ ] - laravel bundle
- [ ] - code review


text:
using System.Threading.Tasks;
using FirebaseAdmin.Auth;
using FirebaseAdmin.Auth.Multitenancy;
using Xunit;

namespace FirebaseAdmin.IntegrationTests.Auth
{
    [TestCaseOrderer(
        "FirebaseAdmin.IntegrationTests.TestRankOrderer", "FirebaseAdmin.IntegrationTests")]
    public class TenantManagerTest : IClassFixture<TenantFixture>
    {
        private readonly TenantFixture fixture;

        public TenantManagerTest(TenantFixture fixture)
        {
            this.fixture = fixture;
        }

        [Fact]
        [TestRank(0)]
        public void CreateTenant()
        {
            var tenant = this.fixture.Tenant;

            Assert.Equal("admin-dotnet-tenant", tenant.DisplayName);
            Assert.True(tenant.PasswordSignUpAllowed);
            Assert.True(tenant.EmailLinkSignInEnabled);
        }

        [Fact]
        [TestRank(10)]
        public async Task GetTenant()
        {
            var tenant = await FirebaseAuth.DefaultInstance.TenantManager
                .GetTenantAsync(this.fixture.TenantId);

            Assert.Equal(this.fixture.TenantId, tenant.TenantId);
            Assert.Equal("admin-dotnet-tenant", tenant.DisplayName);
            Assert.True(tenant.PasswordSignUpAllowed);
            Assert.True(tenant.EmailLinkSignInEnabled);
        }

        [Fact]
        [TestRank(10)]
        public async Task ListTenants()
        {
            Tenant tenant = null;

            var pagedEnumerable = FirebaseAuth.DefaultInstance.TenantManager
                .ListTenantsAsync(null);
            var enumerator = pagedEnumerable.GetAsyncEnumerator();
            while (await enumerator.MoveNextAsync())
            {
                if (enumerator.Current.TenantId == this.fixture.TenantId)
                {
                    tenant = enumerator.Current;
                    break;
                }
            }

            Assert.NotNull(tenant);
            Assert.Equal(this.fixture.TenantId, tenant.TenantId);
            Assert.Equal("admin-dotnet-tenant", tenant.DisplayName);
            Assert.True(tenant.PasswordSignUpAllowed);
            Assert.True(tenant.EmailLinkSignInEnabled);
        }

        [Fact]
        [TestRank(20)]
        public async Task UpdateTenant()
        {
            var args = new TenantArgs
            {
                DisplayName = "new-dotnet-tenant",
                PasswordSignUpAllowed = false,
                EmailLinkSignInEnabled = false,
            };

            var tenant = await FirebaseAuth.DefaultInstance.TenantManager
                .UpdateTenantAsync(this.fixture.TenantId, args);

            Assert.Equal(this.fixture.TenantId, tenant.TenantId);
            Assert.Equal("new-dotnet-tenant", tenant.DisplayName);
            Assert.False(tenant.PasswordSignUpAllowed);
            Assert.False(tenant.EmailLinkSignInEnabled);
        }

        [Fact]
        [TestRank(30)]
        public async Task DeleteTenant()
        {
            var tenantId = this.fixture.TenantId;
            await FirebaseAuth.DefaultInstance.TenantManager.DeleteTenantAsync(tenantId);

            this.fixture.Tenant = null;

            var exception = await Assert.ThrowsAsync<FirebaseAuthException>(
                () => FirebaseAuth.DefaultInstance.TenantManager.GetTenantAsync(tenantId));
            Assert.Equal(ErrorCode.NotFound, exception.ErrorCode);
            Assert.Equal(AuthErrorCode.TenantNotFound, exception.AuthErrorCode);
        }
    }
}


text:
package org.apache.flink.runtime.io.network.partition.consumer;

import org.apache.flink.core.memory.DataInputView;
import org.apache.flink.core.memory.DataOutputView;
import org.apache.flink.runtime.event.RuntimeEvent;

/**
 * This event marks a {@link RecoveredInputChannel} as fully consumed.
 */
public class EndOfChannelStateEvent extends RuntimeEvent {

	/** The singleton instance of this event. */
	public static final EndOfChannelStateEvent INSTANCE = new EndOfChannelStateEvent();

	// ------------------------------------------------------------------------

	// not instantiable
	private EndOfChannelStateEvent() {}

	// ------------------------------------------------------------------------

	@Override
	public void read(DataInputView in) {
		// Nothing to do here
	}

	@Override
	public void write(DataOutputView out) {
		// Nothing to do here
	}

	// ------------------------------------------------------------------------

	@Override
	public int hashCode() {
		return 1965146670;
	}

	@Override
	public boolean equals(Object obj) {
		return obj != null && obj.getClass() == EndOfChannelStateEvent.class;
	}

	@Override
	public String toString() {
		return getClass().getSimpleName();
	}
}


text:
package org.jetbrains.idea.maven.utils;

import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.components.AbstractProjectComponent;
import com.intellij.openapi.project.Project;

public abstract class MavenSimpleProjectComponent extends AbstractProjectComponent {
  protected MavenSimpleProjectComponent(Project project) {
    super(project);
  }

  protected boolean isNormalProject() {
    return !isUnitTestMode() && !isHeadless() && !isDefault();
  }

  protected boolean isNoBackgroundMode() {
    return MavenUtil.isNoBackgroundMode();
  }

  protected boolean isUnitTestMode() {
    return ApplicationManager.getApplication().isUnitTestMode();
  }

  protected boolean isHeadless() {
    return ApplicationManager.getApplication().isHeadlessEnvironment();
  }

  protected boolean isDefault() {
    return myProject.isDefault();
  }
}


text:
import React from "react";
import Logo from "./Logo";
import Image from "./Image";
import SocialContainer from "./SocialContainer";
import "../css/ImageContainer.css";

const ImageContainer = () => {
  return (
    <div className="image-container">
      <Image />
      <Logo />
      <SocialContainer />
    </div>
  );
};

export default ImageContainer;


text:
/*
 * This file is part of the \BlueLaTeX project.
 *
 * 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 gnieh.blue
package couch

import gnieh.sohva.IdRev

import permission.{
  Phase,
  Role,
  Permission
}

/** Phase component that can be attached to a paper entity.
 *  It associates the current phase to a paper and the next allowed phases as well
 *  as the permissions for this phase.
 *
 *  @author Lucas Satabin
 */
case class PaperPhase(_id: String, phase: String, permissions: Map[String, Set[Permission]], next: List[Phase]) extends IdRev


text:
// -*- coding: gb2312-dos -*-

#ifndef _VIRTUALDEVICE_H
#define _VIRTUALDEVICE_H

#if defined __WIN32 || defined __WIN64 || defined WIN32 || defined WIN64
#define WINDOWS
#endif

#include "stdint.h"
#include <string>
#include "Inc/Iniparser/ini.h"
#include "Inc/color_print/color_print.h"
#include "Inc/MVErrorDefine.h"
#include "Inc/MVGigEVisionDeviceDefine.h"
#include "Inc/MVGiGEVisionGVCPRegisterDefine.h"
#include "Inc/MV_CrossPlatform/MV_CrossPlatform.h"

#include "Device.h"

#define MV_GEV_BOOTSTRAP_REG_SIZE 0xA000
#define MV_GEV_REG_MEMORY_SIZE    (1 << 20)  // 1MB

#define MV_GEV_XML_FILE_MAX_SIZE  (1 << 20)  // 1MB
#define MV_GEV_XML_URL_LEN        512

// TODO: from XML
#define REG_XML_AcquisitionStart_RegAddr  0x00030804
#define REG_XML_AcquisitionStop_RegAddr   0x00030808
#define REG_XML_Width_RegAddr             0x00030360
#define REG_XML_Height_RegAddr            0x000303a0
#define REG_XML_OffsetX_RegAddr           0x000303e0
#define REG_XML_OffsetY_RegAddr           0x00030420

class VirtualDevice : public Device
{
  public:
    VirtualDevice(const char* szXmlFileName, const char* szDeviceIni);
    virtual ~VirtualDevice();

    // No copying allowed
    VirtualDevice(const VirtualDevice&);
    void operator=(const VirtualDevice&);

    int Init();
    int DeInit();

    const MvCamCtrl::MV_CC_DEVICE_INFO* GetDeviceInfo();

    int GetReg(virtual_addr_t RegAddr, uint32_t& Data);
    inline uint32_t GetReg(virtual_addr_t RegAddr);
    int SetReg(virtual_addr_t RegAddr, const uint32_t Data);
    int GetMem(virtual_addr_t MemAddr, void* Data, const size_t Count);
    int SetMem(virtual_addr_t MemAddr, const void* Data, const size_t Count);

    uint32_t GetAcquisitionState();
    void SetTriggerFrequency(double frequency);
    uint32_t GetControlChannelPrivilege();
    void SetControlChannelPrivilege(uint32_t privilege);
    uint32_t GetPayload();
    uint32_t GetHeartbeatTimeout();

    bool IsCancel();

  private:
    int InitVtMem();

  private:
    bool                         _bCancel;
    MvCamCtrl::MV_CC_DEVICE_INFO _DeviceInfo;
    std::string                  _strXmlFileName;
    uint32_t                     _nXmlFileSize;

    double                       _fTriggerFrequency;  // TODO

    // Virtual things
    std::string    _strDeviceBinFilename;
    INI::Parser    _iniDeviceInfo;

    virtual_addr_t _pVtMem;
    uint32_t       _VtMemSize;

    // Color print
    cp_state_ptr   _cp;
};

#endif /* _VIRTUALDEVICE_H */


text:
import Items from '../Items';

const SEQUENCES = [
    [Items.Slingshot, Items.Shortbow, Items.Longbow],
    [Items.Stick, Items.Dagger, Items.Shortsword, Items.Longsword],
    [Items.LightArmor, Items.MediumArmor, Items.HeavyArmor]
];

export default {
    is(item1) {
        return {
            strictlyBetterThan(item2) {
                return !!SEQUENCES.find(list => {
                    const index1 = list.findIndex(Constructor => item1 instanceof Constructor);
                    const index2 = list.findIndex(Constructor => item2 instanceof Constructor);
                    return index1 !== -1 && index2 !== -1 && index1 > index2;
                });
            }
        };
    }
};


text:
/* tslint:disable */
import { Injectable, Inject, Optional } from '@angular/core';
import { Http, Response } from '@angular/http';
import { SDKModels } from './SDKModels';
import { BaseLoopBackApi } from '../core/base.service';
import { LoopBackConfig } from '../../lb.config';
import { LoopBackAuth } from '../core/auth.service';
import { LoopBackFilter,  } from '../../models/BaseModels';
import { JSONSearchParams } from '../core/search.params';
import { ErrorHandler } from '../core/error.service';
import { Subject } from 'rxjs/Subject';
import { Observable } from 'rxjs/Rx';
import { Pledge } from '../../models/Pledge';
import { Devotee } from '../../models/Devotee';
import { DonationTypeMaster } from '../../models/DonationTypeMaster';

/**
 * Api services for the `Pledge` model.
 */
@Injectable()
export class PledgeApi extends BaseLoopBackApi {

  constructor(
    @Inject(Http) protected http: Http,
    @Inject(SDKModels) protected models: SDKModels,
    @Inject(LoopBackAuth) protected auth: LoopBackAuth,
    @Inject(JSONSearchParams) protected searchParams: JSONSearchParams,
    @Optional() @Inject(ErrorHandler) protected errorHandler: ErrorHandler
  ) {
    super(http,  models, auth, searchParams, errorHandler);
  }

  /**
   * Fetches belongsTo relation fkPledgeDevotee2rel.
   *
   * @param {any} id Pledge id
   *
   * @param {boolean} refresh
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   *
   * (The remote method definition does not provide any description.
   * This usually means the response is a `Pledge` object.)
   *
   */
  public getFkPledgeDevotee2rel(id: any, refresh: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "GET";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/Pledges/:id/fkPledgeDevotee2rel";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    if (typeof refresh !== 'undefined' && refresh !== null) _urlParams.refresh = refresh;
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }

  /**
   * Fetches belongsTo relation fkPledgeDonationTypeMaster1rel.
   *
   * @param {any} id Pledge id
   *
   * @param {boolean} refresh
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   *
   * (The remote method definition does not provide any description.
   * This usually means the response is a `Pledge` object.)
   *
   */
  public getFkPledgeDonationTypeMaster1rel(id: any, refresh: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "GET";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/Pledges/:id/fkPledgeDonationTypeMaster1rel";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    if (typeof refresh !== 'undefined' && refresh !== null) _urlParams.refresh = refresh;
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }

  /**
   * Patch an existing model instance or insert a new one into the data source.
   *
   * @param {object} data Request data.
   *
   *  - `data` – `{object}` - Model instance data
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   *
   * (The remote method definition does not provide any description.
   * This usually means the response is a `Pledge` object.)
   *
   */
  public patchOrCreate(data: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "PATCH";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/Pledges";
    let _routeParams: any = {};
    let _postBody: any = {
      data: data
    };
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }

  /**
   * Patch attributes for a model instance and persist it into the data source.
   *
   * @param {any} id Pledge id
   *
   * @param {object} data Request data.
   *
   *  - `data` – `{object}` - An object of model property name/value pairs
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   *
   * (The remote method definition does not provide any description.
   * This usually means the response is a `Pledge` object.)
   *
   */
  public patchAttributes(id: any, data: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "PATCH";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/Pledges/:id";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {
      data: data
    };
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }

  /**
   * The name of the model represented by this $resource,
   * i.e. `Pledge`.
   */
  public getModelName() {
    return "Pledge";
  }
}


text:
var boshService = "http://sox.ht.sfc.keio.ac.jp:5280/http-bind/";
var xmppServer = "sox.ht.sfc.keio.ac.jp";
var jid = "guest@sox.ht.sfc.keio.ac.jp";
var password = "miroguest";

window.onload = function() {
	// $("#content").html("hoge");

	var client = new SoxClient(boshService, xmppServer, jid, password);

	var soxEventListener = new SoxEventListener();
	soxEventListener.connected = function(soxEvent) {
		console.log("[main.js] Connected " + soxEvent.soxClient);
		status("Connected: " + soxEvent.soxClient);
		client.unsubscribeAll();
	};
	soxEventListener.connectionFailed = function(soxEvent) {
		console.log("[main.js] Connection Failed " + soxEvent.soxClient);
		status("Connection Failed: " + soxEvent.soxClient);
	};
	soxEventListener.unsubscribed = function(soxEvent) {
		status("Unsubscribed: " + soxEvent.device);
	};
	soxEventListener.subscriptionFailed = function(soxEvent) {
		status("Unsubscription Failed: " + soxEvent.device);
	};
	soxEventListener.metaDataReceived = function(soxEvent) {
		/**
		 * SoXサーバからデバイスのメタ情報を受信すると呼ばれる。
		 * 受信したメタ情報に基づいて、Device内にTransducerインスタンスが生成されている。
		 */
		status("Meta data received: " + soxEvent.device);
	};
	soxEventListener.sensorDataReceived = function(soxEvent) {
		/**
		 * SoXサーバからセンサデータを受信すると呼ばれる。
		 * 受信したデータはTransducerインスタンスにセットされ、そのTransducerがイベントオブジェクトとして渡される。
		 */
		status("Sensor data received: " + soxEvent.device);
	};
	client.setSoxEventListener(soxEventListener);
	client.connect();
};

function status(message) {
	var html = (new Date().toLocaleString())+" [main.js] "+message+"
\n"+$("#status").html();
	$("#status").html(html);
}


text:
![header](resources/images/header.png)

## Build Status
| Linux / OSX       | Windows           |
| ----------------- | ----------------- |
| [![tr_bs]][tr_lk] | [![av_bs]][av_lk] |

<!-- BUILD STATUS REFERENCE LINKS -->
[tr_lk]: https://travis-ci.org/ionProject/ionEngine
[tr_bs]: https://travis-ci.org/ionProject/ionEngine.svg?branch=master
[av_lk]: https://ci.appveyor.com/project/K-Finlay/ionengine
[av_bs]: https://ci.appveyor.com/api/projects/status/j8oxkuk94geccy70?svg=true


text:
@implementation RegisterSqliteHelper

- (NSString *)tableName{
    return @"Register";
}
- (BOOL)createTable{
    __block BOOL ret = NO;
    [ChatServerClient inDatabase:^(FMDatabase *db) {
        NSString *sql = [NSString stringWithFormat:@"create table if not exists %@ \
                         (account text primary key,\
                         userid integer,\
                         password text,\
                         phone text,\
                         state integer,\
                         socket integer,\
                         address text,\
                         reserved0 text,\
                         reserved1 text,\
                         reserved2 text,\
                         reserved3 text,\
                         reserved4 text);", [self tableName]];
        ret = [db executeUpdate:sql];
    }];
    return ret;
}
- (BOOL)updateTable:(NSInteger)version{
    return YES;
}

- (BOOL)deleteWithUserid:(uint64_t)userid{
    __block BOOL ret = NO;

    [ChatServerClient inDatabase:^(FMDatabase *db) {
        NSString *sql = [NSString stringWithFormat:@"delete from %@ where userid = '%lld';", [self tableName], userid];
        ret = [db executeUpdate:sql];
    }];
    return ret;
}

- (BOOL)updateTableWithModel:(RegisterModel *)model{
    if (model.userid <= 0) {
        return NO;
    }
    __block BOOL ret = NO;
    NSMutableString *update = [NSMutableString string];
    if (model.phone) {
        [update appendFormat:@"phone = '%@'", model.phone];
    }
    if (model.password) {
        if (update.length) [update appendString:@" "];
        [update appendFormat:@"password = '%@'", model.password];
    }
    if (model.state) {
        if (update.length) [update appendString:@" "];
        [update appendFormat:@"state = '%d'", model.state];
    }
    if (model.socket) {
        if (update.length) [update appendString:@" "];
        [update appendFormat:@"state = '%d'", (int)model.socket];
    }
    if (model.address) {
        if (update.length) [update appendString:@" "];
        [update appendFormat:@"address = '%@'", model.address];
    }
    [ChatServerClient inDatabase:^(FMDatabase *db) {
        NSString *sql = [NSString stringWithFormat:@"update %@ set %@ where userid = '%lld';", [self tableName], update, model.userid];
        ret = [db executeUpdate:sql];
    }];
    return ret;
}

- (BOOL)updatePhone:(NSString *)phone withUserid:(uint64_t)userid{
    RegisterModel *m = [[RegisterModel alloc] initWithUserId:userid account:nil password:nil phone:phone state:0];
    return [self updateTableWithModel:m];
}
- (BOOL)updateState:(RegisterState)state withUserid:(uint64_t)userid{
    RegisterModel *m = [[RegisterModel alloc] initWithUserId:userid account:nil password:nil phone:nil state:state];
    return [self updateTableWithModel:m];
}
- (BOOL)updatePassword:(NSString *)password withUserid:(uint64_t)userid{
    RegisterModel *m = [[RegisterModel alloc] initWithUserId:userid account:nil password:password phone:nil state:0];
    return [self updateTableWithModel:m];
}
- (BOOL)updateSocketKey:(NSUInteger)socketKey address:(NSString *)address withUserid:(uint64_t)userid{
    RegisterModel *m = [[RegisterModel alloc] init];
    m.userid = userid;
    m.socket = socketKey;
    m.address = address;
    return [self updateTableWithModel:m];
}
- (RegisterModel *)quaryWithAccount:(NSString *)account{
    __block RegisterModel *registerM = nil;
    [ChatServerClient inDatabase:^(FMDatabase *db) {
        NSString *sql = [NSString stringWithFormat:@"select * from %@ where account = '%@';", [self tableName], account];
        FMResultSet *set = [db executeQuery:sql];
        if ([set next]) {
            NSDictionary *dict = [self _tansferDictWithSet:set];
            registerM = [[RegisterModel alloc] init];
            [registerM setValuesForKeysWithDictionary:dict];
        }
        [set close];
    }];
    return registerM;
}

- (RegisterModel *)quaryWithUserid:(uint64_t)userid{
    __block RegisterModel *registerM = nil;
    [ChatServerClient inDatabase:^(FMDatabase *db) {
        NSString *sql = [NSString stringWithFormat:@"select * from %@ where userid = '%lld';", [self tableName], userid];
        FMResultSet *set = [db executeQuery:sql];

        if ([set next]) {
            NSDictionary *dict = [self _tansferDictWithSet:set];
            registerM = [[RegisterModel alloc] init];
            [registerM setValuesForKeysWithDictionary:dict];
        }
        [set close];
    }];
    return registerM;
}

- (NSDictionary *)_tansferDictWithSet:(FMResultSet *)set{
    NSMutableDictionary *dict = [NSMutableDictionary dictionary];
    dict[@"account"] = [set stringForColumn:@"account"];
    dict[@"password"] = [set stringForColumn:@"password"];
    dict[@"phone"] = [set stringForColumn:@"phone"];
    dict[@"state"] = @([set intForColumn:@"state"]);
    dict[@"userid"] = @([set longLongIntForColumn:@"userid"]);
    return dict;
}

- (BOOL)insertIntoTableWithModel:(RegisterModel *)model{
    __block BOOL ret = NO;
    [ChatServerClient inDatabase:^(FMDatabase *db) {
        NSString *sql = [NSString stringWithFormat:@"insert into %@ (account, password, state, userid, phone) values ('%@', '%@', '%d', '%lld', '%@');", [self tableName], model.account, model.password, model.state, model.userid, model.phone];
        ret = [db executeUpdate:sql];
    }];
    return ret;
}

- (NSInteger)quaryCount{
    __block NSInteger count = 0;
    [ChatServerClient inDatabase:^(FMDatabase *db) {
        NSString *sql = [NSString stringWithFormat:@"select count(*) from %@ where userid != 0;", [self tableName]];
        FMResultSet *set = [db executeQuery:sql];
        if ([set next]) {
            count = [set intForColumnIndex:0];
        }
        [set close];
    }];
    return count;

}
@end

@implementation RegisterModel

- (instancetype)initWithUserId:(uint64_t)userId account:(NSString *)account password:(NSString *)password phone:(NSString *)phone state:(RegisterState)state{
    self = [super init];
    if (self) {
        self.userid = userId; self.account = account; self.password = password;
        self.phone = phone; self.state = state;
    }
    return self;
}

- (void)setValue:(id)value forKey:(NSString *)key{
    [super setValue:value forKey:key];
}
- (void)setValue:(id)value forUndefinedKey:(NSString *)key{}

@end


text:
<!DOCTYPE html>

	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

	<title><?php echo $L['php_env_check'].' - '.$L['kod_name'].$L['kod_power_by'];?></title>
	<link href="<?php echo STATIC_PATH;?>images/common/favicon.ico" rel="Shortcut Icon">
	<link href="<?php echo STATIC_PATH;?>style/common.css?ver=<?php echo KOD_VERSION;?>" rel="stylesheet"/>
	<link href="./static/style/font-awesome/css/font-awesome.css?ver=<?php echo KOD_VERSION;?>" rel="stylesheet">

	<link href="<?php echo STATIC_PATH;?>style/login.css?ver=<?php echo KOD_VERSION;?>" rel="stylesheet">

	<?php
		$arr = array(8);
		$get = $arr[mt_rand(0,count($arr)-1)];
		$image = STATIC_PATH."images/wall_page/".$get.".jpg";
		echo '';
		echo '';
	?>

<?php echo $L['kod_name'];?>

——<?php echo $L['kod_name_desc'];?>

				Language

					<?php
				  		$tpl = "";
				  		foreach ($config['setting_all']['language'] as $key => $value) {
				  			$name = $value[0];
				  			$select = LANGUAGE_TYPE == $key ? "this":"";
				  			$tpl .= "
{$name}
";
				  		}
						echo $tpl;
					?>

<?php echo $L['php_env_check'];?>

			<?php
	            $error = php_env_check();
	            $login = $L['login'];
	            if ($error=='') {
	            	$login_info = str_replace(array("{0}","{1}","{2}"),array('admin','demo/demo','guest/guest'),$L['install_user_default']);
	            	echo '

Successful!
',$L['install_login'],'
'.$login_info.'
';
	            }else{
	            	echo '

error:
'.$error.'
';
	            	$login = $L['php_env_error_ignore'];
	            }
	            echo '
<input type="text" placeholder="'.$L['login_root_password'].'" autocomplete="off"/>
';
	            echo '
'.$login.'
';
	        ?>

<?php include(TEMPLATE.'common/footer.html');?>


text:
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using System;
using osuTK;

namespace osu.Framework.Graphics.Primitives
{
    public interface IPolygon
    {
        /// <summary>
        /// The vertices that define the axes spanned by this polygon in screen-space counter-clockwise orientation.
        /// </summary>
        /// <remarks>
        /// Counter-clockwise orientation in screen-space coordinates is equivalent to a clockwise orientation in standard coordinates.
        /// <para>
        /// E.g. For the set of vertices { (0, 0), (1, 0), (0, 1), (1, 1) }, a counter-clockwise orientation is { (0, 0), (0, 1), (1, 1), (1, 0) }.
        /// </para>
        /// </remarks>
        /// <returns>The vertices that define the axes spanned by this polygon.</returns>
        ReadOnlySpan<Vector2> GetAxisVertices();

        /// <summary>
        /// Retrieves the vertices of this polygon in screen-space counter-clockwise orientation.
        /// </summary>
        /// <remarks>
        /// Counter-clockwise orientation in screen-space coordinates is equivalent to a clockwise orientation in standard coordinates.
        /// <para>
        /// E.g. For the set of vertices { (0, 0), (1, 0), (0, 1), (1, 1) }, a counter-clockwise orientation is { (0, 0), (0, 1), (1, 1), (1, 0) }.
        /// </para>
        /// </remarks>
        /// <returns>The vertices of this polygon.</returns>
        ReadOnlySpan<Vector2> GetVertices();
    }
}


text:
import sys
import os
import imp
from qpid.testlib import TestBase010
from qpid.datatypes import Message
from qpid.queue import Empty
from time import sleep

def import_script(path):
    """
    Import executable script at path as a module.
    Requires some trickery as scripts are not in standard module format
    """
    f = open(path)
    try:
        name=os.path.split(path)[1].replace("-","_")
        return imp.load_module(name, f, path, ("", "r", imp.PY_SOURCE))
    finally: f.close()

def checkenv(name):
    value = os.getenv(name)
    if not value: raise Exception("Environment variable %s is not set" % name)
    return value

class CliTests(TestBase010):

    def remote_host(self):
        return self.defines.get("remote-host", "localhost")

    def remote_port(self):
        return int(self.defines["remote-port"])

    def cli_dir(self):
        return self.defines["cli-dir"]

    def makeQueue(self, qname, arguments, api=False):
        if api:
            ret = self.qpid_config_api(" add queue " + qname + " " + arguments)
        else:
            ret = os.system(self.qpid_config_command(" add queue " + qname  + " " + arguments))

        self.assertEqual(ret, 0)
        queue = self.broker_access.getQueue(qname)
        if queue:
            return queue
        assert False

    def test_queue_params(self):
        self.startBrokerAccess()
        queue1 = self.makeQueue("test_queue_params1", "--limit-policy none")
        queue2 = self.makeQueue("test_queue_params2", "--limit-policy reject")
        queue3 = self.makeQueue("test_queue_params3", "--limit-policy ring")

        LIMIT = "qpid.policy_type"
        assert LIMIT not in queue1.arguments
        self.assertEqual(queue2.arguments[LIMIT], "reject")
        self.assertEqual(queue3.arguments[LIMIT], "ring")

        queue4 = self.makeQueue("test_queue_params4", "--lvq-key lkey")

        LVQKEY = "qpid.last_value_queue_key"

        assert LVQKEY not in queue3.arguments
        assert LVQKEY     in queue4.arguments
        assert queue4.arguments[LVQKEY] == "lkey"

    def test_queue_params_api(self):
        self.startBrokerAccess()
        queue1 = self.makeQueue("test_queue_params_api1", "--limit-policy none", True)
        queue2 = self.makeQueue("test_queue_params_api2", "--limit-policy reject", True)
        queue3 = self.makeQueue("test_queue_params_api3", "--limit-policy ring", True)

        LIMIT = "qpid.policy_type"
        assert LIMIT not in queue1.arguments
        self.assertEqual(queue2.arguments[LIMIT], "reject")
        self.assertEqual(queue3.arguments[LIMIT], "ring")

        queue4 = self.makeQueue("test_queue_params_api4", "--lvq-key lkey")

        LVQKEY = "qpid.last_value_queue_key"

        assert LVQKEY not in queue3.arguments
        assert LVQKEY     in queue4.arguments
        assert queue4.arguments[LVQKEY] == "lkey"

    def test_qpid_config(self):
        self.startBrokerAccess();
        qname = "test_qpid_config"

        ret = os.system(self.qpid_config_command(" add queue " + qname))
        self.assertEqual(ret, 0)
        queues = self.broker_access.getAllQueues()
        found = False
        for queue in queues:
            if queue.name == qname:
                self.assertEqual(queue.durable, False)
                found = True
        self.assertEqual(found, True)

        ret = os.system(self.qpid_config_command(" del queue " + qname))
        self.assertEqual(ret, 0)
        queues = self.broker_access.getAllQueues()
        found = False
        for queue in queues:
            if queue.name == qname:
                found = True
        self.assertEqual(found, False)

    def test_qpid_config_del_nonempty_queue(self):
        self.startBrokerAccess();
        qname = "test_qpid_config_del"

        ret = os.system(self.qpid_config_command(" add queue " + qname))
        self.assertEqual(ret, 0)
        queues = self.broker_access.getAllQueues()
        found = False
        for queue in queues:
            if queue.name == qname:
                self.assertEqual(queue.durable, False)
                found = True
        self.assertEqual(found, True)

        self.startBrokerAccess()

        sess = self.broker_conn.session()
        tx = sess.sender(qname)
        tx.send("MESSAGE")

        ret = os.system(self.qpid_config_command(" del queue " + qname))
        queues = self.broker_access.getAllQueues()
        found = False
        for queue in queues:
            if queue.name == qname:
                found = True
        self.assertEqual(found, True)

        ret = os.system(self.qpid_config_command(" del queue " + qname + " --force"))
        self.assertEqual(ret, 0)
        queues = self.broker_access.getAllQueues()
        found = False
        for queue in queues:
            if queue.name == qname:
                found = True
        self.assertEqual(found, False)

    def test_qpid_config_api(self):
        self.startBrokerAccess();
        qname = "test_qpid_config_api"

        ret = self.qpid_config_api(" add queue " + qname)
        self.assertEqual(ret, 0)
        queues = self.broker_access.getAllQueues()
        found = False
        for queue in queues:
            if queue.name == qname:
                self.assertEqual(queue.durable, False)
                found = True
        self.assertEqual(found, True)

        ret = self.qpid_config_api(" del queue " + qname)
        self.assertEqual(ret, 0)
        queues = self.broker_access.getAllQueues()
        found = False
        for queue in queues:
            if queue.name == qname:
                found = True
        self.assertEqual(found, False)

    def test_qpid_config_sasl_plain_expect_succeed(self):
        self.startBrokerAccess();
        qname = "test_qpid_config_sasl_plain_expect_succeed"
        cmd = " --sasl-mechanism PLAIN -b guest/guest@localhost:"+str(self.broker.port) + " add queue " + qname
        ret = self.qpid_config_api(cmd)
        self.assertEqual(ret, 0)

    def test_qpid_config_sasl_plain_expect_fail(self):
        """Fails because no user name and password is supplied"""
        self.startBrokerAccess();
        qname = "test_qpid_config_sasl_plain_expect_fail"
        cmd = " --sasl-mechanism PLAIN -b localhost:"+str(self.broker.port) + " add queue " + qname
        ret = self.qpid_config_api(cmd)
        assert ret != 0

        # helpers for some of the test methods
    def helper_find_exchange(self, xchgname, typ, expected=True):
        xchgs = self.broker_access.getAllExchanges()
        found = False
        for xchg in xchgs:
            if xchg.name == xchgname:
                if typ:
                    self.assertEqual(xchg.type, typ)
                found = True
        self.assertEqual(found, expected)

    def helper_create_exchange(self, xchgname, typ="direct", opts=""):
        foo = self.qpid_config_command(opts + " add exchange " + typ + " " + xchgname)
        # print foo
        ret = os.system(foo)
        self.assertEqual(ret, 0)
        self.helper_find_exchange(xchgname, typ, True)

    def helper_destroy_exchange(self, xchgname):
        foo = self.qpid_config_command(" del exchange " + xchgname)
        # print foo
        ret = os.system(foo)
        self.assertEqual(ret, 0)
        self.helper_find_exchange(xchgname, False, expected=False)

    def helper_find_queue(self, qname, expected=True):
        queues = self.broker_access.getAllQueues()
        found = False
        for queue in queues:
            if queue.name == qname:
                self.assertEqual(queue.durable, False)
                found = True
        self.assertEqual(found, expected)

    def helper_create_queue(self, qname):
        foo = self.qpid_config_command(" add queue " + qname)
        # print foo
        ret = os.system(foo)
        self.assertEqual(ret, 0)
        self.helper_find_queue(qname, True)

    def helper_destroy_queue(self, qname):
        foo = self.qpid_config_command(" del queue " + qname)
        # print foo
        ret = os.system(foo)
        self.assertEqual(ret, 0)
        self.helper_find_queue(qname, False)

        # test the bind-queue-to-header-exchange functionality
    def test_qpid_config_headers(self):
        self.startBrokerAccess();
        qname = "test_qpid_config"
        xchgname = "test_xchg"

        # first create a header xchg
        self.helper_create_exchange(xchgname, typ="headers")

        # create the queue
        self.helper_create_queue(qname)

        # now bind the queue to the xchg
        foo = self.qpid_config_command(" bind " + xchgname + " " + qname +
                                     " key all foo=bar baz=quux")
        # print foo
        ret = os.system(foo)
        self.assertEqual(ret, 0)

        # he likes it, mikey.  Ok, now tear it all down.  first the binding
        ret = os.system(self.qpid_config_command(" unbind " + xchgname + " " + qname +
                                     " key"))
        self.assertEqual(ret, 0)

        # then the queue
        self.helper_destroy_queue(qname)

        # then the exchange
        self.helper_destroy_exchange(xchgname)

    def test_qpid_config_xml(self):
        self.startBrokerAccess();
        qname = "test_qpid_config"
        xchgname = "test_xchg"

        # first create a header xchg
        self.helper_create_exchange(xchgname, typ="xml")

        # create the queue
        self.helper_create_queue(qname)

        # now bind the queue to the xchg
        foo = self.qpid_config_command("-f test.xquery bind " + xchgname + " " + qname)
        # print foo
        ret = os.system(foo)
        self.assertEqual(ret, 0)

        # he likes it, mikey.  Ok, now tear it all down.  first the binding
        ret = os.system(self.qpid_config_command(" unbind " + xchgname + " " + qname +
                                     " key"))
        self.assertEqual(ret, 0)

        # then the queue
        self.helper_destroy_queue(qname)

        # then the exchange
        self.helper_destroy_exchange(xchgname)

    def test_qpid_config_durable(self):
        self.startBrokerAccess();
        qname = "test_qpid_config"

        ret = os.system(self.qpid_config_command(" add queue --durable " + qname))
        self.assertEqual(ret, 0)
        queues = self.broker_access.getAllQueues()
        found = False
        for queue in queues:
            if queue.name == qname:
                self.assertEqual(queue.durable, True)
                found = True
        self.assertEqual(found, True)

        ret = os.system(self.qpid_config_command(" del queue " + qname))
        self.assertEqual(ret, 0)
        queues = self.broker_access.getAllQueues()
        found = False
        for queue in queues:
            if queue.name == qname:
                found = True
        self.assertEqual(found, False)

    def test_qpid_config_altex(self):
        self.startBrokerAccess();
        exName = "testalt"
        qName = "testqalt"
        altName = "amq.direct"

        ret = os.system(self.qpid_config_command(" add exchange topic %s --alternate-exchange=%s" % (exName, altName)))
        self.assertEqual(ret, 0)

        exchanges = self.broker_access.getAllExchanges()
        found = False
        for exchange in exchanges:
            if exchange.name == altName:
                self.assertEqual(exchange.altExchange, None)

            if exchange.name == exName:
                found = True
                if not exchange.altExchange:
                    self.fail("Alternate exchange not set")
                self.assertEqual(exchange.altExchange, altName)
        self.assertEqual(found, True)

        ret = os.system(self.qpid_config_command(" add queue %s --alternate-exchange=%s" % (qName, altName)))
        self.assertEqual(ret, 0)

        ret = os.system(self.qpid_config_command(" queues"))
        self.assertEqual(ret, 0)

        queues = self.broker_access.getAllQueues()
        found = False
        for queue in queues:
            if queue.name == qName:
                found = True
                if not queue.altExchange:
                    self.fail("Alternate exchange not set")
                self.assertEqual(queue.altExchange, altName)
        self.assertEqual(found, True)

    def test_qpid_config_list_queues_arguments(self):
        """
        Test to verify that when the type of a policy limit is
        actually a string (though still a valid value), it does not
        upset qpid-config
        """
        self.startBrokerAccess();

        names = ["queue_capacity%s" % (i) for i in range(1, 6)]
        for name in names:
            self.session.queue_declare(queue=name, exclusive=True,
                                       arguments={'qpid.max_count' : str(i), 'qpid.max_size': '100'})

        output = os.popen(self.qpid_config_command(" queues")).readlines()
        queues = [line.split()[0] for line in output[2:len(output)]] #ignore first two lines (header)

        for name in names:
            assert name in queues, "%s not in %s" % (name, queues)

    def test_qpid_route(self):
        self.startBrokerAccess();

        command = self.cli_dir() + "/qpid-route dynamic add guest/guest@localhost:%d %s:%d amq.topic" %\
            (self.broker.port, self.remote_host(), self.remote_port())
        ret = os.system(command)
        self.assertEqual(ret, 0)

        links = self.broker_access.getAllLinks()
        found = False
        for link in links:
            if link.port == self.remote_port():
                found = True
        self.assertEqual(found, True)

    def test_qpid_route_api(self):
        self.startBrokerAccess();

        ret = self.qpid_route_api("dynamic add "
                                  + "guest/guest@localhost:"+str(self.broker.port) + " "
                                  + str(self.remote_host())+":"+str(self.remote_port()) + " "
                                  +"amq.direct")

        self.assertEqual(ret, 0)

        links = self.broker_access.getAllLinks()
        found = False
        for link in links:
            if link.port == self.remote_port():
                found = True
        self.assertEqual(found, True)

    def test_qpid_route_api(self):
        self.startBrokerAccess();

        ret = self.qpid_route_api("dynamic add "
                                  + " --client-sasl-mechanism PLAIN "
                                  + "guest/guest@localhost:"+str(self.broker.port) + " "
                                  + str(self.remote_host())+":"+str(self.remote_port()) + " "
                                  +"amq.direct")

        self.assertEqual(ret, 0)

        links = self.broker_access.getAllLinks()
        found = False
        for link in links:
            if link.port == self.remote_port():
                found = True
        self.assertEqual(found, True)

    def test_qpid_route_api_expect_fail(self):
        self.startBrokerAccess();

        ret = self.qpid_route_api("dynamic add "
                                  + " --client-sasl-mechanism PLAIN "
                                  + "localhost:"+str(self.broker.port) + " "
                                  + str(self.remote_host())+":"+str(self.remote_port()) + " "
                                  +"amq.direct")
        assert ret != 0

    def getProperty(self, msg, name):
        for h in msg.headers:
            if hasattr(h, name): return getattr(h, name)
        return None

    def getAppHeader(self, msg, name):
        headers = self.getProperty(msg, "application_headers")
        if headers:
            return headers[name]
        return None

    def qpid_config_command(self, arg = ""):
        return self.cli_dir() + "/qpid-config -b localhost:%d" % self.broker.port + " " + arg

    def qpid_config_api(self, arg = ""):
        script = import_script(checkenv("QPID_CONFIG_EXEC"))
        broker = ["-b", "localhost:"+str(self.broker.port)]
        return script.main(broker + arg.split())

    def qpid_route_api(self, arg = ""):
        script = import_script(checkenv("QPID_ROUTE_EXEC"))
        return script.main(arg.split())


text:
from bs4 import BeautifulSoup
import HTMLParser
h = HTMLParser.HTMLParser()
import json
from os import listdir
from os.path import isfile, join
alltext = open('alltext.txt', 'w')
jsoncatalog = open('jsoncatalog.txt', 'w')

# Get a list of all the XML files, one per issue (roughly 36k for The Financial Times 1888-2010)
thexmlfiles = [ file for file in listdir('FTXML') if isfile(join('FTXML',file))]

for thisxmlfile in thexmlfiles:
	print('Now Processing: ' + join('FTXML',thisxmlfile))
	xmlfile = open(join('FTXML',thisxmlfile), 'r')
	soup = BeautifulSoup(xmlfile)
	for article in soup.find_all('article'):
		for id in article.find_all('id'):
			thisid = id.string
			print("Found Article #" +  thisid)
		alltext.write(thisid + '\t')

		for link in article.find_all('permalink'):
			thispermalink =  link.string
			print("http://find.galegroup.com/ftha/infomark.do?docType=LTO&docLevel=FASCIMILE&prodId=FTHA&tabID=T003&searchType=AdvancedSearchForm&type=multipage&version=1.0&userGroupName=29002&docPage=article&docId=HS" + thispermalink + "&contentSet=LTO&source=gale")

		for headline in article.find_all('ti'):
			if headline.text:  #Test for empty headlines
				thisheadline = headline.string
			else:
				thisheadline = "Untitled"
			print("Its headline is " +  thisheadline)

		thissubhead = ''
		for subhead in article.find_all('ta'):
			if subhead.text:  #Test for empty subheadlines
				thissubhead += " — " + subhead.string
		print("Its subhead is " +  thissubhead)

		for category in article.find_all('ct'):
			thiscategory = category.string
			print("Categorized as " + thiscategory)
		metadata = { 'filename' : thisid, 'searchstring' : '' + thisheadline + thissubhead + '', 'category' : thiscategory }
		json.dump(metadata, jsoncatalog)

		for section in article.find_all('text.cr'):
			for word in section.find_all('wd'):
				if word.text:  #Test for empty words, which do exist and cause the de-entity-izer to freak
					unescapedword = h.unescape(word.string)
					alltext.write(unescapedword.encode('utf-8')+' ')
		alltext.write('\n')
	xmlfile.close()
jsoncatalog.close()
alltext.close()


text:
@protocol OrgHamcrestMatcher;

#include "J2ObjC_header.h"
#include "java/io/Serializable.h"
#include "org/mockito/ArgumentMatcher.h"
#include "org/mockito/internal/matchers/VarargMatcher.h"

#define OrgMockitoInternalMatchersAnyVararg_serialVersionUID 1700721373094731555LL

@interface OrgMockitoInternalMatchersAnyVararg : OrgMockitoArgumentMatcher < OrgMockitoInternalMatchersVarargMatcher, JavaIoSerializable > {
}

- (jboolean)matchesWithId:(id)arg;

- (instancetype)init;

@end

FOUNDATION_EXPORT BOOL OrgMockitoInternalMatchersAnyVararg_initialized;
J2OBJC_STATIC_INIT(OrgMockitoInternalMatchersAnyVararg)

CF_EXTERN_C_BEGIN

J2OBJC_STATIC_FIELD_GETTER(OrgMockitoInternalMatchersAnyVararg, serialVersionUID, jlong)

FOUNDATION_EXPORT id<OrgHamcrestMatcher> OrgMockitoInternalMatchersAnyVararg_ANY_VARARG_;
J2OBJC_STATIC_FIELD_GETTER(OrgMockitoInternalMatchersAnyVararg, ANY_VARARG_, id<OrgHamcrestMatcher>)
CF_EXTERN_C_END

J2OBJC_TYPE_LITERAL_HEADER(OrgMockitoInternalMatchersAnyVararg)

#endif // _OrgMockitoInternalMatchersAnyVararg_H_


text:
package com.tencent.connect.avatar;

import android.content.Context;
import android.graphics.Bitmap;
import android.os.Bundle;
import com.tencent.connect.auth.QQToken;
import com.tencent.connect.common.BaseApi;
import com.tencent.tauth.IUiListener;
import com.tencent.utils.HttpUtils;
import java.io.ByteArrayOutputStream;

// Referenced classes of package com.tencent.connect.avatar:
//            ImageActivity

class e extends BaseApi
{

    final ImageActivity a;

    public e(ImageActivity imageactivity, Context context, QQToken qqtoken)
    {
        a = imageactivity;
        super(context, qqtoken);
    }

    public void a(Bitmap bitmap, IUiListener iuilistener)
    {
        Bundle bundle = composeCGIParams();
        ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream();
        bitmap.compress(android.graphics.Bitmap.CompressFormat.JPEG, 40, bytearrayoutputstream);
        byte abyte0[] = bytearrayoutputstream.toByteArray();
        bitmap.recycle();
        com.tencent.connect.common.BaseApi.TempRequestListener temprequestlistener = new com.tencent.connect.common.BaseApi.TempRequestListener(this, iuilistener);
        bundle.putByteArray("picture", abyte0);
        HttpUtils.requestAsync(mToken, mContext, "user/set_user_face", bundle, "POST", temprequestlistener);
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ibatorConfiguration
  PUBLIC "-//Apache Software Foundation//DTD Apache iBATIS Ibator Configuration 1.0//EN"
  "http://ibatis.apache.org/dtd/ibator-config_1_0.dtd">

<ibatorConfiguration>
	<classPathEntry location="E:/jars/ojdbc/ojdbc14_10.2.0.4.jar" />
	<ibatorContext id="FlatJava5" targetRuntime="Ibatis2Java5">
		<property name="suppressTypeWarnings" value="true" />
		<ibatorPlugin type="org.apache.ibatis.ibator.plugins.AnnotationPlugin" />
		<ibatorPlugin type="org.apache.ibatis.ibator.plugins.SerializablePlugin" />
		<ibatorPlugin type="org.apache.ibatis.ibator.plugins.PaginationPlugin" />

		<ibatorPlugin type="org.apache.ibatis.ibator.plugins.RenameExampleClassPlugin">
			<property name="searchString" value="Example$" />
			<property name="replaceString" value="Criteria" />
		</ibatorPlugin>
		<ibatorPlugin type="org.apache.ibatis.ibator.plugins.ServiceImplPlugin">
			<property name="targetPackage" value="com.whty.paialleltest.service" />
			<property name="implementationPackage" value="com.whty.paialleltest.service.impl" />
			<property name="targetProject" value="src" />
			<property name="enableInsert" value="true" />
			<property name="enableUpdateByExampleSelective" value="true" />
			<property name="enableInsertSelective" value="true" />
			<property name="enableUpdateByPrimaryKey" value="true" />
			<property name="enableDeleteByPrimaryKey" value="true" />
			<property name="enableDeleteByExample" value="true" />
			<property name="enableUpdateByPrimaryKeySelective" value="true" />
			<property name="enableUpdateByExample" value="true" />
		</ibatorPlugin>

		<ibatorPlugin type="org.apache.ibatis.ibator.plugins.SqlMapConfigPlugin">
			<property name="targetPackage" value="config.ibatis" />
			<property name="targetProject" value="src" />
		</ibatorPlugin>
		<jdbcConnection driverClass="oracle.jdbc.driver.OracleDriver" connectionURL="jdbc:oracle:thin:@10.8.4.249:1521:BROADCAS"
			userId="paialleltest" password="ty1234">
			<property name="remarksReporting" value="true" />
		</jdbcConnection>
		<javaModelGenerator targetPackage="com.whty.paialleltest.pojo" targetProject="src">
		</javaModelGenerator>

		<sqlMapGenerator targetPackage="com.whty.paialleltest.sqlmap" targetProject="src">
		</sqlMapGenerator>

		<daoGenerator type="SPRING" targetPackage="com.whty.paialleltest.dao" implementationPackage="com.whty.paialleltest.dao.impl"
			targetProject="src">
		</daoGenerator>

			<property name="ignoreQualifiersAtRuntime" value="true" />
			<property name="runtimeTableName" value="ProjectScript" />

			<property name="ignoreQualifiersAtRuntime" value="true" />
			<property name="runtimeTableName" value="Task" />

			<property name="ignoreQualifiersAtRuntime" value="true" />
			<property name="runtimeTableName" value="Project" />
			<columnOverride column="CREATE_TIME" jdbcType="Timestamp" />
			<columnOverride column="MODIFY_TIME" jdbcType="Timestamp" />

			<property name="ignoreQualifiersAtRuntime" value="true" />
			<property name="runtimeTableName" value="ProjectScript" />

			<property name="ignoreQualifiersAtRuntime" value="true" />
			<property name="runtimeTableName" value="Script" />
			<columnOverride column="CREATE_DATE" jdbcType="Timestamp" />
			<columnOverride column="UPDATE_DATE" jdbcType="Timestamp" />

			<property name="ignoreQualifiersAtRuntime" value="true" />
			<property name="runtimeTableName" value="User" />
			<columnOverride column="LAST_LOGIN_TIME" jdbcType="Timestamp" />

	</ibatorContext>
</ibatorConfiguration>


text:
/**
 *
 */
package br.com.dlp.jazz.svnhook.exceptions;

import br.com.dlp.jazz.svnhook.vos.CitationVO;

/**
 * Erro de negócio ao tentar efetuar o logtime
 * @author t_dpacifico
 */
public class JazzSVNHookLogTimeException extends JazzSVNHookException {

	/**
	 *
	 */
	private static final long serialVersionUID = -3906853842686251574L;
	private CitationVO citacaoIssueVO;

	/**
	 * construtor padrao
	 */
	public JazzSVNHookLogTimeException() {
		//explicity empty
	}

	/**
	 * @param arg0
	 */
	public JazzSVNHookLogTimeException(String arg0) {
		super(arg0);
	}

	/**
	 * @param arg0
	 */
	public JazzSVNHookLogTimeException(Throwable arg0) {
		super(arg0);
	}

	/**
	 * @param arg0
	 * @param arg1
	 */
	public JazzSVNHookLogTimeException(String arg0, Throwable arg1) {
		super(arg0, arg1);
	}

	/**
	 * @param citacaoIssueVO
	 * @param message
	 */
	public JazzSVNHookLogTimeException(CitationVO citacaoIssueVO, String message) {
		super(message);
		this.citacaoIssueVO = citacaoIssueVO;
	}

	/**
	 * @return the citacaoIssueVO
	 */
	public CitationVO getCitacaoIssueVO() {
		return citacaoIssueVO;
	}

	/**
	 * @param citacaoIssueVO the citacaoIssueVO to set
	 */
	public void setCitacaoIssueVO(CitationVO citacaoIssueVO) {
		this.citacaoIssueVO = citacaoIssueVO;
	}

}


text:
package org.frameworkset.util.annotations;

/**
 * restful 路径变量对象
 *
 * @author yinbp
 *
 */
public class PathVariableInfo implements java.io.Serializable{
	/**
	 *
	 */
	private String variable;
	private boolean last ;
	private String constantstr;
	private int postion;

	public PathVariableInfo() {
		// TODO Auto-generated constructor stub
	}

	public String getVariable() {
		return variable;
	}

	public void setVariable(String variable) {
		this.variable = variable;
	}

	public String getConstantstr() {
		return constantstr;
	}

	public void setConstantstr(String constantstr) {
		this.constantstr = constantstr;
	}

	public boolean isLast() {
		return last;
	}

	public void setLast(boolean last) {
		this.last = last;
	}

	public int getPostion() {
		return postion;
	}

	public void setPostion(int postion) {
		this.postion = postion;
	}

}


text:
package scheduler

// This file tests the Taint feature.

import (
	"fmt"
	"testing"
	"time"

	"k8s.io/api/core/v1"
	"k8s.io/apimachinery/pkg/api/resource"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/runtime/schema"
	utilfeature "k8s.io/apiserver/pkg/util/feature"
	"k8s.io/client-go/informers"
	"k8s.io/client-go/kubernetes"
	restclient "k8s.io/client-go/rest"
	"k8s.io/kubernetes/pkg/controller/nodelifecycle"
	"k8s.io/kubernetes/pkg/scheduler/algorithmprovider"
	schedulerapi "k8s.io/kubernetes/pkg/scheduler/api"
	"k8s.io/kubernetes/plugin/pkg/admission/podtolerationrestriction"
	pluginapi "k8s.io/kubernetes/plugin/pkg/admission/podtolerationrestriction/apis/podtolerationrestriction"
)

func newPod(nsName, name string, req, limit v1.ResourceList) *v1.Pod {
	return &v1.Pod{
		ObjectMeta: metav1.ObjectMeta{
			Name:      name,
			Namespace: nsName,
		},
		Spec: v1.PodSpec{
			Containers: []v1.Container{
				{
					Name:  "busybox",
					Image: "busybox",
					Resources: v1.ResourceRequirements{
						Requests: req,
						Limits:   limit,
					},
				},
			},
		},
	}
}

// TestTaintNodeByCondition tests related cases for TaintNodeByCondition feature.
func TestTaintNodeByCondition(t *testing.T) {
	enabled := utilfeature.DefaultFeatureGate.Enabled("TaintNodesByCondition")
	defer func() {
		if !enabled {
			utilfeature.DefaultFeatureGate.Set("TaintNodesByCondition=False")
		}
	}()
	// Enable TaintNodeByCondition
	utilfeature.DefaultFeatureGate.Set("TaintNodesByCondition=True")

	// Build PodToleration Admission.
	admission := podtolerationrestriction.NewPodTolerationsPlugin(&pluginapi.Configuration{})

	context := initTestMaster(t, "default", admission)

	// Build clientset and informers for controllers.
	externalClientset := kubernetes.NewForConfigOrDie(&restclient.Config{
		QPS:           -1,
		Host:          context.httpServer.URL,
		ContentConfig: restclient.ContentConfig{GroupVersion: &schema.GroupVersion{Group: "", Version: "v1"}}})
	externalInformers := informers.NewSharedInformerFactory(externalClientset, time.Second)

	admission.SetExternalKubeClientSet(externalClientset)
	admission.SetExternalKubeInformerFactory(externalInformers)

	// Apply feature gates to enable TaintNodesByCondition
	algorithmprovider.ApplyFeatureGates()

	context = initTestScheduler(t, context, false, nil)
	cs := context.clientSet
	informers := context.informerFactory
	nsName := context.ns.Name

	// Start NodeLifecycleController for taint.
	nc, err := nodelifecycle.NewNodeLifecycleController(
		informers.Coordination().V1beta1().Leases(),
		informers.Core().V1().Pods(),
		informers.Core().V1().Nodes(),
		informers.Extensions().V1beta1().DaemonSets(),
		nil, // CloudProvider
		cs,
		time.Hour,   // Node monitor grace period
		time.Second, // Node startup grace period
		time.Second, // Node monitor period
		time.Second, // Pod eviction timeout
		100,         // Eviction limiter QPS
		100,         // Secondary eviction limiter QPS
		100,         // Large cluster threshold
		100,         // Unhealthy zone threshold
		true,        // Run taint manager
		true,        // Use taint based evictions
		true,        // Enabled TaintNodeByCondition feature
	)
	if err != nil {
		t.Errorf("Failed to create node controller: %v", err)
		return
	}
	go nc.Run(context.stopCh)

	// Waiting for all controller sync.
	externalInformers.Start(context.stopCh)
	externalInformers.WaitForCacheSync(context.stopCh)
	informers.Start(context.stopCh)
	informers.WaitForCacheSync(context.stopCh)

	// -------------------------------------------
	// Test TaintNodeByCondition feature.
	// -------------------------------------------
	nodeRes := v1.ResourceList{
		v1.ResourceCPU:    resource.MustParse("4000m"),
		v1.ResourceMemory: resource.MustParse("16Gi"),
		v1.ResourcePods:   resource.MustParse("110"),
	}

	podRes := v1.ResourceList{
		v1.ResourceCPU:    resource.MustParse("100m"),
		v1.ResourceMemory: resource.MustParse("100Mi"),
	}

	notReadyToleration := v1.Toleration{
		Key:      schedulerapi.TaintNodeNotReady,
		Operator: v1.TolerationOpExists,
		Effect:   v1.TaintEffectNoSchedule,
	}

	unreachableToleration := v1.Toleration{
		Key:      schedulerapi.TaintNodeUnreachable,
		Operator: v1.TolerationOpExists,
		Effect:   v1.TaintEffectNoSchedule,
	}

	unschedulableToleration := v1.Toleration{
		Key:      schedulerapi.TaintNodeUnschedulable,
		Operator: v1.TolerationOpExists,
		Effect:   v1.TaintEffectNoSchedule,
	}

	outOfDiskToleration := v1.Toleration{
		Key:      schedulerapi.TaintNodeOutOfDisk,
		Operator: v1.TolerationOpExists,
		Effect:   v1.TaintEffectNoSchedule,
	}

	memoryPressureToleration := v1.Toleration{
		Key:      schedulerapi.TaintNodeMemoryPressure,
		Operator: v1.TolerationOpExists,
		Effect:   v1.TaintEffectNoSchedule,
	}

	diskPressureToleration := v1.Toleration{
		Key:      schedulerapi.TaintNodeDiskPressure,
		Operator: v1.TolerationOpExists,
		Effect:   v1.TaintEffectNoSchedule,
	}

	networkUnavailableToleration := v1.Toleration{
		Key:      schedulerapi.TaintNodeNetworkUnavailable,
		Operator: v1.TolerationOpExists,
		Effect:   v1.TaintEffectNoSchedule,
	}

	pidPressureToleration := v1.Toleration{
		Key:      schedulerapi.TaintNodePIDPressure,
		Operator: v1.TolerationOpExists,
		Effect:   v1.TaintEffectNoSchedule,
	}

	bestEffortPod := newPod(nsName, "besteffort-pod", nil, nil)
	burstablePod := newPod(nsName, "burstable-pod", podRes, nil)
	guaranteePod := newPod(nsName, "guarantee-pod", podRes, podRes)

	type podCase struct {
		pod         *v1.Pod
		tolerations []v1.Toleration
		fits        bool
	}

	// switch to table driven testings
	tests := []struct {
		name           string
		existingTaints []v1.Taint
		nodeConditions []v1.NodeCondition
		unschedulable  bool
		expectedTaints []v1.Taint
		pods           []podCase
	}{
		{
			name: "not-ready node",
			nodeConditions: []v1.NodeCondition{
				{
					Type:   v1.NodeReady,
					Status: v1.ConditionFalse,
				},
			},
			expectedTaints: []v1.Taint{
				{
					Key:    schedulerapi.TaintNodeNotReady,
					Effect: v1.TaintEffectNoSchedule,
				},
			},
			pods: []podCase{
				{
					pod:  bestEffortPod,
					fits: false,
				},
				{
					pod:  burstablePod,
					fits: false,
				},
				{
					pod:  guaranteePod,
					fits: false,
				},
				{
					pod:         bestEffortPod,
					tolerations: []v1.Toleration{notReadyToleration},
					fits:        true,
				},
			},
		},
		{
			name: "unreachable node",
			existingTaints: []v1.Taint{
				{
					Key:    schedulerapi.TaintNodeUnreachable,
					Effect: v1.TaintEffectNoSchedule,
				},
			},
			nodeConditions: []v1.NodeCondition{
				{
					Type:   v1.NodeReady,
					Status: v1.ConditionUnknown, // node status is "Unknown"
				},
			},
			expectedTaints: []v1.Taint{
				{
					Key:    schedulerapi.TaintNodeUnreachable,
					Effect: v1.TaintEffectNoSchedule,
				},
			},
			pods: []podCase{
				{
					pod:  bestEffortPod,
					fits: false,
				},
				{
					pod:  burstablePod,
					fits: false,
				},
				{
					pod:  guaranteePod,
					fits: false,
				},
				{
					pod:         bestEffortPod,
					tolerations: []v1.Toleration{unreachableToleration},
					fits:        true,
				},
			},
		},
		{
			name:          "unschedulable node",
			unschedulable: true, // node.spec.unschedulable = true
			nodeConditions: []v1.NodeCondition{
				{
					Type:   v1.NodeReady,
					Status: v1.ConditionTrue,
				},
			},
			expectedTaints: []v1.Taint{
				{
					Key:    schedulerapi.TaintNodeUnschedulable,
					Effect: v1.TaintEffectNoSchedule,
				},
			},
			pods: []podCase{
				{
					pod:  bestEffortPod,
					fits: false,
				},
				{
					pod:  burstablePod,
					fits: false,
				},
				{
					pod:  guaranteePod,
					fits: false,
				},
				{
					pod:         bestEffortPod,
					tolerations: []v1.Toleration{unschedulableToleration},
					fits:        true,
				},
			},
		},
		{
			name: "out of disk node",
			nodeConditions: []v1.NodeCondition{
				{
					Type:   v1.NodeOutOfDisk,
					Status: v1.ConditionTrue,
				},
				{
					Type:   v1.NodeReady,
					Status: v1.ConditionTrue,
				},
			},
			expectedTaints: []v1.Taint{
				{
					Key:    schedulerapi.TaintNodeOutOfDisk,
					Effect: v1.TaintEffectNoSchedule,
				},
			},
			// In OutOfDisk condition, only pods with toleration can be scheduled.
			pods: []podCase{
				{
					pod:  bestEffortPod,
					fits: false,
				},
				{
					pod:  burstablePod,
					fits: false,
				},
				{
					pod:  guaranteePod,
					fits: false,
				},
				{
					pod:         bestEffortPod,
					tolerations: []v1.Toleration{outOfDiskToleration},
					fits:        true,
				},
				{
					pod:         bestEffortPod,
					tolerations: []v1.Toleration{diskPressureToleration},
					fits:        false,
				},
			},
		},
		{
			name: "memory pressure node",
			nodeConditions: []v1.NodeCondition{
				{
					Type:   v1.NodeMemoryPressure,
					Status: v1.ConditionTrue,
				},
				{
					Type:   v1.NodeReady,
					Status: v1.ConditionTrue,
				},
			},
			expectedTaints: []v1.Taint{
				{
					Key:    schedulerapi.TaintNodeMemoryPressure,
					Effect: v1.TaintEffectNoSchedule,
				},
			},
			// In MemoryPressure condition, both Burstable and Guarantee pods are scheduled;
			// BestEffort pod with toleration are also scheduled.
			pods: []podCase{
				{
					pod:  bestEffortPod,
					fits: false,
				},
				{
					pod:         bestEffortPod,
					tolerations: []v1.Toleration{memoryPressureToleration},
					fits:        true,
				},
				{
					pod:         bestEffortPod,
					tolerations: []v1.Toleration{diskPressureToleration},
					fits:        false,
				},
				{
					pod:  burstablePod,
					fits: true,
				},
				{
					pod:  guaranteePod,
					fits: true,
				},
			},
		},
		{
			name: "disk pressure node",
			nodeConditions: []v1.NodeCondition{
				{
					Type:   v1.NodeDiskPressure,
					Status: v1.ConditionTrue,
				},
				{
					Type:   v1.NodeReady,
					Status: v1.ConditionTrue,
				},
			},
			expectedTaints: []v1.Taint{
				{
					Key:    schedulerapi.TaintNodeDiskPressure,
					Effect: v1.TaintEffectNoSchedule,
				},
			},
			// In DiskPressure condition, only pods with toleration can be scheduled.
			pods: []podCase{
				{
					pod:  bestEffortPod,
					fits: false,
				},
				{
					pod:  burstablePod,
					fits: false,
				},
				{
					pod:  guaranteePod,
					fits: false,
				},
				{
					pod:         bestEffortPod,
					tolerations: []v1.Toleration{diskPressureToleration},
					fits:        true,
				},
				{
					pod:         bestEffortPod,
					tolerations: []v1.Toleration{memoryPressureToleration},
					fits:        false,
				},
			},
		},
		{
			name: "network unavailable and node is ready",
			nodeConditions: []v1.NodeCondition{
				{
					Type:   v1.NodeNetworkUnavailable,
					Status: v1.ConditionTrue,
				},
				{
					Type:   v1.NodeReady,
					Status: v1.ConditionTrue,
				},
			},
			expectedTaints: []v1.Taint{
				{
					Key:    schedulerapi.TaintNodeNetworkUnavailable,
					Effect: v1.TaintEffectNoSchedule,
				},
			},
			pods: []podCase{
				{
					pod:  bestEffortPod,
					fits: false,
				},
				{
					pod:  burstablePod,
					fits: false,
				},
				{
					pod:  guaranteePod,
					fits: false,
				},
				{
					pod: burstablePod,
					tolerations: []v1.Toleration{
						networkUnavailableToleration,
					},
					fits: true,
				},
			},
		},
		{
			name: "network unavailable and node is not ready",
			nodeConditions: []v1.NodeCondition{
				{
					Type:   v1.NodeNetworkUnavailable,
					Status: v1.ConditionTrue,
				},
				{
					Type:   v1.NodeReady,
					Status: v1.ConditionFalse,
				},
			},
			expectedTaints: []v1.Taint{
				{
					Key:    schedulerapi.TaintNodeNetworkUnavailable,
					Effect: v1.TaintEffectNoSchedule,
				},
				{
					Key:    schedulerapi.TaintNodeNotReady,
					Effect: v1.TaintEffectNoSchedule,
				},
			},
			pods: []podCase{
				{
					pod:  bestEffortPod,
					fits: false,
				},
				{
					pod:  burstablePod,
					fits: false,
				},
				{
					pod:  guaranteePod,
					fits: false,
				},
				{
					pod: burstablePod,
					tolerations: []v1.Toleration{
						networkUnavailableToleration,
					},
					fits: false,
				},
				{
					pod: burstablePod,
					tolerations: []v1.Toleration{
						networkUnavailableToleration,
						notReadyToleration,
					},
					fits: true,
				},
			},
		},
		{
			name: "pid pressure node",
			nodeConditions: []v1.NodeCondition{
				{
					Type:   v1.NodePIDPressure,
					Status: v1.ConditionTrue,
				},
				{
					Type:   v1.NodeReady,
					Status: v1.ConditionTrue,
				},
			},
			expectedTaints: []v1.Taint{
				{
					Key:    schedulerapi.TaintNodePIDPressure,
					Effect: v1.TaintEffectNoSchedule,
				},
			},
			pods: []podCase{
				{
					pod:  bestEffortPod,
					fits: false,
				},
				{
					pod:  burstablePod,
					fits: false,
				},
				{
					pod:  guaranteePod,
					fits: false,
				},
				{
					pod:         bestEffortPod,
					tolerations: []v1.Toleration{pidPressureToleration},
					fits:        true,
				},
			},
		},
		{
			name: "multi taints on node",
			nodeConditions: []v1.NodeCondition{
				{
					Type:   v1.NodePIDPressure,
					Status: v1.ConditionTrue,
				},
				{
					Type:   v1.NodeMemoryPressure,
					Status: v1.ConditionTrue,
				},
				{
					Type:   v1.NodeDiskPressure,
					Status: v1.ConditionTrue,
				},
				{
					Type:   v1.NodeReady,
					Status: v1.ConditionTrue,
				},
			},
			expectedTaints: []v1.Taint{
				{
					Key:    schedulerapi.TaintNodeDiskPressure,
					Effect: v1.TaintEffectNoSchedule,
				},
				{
					Key:    schedulerapi.TaintNodeMemoryPressure,
					Effect: v1.TaintEffectNoSchedule,
				},
				{
					Key:    schedulerapi.TaintNodePIDPressure,
					Effect: v1.TaintEffectNoSchedule,
				},
			},
		},
	}

	for _, test := range tests {
		t.Run(test.name, func(t *testing.T) {
			node := &v1.Node{
				ObjectMeta: metav1.ObjectMeta{
					Name: "node-1",
				},
				Spec: v1.NodeSpec{
					Unschedulable: test.unschedulable,
					Taints:        test.existingTaints,
				},
				Status: v1.NodeStatus{
					Capacity:    nodeRes,
					Allocatable: nodeRes,
					Conditions:  test.nodeConditions,
				},
			}

			if _, err := cs.CoreV1().Nodes().Create(node); err != nil {
				t.Errorf("Failed to create node, err: %v", err)
			}
			if err := waitForNodeTaints(cs, node, test.expectedTaints); err != nil {
				t.Errorf("Failed to taint node <%s>, err: %v", node.Name, err)
			}

			var pods []*v1.Pod
			for i, p := range test.pods {
				pod := p.pod.DeepCopy()
				pod.Name = fmt.Sprintf("%s-%d", pod.Name, i)
				pod.Spec.Tolerations = p.tolerations

				createdPod, err := cs.CoreV1().Pods(pod.Namespace).Create(pod)
				if err != nil {
					t.Fatalf("Failed to create pod %s/%s, error: %v",
						pod.Namespace, pod.Name, err)
				}

				pods = append(pods, createdPod)

				if p.fits {
					if err := waitForPodToSchedule(cs, createdPod); err != nil {
						t.Errorf("Failed to schedule pod %s/%s on the node, err: %v",
							pod.Namespace, pod.Name, err)
					}
				} else {
					if err := waitForPodUnschedulable(cs, createdPod); err != nil {
						t.Errorf("Unschedulable pod %s/%s gets scheduled on the node, err: %v",
							pod.Namespace, pod.Name, err)
					}
				}
			}

			cleanupPods(cs, t, pods)
			cleanupNodes(cs, t)
			waitForSchedulerCacheCleanup(context.scheduler, t)
		})
	}
}


text:
package com.bolyartech.forgeexamples.basic;

import com.bolyartech.forge.android.app_unit.UnitApplication;

/**
 * My application
 * We must inherit {@link UnitApplication} in order forge units to work
 * We don't override onCreate() because we will use the default UnitManager and TimeProvider
 */
public class MyApp extends UnitApplication {

}


text:
package org.apache.camel.component.jms.tx;

import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.spring.CamelSpringTestSupport;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Simple unit test for transaction client EIP pattern and JMS.
 */
public class JMSTransactionalClientWithRollbackTest extends CamelSpringTestSupport {

    @Override
    protected ClassPathXmlApplicationContext createApplicationContext() {
        return new ClassPathXmlApplicationContext(
            "/org/apache/camel/component/jms/tx/JMSTransactionalClientWithRollbackTest.xml");
    }

    @Test
    public void testTransactionSuccess() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMessageCount(1);
        mock.expectedBodiesReceived("Bye World");
        // success at 3rd attempt
        mock.message(0).header("count").isEqualTo(3);

        template.sendBody("activemq:queue:okay", "Hello World");

        mock.assertIsSatisfied();
    }

    public static class MyProcessor implements Processor {
        private int count;

        @Override
        public void process(Exchange exchange) throws Exception {
            exchange.getIn().setBody("Bye World");
            exchange.getIn().setHeader("count", ++count);
        }
    }

}