text:
/* myrandom.js
 * reddit's paywalled myrandom button, for everyone
 * compatible with Reddit Enhancement Suite's subreddit manager
 * 1.0.20151010
 *
 * By Eli Grey, http://eligrey.com
 * License: MIT
 *   See https://github.com/eligrey/myrandom.js/blob/master/LICENSE.md
 */

document.addEventListener("DOMContentLoaded", function() {
	var
	  cached_subreddits = (localStorage.mySubreddits || "").split("+")
	, freshness = +localStorage.mySubredditsLastAccess || 0
	, stale = +localStorage.mySubredditsRefreshInterval || 172800000 // refresh after 48hrs
	, random_native = document.querySelector(".random.choice[href$='/r/random/']")
	, random_res = document.querySelector(".subbarlink[href$='/r/random/']")
	, myrandom_native = document.querySelector(".choice[href$='/r/myrandom/']")
	, myrandom_res = document.querySelector(".subbarlink[href$='/r/myrandom/']")
	, myrandom = myrandom_native || myrandom_res
	, random = random_native || random_res
	, insert_myrandom = function() {
		if (!myrandom) {
			var
			// support inserting myrandom into the native subreddit bar or RES's subreddit manager bar
			  parent = random.parentNode
			, random_next_sibling = random.nextElementSibling
			, myrandom_container = random_native
				? parent.parentNode.insertBefore(document.createElement("li"), parent.nextElementSibling)
				: parent // RES's subreddit manager bar doesn't use a <ul> like reddit's subreddit bar
			, separator = myrandom_container.insertBefore(document.createElement("span"), random_next_sibling)
			;
			separator.classList.add("separator");
			separator.appendChild(document.createTextNode("-"));
			myrandom = myrandom_container.insertBefore(document.createElement("a"), random_next_sibling);
			myrandom.classList.add(random_native ? "choice" : "subbarlink");
			myrandom.appendChild(document.createTextNode("myrandom"));
			myrandom.href = "/r/myrandom/";
		}

		myrandom.addEventListener("click", function(event) {
			var url = "/r/" + cached_subreddits[Math.floor(Math.random() * cached_subreddits.length)] + "/";
			event.preventDefault();
			if (event.which === 2) { // middle click
				open(url);
			} else {
				location.href = url;
			}
		});
	}
	;

	insert_myrandom();

	if (!localStorage.mySubredditsRefreshInterval) {
		localStorage.mySubredditsRefreshInterval = stale;
	}

	if (freshness + stale < Date.now()) {
		var
		  req = new XMLHttpRequest
		, onload = function() {
			cached_subreddits = (localStorage.mySubreddits = req.response
				.evaluate(
					  "//ul/a[text()='multireddit of your subscriptions']", req.response, null
					, XPathResult.ORDERED_NODE_ITERATOR_TYPE, null
				)
				.iterateNext()
				.href
				.split("/r/")[1]
			).split("+");
			localStorage.mySubredditsLastAccess = Date.now();
		  }
		;

		req.responseType = "document";
		req.addEventListener("load", onload);
		req.open("GET", "/subreddits/");
		req.send();
	}
});


text:
require 'spec/runner/formatter/base_text_formatter'

module Spec
  module Runner
    module Formatter
      class FailingExampleGroupsFormatter < BaseTextFormatter
        def example_failed(example, counter, failure)
          if @example_group
            description_parts = @example_group.description_parts.collect do |description|
              description =~ /(.*) \(druby.*\)$/ ? $1 : description
            end
            @output.puts ::Spec::Example::ExampleGroupMethods.description_text(*description_parts)

            @output.flush
            @example_group = nil
          end
        end

        def dump_failure(counter, failure)
        end

        def dump_summary(duration, example_count, failure_count, pending_count)
        end
      end
    end
  end
end

redpajama_set_name: RedPajamaGithub


text:
'use strict';

var expand = require('expand-args');
var argv = require('minimist')(process.argv.slice(2), {
  alias: {set: 's', get: 'g', del: 'd'}
});
var store = require('base-store');
var option = require('base-option');
var data = require('base-data');
var base = require('base');
var cli = require('..');
var app = base()
  .use(store('base-cli-test'))
  .use(option)
  .use(data())
  .use(cli())

app.on('set', function (key, val) {
  console.log('[set]', key, '=>', val);
});
app.store.on('set', function (key, val) {
  console.log('[store.set]', key, '=>', val);
});
app.on('option', function (key, val) {
  console.log('[option]', key, '=>', val);
});
app.on('data', function (args) {
  console.log('[data]', args);
});

// try these:
//
//   $ node examples/events.js --set=foo:bar
//   $ node examples/events.js --store.set=one:two
//   $ node examples/events.js --data=foo:a,b,c
//   $ node examples/events.js --enable=lint
//
app.cli.process(expand(argv), function(err) {
  if (err) throw err;
});


text:
Return the number of keys in the model.

----------------------------------------------------------------------

## Usage

Model.count();

### Returns

`number` The number of keys.

----------------------------------------------------------------------

## Example

	<html>
		<body>
			<script src="scripts/leaf.min.js"></script>
			<script>
				var Person = new leaf.Model({
					"lastName": "Doe",
					"firstName": "John"
				});

				console.log(Person.count()); //returns 2
			</script>
		</body>
	</html>

