text:
package org.apache.kafka.clients.admin;

import java.util.Map;
import java.util.concurrent.CancellationException;
import java.util.concurrent.ExecutionException;
import org.apache.kafka.common.KafkaFuture;
import org.apache.kafka.common.TopicPartitionReplica;
import org.apache.kafka.common.annotation.InterfaceStability;
import org.apache.kafka.common.errors.ClusterAuthorizationException;
import org.apache.kafka.common.errors.InvalidTopicException;
import org.apache.kafka.common.errors.KafkaStorageException;
import org.apache.kafka.common.errors.LogDirNotFoundException;
import org.apache.kafka.common.errors.ReplicaNotAvailableException;
import org.apache.kafka.common.errors.UnknownServerException;

/**
 * The result of {@link Admin#alterReplicaLogDirs(Map, AlterReplicaLogDirsOptions)}.
 *
 * To retrieve the detailed result per specified {@link TopicPartitionReplica}, use {@link #values()}. To retrieve the
 * overall result only, use {@link #all()}.
 */
@InterfaceStability.Evolving
public class AlterReplicaLogDirsResult {
    private final Map<TopicPartitionReplica, KafkaFuture<Void>> futures;

    AlterReplicaLogDirsResult(Map<TopicPartitionReplica, KafkaFuture<Void>> futures) {
        this.futures = futures;
    }

    /**
     * Return a map from {@link TopicPartitionReplica} to {@link KafkaFuture} which holds the status of individual
     * replica movement.
     *
     * To check the result of individual replica movement, call {@link KafkaFuture#get()} from the value contained
     * in the returned map. If there is no error, it will return silently; if not, an {@link Exception} will be thrown
     * like the following:
     *
     *

     *
{@link CancellationException}: The task was canceled.

     *
{@link InterruptedException}: Interrupted while joining I/O thread.

     *
{@link ExecutionException}: Execution failed with the following causes:

     *

     *
{@link ClusterAuthorizationException}: Authorization failed. (CLUSTER_AUTHORIZATION_FAILED, 31)

     *
{@link InvalidTopicException}: The specified topic name is too long. (INVALID_TOPIC_EXCEPTION, 17)

     *
{@link LogDirNotFoundException}: The specified log directory is not found in the broker. (LOG_DIR_NOT_FOUND, 57)

     *
{@link ReplicaNotAvailableException}: The replica does not exist on the broker. (REPLICA_NOT_AVAILABLE, 9)

     *
{@link KafkaStorageException}: Disk error occurred. (KAFKA_STORAGE_ERROR, 56)

     *
{@link UnknownServerException}: Unknown. (UNKNOWN_SERVER_ERROR, -1)

     *

     *

     */
    public Map<TopicPartitionReplica, KafkaFuture<Void>> values() {
        return futures;
    }

    /**
     * Return a {@link KafkaFuture} which succeeds on {@link KafkaFuture#get()} if all the replica movement have succeeded.
     * if not, it throws an {@link Exception} described in {@link #values()} method.
     */
    public KafkaFuture<Void> all() {
        return KafkaFuture.allOf(futures.values().toArray(new KafkaFuture[0]));
    }
}


text:
package main

import (
	"flag"
	"fmt"
	"log"
	"net/http"
	"os"
	"os/exec"
	"os/signal"
	"strings"
	"sync"
	"syscall"
	"time"
)

const (
	//	OPEN_FW_CMD_FMT  = `sudo ipfw table 1 add %s`
	//	CLOSE_FW_CMD_FMT = `sudo ipfw table 1 delete %s`
	OPEN_FW_CMD_FMT  = `echo open %s`
	CLOSE_FW_CMD_FMT = `echo close %s`
	KEEP_DURATION    = time.Duration(5) * time.Second
	HOST             = `0.0.0.0`
	PORT             = 9996
	PASSWORD_VAR     = `HK_PASSWORD`
	PASSWORD_KEY     = `key`
)

const (
	VERSION  = `0.1`
	HELP_FMT = `Usage: %s (options)
httpknock v%s, see LICENSE.txt

Set password using %s env variable.

`
)

type timerEntry struct {
	t *time.Timer // Timer
	u time.Time   // Until
	s time.Time   // Since
}

type timerMap struct {
	mu sync.Mutex
	ts map[string]timerEntry
}

var (
	flagKeepDuration time.Duration
	flagHost         string
	flagPort         int
)

var (
	password string
	timers   timerMap
)

func init() {
	flag.Usage = func() {
		fmt.Fprintf(os.Stderr, HELP_FMT, os.Args[0], VERSION, PASSWORD_VAR)
		flag.PrintDefaults()
	}

	flag.DurationVar(&flagKeepDuration, "kd", KEEP_DURATION, "Keep open for given duration.")
	flag.StringVar(&flagHost, "h", HOST, "Host to bind to.")
	flag.IntVar(&flagPort, "p", PORT, "Port to bind to.")

	timers.ts = make(map[string]timerEntry, 256)
}

func main() {
	var ok bool

	if password, ok = get_password(); !ok {
		fmt.Fprintf(os.Stderr, "Variable %s not set. Can't run without password.\n", PASSWORD_VAR)
		os.Exit(1)
	}

	flag.Parse()
	go runHTTPServer()
	sigwait()

	log.Println("HttpKnock stopped.")
}

func handleOpen(w http.ResponseWriter, req *http.Request) {
	if !auth_request(w, req) {
		return
	}

	ip := get_ip(req.RemoteAddr)
	duration := flagKeepDuration
	if val := req.FormValue("for"); val != "" {
		user_duration, err := time.ParseDuration(val)
		if err != nil {
			log.Printf("Failed to parse duration: %s", err)
			fmt.Fprintln(w, "Failed to parse duration, using default.")
		} else {
			duration = user_duration
		}
	}
	now := time.Now()
	until := now.Add(duration)

	timers.mu.Lock()
	defer timers.mu.Unlock()

	if t, ok := timers.ts[ip]; ok {
		if !t.t.Stop() {
			<-t.t.C
		}
		t.t.Reset(duration)

		log.Printf("Client %s reset timer for %s to: %s", req.RemoteAddr, ip, until)
		fmt.Fprintf(w, "Reset timer for %s to: %s\n", ip, until)
		fmt.Fprintln(w, "OK")
		return
	}

	if !run_fw_cmd(OPEN_FW_CMD_FMT, ip) {
		fmt.Fprintln(w, "FAILED")
		return
	}

	timers.ts[ip] = timerEntry{
		t: time.AfterFunc(duration, func() {
			log.Printf("Closing FW for %s", ip)
			if !run_fw_cmd(CLOSE_FW_CMD_FMT, ip) {
				log.Printf("Failed to close FW for %s!", ip)
			}

			timers.mu.Lock()
			delete(timers.ts, ip)
			timers.mu.Unlock()
		}),
		u: until,
		s: now,
	}

	log.Printf("Added %s until %s", ip, until)

	fmt.Fprintf(w, "Added %s until %s.\n", ip, until)
	fmt.Fprintln(w, "OK")
}

func handleClose(w http.ResponseWriter, req *http.Request) {
	if !auth_request(w, req) {
		return
	}

	var ip string
	if val := req.FormValue("ip"); val != "" {
		ip = val
	} else {
		ip = get_ip(req.RemoteAddr)
	}

	timers.mu.Lock()
	defer timers.mu.Unlock()

	if t, ok := timers.ts[ip]; ok {
		if !run_fw_cmd(CLOSE_FW_CMD_FMT, ip) {
			fmt.Fprintln(w, "FAILED")
			return
		}

		if !t.t.Stop() {
			<-t.t.C
		}
		delete(timers.ts, ip)

		log.Printf("Client %s killed timer for: %s\n", req.RemoteAddr, ip)
		fmt.Fprintln(w, "OK")
		return
	}

	log.Printf("Client %s tried to unblock non-blocked ip: %s\n", req.RemoteAddr, ip)
	fmt.Fprintf(w, "IP %s is not open.\n", ip)
	fmt.Fprintln(w, "FAILED")
}

func handleInfo(w http.ResponseWriter, req *http.Request) {
	if !auth_request(w, req) {
		return
	}

	fmt.Fprintf(w, "%-15s   %-40s   %-40s\n", "IP", "Until", "Since")
	timers.mu.Lock()
	for ip, t := range timers.ts {
		fmt.Fprintf(w, "%15s   %40s   %40s\n", ip, t.u, t.s)
	}
	timers.mu.Unlock()
	fmt.Fprintln(w, "OK")
}

func run_fw_cmd(cmd_fmt string, addr string) bool {
	cmd_str := fmt.Sprintf(cmd_fmt, addr)
	cmd_args := strings.Split(cmd_str, " ")

	if output, err := exec.Command(cmd_args[0], cmd_args[1:]...).Output(); err != nil {
		log.Printf("Command '%s' failed: %s\nOutput: %s", cmd_str, err, string(output))
		return false
	}

	log.Printf("Command '%s' succeeded", cmd_str)
	return true
}

func runHTTPServer() {
	addr := fmt.Sprintf("%s:%d", flagHost, flagPort)
	http.HandleFunc("/open", handleOpen)
	http.HandleFunc("/close", handleClose)
	http.HandleFunc("/info", handleInfo)
	log.Println("Starting HTTP server at", addr)
	log.Fatalln(http.ListenAndServe(addr, nil))
}

func auth_request(w http.ResponseWriter, req *http.Request) bool {
	if val := req.FormValue(PASSWORD_KEY); val == password {
		log.Printf("Authorized access to %s form %s", req.RequestURI, req.RemoteAddr)
		return true
	}

	log.Printf("Unauthorized access to %s from %s", req.RequestURI, req.RemoteAddr)
	http.NotFound(w, req)
	return false
}

func get_password() (string, bool) {
	for _, e := range os.Environ() {
		kv := strings.Split(e, "=")
		if kv[0] == PASSWORD_VAR {
			return kv[1], true
		}
	}

	return "", false
}

func get_ip(addr string) string {
	return strings.Split(addr, ":")[0]
}

func sigwait() {
	sig := make(chan os.Signal)
	signal.Notify(sig, syscall.SIGINT, syscall.SIGTERM, syscall.SIGKILL)

	stop_sig := <-sig
	log.Printf("Received signal: %s", stop_sig)
}

redpajama_set_name: RedPajamaGithub


text:
<!doctype html>
<title>HTMLTrackElement.default</title>


text:
package com.commonsware.android.fts;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;

public class MainActivity extends FragmentActivity implements QuestionsFragment.Contract {
  private static final String MODEL="model";
  private ModelFragment model=null;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    if (getSupportFragmentManager().findFragmentById(android.R.id.content) == null) {
      getSupportFragmentManager().beginTransaction()
                          .add(android.R.id.content,
                               new QuestionsFragment()).commit();
    }

    model=(ModelFragment)getSupportFragmentManager().findFragmentByTag(MODEL);

    if (model==null) {
      model=new ModelFragment();
      getSupportFragmentManager().beginTransaction().add(model, MODEL).commit();
    }
  }

  @Override
  public void onQuestionClicked(String url) {
    startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
  }
}


text:
package com.tiarebalbi.query;

import com.tiarebalbi.config.ApplicationContext;
import com.tiarebalbi.entity.Filme;
import com.tiarebalbi.entity.Voto;
import com.tiarebalbi.repository.FilmeRepository;
import org.junit.After;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;

import java.util.List;

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

@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = ApplicationContext.class)
@WebAppConfiguration
public class ITFilmeQueryTest {

    @Autowired
    private FilmeQuery query;

    @Autowired
    private FilmeRepository repositoryFilme;

    @Test
    public void deveBuscarDoisFilmesRandomicos() {

        Filme filme1 = new Filme();
        filme1.setNome("Filme 1");
        Filme filme2 = new Filme();
        filme2.setNome("Filme 2");
        Filme filme3 = new Filme();
        filme3.setNome("Filme 3");

        filme1 = this.repositoryFilme.save(filme1);
        filme2 = this.repositoryFilme.save(filme2);
        filme3 = this.repositoryFilme.save(filme3);

        List<Filme> filmes = this.query.buscarFilmeRandom(2);
        assertNotNull("O retorno da consulta não deve ser null", filmes);
        assertTrue(2 == filmes.size());
    }

