text:
body {
    font-family: "Lucida Grande", Helvetica, Arial, sans-serif;
    font-size: .7em;
    margin: 0;
    padding: 0;
}

body, ul, ol, li, p, pre, div, a {
    padding: 0;
    margin: 0;
    list-style: none;
    text-decoration: none;
    color: #E5E5E5;
}

#tabs pre, #result {
	color: #BABABA;
    background: #0A0A0A;
}

a {
    outline: none;
    font-weight: bold;
    text-shadow: 0 1px 0 #494949;
    cursor: pointer;
}

#tabs a {
    text-shadow: 0 1px 0 #494949;
}
#tabs #resources a {
    font-size: 1.3em;
}

.tCont {
    font-size: 1em;
    font-family: "Monaco", Helvetica, Arial, sans-serif;
}

#wrapper {
    overflow: hidden;
}

#head,
#triggers,
#actions li,
#triggers li a,
#actions li.active,
#actions li.active a,
#head h1 a {
    background: #161616;
}

#actions li:hover,
#triggers li:hover,
#actions li a:hover,
#triggers li a:hover {
    background: #1E1E1E;
}

#head {
    background-position: 0 0;
    background-repeat: repeat-x;
    position: relative;
    height: 30px;
    overflow: hidden;
}

    #head h1 {
        float: left;
        height: 30px;
        width: 138px;
        margin: 0 0 0 10px;
    }

        #head h1 a {
            float: left;
            height: 30px;
            width: 138px;
			background: url(http://jsfiddle.net/img/mooshell-frame.sprite.png);
            background-position: 100% -112px;
            text-indent: -9999em;
        }

#actions {
    float: right;
}

    #actions li {
        float: left;
        height: 30px;
        background-position: 0 -47px;
        background-repeat: no-repeat;
    }

        #actions li a {
            display: block;
            height: 30px;
            line-height: 28px;
            padding: 0 4px;
            color: #C4C4C4;
        }

    #actions li.active {
        background-position: 0 -173px;
    }

        #actions li.active a {
            background-position: 100% -173px;
            color: #FFFFFF;
            text-shadow: none;

        }

#triggers {
    float: right;
    padding: 0 4px;
    background-position: 0 -47px;
}

    #triggers li {
        float: left;
		width: 30px;
        height: 30px;
        background-repeat: no-repeat;
    }

    #triggers li.tRun a {
		margin: 8px 4px 0 9px;
		background: url('sprite.png') no-repeat top left; width: 12px; height: 12px;
        background-position: 0px 0px;
    }

    #triggers li.tEdit a {
		margin: 8px 0 0 9px;
		background: url('sprite.png') no-repeat top left; width: 12px; height: 12px;
        background-position: -22px 0px;
    }

        #triggers li a {
            display: block;
            height: 30px;
            text-indent: -9000em;
            width: 31px;
        }

#tabs {
    position: relative;
}

    #tabs .tCont {
        padding: 10px;
        margin: 0;
        display: none;
        overflow: auto;
    }

    #tabs .active {
        display: block;
    }

#result iframe {
    width: 100%;
    border: none;
}

/* -------------------------------------------------------- SYNTAX COLORS */

.standardLighter span {
	color: #FFFFFF !important;
}
.standardLighter .standardnum {
	color: #757575 !important;
}
.standardLighter .standardline {
	border-top: 1px solid #383838 !important;
	border-bottom: 1px solid #383838 !important;
	border-left: 1px solid #939393 !important;
}
.standardLighter .standardfirst { padding-top: 5px; }
.standardLighter .standardlast  { padding-bottom: 5px; }
.standardLighter .alt {
	border-top: 1px solid #757575 !important;
	border-bottom: 1px solid #757575 !important;
}

/** Pre specific styles */
pre.standardLighter {
}

/** OL specific styles */
ol.standardLighter {
	color: #BCBCBC !important;
}

/** Div specific styles */
div.standardLighter div {
}