[View in CodePen](https://codepen.io/leaf-git/pen/BLYKvZ)


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

import com.facebook.presto.execution.buffer.PagesSerdeFactory;
import com.facebook.presto.operator.DriverContext;
import com.facebook.presto.operator.Operator;
import com.facebook.presto.operator.OperatorContext;
import com.facebook.presto.operator.OperatorFactory;
import com.facebook.presto.operator.OutputFactory;
import com.facebook.presto.spi.Page;
import com.facebook.presto.spi.type.Type;
import com.facebook.presto.sql.planner.plan.PlanNodeId;

import java.util.List;
import java.util.function.Function;

import static java.util.Objects.requireNonNull;

public class NullOutputOperator
        implements Operator
{
    public static class NullOutputFactory
            implements OutputFactory
    {
        @Override
        public OperatorFactory createOutputOperator(int operatorId, PlanNodeId planNodeId, List<Type> types, Function<Page, Page> pagePreprocessor, PagesSerdeFactory serdeFactory)
        {
            return new NullOutputOperatorFactory(operatorId, planNodeId);
        }
    }

    public static class NullOutputOperatorFactory
            implements OperatorFactory
    {
        private final int operatorId;
        private final PlanNodeId planNodeId;

        public NullOutputOperatorFactory(int operatorId, PlanNodeId planNodeId)
        {
            this.operatorId = operatorId;
            this.planNodeId = requireNonNull(planNodeId, "planNodeId is null");
        }

        @Override
        public Operator createOperator(DriverContext driverContext)
        {
            OperatorContext operatorContext = driverContext.addOperatorContext(operatorId, planNodeId, NullOutputOperator.class.getSimpleName());
            return new NullOutputOperator(operatorContext);
        }

        @Override
        public void noMoreOperators()
        {
        }

        @Override
        public OperatorFactory duplicate()
        {
            return new NullOutputOperatorFactory(operatorId, planNodeId);
        }
    }

    private final OperatorContext operatorContext;
    private boolean finished;

    public NullOutputOperator(OperatorContext operatorContext)
    {
        this.operatorContext = requireNonNull(operatorContext, "operatorContext is null");
    }

    @Override
    public OperatorContext getOperatorContext()
    {
        return operatorContext;
    }

    @Override
    public void finish()
    {
        finished = true;
    }

    @Override
    public boolean isFinished()
    {
        return finished;
    }

    @Override
    public boolean needsInput()
    {
        return true;
    }

    @Override
    public void addInput(Page page)
    {
        operatorContext.recordOutput(page.getSizeInBytes(), page.getPositionCount());
    }

    @Override
    public Page getOutput()
    {
        return null;
    }
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

   <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <TITLE>Gravity Framework - Release 1.0-beta-1</TITLE>
   <LINK REL ="stylesheet" TYPE="text/css" HREF="../../style.css" TITLE="Style">

      gravity.impl

    Classes

                AbstractComponentInvocationHandler
    	    (100%)

                CglibComponentInvocationHandler
    	    (100%)

                CglibComponentProxy
    	    (100%)

                ComponentKey
    	    (91.8%)

                ComponentProxyFactory
    	    (100%)

                ComponentStrategyDecorator
    	    (100%)

                DefaultComponent
    	    (78.5%)

                DefaultContainer
    	    (78.3%)

                DispatchingComponentStrategy
    	    (100%)

                DynamicWeaverFactory
    	    (95.5%)

                JdkComponentInvocationHandler
    	    (100%)

                JdkComponentProxy
    	    (100%)

                LazyLoadingComponentStrategy
    	    (100%)

                PoolingComponentStrategy
    	    (88.2%)

                SingletonComponentStrategy
    	    (93.3%)

                ThreadLocalComponentStrategy
    	    (83.3%)


text:
package main

import (
	"fmt"
	"io/ioutil"
	"net/http"
	"regexp"
	"time"

	c "github.com/flynn/flynn/Godeps/_workspace/src/github.com/flynn/go-check"
	"github.com/flynn/flynn/pkg/attempt"
)

type GitDeploySuite struct {
	Helper
}

var _ = c.ConcurrentSuite(&GitDeploySuite{})

func (s *GitDeploySuite) SetUpSuite(t *c.C) {
	t.Assert(flynn(t, "/", "key", "add", s.sshKeys(t).Pub), Succeeds)
}

var Attempts = attempt.Strategy{
	Total: 60 * time.Second,
	Delay: 500 * time.Millisecond,
}

func (s *GitDeploySuite) TestEnvDir(t *c.C) {
	r := s.newGitRepo(t, "env-dir")
	t.Assert(r.flynn("create"), Succeeds)
	t.Assert(r.flynn("env", "set", "FOO=bar", "BUILDPACK_URL=https://github.com/kr/heroku-buildpack-inline"), Succeeds)

	push := r.git("push", "flynn", "master")
	t.Assert(push, Succeeds)
	t.Assert(push, OutputContains, "bar")
}

func (s *GitDeploySuite) TestBuildCaching(t *c.C) {
	r := s.newGitRepo(t, "build-cache")
	t.Assert(r.flynn("create"), Succeeds)
	t.Assert(r.flynn("env", "set", "BUILDPACK_URL=https://github.com/kr/heroku-buildpack-inline"), Succeeds)

	r.git("commit", "-m", "bump", "--allow-empty")
	push := r.git("push", "flynn", "master")
	t.Assert(push, Succeeds)
	t.Assert(push, c.Not(OutputContains), "cached")

	r.git("commit", "-m", "bump", "--allow-empty")
	push = r.git("push", "flynn", "master")
	t.Assert(push, Succeeds)
	t.Assert(push, OutputContains, "cached: 0")

	r.git("commit", "-m", "bump", "--allow-empty")
	push = r.git("push", "flynn", "master")
	t.Assert(push, Succeeds)
	t.Assert(push, OutputContains, "cached: 1")
}

func (s *GitDeploySuite) TestGoBuildpack(t *c.C) {
	s.runBuildpackTest(t, "go-flynn-example", []string{"postgres"})
}

func (s *GitDeploySuite) TestNodejsBuildpack(t *c.C) {
	s.runBuildpackTest(t, "nodejs-flynn-example", nil)
}

func (s *GitDeploySuite) TestPhpBuildpack(t *c.C) {
	s.runBuildpackTest(t, "php-flynn-example", nil)
}

func (s *GitDeploySuite) TestRubyBuildpack(t *c.C) {
	s.runBuildpackTest(t, "ruby-flynn-example", nil)
}

func (s *GitDeploySuite) TestJavaBuildpack(t *c.C) {
	s.runBuildpackTest(t, "java-flynn-example", nil)
}

func (s *GitDeploySuite) TestClojureBuildpack(t *c.C) {
	s.runBuildpackTest(t, "clojure-flynn-example", nil)
}

func (s *GitDeploySuite) TestGradleBuildpack(t *c.C) {
	s.runBuildpackTest(t, "gradle-flynn-example", nil)
}

func (s *GitDeploySuite) TestPlayBuildpack(t *c.C) {
	s.runBuildpackTest(t, "play-flynn-example", nil)
}

func (s *GitDeploySuite) TestPythonBuildpack(t *c.C) {
	s.runBuildpackTest(t, "python-flynn-example", nil)
}

func (s *GitDeploySuite) runBuildpackTest(t *c.C, name string, resources []string) {
	r := s.newGitRepo(t, "https://github.com/flynn-examples/"+name)

	t.Assert(r.flynn("create", name), Outputs, fmt.Sprintf("Created %s\n", name))

	for _, resource := range resources {
		t.Assert(r.flynn("resource", "add", resource), Succeeds)
	}

	push := r.git("push", "flynn", "master")
	t.Assert(push, Succeeds)
	t.Assert(push, OutputContains, "Creating release")
	t.Assert(push, OutputContains, "Application deployed")
	t.Assert(push, OutputContains, "* [new branch]      master -> master")

	t.Assert(r.flynn("scale", "web=1"), Succeeds)

	route := name + ".dev"
	newRoute := r.flynn("route", "add", "http", route)
	t.Assert(newRoute, Succeeds)

	err := Attempts.Run(func() error {
		// Make HTTP requests
		client := &http.Client{}
		req, err := http.NewRequest("GET", "http://"+routerIP, nil)
		if err != nil {
			return err
		}
		req.Host = route
		res, err := client.Do(req)
		if err != nil {
			return err
		}
		defer res.Body.Close()
		contents, err := ioutil.ReadAll(res.Body)
		if err != nil {
			return err
		}
		if res.StatusCode != 200 {
			return fmt.Errorf("Expected status 200, got %v", res.StatusCode)
		}
		m, err := regexp.MatchString(`Hello from Flynn on port \d+`, string(contents))
		if err != nil {
			return err
		}
		if !m {
			return fmt.Errorf("Expected `Hello from Flynn on port \\d+`, got `%v`", string(contents))
		}
		return nil
	})
	t.Assert(err, c.IsNil)

	t.Assert(r.flynn("scale", "web=0"), Succeeds)
}


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.github.dieterdepaepe</groupId>
  <artifactId>guava-demo</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>guava-demo</name>
  <url>http://maven.apache.org</url>

  <licenses>
    <license>
      <name>MIT License</name>
      <url>http://opensource.org/licenses/mit-license.php</url>
      <comments>Copyright (c) Dieter De Paepe</comments>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>18.0</version>
    </dependency>
  </dependencies>
</project>


text:
@implementation SNTSystemInfo

+ (NSString *)serialNumber {
  io_service_t platformExpert = IOServiceGetMatchingService(
      kIOMasterPortDefault, IOServiceMatching("IOPlatformExpertDevice"));
  if (!platformExpert) return nil;

  NSString *serial = CFBridgingRelease(IORegistryEntryCreateCFProperty(
      platformExpert, CFSTR(kIOPlatformSerialNumberKey), kCFAllocatorDefault, 0));

  IOObjectRelease(platformExpert);

  return serial;
}

+ (NSString *)hardwareUUID {
  io_service_t platformExpert = IOServiceGetMatchingService(
      kIOMasterPortDefault, IOServiceMatching("IOPlatformExpertDevice"));
  if (!platformExpert) return nil;

  NSString *uuid = CFBridgingRelease(IORegistryEntryCreateCFProperty(
      platformExpert, CFSTR(kIOPlatformUUIDKey), kCFAllocatorDefault, 0));

  IOObjectRelease(platformExpert);

  return uuid;
}

+ (NSString *)osVersion {
  return [SNTSystemInfo _systemVersionDictionary][@"ProductVersion"];
}

+ (NSString *)osBuild {
  return [SNTSystemInfo _systemVersionDictionary][@"ProductBuildVersion"];
}

+ (NSString *)shortHostname {
  return [[[SNTSystemInfo longHostname] componentsSeparatedByString:@"."] firstObject];
}

+ (NSString *)longHostname {
  char hostname[MAXHOSTNAMELEN];
  gethostname(hostname, (int)sizeof(hostname));
  return @(hostname);
}

#pragma mark - Internal

+ (NSDictionary *)_systemVersionDictionary {
  return [NSDictionary
      dictionaryWithContentsOfFile:@"/System/Library/CoreServices/SystemVersion.plist"];
}

@end


text:
.btn-default,
.btn-primary,
.btn-success,
.btn-info,
.btn-warning,
.btn-danger {
    /* Font */
    text-shadow: none;
    /* Border */
    border: none;
    /* Box Shadow */
    -webkit-box-shadow: none;
            box-shadow: none;
    /* Border Radius */
    -moz-border-radius: 2px;
         border-radius: 2px;
}

.btn:hover {
    /* Transition */
	-webkit-transition: background-color ease-in-out 0.15s, color ease-in-out 0.15s;
	        transition: background-color ease-in-out 0.15s, color ease-in-out 0.15s;
}

.btn-default:active,
.btn-primary:active,
.btn-success:active,
.btn-info:active,
.btn-warning:active,
.btn-danger:active,
.btn-default.active,
.btn-primary.active,
.btn-success.active,
.btn-info.active,
.btn-warning.active,
.btn-danger.active {
    /* Border */
    border: none;
    /* Box Shadow */
    -webkit-box-shadow: none;
            box-shadow: none;
}

.btn-default .badge,
.btn-primary .badge,
.btn-success .badge,
.btn-info .badge,
.btn-warning .badge,
.btn-danger .badge {
    /* Font */
    text-shadow: none;
}

.btn:active,
.btn.active {
  background-image: none;
}

.btn-default {
    background-color: #009688;
    /* Font */
    color: #fff;
}

.btn-default:hover,
.btn-default:focus {
    background-color: #00897b;
    /* Font */
    color: #fff;
}

.btn-default:active,
.btn-default.active {
    background-color: #00796b;
    /* Font */
    color: #fff;
}

.btn-default.disabled,
.btn-default:disabled,
.btn-default[disabled] {
    background-color: #00796b;
    /* Font */
    color: #fff;
}

.btn-primary {
    background-color: #ba68C8;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #ab47bc;
}

.btn-primary:active,
.btn-primary.active {
    background-color: #9c27b0;
}

.btn-primary.disabled,
.btn-primary:disabled,
.btn-primary[disabled] {
    background-color: #9c27b0;
}

.btn-success {
    background-color: #8bc34a;
}

.btn-success:hover,
.btn-success:focus {
    background-color: #7cb342;
}

.btn-success:active,
.btn-success.active {
    background-color: #689f38;
}

.btn-success.disabled,
.btn-success:disabled,
.btn-success[disabled] {
    background-color: #689f38;
}

.btn-info {
    background-color: #80deea;
}

.btn-info:hover,
.btn-info:focus {
    background-color: #4dd0e1;
}

.btn-info:active,
.btn-info.active {
    background-color: #26c6da;
}

.btn-info.disabled,
.btn-info:disabled,
.btn-info[disabled] {
    background-color: #26c6da;
}

.btn-warning {
    background-color: #ffb74d;
}

.btn-warning:hover,
.btn-warning:focus {
    background-color: #ffa726;
}

.btn-warning:active,
.btn-warning.active {
    background-color: #ff9800;
}

.btn-warning.disabled,
.btn-warning:disabled,
.btn-warning[disabled] {
    background-color: #ff9800;
}

.btn-danger {
    background-color: #f44336;
}

.btn-danger:hover,
.btn-danger:focus {
    background-color: #e53935;
}

.btn-danger:active,
.btn-danger.active {
    background-color: #d32f2f;
}

.btn-danger.disabled,
.btn-danger:disabled,
.btn-danger[disabled] {
    background-color: #d32f2f;
}


text:
package cargo

// TODO: It would make sense to have this in its own package. Unfortunately,
// then there would be a circular dependency between the cargo and handling
// packages since cargo.Delivery would use handling.HandlingEvent and
// handling.HandlingEvent would use cargo.TrackingID. Also,
// HandlingEventFactory depends on the cargo repository.
//
// It would make sense not having the cargo package depend on handling.

import (
	"errors"
	"time"

	"github.com/go-kit/kit/examples/shipping/location"
	"github.com/go-kit/kit/examples/shipping/voyage"
)

// HandlingActivity represents how and where a cargo can be handled, and can
// be used to express predictions about what is expected to happen to a cargo
// in the future.
type HandlingActivity struct {
	Type         HandlingEventType
	Location     location.UNLocode
	VoyageNumber voyage.Number
}

// HandlingEvent is used to register the event when, for instance, a cargo is
// unloaded from a carrier at a some location at a given time.
type HandlingEvent struct {
	TrackingID TrackingID
	Activity   HandlingActivity
}

// HandlingEventType describes type of a handling event.
type HandlingEventType int

// Valid handling event types.
const (
	NotHandled HandlingEventType = iota
	Load
	Unload
	Receive
	Claim
	Customs
)

func (t HandlingEventType) String() string {
	switch t {
	case NotHandled:
		return "Not Handled"
	case Load:
		return "Load"
	case Unload:
		return "Unload"
	case Receive:
		return "Receive"
	case Claim:
		return "Claim"
	case Customs:
		return "Customs"
	}

	return ""
}

// HandlingHistory is the handling history of a cargo.
type HandlingHistory struct {
	HandlingEvents []HandlingEvent
}

// MostRecentlyCompletedEvent returns most recently completed handling event.
func (h HandlingHistory) MostRecentlyCompletedEvent() (HandlingEvent, error) {
	if len(h.HandlingEvents) == 0 {
		return HandlingEvent{}, errors.New("delivery history is empty")
	}

	return h.HandlingEvents[len(h.HandlingEvents)-1], nil
}

// HandlingEventRepository provides access a handling event store.
type HandlingEventRepository interface {
	Store(e HandlingEvent)
	QueryHandlingHistory(TrackingID) HandlingHistory
}

// HandlingEventFactory creates handling events.
type HandlingEventFactory struct {
	CargoRepository    Repository
	VoyageRepository   voyage.Repository
	LocationRepository location.Repository
}

// CreateHandlingEvent creates a validated handling event.
func (f *HandlingEventFactory) CreateHandlingEvent(registered time.Time, completed time.Time, id TrackingID,
	voyageNumber voyage.Number, unLocode location.UNLocode, eventType HandlingEventType) (HandlingEvent, error) {

	if _, err := f.CargoRepository.Find(id); err != nil {
		return HandlingEvent{}, err
	}

	if _, err := f.VoyageRepository.Find(voyageNumber); err != nil {
		// TODO: This is pretty ugly, but when creating a Receive event, the voyage number is not known.
		if len(voyageNumber) > 0 {
			return HandlingEvent{}, err
		}
	}

	if _, err := f.LocationRepository.Find(unLocode); err != nil {
		return HandlingEvent{}, err
	}

	return HandlingEvent{
		TrackingID: id,
		Activity: HandlingActivity{
			Type:         eventType,
			Location:     unLocode,
			VoyageNumber: voyageNumber,
		},
	}, nil
}


text:
package com.programmerdan.minecraft.devotion;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.logging.Level;

import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.FileConfiguration;

import com.programmerdan.minecraft.devotion.datahandlers.DataHandler;
import com.programmerdan.minecraft.devotion.monitors.Monitor;

/**
 * Handles loading of configurations, including establishment of the various monitors,
 * handlers, and whatever else comprises Devotion.
 *
 * @author ProgrammerDan <programmerdan@gmail.com>
 */
public class ConfigurationReader {
	public static boolean readConfig() {
		log("Loading configuration");

		Devotion.instance().saveDefaultConfig();
		Devotion.instance().reloadConfig();
		FileConfiguration conf = Devotion.instance().getConfig();

		Devotion.instance().setDebug(conf.getBoolean("debug", false));

		if (Devotion.instance().isDebug()) {
			log("Debug mode active");
		}

		// Discover and configure Monitors
		ConfigurationSection monitors = conf.getConfigurationSection("monitors");

		for (String key : monitors.getKeys(false)) {
			ConfigurationSection monitor = monitors.getConfigurationSection(key);
			Monitor mon = null;
			String clz = monitor.getString("class");
			if (clz == null) { // "internal" monitors get added to the list here.
				if (monitor.getName().equalsIgnoreCase("movement")) {
					clz = "com.programmerdan.minecraft.devotion.monitors.PlayerMovementMonitor";
				} else if (monitor.getName().equalsIgnoreCase("interaction")) {
					clz = "com.programmerdan.minecraft.devotion.monitors.PlayerInteractionMonitor";
				} else if (monitor.getName().equalsIgnoreCase("inventory")) {
					clz = "com.programmerdan.minecraft.devotion.monitors.PlayerInventoryMonitor";
				}
			}
			if (clz != null) {
				log("Trying to add Monitor " + key + " using class " + clz);
				try {
					Class<?> mont = Class.forName(clz);
					if (Monitor.class.isAssignableFrom(mont)) {
						Method montMethod = mont.getMethod("generate", ConfigurationSection.class);
						mon = (Monitor) montMethod.invoke(null, monitor);
					} else {
						log("Found class " + clz + " but is not a valid monitor. Skipping.");
					}

				} catch (ClassNotFoundException cnfe) {
					log("Could not find monitor " + clz + ", skipping.");
				} catch (NoSuchMethodException msme) {
					log("Monitor defined as " + clz + " is not well formed, lacks generate function.");
				} catch (SecurityException se) {
					log("Monitor defined as "+ clz + " has reflection-inhibiting security.");
				} catch (IllegalAccessException iae) {
					log("Monitor defined as " + clz + " has access-inhibiting security.");
				} catch (IllegalArgumentException iae2) {
					log("Monitor defined as " + clz + " does not accept the correct parameters.");
				} catch (InvocationTargetException ite) {
					Devotion.logger().log(Level.WARNING,"While provisioning Monitor from " + clz + ", it threw an exception.", ite);
				} catch (NullPointerException npe) {
					Devotion.logger().log(Level.WARNING,"While provisioning Monitor from " + clz + ", it threw an NPE.", npe);
				}
			}
			if (mon == null) {
				log("Monitor " + key + " defined but could not be matched to a known monitor.");
			} else {
				Devotion.instance().registerMonitor(mon);
			}
		}

		// Discover and configure DAO

		ConfigurationSection dao = conf.getConfigurationSection("dao");

		for (String key : dao.getKeys(false)) {
			ConfigurationSection handler = dao.getConfigurationSection(key);
			DataHandler han = null;
			String clz = handler.getString("class");
			if (clz == null) { // "internal" datahandlers can get added to the list here.
				if (handler.getName().equalsIgnoreCase("database")) {
					clz = "com.programmerdan.minecraft.devotion.datahandlers.DatabaseDataHandler";
				} else if (handler.getName().equalsIgnoreCase("file")) {
					clz = "com.programmerdan.minecraft.devotion.datahandlers.FileDataHandler";
				}
			}
			if (clz != null) {
				log("Trying to add DataHandler " + key + " using class " + clz);
				try {
					Class<?> hand = Class.forName(clz);
					if (DataHandler.class.isAssignableFrom(hand)) {
						Method handMethod = hand.getMethod("generate", ConfigurationSection.class);
						han = (DataHandler) handMethod.invoke(null, handler);
					} else {
						log("Found class " + clz + " but is not a valid DataHandler. Skipping.");
					}

				} catch (ClassNotFoundException cnfe) {
					log("Could not find data handler " + clz + ", skipping.");
				} catch (NoSuchMethodException msme) {
					log("DataHandler defined as " + clz + " is not well formed, lacks generate function.");
				} catch (SecurityException se) {
					log("DataHandler defined as "+ clz + " has reflection-inhibiting security.");
				} catch (IllegalAccessException iae) {
					log("DataHandler defined as " + clz + " has access-inhibiting security.");
				} catch (IllegalArgumentException iae2) {
					log("DataHandler defined as " + clz + " does not accept the correct parameters.");
				} catch (InvocationTargetException ite) {
					Devotion.logger().log(Level.WARNING,"While provisioning DataHandler from " + clz + ", it threw an exception.", ite);
				} catch (NullPointerException npe) {
					Devotion.logger().log(Level.WARNING,"While provisioning DataHandler from " + clz + ", it threw an NPE.", npe);
				}
			}
			if (han == null) {
				log("DataHandler " + key + " defined but could not be matched to a known DataHandler.");
			} else {
				Devotion.instance().registerDataHandler(han);
			}
		}

		return true;
	}

	private static void log(String message) {
		Devotion.logger().info(message);
	}
}


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml;

namespace Haddow_Whitney_Lab1_CP3_XML
{
    class PatentDB
    {
        private const string path = "Patents.xml";

        //read XML file for patent info
        public static List<Patent> GetPatents()
        {
            XmlDocument doc = new XmlDocument();

            if (!File.Exists("Patents.xml"))
                doc.Save("Patents.xml");

            List<Patent> patents = new List<Patent>();//create empty list

            XmlReaderSettings readerSettings = new XmlReaderSettings(); //define reader settings
            readerSettings.IgnoreWhitespace = true;
            readerSettings.IgnoreComments = true;
            XmlReader readXml = null;

            try
            {
                readXml = XmlReader.Create(path, readerSettings);
                if (readXml.ReadToDescendant("Patent")) //read to first Patent node
                {
                    do //create new patent object
                    {
                        Patent patent = new Patent();
                        patent.Number = Convert.ToInt32(readXml["Number"]);
                        readXml.ReadStartElement("Patent");
                        patent.AppNumber = readXml.ReadElementContentAsString();
                        patent.Description = readXml.ReadElementContentAsString();
                        patent.FilingDate = DateTime.Parse(readXml.ReadElementContentAsString());
                        patent.Inventor = readXml.ReadElementContentAsString();
                        patent.Inventor2 = readXml.ReadElementContentAsString();
                        patents.Add(patent);
                    }
                    while (readXml.ReadToNextSibling("Patent"));
                }
            }
            catch (XmlException ex)
            {
                MessageBox.Show(ex.Message, "Xml Error");
            }
            catch (IOException ex)
            {
                MessageBox.Show(ex.Message, "IO Exception");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Exception Occurred");
            }
            finally
            {
                if (readXml != null)
                    readXml.Close();
            }

            return patents;

        } //end GetPatents()

        //save any new patents to XML file
        public static void SavePatents(List<Patent> patents)
        {
            XmlWriterSettings writerSettings = new XmlWriterSettings(); //define writer settings
            writerSettings.Indent = true;
            writerSettings.IndentChars = ("    ");
            XmlWriter writeXml = null;

            try
            {
                writeXml = XmlWriter.Create(path, writerSettings);

                writeXml.WriteStartDocument();
                writeXml.WriteStartElement("Patents");

                foreach (Patent patent in patents) //write each object in list to Xml file
                {
                    writeXml.WriteStartElement("Patent");
                    writeXml.WriteAttributeString("Number", patent.Number.ToString());
                    writeXml.WriteElementString("AppNumber", patent.AppNumber);
                    writeXml.WriteElementString("Description", patent.Description);
                    string datestring = patent.FilingDate.ToString("yyyy-MM-dd");
                    writeXml.WriteElementString("FilingDate", datestring);
                    writeXml.WriteElementString("Inventor", patent.Inventor);
                    writeXml.WriteElementString("Inventor2", patent.Inventor2);
                    writeXml.WriteEndElement();
                }

                writeXml.WriteEndElement(); //close tag of root element
            }
            catch (XmlException ex)
            {
                MessageBox.Show(ex.Message, "Xml Error");
            }
            catch (IOException ex)
            {
                MessageBox.Show(ex.Message, "IO Exception");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Exception Occurred");
            }
            finally
            {
                if (writeXml != null)
                    writeXml.Close();
            }

        } //end SavePatents()

    } //end class
}


text:
package org.commonmark.integration;

import org.commonmark.spec.SpecReader;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.CommandLineOptions;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import org.pegdown.Extensions;
import org.pegdown.PegDownProcessor;

import java.util.Collections;
import java.util.List;

@State(Scope.Benchmark)
public class PegDownBenchmark {

    private static final String SPEC = SpecReader.readSpec();
    private static final List<String> SPEC_EXAMPLES = SpecReader.readExamplesAsString();
    private static final PegDownProcessor PROCESSOR = new PegDownProcessor(Extensions.FENCED_CODE_BLOCKS);

    public static void main(String[] args) throws Exception {
        Options options = new OptionsBuilder()
                .parent(new CommandLineOptions(args))
                .include(PegDownBenchmark.class.getName() + ".*")
                .build();
        new Runner(options).run();
    }

    @Benchmark
    public long wholeSpec() {
        return parseAndRender(Collections.singletonList(SPEC));
    }

    @Benchmark
    public long examples() {
        return parseAndRender(SPEC_EXAMPLES);
    }

    private static long parseAndRender(List<String> examples) {
        long length = 0;
        for (String example : examples) {
            String result = PROCESSOR.markdownToHtml(example);
            length += result.length();
        }
        return length;
    }

}


text:
package models

import (
	"fmt"
	"github.com/astaxie/beego"
	"github.com/astaxie/beego/orm"
	_ "github.com/go-sql-driver/mysql" // import your used driver
)

type Base struct {
}

func Regist() {
	dbUser := beego.AppConfig.String("dbUser")
	dbName := beego.AppConfig.String("dbName") //数据库名字
	dbPwd := beego.AppConfig.String("dbPwd")
	dbLink := fmt.Sprintf("%s:%s@/%s?charset=utf8", dbUser, dbPwd, dbName) //数据库连接字符串
	orm.RegisterModelWithPrefix("villa_",
		new(Admin),
		new(Currency),
		new(DestinationImg),
		new(InquirePriceCost),
		new(InquireVilla),
		new(InquireCurrency),
		new(InquireExtra),
		new(Destination),
		new(Inquire),
		new(Partner),
		new(Product),
		new(ProductImg),
		new(Promotion),
		new(Rate),
		new(Tag),
		new(TagProduct),
		new(User),
	)
	orm.RegisterDriver("mysql", orm.DR_MySQL)        //注册数据库驱动
	orm.RegisterDataBase("default", "mysql", dbLink) //注册数据库,并设置默认数据库
}

func init() {
	Regist()
	createTable()
}

func createTable() {
	name := "default"                          //数据库别名
	force := false                             //不强制建数据库
	verbose := true                            //打印建表过程
	err := orm.RunSyncdb(name, force, verbose) //建表
	if err != nil {
		beego.Error(err)
	}
}


text:
<?php

namespace Rehyved\Utilities;

class JsonParseException extends \Exception
{

    private $json;
    public function __construct($message, $code, $json)
    {
        parent::__construct($message, $code);
        $this->json = $json;
    }

    /**
     * @return \Throwable
     */
    public function getJson(): \Throwable
    {
        return $this->json;
    }

}


text:
// This file is automatically generated.

package adila.db;

/*
 * ZTE Blade A475
 *
 * DEVICE: ZTE_Blade_A475
 * MODEL: BGH JOY X2
 */
final class zte5fblade5fa475_bgh20joy20x2 {
    public static final String DATA = "ZTE|Blade A475|";
}


text:
<?php
/**
 * The contents of this file was generated using the WSDLs as provided by eBay.
 *
 * DO NOT EDIT THIS FILE!
 */

namespace DTS\eBaySDK\MerchantData\Types;

/**
 *
 * @property \DTS\eBaySDK\MerchantData\Enums\DiscountNameCodeType $DiscountName
 * @property \DTS\eBaySDK\MerchantData\Types\DiscountProfileType[] $DiscountProfile
 */
class CalculatedShippingDiscountType extends \DTS\eBaySDK\Types\BaseType
{
    /**
     * @var array Properties belonging to objects of this class.
     */
    private static $propertyTypes = [
        'DiscountName' => [
            'type' => 'string',
            'repeatable' => false,
            'attribute' => false,
            'elementName' => 'DiscountName'
        ],
        'DiscountProfile' => [
            'type' => 'DTS\eBaySDK\MerchantData\Types\DiscountProfileType',
            'repeatable' => true,
            'attribute' => false,
            'elementName' => 'DiscountProfile'
        ]
    ];

    /**
     * @param array $values Optional properties and values to assign to the object.
     */
    public function __construct(array $values = [])
    {
        list($parentValues, $childValues) = self::getParentValues(self::$propertyTypes, $values);

        parent::__construct($parentValues);

        if (!array_key_exists(__CLASS__, self::$properties)) {
            self::$properties[__CLASS__] = array_merge(self::$properties[get_parent_class()], self::$propertyTypes);
        }

        if (!array_key_exists(__CLASS__, self::$xmlNamespaces)) {
            self::$xmlNamespaces[__CLASS__] = 'xmlns="urn:ebay:apis:eBLBaseComponents"';
        }

        $this->setValues(__CLASS__, $childValues);
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<animation-list android:oneshot="false"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:duration="100" android:drawable="@drawable/common_loading_0" />
    <item android:duration="100" android:drawable="@drawable/common_loading_1" />
    <item android:duration="100" android:drawable="@drawable/common_loading_2" />
    <item android:duration="100" android:drawable="@drawable/common_loading_3" />
    <item android:duration="100" android:drawable="@drawable/common_loading_4" />
    <item android:duration="100" android:drawable="@drawable/common_loading_5" />
    <item android:duration="100" android:drawable="@drawable/common_loading_6" />
    <item android:duration="100" android:drawable="@drawable/common_loading_7" />
    <item android:duration="100" android:drawable="@drawable/common_loading_8" />
    <item android:duration="100" android:drawable="@drawable/common_loading_9" />
    <item android:duration="100" android:drawable="@drawable/common_loading_10" />
    <item android:duration="100" android:drawable="@drawable/common_loading_11" />
</animation-list>


text:
<?php
namespace pdt256\truecar\Entity;

class UserRoleTest extends \PHPUnit_Framework_TestCase
{
    public function testCreate()
    {
        $userRole = new UserRole;
        $userRole->setName('Administrator');
        $userRole->setDescription('Admin account with access to everything.');

        $this->assertSame('Administrator', $userRole->getName());
        $this->assertSame('Admin account with access to everything.', $userRole->getDescription());
    }
}


text:
var restify = require('restify');

function Server(config, log) {
  var self = this;
  this.name = config.name;
  this.port = config.port;
  this.log = log;
}

Server.prototype.run = function () {
  var self = this;
  var server = this.server = restify.createServer();
  server.use(restify.acceptParser(server.acceptable));
  server.use(restify.dateParser(60));
  server.use(restify.queryParser());
  server.use(restify.jsonp());
  server.use(restify.gzipResponse());
  server.use(restify.bodyParser());
  server.use(restify.requestLogger());

  server.get('/ping', function(req, res, next) {
    res.send({status: 'success', 'message': 'pong'});
    next();
  });

  self.log.info('Starting app');
  server.listen(self.port, function() {
    self.log.info('%s listening at %s', self.name, server.url);
  });

};

Server.prototype.shutdown = function (callback) {
  this.log.info('Shutting down', this.name);
  if (this.server) {
    this.server.close(callback);
  } else {
    callback();
  }
};

module.exports = Server;


text:
$(function() {
    var caratteristiche = ['testa', 'occhi', 'naso', 'bocca', 'orecchie'];

    function disegnaCaratteristica(caratteristica) {
        var value = $('#' + caratteristica).val();
        $('img.' + caratteristica).attr('src', 'img/' + caratteristica + '/' + value + '.png');
    }

    function disegnaMostro() {
        $.each(caratteristiche, function(idx, caratteristica) {
            disegnaCaratteristica(caratteristica);
        });
        numeroDelMostro();
    }

    function numeroDelMostro() {
        var num = 0;
        $.each(caratteristiche, function(idx, caratteristica) {
            var power = caratteristiche.length - 1 - idx;
            num += $('#' + caratteristica)[0].selectedIndex * Math.pow(4, power);
        });
        $('#monster-number').text(num);
        $('#monster-name').text('');
    }

    $.each(caratteristiche, function(idx, caratteristica) {
        $('#' + caratteristica).change(function() {
            disegnaCaratteristica(caratteristica);
            numeroDelMostro();
        });
    });

    $('#random').click(function() {
        $.each(caratteristiche, function(idx, caratteristica) {
            options = $('#' + caratteristica + ' > option');
            options[Math.floor(Math.random() * options.length)].selected = true
        });
        disegnaMostro();
    });

    $('#nome-mostro').click(function() {
        var primo_nome_map = {
            'fanta': $('#testa option[value=fanta]').text(),
            'allegra': $('#testa option[value=allegra]').text(),
            'orribile': $('#testa option[value=orribile]').text(),
            'schifosa': $('#testa option[value=schifosa]').text()
        };
        var secondo_nome_map = {
            'fanta': $('#occhi option[value=fanta]').text(),
            'biz': $('#occhi option[value=biz]').text(),
            'smo': $('#occhi option[value=smo]').text(),
            'spi': $('#occhi option[value=spi]').text()
        };
        var value_count = {
            'fanta': 0,
            'biz': 0,
            'smo': 0,
            'spi': 0
        }

        $.each(caratteristiche, function(idx, caratteristica) {
            // skip testa
            if (!idx) {
                return;
            }
            value_count[$('#' + caratteristica).val()] += 1;
        });
        var max_count = 0;
        $.each(value_count, function(value, count) {
            if (max_count == 2 && count == 2) {
                // in caso di parita' 2 a 2 fra le caratteristiche, vincono gli occhi
                max_value = $('#occhi').val();
            }
            if (count > max_count) {
                max_count = count;
                max_value = value;
            }
        });
        if (max_count == 1) {
            // in caso di parita' fra tutte le caratteristiche, vincono gli occhi
            max_value = $('#occhi').val();
        }

        var nome = primo_nome_map[$('#testa').val()] + ' ' + secondo_nome_map[max_value];
        $('#monster-name').text(nome);
    });

    disegnaMostro();

    $(window).on("load resize", function() {
        var image_height = $('.monster-container img')[0].clientHeight;
        $('.monster-container').css('min-height', (image_height) + 'px');
    });

    var translator = $('body').translate({lang: "en", t: translations});

    $('#language').change(function() {
        translator.lang($(this).val());
    });
});


text:
/// <reference path="../fourslash.ts" />

// @Filename: /a.js
//// export const /*end*/a = "a";

// @Filename: /a.d.ts
//// export declare const a: string;

// @Filename: /index.ts
//// import { a } from [|"./a"/*moduleSpecifier*/|];
//// [|a/*identifier*/|]

verify.goToSourceDefinition("identifier", "end");
verify.goToSourceDefinition("moduleSpecifier", { file: "/a.js" })


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>Uses of Package org.apache.activemq.apollo.dto (apollo-dto 1.7 API)</title>
<meta name="date" content="2014-02-24">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Package
org.apache.activemq.apollo.dto

Classes in org.apache.activemq.apollo.dto used by org.apache.activemq.apollo.dto

Class and Description

AccessRuleDTO

 User authorization to broker resources is accomplished by configuring access control rules.

AuthenticationDTO

 Sets the JAAS authentication used to access the broker.

ConnectorTypeDTO

CustomServiceDTO

DestinationDTO

DestMetricsDTO

     Collects metrics about the status of a destination since the
     time the broker was started.

DurableSubscriptionDestinationDTO

DurableSubscriptionDTO

EntryStatusDTO

JvmMetricsDTO

KeyStorageDTO

Used to specify the location of key store and key store access

LinkDTO

LogCategoryDTO

LongIdDTO

LongIdLabeledDTO

MemoryMetricsDTO

MessageStatusDTO

ProtocolDTO

ProtocolFilterDTO

QueueConsumerLinkDTO

QueueDTO

QueueSettingsDTO

ServiceDTO

ServiceStatusDTO

StoreDTO

StoreStatusDTO

StringIdDTO

StringIdLabeledDTO

TimeMetricDTO

TopicDestinationDTO

TopicDTO

VirtualHostDTO

WebAdminDTO

 Holds the address and port to bind the web interface

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Copyright © 2005-2014 The Apache Software Foundation. All Rights Reserved.


text:
```bash
source creds

curl -o metrics.yml \
  https://raw.githubusercontent.com/vfarcic/docker-flow-stacks/master/metrics/docker-flow-monitor-full.yml

cat metrics.yml

docker network create -d overlay monitor
```

## Metrics Stack

---

```bash
echo "route:
  repeat_interval: 30m
  group_interval: 30m
  receiver: 'slack'

receivers:
  - name: 'slack'
    slack_configs:
      - send_resolved: true
        title: '[{{ .Status | toUpper }}] {{ .GroupLabels.service }} service is in danger!'
        title_link: 'http://$CLUSTER_DNS/monitor/alerts'
        text: '{{ .CommonAnnotations.summary}}'
        api_url: 'https://hooks.slack.com/services/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'
" | docker secret create alert_manager_config -
```

## Metrics Stack

---

```bash
DOMAIN=$CLUSTER_DNS docker stack deploy -c metrics.yml metrics

docker stack ps -f desired-state=running metrics
```

## Node Exporter

---

```bash
docker service create --name util2 \
  --network monitor --mode global alpine sleep 1000000000

UTIL_ID=$(docker ps -q -f label=com.docker.swarm.service.name=util2)

docker exec -it $UTIL_ID apk add --update curl

docker exec -it $UTIL_ID \
    curl "http://metrics_node-exporter:9100/metrics"
```

## Container Exporter

---

```bash
docker exec -it $UTIL_ID curl http://metrics_cadvisor:8080/metrics
```

## Prometheus

---

```bash
exit

open "http://$CLUSTER_DNS/monitor"

# irate(node_cpu{mode="idle"}[5m])

# container_memory_usage_bytes{container_label_com_docker_swarm_service_name!=""}

# container_memory_usage_bytes{container_label_com_docker_swarm_service_name="metrics_cadvisor"}

# container_memory_usage_bytes{container_label_com_docker_swarm_service_name="go-demo-2_main"}
```

## Grafana

---

```bash
open "http://$CLUSTER_DNS/grafana/"
```

* User/pass admin/admin
* DS: http://metrics_monitor:9090/monitor
* DS: http://logging_elasticsearch:9200
* [https://grafana.net/dashboards/704](https://grafana.net/dashboards/704)
* [https://grafana.net/dashboards/405](https://grafana.net/dashboards/405)
* [https://grafana.net/dashboards/609](https://grafana.net/dashboards/609)

## Alerts

---

```bash
open "http://$CLUSTER_DNS/monitor/alerts"
```

## Going Back

---

```bash
ssh -i workshop.pem docker@$CLUSTER_IP
```


text:
#pragma once
#include "oxygine-include.h"
#include "EventDispatcher.h"
#include "pthread.h"
#include "core/ThreadDispatcher.h"
#include <functional>
#include "Event.h"

namespace oxygine
{
    DECLARE_SMART(ThreadLoader, spThreadLoader);
    class ThreadLoader: public EventDispatcher
    {
    public:
        enum
        {
            COMPLETE = Event::COMPLETE,
        };

        ThreadLoader();
        ~ThreadLoader();

        bool isCompleted();

        virtual void add(Resources* res);
        virtual void add(Resource* res);

#ifndef __S3E__
        virtual void add(std::function< void() >);
#endif

        void start();
        //void stop();

        /**Loads resources from current thread WITHOUT creating new (for debug)*/
        void load();
        void unload();

    private:
        static void* _staticThreadFunc(void* t);
        static void threadDone(const ThreadDispatcher::message& msg);
        virtual void _threadFunc();

        void loaded(Event*);
        void _load();

        pthread_t _thread;
        volatile bool _threadDone;

        typedef std::list<Resources*> resources;
        resources _resources;

        typedef std::list<Resource*> ress;
        ress _ress;

#ifndef __S3E__
        typedef std::list<std::function<void()> > funcs;
        funcs _funcs;
#endif
    };
}


text:
package com.adben.testdatabuilder.core.analyzers.introspectors;

import java.lang.reflect.Field;

/**
 * Introspect a field and set values on objects.
 *
 * <p>
 *
 * This is a generator that requires knowledge of the object that contains the field.
 */
public interface Introspector {

  /**
   * For the given {@link Field} and {@link Object} set the field generatedValue on the object
   * making an "educated guess".
   *
   * @param field Field which will be set.
   * @param obj Object to set the field generatedValue on.
   * @return True if the introspector applied a generatedValue to the field on the object. False
   * otherwise.
   * @throws IllegalAccessException When setting a field generatedValue on an object.
   */
  @SuppressWarnings("BooleanMethodNameMustStartWithQuestion")
  boolean introspect(Field field, Object obj) throws IllegalAccessException;

}


text:
<?php

namespace Test\Amadeus\Client\Struct\Pnr\AddMultiElements;

use Amadeus\Client\Struct\Pnr\AddMultiElements\Remarks;
use Test\Amadeus\BaseTestCase;

/**
 * RemarksTest
 *
 * @package Test\Amadeus\Client\Struct\Pnr\AddMultiElements
 * @author Dieter Devlieghere <dermikagh@gmail.com>
 */
class RemarksTest extends BaseTestCase
{
    public function testCanMakeRemarkWithCategory()
    {
        $element = new Remarks(
            'a remark text',
            Remarks::TYPE_MISCELLANEOUS,
            'C'
        );

        $this->assertEquals('a remark text', $element->freetext);
        $this->assertEquals('C', $element->category);
        $this->assertEquals(Remarks::TYPE_MISCELLANEOUS, $element->type);
    }
}


text:
Socket.io Redis adapter with shared memory

It same as normal `socket.io-redis` adapter.

But have 1 feature. It allow to create a shared objects between instances.
To share any data you could use:
```
socket.adapter.shared.someVar = "someValue";
socket.adapter.sync();
```


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.apimanagement.generated;

import com.azure.core.util.Context;
import com.azure.resourcemanager.apimanagement.models.OpenidConnectProviderContract;

/** Samples for OpenIdConnectProvider Update. */
public final class OpenIdConnectProviderUpdateSamples {
    /*
     * x-ms-original-file: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateOpenIdConnectProvider.json
     */
    /**
     * Sample code: ApiManagementUpdateOpenIdConnectProvider.
     *
     * @param manager Entry point to ApiManagementManager.
     */
    public static void apiManagementUpdateOpenIdConnectProvider(
        com.azure.resourcemanager.apimanagement.ApiManagementManager manager) {
        OpenidConnectProviderContract resource =
            manager
                .openIdConnectProviders()
                .getWithResponse("rg1", "apimService1", "templateOpenIdConnect2", Context.NONE)
                .getValue();
        resource.update().withClientSecret("updatedsecret").withIfMatch("*").apply();
    }
}


text:
Add new book

  <form (ngSubmit)="onSubmit()" #bookForm="ngForm" class="w-50">

      Title
      <input type="text" class="form-control" id="title" required minlength="1" maxlength="256"
             [(ngModel)]="book.title" name="title" #title="ngModel">

      ISBN
      <input type="text" class="form-control" id="isbn" required minlength="10" maxlength="13" pattern="978[0-9]{13}|[0-9]{10}"
             [(ngModel)]="book.isbn" name="isbn" #isbn="ngModel">

      Book title is required (between 1 and 256 characters)

      Book ISBN is required (between 10 and 13 digits)

    <button id="save" type="submit" class="btn btn-success" [disabled]="!bookForm.form.valid">Save</button>
    <button id="reset" type="reset" (click)="onReset()" class="btn btn-secondary">Reset</button>
    <button id="cancel" type="button" (click)="onCancel()" class="btn btn-secondary">Cancel</button>

  </form>


text:
int vscanf(const char *format,va_list args)
{ return vfscanf(stdin,format,args); }


text:
package org.jboss.netty.handler.codec.marshalling;

import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.ChannelUpstreamHandler;

public class SerialMarshallingDecoderTest extends SerialCompatibleMarshallingDecoderTest {

    @Override
    protected ChannelBuffer input(byte[] input) {
        ChannelBuffer length = ChannelBuffers.buffer(4);
        length.writeInt(input.length);
        return ChannelBuffers.wrappedBuffer(length, ChannelBuffers.wrappedBuffer(input));
    }

    @Override
    protected ChannelUpstreamHandler createDecoder(int maxObjectSize) {
        return new MarshallingDecoder(createProvider(createMarshallerFactory(), createMarshallingConfig()), maxObjectSize);
    }

}


text:
require "chef/chef_fs/file_system/base_fs_dir"
require "chef/chef_fs/file_system/chef_server/rest_list_entry"
require "chef/chef_fs/file_system/not_found_error"
require "chef/chef_fs/file_system/chef_server/policy_group_entry"

class Chef
  module ChefFS
    module FileSystem
      module ChefServer
        class PolicyGroupsDir < RestListDir
          def make_child_entry(name, exists = nil)
            PolicyGroupEntry.new(name, self, exists)
          end

          def create_child(name, file_contents)
            entry = make_child_entry(name, true)
            entry.write(file_contents)
            @children = nil
            entry
          end
        end
      end
    end
  end
end


text:
exports.SET_USER_PROFILE = 'SET_USER_PROFILE'
exports.SET_USER = 'SET_USER'
exports.REDIRECT = 'REDIRECT'
exports.SET_URL = 'SET_URL'
exports.SIGN_OUT = 'SIGN_OUT'
exports.SAVE = 'SAVE'
exports.MENU = 'MENU'
exports.MODAL = 'MODAL'
exports.CLOSE_MODALS = 'CLOSE_MODALS'
exports.RESET = 'RESET'
exports.SET_NOTIFICATION = 'SET_NOTIFICATION'
exports.UNSET_NOTIFICATION = 'UNSET_NOTIFICATION'

// Editor
exports.OPEN_NEW = 'OPEN_NEW'
exports.CLOSE_NEW = 'CLOSE_NEW'

exports.NEW_ROW = 'NEW_ROW'
exports.DESTROY_ROW = 'DESTROY_ROW'

exports.NEW_COLUMN = 'NEW_COLUMN'
exports.RENAME_COLUMN = 'RENAME_COLUMN'
exports.DESTROY_COLUMN = 'DESTROY_COLUMN'

exports.DESTROY = 'DESTROY'

exports.SET_ACTIVE_ROW = 'SET_ACTIVE_ROW'
exports.SET_ACTIVE_PROPERTY = 'SET_ACTIVE_PROPERTY'
exports.PROPERTY_TYPE = 'PROPERTY_TYPE'
exports.UPDATE_ROW = 'UPDATE_ROW'

// Github
exports.SET_GITHUB_BRANCHES = 'SET_GITHUB_BRANCHES'
exports.SET_GITHUB_ORGS = 'SET_GITHUB_ORGS'
exports.SET_GITHUB_REPOS = 'SET_GITHUB_REPOS'
exports.SET_GITHUB_FILES = 'SET_GITHUB_FILES'

exports.CLEAR_ORGS = 'CLEAR_ORGS'
exports.CLEAR_REPOS = 'CLEAR_REPOS'
exports.CLEAR_BRANCHES = 'CLEAR_BRANCHES'
exports.UNSET_ACTIVE_GITHUB_SELECTIONS = 'UNSET_ACTIVE_GITHUB_SELECTIONS'

exports.SELECTED_BRANCH = 'SELECTED_BRANCH'
exports.SELECTED_FILE = 'SELECTED_FILE'
exports.SELECTED_REPO = 'SELECTED_REPO'
exports.SELECTED_ORG = 'SELECTED_ORG'

exports.SAVE_TO_GITHUB_SUCCESS = 'SAVE_TO_GITHUB_SUCCESS'

// File Ops
exports.SET_FILENAME = 'SET_FILENAME'
exports.SET_FILE_TYPE = 'SET_FILE_TYPE'
exports.SET_FILE = 'SET_FILE'


text:
package com.fasterxml.jackson.databind.node;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import com.fasterxml.jackson.core.*;

import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.deser.*;
import com.fasterxml.jackson.databind.deser.std.CollectionDeserializer;
import com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer;
import com.fasterxml.jackson.databind.type.CollectionLikeType;

public class NodeContext2049Test extends BaseMapTest
{
    public interface HasParent {
        void setParent(Parent parent);
        Parent getParent();
    }

    static class Child implements HasParent {
        public Parent parent;
        public String property;

        @Override
        public void setParent(Parent p) { parent = p; }
        @Override
        public Parent getParent() { return parent; }
    }

    static class Parent {
        public List<Child> children;
        public Child singleChild;
    }

    static class ListValueInstantiator extends ValueInstantiator {
        @Override
        public String getValueTypeDesc() {
             return List.class.getName();
        }

        @Override
        public Object createUsingDefault(DeserializationContext ctxt) throws IOException {
             return new ArrayList<>();
        }
    }

    static class ParentSettingDeserializerModifier extends BeanDeserializerModifier {
        @Override
        public BeanDeserializerBuilder updateBuilder(DeserializationConfig config, BeanDescription beanDesc,
                  BeanDeserializerBuilder builder) {
             for (Iterator<SettableBeanProperty> propertyIt = builder.getProperties(); propertyIt.hasNext(); ) {
                  SettableBeanProperty property = propertyIt.next();
                  builder.addOrReplaceProperty(property.withValueDeserializer(new ParentSettingDeserializerContextual()), false);
             }
             return builder;
        }
    }

    @SuppressWarnings("serial")
    static class ParentSettingDeserializer extends DelegatingDeserializer {
        public ParentSettingDeserializer(JsonDeserializer<?> delegatee) {
             super(delegatee);
        }

        @Override
        public Object deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException {
             Object retValue = super.deserialize(jp, ctxt);
             if (retValue instanceof HasParent) {
                  HasParent obj = (HasParent) retValue;
                  Parent parent = null;
                  JsonStreamContext parsingContext = jp.getParsingContext();
                  while (parent == null && parsingContext != null) {
                       Object currentValue = parsingContext.getCurrentValue();
                       if (currentValue != null && currentValue instanceof Parent) {
                            parent = (Parent) currentValue;
                       }
                       parsingContext = parsingContext.getParent();
                  }
                  if (parent != null) {
                       obj.setParent(parent);
                  }
             }
             return retValue;
        }

        @Override
        protected JsonDeserializer<?> newDelegatingInstance(JsonDeserializer<?> newDelegatee) {
             return new ParentSettingDeserializer(newDelegatee);
        }

   }

    static class ParentSettingDeserializerContextual extends JsonDeserializer<Object> implements ContextualDeserializer {

        @Override
        public JsonDeserializer<?> createContextual(DeserializationContext ctxt, BeanProperty property)
            throws JsonMappingException
        {
             JavaType propertyType = property.getType();
             JavaType contentType = propertyType;
             if (propertyType.isCollectionLikeType()) {
                  contentType = propertyType.getContentType();
             }
             JsonDeserializer<Object> delegatee = ctxt.findNonContextualValueDeserializer(contentType);
             JsonDeserializer<Object> objectDeserializer = new ParentSettingDeserializer(delegatee);
             JsonDeserializer<?> retValue;
             if (propertyType.isCollectionLikeType()) {
                  CollectionLikeType collectionType = ctxt.getTypeFactory().constructCollectionLikeType(propertyType.getRawClass(),
                            contentType);
                  ValueInstantiator instantiator = new ListValueInstantiator();
                  retValue = new CollectionDeserializer(collectionType, objectDeserializer, null, instantiator);
             } else {
                  retValue = objectDeserializer;
             }
             return retValue;
        }

        @Override
        public Object deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {
             // TODO Auto-generated method stub
             return null;
        }

   }

    /*
    /**********************************************************************
    /* Test methods
    /**********************************************************************
     */

    private ObjectMapper objectMapper;
    {
        objectMapper = new ObjectMapper();
        objectMapper.registerModule(new com.fasterxml.jackson.databind.Module() {
              @Override
              public String getModuleName() {
                   return "parentSetting";
              }
              @Override
              public Version version() {
                   return Version.unknownVersion();
              }
              @Override
              public void setupModule(SetupContext context) {
                   context.addBeanDeserializerModifier(new ParentSettingDeserializerModifier());
              }
         });
    }

    final static String JSON = "{\n" +
            "     \"children\": [\n" +
            "          {\n" +
            "               \"property\": \"value1\"\n" +
            "          },\n" +
            "          {\n" +
            "               \"property\": \"value2\"\n" +
            "          }\n" +
            "     ],\n" +
            "     \"singleChild\": {\n" +
            "          \"property\": \"value3\"\n" +
            "     }\n" +
            "}";

    public void testReadNoBuffering() throws IOException {
        Parent obj = objectMapper.readerFor(Parent.class).readValue(JSON);
        assertSame(obj, obj.singleChild.getParent());
        for (Child child : obj.children) {
            assertSame(obj, child.getParent());
        }
    }

    public void testReadFromTree() throws IOException {
        JsonNode tree = objectMapper.readTree(JSON);
        Parent obj = objectMapper.reader().forType(Parent.class).readValue(tree);
        assertSame(obj, obj.singleChild.getParent());
        for (Child child : obj.children) {
            assertSame(obj, child.getParent());
        }
    }
}


text:
<?php declare(strict_types = 1);

namespace DoctrineAnnotationCodingStandard\Exception;

class ParseErrorException extends \RuntimeException
{

}


text:
import React from 'react';

import { GroupSelector } from './GroupSelector';
import { SettingsState } from './SettingsState';

export default {
	title: 'admin/settings/GroupSelector',
	component: GroupSelector,
	decorators: [
		(storyFn) => <SettingsState>{storyFn()}</SettingsState>,
	],
};

export const _default = () => <GroupSelector />;


text:
<?xml version="1.0" encoding="UTF-8"?>
<lint>
    <issue id="DuplicateIds" severity="warning" />
    <issue id="Instantiatable" severity="warning" />
    <issue id="MissingTranslation" severity="warning" />
</lint>


text:
using System;
using MobLang.Interpreter;
using MobLang.TypeSystem;
using Environment = MobLang.Interpreter.Environment;
using Type = MobLang.TypeSystem.Type;

namespace MobLang.Parser
{
    internal abstract class Expression
    {
        public abstract LazyValue Evaluate(Environment env);

        public abstract Type Infer(Environment env, Substitution subst);

        public Type Infer(Environment env)
        {
            var subst = new Substitution();
            var ret = Infer(env, subst);
            ret.Perform(subst);
            env.Perform(subst);
            return ret;
        }
    }
}


text:
DROP TABLE IF EXISTS users;

CREATE TABLE users (
  user_id identity PRIMARY KEY,
  name character varying(30)
);

INSERT INTO users (name) values ('Jimmy');
INSERT INTO users (name) values ('Iwao');
INSERT INTO users (name) values ('Kazuki');


text:
import { connect } from 'react-redux';
import { addTimer } from '../actions';
import AddTimer from '../components/AddTimer';

const mapStateToProps = (state) => ({});

const mapDispatchToProps = (dispatch) => ({
  onClickAdd: (name) => {
    dispatch(addTimer(name));
  },
});

const AddTimerContainer = connect(
  mapStateToProps,
  mapDispatchToProps
)(AddTimer);

export default AddTimerContainer;


text:
namespace mscorlib
{
	namespace System
	{
		namespace Reflection
		{

			//Constructors Tests

			//ReflectionTypeLoadException(std::vector<mscorlib::System::Type*> classes, std::vector<mscorlib::System::Exception*> exceptions)
			TEST(mscorlib_System_Reflection_ReflectionTypeLoadException_Fixture,Constructor_1)
			{

			}

			//ReflectionTypeLoadException(std::vector<mscorlib::System::Type*> classes, std::vector<mscorlib::System::Exception*> exceptions, mscorlib::System::String message)
			TEST(mscorlib_System_Reflection_ReflectionTypeLoadException_Fixture,Constructor_2)
			{

			}

			//Public Methods Tests

			// Method GetObjectData
			//		Signature: mscorlib::System::Runtime::Serialization::SerializationInfo info, mscorlib::System::Runtime::Serialization::StreamingContext context
			TEST(mscorlib_System_Reflection_ReflectionTypeLoadException_Fixture,GetObjectData_Test)
			{

			}

			//Public Properties Tests

			// Property Types
			//		Return Type: mscorlib::System::Type*
			//			Property Get Method
			TEST(mscorlib_System_Reflection_ReflectionTypeLoadException_Fixture,get_Types_Test)
			{

			}

			// Property LoaderExceptions
			//		Return Type: mscorlib::System::Exception*
			//			Property Get Method
			TEST(mscorlib_System_Reflection_ReflectionTypeLoadException_Fixture,get_LoaderExceptions_Test)
			{

			}

			// Property InnerException
			//		Return Type: mscorlib::System::Exception
			//			Property Get Method
			TEST(mscorlib_System_Reflection_ReflectionTypeLoadException_Fixture,get_InnerException_Test)
			{

			}

			// Property HelpLink
			//		Return Type: mscorlib::System::String
			//			Property Get Method
			TEST(mscorlib_System_Reflection_ReflectionTypeLoadException_Fixture,get_HelpLink_Test)
			{

			}

			// Property HelpLink
			//		Return Type: mscorlib::System::String
			//			Property Set Method
			TEST(mscorlib_System_Reflection_ReflectionTypeLoadException_Fixture,set_HelpLink_Test)
			{

			}

			// Property HResult
			//		Return Type: mscorlib::System::Int32
			//			Property Get Method
			TEST(mscorlib_System_Reflection_ReflectionTypeLoadException_Fixture,get_HResult_Test)
			{

			}

			// Property HResult
			//		Return Type: mscorlib::System::Int32
			//			Property Set Method
			TEST(mscorlib_System_Reflection_ReflectionTypeLoadException_Fixture,set_HResult_Test)
			{

			}

			// Property Message
			//		Return Type: mscorlib::System::String
			//			Property Get Method
			TEST(mscorlib_System_Reflection_ReflectionTypeLoadException_Fixture,get_Message_Test)
			{

			}

			// Property Source
			//		Return Type: mscorlib::System::String
			//			Property Get Method
			TEST(mscorlib_System_Reflection_ReflectionTypeLoadException_Fixture,get_Source_Test)
			{

			}

			// Property Source
			//		Return Type: mscorlib::System::String
			//			Property Set Method
			TEST(mscorlib_System_Reflection_ReflectionTypeLoadException_Fixture,set_Source_Test)
			{

			}

			// Property StackTrace
			//		Return Type: mscorlib::System::String
			//			Property Get Method
			TEST(mscorlib_System_Reflection_ReflectionTypeLoadException_Fixture,get_StackTrace_Test)
			{

			}

			// Property TargetSite
			//		Return Type: mscorlib::System::Reflection::MethodBase
			//			Property Get Method
			TEST(mscorlib_System_Reflection_ReflectionTypeLoadException_Fixture,get_TargetSite_Test)
			{

			}

			// Property Data
			//		Return Type: mscorlib::System::Collections::IDictionary
			//			Property Get Method
			TEST(mscorlib_System_Reflection_ReflectionTypeLoadException_Fixture,get_Data_Test)
			{

			}

		}
	}
}


text:
<?php

namespace MimeTyper\Repository;

/**
 * Two-ways mapping (type => extensions and extension => types), this class is a
 * PHP wrapper around the awesome jshttp/mime-db db.json mapping.
 *
 * Why jshttp/mime-db? It's the most complete mime type database out there,
 * compiled from IANA, Apache and custom type from community. It also defines a
 * nice format for mime type to extension mapping, including source (IANA,
 * Apache, custom), compressible status, notes, etc.
 *
 * @since 0.1.0
 * @see http://github.com/jshttp/mime-db
 */
class MimeDbRepository extends AbstractRepository
{
    /**
     * {@inheritdoc}
     */
    public function __construct($filename = null)
    {
        if (null === $filename) {
            $filename = dirname(dirname(__DIR__)) . '/node_modules/mime-db/db.json';
        }
        $this->filename = $filename;
    }

    /**
     * {@inheritdoc}
     */
    protected function internalInit()
    {
        // Parse data from mime db.
        $mimeDb = json_decode(file_get_contents($this->filename), true);

        // Map from mime-db to simple mappping "mimetype" => array(ext1, ext2, ext3)
        $mimeDbExtensions = array_map(
            function ($type) {
                // Format for 'jshttp/mime-db' is as follow:
                //    "application/xml": {
                //        "source": "iana",
                //        "compressible": true,
                //        "extensions": ["xml","xsl","xsd","rng"]
                //    },
                return (isset($type["extensions"])) ? $type["extensions"] : array();
            },
            array_values($mimeDb)
        );

        $this->setFromMap(array_combine(array_keys($mimeDb), $mimeDbExtensions));
    }
}


text:
ADD CORE COST LOG

        <?php echo validation_errors(); ?>
		<?php echo $success; ?>
		<?php echo form_open('list_data/addCoreCostLog/'.$core_id); ?>

            Cost Price

R<input type="text" class="form-control forms numeric" id="core_cost_log_price" name="core_cost_log_price" placeholder="Cost Price" value="<?php echo isset($_REQUEST['core_cost_log_price']) ?  $_REQUEST['core_cost_log_price'] : '';?>" style="width:270px;" />

            Cost Date

             <input type="text" class="form-control forms datepicker" id="core_cost_date" name="core_cost_date" value="<?php echo isset($_REQUEST['core_cost_date']) ?  $_REQUEST['core_cost_date'] : '';?>" style="width:300px;display:inline;background:url(../../images/calendar.png) right no-repeat; cursor:pointer;"/>

            Core
            <select id="core_cost_core_id_fk" name="core_cost_core_id_fk" style="width:300px" class="form-control forms">
             	<option value="0">Select One...</option>
                <?php foreach($core as $c) { ?>
                	<option value="<?php echo $c->core_id;?>" <?php if(($core_id) && $core_id == $c->core_id)  echo "selected='selected'";?>><?php echo $c->core_description;?></option>
                <?php } ?>
             </select>

          <button type="submit" class="btn btn-primary">Submit</button>
        </form>


text:
package me.lucko.luckperms.commands.user.subcommands;

import me.lucko.luckperms.LuckPermsPlugin;
import me.lucko.luckperms.commands.*;
import me.lucko.luckperms.constants.Message;
import me.lucko.luckperms.constants.Permission;
import me.lucko.luckperms.users.User;

import java.util.List;

import static me.lucko.luckperms.core.PermissionHolder.exportToLegacy;

public class UserListNodes extends SubCommand<User> {
    public UserListNodes() {
        super("listnodes", "Lists the permission nodes the user has", "/%s user <user> listnodes",
                Permission.USER_LISTNODES, Predicate.alwaysFalse());
    }

    @Override
    public CommandResult execute(LuckPermsPlugin plugin, Sender sender, User user, List<String> args, String label) {
        Message.LISTNODES.send(sender, user.getName(), Util.permNodesToString(exportToLegacy(user.getPermanentNodes())));
        Message.LISTNODES_TEMP.send(sender, user.getName(), Util.tempNodesToString(user.getTemporaryNodesLegacy()));
        return CommandResult.SUCCESS;
    }
}