    /**
     * Limpa registro após sua execução
     */
    @After
    public void deveLimparTodosRegistros() {
        List<Filme> dados = this.repositoryFilme.findAll();
        for (Filme filme : dados) {
            this.repositoryFilme.delete(filme);
        }
    }
}


text:
package cmd

import (
	"io/ioutil"
	"reflect"
	"strings"
	"testing"

	"github.com/spf13/pflag"

	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/runtime"
	"k8s.io/apimachinery/pkg/types"
	"k8s.io/apimachinery/pkg/watch"
	kcmd "k8s.io/kubernetes/pkg/kubectl/cmd"

	buildapi "github.com/openshift/origin/pkg/build/api"
	buildclient "github.com/openshift/origin/pkg/client"
	"github.com/openshift/origin/pkg/cmd/util/clientcmd"
	deployapi "github.com/openshift/origin/pkg/deploy/api"
)

// TestLogsFlagParity makes sure that our copied flags don't slip during rebases
func TestLogsFlagParity(t *testing.T) {
	kubeCmd := kcmd.NewCmdLogs(nil, ioutil.Discard)
	f := clientcmd.NewFactory(nil)
	originCmd := NewCmdLogs("oc", "logs", f, ioutil.Discard)

	kubeCmd.LocalFlags().VisitAll(func(kubeFlag *pflag.Flag) {
		originFlag := originCmd.LocalFlags().Lookup(kubeFlag.Name)
		if originFlag == nil {
			t.Errorf("missing %v flag", kubeFlag.Name)
			return
		}

		if !reflect.DeepEqual(originFlag, kubeFlag) {
			t.Errorf("flag %v %v does not match %v", kubeFlag.Name, kubeFlag, originFlag)
		}
	})
}

type fakeBuildClient struct {
	build *buildapi.Build
}

func (f *fakeBuildClient) List(opts metav1.ListOptions) (*buildapi.BuildList, error) {
	return nil, nil
}

func (f *fakeBuildClient) Get(names string, opts metav1.GetOptions) (*buildapi.Build, error) {
	return f.build, nil
}

func (f *fakeBuildClient) Create(build *buildapi.Build) (*buildapi.Build, error) {
	return nil, nil
}

func (f *fakeBuildClient) Update(build *buildapi.Build) (*buildapi.Build, error) {
	return nil, nil
}

func (f *fakeBuildClient) Delete(name string) error {
	return nil
}

func (f *fakeBuildClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {
	return nil, nil
}

func (f *fakeBuildClient) Clone(request *buildapi.BuildRequest) (*buildapi.Build, error) {
	return nil, nil
}

func (f *fakeBuildClient) UpdateDetails(build *buildapi.Build) (*buildapi.Build, error) {
	return nil, nil
}

func (f *fakeBuildClient) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (*buildapi.Build, error) {
	return nil, nil
}

type fakeNamespacer struct {
	client buildclient.BuildInterface
}

func (f *fakeNamespacer) Builds(namespace string) buildclient.BuildInterface {
	return f.client
}

type fakeWriter struct {
	data []byte
}

func (f *fakeWriter) Write(p []byte) (n int, err error) {
	f.data = p
	return len(p), nil
}

func TestRunLogForPipelineStrategy(t *testing.T) {
	bld := buildapi.Build{
		ObjectMeta: metav1.ObjectMeta{
			Name:        "foo",
			Annotations: map[string]string{buildapi.BuildJenkinsBlueOceanLogURLAnnotation: "https://foo"},
		},
		Spec: buildapi.BuildSpec{
			CommonSpec: buildapi.CommonSpec{
				Strategy: buildapi.BuildStrategy{
					JenkinsPipelineStrategy: &buildapi.JenkinsPipelineBuildStrategy{},
				},
			},
		},
	}

	fakebc := fakeBuildClient{
		build: &bld,
	}
	fakenamespacer := fakeNamespacer{
		client: &fakebc,
	}
	fakewriter := fakeWriter{}

	testCases := []struct {
		o runtime.Object
	}{
		{
			o: &bld,
		},
		{
			o: &buildapi.BuildConfig{
				Spec: buildapi.BuildConfigSpec{
					CommonSpec: buildapi.CommonSpec{
						Strategy: buildapi.BuildStrategy{
							JenkinsPipelineStrategy: &buildapi.JenkinsPipelineBuildStrategy{},
						},
					},
				},
			},
		},
	}

	for _, tc := range testCases {
		opts := OpenShiftLogsOptions{
			KubeLogOptions: &kcmd.LogsOptions{
				Object: tc.o,
				Out:    &fakewriter,
			},
			Client: &fakenamespacer,
		}
		err := opts.RunLog()
		if err != nil {
			t.Errorf("%#v: RunLog error %v", tc.o, err)
		}
		output := string(fakewriter.data[:])
		if !strings.Contains(output, "https://foo") {
			t.Errorf("%#v: RunLog did not have https://foo, but rather had: %s", tc.o, output)
		}
	}

}

func TestIsPipelineBuild(t *testing.T) {
	testCases := []struct {
		o          runtime.Object
		isPipeline bool
	}{
		{
			o: &buildapi.Build{
				Spec: buildapi.BuildSpec{
					CommonSpec: buildapi.CommonSpec{
						Strategy: buildapi.BuildStrategy{
							JenkinsPipelineStrategy: &buildapi.JenkinsPipelineBuildStrategy{},
						},
					},
				},
			},
			isPipeline: true,
		},
		{
			o: &buildapi.Build{
				Spec: buildapi.BuildSpec{
					CommonSpec: buildapi.CommonSpec{
						Strategy: buildapi.BuildStrategy{
							SourceStrategy: &buildapi.SourceBuildStrategy{},
						},
					},
				},
			},
			isPipeline: false,
		},
		{
			o: &buildapi.BuildConfig{
				Spec: buildapi.BuildConfigSpec{
					CommonSpec: buildapi.CommonSpec{
						Strategy: buildapi.BuildStrategy{
							JenkinsPipelineStrategy: &buildapi.JenkinsPipelineBuildStrategy{},
						},
					},
				},
			},
			isPipeline: true,
		},
		{
			o: &buildapi.BuildConfig{
				Spec: buildapi.BuildConfigSpec{
					CommonSpec: buildapi.CommonSpec{
						Strategy: buildapi.BuildStrategy{
							DockerStrategy: &buildapi.DockerBuildStrategy{},
						},
					},
				},
			},
			isPipeline: false,
		},
		{
			o:          &deployapi.DeploymentConfig{},
			isPipeline: false,
		},
	}

	for _, tc := range testCases {
		isPipeline, _, _, _, _ := isPipelineBuild(tc.o)
		if isPipeline != tc.isPipeline {
			t.Errorf("%#v, unexpected results expected isPipeline %v returned isPipeline %v", tc.o, tc.isPipeline, isPipeline)
		}
	}
}


text:
package cmd

import (
	"fmt"
	"net/url"
	"os"

	"github.com/spf13/cobra"
)

// SimsCreateArcSessionCmdSimId holds value of 'sim_id' option
var SimsCreateArcSessionCmdSimId string

func init() {
	SimsCreateArcSessionCmd.Flags().StringVar(&SimsCreateArcSessionCmdSimId, "sim-id", "", TRAPI("SIM ID of the target SIM."))
	SimsCmd.AddCommand(SimsCreateArcSessionCmd)
}

// SimsCreateArcSessionCmd defines 'create-arc-session' subcommand
var SimsCreateArcSessionCmd = &cobra.Command{
	Use:   "create-arc-session",
	Short: TRAPI("/sims/{sim_id}/sessions/arc:post:summary"),
	Long:  TRAPI(`/sims/{sim_id}/sessions/arc:post:description`) + "\n\n" + createLinkToAPIReference("Sim", "createArcSession"),
	RunE: func(cmd *cobra.Command, args []string) error {

		if len(args) > 0 {
			return fmt.Errorf("unexpected arguments passed => %v", args)
		}

		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}
		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectSimsCreateArcSessionCmdParams(ac)
		if err != nil {
			return err
		}

		body, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if body == "" {
			return nil
		}

		if rawOutput {
			_, err = os.Stdout.Write([]byte(body))
		} else {
			return prettyPrintStringAsJSON(body)
		}
		return err
	},
}

func collectSimsCreateArcSessionCmdParams(ac *apiClient) (*apiParams, error) {
	var parsedBody interface{}
	var err error
	err = checkIfRequiredStringParameterIsSupplied("sim_id", "sim-id", "path", parsedBody, SimsCreateArcSessionCmdSimId)
	if err != nil {
		return nil, err
	}

	return &apiParams{
		method: "POST",
		path:   buildPathForSimsCreateArcSessionCmd("/sims/{sim_id}/sessions/arc"),
		query:  buildQueryForSimsCreateArcSessionCmd(),

		noRetryOnError: noRetryOnError,
	}, nil
}

func buildPathForSimsCreateArcSessionCmd(path string) string {

	escapedSimId := url.PathEscape(SimsCreateArcSessionCmdSimId)

	path = strReplace(path, "{"+"sim_id"+"}", escapedSimId, -1)

	return path
}

func buildQueryForSimsCreateArcSessionCmd() url.Values {
	result := url.Values{}

	return result
}


text:
layout: default
---

  {% for post in site.posts%}

<time datetime="{{ post.date | date_to_xmlschema }}" itemprop="datePublished">{{ post.date | date: "%b %-d, %Y" }}</time>

        {{post.title}}

  {% endfor %}


text:
import { NgModule }      from '@angular/core';
import { CommonModule }  from '@angular/common';
import { FormsModule } from '@angular/forms';
import { AppTranslationModule } from '../../app.translation.module';
import { NgaModule } from '../../theme/nga.module';

import { Dashboard } from './dashboard.component';
import { routing }       from './dashboard.routing';

import { PieChart } from './pieChart';
import { PieChartService } from './pieChart/pieChart.service';

@NgModule({
  imports: [
    CommonModule,
    FormsModule,
    AppTranslationModule,
    NgaModule,
    routing
  ],
  declarations: [
    PieChart,
    Dashboard
  ],
  providers: [
    PieChartService
  ]
})
export class DashboardModule {}


text:
'use strict';

var classNames = require('classnames');

require('./warn')('`rcUtil joinClasses()` is deprecated, ' + 'use `classNames()` by `require(\'classnames\')` instead');

module.exports = classNames;


text:
import sys
import os

from .core import Vendor, call_with_output, denormalize, call, is_forbidden