/** Symbol styles */
.standardLighter .de1 {}
.standardLighter .de2 {}
.standardLighter .kw1 { color: #939393 !important; }
.standardLighter .kw2 { color: #8E8E8E !important; }
.standardLighter .kw3 { color: #848484 !important; }
.standardLighter .kw4 { color: #999999 !important; }
.standardLighter .co1 { color: #888888 !important; }
.standardLighter .co2 { color: #888888 !important; }
.standardLighter .st0 { color: #969696 !important; }
.standardLighter .st1 { color: #9B9B9B !important; }
.standardLighter .st2 { color: #999999 !important; }
.standardLighter .nu0 { color: #686868 !important; }
.standardLighter .me0 { color: #757575 !important; }
.standardLighter .me1 { color: #757575 !important; }
.standardLighter .br0 { color: #FCFCFC !important; }
.standardLighter .sy0 { color: #FCFCFC !important; }
.standardLighter .es0 { color: #FCFCFC !important; }
.standardLighter .re0 { color: #7C7C7C !important; }

/* -------------------------------------------------------- SCROLLBAR */

.tinyscrollbar { overflow: hidden !important; }
.tinyscrollbar .viewport { width: 100%; height: 100%; overflow: hidden; position: relative; }
.tinyscrollbar .overview { list-style: none; position: absolute; left: 0; top: 0; margin-right: 20px; }
.tinyscrollbar .thumb .end,
.tinyscrollbar .thumb { background-color: #1E1E1E; }
.tinyscrollbar .thumb:hover { background-color: #494949; }
.tinyscrollbar .scrollbar { position: absolute; right: 5px; width: 5px; }
.tinyscrollbar .track { background-color: #141414; height: 100%; position: relative; padding: 0 1px; }
.tinyscrollbar .thumb { height: 20px; width: 100%; cursor: pointer; overflow: hidden; position: absolute; top: 0; }
.tinyscrollbar .thumb .end { overflow: hidden; height: 5px; }
.tinyscrollbar .disable{ display: none; }


text:
class Service::CheckpointsController < ApplicationController

  include RestfulJson::DefaultController

end

redpajama_set_name: RedPajamaGithub


text:
set -e

# Prepend "dpl" if the first argument is not an executable
if ! type -- "$1" &> /dev/null; then
	set -- dpl "$@"
fi

exec "$@"


text:
typedef unsigned char  byte;
typedef unsigned short ushort;
typedef unsigned int   uint;

// Defines the size of basic types.
typedef int    VocabIndex;
typedef int    NgramIndex;
typedef int    Count;
typedef float  LProb;
typedef double Prob;
typedef double Param;
typedef uint   NodeIndex;

// Vector aliases.
typedef DenseVector<const char *> StrVector;
typedef DenseVector<byte>         BitVector;
typedef DenseVector<byte>         ByteVector;
typedef DenseVector<short>        ShortVector;
typedef DenseVector<int>          IntVector;
typedef DenseVector<uint>         UIntVector;
typedef DenseVector<size_t>       SizeVector;
typedef DenseVector<float>        FloatVector;
typedef DenseVector<double>       DoubleVector;
typedef DenseVector<VocabIndex>   VocabVector;
typedef DenseVector<Count>        CountVector;
typedef DenseVector<NgramIndex>   IndexVector;
typedef DenseVector<Prob>         ProbVector;
typedef DenseVector<Param>        ParamVector;
typedef DenseVector<uint>         NodeVector;

typedef std::vector<DoubleVector> FeatureVectors;

#endif // TYPES_H


text:
package com.mortardata.api.v2;

import java.io.IOException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

import com.google.api.client.http.HttpRequest;
import com.google.api.client.util.Key;

/**
 * Run and fetch jobs from the Mortar API.
 *
 * @see
 * http://help.mortardata.com/reference/api/api_version_2
 */
public class Jobs {

    private API api;
    private static final int POLLING_DELAY = 5000;

    /**
     * status_code values that indicate a job in a final state.
     */
    public static final Set<JobStatus> JOB_STATUS_COMPLETE = new HashSet<JobStatus>
            (Arrays.asList(JobStatus.SCRIPT_ERROR, JobStatus.PLAN_ERROR, JobStatus.SUCCESS,
                    JobStatus.EXECUTION_ERROR, JobStatus.SERVICE_ERROR, JobStatus.STOPPED));

    /**
     * Construct a Jobs V2 API.
     *
     * @param api API client
     */
    public Jobs(API api) {
        this.api = api;
    }

    /**
     * Get all jobs from the API.
     *
     * @return list of all Jobs
     * @throws IOException if unable to fetch data from the API
     */
    public JobsList getJobs() throws IOException {
        HttpRequest request = this.api.buildHttpGetRequest("jobs");
        return request.execute().parseAs(Jobs.JobsList.class);
    }

    /**
     * Get a subset of jobs from the API.
     *
     * @param skip Number of jobs to skip (jobs sorted in desc order of startTimestamp)
     * @param limit Maximum number of jobs to return
     * @return list of Jobs
     * @throws IOException if unable to fetch data from the API
     */
    public JobsList getJobs(Integer skip, Integer limit) throws IOException {
        HttpRequest request = this.api.buildHttpGetRequest("jobs?skip=" + skip + "&limit=" + limit);
        return request.execute().parseAs(Jobs.JobsList.class);
    }

    /**
     * Get a job from the API by ID.
     *
     * @param jobId ID of the Job
     * @return requested Job
     * @throws IOException if Job does not exist or unable to fetch job from the API
     */
    public Job getJob(String jobId) throws IOException {
        HttpRequest request = this.api.buildHttpGetRequest("jobs/" + jobId);
        return request.execute().parseAs(Jobs.Job.class);
    }

    /**
     * Stop a running job.
     *
     * @param jobId ID of Job to stop
     * @throws IOException if unable to stop Job
     */
    public void stopJob(String jobId) throws IOException {
        HttpRequest request = this.api.buildHttpDeleteRequest("jobs/" + jobId);
        request.execute();
    }

    /**
     * Run a new Job.
     *
     * @param jobRequest Info about job to run
     * @return job_id ID of job that was started
     * @throws IOException if unable to run job on API
     */
    public String postJob(JobRequest jobRequest) throws IOException {
        HttpRequest request = this.api.buildHttpPostRequest("jobs", jobRequest.getArguments());
        return (String) request.execute().parseAs(HashMap.class).get("job_id");
    }

    /**
     * Get the status of Job.
     *
     * @param jobId ID of job for which to request status
     * @return status of the job
     * @throws IOException if job does not exist or unable to contact API
     */
    public JobStatus getJobStatus(String jobId) throws IOException {
        Job job = getJob(jobId);
        return job.getStatusCode();
    }

    /**
     * Block until a job has completed, polling for status.
     *
     * @param jobId ID of job to wait for completion
     * @return final statusCode
     * @throws IOException if unable to contact API for status
     * @throws InterruptedException if polling interrupted
     */
    public JobStatus blockUntilJobComplete(String jobId) throws IOException, InterruptedException {
        while (true) {
            JobStatus jobStatus = getJobStatus(jobId);
            if (JOB_STATUS_COMPLETE.contains(jobStatus)) {
                return jobStatus;
            }
            Thread.sleep(POLLING_DELAY);
        }
    }

    /**
     * Information about an error with a Job.
     */
    public static class JobError {

        /**
         * Error message.
         */
        @Key
        public String message;

        /**
         * Type of error that occurred.
         */
        @Key("type")
        public String errorType;

        /**
         * Line number for error, if available.
         */
        @Key("line_number")
        String lineNumber;

        /**
         * Column number for error, if available.
         */
        @Key("column_number")
        String columnNumber;

        @Override
        public String toString() {
            return "JobError [message=" + message + ", errorType=" + errorType
                    + ", lineNumber=" + lineNumber + ", columnNumber="
                    + columnNumber + "]";
        }

    }

    /**
     * List of Job.
     */
    public static class JobsList {

        /**
         * List of Job.
         */
        @Key
        public List<Jobs.Job> jobs;

        @Override
        public String toString() {
            return "JobsList [jobs=" + jobs + "]";
        }

    }

    /**
     * A Mortar Job.
     */
    public static class Job {

        @Key("status_code")
        private String statusCode;

        @Key("status_description")
        private String statusDescription;

        @Key("script_name")
        private String scriptName;

        @Key("pigscript_name")
        private String pigscriptName;

        @Key("cluster_id")
        private String clusterId;

        @Key("error")
        private JobError error;

        @Key
        private String note;

        @Key
        private Integer progress;

        @Key("script_type")
        private String scriptType;

        @Key("project_name")
        private String projectName;

        @Key("script_parameters")
        private Map<String, String> scriptParameters;

        @Key("git_ref")
        private String gitRef;

        @Key("start_timestamp")
        private String startTimestamp;

        @Key("stop_timestamp")
        private String stopTimestamp;

        /**
         * Job status code.
         */
        public JobStatus getStatusCode() {
            return JobStatus.getEnum(statusCode);
        }

        /**
         * Job status code original string.
         */
        public String getStatusCodeString() {
            return statusCode;
        }

        /**
         * Full description of job status.
         */
        public String getStatusDescription() {
            return statusDescription;
        }

        /**
         * Name of the script that was run.
         */
        public String getScriptName() {
            return scriptName;
        }

        /**
         * Name of the script that was run, if a pigscript.
         */
        public String getPigscriptName() {
            return pigscriptName;
        }

        /**
         * Cluster on which this Job is running, or null if not yet assigned.
         */
        public String getClusterId() {
            return clusterId;
        }

        /**
         * Information about an error, if one occurs for this Job.
         */
        public JobError getError() {
            return error;
        }

        /**
         * Note added to the job.
         */
        public String getNote() {
            return note;
        }

        /**
         * Overall job progress.
         */
        public Integer getProgress() {
            return progress;
        }

        /**
         * Type of script that was run: cli_pig, cli_control, 'web'.
         */
        public String getScriptType() {
            return scriptType;
        }

        /**
         * Name of the Mortar project for the Job.
         */
        public String getProjectName() {
            return projectName;
        }

        /**
         * Parameters used for the Job.
         */
        public Map<String, String> getScriptParameters() {
            return scriptParameters;
        }

        /**
         * Git hash or branch at which Job was run.
         */
        public String getGitRef() {
            return gitRef;
        }

        /**
         * Timestamp when the job started running.
         * Example: 2012-02-28T03:35:42.831000+00:00
         */
        public String getStartTimestamp() {
            return startTimestamp;
        }

        /**
         * Timestamp when the job stopped running.
         * Example: 2012-02-28T03:41:52.613000+00:00"
         */
        public String getStopTimestamp() {
            return stopTimestamp;
        }

        @Override
        public String toString() {
            return "Job [statusCode=" + statusCode + ", statusDescription="
                    + statusDescription + ", scriptName=" + scriptName
                    + ", pigscriptName=" + pigscriptName + ", clusterId="
                    + clusterId + ", error=" + error + ", note=" + note
                    + ", progress=" + progress + ", scriptType=" + scriptType
                    + ", projectName=" + projectName + ", scriptParameters="
                    + scriptParameters + ", gitRef=" + gitRef
                    + ", startTimestamp=" + startTimestamp + ", stopTimestamp="
                    + stopTimestamp + "]";
        }

    }

    /**
     * Job status.
     */
    public enum JobStatus {

        /**
         * Job received and queued, not yet validated.
         */
        STARTING("starting"),

        /**
         * Pig server starting (happens on first request in session).
         */
        GATEWAY_STARTING("GATEWAY_STARTING"),

        /**
         * Checking the script for syntax and S3 data storage errors.
         */
        VALIDATING_SCRIPT("validating_script"),

        /**
         * An error was detected in the script before running Job.
         */
        SCRIPT_ERROR("script_error"),

        /**
         * An error was detected in the script before running Job.
         */
        PLAN_ERROR("plan_error"),

        /**
         * Starting a Hadoop cluster for the Job.
         */
        STARTING_CLUSTER("starting_cluster"),

        /**
         * Running the Job.
         */
        RUNNING("running"),

        /**
         * Job completed successfully.
         */
        SUCCESS("success"),

        /**
         * An error occurred during the Job run.
         */
        EXECUTION_ERROR("execution_error"),

        /**
         * An internal error occurred while attempting to run the Job.
         */
        SERVICE_ERROR("service_error"),

        /**
         * Job is has been requested to be stopped by user.
         */
        STOPPING("stopping"),

        /**
         * Job has been stopped by user.
         */
        STOPPED("stopped"),

        /**
         * Unrecognized status code.
         */
        UNKNOWN("UNKNOWN_STATUS");

        private String stringValue;

        /**
         * @param stringValue Mortar API compatible string value
         */
        JobStatus(String stringValue) {
            this.stringValue = stringValue;
        }

        /**
         * Override toString to return stringValue.
         *
         * @return Mortar API compatible string value
         */
        public String toString() {
            return stringValue;
        }

        /**
         * Get TaskStatus enum from stringValue.
         *
         * @param value String value generated by the toString method
         * @return TaskStatus enum for the typeString value
         */
        public static JobStatus getEnum(String value) {
            for (JobStatus t : values()) {
                if (t.stringValue.equalsIgnoreCase(value)) {
                    return t;
                }
            }
            return UNKNOWN;
        }

    }

}


text:
import {TechnicolorShader} from "three/examples/jsm/shaders/TechnicolorShader";
import {ShaderPass} from "../ShaderPass.js";

/**
 * Simulate technicolor television colors.
 *
 * @class TechnicolorPass
 * @module Postprocessing
 */
function TechnicolorPass()
{
	ShaderPass.call(this, TechnicolorShader);

	this.type = "Technicolor";
}

TechnicolorPass.prototype = Object.create(ShaderPass.prototype);

export {TechnicolorPass};


text:
from math import cos, tan, sin, pi
import re

class PDFText(object):

    def __init__(self, session, page, text, font=None, color=None, cursor=None, justify='left', double_spacing=None):
        self.session = session
        self.page = page
        self.text = text
        self.justify = justify
        self.double_spacing = double_spacing
        self.stale_page = False
        if font is None:
            self.font = self.session.parent.document.font
        else:
            self.font = font
        self.color = color
        if cursor is None:
            self.cursor = page.cursor
        else:
            self.cursor = cursor
        if self._test_x_fit() is True:
            self._set_justification(self.text)
            self._text()
        else:
            self._write()

        if self.font.type == 'TTF':
            self.font._cache_text(self.text)

    def _set_justification(self, text):
        width = self.font._string_width(text)
        if width > 0:
            if self.justify == 'right':
                self.cursor.x = (self.cursor.xmax - width)
            elif self.justify == 'center':
                self.cursor.x = (self.cursor.xmax + self.cursor.xmin - width) / 2.0
            else:
                pass

    def _text(self, value=None):
        if value is not None:
            self.text = value

        # Check to make sure it's not a blank string
        if self.text != '' and self.text is not None:
            # Check to make sure it is not in the top margin.
            if (self.cursor.y - self.font.line_size) < self.cursor.ymin:
                self.cursor.y_plus(self.font.line_size)

            # Check to make sure it will fit before the bottom margin
            if not self.cursor.y_fit(self.font.line_size):
                if hasattr(self, 'line_array'):
                    if self.line_index < len(self.line_array):
                        self.text = ''.join(self.line_array[self.line_index:])
                        self.stale_page = True
                self.session._add_page(self.text)
            else:
                # Escape and put in ()
                text_string = self._text_to_string(self.text)

                if getattr(self, '_textMatrix', False):
                    self.text_position(self.cursor.x, self.cursor.y_prime)

                s = 'BT '
                s += getattr(self, '_textMatrix', '%.2f %.2f Td ' % (self.cursor.x, self.cursor.y_prime))
                s += ' %s Tj ' % text_string
                s += ' ET'

                # Underline Flag
                if self.font.underline:
                    s = '%s %s' % (s, self._underline())

                # See if the text color is the same as the written
                if self.color is not None:
                    self.color._set_type('t')
                    if not self.session._compare_color(self.color):
                        self.session._out(self.color._get_color_string(), self.page)
                    self.session._save_color(self.color.copy())

                # Set Font for text
                # TODO, if font is current font, don't set it again.
                # Need to change all other font.is_set to false, though
                fs = 'BT /F%d %.2f Tf ET' % (self.font.index, self.font.font_size)
                self.session._out(fs, self.page)

                self.session._out(s, self.page)
                try:
                    self.cursor.x_plus(self.font._string_width(self.text))
                except ValueError:
                    self._newline()
        else:
            pass

    def _write(self):
        # Move the y cursor down if it will run into the top margin
        if (self.cursor.y - self.font.line_size) < self.cursor.ymin:
                self.cursor.y_plus(self.font.line_size)

        # Split array into lines that will fit in the x direction
        self.line_array = self._split_into_lines(self.text)

        # Test length for whole paragraph
        test_length = self.font.line_size * len(self.line_array)
        if self.cursor.y_fit(test_length) is False and (test_length < (self.cursor.ymax - self.cursor.ymin - self.font.line_size)):
            # If the unit won't fit on this page as a whole, but will fit on a new page,
            # then push whole paragraph onto next page
            self.session._add_page(self.text)
        else:
            # Split up the unit into lines, and write them one by one
            self.line_index = 0
            for line in self.line_array[:-1]:
                if self.stale_page:
                    #  _text has added a new page, and forwarded remaining lines.
                    break
                self._set_justification(line)
                self._text(line)
                self.line_index += 1
                self._newline()
            if not self.stale_page:
                line = self.line_array[-1]
                self._set_justification(line)
                self._text(line)

    def _test_x_fit(self, value=None):
        if value is None:
            if self.text != '' and self.text is not None:
                test = self.cursor.x_fit(self.font._string_width(self.text))
            else:
                test = True
        else:
            test = self.cursor.x_fit(self.font._string_width(value))
        return test

    def _split_into_lines(self, text):
        test_cursor = self.cursor.copy()  # Test cursor
        text_array = re.split('(\s+)', text)
        myline = ''
        line_array = []
        for word in text_array:
            segment = myline + ' ' + word
            if test_cursor.x_fit(self.font._string_width(segment)) is False:
                line_array.append(myline)
                myline = word
                test_cursor.x_reset()
            else:
                if myline == '':
                    myline = word
                else:
                    myline += '%s' % word
        line_array.append(myline)
        return line_array

    def _text_to_string(self, txt):
        txt = self._escape(txt)
        txt = "(%s)" % txt
        return str(txt)

    @staticmethod
    def _escape(text):
        for i,j in [("\\","\\\\"),(")","\\)"),("(", "\\(")]:
            text = text.replace(i, j)
        return text

    def _underline(self):
        # Underline text
        up = self.font.underline_position
        ut = self.font.underline_thickness
        w = self.font._string_width(self.text)
        s = '%.2f %.2f %.2f %.2f re f' % (self.cursor.x,
            self.cursor.y_prime - up, w, ut)
        return s

    def _newline(self):
        if self.double_spacing is not None:
            self.cursor.y_plus(self.font.line_size * self.double_spacing)
        self.cursor.y_plus(self.font.line_size)
        self.cursor.x_reset()

    def _text_transform(self, a, b, c, d, e, f):
        i, j, k, l, m, n = getattr(self, '_currentMatrix', (1., 0., 0., 1., 0., 0.))
        # i j 0    a b 0    i*a + j*c    i*b + j*d    i*0+j*0
        # k l 0 X  c d 0  = k*a + l*c    k*b + l*d    k*0+l*0
        # m n 1    e f 1    m*a + n*c+e  m*b + n*d+f

        a1, b1, c1, d1, e1, f1 = (i * a + j * c, i * b + j * d,
                                  k * a + l * c, k * b + l * d,
                                  m * a + n * c + e, m * b + n * d + f)
        self._textMatrix = '%.2f %.2f %.2f %.2f %.2f %.2f Tm' % (a1, b1, c1, d1, e1, f1)
        #print self._textMatrix
        self._currentMatrix = (a1, b1, c1, d1, e1, f1)

    def text_rotate(self, theta):
        c = cos(theta * pi / 180)
        s = sin(theta * pi / 180)
        self._text_transform(c, s, -s, c, 0., 0.)

    def text_scale(self, x, y):
        self._text_transform(x, 0, 0, y, 0, 0)

    def text_position(self, x, y):
        self._text_transform(1., 0., 0., 1., x, y)

    def text_skew(self, alpha, beta):
        tan_alpha = tan(alpha * pi / 180)
        tan_beta = tan(beta * pi / 180)
        self._text_transform(1, tan_alpha, tan_beta, 1, 0, 0)


text:
<?php

namespace Stalker\Lib\RESTAPI\v2;

class RESTApiVideoFavoriteDocument extends RESTApiDocument
{
    private $fav_id;
    private $parent;

    public function __construct(RESTApiResourceVideoFavorites $parent, array $params){
        parent::__construct();

        if (empty($params)){
            return;
        }

        $this->parent = $parent;

        $this->fav_id = (int) $params[0];
    }

    public function delete(RESTApiRequest $request){

        $user_id = $this->parent->getUserId();

        $fav = $this->parent->manager->getFavByUid($user_id);
        $fav = array_values($fav);

        $idx = array_search($this->fav_id, $fav);

        if ($idx === false){
            return false;
        }

        unset($fav[$idx]);

        $fav = array_values($fav);

        return (bool) $this->parent->manager->saveFav($fav, $user_id);
    }
}


text:
[![Build Status](https://david-dm.org/gravebot/gravebot.svg)](https://david-dm.org/gravebot/gravebot)
[![Build Status](https://travis-ci.org/Gravebot/Gravebot.svg?branch=master)](https://travis-ci.org/Gravebot/Gravebot)
[![Coverage Status](https://img.shields.io/coveralls/Gravebot/Gravebot/master.svg)](https://coveralls.io/github/Gravebot/Gravebot?branch=master)

[![Translations](https://img.shields.io/badge/Translations-Transifex-135d91.svg)](https://www.transifex.com/gravebot/gravebot/)
[![Discord](https://discordapp.com/api/guilds/128598463947472897/widget.png?style=banner)](https://discord.gg/0iXEgtjdHgkpdsVr)
## About

A fantastic, helpful, and fun [Discord](https://discordapp.com/) chat bot! Gravebot comes with a bunch of cool and powerful commands for both Discord and games!

## [Changelog](CHANGELOG.md)

## How to use
#### Invitation
The easiest way to set this bot up on your server is to invite it to your Discord server, It is currently hosted 24/7 and will always get the newest features first.

In order to do that, just [click here](https://discordapp.com/oauth2/authorize?&client_id=170664340968570880&scope=bot&permissions=268561430) and choose a server. You need to have **Manage Server** permission on that server. You may remove some of the permissions if you wish, but be warned it may break current and upcoming features.

If you want to give the bot a first try, you may do that in the [Gravebot's Lair](https://discord.gg/0iXEgtjdHgkpdsVr) Discord server.

If you have any questions, feedback or want to request features, you may also do that by leaving a message in [Gravebot's Lair](https://discord.gg/0iXEgtjdHgkpdsVr), private messaging Gravestorm or Zalik, as well as opening an [issue on Github](https://github.com/Gravebot/Gravebot/issues/new).

For self hosting, click [here](#localconfig).

## Commands
#### Help:
- `!help fun` - List of fun commands
- `!help useful` - List of useful commands
- `!help info` - List of information commands
- `!help games` - List of game commands
- `!help other` - List of other commands
- `!help all` - List all available commands in private chat
- `!memelist` - List of meme names for the `!meme` command
- `!setlanguage` - Set all help text to respond in a specified language

#### Fun:
- `!8ball` *question* - Answers the question
- `!animals` - Get various animal pictures
- `!cat` bomb *count* - Bombs chat with adorable cats
- `!pug` bomb *count* - Bombs chat with adorable pugs
- `!snake` bomb *count* - Bombs chat with adorable snakes
- `!chat` *text* - Chats with you
- `!coin` - Flips a coin
- `!comics` - Get a random comic from a bunch of different artists
- `!decide` *something* **or** *something...* - Decides between given words
- `!drama` *number* - Responds with a drama image, if no number is written, a random one
- `!emoji` *number* - Responds with an emoji copypasta, if no number is written, a random one
- `!meme` *meme name "top text" "bottom text"* -  Creates a meme with the given meme name and text
- `!quote` *number* - Responds with a quote, if no number is written, a random one
- `!robohash` - Get robot and monster images
- `!monster` - Get your personal monster
- `!robot` - Get your personal robot
- `!robothead` - Get your personal robot head
- `!roll` *times sides* - Rolls the dice a number of times with a number of sides, see `!random` for advanced generators
- `!translate` - Translate text in funny ways
- `!leet` *sentence* - 1337ifies the sentence
- `!snoop` *sentence* - Snoopifies tha sentence
- `!yoda` *sentence* - Yodaifies the sentence

#### Useful:
- `!ddg` *search terms* - Search the web, can also calculate and convert. Search other websites by appending its shortening (e.g. `!ddg !yt Hello`) See <https://duckduckgo.com/bang> for a list.
- `!gif` *gif tags* - Gets a gif from Giphy or Popkey matching the given tags (Use `!giphy` or `!popkey` to search the specific sites)
- `!join` - Shows a link that can be used to invite Gravebot to your server
- `!random` - Generate truly random numbers and strings
- `!fraction` *amount* *decimal places* *replace(optional)* - Generate a number of random real numbers between 0 and 1 with set decimal places, write **replace** at the end to disable duplicates (e.g. `!fraction 1 5 replace`)
- `!gaussian` *amount* *mean* *deviation* *significant digits* - Generate a number of random numbers from a Gaussian distribution (e.g. `!gaussian 1 50 10 5`)
- `!integer` *amount* *min* *max* *replace(optional)* - Generate a number of random integers between min and max, write **replace** at the end to disable duplicates (e.g. `!integer 2 1 50 replace`)
- `!string` *amount* *length* *charset(optional)* *replace(optional)* - Generate a number of random strings of a given length, can also input your own charset (default is the alphabet), as well as write **replace** at the end to disable duplicates. (e.g. `!string 1 10 abc123 replace`)
- `!unshorten` *url* - Unshortens a shortened link
- `!urban` *search terms* - Returns the summary of the first matching search result from Urban Dictionary
- `!videocall` *__Optional__ @username* - Start a one click video call or screenshare directly on Appear.in. Mention users to make it private.
- `!wiki` *search terms* - Returns the summary of the first matching search result from Wikipedia
- `!wolfram` *query* - Query Wolfram Alpha for almost anything
- `!youtube` *video tags* - Gets a video from Youtube matching the given tags

#### Information:
- `!avatar` *username* - Responds with your avatar, unless a username is specified
- `!channelinfo` *channelname* - Gives information about this channel, unless a channelname is specified
- `!ping` - Pong! Check Gravebot's pulse
- `!serverinfo` *servername* - Gives information about this server, unless a servername is specified
- `!servers` - Lists how many servers, channels and users the bot is connected to
- `!uptime` - Shows how long the bot has been online
- `!userinfo` *username* - Gives information about this user, unless a username is specified
- `!version` - Get information on the latest version of Gravebot

#### Games:

**Dota2**
- `!dota2` - Help
- `!dota2 best` *position* - Get the top 10 Heroes for a specific position
- `!dota2 build` *hero-name* - Get the most popular build for a Hero
- `!dota2 counters` *hero-name* - Get the top 10 counters for a Hero
- `!dota2 impact` - Get the top 10 Heroes with the biggest impact
- `!dota2 items` *hero-name* - Get the top 10 most used items for a Hero

**League of Legends**
- `!lol` - Help
- `!lol bans` - Get the top 10 most common bans
- `!lol best` *position* - Get the top 10 best champs for a position
- `!lol counters` *champ-name position* - Get the top 10 counters for a Champion and Position
- `!lol items` *champ-name position* - Get the highest win item sets for a Champion and Position
- `!lol match` *region summoner-name* - Get rank, champ, winrate, and games for all players in a __current__ match.
- `!lol skills` *champ-name position* - Get the highest win skills for a Champion and Position
- `!lol status` - Get the LoL Game and Client server status for all regions

**Overwatch**
- `!ow` - Help
- `!ow averages region battletag` - Player average stats
- `!ow time played region battletag` - Heroes most played
- `!ow games won region battletag` - Heroes with the most wins
- `!ow win percent region battletag` - Heroes with the highest win percentage
- `!ow eliminations region battletag` - Heroes with the most eliminations per life
- `!ow kill streak region battletag` - Heroes with the highest kill streak
- `!ow multikill region battletag` - Heroes with the most multikills
- `!ow objective kills region battletag` - Heroes with the most objective kills

#### Other:
- `!ayylmao`
- `!chillinmyb`
- `!endall`
- `!feelsbadman`
- `!feelsgoodman`
- `!jpeg`
- `!kappa`
- `!kappaHD`
- `!skeltal`
- `!starwars4`
- `!starwars5`

---

## Local Configuration

Rename `config.js.example` to `config.js` and fill in the required information. Note only variables with the `*Required*` comment are needed, everything else is optional.

## Local Installation
#### Windows:
**Warning**: Windows may have issues, even if all steps are done, sadly, we are not able to find the right dependencies for it (mostly regarding League of Legends and Wolfram commands), if you are familiar with coding, you can try messing around, either finding the right dependencies, or disabling the commands. If you are not familiar with coding, I would advise you to try out Linux, just install it alongside Windows and give it like 20GB of space, it will be plenty, and you will have a good experience. Feel free to ask for help regarding installation in Gravebot's Lair, just keep this in mind.

- Install [node.js](https://nodejs.org/en/) v4.0 or higher
- Install [python v2.7.3](https://www.python.org) ([32 bit](https://www.python.org/ftp/python/2.7.3/python-2.7.3.msi), [64 bit](https://www.python.org/ftp/python/2.7.3/python-2.7.3.amd64.msi))
- Install [Microsoft Visual Studio C++ Express](http://go.microsoft.com/?linkid=9816758)
- Install [node-gyp](https://github.com/nodejs/node-gyp) (open the [command prompt](http://windows.microsoft.com/en-us/windows/command-prompt-faq) and write `npm install -g node-gyp`)
- Install [redis](http://redis.io/download)
- Install [libxml2](https://www.zlatkovic.com/libxml.en.html) and add it to your PATH (note that this may not work and some extra tinkering may be needed, if you find a better way of installing it, please share it)
- If you are unable to install it, you may remove the wolfram-alpha dependency from package.json, and remove wolfram.js in the lib folder. That is the only command that uses libxml2.
- Run `npm-install.bat` to install the Node dependencies
- Run `launch.bat` to start the bot

#### Linux:
- Install [node.js](https://nodejs.org/en/) v4.0 or higher
- Install [gcc](https://gcc.gnu.org) and [libxml2](http://www.xmlsoft.org/) (open the [terminal](http://www.howtogeek.com/140679/beginner-geek-how-to-start-using-the-linux-terminal/) and write `sudo apt-get install build-essential libxml2-dev libicu52 libjpeg8 libfontconfig1 libwebp5 libssl1.0.0`)
- Install [node-gyp](https://github.com/nodejs/node-gyp) (open the [terminal](http://www.howtogeek.com/140679/beginner-geek-how-to-start-using-the-linux-terminal/) and write `sudo npm install -g node-gyp`)
- Install [redis](http://redis.io/download)
- [cd](https://en.wikipedia.org/wiki/Cd_%28command%29) to the root directory and run `npm install`
- Run `npm start`

## Deployment
#### Heroku

Gravebot comes setup and ready for Heroku.

1. Setup your configuration in Heroku's environment variables.
2. Activate multi buildpack. `heroku buildpacks:set https://github.com/ddollar/heroku-buildpack-multi.git`
3. Push the source code.

#### Docker

Master branch is built and pushed to our Docker image. You can pull the latest from [here](https://hub.docker.com/r/gravebot/gravebot/).

## Updating

Updating Gravebot is like any other NodeJS app. Just run `git pull && npm install`.

---

## Feature Requests

Have a feature in mind? We'd love to hear about it. Feel free to [open an issue](https://github.com/Gravebot/Gravebot/issues/new) and let us know.

## Contribute

Want to contribute to Gravebot? That's great! Be sure to check out the [CONTRIBUTE.md](CONTRIBUTE.md) doc for more information on how.

## Contributors

- Gravestorm  *(Maintainer)* - [@Gravestorm](https://github.com/Gravestorm)
- Dustin Blackman *(Maintainer)* - [@dustinblackman](https://github.com/dustinblackman)

## [License](LICENSE)


text:
<form>

                平台编号
                <input type="text" class="form-control" id="agency_no" ng-model="agency.agency_no" placeholder="平台编号">

<button type="button" ng-click="getAgencyNo()" class="btn btn-success">获取平台编号</button>

        平台名称
        <input type="text" class="form-control" id="agency_name" ng-model="agency.agency_name" placeholder="平台名称">

        超时时间(分钟),至少1分钟
        <input type="text" class="form-control" id="expire_age" ng-model="agency.expire_age" placeholder="超时时间">

        平台密钥
        <input type="text" class="form-control" id="agency_key" ng-model="agency.agency_key" placeholder="平台密钥">

<button type="button" ng-click="checkAgency()" class="btn btn-success">保存</button>

</form>


text:
package org.apache.carbondata.examples

import java.io.File
import java.text.SimpleDateFormat

import org.apache.spark.sql.SaveMode
import org.apache.spark.sql.SparkSession

import org.apache.carbondata.core.constants.CarbonCommonConstants
import org.apache.carbondata.core.util.CarbonProperties

object DataUpdateDeleteExample {

  def main(args: Array[String]) {

    // for local files
    val rootPath = new File(this.getClass.getResource("/").getPath
      + "../../../..").getCanonicalPath
    // for hdfs files
    // var rootPath = "hdfs://hdfs-host/carbon"

    var storeLocation = s"$rootPath/examples/spark2/target/store"
    var warehouse = s"$rootPath/examples/spark2/target/warehouse"
    var metastoredb = s"$rootPath/examples/spark2/target"

    import org.apache.spark.sql.CarbonSession._
    val spark = SparkSession
      .builder()
      .master("local")
      .appName("DataUpdateDeleteExample")
      .config("spark.sql.warehouse.dir", warehouse)
      .config("spark.driver.host", "localhost")
      .config("spark.sql.crossJoin.enabled", "true")
      .getOrCreateCarbonSession(storeLocation, metastoredb)
    spark.sparkContext.setLogLevel("WARN")

    // Specify date format based on raw data
    CarbonProperties.getInstance()
      .addProperty(CarbonCommonConstants.CARBON_DATE_FORMAT, "yyyy-MM-dd")

    import spark.implicits._
    // Drop table
    spark.sql("DROP TABLE IF EXISTS t3")
    spark.sql("DROP TABLE IF EXISTS t5")

     // Simulate data and write to table t3
    var sdf = new SimpleDateFormat("yyyy-MM-dd")
    var df = spark.sparkContext.parallelize(1 to 10)
      .map(x => (x, new java.sql.Date(sdf.parse("2015-07-" + (x % 10 + 10)).getTime),
        "china", "aaa" + x, "phone" + 555 * x, "ASD" + (60000 + x), 14999 + x))
      .toDF("t3_id", "t3_date", "t3_country", "t3_name",
          "t3_phonetype", "t3_serialname", "t3_salary")
    df.write
      .format("carbondata")
      .option("tableName", "t3")
      .option("tempCSV", "true")
      .option("compress", "true")
      .mode(SaveMode.Overwrite)
      .save()

    // Simulate data and write to table t5
    df = spark.sparkContext.parallelize(1 to 10)
      .map(x => (x, new java.sql.Date(sdf.parse("2017-07-" + (x % 20 + 1)).getTime),
        "usa", "bbb" + x, "phone" + 100 * x, "ASD" + (1000 * x - x), 25000 + x))
      .toDF("t5_id", "t5_date", "t5_country", "t5_name",
          "t5_phonetype", "t5_serialname", "t5_salary")
    df.write
      .format("carbondata")
      .option("tableName", "t5")
      .option("tempCSV", "true")
      .option("compress", "true")
      .mode(SaveMode.Overwrite)
      .save()
    spark.sql("""
           SELECT * FROM t3 ORDER BY t3_id
           """).show()
    spark.sql("""
           SELECT * FROM t5 ORDER BY t5_id
           """).show()

    // 1.Update data with simple SET
    // Update data where salary < 15003
    val dateStr = "2018-08-08"
    spark.sql(s"""
           UPDATE t3 SET (t3_date, t3_country) = ('$dateStr', 'india') WHERE t3_salary < 15003
           """).show()
    // Query data again after the above update
    spark.sql("""
           SELECT * FROM t3 ORDER BY t3_id
           """).show()

    spark.sql("""
           UPDATE t3 SET (t3_salary) = (t3_salary + 9) WHERE t3_name = 'aaa1'
           """).show()
    // Query data again after the above update
    spark.sql("""
           SELECT * FROM t3 ORDER BY t3_id
           """).show()

    // 2.Update data with subquery result SET
    spark.sql("""
         UPDATE t3
         SET (t3_country, t3_name) = (SELECT t5_country, t5_name FROM t5 WHERE t5_id = 5)
         WHERE t3_id < 5""").show()
    spark.sql("""
         UPDATE t3
         SET (t3_date, t3_serialname, t3_salary) =
         (SELECT '2099-09-09', t5_serialname, '9999' FROM t5 WHERE t5_id = 5)
         WHERE t3_id < 5""").show()

    // Query data again after the above update
    spark.sql("""
           SELECT * FROM t3 ORDER BY t3_id
           """).show()

    // 3.Update data with join query result SET
    spark.sql("""
         UPDATE t3
         SET (t3_country, t3_salary) =
         (SELECT t5_country, t5_salary FROM t5 FULL JOIN t3 u
         WHERE u.t3_id = t5_id and t5_id=6) WHERE t3_id >6""").show()

    // Query data again after the above update
    spark.sql("""
           SELECT * FROM t3 ORDER BY t3_id
           """).show()

    // 4.Delete data where salary > 15005
    spark.sql("""
           DELETE FROM t3 WHERE t3_salary > 15005
           """).show()

    // Query data again after delete data
    spark.sql("""
           SELECT * FROM t3 ORDER BY t3_id
           """).show()

    // 5.Delete data WHERE id in (1, 2, $key)
    var key = 3
    spark.sql(s"""
           DELETE FROM t3 WHERE t3_id in (1, 2, $key)
           """).show()

    // Query data again after delete data
    spark.sql("""
           SELECT * FROM t3 ORDER BY t3_id
           """).show()

    // Drop table
    spark.sql("DROP TABLE IF EXISTS t3")
    spark.sql("DROP TABLE IF EXISTS t5")

    spark.stop()
  }

}


text:
namespace web {
class NavigationItem;
}

@class CRWNavigationItemStorage;

namespace sessions {
class SerializedNavigationEntry;

// Provides methods to convert between SerializedNavigationEntry and //ios/web
// classes.
class IOSSerializedNavigationBuilder {
 public:
  // Construct a SerializedNavigationEntry for a particular index from the given
  // NavigationItem.
  static SerializedNavigationEntry FromNavigationItem(
      int index, const web::NavigationItem& item);

  // Construct a SerializedNavigationEntry for a particular index from the given
  // CRWNavigationItemStorage.
  static SerializedNavigationEntry FromNavigationStorageItem(
      int index,
      CRWNavigationItemStorage* item);

  // Convert the given SerializedNavigationEntry into a NavigationItem. The
  // NavigationItem will have a transition type of
  // PAGE_TRANSITION_RELOAD and a new unique ID.
  static std::unique_ptr<web::NavigationItem> ToNavigationItem(
      const SerializedNavigationEntry* navigation);

  // Converts a set of SerializedNavigationEntrys into a list of
  // NavigationItems with sequential page IDs.
  static std::vector<std::unique_ptr<web::NavigationItem>> ToNavigationItems(
      const std::vector<SerializedNavigationEntry>& navigations);
};

}  // namespace sessions

#endif  // COMPONENTS_SESSIONS_IOS_IOS_SERIALIZED_NAVIGATION_BUILDER_H_


text:
namespace Hoverfly.Core.Resources
{
    using Model;

    /// <summary>
    /// ISimulationSource is used for load hoverfly simulation data.
    /// </summary>
    public interface ISimulationSource
    {
        /// <summary>
        /// Gets a simulation data from the ResourcePath.
        /// </summary>
        /// <returns>Returns <see cref="Simulation"/>with the simulation data.</returns>
        Simulation GetSimulation();
    }
}


text:
define(function(require){
  var d = require('./d1')
  return d
})


text:
`cloudflare-dynamic-dns2` is a Node.js module that updates a Cloudflare DNS address record with an
IP address. See [CHANGES.md](CHANGES.md) for difference from original, and reason for this fork.

## Command-line program ##

### Installation of command-line program ###

```bash
npm install -g cloudflare-dynamic-dns2
```

### Usage via cli ###

Create a `/etc/cloudflare/config.json` for example like this:

```json
{
  "email": "hugo@josefson.org",
  "key": "17b8137B813b585c",
  "domain": "hugojosefson.com",
  "subdomains": [
    "www",
    "@"
  ]
}
```

The properties are described for the API below.

Run the built-in command-line tool:

```bash
update-cloudflare-dns
```

If the program exits with exit code `0` and prints nothing, all went well. Otherwise it will print
whatever error occurred and exit with a non-zero exit code.

## API ##

### Installation for API use ##

```bash
npm install --save cloudflare-dynamic-dns2
```

### Usage via API

The `cloudflare-dynamic-dns2` module is a function which takes one argument, an options object, with
the following properties:

* `email` - the email associated with your Cloudflare account (string, mandatory)
* `key` - the API key associated with your Cloudflare account (string, mandatory)
* `domain` - the domain corresponding to the DNS address record you wish to change (string, mandatory)
* `subdomain` - the subdomain corresponding to the DNS address record you wish to change; `"@"` to
update the apex record (string, mandatory)
* `ip` - the new IP address for the address record; if no IP address is specified, the external IP
address of the current machine is used (string, optional)

The function returns a `Promise` which resolves to the actual IP address if the request was
successful, or rejects with an `Error` if it was not.

### Example ##

The following example illustrates the basic usage of `cloudflare-dynamic-dns2`, updating the A
record for `boo.example.com`:

```js
const cloudflareddns = require('cloudflare-dynamic-dns2');

// Use external IP address of current machine
cloudflareddns({
    email: 'jsmith@example.com',
    key: 'abcde12235',
    domain: 'example.com',
    subdomain: 'boo'
}).then(
    ip => console.log(`Updated boo.example.com to ${ip}`),
    reason => console.error(reason)
);
```

## License ##

`cloudflare-dynamic-dns2` is licensed under the [MIT license](http://opensource.org/licenses/MIT). Please see the
`LICENSE.md` file for more information.


text:
#include "GouraudMaterial.hpp"
#include "GouraudShaderProgram.hpp"

using namespace Crimild;
using namespace Crimild::GL3;

GouraudMaterial::GouraudMaterial( void )
{
	ShaderProgramPtr program( new GouraudShaderProgram() );
	setProgram( program );
}

GouraudMaterial::~GouraudMaterial( void )
{

}


text:
package services

import java.io.File

import scala.concurrent.Await
import scala.concurrent.ExecutionContext
import scala.concurrent.duration.DurationInt
import scala.util.Try

import org.junit.Assert.assertTrue
import org.junit.runner.RunWith
import org.scalatest.FlatSpec
import org.scalatest.Matchers
import org.scalatest.concurrent.ScalaFutures
import org.scalatest.junit.JUnitRunner

import com.jayway.restassured.RestAssured

import akka.actor.ActorSystem
import akka.http.scaladsl.Http
import akka.http.scaladsl.model.HttpRequest
import akka.http.scaladsl.unmarshalling.Unmarshal
import akka.stream.ActorMaterializer
import akka.stream.Materializer
import common.TestUtils
import common.TestUtils.RunResult
import common.WhiskProperties
import common.WskActorSystem
import common.WskTestHelpers
import akka.http.scaladsl.model.StatusCodes

/**
 * Basic tests to check that a Whisk installation is healthy in that all
 * components respond to a heartbeat ping
 */
object PingTests {
    val bin: File = WhiskProperties.getFileRelativeToWhiskHome("tools/health")

    def isAliveScript(name: String, whiskPropertyFile: String): RunResult = {
        TestUtils.runCmd(TestUtils.SUCCESS_EXIT, bin, WhiskProperties.python, "isAlive", "-d", whiskPropertyFile, "--wait", "30", name)
    }

    def ping(host: String, port: Int)(implicit actorSystem: ActorSystem, ec: ExecutionContext, materializer: Materializer) = {
        val response = Try { Await.result(Http().singleRequest(HttpRequest(uri = s"http://$host:$port/ping")), 10.seconds) }.toOption

        response.map { res =>
            (res.status, Await.result(Unmarshal(res).to[String], 10.seconds))
        }
    }
}

@RunWith(classOf[JUnitRunner])
class PingTests extends FlatSpec
    with Matchers
    with WskTestHelpers
    with ScalaFutures
    with WskActorSystem {

    implicit val materializer = ActorMaterializer()

    /**
     * Check that the docker REST interface at endpoint is up. envVar is the
     * environment variable from which we obtain.
     */
    def pingDocker(envVar: String, endpoint: String): Unit = {
        assertTrue(envVar + " not set", endpoint != null)
        assertTrue(envVar + " not set", endpoint.length > 0)

        val response: String = RestAssured.given.port(4243).baseUri("http://" + endpoint).get("/info").body.asString
        println("GET /info")
        println(response)
        assertTrue(response.contains("Containers"))
    }

    behavior of "PingTest"

    it should "check that the main docker endpoint is functioning" in {
        pingDocker("main.docker.endpoint", WhiskProperties.getMainDockerEndpoint)
    }

    it should "Check the kafka docker endpoint is functioning" in {
        pingDocker("kafka.docker.endpoint", WhiskProperties.getKafkaDockerEndpoint)
    }

    it should "check that the zookeeper endpoint is up and running" in {
        PingTests.isAliveScript("zookeeper", WhiskProperties.getFileRelativeToWhiskHome(".").getAbsolutePath)
    }

    it should "Check that the invoker endpoints are up and running" in {
        val basePort = WhiskProperties.getProperty("invoker.hosts.baseport").toInt
        val invokers = WhiskProperties.getInvokerHosts.zipWithIndex.map {
            case (invoker, instance) =>
                val res = PingTests.ping(invoker, basePort + instance)

                res shouldBe defined
                res.get._1 shouldBe StatusCodes.OK
                res.get._2 shouldBe "pong"
        }
    }

    it should "check that the controller endpoint is up and running" in {
        val basePort = WhiskProperties.getControllerBasePort()
        val controllers = WhiskProperties.getControllerHosts().split(",").zipWithIndex.map {
            case (controller, instance) =>
                val res = PingTests.ping(controller, basePort + instance)

                res shouldBe defined
                res.get._1 shouldBe StatusCodes.OK
                res.get._2 shouldBe "pong"
        }
    }
}


text:
ACCEPTED

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

#### Published in
Mycol. Res. 100(4): 500 (1996)

#### Original name
Bicornispora Checa, Barrasa, M.N. Blanco & A.T. Martínez

### Remarks
null


text:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class UIPerkMenu : MonoBehaviour {

	[HideInInspector] public bool isOn=false;

	//private bool showPlayerPoint=true;	//this is for the setup scene where dislay of player point is not required
	//public void SetShowPlayerPoint(bool flag){ showPlayerPoint=flag; } //UpdatePoint(); }

	// Use this for initialization
	void Start () {

	}

	// Update is called once per frame
	void Update () {

	}

	public void OnPerkmenu(){
		isOn=!isOn;
	}

	private int selectedID=0;

	private Vector2 scrollPosition;
	public void DrawPerkMenu(){ DrawPerkMenu(false); }
	public void DrawPerkMenu(bool preBattle){
		//GUI.depth = 0;
		GUIStyle style=new GUIStyle();
		style.fontSize=20;	style.fontStyle=FontStyle.Bold;	style.normal.textColor=UI.colorH;	style.alignment=TextAnchor.UpperCenter;

		List<PerkTB> perkList=PerkManagerTB.GetAllPerks();
		PerkTB perk=null;

		int winWidth=595;
		int winHeight=470;

		int startX=Screen.width/2-winWidth/2;
		int startY=Screen.height/2-winHeight/2;

		int rowLimit=8;

		int row=0;		int column=0;
		for(int i=0; i<3; i++) GUI.Box(new Rect(startX, startY, winWidth, winHeight), "");

		GUI.Label(new Rect(startX, startY+10, winWidth, winHeight), "Perk Menu", style);

		int point=0;
		if(!PerkManagerTB.UsePersistentData()) point=PerkManagerTB.GetPoint();
		else point=GlobalStatsTB.GetPlayerPoint();

		style.fontSize=14;	style.fontStyle=FontStyle.Bold;	style.normal.textColor=UI.colorH;	style.alignment=TextAnchor.UpperLeft;
		if(!preBattle) GUI.Label(new Rect(startX+10, startY+5, 150, 25), "Point: "+point, style);
		GUI.Label(new Rect(startX+10, startY+20, 150, 25), "PerkPoint: "+PerkManagerTB.perkPoint, style);

		if(!preBattle){
			if(GUI.Button(new Rect(startX+winWidth-35, startY+5, 30, 30), "X", UI.buttonStyle)){
				OnPerkmenu();
			}
		}

		startX+=10;	startY+=40;

		int scrollLength=(int)(Mathf.Ceil(perkList.Count/8+1)*70);
		if(perkList.Count%rowLimit==0) scrollLength-=70;
		Rect viewRect=new Rect(startX, startY, winWidth-20, 280);
		Rect scrollRect=new Rect(startX, startY, winWidth-50, scrollLength);
		GUI.Box(viewRect, "");
		scrollPosition = GUI.BeginScrollView (viewRect, scrollPosition, scrollRect);

			startX+=5;	startY+=5;

			for(int ID=0; ID<perkList.Count; ID++){
				perk=perkList[ID];
				Texture icon=null;
				if(perk.unlocked) icon=perk.iconUnlocked;
				else{
					if(perk.IsAvailable()==0) icon=perk.icon;
					else icon=perk.iconUnavailable;
				}

				if(selectedID==ID){
					if(GUI.Button(new Rect(startX+column*70-3, startY+row*70-3, 66, 66), icon)) selectedID=ID;
				}
				else{
					if(GUI.Button(new Rect(startX+column*70, startY+row*70, 60, 60), icon)) selectedID=ID;
				}

				column+=1;
				if(column==8){
					row+=1; column=0;
				}
			}

		GUI.EndScrollView();

		startY+=285;
		GUI.Box(new Rect(startX-5, startY, winWidth-20, 130), "");

		perk=perkList[selectedID];
		int perkAvai=perk.IsAvailable();

		string status="";
		if(perk.unlocked) status=" (Unlocked)";
		else if(perkAvai!=0) status=" (Unavailable)";

		style.fontSize=17;	style.alignment=TextAnchor.UpperLeft;	style.normal.textColor=UI.colorH;
		GUI.Label(new Rect(startX, startY+=5, winWidth-30, 30), perk.name+status, style);

		style.fontSize=17;	style.alignment=TextAnchor.UpperRight;	style.normal.textColor=UI.colorH;
		GUI.Label(new Rect(startX, startY+=5, winWidth-30, 30), "Cost: "+perk.cost, style);

		style.alignment=TextAnchor.UpperLeft;	style.normal.textColor=UI.colorN; style.wordWrap=true;
		GUI.Label(new Rect(startX, startY+=25, winWidth-30, 30), perk.desp, style);

		string requireTxt="";

		//inssufficient points
		if(perkAvai==1){
			requireTxt="Require "+perk.cost+"point";
		}
		//min perk point not reach
		else if(perkAvai==2){
			requireTxt="Require "+perk.pointReq+" perk points";
		}
		//pre-req perk not unlocked
		else if(perkAvai==3){
			string text="Require: ";

			List<int> list=perk.prereq;
			int i=0;
			foreach(int ID in list){
				if(i>0) text+=", ";
				text+=PerkManagerTB.GetAllPerks()[ID].name;
				i+=1;
			}

			requireTxt=text;
		}

		style.fontSize=14;	style.alignment=TextAnchor.UpperLeft;	style.normal.textColor=Color.red; style.wordWrap=false;
		GUI.Label(new Rect(startX, startY+75, winWidth-30, 30), requireTxt, style);

		if(!perk.unlocked && perkAvai==0){
			if(GUI.Button(new Rect(startX+winWidth-30-120, startY+=60, 120, 30), "Unlock", UI.buttonStyle)){
				OnUnlockPerkButton(perk);
			}
		}
	}

	int GetPlayerPoint(){
		//~ if(UINGUISetup.IsSetupScene()){
			//~ return UINGUISetup.playerPoint;
		//~ }
		//~ else{
			if(!PerkManagerTB.UsePersistentData())  return PerkManagerTB.GetPoint();
			else return GlobalStatsTB.GetPlayerPoint();
		//~ }
	}

	public void OnUnlockPerkButton(PerkTB perk){
		if(perk.cost>GetPlayerPoint()){
			Debug.Log("Insufficient Points!");
			//UINGUISetup.DisplayMessage("Insufficient Points!");
			return;
		}

		if(PerkManagerTB.UnlockPerk(selectedID)){
			Debug.Log(perk.name+" has been unlocked");
			//UINGUISetup.DisplayMessage(selectedPerk.name+" has been unlocked");
		}
	}

}


text:
<?php

declare(strict_types=1);

namespace Bernard\Command;

use Bernard\Message\PlainMessage;
use Bernard\Producer;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

class ProduceCommand extends \Symfony\Component\Console\Command\Command
{
    protected $producer;

    public function __construct(Producer $producer)
    {
        $this->producer = $producer;

        parent::__construct('bernard:produce');
    }

    /**
     * {@inheritdoc}
     */
    public function configure(): void
    {
        $this
            ->addOption('queue', null, InputOption::VALUE_OPTIONAL, 'Name of a queue to add this job to. By default the queue is guessed from the message name.', null)
            ->addArgument('name', InputArgument::REQUIRED, 'Name for the message eg. "ImportUsers".')
            ->addArgument('message', InputArgument::OPTIONAL, 'JSON encoded string that is used for message properties.')
        ;
    }

    /**
     * {@inheritdoc}
     */
    public function execute(InputInterface $input, OutputInterface $output): void
    {
        $name = $input->getArgument('name');
        $queue = $input->getOption('queue');
        $message = [];

        if ($input->getArgument('message')) {
            $message = json_decode($input->getArgument('message'), true);

            if (json_last_error()) {
                throw new \RuntimeException('Could not decode invalid JSON ['.json_last_error().']');
            }
        }

        $this->producer->produce(new PlainMessage($name, $message), $queue);
    }
}


text:
<?php
namespace Sosmol\Helpers;

use \Origin\Utilities\Bucket\Bucket;
use \Origin\Utilities\Bucket\Common;
use \Origin\Utilities\Settings;

/**
 * UserInput helper
 * Tidier way of making sure user input and request are secure
 * @package Sosmol\Helpers
 */

class UserInput {

    use Bucket, Common {
        Hash as data;
        Boolean as safe;
    }

    /**
     * UserInput constructor
     * @param $data array data we want to secure
     */

    public function __construct( $data ){

        $data = $this->Sanitise( $data );
        $safe = $this->CheckCSRF();

        $this->safe( $safe );

        if( $safe === true ){
            $this->data( $data );
        }

    }

    /**
     * Escape user input - we should only allow plain text
     * @param $data array HTTP Request data
     * @return array Escaped request data
     */

    private function Sanitise( $data ){

        // Escape all request items
        foreach( $data as $key => $value ){
            $data[$key] = htmlspecialchars( $value );
        }

        return $data;
    }

    /**
     * Check if the request might be a CSRF attempt
     * For more information, please see the 'Protecting REST Services' section of the
     * OWASP Cross-Site Request Forgery (CSRF) Prevention Cheat Sheet
     * @return bool true if the request is unlikely to be CSRF, false otherwise
     */

    private function CheckCSRF(){

        $headers = getallheaders();

        // Grab site url from hidden/config/settings.json
        $host = Settings::Get()->Value(['origin', 'sitehost']);

        // Has the resource been request with JS ?
        $jsrequest = $headers['X-Requested-With'] === 'XMLHttpRequest' ? true : false;

        // Is the request coming from our site ?
        // Parse URL is converting the origin/referer to hostname only
        $referer = parse_url($headers['Referer'], PHP_URL_HOST);
        $referer = $referer === $host ? true : false;

        $origin = parse_url($headers['Origin'], PHP_URL_HOST);
        $origin = $origin === $host ? true : false;

        return $jsrequest && $referer && $origin;

    }

}


text:
/*jslint browser: true, white: true */
/*global jQuery, define */
(function (factory) {
	"use strict";
	if (typeof define === "function" && define.amd) {
		// AMD. Register as an anonymous module.
		define(["jquery"], factory);
	} else if (typeof exports === "object") {
		// Node/CommonJS
		factory(require("jquery"));
	} else {
		// Browser globals
		factory(jQuery);
	}
}(function ($) {
	"use strict";
	// begin module jqdnr
	var namespace = ".jqGrid", mouseDown = "mousedown", mouseMove = "mousemove", mouseUp = "mouseup",
		getMouseCoordinates = function (e) {
			var orgEvent = e.originalEvent, touches = orgEvent.targetTouches;
			if (touches) {
				touches = touches[0];
				return { x: touches.pageX, y: touches.pageY };
			}
			return { x: e.pageX, y: e.pageY };
		},
		jqDnR = {
			drag: function (e) {
				var d = e.data, $mainDialog = d.e, dnrMainDialog = d.dnr, $alsoResize = d.ar, dnrAlsoResize = d.dnrAr,
					xy = getMouseCoordinates(e);
				if (dnrMainDialog.k === "move") {
					$mainDialog.css({
						left: dnrMainDialog.X + xy.x - dnrMainDialog.pX,
						top: dnrMainDialog.Y + xy.y - dnrMainDialog.pY
					});
				} else {
					$mainDialog.css({
						width: Math.max(xy.x - dnrMainDialog.pX + dnrMainDialog.W, 0),
						height: Math.max(xy.y - dnrMainDialog.pY + dnrMainDialog.H, 0)
					});
					if (dnrAlsoResize) {
						$alsoResize.css({
							width: Math.max(xy.x - dnrAlsoResize.pX + dnrAlsoResize.W, 0),
							height: Math.max(xy.y - dnrAlsoResize.pY + dnrAlsoResize.H, 0)
						});
					}
				}
				return false;
			},
			stop: function () {
				//$mainDialog.css("opacity", dnr.o);
				$(document).unbind(mouseMove, jqDnR.drag).unbind(mouseUp, jqDnR.stop);
			}
		},
		init = function ($this, handle, actionName, alsoResize) {
			return $this.each(function () {
				handle = handle ? $(handle, $this) : $this;
				handle.bind(mouseDown, { e: $this, k: actionName }, function (e) {
					var d = e.data, p = {}, $inputDatePicker, $mainDialog, dnrMainDialog, $alsoResize, dnrAlsoResize,
						getCssProp = function ($elem, propertyName) {
							return parseInt($elem.css(propertyName), 10) || false;
						},
						getMainCssProp = function (propertyName) {
							return getCssProp($mainDialog, propertyName);
						},
						getAlsoResizeCssProp = function (propertyName) {
							return getCssProp($alsoResize, propertyName);
						},
						xy = getMouseCoordinates(e),
						eventData;

					if ($(e.target).hasClass("ui-jqdialog-titlebar-close") || $(e.target).parent().hasClass("ui-jqdialog-titlebar-close")) {
						//$(e.target).click();
						return;
					}

					$mainDialog = d.e;
					$alsoResize = alsoResize ? $(alsoResize) : false;
					// attempt utilization of dimensions plugin to fix IE issues
					if ($mainDialog.css("position") !== "relative") {
						try {
							// ???? probably one want to GET position and save it in p ?
							// the current implementation use always p = {}
							// probably one mean some additional work together with Dimensions Plugin (dimensions.js)
							$mainDialog.position(p);
						} catch (ignore) { }
					}
					dnrMainDialog = {
						X: p.left || getMainCssProp("left") || 0,
						Y: p.top || getMainCssProp("top") || 0,
						W: getMainCssProp("width") || $mainDialog[0].scrollWidth || 0,
						H: getMainCssProp("height") || $mainDialog[0].scrollHeight || 0,
						pX: xy.x,
						pY: xy.y,
						k: d.k
						//o:$mainDialog.css("opacity")
					};
					// also resize
					if ($alsoResize && d.k !== "move") {
						dnrAlsoResize = {
							X: p.left || getAlsoResizeCssProp("left") || 0,
							Y: p.top || getAlsoResizeCssProp("top") || 0,
							W: $alsoResize[0].offsetWidth || getAlsoResizeCssProp("width") || 0,
							H: $alsoResize[0].offsetHeight || getAlsoResizeCssProp("height") || 0,
							pX: xy.x,
							pY: xy.y,
							k: d.k
						};
					} else {
						dnrAlsoResize = false;
					}
					//E.css({opacity:0.8});
					$inputDatePicker = $mainDialog.find("input.hasDatepicker");
					if ($inputDatePicker.length > 0) {
						try {
							$inputDatePicker.datepicker("hide");
						} catch (ignore) { }
					}
					eventData = {
						e: $mainDialog,
						dnr: dnrMainDialog,
						ar: $alsoResize,
						dnrAr: dnrAlsoResize
					};
					$(document).bind(mouseMove, eventData, jqDnR.drag);
					$(document).bind(mouseUp, eventData, jqDnR.stop);
					return false;
				});
			});
		};

	// navigator.maxTouchPoints == 2, navigator.msMaxTouchPoints
	// https://msdn.microsoft.com/en-us/library/ie/dn304886(v=vs.85).aspx
	if (window.PointerEvent) {
		mouseDown += namespace + " pointerdown" + namespace;
		mouseMove += namespace + " pointermove" + namespace;
		mouseUp += namespace + " pointerup" + namespace;
	} else if (window.MSPointerEvent) {
		mouseDown += namespace + " mspointerdown" + namespace;
		mouseMove += namespace + " mspointermove" + namespace;
		mouseUp += namespace + " mspointerup";
	} else {/*if (document.hasOwnProperty("ontouchend"))*/
		mouseDown += namespace + " touchstart" + namespace;
		mouseMove += namespace + " touchmove" + namespace;
		mouseUp += namespace + " touchend" + namespace;
	}

	$.jqDnR = jqDnR;

	$.fn.jqDrag = function (handle) {
		return init(this, handle, "move");
	};

	$.fn.jqResize = function (handle, alsoResize) {
		return init(this, handle, "resize", alsoResize);
	};
	// end module jqdnr
}));


text:
package org.megion.xapp.core.repository;

import java.util.List;

import javax.persistence.EntityManager;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.JoinType;
import javax.persistence.criteria.Root;

import org.megion.xapp.core.aop.annotation.MyLog;
import org.megion.xapp.core.entity.Member;
import org.megion.xapp.core.entity.User;
import org.megion.xapp.core.entity.User_;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class UserRepositoryImpl implements UserRepository {

	@Autowired
    private EntityManager em;

	@Override
	public List<User> findAllOrderedByUsername() {
		CriteriaBuilder cb = em.getCriteriaBuilder();
        CriteriaQuery<User> criteria = cb.createQuery(User.class);
        Root<User> member = criteria.from(User.class);
        criteria.select(member).orderBy(cb.asc(member.get("username")));
        return em.createQuery(criteria).getResultList();
	}

	@Override
	@MyLog
	public List<User> findAllWithRolesOrderedByUsername() {
		CriteriaBuilder cb = em.getCriteriaBuilder();
        CriteriaQuery<User> criteria = cb.createQuery(User.class);
        Root<User> userRoot = criteria.from(User.class);
        //SetJoin<User, Role> rolesJoin =  userRoot.join(User_.roles, JoinType.LEFT);
        userRoot.fetch(User_.roles, JoinType.LEFT);

        criteria.select(userRoot).orderBy(cb.asc(userRoot.get(User_.username))).distinct(true);
        return em.createQuery(criteria).getResultList();
	}

	@Override
	public User findById(Long id) {
		return em.find(User.class, id);
	}

}


text:
using System;
using Prism.Interfaces;

namespace AdventureWorks.Infrastructure.Tests.Mocks
{
    public class MockResourceLoader : IResourceLoader
    {
        public MockResourceLoader()
        {
            GetStringDelegate = s => s;
        }

        public Func<string, string> GetStringDelegate { get; set; }
        public string GetString(string resource)
        {
            return GetStringDelegate(resource);
        }
    }
}


text:
<?php

namespace Ajax\semantic\components;

use Ajax\JsUtils;

class Accordion extends SimpleSemExtComponent {

	public function __construct(JsUtils $js) {
		parent::__construct($js);
		$this->uiName="accordion";
	}

	/**
	 *
	 * @param string $value default : click
	 * @return $this
	 */
	public function setOn($value="click") {
		return $this->setParam("on", $value);
	}

	public function setExclusive($value=true) {
		return $this->setParam("exclusive", $value);
	}
}


text:
package uk.gov.prototype.vitruvius.listener;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.vertx.java.core.eventbus.Message;
import org.vertx.java.core.json.JsonObject;
import uk.gov.prototype.vitruvius.elasticsearch.RepositoryESOperations;

public class AggregationEventListener implements HandlerWithAddress<Message<JsonObject>> {

    private RepositoryESOperations repositoryESOperations;
    private static final Logger logger = LoggerFactory.getLogger(AggregationEventListener.class);

    public AggregationEventListener(RepositoryESOperations repositoryESOperations) {
        this.repositoryESOperations = repositoryESOperations;
    }

    @Override
    public void handle(Message<JsonObject> event) {
        logger.info("received message: " + event.body().getField("query"));
        event.reply(repositoryESOperations.aggregations(event.body().<String>getField("query")));
    }

    @Override
    public String handlerAddress() {
        return "vitruvius.aggregations";
    }
}


text:
package net.firejack.platform.service.content.broker.resource;

import net.firejack.platform.api.OPFEngine;
import net.firejack.platform.api.content.domain.FileInfo;
import net.firejack.platform.api.content.domain.ImageFileInfo;
import net.firejack.platform.api.content.model.ResourceType;
import net.firejack.platform.core.broker.ServiceBroker;
import net.firejack.platform.core.domain.NamedValues;
import net.firejack.platform.core.request.ServiceRequest;
import net.firejack.platform.core.response.ServiceResponse;
import net.firejack.platform.core.utils.ImageUtils;
import net.firejack.platform.core.utils.OpenFlame;
import net.firejack.platform.core.utils.SecurityHelper;
import net.firejack.platform.core.utils.StringUtils;
import net.firejack.platform.model.helper.FileHelper;
import net.firejack.platform.service.content.utils.TTLParser;
import net.firejack.platform.web.mina.annotations.ProgressComponent;
import net.firejack.platform.web.statistics.annotation.TrackDetails;
import org.apache.commons.io.IOUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.util.Date;

@Component
@TrackDetails
@ProgressComponent(upload = true)
public class UploadResourceFileBroker
		extends ServiceBroker<ServiceRequest<NamedValues<Object>>, ServiceResponse<FileInfo>> {

    public static final String PARAM_INPUT_STREAM = "inputStream";
    public static final String PARAM_FILENAME = "originalFilename";
    public static final String PARAM_RESOURCE_TYPE = "resourceType";
    public static final String PARAM_CUSTOM_TTL = "ttl";

	@Autowired
	private FileHelper helper;

	@Override
	public ServiceResponse<FileInfo> perform(ServiceRequest<NamedValues<Object>> request) throws Exception {
		InputStream inputStream = (InputStream) request.getData().get(PARAM_INPUT_STREAM);
		String originalFilename = (String) request.getData().get(PARAM_FILENAME);
		String type = (String) request.getData().get(PARAM_RESOURCE_TYPE);
		String ttlSValue = (String) request.getData().get(PARAM_CUSTOM_TTL);
		ResourceType resourceType = ResourceType.findByName(type);
		FileInfo fileInfo;

		Long uploadFileTime = new Date().getTime();
        if (StringUtils.isBlank(ttlSValue)) {
            long ttl = TTLParser.parseTTLValue(ttlSValue);
            if (ttl > 0) {//ttl - 10 min because fileCleaner deletes files that were created equal or more than 10 min ago.
                uploadFileTime = uploadFileTime + (ttl - 600000);
            }
        }
		String randomName = SecurityHelper.generateRandomSequence(16);
		String temporaryUploadFileName = randomName + "." + uploadFileTime;

		byte[] bytes = IOUtils.toByteArray(inputStream);
		OPFEngine.FileStoreService.upload(OpenFlame.FILESTORE_BASE,temporaryUploadFileName,new ByteArrayInputStream(bytes), helper.getTemp());

		if (ResourceType.IMAGE.equals(resourceType)) {
            try {
                Integer[] size = ImageUtils.getImageSize(bytes);
                fileInfo = new ImageFileInfo(temporaryUploadFileName, uploadFileTime, size[0], size[1]);
            } catch (Exception e) {
                logger.warn("Can't get image size. " + e.getMessage(), e);
                fileInfo = new FileInfo(temporaryUploadFileName, uploadFileTime);
            }
		} else {
			fileInfo = new FileInfo(temporaryUploadFileName, uploadFileTime);
		}
		fileInfo.setOrgFilename(originalFilename);

		return new ServiceResponse<FileInfo>(fileInfo, "File has uploaded successfully.", true);
	}

}


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

package com.azure.analytics.synapse.artifacts.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Query filter option for listing runs. */
@Fluent
public final class RunQueryFilter {
    /*
     * Parameter name to be used for filter. The allowed operands to query pipeline runs are PipelineName, RunStart,
     * RunEnd and Status; to query activity runs are ActivityName, ActivityRunStart, ActivityRunEnd, ActivityType and
     * Status, and to query trigger runs are TriggerName, TriggerRunTimestamp and Status.
     */
    @JsonProperty(value = "operand", required = true)
    private RunQueryFilterOperand operand;

    /*
     * Operator to be used for filter.
     */
    @JsonProperty(value = "operator", required = true)
    private RunQueryFilterOperator operator;

    /*
     * List of filter values.
     */
    @JsonProperty(value = "values", required = true)
    private List<String> values;

    /**
     * Get the operand property: Parameter name to be used for filter. The allowed operands to query pipeline runs are
     * PipelineName, RunStart, RunEnd and Status; to query activity runs are ActivityName, ActivityRunStart,
     * ActivityRunEnd, ActivityType and Status, and to query trigger runs are TriggerName, TriggerRunTimestamp and
     * Status.
     *
     * @return the operand value.
     */
    public RunQueryFilterOperand getOperand() {
        return this.operand;
    }

    /**
     * Set the operand property: Parameter name to be used for filter. The allowed operands to query pipeline runs are
     * PipelineName, RunStart, RunEnd and Status; to query activity runs are ActivityName, ActivityRunStart,
     * ActivityRunEnd, ActivityType and Status, and to query trigger runs are TriggerName, TriggerRunTimestamp and
     * Status.
     *
     * @param operand the operand value to set.
     * @return the RunQueryFilter object itself.
     */
    public RunQueryFilter setOperand(RunQueryFilterOperand operand) {
        this.operand = operand;
        return this;
    }

    /**
     * Get the operator property: Operator to be used for filter.
     *
     * @return the operator value.
     */
    public RunQueryFilterOperator getOperator() {
        return this.operator;
    }

    /**
     * Set the operator property: Operator to be used for filter.
     *
     * @param operator the operator value to set.
     * @return the RunQueryFilter object itself.
     */
    public RunQueryFilter setOperator(RunQueryFilterOperator operator) {
        this.operator = operator;
        return this;
    }

    /**
     * Get the values property: List of filter values.
     *
     * @return the values value.
     */
    public List<String> getValues() {
        return this.values;
    }

    /**
     * Set the values property: List of filter values.
     *
     * @param values the values value to set.
     * @return the RunQueryFilter object itself.
     */
    public RunQueryFilter setValues(List<String> values) {
        this.values = values;
        return this;
    }
}


text:
@interface AppController : NSObject <UIAccelerometerDelegate, UIAlertViewDelegate, UITextFieldDelegate, UIApplicationDelegate>
{
	// main UIWindow
	// The OpenGL view will be a attached to this UIWindow
    UIWindow *window;
}

// Make the main UIWindow a property
@property (nonatomic, retain) UIWindow *window;
@end

// HelloEvents Layer
@interface HelloEvents : CCLayer
{
}
@end


text:
from twisted.internet import reactor
from twisted.internet.protocol import Factory, Protocol
from twisted.internet.endpoints import TCP4ClientEndpoint

class Greeter(Protocol):
    def sendMessage(self, msg):
        self.transport.write("MESSAGE %s\n" % msg)

class GreeterFactory(Factory):
    def buildProtocol(self, addr):
        return Greeter()

def gotProtocol(p):
    p.sendMessage("Hello")
    reactor.callLater(1, p.sendMessage, "This is sent in a second")
    reactor.callLater(2, p.transport.loseConnection)

point = TCP4ClientEndpoint(reactor, "localhost", 6667)
d = point.connect(GreeterFactory())
d.addCallback(gotProtocol)
reactor.run()

from twisted.internet.protocol import ClientCreator

creator = ClientCreator(reactor, Greeter)
d = creator.connectTCP("localhost", 1234)
d.addCallback(gotProtocol)
reactor.run()


text:
<?php

namespace Stfalcon\Bundle\EventBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Stfalcon\Bundle\NewsBundle\Entity\BaseNews,
    Stfalcon\Bundle\EventBundle\Entity\Event;

/**
 * Stfalcon\Bundle\EventBundle\Entity\Event
 *
 * @ORM\Table(name="event__news")
 * @ORM\Entity(repositoryClass="Stfalcon\Bundle\EventBundle\Repository\NewsRepository")
 */
class News extends BaseNews
{
    /**
     * @var \Doctrine\Common\Collections\ArrayCollection
     *
     * @ORM\ManyToOne(targetEntity="Event")
     * @ORM\JoinColumn(name="event_id", referencedColumnName="id")
     */
    private $event;

    /**
     * @return \Doctrine\Common\Collections\ArrayCollection
     */
    public function getEvent()
    {
        return $this->event;
    }

    /**
     * @param Event $event
     */
    public function setEvent($event)
    {
        $this->event = $event;
    }
}


text:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<language alias="en_us" intName="English (US)" localName="English (US)" lcid="" culture="en-US">
    <creator>
        <name>Offroadcode Limited</name>
        <link>https://offroadcode.com/</link>
    </creator>
</language>


text:
#include <stdafx.h>

#include "City.h"

//#include "Player.h"
#include "EOSAIGeo.h"
#include "PoiObject.h"
//#include "Geo.h"
//#include "CommonState.h"
#include "EOSAIMultiRegion2.h"
//#include "WorldDescServer.h"
//#include "WorldDescPlayer.h"
#include "AIPlayer.h"
#include "EOSAICommonData.h"
#include "EOSAIMultiRegionNationwidePathways.h"

#include "EOSAIInterface.h"
extern EOSAI::CInterface* g_pEOSAIInterface;

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

// AIGeos are player-specific

//CEOSAIGeo::CEOSAIGeo( EOSAI::AIPlayer* pAIPlayer, long iGeoId )//, CGeo* pGeo )
CEOSAIGeo::CEOSAIGeo( long iGeoId )//, CGeo* pGeo )
{
	//m_pAIPlayer = pAIPlayer;
	//m_pGeo = pGeo;
	m_iId = iGeoId;

	m_eGeoType = Unknown;
	m_iSize = 0;

	m_fTotalCitResValue = 0.0f;

	long iNumberOfPlayers = g_pEOSAICommonData->GetNumberOfPlayers();
	m_PlayerCitResUnitSummary.SetSize( iNumberOfPlayers+1 );
	m_AIGeoView.SetSize( iNumberOfPlayers+1 );
	for( long i=0; i<iNumberOfPlayers+1; i++ ){ m_AIGeoView[i] = NULL; }
}

CEOSAIGeoView*  CEOSAIGeo::CreateView( long iAIPlayer )
{
	if( m_AIGeoView[iAIPlayer] == NULL )
	{
		EOSAI::AIPlayer* pAIPlayer = g_pEOSAIInterface->GetAIPlayer( iAIPlayer );
		m_AIGeoView[iAIPlayer] = new CEOSAIGeoView( pAIPlayer, this );//iAIPlayer );
	}
	return m_AIGeoView[iAIPlayer];
}

/*
CGeo::GeoType  CEOSAIGeo::GetGeoType()
{
	return m_pGeo->GetGeoType();
}
*/

void  CEOSAIGeo::AddMultiRegion( CEOSAIMultiRegion2* pMultiRegion )
{
	m_MultiRegions.AddTail( pMultiRegion );
/*
#ifdef THINGS_TO_COMPILE_EVENTUALLY - nevermind, moved to AIGeoView
	the AIPlayer needs to be set in order to call this function.
	I can either create a list of values (i.e. turn every AIGeo member into an array) or create separate AIGeos for each player.

	long iAIPlayer = m_pAIPlayer->GetPlayerNumber();

	CEOSAIMultiRegionNationwidePathways* pPathways = g_pEOSAICommonData->GetNationwidePathways( iAIPlayer );
	CEOSAIRegionPathwayItem* pItem = pPathways->GetDistGeoPathfindingValueFromMyCitRes( pMultiRegion->m_iId );
	if( pItem )
	{
		m_fMyCitResDistance = min( m_fMyCitResDistance, pItem->m_fDistance );
	}
	pItem = pPathways->GetDistGeoPathfindingValueFromMyCitResUnits( pMultiRegion->m_iId );
	if( pItem )
	{
		m_fMyCitResUnitDistance = min( m_fMyCitResUnitDistance, pItem->m_fDistance );
	}
	//CWorldDescServer* pWorldDescServer = m_pAIPlayer->GetWorldDescServer();
	//long iNumberOfPlayers = g_pCommonState->GetNumberOfPlayers();
	long iNumberOfPlayers = g_pEOSAICommonData->GetNumberOfPlayers();
	for( long iPlayer=1; iPlayer<=iNumberOfPlayers; iPlayer++ )
	{
		EOSAI::CGamePlayer* pPlayer = g_pEOSAIInterface->GetGamePlayer( iPlayer );
		if( pPlayer->IsAlive() == false ) continue;
		if( iPlayer == iAIPlayer ) continue;
		EOSAIEnumForeignRelations eRel = g_pEOSAICommonData->GetForeignRelations( iPlayer, iAIPlayer );
		if( eRel.IsNeutral() || eRel.IsEnemy() )
		{
			CEOSAIMultiRegionNationwidePathways* pPathways = g_pEOSAICommonData->GetNationwidePathways( iPlayer );
			CEOSAIRegionPathwayItem* pItem = pPathways->GetDistGeoPathfindingValueFromMyCitRes( pMultiRegion->m_iId );
			if( pItem )
			{
				m_fNeutralEnemyCitResDistance = min( m_fNeutralEnemyCitResDistance, pItem->m_fDistance );
			}
			pItem = pPathways->GetDistGeoPathfindingValueFromMyCitResUnits( pMultiRegion->m_iId );
			if( pItem )
			{
				m_fNeutralEnemyCitResUnitDistance = min( m_fNeutralEnemyCitResUnitDistance, pItem->m_fDistance );
			}
		}
	}
	*/
	//ASSERT( m_AIPoiObjectList.IsEmpty() );
	POSITION pos = pMultiRegion->GetPoiObjectsInsideRegion()->GetHeadPosition();
	while( pos )
	{
		CEOSAIPoiObject* pAIPoiObject = pMultiRegion->GetPoiObjectsInsideRegion()->GetNext( pos );
		m_AIPoiObjectList.AddTail( pAIPoiObject );
	}
	/*
	POSITION pos = pMultiRegion->GetPoiObjectsInsideRegion()->GetHeadPosition();
	while( pos )
	{
		CEOSAIPoiObject* pAIPoiObject = pMultiRegion->GetPoiObjectsInsideRegion()->GetNext( pos );
		m_AIPoiObjectList.AddTail( pAIPoiObject );

		long iPoiObjectOwner = pAIPoiObject->GetOwner();
		if( iPoiObjectOwner == 0 )
		{
			m_iUnownedPoiObjects++;
		}
		eif( iPoiObjectOwner == iAIPlayer )
		{
			m_iMyPoiObjects++;
		}
		else
		{
			EOSAIEnumForeignRelations eRel = g_pEOSAICommonData->GetForeignRelations( iAIPlayer, iPoiObjectOwner );
			if( eRel.IsTeammate() )
			{
				m_iTeamPoiObjects++;
			}
			if( eRel.IsAlly() )
			{
				m_iAlliesPoiObjects++;
			}
			if( eRel.IsNeutral() )
			{
				m_iNeutralPoiObjects++;
			}
			if( eRel.IsEnemy() )
			{
				m_iEnemyPoiObjects++;
			}
		}
	}
#endif THINGS_TO_COMPILE_EVENTUALLY
*/
	// Update the AIGeo values
	m_TotalCitResSummary += *pMultiRegion->GetTotalCitResSummary();

	for( long iPlayer=0; iPlayer<m_PlayerCitResUnitSummary.m_iSize; iPlayer++ )
	{
		CEOSAICitResUnitSummary* pGeoSummary = &m_PlayerCitResUnitSummary[ iPlayer ];
		CEOSAICitResUnitSummary* pMultiRegionSummary = pMultiRegion->GetCitResUnitSummary( iPlayer );
		*pGeoSummary += *pMultiRegionSummary;
		int g=0;
	}
}

CEOSAIUnitSummary* CEOSAIGeo::GetUnitSummary( long iPlayer )
{
	return &m_PlayerCitResUnitSummary[ iPlayer ].m_Units;
}


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <ImageView
        android:id="@+id/level_pattern"
        android:layout_width="96dp"
        android:layout_height="136dp"
        android:layout_centerHorizontal="true"
        android:background="@drawable/bkg_pattern_thumb"
        android:contentDescription="@null"
        android:padding="10dp"
        android:scaleType="fitStart"/>

    <TextView
        android:id="@+id/level_number"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@+id/level_pattern"
        android:layout_marginBottom="4dp"
        android:gravity="center"
        android:text="000"
        android:textColor="#FF00AAFF"
        android:textSize="@dimen/small_text"/>

    <LinearLayout
        android:layout_width="96dp"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@+id/level_pattern"
        android:layout_centerHorizontal="true"
        android:layout_marginBottom="16dp"
        android:gravity="center"
        android:orientation="horizontal">

        <ImageView
            android:id="@+id/star1"
            android:layout_width="@dimen/star_thumb"
            android:layout_height="@dimen/star_thumb"
            android:layout_gravity="bottom"
            android:contentDescription="@null"
            android:src="@drawable/star_unlit"/>

        <ImageView
            android:id="@+id/star2"
            android:layout_width="@dimen/star_thumb"
            android:layout_height="@dimen/star_thumb"
            android:layout_gravity="bottom"
            android:layout_marginBottom="@dimen/small_margin"
            android:contentDescription="@null"
            android:src="@drawable/star_unlit"/>

        <ImageView
            android:id="@+id/star3"
            android:layout_width="@dimen/star_thumb"
            android:layout_height="@dimen/star_thumb"
            android:layout_gravity="bottom"
            android:contentDescription="@null"
            android:src="@drawable/star_unlit"/>

    </LinearLayout>

</RelativeLayout>


text:
class AddOnsaleToFurnitures < ActiveRecord::Migration
  def change
    add_column :furnitures, :onsale, :boolean, default: true
  end
end


text:
package com.thoughtworks.go.server.service.support;

import org.hibernate.SessionFactory;
import org.hibernate.stat.Statistics;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.LinkedHashMap;
import java.util.Map;

@Component
public class HibernateInformationProvider implements ServerInfoProvider {

    private SessionFactory sessionFactory;

    @Autowired
    public HibernateInformationProvider(SessionFactory sessionFactory) {
        this.sessionFactory = sessionFactory;
    }

    @Override
    public double priority() {
        return 12.0;
    }

    @Override
    public Map<String, Object> asJson() {
        LinkedHashMap<String, Object> json = new LinkedHashMap<>();
        Statistics statistics = sessionFactory.getStatistics();
        if (!statistics.isStatisticsEnabled()){
            return json;
        }
        json.put("EntityDeleteCount", statistics.getEntityDeleteCount());
        json.put("EntityInsertCount", statistics.getEntityInsertCount());
        json.put("EntityLoadCount", statistics.getEntityLoadCount());
        json.put("EntityFetchCount", statistics.getEntityFetchCount());
        json.put("EntityUpdateCount", statistics.getEntityUpdateCount());
        json.put("QueryExecutionCount", statistics.getQueryExecutionCount());
        json.put("QueryExecutionMaxTime", statistics.getQueryExecutionMaxTime());
        json.put("QueryExecutionMaxTimeQueryString", statistics.getQueryExecutionMaxTimeQueryString());
        json.put("QueryCacheHitCount", statistics.getQueryCacheHitCount());
        json.put("QueryCacheMissCount", statistics.getQueryCacheMissCount());
        json.put("QueryCachePutCount", statistics.getQueryCachePutCount());
        json.put("FlushCount", statistics.getFlushCount());
        json.put("ConnectCount", statistics.getConnectCount());
        json.put("SecondLevelCacheHitCount", statistics.getSecondLevelCacheHitCount());
        json.put("SecondLevelCacheMissCount", statistics.getSecondLevelCacheMissCount());
        json.put("SecondLevelCachePutCount", statistics.getSecondLevelCachePutCount());
        json.put("SessionCloseCount", statistics.getSessionCloseCount());
        json.put("SessionOpenCount", statistics.getSessionOpenCount());
        json.put("CollectionLoadCount", statistics.getCollectionLoadCount());
        json.put("CollectionFetchCount", statistics.getCollectionFetchCount());
        json.put("CollectionUpdateCount", statistics.getCollectionUpdateCount());
        json.put("CollectionRemoveCount", statistics.getCollectionRemoveCount());
        json.put("CollectionRecreateCount", statistics.getCollectionRecreateCount());
        json.put("StartTime", statistics.getStartTime());
        json.put("SecondLevelCacheRegionNames", statistics.getSecondLevelCacheRegionNames());
        json.put("SuccessfulTransactionCount", statistics.getSuccessfulTransactionCount());
        json.put("TransactionCount", statistics.getTransactionCount());
        json.put("PrepareStatementCount", statistics.getPrepareStatementCount());
        json.put("CloseStatementCount", statistics.getCloseStatementCount());
        json.put("OptimisticFailureCount", statistics.getOptimisticFailureCount());

        LinkedHashMap<String, Object> queryStats = new LinkedHashMap<>();
        json.put("Queries", queryStats);

        String[] queries = statistics.getQueries();
        for (String query : queries) {
            queryStats.put(query, statistics.getQueryStatistics(query));
        }

        LinkedHashMap<String, Object> entityStatistics = new LinkedHashMap<>();
        json.put("EntityStatistics", entityStatistics);

        String[] entityNames = statistics.getEntityNames();
        for (String entityName : entityNames) {
            entityStatistics.put(entityName, statistics.getEntityStatistics(entityName));
        }

        LinkedHashMap<String, Object> roleStatistics = new LinkedHashMap<>();
        json.put("RoleStatistics", roleStatistics);

        String[] roleNames = statistics.getCollectionRoleNames();
        for (String roleName : roleNames) {
            roleStatistics.put(roleName, statistics.getCollectionStatistics(roleName));
        }

        return json;
    }

    @Override
    public String name() {
        return "Hibernate Statistics";
    }
}


text:
try:
    import tilde
except ImportError:
    import os, sys
    chk_path = os.path.realpath(os.path.normpath(os.path.join(
        os.path.dirname(os.path.abspath(__file__)),
        "../"
    )))
    if not chk_path in sys.path: sys.path.insert(0, chk_path)


text:
<?php
/* Prototype  : string setlocale (int $category , string $locale [,string $..] )
 *            : string setlocale(int $category , array $locale);
 * Description: Sets locale information.Returns the new current locale , or FALSE
 *              if locale functionality is not implemented in this platform.
 * Source code: ext/standard/string.c
*/

/* If locale is empty string "", the locale names will be set from the values of environment variables with the same names as from ENV */

echo "*** Testing setlocale() : usage variations - setting system locale = \"\" ***\n";

//initially setting the locale
setlocale(LC_ALL,'en_AU.utf8');

echo "Locale info, before setting the locale\n";

//returns current locale,before executing setlocale() .
$locale_info_before = localeconv();

var_dump($locale_info_before);

//Testing setlocale()  by giving locale = null
echo "Setting system locale, category = LC_ALL and locale = \"\"\n";
setlocale(LC_ALL, "");

echo "Locale info, after setting the locale\n";

//Returns Current locale,after executing setlocale().
$locale_info_after = localeconv();

var_dump($locale_info_after);

echo "Checking new locale in the system, Expected : the locale names will be set from the values of environment variables\n";
echo "Test ";
if($locale_info_before != $locale_info_after){
  echo "PASSED.";
} else {
  echo "FAILED.";
}

echo "\nDone\n";
?>


text:
layout: page
title: Blue Electronics Trade Fair
date: 2016-05-24
author: Jordan Marshall
tags: weekly links, java
status: published
summary: In eget augue ullamcorper, ultricies lectus tempus, accumsan lorem.
banner: images/banner/meeting-01.jpg
booking:
  startDate: 01/18/2019
  endDate: 01/19/2019
  ctyhocn: HVNOBHX
  groupCode: BETF
published: true
---
Vivamus malesuada vel nisi id vehicula. Curabitur porta semper rutrum. Nam at ullamcorper sapien, et aliquet risus. Vestibulum eget eros mattis leo iaculis cursus. Curabitur a imperdiet ante, at egestas lacus. Maecenas venenatis tortor ut turpis faucibus vestibulum. Ut rhoncus sollicitudin felis nec ullamcorper. Cras bibendum diam dui, id semper odio malesuada quis. Vestibulum convallis et erat nec iaculis. Aenean vitae dignissim turpis, nec sodales quam. Morbi vitae metus quis ligula scelerisque egestas non vestibulum ligula. Quisque venenatis arcu justo, eget varius nisl cursus at. Vestibulum in condimentum diam, cursus pellentesque purus. Praesent dictum tempor erat, eget maximus augue maximus quis.

* Vestibulum aliquet sem ac consectetur mattis
* Nam sollicitudin augue sit amet nibh ultrices mattis
* Suspendisse tempus nulla vitae maximus volutpat.

Aenean accumsan neque elit, ac tincidunt risus accumsan ac. Vivamus aliquet convallis est sit amet rutrum. Nullam ornare ac metus ut venenatis. Quisque gravida odio vitae erat facilisis, sit amet iaculis ex pretium. Aenean malesuada est sed felis tincidunt vehicula. Aliquam erat volutpat. Vivamus neque urna, ornare id viverra et, porttitor vitae tellus.
Sed dictum dolor vel risus aliquet, ac mollis ipsum ultricies. Nunc scelerisque accumsan sapien, non elementum eros vulputate ac. Phasellus bibendum vitae arcu vitae consectetur. Mauris at eleifend ex, quis consequat quam. Sed ut velit massa. Ut lorem tellus, consectetur quis diam ut, vestibulum hendrerit nunc. Aliquam sollicitudin semper purus id rutrum. Nullam vestibulum nunc quis vulputate lacinia. Nulla tincidunt, turpis nec feugiat accumsan, lorem mauris consequat felis, quis venenatis mi ante eu eros.


text:
@interface HelpViewController : UIViewController
{
	RootViewController* rootViewController;
	UIButton* backButton;
}

@property (nonatomic, assign) RootViewController* rootViewController;
@property (nonatomic, retain) IBOutlet UIButton* backButton;

- (IBAction)goBack;

@end


text:
using namespace dawgdic;

#define DAWG(x) ((Dawg*)x)
#define BUILDER(x) ((DawgBuilder*)x)

extern "C" {

#include "cdawgdic.h"

void *dawgdic_builder_new() {
    return new DawgBuilder();
}

void dawgdic_builder_free(void *builder) {
    delete BUILDER(builder);
}

bool dawgdic_builder_insert(const void *builder, const char *string) {
    return BUILDER(builder)->Insert(string);
}

bool dawgdic_builder_insert2(const void *builder, const char *string, const int record) {
    return BUILDER(builder)->Insert(string, record);
}

bool dawgdic_builder_insert3(const void *builder, const char *string, const size_t length, const int record) {
    return BUILDER(builder)->Insert(string, length, record);
}

bool dawgdic_builder_finish(const void *builder, const void *dawg) {
    return BUILDER(builder)->Finish(DAWG(dawg));
}

void dawgdic_builder_clear(const void *builder) {
    BUILDER(builder)->Clear();
}

size_t dawgdic_builder_size(const void *builder) {
    return BUILDER(builder)->size();
}

size_t dawgdic_builder_num_of_transitions(const void *builder) {
    return BUILDER(builder)->num_of_transitions();
}

size_t dawgdic_builder_num_of_states(const void *builder) {
    return BUILDER(builder)->num_of_states();
}

size_t dawgdic_builder_num_of_merged_transitions(const void *builder) {
    return BUILDER(builder)->num_of_merged_transitions();
}

size_t dawgdic_builder_num_of_merged_states(const void *builder) {
    return BUILDER(builder)->num_of_merged_states();
}

size_t dawgdic_builder_num_of_merging_states(const void *builder) {
    return BUILDER(builder)->num_of_merging_states();
}

}


text:
package org.jbibtex;

public class ObjectResolutionException extends IllegalArgumentException {

	public ObjectResolutionException(Key key){
		super(key.getValue());
	}
}