text:
package app

import (
	"yap/nlp/format/conllu"
	"yap/nlp/format/lattice"
	"yap/nlp/format/lex"
	"yap/nlp/format/raw"
	"yap/util"

	"yap/nlp/parser/ma"
	"yap/nlp/parser/xliter8"
	nlp "yap/nlp/types"
	// "yap/util"

	"fmt"
	"log"
	// "os"

	"github.com/gonuts/commander"
	"github.com/gonuts/flag"
)

var (
	prefixFile, lexiconFile string
	xliter8out, alwaysnnp   bool
	nnpnofeats              bool
	showoov                 bool
	outJSON                 bool
	DEFAULT_DATA_DIRS       = []string{".", "data/bgulex"}
)

func HebMAConfigOut() {
	log.Println("Configuration")
	log.Printf("Heb Lexicon:\t\t%s", prefixFile)
	log.Printf("Heb Prefix:\t\t%s", lexiconFile)
	log.Printf("OOV Strategy:\t%v", "Const:NNP")
	log.Printf("xliter8 out:\t\t%v", xliter8out)
	log.Println()
	if useConllU {
		log.Printf("CoNLL-U Input:\t%s", conlluFile)
	} else {
		log.Printf("Raw Input:\t\t%s", inRawFile)
	}
	log.Printf("Output:\t\t%s", outLatticeFile)
	log.Println()
}

func HebMA(cmd *commander.Command, args []string) error {
	useConllU = len(conlluFile) > 0
	var REQUIRED_FLAGS []string
	if useConllU {
		lattice.OVERRIDE_XPOS_WITH_UPOS = true
		REQUIRED_FLAGS = []string{"conllu", "out"}
	} else {
		REQUIRED_FLAGS = []string{"raw", "out"}
	}
	prefixLocation, found := util.LocateFile(prefixFile, DEFAULT_DATA_DIRS)
	if found {
		prefixFile = prefixLocation
	} else {
		REQUIRED_FLAGS = append(REQUIRED_FLAGS, "prefix")
	}
	lexiconLocation, found := util.LocateFile(lexiconFile, DEFAULT_DATA_DIRS)
	if found {
		lexiconFile = lexiconLocation
	} else {
		REQUIRED_FLAGS = append(REQUIRED_FLAGS, "lexicon")
	}
	VerifyFlags(cmd, REQUIRED_FLAGS)
	HebMAConfigOut()
	if outFormat == "ud" {
		// override all skips in HEBLEX
		lex.SKIP_POLAR = false
		lex.SKIP_BINYAN = false
		lex.SKIP_ALL_TYPE = false
		lex.SKIP_TYPES = make(map[string]bool)
		lattice.IGNORE_LEMMA = false
		// Compatibility: No features for PROPN in UD Hebrew
		lex.STRIP_ALL_NNP_OF_FEATS = true
	}
	maData := new(ma.BGULex)
	maData.MAType = outFormat
	log.Println("Reading Morphological Analyzer BGU Prefixes")
	maData.LoadPrefixes(prefixFile)
	log.Println("Reading Morphological Analyzer BGU Lexicon")
	maData.LoadLex(lexiconFile, nnpnofeats)
	log.Println()
	var (
		sents        []nlp.BasicSentence
		sentComments [][]string
		sentsStream  chan nlp.BasicSentence
		err          error
	)
	if Stream {
		if useConllU {
			log.Println("Piping conllu file to analyzer", conlluFile)
			conllStream, err := conllu.ReadFileAsStream(conlluFile, limit)
			if err != nil {
				panic(fmt.Sprintf("Failed reading CoNLL-U file - %v", err))
			}
			sentsStream = make(chan nlp.BasicSentence, 2)
			go func() {
				var i int
				for sent := range conllStream {
					newSent := make([]nlp.Token, len(sent.Tokens))
					for j, token := range sent.Tokens {
						newSent[j] = nlp.Token(token)
					}
					i++
					sentsStream <- newSent
				}
				close(sentsStream)
			}()

		} else {
			log.Println("Piping raw file to analyzer", inRawFile)
			sentsStream, err = raw.ReadFileAsStream(inRawFile, limit)
			if err != nil {
				panic(fmt.Sprintf("Failed reading raw file - %v", err))
			}
		}
	} else {
		if useConllU {
			conllSents, _, err := conllu.ReadFile(conlluFile, limit)
			if err != nil {
				panic(fmt.Sprintf("Failed reading CoNLL-U file - %v", err))
			}
			sents = make([]nlp.BasicSentence, len(conllSents))
			sentComments = make([][]string, len(conllSents))
			for i, sent := range conllSents {
				newSent := make([]nlp.Token, len(sent.Tokens))
				for j, token := range sent.Tokens {
					newSent[j] = nlp.Token(token)
				}
				sentComments[i] = sent.Comments
				sents[i] = newSent
			}
		} else {
			sents, err = raw.ReadFile(inRawFile, limit)
			if err != nil {
				panic(fmt.Sprintf("Failed reading raw file - %v", err))
			}
		}
	}
	log.Println("Running Hebrew Morphological Analysis")
	stats := new(ma.AnalyzeStats)
	stats.Init()
	maData.Stats = stats
	maData.AlwaysNNP = alwaysnnp
	maData.LogOOV = showoov
	prefix := log.Prefix()
	if Stream {
		lattices := make(chan nlp.LatticeSentence, 2)
		oovInd := make([]interface{}, 0, 100000)
		go func() {
			var i int
			for sent := range sentsStream {
				// log.SetPrefix(fmt.Sprintf("%v graph# %v ", prefix, i))
				lattice, ind := maData.Analyze(sent.Tokens())
				oovInd = append(oovInd, ind)
				if i%100 == 0 {
					log.Println("At sent", i)
				}
				lattices <- lattice
				i++
			}
			close(lattices)
		}()

		var hebrew xliter8.Interface
		if xliter8out {
			hebrew = &xliter8.Hebrew{}
		}
		output := lattice.Sentence2LatticeStream(lattices, hebrew)
		lattice.WriteStreamToFile(outLatticeFile, output)
		if oovFile != "" {
			raw.WriteFile(oovFile, oovInd)
		}
	} else {

		lattices := make([]nlp.LatticeSentence, len(sents))
		oovInd := make([]interface{}, len(sents))
		for i, sent := range sents {
			log.SetPrefix(fmt.Sprintf("%v graph# %v ", prefix, i))
			lattices[i], oovInd[i] = maData.Analyze(sent.Tokens())
		}
		var hebrew xliter8.Interface
		if xliter8out {
			hebrew = &xliter8.Hebrew{}
		}
		output := lattice.Sentence2LatticeCorpus(lattices, hebrew)
		if outFormat == "ud" {
			if outJSON {
				lattice.WriteUDJSONFile(outLatticeFile, output)
			} else {
				oovAsBasicArray := make([]nlp.BasicSentence, len(sents))
				for i, value := range oovInd {
					oovAsBasicArray[i] = value.(nlp.BasicSentence)
				}
				lattice.WriteUDFile(outLatticeFile, output, sentComments, oovAsBasicArray)
			}
		} else if outFormat == "spmrl" {
			lattice.WriteFile(outLatticeFile, output)
		} else {
			panic(fmt.Sprintf("Unknown lattice output format - %v", outFormat))
		}
		if oovFile != "" {
			raw.WriteFile(oovFile, oovInd)
		}
	}
	log.SetPrefix(prefix)
	log.Println("Analyzed", stats.TotalTokens, "occurences of", len(stats.UniqTokens), "unique tokens")
	log.Println("Encountered", stats.OOVTokens, "occurences of", len(stats.UniqOOVTokens), "unknown tokens")
	return nil
}

func HebMACmd() *commander.Command {
	cmd := &commander.Command{
		Run:       HebMA,
		UsageLine: "hebma <file options> [arguments]",
		Short:     "run lexicon-based morphological analyzer on raw input",
		Long: `
run lexicon-based morphological analyzer on raw input

	$ ./yap hebma -prefix <prefix file> -lexicon <lexicon file> -raw <raw file> -out <output file> [options]

`,
		Flag: *flag.NewFlagSet("ma", flag.ExitOnError),
	}
	cmd.Flag.StringVar(&prefixFile, "prefix", "bgupreflex_withdef.utf8.hr", "Prefix file for morphological analyzer")
	cmd.Flag.StringVar(&lexiconFile, "lexicon", "bgulex.utf8.hr", "Lexicon file for morphological analyzer")
	cmd.Flag.StringVar(&inRawFile, "raw", "", "Input raw (tokenized) file")
	cmd.Flag.StringVar(&conlluFile, "conllu", "", "CoNLL-U-format input file")
	cmd.Flag.StringVar(&outLatticeFile, "out", "", "Output lattice file")
	cmd.Flag.BoolVar(&xliter8out, "xliter8out", false, "Transliterate output lattice file")
	cmd.Flag.BoolVar(&alwaysnnp, "alwaysnnp", false, "Always add NNP to tokens and prefixed subtokens")
	cmd.Flag.BoolVar(&nnpnofeats, "addnnpnofeats", false, "Add NNP in lex but without features")
	cmd.Flag.IntVar(&limit, "limit", 0, "Limit input set")
	cmd.Flag.BoolVar(&showoov, "showoov", false, "Output OOV tokens")
	cmd.Flag.StringVar(&oovFile, "oov", "", "Output OOV File")
	cmd.Flag.BoolVar(&lex.LOG_FAILURES, "showlexerror", false, "Log errors encountered when loading the lexicon")
	cmd.Flag.StringVar(&outFormat, "format", "spmrl", "Output lattice format [spmrl|ud]")
	cmd.Flag.BoolVar(&outJSON, "json", false, "Output using JSON")
	cmd.Flag.BoolVar(&Stream, "stream", false, "Stream data from input through parser to output")
	return cmd
}


text:
// Package buildlog provides a build log viewer for Spyglass
package buildlog

import (
	"bytes"
	"encoding/json"
	"fmt"
	"html/template"
	"io"
	"path/filepath"
	"regexp"
	"strings"

	"github.com/sirupsen/logrus"

	prowconfig "k8s.io/test-infra/prow/config"
	"k8s.io/test-infra/prow/spyglass/api"
	"k8s.io/test-infra/prow/spyglass/lenses"
)

const (
	name               = "buildlog"
	title              = "Build Log"
	priority           = 10
	neighborLines      = 5 // number of "important" lines to be displayed in either direction
	minLinesSkipped    = 5
	maxHighlightLength = 10000 // Maximum length of a line worth highlighting
)

type config struct {
	HighlightRegexes []string `json:"highlight_regexes"`
	HideRawLog       bool     `json:"hide_raw_log,omitempty"`
}

type parsedConfig struct {
	highlightRegex *regexp.Regexp
	showRawLog     bool
}

var _ api.Lens = Lens{}