class Package(object):

    """Class that represents a local package."""

    def __init__(self, package_id, volume='/'):
        self.package_id = package_id
        self.volume = volume
        self.name = denormalize(self.package_id)
        self._package = None
        self._version = None
        self._instalL_date = None
        self._files = None
        self._dirs = None

    def __str__(self):
        return "Package '%s' on volume '%s'" % (self.package_id,
                                                self.volume)

    def __repr__(self):
        return "Package('%s')" % (self.package_id)

    @property
    def installed(self):
        cmd = ['pkgutil', '--volume', self.volume,
               '--pkg-info', self.package_id]
        return call(cmd, silent=True)

    @property
    def version(self):
        if not self._version:
            self.get_info()
        return self._version

    @property
    def install_date(self):
        if not self._install_date:
            self.get_info()
        return self._install_date

    @property
    def package(self):
        if not self._package:
            self.get_info()
        self._package = '%s-%s.pkg' % (self.name, self.version)
        return self._package

    @property
    def files(self):
        if not self._files:
            self._files = self.get_files()
        return self._files

    def get_info(self):
        cmd = ['pkgutil', '-v', '--volume', self.volume,
               '--pkg-info', self.package_id]
        out = call_with_output(cmd)
        self._version = '(none)'
        self._install_date = '(none)'
        for line in out:
            line = line.strip()
            if line.startswith('version: '):
                self._version = line[len('version: '):]
            if line.startswith('install-time: '):
                self._install_date = line[len('install-time: '):]
        return self._version, self._install_date

    def get_files(self):
        cmd = ['pkgutil', '--volume', self.volume,
               '--files', self.package_id]
        out = call_with_output(cmd)
        content = [os.path.join(self.volume, line.strip()) for line in out]
        return content

    def uninstall(self, verbose=False):
        dirs = []
        for x in self.files:
            if is_forbidden(x, self.volume):
                if verbose:
                    print "Skipping '%s'" % x
                continue
            if os.path.isdir(x):
                dirs.append(x)
                continue
            if verbose:
                print "Removing '%s'" % x
            try:
                os.unlink(x)
            except OSError as err:
                if verbose:
                    print >> sys.stderr, err
        dirs.sort(lambda p1, p2: p1.count('/') - p2.count('/'), reverse=True)
        for x in dirs:
            if verbose:
                print "Removing directory '%s'" % x
            try:
                os.rmdir(x)
            except OSError as err:
                if verbose:
                    print >> sys.stderr, err
        cmd = ['pkgutil', '--volume', self.volume, '--forget', self.package_id]
        return call(cmd, silent=False)

class Repository(object):

    """Class that represents a local repository."""

    def __init__(self, volume='/', vendor=Vendor):
        self.volume = volume
        self.vendor = vendor
        self.packages = []

    def __str__(self):
        return "%d packages(s) installed on volume '%s'" % (len(self.packages),
                                                            self.volume)

    def __repr__(self):
        return "Repository('%s')" % self.volume

    def sync(self):
        self.get_packages()
        return True

    def get_packages(self):
        cmd = ['pkgutil', '--volume', self.volume,
               '--pkgs=' + self.vendor + '.*']
        out = call_with_output(cmd)
        self.packages = [line.strip() for line in out]
        return self.packages

    def install_package(self, filename, verbose=False):
        cmd = ['installer']
        if verbose:
            cmd.append('-verbose')
        cmd.extend(['-pkg', filename, '-target', self.volume])
        call(cmd, silent=False)

    def remote_install_package(self, remote_package, verbose=False):
        path = remote_package.download(verbose=True)
        self.install_package(path, verbose)
        os.remove(path)

    def search_path(self, path):
        'Search for path in all packages'
        packages = []
        out = call_with_output(['pkgutil', '--file-info', path])
        for line in out:
            line = line.strip()
            if line.startswith('pkgid: '):
                packages.append(line[len('pkgid: '):])
        return packages


text:
window.addEventListener('load', (event) => {
    //Only need the fetch data since we dont have to set up listeners, the home button is simple
    // enough to be just html.
    fetchData();
});

function generateList(items, pagination) {
    //This is different from index.js in that we need to show discretion about what links we show.
    let linksHtml = '';
    const resultsPerPage = 20;
    let keys = Object.keys(items);
    const username = localStorage.getItem("username");
    const author = username && username.length < 15 ? username : 'Anonymous';
    //Generating a new obj containing filtered results for easier pagination etc.
    let filteredObjects = {};
    keys.forEach((key)=> {
        if (items[key]["username"] === username){
            filteredObjects[key] = items[key];
        }
    });
    let filteredKeys = Object.keys(filteredObjects);
    //Stores the result for other functions in results.js to access easily without the use of a global var.
    localStorage.setItem('links', JSON.stringify(filteredObjects));

    let paginatedFilteredKeys = filteredKeys.slice((pagination -1) * resultsPerPage, pagination * resultsPerPage);

    paginatedFilteredKeys.forEach((key)=> {
        linksHtml += `
 ${filteredObjects[key]["link"]}
        submitted by: ${author}(You) <button onclick="deleteEntry('${key}','${pagination}')">Delete</button>
`;
        });
    generatePagination(filteredKeys.length);
    paginationBinding(pagination);
    if (linksHtml === '') {
        document.getElementById('page-title').innerHTML = 'You have yet to submit!';
    }
    document.getElementById('links-container').innerHTML = linksHtml;
}

//Not unique to results, see index.js commenting if required.
function deleteEntry(key, pagination){
    let links = JSON.parse(localStorage.getItem('links'));
    const resultsPerPage = 20;
    delete links[key];
    const paginationCheck = Math.ceil(Object.keys(links).length/resultsPerPage);
    if (pagination > paginationCheck) {
        pagination = paginationCheck;
    }

    let linkString = JSON.stringify(links);
    localStorage.setItem('links', linkString);
    putJSONBin(links);
    generateList(links, pagination);
}

//Not unique to results, see index.js commenting if required.
function fetchData() {
    let fetchReq = fetchJSONBin();
    const onLoadPagination = 1;
    fetchReq.onreadystatechange = () => {
        if (fetchReq.readyState == XMLHttpRequest.DONE) {
            const parsedRes = JSON.parse(fetchReq.responseText)
            localStorage.setItem("links", fetchReq.responseText);
            generateList(parsedRes, onLoadPagination);
        }
    };
}

//Not unique to results, see index.js commenting if required.
function fetchJSONBin() {
    let req = new XMLHttpRequest();
    req.open("GET", "https://api.jsonbin.io/b/604c388a7ea6546cf3dc5e5b/latest", true);
    req.send();
    return req;
}

//Not unique to results, see index.js commenting if required.
function putJSONBin(json) {
    json = JSON.stringify(json);
    let req = new XMLHttpRequest();
    req.open("PUT", "https://api.jsonbin.io/b/604c388a7ea6546cf3dc5e5b", true);
    req.setRequestHeader("Content-Type", "application/json");
    req.send(json);
    return req;
}

//Not unique to results, see index.js commenting if required.
function generatePagination(links) {
    let paginationContainer = document.getElementById('pagination-container')
    const pageCount = Math.ceil(links/20)
    if (pageCount < 2){
        paginationContainer.innerHTML = '';
        return;
    }
    paginationContainer.innerHTML = '<button id="preButton" class="pagination" data-destination="1" > < </button>'
    for (let i = 1; i < pageCount+1; i++) {
        paginationContainer.innerHTML += '<button class="pagination" data-destination="' + i +
         '" data-pagination="' + i + '">' + i + '</button>';
    }
    paginationContainer.innerHTML += '<button id="postButton" class="pagination" data-destination="2"> > </button>'

    setPaginationRefs();
}

//Not unique to results, see index.js commenting if required.
function setPaginationRefs() {
    let paginationButtons = document.getElementsByClassName('pagination');
    for (let button of paginationButtons) {
        button.addEventListener('click', function (){
            generateList(JSON.parse(localStorage.getItem('links')), button.dataset.destination);
        });
    };
}

//Not unique to results, see index.js commenting if required.
function paginationBinding(pagination) {
    let paginationButtons = document.querySelectorAll(('[data-pagination]'));
    if (paginationButtons.length > 1) {
        for (let button of paginationButtons) {
            button.classList.remove("selected");
        }
        let highlightButton = document.querySelector((`[data-pagination='${pagination}']`));
        highlightButton.classList.add("selected");

        if (pagination > 1) {
            let preButton = document.getElementById("preButton");
            preButton.dataset.destination = parseInt(pagination) -1;
        }
        if (pagination < paginationButtons.length) {
            let postButton = document.getElementById("postButton");
            postButton.dataset.destination = parseInt(pagination) +1;
        }
    }
}


text:
<?php
/**
 * Common helper methods for PRO widgets.
 */
class TribeEventsPro_Widgets {
	/**
	 * @param $filters
	 * @param $operand
	 * @return array|null
	 */
	public static function form_tax_query( $filters, $operand ) {
		if ( empty( $filters ) ) return null;

		$tax_query = array();

		foreach ( $filters as $tax => $terms ) {
			if ( empty( $terms ) ) continue;

			$tax_operand = 'AND';
			if ( $operand == 'OR' ) $tax_operand = 'IN';
			$arr = array( 'taxonomy' => $tax, 'field' => 'id', 'operator' => $tax_operand, 'terms' => $terms );
			$tax_query[] = $arr;
		}

		if ( count( $tax_query ) > 1 ) $tax_query['relation'] = $operand;
		return $tax_query;
	}
}


text:
<?php

namespace Bolt\Tests\Nut;

use Symfony\Component\Console\Tester\CommandTester;

/**
 * Table console output helper trait.
 *
 * @author Gawain Lynch <gawain.lynch@gmail.com>
 */
trait TableHelperTrait
{
    protected function getNormalOuput()
    {
        $tester = $this->getCommandTester();

        $tester->execute([]);

        return $tester->getDisplay();
    }

    protected function getMatchingLineNumber($pattern, $display)
    {
        if (is_string($display)) {
            $display = explode("\n", $display);
        }
        $linesFound = preg_grep($pattern, $display);

        return key($linesFound);
    }

    /**
     * @return CommandTester
     */
    abstract protected function getCommandTester();
}


text:
// Copyright (c) Philipp Wagner. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using TokenAuthentication.Infrastructure.Database;

namespace TokenAuthentication.Services
{
    /// <summary>
    /// The BaseService provides access to the <see cref="IDatabaseFactory"/>.
    /// </summary>
    public abstract class BaseService
    {
        protected readonly IDatabaseFactory DatabaseFactory;

        protected BaseService(IDatabaseFactory databaseFactory)
        {
            DatabaseFactory = databaseFactory;
        }
    }
}


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using Microsoft.WindowsAzure.Services.ServiceBus;
using Windows.Storage.Streams;

namespace Microsoft.WindowsAzure.Services.ServiceBus.UnitTests.ServiceBusTests
{
    /// <summary>
    /// Unit tests for the BrokeredMessageSettings class.
    /// </summary>
    [TestClass]
    public sealed class MessageSettingsTests
    {
        /// <summary>
        /// Tests specifying null arguments in constructors.
        /// </summary>
        [TestMethod]
        public void InvalidArgumentsInMethods()
        {
            Assert.ThrowsException<ArgumentNullException>(() => BrokeredMessageSettings.CreateFromHttpContent(null));
            Assert.ThrowsException<ArgumentNullException>(() => BrokeredMessageSettings.CreateFromText(null));
            Assert.ThrowsException<ArgumentNullException>(() => BrokeredMessageSettings.CreateFromText(null, "Test"));
            Assert.ThrowsException<ArgumentNullException>(() => BrokeredMessageSettings.CreateFromText("Test", null));
            Assert.ThrowsException<ArgumentException>(() => BrokeredMessageSettings.CreateFromText("Test", ""));
            Assert.ThrowsException<ArgumentException>(() => BrokeredMessageSettings.CreateFromText("Test", " "));
            Assert.ThrowsException<ArgumentNullException>(() => BrokeredMessageSettings.CreateFromByteArray(null));
            Assert.ThrowsException<ArgumentNullException>(() => BrokeredMessageSettings.CreateFromStream(null));
        }
    }
}


text:
// Copyright Babbington Slade Ltd
using System;
using System.Diagnostics;
using System.Net.PeerToPeer;
using ExcelDna.Integration;

namespace SSAddin {
	public class AddIn : IExcelAddIn {
        private static TraceSource m_TraceSource = new TraceSource( "ssaddin");

        // We don't use System.Net.PeerToPeer.PeerName anywhere in the SSAddin code.
        // This is here to force loading of System.Net.dll 4.0.0.0 before Google.Apis.dll
        // asks for v2.0.5.0 as described in the link below. For some reason assembly
        // bindingRedirects in SSAddin.xll.config don't work for System.Net.dll, even
        // though they do work for System.Net.Http.Primitives. I don't want to have
        // to require the KB2468871 fix, which wouldn't install on my Win8 laptop
        // anyway. One more thing: if you're trying to do bindingRedirects in your
        // .xll.config, do make sure ExcelDnaPack isn't packing it into the XLL. It
        // will if it find a .xll.config with a matching base name next to the .dna
        // file. JOS 2017-05-06
        // https://github.com/google/google-api-dotnet-client/issues/378
        // http://blog.slaks.net/2013-12-25/redirecting-assembly-loads-at-runtime/
        private static PeerName m_PeerName = new PeerName( "dummy" );