// Lens implements the build lens.
type Lens struct{}

// Config returns the lens's configuration.
func (lens Lens) Config() lenses.LensConfig {
	return lenses.LensConfig{
		Name:     name,
		Title:    title,
		Priority: priority,
	}
}

// Header executes the "header" section of the template.
func (lens Lens) Header(artifacts []api.Artifact, resourceDir string, config json.RawMessage, spyglassConfig prowconfig.Spyglass) string {
	return executeTemplate(resourceDir, "header", BuildLogsView{})
}

// defaultErrRE matches keywords and glog error messages.
// It is only used if higlight_regexes is not specified in the lens config.
var defaultErrRE = regexp.MustCompile(`timed out|ERROR:|(FAIL|Failure \[)\b|panic\b|^E\d{4} \d\d:\d\d:\d\d\.\d\d\d]`)

func init() {
	lenses.RegisterLens(Lens{})
}

// SubLine represents an substring within a LogLine. It it used so error terms can be highlighted.
type SubLine struct {
	Highlighted bool
	Text        string
}

// LogLine represents a line displayed in the LogArtifactView.
type LogLine struct {
	ArtifactName string
	Number       int
	Length       int
	Highlighted  bool
	Skip         bool
	SubLines     []SubLine
}

// LineGroup holds multiple lines that can be collapsed/expanded as a block
type LineGroup struct {
	Skip                   bool
	Start, End             int // closed, open
	ByteOffset, ByteLength int
	LogLines               []LogLine
}

// LineRequest represents a request for output lines from an artifact. If Offset is 0 and Length
// is -1, all lines will be fetched.
type LineRequest struct {
	Artifact  string `json:"artifact"`
	Offset    int64  `json:"offset"`
	Length    int64  `json:"length"`
	StartLine int    `json:"startLine"`
}

// LinesSkipped returns the number of lines skipped in a line group.
func (g LineGroup) LinesSkipped() int {
	return g.End - g.Start
}

// LogArtifactView holds a single log file's view
type LogArtifactView struct {
	ArtifactName string
	ArtifactLink string
	LineGroups   []LineGroup
	ViewAll      bool
	ShowRawLog   bool
}

// BuildLogsView holds each log file view
type BuildLogsView struct {
	LogViews []LogArtifactView
}

func getConfig(rawConfig json.RawMessage) parsedConfig {
	conf := parsedConfig{
		highlightRegex: defaultErrRE,
		showRawLog:     true,
	}

	// No config at all is fine.
	if len(rawConfig) == 0 {
		return conf
	}

	var c config
	if err := json.Unmarshal(rawConfig, &c); err != nil {
		logrus.WithError(err).Error("Failed to decode buildlog config")
		return conf
	}
	conf.showRawLog = !c.HideRawLog
	if len(c.HighlightRegexes) == 0 {
		return conf
	}

	re, err := regexp.Compile(strings.Join(c.HighlightRegexes, "|"))
	if err != nil {
		logrus.WithError(err).Warnf("Couldn't compile %q", c.HighlightRegexes)
		return conf
	}
	conf.highlightRegex = re
	return conf
}

// Body returns the <body> content for a build log (or multiple build logs)
func (lens Lens) Body(artifacts []api.Artifact, resourceDir string, data string, rawConfig json.RawMessage, spyglassConfig prowconfig.Spyglass) string {
	buildLogsView := BuildLogsView{
		LogViews: []LogArtifactView{},
	}

	conf := getConfig(rawConfig)
	// Read log artifacts and construct template structs
	for _, a := range artifacts {
		av := LogArtifactView{
			ArtifactName: a.JobPath(),
			ArtifactLink: a.CanonicalLink(),
			ShowRawLog:   conf.showRawLog,
		}
		lines, err := logLinesAll(a)
		if err != nil {
			logrus.WithError(err).Info("Error reading log.")
			continue
		}
		av.LineGroups = groupLines(highlightLines(lines, 0, av.ArtifactName, conf.highlightRegex))
		av.ViewAll = true
		buildLogsView.LogViews = append(buildLogsView.LogViews, av)
	}

	return executeTemplate(resourceDir, "body", buildLogsView)
}

// Callback is used to retrieve new log segments
func (lens Lens) Callback(artifacts []api.Artifact, resourceDir string, data string, rawConfig json.RawMessage, spyglassConfig prowconfig.Spyglass) string {
	var request LineRequest
	err := json.Unmarshal([]byte(data), &request)
	if err != nil {
		return "failed to unmarshal request"
	}
	artifact, ok := artifactByName(artifacts, request.Artifact)
	if !ok {
		return "no artifact named " + request.Artifact
	}

	var lines []string
	if request.Offset == 0 && request.Length == -1 {
		lines, err = logLinesAll(artifact)
	} else {
		lines, err = logLines(artifact, request.Offset, request.Length)
	}
	if err != nil {
		return fmt.Sprintf("failed to retrieve log lines: %v", err)
	}

	conf := getConfig(rawConfig)
	logLines := highlightLines(lines, request.StartLine, request.Artifact, conf.highlightRegex)
	return executeTemplate(resourceDir, "line group", logLines)
}

func artifactByName(artifacts []api.Artifact, name string) (api.Artifact, bool) {
	for _, a := range artifacts {
		if a.JobPath() == name {
			return a, true
		}
	}
	return nil, false
}

// logLinesAll reads all of an artifact and splits it into lines.
func logLinesAll(artifact api.Artifact) ([]string, error) {
	read, err := artifact.ReadAll()
	if err != nil {
		return nil, fmt.Errorf("failed to read log %q: %v", artifact.JobPath(), err)
	}
	logLines := strings.Split(string(read), "\n")

	return logLines, nil
}

func logLines(artifact api.Artifact, offset, length int64) ([]string, error) {
	b := make([]byte, length)
	_, err := artifact.ReadAt(b, offset)
	if err != nil && err != io.EOF {
		if err != lenses.ErrGzipOffsetRead {
			return nil, fmt.Errorf("couldn't read requested bytes: %v", err)
		}
		moreBytes, err := artifact.ReadAtMost(offset + length)
		if err != nil && err != io.EOF {
			return nil, fmt.Errorf("couldn't handle reading gzipped file: %v", err)
		}
		b = moreBytes[offset:]
	}
	return strings.Split(string(b), "\n"), nil
}

func highlightLines(lines []string, startLine int, artifact string, highlightRegex *regexp.Regexp) []LogLine {
	// mark highlighted lines
	logLines := make([]LogLine, 0, len(lines))
	for i, text := range lines {
		length := len(text)
		subLines := []SubLine{}
		if length <= maxHighlightLength {
			loc := highlightRegex.FindStringIndex(text)
			for loc != nil {
				subLines = append(subLines, SubLine{false, text[:loc[0]]})
				subLines = append(subLines, SubLine{true, text[loc[0]:loc[1]]})
				text = text[loc[1]:]
				loc = highlightRegex.FindStringIndex(text)
			}
		}
		subLines = append(subLines, SubLine{false, text})
		logLines = append(logLines, LogLine{
			Length:       length + 1, // counting the "\n"
			SubLines:     subLines,
			Number:       startLine + i + 1,
			Highlighted:  len(subLines) > 1,
			ArtifactName: artifact,
			Skip:         true,
		})
	}
	return logLines
}

// breaks lines into important/unimportant groups
func groupLines(logLines []LogLine) []LineGroup {
	// show highlighted lines and their neighboring lines
	for i, line := range logLines {
		if line.Highlighted {
			for d := -neighborLines; d <= neighborLines; d++ {
				if i+d < 0 {
					continue
				}
				if i+d >= len(logLines) {
					break
				}
				logLines[i+d].Skip = false
			}
		}
	}
	// break into groups
	currentOffset := 0
	previousOffset := 0
	var lineGroups []LineGroup
	curGroup := LineGroup{}
	for i, line := range logLines {
		if line.Skip == curGroup.Skip {
			curGroup.LogLines = append(curGroup.LogLines, line)
			currentOffset += line.Length
		} else {
			curGroup.End = i
			curGroup.ByteLength = currentOffset - previousOffset - 1 // -1 for trailing newline
			previousOffset = currentOffset
			if curGroup.Skip {
				if curGroup.LinesSkipped() < minLinesSkipped {
					curGroup.Skip = false
				}
			}
			if len(curGroup.LogLines) > 0 {
				lineGroups = append(lineGroups, curGroup)
			}
			curGroup = LineGroup{
				Skip:       line.Skip,
				Start:      i,
				LogLines:   []LogLine{line},
				ByteOffset: currentOffset,
			}
			currentOffset += line.Length
		}
	}
	curGroup.End = len(logLines)
	curGroup.ByteLength = currentOffset - previousOffset - 1
	if curGroup.Skip {
		if curGroup.LinesSkipped() < minLinesSkipped {
			curGroup.Skip = false
		}
	}
	if len(curGroup.LogLines) > 0 {
		lineGroups = append(lineGroups, curGroup)
	}
	return lineGroups
}

// LogViewTemplate executes the log viewer template ready for rendering
func executeTemplate(resourceDir, templateName string, data interface{}) string {
	t := template.New("template.html")
	_, err := t.ParseFiles(filepath.Join(resourceDir, "template.html"))
	if err != nil {
		return fmt.Sprintf("Failed to load template: %v", err)
	}
	var buf bytes.Buffer
	if err := t.ExecuteTemplate(&buf, templateName, data); err != nil {
		logrus.WithError(err).Error("Error executing template.")
	}
	return buf.String()
}

redpajama_set_name: RedPajamaGithub


text:
Neothyne comes with a fairly straight forward editing mode for placing entities
in the world. The mode can be entered by pressing 'E'.

Inside edit mode you can click on any visible entity to edit its properties
through the edit menu. The edit menu can be toggled with 'F12'.

When there are no entities selected, by default the edit menu will contain
map specific options like ambient lighting. The default edit menu also allows
one to insert a new entity.

Moving entities can be accomplished by clicking and dragging the entity around
while flying.

You'll note entities like models and lights have a bounding box / sphere which
changes color when selected.

A selected entity can be deleted through the edit menu or with 'DEL'.