		public void AutoOpen( ) {
            Logr.Log( "AutoOpen" );
			ExcelIntegration.RegisterUnhandledExceptionHandler( e => "EXCEPTION: " + (e as Exception).Message);
		}

		public void AutoClose( ) {
            Logr.Log( "AutoClose" );
		}
	}
}


text:
- [Install MongoDB Community Edition on Ubuntu](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/<Paste>)
- [How to Install MongoDB on Ubuntu 16.04](https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-16-04)

## Setting up MongoDB on Ubuntu

MongoDB: 3.4.2
Ubuntu: 16.04

Import the public key:

```
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
```

Create a list file for MongoDB

```sh
sudo touch /etc/apt/sources.list.d/mongodb-org-3.4.list

# Paste this:
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
```

Reload packages and install MongoDB

```sh
sudo apt-get update
sudo apt-get install -y mongodb-org
```

Create a unit file to run MongoDB as service and lauch it at boot

```sh
sudo nano /etc/systemd/system/mongodb.service

# Paste this:

[Unit]
Description=High-performance, schema-free document-oriented database
After=network.target

[Service]
User=mongodb
ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf

[Install]
WantedBy=multi-user.target
```

Start MongoDB

```sh
sudo systemctl start mongodb
```

Check the status of the service

```sh
sudo systemctl status mongodb
```

Automatically starts when system starts

```sh
sudo systemctl enable mongodb
```

## Installing on Fedora 25

Create this file `sudo vim /etc/yum.repos.d/mongodb-org-3.4.repo` and paste this:

```sh
[mongodb-org-3.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc
```

Then run `sudo dnf update` and `sudo dnf install -y mongodb-org`

## Export a database
```sh
mongodump -h <HOST:PORT> -u <USER> -p <PASSWORD> -d <DATABASE> -o <DUMP_DIR>
```

## Restore a database
```sh
# localhost
mongorestore -h localhost:27017 -d <DATABASE> <DUMP_DIR>

# Anywhere with auth
mongorestore -h <HOST:PORT> -d <DATABASE> -u <USER> -p <PASSWORD> <DUMP_DIR>
```

> `mongodump` and `mongorestore` deal with binary dump. It's a recommended way to backup your db because they preserve all bson types which doesn't happen when you use `mongoimport` and `mongoexport` which deal with json and xml files.


text:
<?php
Class Po_Form_FrmSupplier extends Zend_Dojo_Form {

	public function FrmSupplier($data=null){

		$tr = Application_Form_FrmLanguages::getCurrentlanguage();
		$filter = 'dijit.form.FilteringSelect';
		$tvalidate = 'dijit.form.ValidationTextBox';
		$textbox = 'dijit.form.TextBox';
		$numbertext='dijit.form.NumberTextBox';
		$tarea = 'dijit.form.Textarea';

		$request=Zend_Controller_Front::getInstance()->getRequest();

		$dbGB = new Application_Model_DbTable_DbGlobal();
    	$dbGBStock = new Application_Model_DbTable_DbGlobalStock();

		$_arr = array(1=>$tr->translate("LOCAL"),2=>$tr->translate("OVER_SEA"));
    	$supplierType = new Zend_Dojo_Form_Element_FilteringSelect("supplierType");
    	$supplierType->setMultiOptions($_arr);
    	$supplierType->setAttribs(array(
    			'dojoType'=>'dijit.form.FilteringSelect',
    			'required'=>'true',
    			'missingMessage'=>'Invalid Module!',
    			'class'=>'fullside height-text',)
		);

		$supplierName = new Zend_Dojo_Form_Element_TextBox('supplierName');
    	$supplierName->setAttribs(array(
    			'dojoType'=>'dijit.form.ValidationTextBox',
    			'required'=>'true',
    			'class'=>'fullside ',
    			'placeholder'=>$tr->translate("SUPPLIER_NAME"),
    			'missingMessage'=>$tr->translate("Forget Enter Data")
    	));

		$address=  new Zend_Form_Element_Textarea('address');
    	$address->setAttribs(array(
    			'dojoType'=>'dijit.form.Textarea',
    			'class'=>'fullside',
    			'style'=>'font-family: inherit;  min-height:100px !important; max-width:99%;'));

		$supplierTel=  new Zend_Dojo_Form_Element_TextBox('supplierTel');
    	$supplierTel->setAttribs(array(
    			'dojoType'=>'dijit.form.TextBox',
    			'class'=>'fullside',
    			'placeholder'=>$tr->translate("TEL"),
				)
		);

		$contactName=  new Zend_Dojo_Form_Element_TextBox('contactName');
    	$contactName->setAttribs(array(
    			'dojoType'=>'dijit.form.TextBox',
    			'class'=>'fullside',
    			'placeholder'=>$tr->translate("CONTACT_NAME"),
				)
		);

		$contactNumber=  new Zend_Dojo_Form_Element_TextBox('contactNumber');
    	$contactNumber->setAttribs(array(
    			'dojoType'=>'dijit.form.TextBox',
    			'class'=>'fullside',
    			'placeholder'=>$tr->translate("CONTACT_NUMBER"),
				)
		);

		$receiverName=  new Zend_Dojo_Form_Element_TextBox('receiverName');
    	$receiverName->setAttribs(array(
    			'dojoType'=>'dijit.form.TextBox',
    			'class'=>'fullside',
    			'placeholder'=>$tr->translate("RECEIVER_NAME"),
				)
		);

		$bankNumber=  new Zend_Dojo_Form_Element_TextBox('bankNumber');
    	$bankNumber->setAttribs(array(
    			'dojoType'=>'dijit.form.TextBox',
    			'class'=>'fullside',
    			'placeholder'=>$tr->translate("BANK_NUMBER"),
				)
		);

		$email=  new Zend_Dojo_Form_Element_TextBox('email');
    	$email->setAttribs(array(
    			'dojoType'=>'dijit.form.TextBox',
    			'class'=>'fullside',
    			'placeholder'=>$tr->translate("EMAIL"),
				)
		);

		$note=  new Zend_Form_Element_Textarea('note');
    	$note->setAttribs(array(
    			'dojoType'=>'dijit.form.Textarea',
    			'class'=>'fullside',
    			'style'=>'font-family: inherit;  min-height:100px !important; max-width:99%;'));

		$_arr = array(1=>$tr->translate("ACTIVE"),0=>$tr->translate("DEACTIVE"));
    	$_status = new Zend_Dojo_Form_Element_FilteringSelect("status");
    	$_status->setMultiOptions($_arr);
    	$_status->setAttribs(array(
    			'dojoType'=>'dijit.form.FilteringSelect',
    			'required'=>'true',
    			'missingMessage'=>'Invalid Module!',
    			'class'=>'fullside height-text',));

		$id = new Zend_Form_Element_Hidden('id');
    	$id->setAttribs(array(
    			'dojoType'=>'dijit.form.TextBox',
    			'class'=>'fullside ',
    	));

		if(!empty($data)){

			$supplierType->setValue($data['supplierType']);
			$supplierName->setValue($data['supplierName']);
			$address->setValue($data['address']);
			$supplierTel->setValue($data['supplierTel']);
			$contactName->setValue($data['contactName']);
			$contactNumber->setValue($data['contactNumber']);
			$receiverName->setValue($data['receiverName']);
			$bankNumber->setValue($data['bankNumber']);
			$email->setValue($data['email']);
			$note->setValue($data['note']);
			$_status->setValue($data['status']);
			$id->setValue($data['id']);
		}

		$this->addElements(array(
				$supplierType,
				$supplierName,
				$address,
				$supplierTel,
				$contactName,
				$contactNumber,
				$receiverName,
				$bankNumber,
				$email,
				$note,
				$_status,
				$id
		));
		return $this;
	}
}


text:
require 'rdoc/class_module'

##
# An anonymous class like:
#
#   c = Class.new do end
#
# AnonClass is currently not used.

class RDoc::AnonClass < RDoc::ClassModule
end


text:
@interface PrivateToDenpendentViewController : UIViewController

@end


text:
.. _vim.fault.HostIncompatibleForFaultTolerance: ../../../vim/fault/HostIncompatibleForFaultTolerance.rst

.. _vim.fault.HostIncompatibleForFaultTolerance.Reason: ../../../vim/fault/HostIncompatibleForFaultTolerance/Reason.rst

vim.fault.HostIncompatibleForFaultTolerance.Reason
==================================================
  Reasons why fault tolerance is not supported on the host.
  :contained by: `vim.fault.HostIncompatibleForFaultTolerance`_

  :type: `vim.fault.HostIncompatibleForFaultTolerance.Reason`_

  :name: processor

values:
--------

product
   The product does not support fault tolerance.

processor
   The product supports fault tolerance but the host CPU does not.


text:
#define NI52_RESET     0  /* writing to this address, resets the i82586 */
#define NI52_ATTENTION 1  /* channel attention, kick the 586 */
#define NI52_TENA      3  /* 2-5 possibly wrong, Xmit enable */
#define NI52_TDIS      2  /* Xmit disable */
#define NI52_INTENA    5  /* Interrupt enable */
#define NI52_INTDIS    4  /* Interrupt disable */
#define NI52_MAGIC1    6  /* dunno exact function */
#define NI52_MAGIC2    7  /* dunno exact function */

#define NI52_MAGICVAL1 0x00  /* magic-values for ni5210 card */
#define NI52_MAGICVAL2 0x55

/*
 * where to find the System Configuration Pointer (SCP)
 */
#define SCP_DEFAULT_ADDRESS 0xfffff4

/*
 * System Configuration Pointer Struct
 */

struct scp_struct
{
  unsigned short zero_dum0;	/* has to be zero */
  unsigned char  sysbus;	/* 0=16Bit,1=8Bit */
  unsigned char  zero_dum1;	/* has to be zero for 586 */
  unsigned short zero_dum2;
  unsigned short zero_dum3;
  char          *iscp;		/* pointer to the iscp-block */
};

/*
 * Intermediate System Configuration Pointer (ISCP)
 */
struct iscp_struct
{
  unsigned char  busy;          /* 586 clears after successful init */
  unsigned char  zero_dummy;    /* hast to be zero */
  unsigned short scb_offset;    /* pointeroffset to the scb_base */
  char          *scb_base;      /* base-address of all 16-bit offsets */
};

/*
 * System Control Block (SCB)
 */
struct scb_struct
{
  unsigned short status;        /* status word */
  unsigned short cmd;           /* command word */
  unsigned short cbl_offset;    /* pointeroffset, command block list */
  unsigned short rfa_offset;    /* pointeroffset, receive frame area */
  unsigned short crc_errs;      /* CRC-Error counter */
  unsigned short aln_errs;      /* allignmenterror counter */
  unsigned short rsc_errs;      /* Resourceerror counter */
  unsigned short ovrn_errs;     /* OVerrunerror counter */
};

/*
 * possible command values for the command word
 */
#define RUC_MASK	0x0070	/* mask for RU commands */
#define RUC_NOP		0x0000	/* NOP-command */
#define RUC_START	0x0010	/* start RU */
#define RUC_RESUME	0x0020	/* resume RU after suspend */
#define RUC_SUSPEND	0x0030	/* suspend RU */
#define RUC_ABORT	0x0040	/* abort receiver operation immediately */

#define CUC_MASK	0x0700	/* mask for CU command */
#define CUC_NOP		0x0000	/* NOP-command */
#define CUC_START	0x0100	/* start execution of 1. cmd on the CBL */
#define CUC_RESUME	0x0200	/* resume after suspend */
#define CUC_SUSPEND	0x0300	/* Suspend CU */
#define CUC_ABORT	0x0400	/* abort command operation immediately */

#define ACK_MASK	0xf000	/* mask for ACK command */
#define ACK_CX		0x8000	/* acknowledges STAT_CX */
#define ACK_FR		0x4000	/* ack. STAT_FR */
#define ACK_CNA		0x2000	/* ack. STAT_CNA */
#define ACK_RNR		0x1000	/* ack. STAT_RNR */

/*
 * possible status values for the status word
 */
#define STAT_MASK	0xf000	/* mask for cause of interrupt */
#define STAT_CX		0x8000	/* CU finished cmd with its I bit set */
#define STAT_FR		0x4000	/* RU finished receiving a frame */
#define STAT_CNA	0x2000	/* CU left active state */
#define STAT_RNR	0x1000	/* RU left ready state */

#define CU_STATUS	0x700	/* CU status, 0=idle */
#define CU_SUSPEND	0x100	/* CU is suspended */
#define CU_ACTIVE	0x200	/* CU is active */

#define RU_STATUS	0x70	/* RU status, 0=idle */
#define RU_SUSPEND	0x10	/* RU suspended */
#define RU_NOSPACE	0x20	/* RU no resources */
#define RU_READY	0x40	/* RU is ready */

/*
 * Receive Frame Descriptor (RFD)
 */
struct rfd_struct
{
  unsigned short status;	/* status word */
  unsigned short last;		/* Bit15,Last Frame on List / Bit14,suspend */
  unsigned short next;		/* linkoffset to next RFD */
  unsigned short rbd_offset;	/* pointeroffset to RBD-buffer */
  unsigned char  dest[6];	/* ethernet-address, destination */
  unsigned char  source[6];	/* ethernet-address, source */
  unsigned short length;	/* 802.3 frame-length */
  unsigned short zero_dummy;	/* dummy */
};

#define RFD_LAST     0x8000	/* last: last rfd in the list */
#define RFD_SUSP     0x4000	/* last: suspend RU after  */
#define RFD_ERRMASK  0x0fe1     /* status: errormask */
#define RFD_MATCHADD 0x0002     /* status: Destinationaddress !matches IA */
#define RFD_RNR      0x0200	/* status: receiver out of resources */

/*
 * Receive Buffer Descriptor (RBD)
 */
struct rbd_struct
{
  unsigned short status;	/* status word,number of used bytes in buff */
  unsigned short next;		/* pointeroffset to next RBD */
  char          *buffer;	/* receive buffer address pointer */
  unsigned short size;		/* size of this buffer */
  unsigned short zero_dummy;    /* dummy */
};

#define RBD_LAST	0x8000	/* last buffer */
#define RBD_USED	0x4000	/* this buffer has data */
#define RBD_MASK	0x3fff	/* size-mask for length */

/*
 * Statusvalues for Commands/RFD
 */
#define STAT_COMPL   0x8000	/* status: frame/command is complete */
#define STAT_BUSY    0x4000	/* status: frame/command is busy */
#define STAT_OK      0x2000	/* status: frame/command is ok */

/*
 * Action-Commands
 */
#define CMD_NOP		0x0000	/* NOP */
#define CMD_IASETUP	0x0001	/* initial address setup command */
#define CMD_CONFIGURE	0x0002	/* configure command */
#define CMD_MCSETUP	0x0003	/* MC setup command */
#define CMD_XMIT	0x0004	/* transmit command */
#define CMD_TDR		0x0005	/* time domain reflectometer (TDR) command */
#define CMD_DUMP	0x0006	/* dump command */
#define CMD_DIAGNOSE	0x0007	/* diagnose command */

/*
 * Action command bits
 */
#define CMD_LAST	0x8000	/* indicates last command in the CBL */
#define CMD_SUSPEND	0x4000	/* suspend CU after this CB */
#define CMD_INT		0x2000	/* generate interrupt after execution */

/*
 * NOP - command
 */
struct nop_cmd_struct
{
  unsigned short cmd_status;	/* status of this command */
  unsigned short cmd_cmd;       /* the command itself (+bits) */
  unsigned short cmd_link;      /* offsetpointer to next command */
};

/*
 * IA Setup command
 */
struct iasetup_cmd_struct
{
  unsigned short cmd_status;
  unsigned short cmd_cmd;
  unsigned short cmd_link;
  unsigned char  iaddr[6];
};

/*
 * Configure command
 */
struct configure_cmd_struct
{
  unsigned short cmd_status;
  unsigned short cmd_cmd;
  unsigned short cmd_link;
  unsigned char  byte_cnt;   /* size of the config-cmd */
  unsigned char  fifo;       /* fifo/recv monitor */
  unsigned char  sav_bf;     /* save bad frames (bit7=1)*/
  unsigned char  adr_len;    /* adr_len(0-2),al_loc(3),pream(4-5),loopbak(6-7)*/
  unsigned char  priority;   /* lin_prio(0-2),exp_prio(4-6),bof_metd(7) */
  unsigned char  ifs;        /* inter frame spacing */
  unsigned char  time_low;   /* slot time low */
  unsigned char  time_high;  /* slot time high(0-2) and max. retries(4-7) */
  unsigned char  promisc;    /* promisc-mode(0) , et al (1-7) */
  unsigned char  carr_coll;  /* carrier(0-3)/collision(4-7) stuff */
  unsigned char  fram_len;   /* minimal frame len */
  unsigned char  dummy;	     /* dummy */
};

/*
 * Multicast Setup command
 */
struct mcsetup_cmd_struct
{
  unsigned short cmd_status;
  unsigned short cmd_cmd;
  unsigned short cmd_link;
  unsigned short mc_cnt;		/* number of bytes in the MC-List */
  unsigned char  mc_list[0][6];  	/* pointer to 6 bytes entries */
};

/*
 * transmit command
 */
struct transmit_cmd_struct
{
  unsigned short cmd_status;
  unsigned short cmd_cmd;
  unsigned short cmd_link;
  unsigned short tbd_offset;	/* pointeroffset to TBD */
  unsigned char  dest[6];       /* destination address of the frame */
  unsigned short length;	/* user defined: 802.3 length / Ether type */
};

#define TCMD_ERRMASK     0x0fa0
#define TCMD_MAXCOLLMASK 0x000f
#define TCMD_MAXCOLL     0x0020
#define TCMD_HEARTBEAT   0x0040
#define TCMD_DEFERRED    0x0080
#define TCMD_UNDERRUN    0x0100
#define TCMD_LOSTCTS     0x0200
#define TCMD_NOCARRIER   0x0400
#define TCMD_LATECOLL    0x0800

struct tdr_cmd_struct
{
  unsigned short cmd_status;
  unsigned short cmd_cmd;
  unsigned short cmd_link;
  unsigned short status;
};

#define TDR_LNK_OK	0x8000	/* No link problem identified */
#define TDR_XCVR_PRB	0x4000	/* indicates a transceiver problem */
#define TDR_ET_OPN	0x2000	/* open, no correct termination */
#define TDR_ET_SRT	0x1000	/* TDR detected a short circuit */
#define TDR_TIMEMASK	0x07ff	/* mask for the time field */

/*
 * Transmit Buffer Descriptor (TBD)
 */
struct tbd_struct
{
  unsigned short size;		/* size + EOF-Flag(15) */
  unsigned short next;          /* pointeroffset to next TBD */
  char          *buffer;        /* pointer to buffer */
};

#define TBD_LAST 0x8000         /* EOF-Flag, indicates last buffer in list */


text:
if (!RedactorPlugins) var RedactorPlugins = {};