Map variables can be found in `VARS.md'


text:
<?php include('config.php');
	//Variables
	if ((empty($_POST['idreserva']))||(empty($_POST['mensaje']))||(empty($_POST['puntaje']))||(empty($_POST['idusuario']))||(empty($_POST['idcouch']))){
		header("Location: ../reservashuesped.php");
	}
	else{
	$idreserva = $_POST['idreserva'];
	$puntaje = $_POST['puntaje'];
	$mensaje = $_POST['mensaje'];
	$idcouch = $_POST['idcouch'];
	$idusuario = $_POST['idusuario'];
	//Obtengo la fecha actual
	$hoy = date('Y-m-d');
	//Validar datos de reserva
	$consulta = "SELECT * FROM reserva WHERE Id_Reserva= '$idreserva' and Visible=1";
	$consulta_execute = $conexion->query($consulta);
	if($consulta_execute->num_rows){
		$query_result = $consulta_execute->fetch_array();
		if ($query_result['Calif_Huesped']==0){
			//Actualizacion de Reserva
			$sql = "UPDATE `reserva` SET `Calif_Huesped` = '1' WHERE `reserva`.`Id_Reserva` = '$idreserva'";
			if (!mysqli_query($conexion, $sql)) {
				echo "ERROR. " . mysqli_error($conexion);
			}
			//Actualizar puntaje en couch
			$sql = "UPDATE `couch` SET `Cant_Calif` =`Cant_Calif`+1, `Total_Calif` =`Total_Calif`+'$puntaje' WHERE `couch`.`Id_Couch` = '$idcouch'";
			if (!mysqli_query($conexion, $sql)) {
				echo "ERROR. " . mysqli_error($conexion);
			}
			//Insercion de Puntaje en tabla puntajes
			$insertar = "INSERT INTO punt_couch (`Id_Usuario`, `Id_Couch`, `Mensaje`, `Puntaje`) VALUES ('$idusuario', '$idcouch', '$mensaje', '$puntaje')";
			if (mysqli_query($conexion, $insertar)) {
				?>	<script> alert("Puntaje procesado correctamente, Muchas Gracias.");
					location.href='../reservashuesped.php';
					</script>
				<?php
			} else {
				echo "ERROR. " . mysqli_error($conexion);
			}
		}else{
			echo
				'<script> alert("No existe reserva valida para votacion.");
				location.href="../reservashuesped.php";
				</script>';

		}
	}else{
			echo
				'<script> alert("No existe reserva.");
				location.href="../reservashuesped.php";
				</script>';

	}
	}
?>


text:
package sg.ncl.service.authentication.exceptions;

import sg.ncl.common.exception.base.BadRequestException;

/**
 * @author Christopher Zhong
 */
public class PasswordNullOrEmptyException extends BadRequestException {

    public PasswordNullOrEmptyException() {
        super("Password cannot be null or empty");
    }

}


text:
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50329.0
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using System.Xml.Serialization;
using System.Collections;
using System;
//
// This source code was auto-generated by xsd, Version=2.0.50329.0.
//

namespace Microsoft.TeamFoundation.Converters.WorkItemTracking
{

    /// <remarks/>
    [System.SerializableAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute("Package")]
    public partial class WSPackage
    {
        // Base class for both InsertWorkItem and UpdateWOrkItem
        private WSWorkItemOperation[] workItemOperationsField;

        private string productField;
        private bool disableNotificationsField = true;

        /// <remarks/>
        [XmlElementAttribute("InsertWorkItem", Type = typeof(WSInsertWorkItem))]
        [XmlElementAttribute("UpdateWorkItem", Type = typeof(WSUpdateWorkItem))]
        public WSWorkItemOperation[] WorkItemOperations
        {
            get
            {
                return this.workItemOperationsField;
            }
            set
            {
                this.workItemOperationsField = value;
            }
        }

        /*
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("InsertWorkItem", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public WSInsertWorkItem[] InsertWorkItem
        {
            get
            {
                return this.insertWorkItemField;
            }
            set
            {
                this.insertWorkItemField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("UpdateWorkItem", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public WSUpdateWorkItem[] UpdateWorkItem
        {
            get
            {
                return this.updateWorkItemField;
            }
            set
            {
                this.updateWorkItemField = value;
            }
        }
        */
        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string Product
        {
            get
            {
                return this.productField;
            }
            set
            {
                this.productField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public bool DisableNotifications
        {
            get
            {
                return this.disableNotificationsField;
            }
            set
            {
                this.disableNotificationsField = value;
            }
        }
    }

    /// <remarks/>
    //[System.SerializableAttribute()]
    //[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    [XmlInclude(typeof(WSInsertWorkItem))]
    [XmlInclude(typeof(WSUpdateWorkItem))]
    public class WSWorkItemOperation
    {

        private WSColumns columnsField;

        private ArrayList insertTextField;

        private ArrayList insertFileField;

        private ArrayList createRelationField;

        private ArrayList computedColumnsField;

        private ArrayList insertResourceField;

        private int bypassRulesField;

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("Columns", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public WSColumns Columns
        {
            get
            {
                return this.columnsField;
            }
            set
            {
                this.columnsField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("InsertText", Type = typeof(WSInsertText))]
        public ArrayList InsertText
        {
            get
            {
                return this.insertTextField;
            }
            set
            {
                this.insertTextField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("InsertFile", Type = typeof(WSInsertFile))]
        public ArrayList InsertFile
        {
            get
            {
                return this.insertFileField;
            }
            set
            {
                this.insertFileField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("InsertResourceLink", Type = typeof(WSInsertResourceLink))]
        public ArrayList InsertResourceLink
        {
            get
            {
                return this.insertResourceField;
            }
            set
            {
                this.insertResourceField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("CreateRelation", Type = typeof(WSCreateRelation))]
        public ArrayList CreateRelation
        {
            get
            {
                return this.createRelationField;
            }
            set
            {
                this.createRelationField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("ComputedColumns", typeof(WSComputedColumns))]
        public ArrayList ComputedColumns
        {
            get
            {
                return this.computedColumnsField;
            }
            set
            {
                this.computedColumnsField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public int BypassRules
        {
            get
            {
                return this.bypassRulesField;
            }
            set
            {
                this.bypassRulesField = value;
            }
        }
    }

    //[System.SerializableAttribute()]
    //[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    public partial class WSInsertWorkItem : WSWorkItemOperation
    {
    }

    /// <remarks/>
    //[System.SerializableAttribute()]
    //[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    public partial class WSUpdateWorkItem : WSWorkItemOperation
    {
        /*
        private WSColumns columnsField;
        private ArrayList insertTextField;
        private ArrayList insertFileField;
        private ArrayList createRelationField;
        private ArrayList computedColumnsField;
        private ArrayList insertResourceField;
        private int bypassRulesField;
        private string objectTypeField;
        */
        private int workItemIDField;
        private bool workItemIDFieldSpecified;

        private int revisionField;
        private bool revisionFieldSpecified;

        /*
        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("Columns", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public WSColumns Columns
        {
            get
            {
                return this.columnsField;
            }
            set
            {
                this.columnsField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("InsertText", typeof(WSInsertText))]
        public ArrayList InsertText
        {
            get
            {
                return this.insertTextField;
            }
            set
            {
                this.insertTextField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("InsertFile", typeof(WSInsertFile))]
        public ArrayList InsertFile
        {
            get
            {
                return this.insertFileField;
            }
            set
            {
                this.insertFileField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("InsertResourceLink", Type = typeof(WSInsertResourceLink))]
        public ArrayList InsertResourceLink
        {
            get
            {
                return this.insertResourceField;
            }
            set
            {
                this.insertResourceField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("RemoveFile", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public WSRemoveFile[] RemoveFile
        {
            get
            {
                return this.removeFileField;
            }
            set
            {
                this.removeFileField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("RemoveRelation", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public WSRemoveRelation[] RemoveRelation
        {
            get
            {
                return this.removeRelationField;
            }
            set
            {
                this.removeRelationField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("CreateRelation", typeof(WSCreateRelation))]
        public ArrayList CreateRelation
        {
            get
            {
                return this.createRelationField;
            }
            set
            {
                this.createRelationField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("ComputedColumns", typeof(WSComputedColumns))]
        public ArrayList ComputedColumns
        {
            get
            {
                return this.computedColumnsField;
            }
            set
            {
                this.computedColumnsField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public int BypassRules
        {
            get
            {
                return this.bypassRulesField;
            }
            set
            {
                this.bypassRulesField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string ObjectType
        {
            get
            {
                return this.objectTypeField;
            }
            set
            {
                this.objectTypeField = value;
            }
        }
         */

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public int WorkItemID
        {
            get
            {
                return this.workItemIDField;
            }
            set
            {
                this.workItemIDField = value;
                workItemIDFieldSpecified = true;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool WorkItemIDSpecified
        {
            get
            {
                return this.workItemIDFieldSpecified;
            }
            set
            {
                this.workItemIDFieldSpecified = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public int Revision
        {
            get
            {
                return this.revisionField;
            }
            set
            {
                this.revisionField = value;
                revisionFieldSpecified = true;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool RevisionSpecified
        {
            get
            {
                return this.revisionFieldSpecified;
            }
            set
            {
                this.revisionFieldSpecified = value;
            }
        }
    }

    /// <remarks/>
    [System.SerializableAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    public partial class WSColumns
    {

        private ArrayList columnField;

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("Column", typeof(WSColumn))]
        public ArrayList Column
        {
            get
            {
                return this.columnField;
            }
            set
            {
                this.columnField = value;
            }
        }
    }

    /// <remarks/>
    [System.SerializableAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    [System.Xml.Serialization.XmlRootAttribute(Namespace = "", IsNullable = false)]
    public partial class WSColumn
    {

        private string valueField;

        private string typeField;

        private string column1Field;

        public WSColumn()
        {
            this.typeField = "String";
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public string Value
        {
            get
            {
                return this.valueField;
            }
            set
            {
                this.valueField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute("String")]
        public string Type
        {
            get
            {
                return this.typeField;
            }
            set
            {
                this.typeField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute("Column")]
        public string Column1
        {
            get
            {
                return this.column1Field;
            }
            set
            {
                this.column1Field = value;
            }
        }
    }

    /// <remarks/>
    [System.SerializableAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    [System.Xml.Serialization.XmlRootAttribute(Namespace = "", IsNullable = false)]
    public partial class WSComputedColumns
    {

        private WSComputedColumn[] computedColumnField;

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("ComputedColumn", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public WSComputedColumn[] ComputedColumn
        {
            get
            {
                return this.computedColumnField;
            }
            set
            {
                this.computedColumnField = value;
            }
        }
    }

    /// <remarks/>
    [System.SerializableAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    public partial class WSComputedColumn
    {

        private string columnField;

        public WSComputedColumn()
        {
        }

        public WSComputedColumn(string col)
        {
            Column = col;
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string Column
        {
            get
            {
                return this.columnField;
            }
            set
            {
                this.columnField = value;
            }
        }
    }

    [System.SerializableAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    public partial class WSInsertText
    {

        private string fieldNameField;

        private string fieldDisplayNameField;

        private string valueField;

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string FieldName
        {
            get
            {
                return this.fieldNameField;
            }
            set
            {
                this.fieldNameField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string FieldDisplayName
        {
            get
            {
                return this.fieldDisplayNameField;
            }
            set
            {
                this.fieldDisplayNameField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlTextAttribute()]
        public string Value
        {
            get
            {
                return this.valueField;
            }
            set
            {
                this.valueField = value;
            }
        }
    }

    /// <remarks/>
    [System.SerializableAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    [System.Xml.Serialization.XmlRootAttribute(Namespace = "", IsNullable = false)]
    public partial class WSInsertFile
    {

        private string fileNameField;

        private string originalNameField;

        private string commentField;

        private System.DateTime creationDateField;

        private bool creationDateFieldSpecified;

        private System.DateTime lastWriteDateField;

        private bool lastWriteDateFieldSpecified;

        private long fileSizeField;

        private string areaNodeUri;
        private Guid fileGuid;
        private string fileNameWithPath;

        [XmlIgnore]
        public string FileNameWithPath
        {
            get { return fileNameWithPath; }
            set { fileNameWithPath = value; }
        }

        [XmlIgnore]
        public string AreaNodeUri
        {
            get { return areaNodeUri; }
            set { areaNodeUri = value; }
        }

        [XmlIgnore]
        public Guid FileGuid
        {
            get { return fileGuid; }
            set { fileGuid = value; }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string FileName
        {
            get
            {
                return this.fileNameField;
            }
            set
            {
                this.fileNameField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string OriginalName
        {
            get
            {
                return this.originalNameField;
            }
            set
            {
                this.originalNameField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string Comment
        {
            get
            {
                return this.commentField;
            }
            set
            {
                this.commentField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public long FileSize
        {
            get
            {
                return this.fileSizeField;
            }
            set
            {
                this.fileSizeField = value;
            }
        }
        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute(DataType = "date")]
        public System.DateTime CreationDate
        {
            get
            {
                return this.creationDateField;
            }
            set
            {
                this.creationDateField = value;
                CreationDateSpecified = true;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool CreationDateSpecified
        {
            get
            {
                return this.creationDateFieldSpecified;
            }
            set
            {
                this.creationDateFieldSpecified = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute(DataType = "date")]
        public System.DateTime LastWriteDate
        {
            get
            {
                return this.lastWriteDateField;
            }
            set
            {
                this.lastWriteDateField = value;
                LastWriteDateSpecified = true;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool LastWriteDateSpecified
        {
            get
            {
                return this.lastWriteDateFieldSpecified;
            }
            set
            {
                this.lastWriteDateFieldSpecified = value;
            }
        }
    }

    /// <remarks/>
    [System.SerializableAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    public partial class WSRemoveFile
    {

        private int fileIDField;

        private bool fileIDFieldSpecified;

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public int FileID
        {
            get
            {
                return this.fileIDField;
            }
            set
            {
                this.fileIDField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool FileIDSpecified
        {
            get
            {
                return this.fileIDFieldSpecified;
            }
            set
            {
                this.fileIDFieldSpecified = value;
            }
        }
    }

    /// <remarks/>
    [System.SerializableAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    [System.Xml.Serialization.XmlRootAttribute("ProductStudio-Issue-Update-Template", Namespace = "", IsNullable = false)]
    public partial class ProductStudioIssueUpdateTemplate
    {

        private object[] itemsField;

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("RemoveResourceLink", typeof(WSRemoveResourceLink), Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        [System.Xml.Serialization.XmlElementAttribute("Package", typeof(WSPackage), Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        [System.Xml.Serialization.XmlElementAttribute("InsertFile", typeof(WSInsertFile))]
        [System.Xml.Serialization.XmlElementAttribute("InsertResourceLink", typeof(WSInsertResourceLink), Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        [System.Xml.Serialization.XmlElementAttribute("CreateRelation", typeof(WSCreateRelation))]
        [System.Xml.Serialization.XmlElementAttribute("ComputedColumns", typeof(WSComputedColumn[]))]
        [System.Xml.Serialization.XmlElementAttribute("UpdateResourceLink", typeof(WSUpdateResourceLink), Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        [System.Xml.Serialization.XmlElementAttribute("Column", typeof(WSColumn))]
        [System.Xml.Serialization.XmlElementAttribute("InsertText", typeof(WSInsertText))]
        [System.Xml.Serialization.XmlElementAttribute("UpdateRelation", typeof(WSUpdateRelation), Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public object[] Items
        {
            get
            {
                return this.itemsField;
            }
            set
            {
                this.itemsField = value;
            }
        }
    }

    /// <remarks/>
    [System.SerializableAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    [System.Xml.Serialization.XmlRootAttribute(Namespace = "", IsNullable = false)]
    public partial class WSCreateRelation
    {

        private int workItemIDField;

        private bool workItemIDFieldSpecified;

        private string commentField;

        private string productField;

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public int WorkItemID
        {
            get
            {
                return this.workItemIDField;
            }
            set
            {
                this.workItemIDField = value;
                workItemIDFieldSpecified = true;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string Comment
        {
            get
            {
                return this.commentField;
            }
            set
            {
                this.commentField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool WorkItemIDSpecified
        {
            get
            {
                return this.workItemIDFieldSpecified;
            }
            set
            {
                this.workItemIDFieldSpecified = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string Product
        {
            get
            {
                return this.productField;
            }
            set
            {
                this.productField = value;
            }
        }
    }

    /// <remarks/>
    [System.SerializableAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    public partial class WSUpdateRelation
    {

        private int issueIDField;

        private bool issueIDFieldSpecified;

        private string commentField;

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public int IssueID
        {
            get
            {
                return this.issueIDField;
            }
            set
            {
                this.issueIDField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool IssueIDSpecified
        {
            get
            {
                return this.issueIDFieldSpecified;
            }
            set
            {
                this.issueIDFieldSpecified = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string Comment
        {
            get
            {
                return this.commentField;
            }
            set
            {
                this.commentField = value;
            }
        }
    }

    /// <remarks/>
    [System.SerializableAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    public partial class WSRemoveRelation
    {
    }

    /// <remarks/>
    [System.SerializableAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    public partial class WSInsertResourceLink
    {

        private string fieldNameField;

        private string locationField;

        private string commentField;

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string FieldName
        {
            get
            {
                return this.fieldNameField;
            }
            set
            {
                this.fieldNameField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string Location
        {
            get
            {
                return this.locationField;
            }
            set
            {
                this.locationField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string Comment
        {
            get
            {
                return this.commentField;
            }
            set
            {
                this.commentField = value;
            }
        }
    }

    /// <remarks/>
    [System.SerializableAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    public partial class WSRemoveResourceLink
    {

        private int idField;

        private bool idFieldSpecified;

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public int ID
        {
            get
            {
                return this.idField;
            }
            set
            {
                this.idField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool IDSpecified
        {
            get
            {
                return this.idFieldSpecified;
            }
            set
            {
                this.idFieldSpecified = value;
            }
        }
    }

    /// <remarks/>
    [System.SerializableAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    public partial class WSUpdateResourceLink
    {

        private int idField;

        private bool idFieldSpecified;

        private string commentField;

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public int ID
        {
            get
            {
                return this.idField;
            }
            set
            {
                this.idField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public bool IDSpecified
        {
            get
            {
                return this.idFieldSpecified;
            }
            set
            {
                this.idFieldSpecified = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string Comment
        {
            get
            {
                return this.commentField;
            }
            set
            {
                this.commentField = value;
            }
        }
    }

}


text:
require 'parser/current'

module Erudite
  # Extracts examples from comments.
  class Extractor
    def self.extract(source)
      group_comments(parse_comments(source))
        .map { |group| group.flat_map { |comment| extract_text(comment) } }
        .map { |text| find_examples(group_text(text)).join("\n") }
        .reject(&:empty?)
        .map { |example| Example::Parser.parse(example) }
    end

    def self.find_examples(groups)
      groups
        .reject(&:empty?)
        .each_with_object([]) do |lines, examples|
          lines.first.match(/^(\s*)>> /) do |match|
            if lines.all? { |line| line.start_with?(match[1]) }
              examples.push(lines.map { |line| line[match[1].size..-1] })
            end
          end
        end
    end

    def self.group_text(lines)
      lines.each_with_object([[]]) do |line, groups|
        if line[/^\s*$/]
          groups.push([])
        else
          groups.last.push(line.chomp)
        end
      end
    end

    def self.extract_text(comment)
      if comment.inline?
        [comment.text[1..-1]]
      else
        comment.text[7..-6].lines.map(&:chomp)
      end
    end

    def self.group_comments(comments)
      previous = comments.first

      comments.each_with_object([]) do |comment, groups|
        groups.push([]) unless groupable?(previous, comment)
        groups.last.push(comment)
        previous = comment
      end
    end

    def self.groupable?(a, b)
      a.loc.line == b.loc.line - 1 &&
        a.loc.column == b.loc.column
    end

    def self.parse_comments(source)
      Parser::CurrentRuby.parse_with_comments(source).last
    end
  end
end


text:
using FacesToSmileys.Views;
using FacesToSmileys.ViewModels;
using Xamarin.Forms;
using FacesToSmileys.Services.Implementations;
using FacesToSmileys.Services;
using SimpleInjector;

namespace FacesToSmileys
{
    public class App : Application
    {
        public App()
        {
            var container = new Container();
            container.Register<IDetectionService, DetectionService>();
            container.Register<IFileService, FileService>();
            container.Register<IImageProcessingService, ImageProcessingService>();
            container.Register<IPhotoService, PhotoService>();
            container.Register<IAnalyticService, AnalyticSercice>();
            container.Register<IConfigurationService, ConfigurationService>();
            container.Register<TakePhotoViewModel>();

            MainPage = new TakePhotoView
            {
                BindingContext = container.GetInstance<TakePhotoViewModel>()
            };
        }
    }
}


text:
<!DOCTYPE html>

	<title>Presensi</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />

	<link rel="stylesheet" type="text/css" href="<?php echo base_url("assets/css/bootstrap.css"); ?>">
	<link rel="stylesheet" type="text/css" href="<?php echo base_url("assets/DataTables/datatables.min.css"); ?>">
	<link rel="stylesheet" type="text/css" href="<?php echo base_url("assets/css/bootstrap-select.min.css"); ?>">
	<link rel="stylesheet" type="text/css" href="<?php echo base_url("assets/css/bootstrap-datetimepicker.css");?>" />

				//content from ajax loaded here

	<?php
	if ($this->session->userdata('otoritas')==1) {
		$this->load->view('navbar_admin');
	}else{
		$this->load->view('navbar');
	}
	?>

Presensi

				<a href="<?php echo base_url("c_presensi/upload_page/"); ?>">
					<button class="btn btn-primary" id="uploadPage" type="button">Upload</button>

				<button class="btn btn-primary" id="libur" type="button" data-toggle="modal" data-target="#myModal">Hari libur</button>

					<select id="changeColumn" class="selectpicker" multiple>
						<option value="0" selected>NIP</option>
						<option value="1" selected>NAMA</option>
						<option value="2" selected>SATKER</option>
						<option value="3" selected>TAHUN</option>
						<option value="4" selected>BULAN</option>
					</select>
					<select id="rekapDropdown" class="selectpicker" name="tabel">
						<option value="1" selected>Presensi</option>
						<option value="2">Lembur</option>
					</select>

							NIP
							NAMA
							SATKER
							TAHUN
							BULAN
							PRESENSI
							LEMBUR
							Panel


text:
<?php

namespace Zend\Code\Generator;

use Zend\Code\Reflection\ClassReflection;

class ClassGenerator extends AbstractGenerator {
	const FLAG_ABSTRACT = 0x01;
	const FLAG_FINAL = 0x02;

	/**
	 *
	 * @var FileGenerator
	 */
	protected $containingFileGenerator = null;

	/**
	 *
	 * @var string
	 */
	protected $namespaceName = null;

	/**
	 *
	 * @var DocBlockGenerator
	 */
	protected $docBlock = null;

	/**
	 *
	 * @var string
	 */
	protected $name = null;

	/**
	 *
	 * @var bool
	 */
	protected $flags = 0x00;

	/**
	 *
	 * @var string
	 */
	protected $extendedClass = null;

	/**
	 *
	 * @var array Array of string names
	 */
	protected $implementedInterfaces = array ();

	/**
	 *
	 * @var PropertyGenerator[] Array of properties
	 */
	protected $properties = array ();

	/**
	 *
	 * @var MethodGenerator[] Array of methods
	 */
	protected $methods = array ();

	/**
	 *
	 * @var array Array of string names
	 */
	protected $uses = array ();

	/**
	 * Build a Code Generation Php Object from a Class Reflection
	 *
	 * @param ClassReflection $classReflection
	 * @return ClassGenerator
	 */
	public static function fromReflection(ClassReflection $classReflection) {
		// class generator
		$cg = new static ( $classReflection->getName () );

		$cg->setSourceContent ( $cg->getSourceContent () );
		$cg->setSourceDirty ( false );

		if ($classReflection->getDocComment () != '') {
			$cg->setDocBlock ( DocBlockGenerator::fromReflection ( $classReflection->getDocBlock () ) );
		}

		$cg->setAbstract ( $classReflection->isAbstract () );

		// set the namespace
		if ($classReflection->inNamespace ()) {
			$cg->setNamespaceName ( $classReflection->getNamespaceName () );
		}

		/* @var \Zend\Code\Reflection\ClassReflection $parentClass */
		$parentClass = $classReflection->getParentClass ();
		if ($parentClass) {
			$cg->setExtendedClass ( $parentClass->getName () );
			$interfaces = array_diff ( $classReflection->getInterfaces (), $parentClass->getInterfaces () );
		} else {
			$interfaces = $classReflection->getInterfaces ();
		}

		$interfaceNames = array ();
		foreach ( $interfaces as $interface ) {
			/* @var \Zend\Code\Reflection\ClassReflection $interface */
			$interfaceNames [] = $interface->getName ();
		}

		$cg->setImplementedInterfaces ( $interfaceNames );

		$properties = array ();
		foreach ( $classReflection->getProperties () as $reflectionProperty ) {
			if ($reflectionProperty->getDeclaringClass ()->getName () == $classReflection->getName ()) {
				$properties [] = PropertyGenerator::fromReflection ( $reflectionProperty );
			}
		}
		$cg->addProperties ( $properties );

		$methods = array ();
		foreach ( $classReflection->getMethods () as $reflectionMethod ) {
			if ($reflectionMethod->getDeclaringClass ()->getName () == $cg->getNamespaceName () . "\\" . $cg->getName ()) {
				$methods [] = MethodGenerator::fromReflection ( $reflectionMethod );
			}
		}
		$cg->addMethods ( $methods );

		return $cg;
	}

	/**
	 * Generate from array
	 *
	 * @configkey name string [required] Class Name
	 * @configkey filegenerator FileGenerator File generator that holds this class
	 * @configkey namespacename string The namespace for this class
	 * @configkey docblock string The docblock information
	 * @configkey flags int Flags, one of ClassGenerator::FLAG_ABSTRACT ClassGenerator::FLAG_FINAL
	 * @configkey extendedclass string Class which this class is extending
	 * @configkey implementedinterfaces
	 * @configkey properties
	 * @configkey methods
	 *
	 * @throws Exception\InvalidArgumentException
	 * @param array $array
	 * @return ClassGenerator
	 */
	public static function fromArray(array $array) {
		if (! isset ( $array ['name'] )) {
			throw new Exception\InvalidArgumentException ( 'Class generator requires that a name is provided for this object' );
		}

		$cg = new static ( $array ['name'] );
		foreach ( $array as $name => $value ) {
			// normalize key
			switch (strtolower ( str_replace ( array (
					'.',
					'-',
					'_'
			), '', $name ) )) {
				case 'containingfile' :
					$cg->setContainingFileGenerator ( $value );
					break;
				case 'namespacename' :
					$cg->setNamespaceName ( $value );
					break;
				case 'docblock' :
					$docBlock = ($value instanceof DocBlockGenerator) ? $value : DocBlockGenerator::fromArray ( $value );
					$cg->setDocBlock ( $docBlock );
					break;
				case 'flags' :
					$cg->setFlags ( $value );
					break;
				case 'extendedclass' :
					$cg->setExtendedClass ( $value );
					break;
				case 'implementedinterfaces' :
					$cg->setImplementedInterfaces ( $value );
					break;
				case 'properties' :
					$cg->addProperties ( $value );
					break;
				case 'methods' :
					$cg->addMethods ( $value );
					break;
			}
		}

		return $cg;
	}

	/**
	 *
	 * @param string $name
	 * @param string $namespaceName
	 * @param array|string $flags
	 * @param string $extends
	 * @param array $interfaces
	 * @param array $properties
	 * @param array $methods
	 * @param DocBlockGenerator $docBlock
	 */
	public function __construct($name = null, $namespaceName = null, $flags = null, $extends = null, $interfaces = array(), $properties = array(), $methods = array(), $docBlock = null) {
		if ($name !== null) {
			$this->setName ( $name );
		}
		if ($namespaceName !== null) {
			$this->setNamespaceName ( $namespaceName );
		}
		if ($flags !== null) {
			$this->setFlags ( $flags );
		}
		if ($properties !== array ()) {
			$this->addProperties ( $properties );
		}
		if ($extends !== null) {
			$this->setExtendedClass ( $extends );
		}
		if (is_array ( $interfaces )) {
			$this->setImplementedInterfaces ( $interfaces );
		}
		if ($methods !== array ()) {
			$this->addMethods ( $methods );
		}
		if ($docBlock !== null) {
			$this->setDocBlock ( $docBlock );
		}
	}

	/**
	 *
	 * @param string $name
	 * @return ClassGenerator
	 */
	public function setName($name) {
		if (strstr ( $name, '\\' )) {
			$namespace = substr ( $name, 0, strrpos ( $name, '\\' ) );
			$name = substr ( $name, strrpos ( $name, '\\' ) + 1 );
			$this->setNamespaceName ( $namespace );
		}

		$this->name = $name;
		return $this;
	}

	/**
	 *
	 * @return string
	 */
	public function getName() {
		return $this->name;
	}

	/**
	 *
	 * @param string $namespaceName
	 * @return ClassGenerator
	 */
	public function setNamespaceName($namespaceName) {
		$this->namespaceName = $namespaceName;
		return $this;
	}

	/**
	 *
	 * @return string
	 */
	public function getNamespaceName() {
		return $this->namespaceName;
	}

	/**
	 *
	 * @param FileGenerator $fileGenerator
	 * @return ClassGenerator
	 */
	public function setContainingFileGenerator(FileGenerator $fileGenerator) {
		$this->containingFileGenerator = $fileGenerator;
		return $this;
	}

	/**
	 *
	 * @return FileGenerator
	 */
	public function getContainingFileGenerator() {
		return $this->containingFileGenerator;
	}

	/**
	 *
	 * @param DocBlockGenerator $docBlock
	 * @return ClassGenerator
	 */
	public function setDocBlock(DocBlockGenerator $docBlock) {
		$this->docBlock = $docBlock;
		return $this;
	}

	/**
	 *
	 * @return DocBlockGenerator
	 */
	public function getDocBlock() {
		return $this->docBlock;
	}

	/**
	 *
	 * @param array|string $flags
	 * @return ClassGenerator
	 */
	public function setFlags($flags) {
		if (is_array ( $flags )) {
			$flagsArray = $flags;
			$flags = 0x00;
			foreach ( $flagsArray as $flag ) {
				$flags |= $flag;
			}
		}
		// check that visibility is one of three
		$this->flags = $flags;

		return $this;
	}

	/**
	 *
	 * @param string $flag
	 * @return ClassGenerator
	 */
	public function addFlag($flag) {
		$this->setFlags ( $this->flags | $flag );
		return $this;
	}

	/**
	 *
	 * @param string $flag
	 * @return ClassGenerator
	 */
	public function removeFlag($flag) {
		$this->setFlags ( $this->flags & ~ $flag );
		return $this;
	}

	/**
	 *
	 * @param bool $isAbstract
	 * @return ClassGenerator
	 */
	public function setAbstract($isAbstract) {
		return (($isAbstract) ? $this->addFlag ( self::FLAG_ABSTRACT ) : $this->removeFlag ( self::FLAG_ABSTRACT ));
	}

	/**
	 *
	 * @return bool
	 */
	public function isAbstract() {
		return ( bool ) ($this->flags & self::FLAG_ABSTRACT);
	}

	/**
	 *
	 * @param bool $isFinal
	 * @return ClassGenerator
	 */
	public function setFinal($isFinal) {
		return (($isFinal) ? $this->addFlag ( self::FLAG_FINAL ) : $this->removeFlag ( self::FLAG_FINAL ));
	}

	/**
	 *
	 * @return bool
	 */
	public function isFinal() {
		return ($this->flags & self::FLAG_FINAL);
	}

	/**
	 *
	 * @param string $extendedClass
	 * @return ClassGenerator
	 */
	public function setExtendedClass($extendedClass) {
		$this->extendedClass = $extendedClass;
		return $this;
	}

	/**
	 *
	 * @return string
	 */
	public function getExtendedClass() {
		return $this->extendedClass;
	}

	/**
	 *
	 * @param array $implementedInterfaces
	 * @return ClassGenerator
	 */
	public function setImplementedInterfaces(array $implementedInterfaces) {
		$this->implementedInterfaces = $implementedInterfaces;
		return $this;
	}

	/**
	 *
	 * @return array
	 */
	public function getImplementedInterfaces() {
		return $this->implementedInterfaces;
	}

	/**
	 *
	 * @param array $properties
	 * @return ClassGenerator
	 */
	public function addProperties(array $properties) {
		foreach ( $properties as $property ) {
			if ($property instanceof PropertyGenerator) {
				$this->addPropertyFromGenerator ( $property );
			} else {
				if (is_string ( $property )) {
					$this->addProperty ( $property );
				} elseif (is_array ( $property )) {
					call_user_func_array ( array (
							$this,
							'addProperty'
					), $property );
				}
			}
		}

		return $this;
	}

	/**
	 * Add Property from scalars
	 *
	 * @param string $name
	 * @param string|array $defaultValue
	 * @param int $flags
	 * @throws Exception\InvalidArgumentException
	 * @return ClassGenerator
	 */
	public function addProperty($name, $defaultValue = null, $flags = PropertyGenerator::FLAG_PUBLIC) {
		if (! is_string ( $name )) {
			throw new Exception\InvalidArgumentException ( sprintf ( '%s expects string for name', __METHOD__ ) );
		}

		return $this->addPropertyFromGenerator ( new PropertyGenerator ( $name, $defaultValue, $flags ) );
	}

	/**
	 * Add property from PropertyGenerator
	 *
	 * @param string|PropertyGenerator $property
	 * @throws Exception\InvalidArgumentException
	 * @return ClassGenerator
	 */
	public function addPropertyFromGenerator(PropertyGenerator $property) {
		$propertyName = $property->getName ();

		if (isset ( $this->properties [$propertyName] )) {
			throw new Exception\InvalidArgumentException ( sprintf ( 'A property by name %s already exists in this class.', $propertyName ) );
		}

		$this->properties [$propertyName] = $property;
		return $this;
	}

	/**
	 * Add a class to "use" classes
	 *
	 * @param string $use
	 * @param string|null $useAlias
	 * @return ClassGenerator
	 */
	public function addUse($use, $useAlias = null) {
		if (! empty ( $useAlias )) {
			$use .= ' as ' . $useAlias;
		}

		$this->uses [] = $use;
		return $this;
	}

	/**
	 *
	 * @return PropertyGenerator[]
	 */
	public function getProperties() {
		return $this->properties;
	}

	/**
	 *
	 * @param string $propertyName
	 * @return PropertyGenerator|false
	 */
	public function getProperty($propertyName) {
		foreach ( $this->getProperties () as $property ) {
			if ($property->getName () == $propertyName) {
				return $property;
			}
		}

		return false;
	}

	/**
	 * Returns the "use" classes
	 *
	 * @return array
	 */
	public function getUses() {
		return $this->uses;
	}

	/**
	 *
	 * @param string $propertyName
	 * @return bool
	 */
	public function hasProperty($propertyName) {
		return isset ( $this->properties [$propertyName] );
	}

	/**
	 *
	 * @param array $methods
	 * @return ClassGenerator
	 */
	public function addMethods(array $methods) {
		foreach ( $methods as $method ) {
			if ($method instanceof MethodGenerator) {
				$this->addMethodFromGenerator ( $method );
			} else {
				if (is_string ( $method )) {
					$this->addMethod ( $method );
				} elseif (is_array ( $method )) {
					call_user_func_array ( array (
							$this,
							'addMethod'
					), $method );
				}
			}
		}

		return $this;
	}

	/**
	 * Add Method from scalars
	 *
	 * @param string $name
	 * @param array $parameters
	 * @param int $flags
	 * @param string $body
	 * @param string $docBlock
	 * @throws Exception\InvalidArgumentException
	 * @return ClassGenerator
	 */
	public function addMethod($name = null, array $parameters = array(), $flags = MethodGenerator::FLAG_PUBLIC, $body = null, $docBlock = null) {
		if (! is_string ( $name )) {
			throw new Exception\InvalidArgumentException ( sprintf ( '%s expects string for name', __METHOD__ ) );
		}

		return $this->addMethodFromGenerator ( new MethodGenerator ( $name, $parameters, $flags, $body, $docBlock ) );
	}

	/**
	 * Add Method from MethodGenerator
	 *
	 * @param MethodGenerator $method
	 * @throws Exception\InvalidArgumentException
	 * @return ClassGenerator
	 */
	public function addMethodFromGenerator(MethodGenerator $method) {
		$methodName = $method->getName ();

		if (isset ( $this->methods [$methodName] )) {
			throw new Exception\InvalidArgumentException ( sprintf ( 'A method by name %s already exists in this class.', $methodName ) );
		}

		$this->methods [$methodName] = $method;
		return $this;
	}

	/**
	 *
	 * @return MethodGenerator[]
	 */
	public function getMethods() {
		return $this->methods;
	}

	/**
	 *
	 * @param string $methodName
	 * @return MethodGenerator|false
	 */
	public function getMethod($methodName) {
		foreach ( $this->methods as $method ) {
			if ($method->getName () == $methodName) {
				return $method;
			}
		}

		return false;
	}

	/**
	 *
	 * @param string $methodName
	 * @return ClassGenerator
	 */
	public function removeMethod($methodName) {
		foreach ( $this->methods as $key => $method ) {
			if ($method->getName () == $methodName) {
				unset ( $this->methods [$key] );
				break;
			}
		}

		return $this;
	}

	/**
	 *
	 * @param string $methodName
	 * @return bool
	 */
	public function hasMethod($methodName) {
		return isset ( $this->methods [$methodName] );
	}

	/**
	 *
	 * @return bool
	 */
	public function isSourceDirty() {
		if (($docBlock = $this->getDocBlock ()) && $docBlock->isSourceDirty ()) {
			return true;
		}

		foreach ( $this->getProperties () as $property ) {
			if ($property->isSourceDirty ()) {
				return true;
			}
		}

		foreach ( $this->getMethods () as $method ) {
			if ($method->isSourceDirty ()) {
				return true;
			}
		}

		return parent::isSourceDirty ();
	}

	/**
	 *
	 * @return string
	 */
	public function generate() {
		if (! $this->isSourceDirty ()) {
			$output = $this->getSourceContent ();
			if (! empty ( $output )) {
				return $output;
			}
		}

		$output = '';

		if (null !== ($namespace = $this->getNamespaceName ())) {
			$output .= 'namespace ' . $namespace . ';' . self::LINE_FEED . self::LINE_FEED;
		}

		$uses = $this->getUses ();
		if (! empty ( $uses )) {
			foreach ( $uses as $use ) {
				$output .= 'use ' . $use . ';' . self::LINE_FEED;
			}
			$output .= self::LINE_FEED;
		}

		if (null !== ($docBlock = $this->getDocBlock ())) {
			$docBlock->setIndentation ( '' );
			$output .= $docBlock->generate ();
		}

		if ($this->isAbstract ()) {
			$output .= 'abstract ';
		}

		$output .= 'class ' . $this->getName ();

		if (! empty ( $this->extendedClass )) {
			$output .= ' extends ' . $this->extendedClass;
		}

		$implemented = $this->getImplementedInterfaces ();
		if (! empty ( $implemented )) {
			$output .= ' implements ' . implode ( ', ', $implemented );
		}

		$output .= self::LINE_FEED . '{' . self::LINE_FEED . self::LINE_FEED;

		$properties = $this->getProperties ();
		if (! empty ( $properties )) {
			foreach ( $properties as $property ) {
				$output .= $property->generate () . self::LINE_FEED . self::LINE_FEED;
			}
		}

		$methods = $this->getMethods ();
		if (! empty ( $methods )) {
			foreach ( $methods as $method ) {
				$output .= $method->generate () . self::LINE_FEED;
			}
		}

		$output .= self::LINE_FEED . '}' . self::LINE_FEED;

		return $output;
	}
}


text:
namespace EyeKey
{
    partial class Main
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Main));
            this.mainMenu = new System.Windows.Forms.MenuStrip();
            this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
            this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.aboutToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
            this.keyboardSplit = new System.Windows.Forms.SplitContainer();
            this.splitContainer1 = new System.Windows.Forms.SplitContainer();
            this.textBox = new System.Windows.Forms.RichTextBox();
            this.elementHost1 = new System.Windows.Forms.Integration.ElementHost();
            this.eyeInfo1 = new EyeKey.EyeInfo();
            this.keyboard1 = new EyeKey.Keyboard();
            this.mainMenu.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.keyboardSplit)).BeginInit();
            this.keyboardSplit.Panel1.SuspendLayout();
            this.keyboardSplit.Panel2.SuspendLayout();
            this.keyboardSplit.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
            this.splitContainer1.Panel1.SuspendLayout();
            this.splitContainer1.Panel2.SuspendLayout();
            this.splitContainer1.SuspendLayout();
            this.SuspendLayout();
            //
            // mainMenu
            //
            this.mainMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.fileToolStripMenuItem,
            this.aboutToolStripMenuItem});
            resources.ApplyResources(this.mainMenu, "mainMenu");
            this.mainMenu.Name = "mainMenu";
            //
            // fileToolStripMenuItem
            //
            this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.settingsToolStripMenuItem,
            this.toolStripMenuItem1,
            this.exitToolStripMenuItem});
            this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
            resources.ApplyResources(this.fileToolStripMenuItem, "fileToolStripMenuItem");
            //
            // settingsToolStripMenuItem
            //
            this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem";
            resources.ApplyResources(this.settingsToolStripMenuItem, "settingsToolStripMenuItem");
            //
            // toolStripMenuItem1
            //
            this.toolStripMenuItem1.Name = "toolStripMenuItem1";
            resources.ApplyResources(this.toolStripMenuItem1, "toolStripMenuItem1");
            //
            // exitToolStripMenuItem
            //
            this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
            resources.ApplyResources(this.exitToolStripMenuItem, "exitToolStripMenuItem");
            //
            // aboutToolStripMenuItem
            //
            this.aboutToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.aboutToolStripMenuItem1});
            this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
            resources.ApplyResources(this.aboutToolStripMenuItem, "aboutToolStripMenuItem");
            //
            // aboutToolStripMenuItem1
            //
            this.aboutToolStripMenuItem1.Name = "aboutToolStripMenuItem1";
            resources.ApplyResources(this.aboutToolStripMenuItem1, "aboutToolStripMenuItem1");
            //
            // keyboardSplit
            //
            resources.ApplyResources(this.keyboardSplit, "keyboardSplit");
            this.keyboardSplit.Name = "keyboardSplit";
            //
            // keyboardSplit.Panel1
            //
            this.keyboardSplit.Panel1.Controls.Add(this.splitContainer1);
            //
            // keyboardSplit.Panel2
            //
            this.keyboardSplit.Panel2.Controls.Add(this.keyboard1);
            //
            // splitContainer1
            //
            resources.ApplyResources(this.splitContainer1, "splitContainer1");
            this.splitContainer1.Name = "splitContainer1";
            //
            // splitContainer1.Panel1
            //
            this.splitContainer1.Panel1.Controls.Add(this.textBox);
            //
            // splitContainer1.Panel2
            //
            this.splitContainer1.Panel2.Controls.Add(this.elementHost1);
            //
            // textBox
            //
            resources.ApplyResources(this.textBox, "textBox");
            this.textBox.Name = "textBox";
            this.textBox.TextChanged += new System.EventHandler(this.textBox_TextChanged);
            //
            // elementHost1
            //
            resources.ApplyResources(this.elementHost1, "elementHost1");
            this.elementHost1.Name = "elementHost1";
            this.elementHost1.Child = this.eyeInfo1;
            //
            // keyboard1
            //
            resources.ApplyResources(this.keyboard1, "keyboard1");
            this.keyboard1.Name = "keyboard1";
            this.keyboard1.OnKeyButton += new EyeKey.Keyboard.OnKeyButtonHandler(this.keyboard1_OnKeyButton);
            //
            // Main
            //
            resources.ApplyResources(this, "$this");
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.Controls.Add(this.keyboardSplit);
            this.Controls.Add(this.mainMenu);
            this.MainMenuStrip = this.mainMenu;
            this.Name = "Main";
            this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
            this.mainMenu.ResumeLayout(false);
            this.mainMenu.PerformLayout();
            this.keyboardSplit.Panel1.ResumeLayout(false);
            this.keyboardSplit.Panel2.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.keyboardSplit)).EndInit();
            this.keyboardSplit.ResumeLayout(false);
            this.splitContainer1.Panel1.ResumeLayout(false);
            this.splitContainer1.Panel2.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
            this.splitContainer1.ResumeLayout(false);
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.MenuStrip mainMenu;
        private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem settingsToolStripMenuItem;
        private System.Windows.Forms.ToolStripSeparator toolStripMenuItem1;
        private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem1;
        private System.Windows.Forms.SplitContainer keyboardSplit;
        private Keyboard keyboard1;
        private System.Windows.Forms.SplitContainer splitContainer1;
        private System.Windows.Forms.RichTextBox textBox;
        private System.Windows.Forms.Integration.ElementHost elementHost1;
        private EyeInfo eyeInfo1;
    }
}


text:
package onecache

import (
	"strings"
	"testing"
)

func TestDefaultKeyFunc(t *testing.T) {

	tt := []struct {
		expected, original string
	}{
		{"onecache:lanre", "lanre"},
		{"onecache:onecache", "onecache"},
	}

	for _, v := range tt {
		if !strings.EqualFold(v.expected, DefaultKeyFunc(v.original)) {
			t.Fatalf("an error occurred while checking if strings equal....")
		}
	}
}


text:
#include "tensorflow/core/framework/unique_tensor_references.h"

#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/status.h"

namespace tensorflow {

TEST(UniquifyTensors, TestUniqueVector) {
  UniqueTensorReferences refs;
  Tensor a(DT_FLOAT, TensorShape({2, 2}));
  Tensor b(DT_FLOAT, TensorShape({2, 2}));

  EXPECT_FALSE(a.SharesBufferWith(b));

  refs.Add(a);
  refs.Add(b);
  TensorReferenceVector tensors;
  refs.FreezeAndReturnReferences(&tensors);
  EXPECT_EQ(2, tensors.size());
  if (tensors[0].SharesBufferWith(a)) {
    EXPECT_TRUE(tensors[1].SharesBufferWith(b));
  } else {
    EXPECT_TRUE(tensors[1].SharesBufferWith(a));
    EXPECT_TRUE(tensors[0].SharesBufferWith(b));
  }
  for (auto& t : tensors) {
    t.Unref();
  }
}

TEST(UniquifyTensors, TestNonUniqueVector) {
  UniqueTensorReferences refs;
  Tensor a(DT_FLOAT, TensorShape({2, 2}));
  Tensor b(a);

  EXPECT_TRUE(a.SharesBufferWith(b));

  refs.Add(a);
  refs.Add(b);
  TensorReferenceVector tensors;
  refs.FreezeAndReturnReferences(&tensors);
  EXPECT_EQ(1, tensors.size());
  EXPECT_TRUE(tensors[0].SharesBufferWith(a));
  EXPECT_TRUE(tensors[0].SharesBufferWith(b));
  for (auto& t : tensors) {
    t.Unref();
  }
}

TEST(UniquifyTensors, TestNoLeakVector) {
  UniqueTensorReferences refs;
  Tensor a(DT_FLOAT, TensorShape({2, 2}));
  Tensor b(DT_FLOAT, TensorShape({2, 2}));

  EXPECT_FALSE(a.SharesBufferWith(b));

  refs.Add(a);
  refs.Add(b);
}

TEST(UniquifyTensors, TestUniqueSet) {
  UniqueTensorReferences refs;
  Tensor a(DT_FLOAT, TensorShape({2, 2}));
  Tensor b(DT_FLOAT, TensorShape({2, 2}));
  Tensor c(DT_FLOAT, TensorShape({2, 2}));
  Tensor d(DT_FLOAT, TensorShape({2, 2}));
  Tensor e(DT_FLOAT, TensorShape({2, 2}));

  EXPECT_FALSE(a.SharesBufferWith(b));

  refs.Add(a);
  refs.Add(b);
  refs.Add(c);
  refs.Add(d);
  refs.Add(e);
  TensorReferenceVector tensors;
  refs.FreezeAndReturnReferences(&tensors);
  EXPECT_EQ(5, tensors.size());
  for (auto& t : tensors) {
    t.Unref();
  }
}

TEST(UniquifyTensors, TestNonUniqueSet) {
  UniqueTensorReferences refs;
  Tensor a(DT_FLOAT, TensorShape({2, 2}));
  Tensor b(DT_FLOAT, TensorShape({2, 2}));
  Tensor c(DT_FLOAT, TensorShape({2, 2}));
  Tensor d(DT_FLOAT, TensorShape({2, 2}));
  Tensor e(DT_FLOAT, TensorShape({2, 2}));
  Tensor f(c);

  EXPECT_TRUE(f.SharesBufferWith(c));

  refs.Add(a);
  refs.Add(b);
  refs.Add(c);
  refs.Add(d);
  refs.Add(e);
  refs.Add(f);
  TensorReferenceVector tensors;
  refs.FreezeAndReturnReferences(&tensors);
  EXPECT_EQ(5, tensors.size());
  for (auto& t : tensors) {
    t.Unref();
  }
}

TEST(UniquifyTensors, TestNoLeakSet) {
  UniqueTensorReferences refs;
  Tensor a(DT_FLOAT, TensorShape({2, 2}));
  Tensor b(DT_FLOAT, TensorShape({2, 2}));
  Tensor c(DT_FLOAT, TensorShape({2, 2}));
  Tensor d(DT_FLOAT, TensorShape({2, 2}));
  Tensor e(DT_FLOAT, TensorShape({2, 2}));

  refs.Add(a);
  refs.Add(b);
  refs.Add(c);
  refs.Add(d);
  refs.Add(e);
}

}  // namespace tensorflow


text:
package ch.shaktipat.exwrapper.java.lang;

public class ClassNotFoundExceptionWrapper extends RuntimeException
{
	private static final long serialVersionUID = 1L;

	public ClassNotFoundExceptionWrapper( ClassNotFoundException e )
	{
		super( e );
	}
}


text:
package com.google.api.ads.dfp.jaxws.v201411;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;

/**
 *
 *             The action used for activating {@link CreativeWrapper} objects.
 *
 *
 *
Java class for ActivateCreativeWrappers complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="ActivateCreativeWrappers">
 *   <complexContent>
 *     <extension base="{https://www.google.com/apis/ads/publisher/v201411}CreativeWrapperAction">
 *       <sequence>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ActivateCreativeWrappers")
public class ActivateCreativeWrappers
    extends CreativeWrapperAction
{

}


text:
BSLS_IDENT("$Id: $")

//@PURPOSE: Provide a basic input stream buffer using a client buffer.
//
//@CLASSES:
//   bdlsb::FixedMemInput: basic input stream buffer using client memory
//
//@SEE_ALSO: bdesb::fixedmeminstreambuf
//
//@DESCRIPTION: This component provides a mechanism, 'bdlsb::FixedMemInput',
// that implements the input portion of the 'bsl::basic_streambuf' protocol
// using a client-supplied memory buffer.  Method names necessarily correspond
// to the protocol-specified method names.  Clients supply the character buffer
// at stream buffer construction, and can later reinitialize the stream buffer
// with a different character buffer by calling the 'pubsetbuf' method.  This
// component provides none of the output-related functionality of
// 'bsl::basic_streambuf' nor does it use locales in any way.  The only
// difference between this component and 'bdlsb::FixedMemInStreamBuf' is that
// the class 'bdlsb::FixedMemInput' does *not* derive from a 'bsl::streambuf',
// and is generally more efficient (at initialization and due to the lack of
// virtual functions).  It is especially designed for streaming a very small
// amount of information from a fixed-length buffer using a
// 'bslx_genericinstream'.
//
///Usage
///-----
// This section illustrates intended use of this component.
//
///Example 1: Basic Use of 'bdlsb::FixedMemInput'
/// - - - - - - - - - - - - - - - - - - - - - - -
// The 'bdlsb::FixedMemInput' class is intended to be used as a template
// parameter to the 'bslx::GenericInStream' class.  Such specialization
// provides user with performance efficient way to unexternalize BDEX encoded
// data from an existing character buffer.
//
// See the 'bslx_genericinstream' component usage example for a more practical
// example of using 'bslx' streams.
//
// This example demonstrates instantiating a template, 'bslx::GenericInStream',
// on a 'bdlsb::FixedMemInput' object and using the 'bslx::GenericInStream'
// object to stream in some data.
//
// First, create 'bslx::ByteOutStream' 'outStream' and externalize some user
// data to it.  Note that this code only prepares the character buffer that is
// used to illustrate the purpose of the 'bdlsb::FixedMemInput' class.
//..
//  bslx::ByteOutStream outStream(20131127);
//
//  unsigned int MAGIC = 0x1812;
//
//  outStream.putUint32(MAGIC);
//  outStream.putInt32(83);
//  outStream.putString(bsl::string("test"));
//  assert(outStream.isValid());
//..
// Next, create a 'bdlsb::FixedMemInput' stream buffer initialized with the
// buffer from the 'bslx::ByteOutStream' object 'outStream':
//..
//  bdlsb::FixedMemInput streamBuffer(outStream.data(), outStream.length());
//..
// Then, create the 'bslx::GenericInStream' stream parameterized with
// 'bdlsb::FixedMemInput':
//..
//  bslx::GenericInStream<bdlsb::FixedMemInput>  inStream(&streamBuffer);
//..
// Now, use resulting 'inStream' to unexternalize user data:
//..
//  unsigned int  magic;
//  int           key;
//  bsl::string   value;
//
//  inStream.getUint32(magic);
//  inStream.getInt32(key);
//  inStream.getString(value);
//  assert(inStream.isValid());
//..
// Finally, verify that the data from the supplied buffer was unexternalized
// correctly:
//..
//  assert(MAGIC  == magic);
//  assert(83     == key);
//  assert("test" == value);
//..

#ifndef INCLUDED_BDLSCM_VERSION
#include <bdlscm_version.h>
#endif

#ifndef INCLUDED_BSLS_ASSERT
#include <bsls_assert.h>
#endif

#ifndef INCLUDED_BSLS_PERFORMANCEHINT
#include <bsls_performancehint.h>
#endif

#ifndef INCLUDED_BSLS_PLATFORM
#include <bsls_platform.h>
#endif

#ifndef INCLUDED_BSLS_TYPES
#include <bsls_types.h>
#endif

#ifndef INCLUDED_BSL_ALGORITHM
#include <bsl_algorithm.h>
#endif

#ifndef INCLUDED_BSL_CSTDLIB
#include <bsl_cstdlib.h>
#endif

#ifndef INCLUDED_BSL_CSTRING
#include <bsl_cstring.h>
#endif

#ifndef INCLUDED_BSL_IOS
#include <bsl_ios.h>
#endif

#ifndef INCLUDED_BSL_IOSFWD
#include <bsl_iosfwd.h>
#endif

namespace BloombergLP {
namespace bdlsb {

                        // ===================
                        // class FixedMemInput
                        // ===================

class FixedMemInput {
    // This class, like 'bdlsb::FixedMemInStreamBuf', implements the input
    // functionality of the 'basic_streambuf' interface, using client-supplied
    // 'char *' memory.  It has an interface identical to
    // 'bdlsb::FixedMemInStreamBuf' but does *not* inherit from
    // 'bsl::streambuf'.  This implementation is advantageous for performance
    // reasons, as the overhead of the initialization and virtual function
    // calls of a 'bsl::streambuf' can be undesirable.  It is especially
    // designed for streaming a very small amount of information from a
    // fixed-length buffer using a 'bslx_genericinstream' when the number of
    // characters read from the input is guaranteed not to exceed the length of
    // the buffer.  Note that this class is not designed to be derived from.

  public:
    // TYPES
    typedef char                    char_type;
    typedef bsl::char_traits<char>  traits_type;
    typedef traits_type::int_type   int_type;
    typedef traits_type::pos_type   pos_type;
    typedef traits_type::off_type   off_type;

  private:
    // PRIVATE DATA MEMBERS
    const char      *d_buffer_p;      // buffer (held, not owned)
    bsl::size_t      d_bufferSize;    // buffer size (not length of stream)
    bsl::size_t      d_pos;           // current read position

  private:
    // NOT IMPLEMENTED
    FixedMemInput(const FixedMemInput&);
    FixedMemInput& operator=(const FixedMemInput&);

  public:
    // CREATORS
    FixedMemInput(const char *buffer, bsl::size_t length);
        // Create a 'FixedMemInput' using the specified 'buffer' of the
        // specified 'length'.  The position indicator is set to the beginning
        // of the 'buffer'.  The behavior is undefined unless
        // 'buffer != 0 && length > 0' or 'length == 0'.  Note that 'buffer' is
        // held but not owned.

    //! ~FixedMemInput();
        // Destroy this stream buffer.  Note that this trivial destructor is
        // generated by the compiler.

    // MANIPULATORS
    bsl::streamsize in_avail();
        // Return the number of characters available from the current read
        // position in this stream buffer.

                             // *** 27.5.2.2.2 buffer and positioning: ***

    FixedMemInput *pubsetbuf(const char *buffer, bsl::streamsize  length);
        // Reinitialize this stream buffer to use the specified character
        // 'buffer' having the specified 'length'.  Return a pointer providing
        // modifiable access to this stream buffer.  The behaviour is undefined
        // unless 'buffer != 0 && length > 0' or 'length == 0'.  Upon
        // reinitialization for use of the new  buffer, the position indicator
        // is set to the beginning of the 'buffer'.  Note that 'buffer' is
        // held but not owned.

    pos_type pubseekoff(off_type                offset,
                        bsl::ios_base::seekdir  way,
                        bsl::ios_base::openmode which = bsl::ios_base::in);
        // Set the position indicator to the relative specified 'offset' from
        // the base position indicated by the specified 'way' and return the
        // resulting absolute position on success or pos_type(-1) on failure.
        // Optionally specify 'which' area of the stream buffer.  The seek
        // operation will fail if 'which' does not include the flag
        // 'bsl::ios_base::in' or if the resulting absolute position is less
        // than zero or greater than the value returned by 'length'.

    pos_type pubseekpos(pos_type                position,
                        bsl::ios_base::openmode which = bsl::ios_base::in);
        // Set the position indicator to the specified 'position' and return
        // the resulting absolute position on success or pos_type(-1) on
        // failure.  Optionally specify 'which' area of the stream buffer.  The
        // 'seekpos' operation will fail if 'which' does not include the flag
        // 'bsl::ios_base::in' or if position is less then zero or greater
        // than the value returned by 'length'.

                             // *** 27.5.2.2.3 Get area: ***

    int_type sbumpc();
        // Return the character at the current read position from this buffer,
        // or 'traits_type::eof()' if the end of the buffer is reached and
        // advance read position indicator.

    int_type sgetc();
        // Return the character at the current read position from this buffer,
        // or 'traits_type::eof()' if the end of the buffer is reached.

    bsl::streamsize sgetn(char_type *destination, bsl::streamsize length);
        // Read the specified 'length' characters to the specified
        // 'destination'.  Return the number of characters successfully read
        // from this buffer, which is either equal to the 'length' parameter or
        // equal to the distance from the current read position to the end of
        // the input buffer, whichever is smaller, and move the read cursor
        // position by this amount.  The behavior is undefined unless '0 <=
        // length'.

    int_type snextc();
        // Advance the current read position and return the character at the
        // resulting position from this buffer, or 'traits_type::eof()' if the
        // end of the buffer is reached.

                             // *** 27.5.2.2.4 Putback: ***

    int_type sputbackc(char c);
        // Move the current read position back one character if the current
        // read position is not at the beginning of the buffer and the previous
        // position contains the specified character 'c', and return that
        // character.  Otherwise, return 'traits_type::eof()' and do not move
        // the current read position.

    int_type sungetc();
        // Move the current read position back one character if the current
        // read position is not at the beginning of the buffer, and return the
        // character at the resulting current read position from this buffer.
        // Return 'traits_type::eof()' otherwise.

    // ACCESSORS
    bsl::size_t capacity() const;
        // Return the size for the buffer held by this buffer, in bytes,
        // supplied at construction.

    const char *data() const;
        // Return the address of the non-modifiable character buffer held by
        // this stream buffer.

    bsl::size_t length() const;
        // Return the number of characters that can be successfully read from
        // this stream buffer before reading 'traits_type::eof()' -- i.e., the
        // number of characters between the current read position and the end
        // of this buffer.
};

// ============================================================================
//                               INLINE DEFINITIONS
// ============================================================================

                        // -------------------
                        // class FixedMemInput
                        // -------------------

// CREATORS
inline
FixedMemInput::FixedMemInput(const char *buffer, bsl::size_t length)
: d_buffer_p(const_cast<char *>(buffer))
, d_bufferSize(length)
, d_pos(0)
{
    BSLS_ASSERT_SAFE(buffer || 0 == length);
}

// MANIPULATORS
inline
bsl::streamsize FixedMemInput::in_avail()
{
    if (BSLS_PERFORMANCEHINT_PREDICT_UNLIKELY(d_pos == d_bufferSize)) {
        return bsl::streamsize(-1);                                   // RETURN
    }
    return static_cast<bsl::streamsize>(d_bufferSize - d_pos);
}

inline
FixedMemInput *FixedMemInput::pubsetbuf(const char      *buffer,
                                        bsl::streamsize  length)

{
    BSLS_ASSERT_SAFE(buffer || 0 == length);
    BSLS_ASSERT_SAFE(0 <= length);

    d_buffer_p   = buffer;
    d_bufferSize = static_cast<bsl::size_t>(length);
    d_pos        = 0;
    return this;
}

inline
FixedMemInput::int_type FixedMemInput::sbumpc()
{
    if (BSLS_PERFORMANCEHINT_PREDICT_UNLIKELY(d_pos >= d_bufferSize)) {
        return traits_type::eof();                                    // RETURN
    }
    const int_type i = traits_type::to_int_type(d_buffer_p[d_pos]);
    d_pos += 1;
    return i;
}

inline
FixedMemInput::int_type FixedMemInput::sgetc()
{
    if (BSLS_PERFORMANCEHINT_PREDICT_UNLIKELY(d_pos >= d_bufferSize)) {
        return traits_type::eof();                                    // RETURN
    }
    //return traits_type::to_int_type(d_buffer_p[static_cast<IntPtr>(d_pos)]);
    return traits_type::to_int_type(d_buffer_p[d_pos]);
}

inline
bsl::streamsize
FixedMemInput::sgetn(char *destination, bsl::streamsize length)
{
    BSLS_ASSERT_SAFE(0 <= length);

    const bsl::size_t current = d_pos;
    d_pos += static_cast<bsl::size_t>(length);

    if (BSLS_PERFORMANCEHINT_PREDICT_UNLIKELY((d_pos > d_bufferSize) ||
                                              (d_pos < current) )) {
        d_pos    = d_bufferSize;
        length = static_cast<bsl::streamsize>(d_bufferSize - current);
    }
    bsl::memcpy(destination, d_buffer_p+current, length);
    return length;
}

inline
FixedMemInput::int_type FixedMemInput::snextc()
{
    if (BSLS_PERFORMANCEHINT_PREDICT_UNLIKELY(d_pos >= d_bufferSize)) {
        return traits_type::eof();                                    // RETURN
    }
    d_pos += 1;
    return sgetc();
}

inline
FixedMemInput::int_type FixedMemInput::sputbackc(char c)
{
    if (BSLS_PERFORMANCEHINT_PREDICT_UNLIKELY(0 == d_pos)
     || BSLS_PERFORMANCEHINT_PREDICT_UNLIKELY(c != d_buffer_p[d_pos-1])) {
        return traits_type::eof();                                    // RETURN
    }
    d_pos -= 1;
    return traits_type::to_int_type(c);
}

inline
FixedMemInput::int_type FixedMemInput::sungetc()
{
    if (BSLS_PERFORMANCEHINT_PREDICT_UNLIKELY(0 == d_pos)) {
        return traits_type::eof();                                    // RETURN
    }
    d_pos -= 1;
    return traits_type::to_int_type(d_buffer_p[d_pos]);
}

// ACCESSORS
inline
bsl::size_t FixedMemInput::capacity() const
{
    return d_bufferSize;
}

inline
const char *FixedMemInput::data() const
{
    return d_buffer_p;
}

inline
bsl::size_t FixedMemInput::length() const
{
    return (d_bufferSize - d_pos);
}

}  // close package namespace
}  // close enterprise namespace

#endif

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