RedactorPlugins.filemanager = function () {
    return {
        init: function () {
            if (!this.opts.fileManagerJson) return;

            this.modal.addCallback('file', this.filemanager.load);
        },
        load: function () {
            var $modal = this.modal.getModal();

            this.modal.createTabber($modal);
            this.modal.addTab(1, 'Upload', 'active');
            this.modal.addTab(2, 'Choose');

            $('#redactor-modal-file-upload-box').addClass('redactor-tab redactor-tab1');

            var $box = $('
').hide();
            $modal.append($box);

            $.ajax({
                dataType: "json",
                cache: false,
                url: this.opts.fileManagerJson,
                success: $.proxy(function (data) {
                    var ul = $('
');
                    $.each(data, $.proxy(function (key, val) {
                        var a = $('' + val.title + ' ' + val.name + ' (' + val.size + ')');
                        var li = $('
');

                        a.on('click', $.proxy(this.filemanager.insert, this));

                        li.append(a);
                        ul.append(li);

                    }, this));

                    $('#redactor-file-manager-box').append(ul);

                }, this)
            });

        },
        insert: function (e) {
            e.preventDefault();

            this.file.insert('' + $(e.target).attr('title') + '');
        }
    };
};


text:
namespace Microsoft.AspNetCore.Http.Features;

/// <summary>
/// Provides access to the HTTP request lifetime operations.
/// </summary>
public interface IHttpRequestLifetimeFeature
{
    /// <summary>
    /// A <see cref="CancellationToken"/> that fires if the request is aborted and
    /// the application should cease processing. The token will not fire if the request
    /// completes successfully.
    /// </summary>
    CancellationToken RequestAborted { get; set; }

    /// <summary>
    /// Forcefully aborts the request if it has not already completed. This will result in
    /// RequestAborted being triggered.
    /// </summary>
    void Abort();
}


text:
function [ output_args ] = multiSlice( img )
%multiSlice - arrange serial slices for visualisation and customisation,
%eventually...

% James McKenzie, Imperial College, London, 2014.

% Define the slice numbers which you want drawn in here
sl = [1:3:26]

% Default view angle
vw = [81 36];

% Close existing
f0 = findobj('Name','multiSlice');
close(f0);

% Transpose the image so that z is now along the x axis... (actually y when
% the images are drawn, but it works so all is fine).
img = permute(img,[3 1 2]);

% Get the grids
[x,y,z] = defSize(img,1);

% These functions actually draw the images
imgSlice(x,y,z,img,sl,vw)
globalSlice(x,y,z,img,sl,vw)

end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [fig] = drawWindow
% Draw the window

% Window
fig.fig = figure('Name','multiSlice',...
    'Units','normalized',...
    'Position',[0.25 0.25 0.5 0.5],...
    'Toolbar','figure',...
    'Menubar','none');

% Axes
fig.ax = axes('Parent',fig.fig,...
    'Units','normalized',...
    'Position',[0.05 0.05 0.9 0.9]);

end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function imgSlice(x,y,z,img,sl,vw)
% Draw the main image with a series of slices using classification images

% Draw a window...
drawWindow;

% Actually the slices here
h = slice(x,y,z,img,[],sl,[]);

% Modify colours / transparencies
set(h,'EdgeColor','none',...
    'FaceColor','interp',...
    'FaceAlpha','interp');

% Define various operations for transparency
alpha('color');
fa = get(gcf,'Alphamap');
fa(1:11) = [0:0.1:1];
fa(12:end) = 1;
fa = fliplr(fa);
set(gcf,'Alphamap',fa);
alphamap('increase',0.1)

% Set a colourmap to show nice colours rather than horrible ones
colormap([0 0 0; 1 0 0; 0 0 1; 0 1 0]);

% Few final options
axis tight
grid off
box off;
view(vw);

% Save image...
printImage('Image1','png')

end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function globalSlice(x,y,z,img,sl,vw)

% Now how about a full volumetric thing
drawWindow;
hold on;

isoVal = 3;
imgLog = double(img == isoVal);
isoVal = 0;

% Surfaces
iso = isosurface(x,y,z,imgLog,isoVal,y);

pp = patch(iso);
set(pp,...
    'FaceColor','interp',...
    'EdgeColor','none',...
    'FaceAlpha',0.5);

h2 = slice(x,y,z,double(imgLog == -1),[],sl,[]);
set(h2,'EdgeColor','none',...
    'FaceColor','black',...
    'FaceAlpha',0.5);

axis tight;
box off;
axis off
view(vw);

graphFormat('Image2','png');

end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


text:
This is a Marketplace placeholder for a community GELF library that has not been submitted by the user.

Follow this link to reach the GELF library: https://github.com/Gelber/gelf4cplus


text:
package se.toxbee.sleepfighter.android.component.textview;

import android.content.Context;
import android.content.res.TypedArray;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.style.ScaleXSpan;
import android.util.AttributeSet;
import android.widget.TextView;

import se.toxbee.sleepfighter.R;

/**
 * Text view that allows changing the letter spacing of the text.
 *
 * @author Centril<twingoow@gmail.com> / Mazdak Farrokhzad.
 * @author Pedro Barros (pedrobarros.dev at gmail.com)
 * @since Nov 17, 2013
 */
public class LetterSpacingTextView extends TextView {
	private float letterSpacing = LetterSpacing.NORMAL;
	private CharSequence originalText = "";

	public LetterSpacingTextView( Context context ) {
		super( context );
	}

	public LetterSpacingTextView( Context context, AttributeSet attrs ) {
		super( context, attrs, 0 );
	}

	public LetterSpacingTextView( Context context, AttributeSet attrs, int defStyle ) {
		super( context, attrs, defStyle );
		this.readAttrs( context, attrs );
	}

	public void readAttrs( Context context, AttributeSet attrs ) {
		TypedArray a = context.obtainStyledAttributes( attrs, R.styleable.LetterSpacing );
		final int N = a.getIndexCount();
		for ( int i = 0; i < N; ++i ) {
			int attr = a.getIndex( i );

			if ( attr == R.styleable.LetterSpacing_letterSpacing ) {
				this.setLetterSpacing( a.getFloat( attr, LetterSpacing.NORMAL ) );
			}
		}
		a.recycle();
	}

	public float getLetterSpacing() {
		return letterSpacing;
	}

	public void setLetterSpacing( float letterSpacing ) {
		this.letterSpacing = letterSpacing;
		applyLetterSpacing();
	}

	@Override
	public void setText( CharSequence text, BufferType type ) {
		originalText = text;
		applyLetterSpacing();
	}

	@Override
	public CharSequence getText() {
		return originalText;
	}

	private void applyLetterSpacing() {
		StringBuilder builder = new StringBuilder();
		for ( int i = 0; i < originalText.length(); i++ ) {
			builder.append( originalText.charAt( i ) );
			if ( i + 1 < originalText.length() ) {
				builder.append( "\u00A0" );
			}
		}
		SpannableString finalText = new SpannableString( builder.toString() );
		if ( builder.toString().length() > 1 ) {
			for ( int i = 1; i < builder.toString().length(); i += 2 ) {
				finalText.setSpan( new ScaleXSpan( (letterSpacing + 1) / 10 ),
						i, i + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE );
			}
		}
		super.setText( finalText, BufferType.SPANNABLE );
	}

	public class LetterSpacing {
		public final static float NORMAL = 0;
	}
}


text:
class CreateContacts < ActiveRecord::Migration
  def change
    create_table :contacts do |t|
      t.integer :group
      t.string :name
      t.integer :gender
      t.string :telephone
      t.string :mobile
      t.string :email
      t.string :address
      t.date :birthday
      t.boolean :maillist
      t.string :comment

      t.timestamps
    end
  end
end


text:
'use strict';

const models = require('./index');

/**
 * Represents a collection of diagnostic setting category resources.
 *
 */
class DiagnosticSettingsCategoryResourceCollection {
  /**
   * Create a DiagnosticSettingsCategoryResourceCollection.
   * @member {array} [value] The collection of diagnostic settings category
   * resources.
   */
  constructor() {
  }

  /**
   * Defines the metadata of DiagnosticSettingsCategoryResourceCollection
   *
   * @returns {object} metadata of DiagnosticSettingsCategoryResourceCollection
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'DiagnosticSettingsCategoryResourceCollection',
      type: {
        name: 'Composite',
        className: 'DiagnosticSettingsCategoryResourceCollection',
        modelProperties: {
          value: {
            required: false,
            serializedName: 'value',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'DiagnosticSettingsCategoryResourceElementType',
                  type: {
                    name: 'Composite',
                    className: 'DiagnosticSettingsCategoryResource'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = DiagnosticSettingsCategoryResourceCollection;


text:
<?php

namespace App\UserdirectoryBundle\Form;

use App\UserdirectoryBundle\Form\CustomType\CustomSelectorType;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Doctrine\ORM\EntityRepository;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\Form\FormEvent;

class LectureType extends AbstractType
{

    protected $params;

    public function formConstructor( $params=null, $entity = null )
    {
        $this->params = $params;
    }

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

        $this->formConstructor($options['form_custom_value']);

        $builder->add('id',HiddenType::class,array(
            'label'=>false,
            'attr' => array('class'=>'user-object-id-field')
        ));

        $builder->add('lectureDate', DateType::class, array(
            'label' => 'Lecture Date:',
            'widget' => 'single_text',
            'required' => false,
            'format' => 'MM/dd/yyyy',
            'html5' => false,
            'attr' => array('class' => 'datepicker form-control')
        ));

        $builder->add( 'importance', EntityType::class, array(
            'class' => 'AppUserdirectoryBundle:ImportanceList',
            'label'=> "Importance:",
            'required'=> false,
            'multiple' => false,
            'choice_label' => 'name',
            'attr' => array('class'=>'combobox combobox-width'),
            'query_builder' => function(EntityRepository $er) {
                    return $er->createQueryBuilder('list')
                        ->where("list.type = :typedef OR list.type = :typeadd")
                        ->orderBy("list.orderinlist","ASC")
                        ->setParameters( array(
                            'typedef' => 'default',
                            'typeadd' => 'user-added',
                        ));
                },
        ));

        $builder->add('title',null,array(
            'label'=>'Lecture Title:',
            'attr' => array('class'=>'form-control')
        ));

        $builder->add('organization', CustomSelectorType::class, array(
            'label' => 'Institution:',
            'required' => false,
            'attr' => array('class' => 'ajax-combobox-organization', 'type' => 'hidden'),
            'classtype' => 'organization'
        ));

        $builder->add('city', CustomSelectorType::class, array(
            'label' => 'Lecture City:',
            'required' => false,
            'attr' => array('class' => 'ajax-combobox-city', 'type' => 'hidden'),
            'classtype' => 'city'
        ));

        //state
        //$defaultState = null;
        //$defaultState = $this->params['em']->getRepository('AppUserdirectoryBundle:States')->findOneByName('New York');
        $builder->add( 'state', EntityType::class, array(
            'class' => 'AppUserdirectoryBundle:States',
            //'choice_label' => 'name',
            'label'=>'Lecture State:',
            'required'=> false,
            'multiple' => false,
            //'data' => $defaultState,
            'attr' => array('class'=>'combobox combobox-width geo-field-state'),
            'query_builder' => function(EntityRepository $er) {
                    return $er->createQueryBuilder('list')
                        ->where("list.type = :typedef OR list.type = :typeadd")
                        ->orderBy("list.orderinlist","ASC")
                        ->setParameters( array(
                            'typedef' => 'default',
                            'typeadd' => 'user-added',
                        ));
                },
        ));

        //country
        //$defaultCountry = null;
        //$defaultCountry = $this->params['em']->getRepository('AppUserdirectoryBundle:Countries')->findOneByName('United States');
        $preferredCountries = $this->params['em']->getRepository('AppUserdirectoryBundle:Countries')->findByName(array('United States'));
        $builder->add( 'country', EntityType::class, array(
            'class' => 'AppUserdirectoryBundle:Countries',
            'choice_label' => 'name',
            'label'=>'Lecture Country:',
            'required'=> false,
            'multiple' => false,
            //'data' => $defaultCountry,
            'preferred_choices' => $preferredCountries,
            'attr' => array('class'=>'combobox combobox-width geo-field-country'),
            'query_builder' => function(EntityRepository $er) {
                    return $er->createQueryBuilder('list')
                        ->where("list.type = :typedef OR list.type = :typeadd")
                        ->orderBy("list.orderinlist","ASC")
                        ->setParameters( array(
                            'typedef' => 'default',
                            'typeadd' => 'user-added',
                        ));
                },
        ));

    }

    public function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'App\UserdirectoryBundle\Entity\Lecture',
            'form_custom_value' => null
        ));
    }

    public function getBlockPrefix(): string
    {
        return 'oleg_userdirectorybundle_lecture';
    }
}


text:
using BoDi;
using TechTalk.SpecFlow;
using WebSpecs.Pages.Google;
using WebSpecs.Support;

namespace WebSpecs.Steps.Google
{
    [Binding]
    public class PrivacyPolicySteps : Base
    {
        private PrivacyPolicyPage MyPage { get { return (PrivacyPolicyPage)base.Page; } }

        public PrivacyPolicySteps(IObjectContainer objectContainer) : base(objectContainer)
        {
        }

        [When(@"I click on Overview")]
        public void WhenIClickOnOverview()
        {
            MyPage.Overview.Click();
        }
    }
}


text:
require 'twitter'

BASE_HOME = __dir__

def twi_conn
  begin
    client = Twitter::REST::Client.new do |config|
      config.consumer_key        = ENV['CONSUMER_KEY']
      config.consumer_secret     = ENV['CONSUMER_SECRET']
      config.access_token        = ENV['ACCESS_TOKEN']
      config.access_token_secret = ENV['ACCESS_TOKEN_SECRET']
    end
  rescue => e
    puts "Get twi conection failed with #{e.message}"
  end
end

def sent_twi(twi)

  begin
    twi_conn.update(twi)
    sleep(1)
  rescue Twitter::Error::Forbidden => e
    puts e.message
  end
end

def sent_twi_with_image(content, image_path)
  begin
    puts "#{content}->#{image_path}"
    twi_conn.update_with_media(content, File.new(image_path))
  rescue Twitter::Error::Forbidden => e
    puts e.message
  end
end

lists = []
f = File.open(File.join(__dir__, 'list.txt'), "r:UTF-8")
f.each_line do |line|
    lists << line
end
f.close

lists.sample(5).each { |item|
  sent_twi("#四字熟語 " + item)
}


text:
'use strict';

var Cleaver = require('cleaver');
var path = require('path');

module.exports = function (grunt) {

	function compileCleaver(file, options, callback) {
		//TODO inject file.dest and options into source (or pass to cleaver once it supporst these)

		//trick output directory
		var src = path.resolve(file.src);

		var cwd = process.cwd();
		var restore = function () {
			process.chdir(cwd);
		};
		process.chdir(path.dirname(src));

		var cleaver = new Cleaver(src);

		//running with cleavers
		return cleaver.run().then(function () {
			restore();
			callback();
		}, function (err) {
			restore();
			callback(err);
		});
	}

	grunt.registerMultiTask('cleaver', 'Run cleaver to build slideshows from markdown', function () {
		var options = this.options({});
		var done = this.async();
		var files = [];

		var fileCount = 0;
		var success = 0;
		var failed = 0;

		//flatten list for sanity
		grunt.util._.each(this.files, function (f) {
			grunt.util._.each(f.src, function (filePath) {
				if (!grunt.file.exists(filePath)) {
					grunt.log.writeln('file does not exist '.warn + filePath);
					return false;
				}
				fileCount++;
				/*var dest = f.dest;
				 if (!dest) {
				 dest = filePath.replace(/.djs$/, '.js');
				 }*/
				files.push({src: filePath, options: options});
			});
		});

		if (fileCount === 0) {
			grunt.log.warn('zero files selected');
			grunt.log.writeln();
			done(false);
			return;
		}

		grunt.util.async.forEach(files, function (file, callback) {
			compileCleaver(file, options, function (err) {
				if (err) {
					grunt.log.writeln(file.src.red);
					grunt.fail.warn(err);
					failed++;
				}
				else {
					grunt.log.writeln(file.src); //  file.dest.cyan
					success++;
				}
				callback();
			});

		}, function (err) {
			grunt.log.writeln();
			if (err) {
				grunt.log.error('error running cleaver');
				if (err) {
					grunt.log.error(err);
				}
				grunt.log.writeln();
				done(false);
			}
			else {
				if (success < fileCount || fileCount === 0) {
					grunt.log.error('cleaver ' + ('completed ' + success).yellow + ' and ' + ('failed ' + failed).red + ' of ' + (fileCount + ' total').green);
					grunt.log.writeln();
					done(false);
				}
				else {
					grunt.log.ok('cleaver ' + ('completed ' + success).green + ' of ' + (fileCount + ' total').green);
					done();
				}
			}
		});
	});
};


text:
  Pessoulens est
       un village
       localisé dans le département des Gers en Midi-Pyrénées. Elle totalisait 148 habitants en 2008.

Le nombre de logements, à Pessoulens, se décomposait en 2011 en zero appartements et 69 maisons soit
 un marché relativement équilibré.

La commune compte quelques  équipements sportifs, elle propose entre autres un terrain de sport.

Si vous pensez venir habiter à Pessoulens, vous pourrez facilement trouver une maison à acheter.

À proximité de Pessoulens sont localisées les communes de
Solomiac à 5 km, 414 habitants,
Maubec située à 5 km, 140 habitants,
Gimat située à 5 km, 176 habitants,
Cumont à 3 km, 61 habitants,
Marignac localisée à 2 km, 91 habitants,
Estramiac située à 2 km, 134 habitants,
 entre autres. De plus, Pessoulens est située à seulement 27 km de Castelsarrasin.


text:
package org.omnaest.i18nbinder.internal;

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

import java.io.File;
import java.net.URL;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.regex.Pattern;

import org.junit.Before;
import org.junit.Test;
import org.omnaest.i18nbinder.internal.XLSFile.TableRow;
import org.omnaest.utils.propertyfile.PropertyFile;
import org.omnaest.utils.propertyfile.content.PropertyFileContent;

public class ModifierHelperTest
{
  /* ********************************************** Constants ********************************************** */
  private final static String[] PROPERTY_FILENAMES = { "adminTest_de_DE.properties", "adminTest_en_US.properties",
      "viewTest_de_DE.properties", "viewTest_en_US.properties", "localelessTest.properties" };

  private static final String   fileEncoding       = "utf-8";

  /* ********************************************** Variables ********************************************** */
  private Set<File>             propertyFileSet    = new HashSet<File>();
  private File                  xlsFile            = null;

  /* ********************************************** Methods ********************************************** */

  @Before
  public void setUp() throws Exception
  {
    //
    for ( String propertyFilename : PROPERTY_FILENAMES )
    {
      this.propertyFileSet.add( new File( this.getClass().getResource( propertyFilename ).getFile() ) );
    }

    //
    this.xlsFile = new File( new File( this.getClass().getResource( PROPERTY_FILENAMES[0] ).getFile() ).getParent()
                             + "\\result.xls" );

    if ( this.xlsFile.exists() )
    {
      this.xlsFile.delete();
    }

    //
    URL resource = this.getClass().getResource( "viewTest_.properties" );
    if ( resource != null )
    {
      File newKeyPropertyFile = new File( resource.getFile() );
      if ( newKeyPropertyFile.exists() )
      {
        newKeyPropertyFile.delete();
      }
    }

  }

  @Test
  public void testModifierHelperLoadAndStore()
  {
    //
    boolean useJavaStyleUnicodeEscaping = true;
    XLSFile xlsFile = ModifierHelper.createXLSFileFromPropertyFiles( this.propertyFileSet, fileEncoding, new LocaleFilter(),
                                                                     null, null, useJavaStyleUnicodeEscaping );

    //
    xlsFile.setFile( this.xlsFile );
    xlsFile.store();

    //
    ModifierHelperTest.assertContent( xlsFile );

    //
    ModifierHelper.writeXLSFileContentToPropertyFiles( xlsFile.getFile(), null, new LocaleFilter(), true,
                                                       useJavaStyleUnicodeEscaping );

    //
    xlsFile.load();

    //
    ModifierHelperTest.assertContent( xlsFile );

  }

  private static void assertContent( XLSFile xlsFile )
  {
    //
    List<TableRow> tableRowList = xlsFile.getTableRowList();
    assertEquals( 6 + 1, tableRowList.size() );

    //
    int index = 0;
    {
      TableRow tableRow = tableRowList.get( index++ );
      assertEquals( Arrays.asList( "File", "Property key", "", "de_DE", "en_US" ), tableRow );
    }
    {
      TableRow tableRow = tableRowList.get( index++ );
      assertEquals( Arrays.asList( "my.property.key1", "", "wert1", "value1" ), tableRow.subList( 1, tableRow.size() ) );
    }
    {
      TableRow tableRow = tableRowList.get( index++ );
      assertEquals( Arrays.asList( "my.property.key2", "", "wert2", "value2" ), tableRow.subList( 1, tableRow.size() ) );
    }
    {
      TableRow tableRow = tableRowList.get( index++ );
      assertEquals( Arrays.asList( "my.property.key9", "value9", "", "" ), tableRow.subList( 1, tableRow.size() ) );
    }
    {
      TableRow tableRow = tableRowList.get( index++ );
      assertEquals( Arrays.asList( "my.property.key1", "", "wert1", "value1" ), tableRow.subList( 1, tableRow.size() ) );
    }
    {
      TableRow tableRow = tableRowList.get( index++ );
      assertEquals( Arrays.asList( "my.property.key3", "", "", "value3" ), tableRow.subList( 1, tableRow.size() ) );
    }
    {
      TableRow tableRow = tableRowList.get( index++ );
      assertEquals( Arrays.asList( "my.property.key4", "", "wert4", "" ), tableRow.subList( 1, tableRow.size() ) );
    }
  }

  @Test
  public void testModifierHelperAddKey()
  {
    //
    boolean useJavaStyleUnicodeEscaping = true;
    XLSFile xlsFile = ModifierHelper.createXLSFileFromPropertyFiles( this.propertyFileSet, fileEncoding, new LocaleFilter(),
                                                                     null, null, useJavaStyleUnicodeEscaping );

    //
    List<TableRow> tableRowList = xlsFile.getTableRowList();

    //
    String propertyKey = "new.key";
    List<String> propertyValueList = Arrays.asList( "new.value" );

    //
    TableRow tableRow = new TableRow();
    tableRow.addAll( tableRowList.get( tableRowList.size() - 1 ) );
    tableRow.set( 1, propertyKey );
    tableRow.set( 2, propertyValueList.get( 0 ) );
    xlsFile.getTableRowList().add( tableRow );

    //
    xlsFile.setFile( this.xlsFile );
    xlsFile.store();

    //
    ModifierHelper.writeXLSFileContentToPropertyFiles( xlsFile.getFile(), null, new LocaleFilter(), true,
                                                       useJavaStyleUnicodeEscaping );

    //
    String locale = tableRowList.get( 0 ).get( 2 );
    String propertyFileName = tableRow.get( 0 ).replaceAll( Pattern.quote( "{locale}" ), locale );
    PropertyFile propertyFile = new PropertyFile( propertyFileName );

    //
    assertTrue( propertyFile.getFile().exists() );

    //
    propertyFile.load();
    PropertyFileContent propertyFileContent = propertyFile.getPropertyFileContent();

    //
    assertTrue( propertyFileContent.hasPropertyKeyAndValueList( propertyKey, propertyValueList ) );

    //clean up
    {
      //
      propertyFileName = tableRow.get( 0 ).replaceAll( Pattern.quote( "{locale}" ), "" );
      propertyFile = new PropertyFile( propertyFileName );
      propertyFile.load();
      propertyFile.getPropertyFileContent().getPropertyMap().remove( propertyKey );
      propertyFile.store();

      //
      propertyFileName = tableRow.get( 0 ).replaceAll( Pattern.quote( "{locale}" ), "de_DE" );
      propertyFile = new PropertyFile( propertyFileName );
      propertyFile.load();
      propertyFile.getPropertyFileContent().getPropertyMap().remove( propertyKey );
      propertyFile.store();
    }

  }

}


text:
#ifndef INCLUDED_U5E_UTF32NE_STRING_GRAPHEME_ITERATOR
#define INCLUDED_U5E_UTF32NE_STRING_GRAPHEME_ITERATOR

#include <u5e/utf32ne_string_grapheme.hpp>
#include <u5e/basic_grapheme_iterator.hpp>

namespace u5e {
  /**
   * \class u5e::utf32ne_string_grapheme_iterator
   * \brief Typedef: basic_grapheme_iterator of utf32ne_string
   *
   * Although this is a typedef, it shows up in doxygen as a class for
   * better discoverability.
   *
   * \typedef u5e::utf32ne_string_grapheme_iterator
   * \brief A basic_grapheme_iterator of utf32ne_string
   */
  typedef basic_grapheme_iterator<utf32ne_string>
  utf32ne_string_grapheme_iterator;
};

#endif


text:
SYNONYM

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

#### Published in
null

#### Original name
Crepidotus nephrodes var. meristocystis Singer, 1954

### Remarks
null


text:
namespace {
using ::testing::_;
using ::testing::Eq;
using ::testing::NotNull;

using absl::log_internal::kAbslMinLogLevel;

std::string Base64UnescapeOrDie(absl::string_view data) {
  std::string decoded;
  CHECK(absl::Base64Unescape(data, &decoded));
  return decoded;
}

// -----------------------------------------------------------------------------
// A Googletest matcher which searches the running binary for a given string
// -----------------------------------------------------------------------------

// This matcher is used to validate that literal strings streamed into
// `LOG` statements that ought to be compiled out (e.g. `LOG_IF(INFO, false)`)
// do not appear in the binary.
//
// Note that passing the string to be sought directly to `FileHasSubstr()` all
// but forces its inclusion in the binary regardless of the logging library's
// behavior. For example:
//
//   LOG_IF(INFO, false) << "you're the man now dog";
//   // This will always pass:
//   // EXPECT_THAT(fp, FileHasSubstr("you're the man now dog"));
//   // So use this instead:
//   EXPECT_THAT(fp, FileHasSubstr(
//       Base64UnescapeOrDie("eW91J3JlIHRoZSBtYW4gbm93IGRvZw==")));

class FileHasSubstrMatcher final : public ::testing::MatcherInterface<FILE*> {
 public:
  explicit FileHasSubstrMatcher(absl::string_view needle) : needle_(needle) {}

  bool MatchAndExplain(
      FILE* fp, ::testing::MatchResultListener* listener) const override {
    std::string buf(
        std::max<std::string::size_type>(needle_.size() * 2, 163840000), '\0');
    size_t buf_start_offset = 0;  // The file offset of the byte at `buf[0]`.
    size_t buf_data_size = 0;     // The number of bytes of `buf` which contain
                                  // data.

    ::fseek(fp, 0, SEEK_SET);
    while (true) {
      // Fill the buffer to capacity or EOF:
      while (buf_data_size < buf.size()) {
        const size_t ret = fread(&buf[buf_data_size], sizeof(char),
                                 buf.size() - buf_data_size, fp);
        if (ret == 0) break;
        buf_data_size += ret;
      }
      if (ferror(fp)) {
        *listener << "error reading file";
        return false;
      }
      const absl::string_view haystack(&buf[0], buf_data_size);
      const auto off = haystack.find(needle_);
      if (off != haystack.npos) {
        *listener << "string found at offset " << buf_start_offset + off;
        return true;
      }
      if (feof(fp)) {
        *listener << "string not found";
        return false;
      }
      // Copy the end of `buf` to the beginning so we catch matches that span
      // buffer boundaries.  `buf` and `buf_data_size` are always large enough
      // that these ranges don't overlap.
      memcpy(&buf[0], &buf[buf_data_size - needle_.size()], needle_.size());
      buf_start_offset += buf_data_size - needle_.size();
      buf_data_size = needle_.size();
    }
  }
  void DescribeTo(std::ostream* os) const override {
    *os << "contains the string \"" << needle_ << "\" (base64(\""
        << Base64UnescapeOrDie(needle_) << "\"))";
  }

  void DescribeNegationTo(std::ostream* os) const override {
    *os << "does not ";
    DescribeTo(os);
  }

 private:
  std::string needle_;
};

class StrippingTest : public ::testing::Test {
 protected:
  void SetUp() override {
#ifndef NDEBUG
    // Non-optimized builds don't necessarily eliminate dead code at all, so we
    // don't attempt to validate stripping against such builds.
    GTEST_SKIP() << "StrippingTests skipped since this build is not optimized";
#elif defined(__EMSCRIPTEN__)
    // These tests require a way to examine the running binary and look for
    // strings; there's no portable way to do that.
    GTEST_SKIP()
        << "StrippingTests skipped since this platform is not optimized";
#endif
  }

  // Opens this program's executable file.  Returns `nullptr` and writes to
  // `stderr` on failure.
  std::unique_ptr<FILE, std::function<void(FILE*)>> OpenTestExecutable() {
#if defined(__linux__)
    std::unique_ptr<FILE, std::function<void(FILE*)>> fp(
        fopen("/proc/self/exe", "rb"), [](FILE* fp) { fclose(fp); });
    if (!fp) {
      const std::string err = absl::base_internal::StrError(errno);
      absl::FPrintF(stderr, "Failed to open /proc/self/exe: %s\n", err);
    }
    return fp;
#elif defined(__Fuchsia__)
    // TODO(b/242579714): We need to restore the test coverage on this platform.
    std::unique_ptr<FILE, std::function<void(FILE*)>> fp(
        fopen(absl::StrCat("/pkg/bin/",
                           absl::flags_internal::ShortProgramInvocationName())
                  .c_str(),
              "rb"),
        [](FILE* fp) { fclose(fp); });
    if (!fp) {
      const std::string err = absl::base_internal::StrError(errno);
      absl::FPrintF(stderr, "Failed to open /pkg/bin/<binary name>: %s\n", err);
    }
    return fp;
#elif defined(__MACH__)
    uint32_t size = 0;
    int ret = _NSGetExecutablePath(nullptr, &size);
    if (ret != -1) {
      absl::FPrintF(stderr,
                    "Failed to get executable path: "
                    "_NSGetExecutablePath(nullptr) returned %d\n",
                    ret);
      return nullptr;
    }
    std::string path(size, '\0');
    ret = _NSGetExecutablePath(&path[0], &size);
    if (ret != 0) {
      absl::FPrintF(
          stderr,
          "Failed to get executable path: _NSGetExecutablePath(buffer) "
          "returned %d\n",
          ret);
      return nullptr;
    }
    std::unique_ptr<FILE, std::function<void(FILE*)>> fp(
        fopen(path.c_str(), "rb"), [](FILE* fp) { fclose(fp); });
    if (!fp) {
      const std::string err = absl::base_internal::StrError(errno);
      absl::FPrintF(stderr, "Failed to open executable at %s: %s\n", path, err);
    }
    return fp;
#elif defined(_WIN32)
    std::basic_string<TCHAR> path(4096, _T('\0'));
    while (true) {
      const uint32_t ret = ::GetModuleFileName(nullptr, &path[0], path.size());
      if (ret == 0) {
        absl::FPrintF(
            stderr,
            "Failed to get executable path: GetModuleFileName(buffer) "
            "returned 0\n");
        return nullptr;
      }
      if (ret < path.size()) break;
      path.resize(path.size() * 2, _T('\0'));
    }
    std::unique_ptr<FILE, std::function<void(FILE*)>> fp(
        _tfopen(path.c_str(), _T("rb")), [](FILE* fp) { fclose(fp); });
    if (!fp) absl::FPrintF(stderr, "Failed to open executable\n");
    return fp;
#else
    absl::FPrintF(stderr,
                  "OpenTestExecutable() unimplemented on this platform\n");
    return nullptr;
#endif
  }

  ::testing::Matcher<FILE*> FileHasSubstr(absl::string_view needle) {
    return MakeMatcher(new FileHasSubstrMatcher(needle));
  }
};

// This tests whether out methodology for testing stripping works on this
// platform by looking for one string that definitely ought to be there and one
// that definitely ought not to.  If this fails, none of the `StrippingTest`s
// are going to produce meaningful results.
TEST_F(StrippingTest, Control) {
  constexpr char kEncodedPositiveControl[] =
      "U3RyaXBwaW5nVGVzdC5Qb3NpdGl2ZUNvbnRyb2w=";
  const std::string encoded_negative_control =
      absl::Base64Escape("StrippingTest.NegativeControl");

  // Verify this mainly so we can encode other strings and know definitely they
  // won't encode to `kEncodedPositiveControl`.
  EXPECT_THAT(Base64UnescapeOrDie("U3RyaXBwaW5nVGVzdC5Qb3NpdGl2ZUNvbnRyb2w="),
              Eq("StrippingTest.PositiveControl"));

  auto exe = OpenTestExecutable();
  ASSERT_THAT(exe, NotNull());
  EXPECT_THAT(exe.get(), FileHasSubstr(kEncodedPositiveControl));
  EXPECT_THAT(exe.get(), Not(FileHasSubstr(encoded_negative_control)));
}

TEST_F(StrippingTest, Literal) {
  // We need to load a copy of the needle string into memory (so we can search
  // for it) without leaving it lying around in plaintext in the executable file
  // as would happen if we used a literal.  We might (or might not) leave it
  // lying around later; that's what the tests are for!
  const std::string needle = absl::Base64Escape("StrippingTest.Literal");
  LOG(INFO) << "U3RyaXBwaW5nVGVzdC5MaXRlcmFs";
  auto exe = OpenTestExecutable();
  ASSERT_THAT(exe, NotNull());
  if (absl::LogSeverity::kInfo >= kAbslMinLogLevel) {
    EXPECT_THAT(exe.get(), FileHasSubstr(needle));
  } else {
    EXPECT_THAT(exe.get(), Not(FileHasSubstr(needle)));
  }
}

TEST_F(StrippingTest, LiteralInExpression) {
  // We need to load a copy of the needle string into memory (so we can search
  // for it) without leaving it lying around in plaintext in the executable file
  // as would happen if we used a literal.  We might (or might not) leave it
  // lying around later; that's what the tests are for!
  const std::string needle =
      absl::Base64Escape("StrippingTest.LiteralInExpression");
  LOG(INFO) << absl::StrCat("secret: ",
                            "U3RyaXBwaW5nVGVzdC5MaXRlcmFsSW5FeHByZXNzaW9u");
  std::unique_ptr<FILE, std::function<void(FILE*)>> exe = OpenTestExecutable();
  ASSERT_THAT(exe, NotNull());
  if (absl::LogSeverity::kInfo >= kAbslMinLogLevel) {
    EXPECT_THAT(exe.get(), FileHasSubstr(needle));
  } else {
    EXPECT_THAT(exe.get(), Not(FileHasSubstr(needle)));
  }
}

TEST_F(StrippingTest, Fatal) {
  // We need to load a copy of the needle string into memory (so we can search
  // for it) without leaving it lying around in plaintext in the executable file
  // as would happen if we used a literal.  We might (or might not) leave it
  // lying around later; that's what the tests are for!
  const std::string needle = absl::Base64Escape("StrippingTest.Fatal");
  EXPECT_DEATH_IF_SUPPORTED(LOG(FATAL) << "U3RyaXBwaW5nVGVzdC5GYXRhbA==", "");
  std::unique_ptr<FILE, std::function<void(FILE*)>> exe = OpenTestExecutable();
  ASSERT_THAT(exe, NotNull());
  if (absl::LogSeverity::kFatal >= kAbslMinLogLevel) {
    EXPECT_THAT(exe.get(), FileHasSubstr(needle));
  } else {
    EXPECT_THAT(exe.get(), Not(FileHasSubstr(needle)));
  }
}

TEST_F(StrippingTest, Level) {
  const std::string needle = absl::Base64Escape("StrippingTest.Level");
  volatile auto severity = absl::LogSeverity::kWarning;
  // Ensure that `severity` is not a compile-time constant to prove that
  // stripping works regardless:
  LOG(LEVEL(severity)) << "U3RyaXBwaW5nVGVzdC5MZXZlbA==";
  std::unique_ptr<FILE, std::function<void(FILE*)>> exe = OpenTestExecutable();
  ASSERT_THAT(exe, NotNull());
  if (absl::LogSeverity::kFatal >= kAbslMinLogLevel) {
    // This can't be stripped at compile-time because it might evaluate to a
    // level that shouldn't be stripped.
    EXPECT_THAT(exe.get(), FileHasSubstr(needle));
  } else {
#if defined(_MSC_VER) || defined(__APPLE__)
    // Dead code elimination misses this case.
#else
    // All levels should be stripped, so it doesn't matter what the severity
    // winds up being.
    EXPECT_THAT(exe.get(), Not(FileHasSubstr(needle)));
#endif
  }
}

}  // namespace


text:
import pytest

import sklearn.datasets as datasets
try:
    import sklearn.discriminant_analysis as da
except ImportError:
    pass

import pandas_ml as pdml
import pandas_ml.util.testing as tm

class TestDiscriminantAnalysis(tm.TestCase):

    def test_objectmapper(self):
        df = pdml.ModelFrame([])
        self.assertIs(df.discriminant_analysis.LinearDiscriminantAnalysis,
                      da.LinearDiscriminantAnalysis)
        self.assertIs(df.discriminant_analysis.QuadraticDiscriminantAnalysis,
                      da.QuadraticDiscriminantAnalysis)

        self.assertIs(df.da.LinearDiscriminantAnalysis,
                      da.LinearDiscriminantAnalysis)
        self.assertIs(df.da.QuadraticDiscriminantAnalysis,
                      da.QuadraticDiscriminantAnalysis)

    def test_objectmapper_deprecated(self):
        df = pdml.ModelFrame([])
        with tm.assert_produces_warning(FutureWarning):
            self.assertIs(df.lda.LinearDiscriminantAnalysis,
                          da.LinearDiscriminantAnalysis)
        with tm.assert_produces_warning(FutureWarning):
            self.assertIs(df.qda.QuadraticDiscriminantAnalysis,
                          da.QuadraticDiscriminantAnalysis)

    @pytest.mark.parametrize("algo", ['LinearDiscriminantAnalysis'])
    def test_LDA(self, algo):
        diabetes = datasets.load_diabetes()
        df = pdml.ModelFrame(diabetes)

        mod1 = getattr(df.da, algo)()
        mod2 = getattr(da, algo)()

        df.fit(mod1)
        mod2.fit(diabetes.data, diabetes.target)

        result = df.predict(mod1)
        expected = mod2.predict(diabetes.data)
        self.assertIsInstance(result, pdml.ModelSeries)
        self.assert_numpy_array_almost_equal(result.values, expected)


text:
package llrb

type Int int

type Float32 float32

type String string

// Use in LLRB.New constructor to make a tree that assumes integer items,
// and sorts from smallest to largest.
func NaturalSortLessInt(a, b interface{}) bool {
	return a.(Int) < b.(Int)
}

// Use in LLRB.New constructor to make a tree that assumes float32 items,
// and sorts from smallest to largest.
func NaturalSortLessFloat(a, b interface{}) bool {
	return a.(Float32) < b.(Float32)
}

// Use in LLRB.New constructor to make a tree that assumes string items,
// and sorts alphabetically from smallest to largest (e.g. "a" < "b" "c".
func NaturalSortLessString(a, b interface{}) bool {
	return a.(String) < b.(String)
}


text:
namespace Cogito
{

    /// <summary>
    /// Simple generic object wrapper.
    /// </summary>
    /// <typeparam name="T"></typeparam>
    class Value<T>
    {

        readonly T item;

        /// <summary>
        /// Initializes a new instance.
        /// </summary>
        /// <param name="item"></param>
        public Value(T item)
        {
            this.item = item;
        }

        /// <summary>
        /// Gets the referenced value.
        /// </summary>
        public T Item
        {
            get { return item; }
        }

    }

}


text: module.exports = require('./dest/node-args').args(process.argv);