text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SM2Core.GameMechanics {
	public class D20: BaseDie {
		public override int Roll() {
			return RNG.NextUniformInt(20) + 1;
		}
	}
}


text:
package cz.wake.lobby.armorstands.characters;

import cz.wake.lobby.Main;
import cz.wake.lobby.armorstands.ASInterface;
import cz.wake.lobby.utils.ItemFactory;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.ArmorStand;
import org.bukkit.entity.EntityType;
import org.bukkit.inventory.ItemStack;

public class WinterGames implements ASInterface {

    private Location loc1 = new Location(Bukkit.getWorld("omain"), 1539.5, 18, -1222.5, 180, 0);
    private ArmorStand as, as2, as3;

    @Override
    public void spawn() {
        as = (ArmorStand) Bukkit.getWorld("omain").spawnEntity(loc1, EntityType.ARMOR_STAND);

        as.setGravity(false);
        as.setVisible(true);
        as.setCanPickupItems(false);
        as.setBasePlate(false);
        as.setArms(true);

        // x - nahoru/dolu, y - rotace, z - otáčení v ose

        ItemStack head = ItemFactory.createHead("test", "29c8ebfe-8260-4c9c-8a45-ba2d62c6a8aa", "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYTg3YmRhNzkzMTY4MzNhYWFjMzQ2YWMxY2ZjYTgyNDI1NGMzMjJhMTA1YjZjODU4YTljNWE3OGU3NTQ2NmY4In19fQ==");
        as.setHelmet(head);

        ItemStack chestplate = ItemFactory.createColouredLeather(Material.LEATHER_CHESTPLATE, 176, 23, 31);
        as.setChestplate(chestplate);

        ItemStack leggins = ItemFactory.createColouredLeather(Material.LEATHER_LEGGINGS, 176, 23, 31);
        as.setLeggings(leggins);

        ItemStack boots = ItemFactory.createColouredLeather(Material.LEATHER_BOOTS, 176, 23, 31);
        as.setBoots(boots);

        subtextSpawn();
        hologramSpawn();

        Main.getInstance().getASM().setMetadata((ArmorStand) as, "Winter", "Winter", Main.getInstance());
    }

    @Override
    public void hologramSpawn() {

        loc1.add(0, 0.3, 0);

        as2 = (ArmorStand) Bukkit.getWorld("omain").spawnEntity(loc1, EntityType.ARMOR_STAND);

        as2.setGravity(false);
        as2.setCanPickupItems(false);
        as2.setBasePlate(false);
        as2.setVisible(false);
        as2.setCustomNameVisible(true);

        as2.setCustomName("§4§lVanocni MiniGames");

    }

    @Override
    public void subtextSpawn() {

        loc1.add(0, 0.3, 0);

        as3 = (ArmorStand) Bukkit.getWorld("omain").spawnEntity(loc1, EntityType.ARMOR_STAND);

        as3.setGravity(false);
        as3.setCanPickupItems(false);
        as3.setBasePlate(false);
        as3.setVisible(false);
        as3.setCustomNameVisible(true);

        as3.setCustomName("§cUkonceno!");

    }

    @Override
    public boolean isActive() {
        return false;
    }

    @Override
    public void remove() {
        as.remove();
        as2.remove();
        as3.remove();
    }

    @Override
    public void updateArmorStand(String s, int i) {

    }
}

redpajama_set_name: RedPajamaGithub


text:
from django.conf.urls import patterns, include, url
import os.path

import tasks.views

from django.conf import settings
from django.contrib import admin
admin.autodiscover()

STATIC_PATH = os.path.abspath(os.path.join(
        os.path.dirname(os.path.abspath(__file__)), '../tasks/static'))

if not os.path.exists(STATIC_PATH):
    raise ValueError(STATIC_PATH)

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'minitasks.views.home', name='home'),
    # url(r'^minitasks/', include('minitasks.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    url(r'^admin/', include(admin.site.urls)),
    url(r'^$', tasks.views.TaskIndex.as_view()),
    url(r'^tasks/$', tasks.views.TaskData.as_view(),
        name='tasks-data'),
    url(r'^claim/$', tasks.views.ClaimTask.as_view(),
        name='tasks-claim'),
    (r'^static/(?P<path>.*)$', 'django.views.static.serve',
            {'document_root': settings.MEDIA_ROOT}),
    url(r'^secret-refresh-tasks/$', tasks.views.RefreshTaskData.as_view(),
        name='secret-refresh-tasks'),
)

### Attempt 1:

if settings.DEBUG:
    urlpatterns += patterns('django.contrib.staticfiles.views',
        url(r'^static/(?P<path>.*)$', 'serve'),
    )


text:
/**
 * Created by Janne on 5.11.2014.
 */
var winston = require('winston');

// Just test with the users
var users = [
    { id : 1, username : "testeri", password : "secret", email : "testeri@netti.fi" },
    { id : 2, username : "kakkonen", password : "salane", email : "mies@email.com"}
];

exports.findById = function(id, fn) {
    var idx = id - 1;
    if (users[idx]) {
        fn(null, users[idx]);
    } else {
        fn(new Error('User ' + id + ' does not exist'));
    }
};

exports.findByUsername = function(username, fn) {
    for (var i = 0, len = users.length; i < len; i++) {
        var user = users[i];
        if (user.username === username) {
            return fn(null, user);
        }
    }
    return fn(null, null);
};


text:
class CPUSnapshot
{
public:
	CPUSnapshot();

	std::size_t GetNumEntries() const;

	const char * GetLabelTotal() const;
	const char * GetLabel(unsigned int cpu) const;

	std::size_t GetActiveTimeTotal() const;
	std::size_t GetActiveTime(unsigned int cpu) const;

	std::size_t GetIdleTimeTotal() const;
	std::size_t GetIdleTime(unsigned int cpu) const;

	std::size_t GetStateTimeTotal(unsigned int state) const;
	std::size_t GetStateTime(unsigned int state, unsigned int cpu) const;

	std::size_t GetTotalTimeTotal() const;
	std::size_t GetTotalTime(unsigned int cpu) const;

private:
	static const int INDEX_TOT;

private:
	std::vector<CPUData> mEntries;
};

// == INLINE FUNCTIONS ==

inline std::size_t CPUSnapshot::GetNumEntries() const { return mEntries.size() - 1; }

inline const char * CPUSnapshot::GetLabelTotal() const { return mEntries[INDEX_TOT].GetLabel().c_str(); }

inline const char * CPUSnapshot::GetLabel(unsigned int cpu) const
{
	// skip total
	++cpu;

	if(cpu < mEntries.size())
		return mEntries[cpu].GetLabel().c_str();
	else
		return nullptr;
}

inline std::size_t CPUSnapshot::GetActiveTimeTotal() const { return mEntries[INDEX_TOT].GetActiveTime(); }

inline std::size_t CPUSnapshot::GetActiveTime(unsigned int cpu) const
{
	// skip total
	++cpu;

	if(cpu < mEntries.size())
		return mEntries[cpu].GetActiveTime();
	else
		return 0;
}

inline std::size_t CPUSnapshot::GetIdleTimeTotal() const { return mEntries[INDEX_TOT].GetIdleTime(); }

inline std::size_t CPUSnapshot::GetIdleTime(unsigned int cpu) const
{
	// skip total
	++cpu;

	if(cpu < mEntries.size())
		return mEntries[cpu].GetIdleTime();
	else
		return 0;
}

inline std::size_t CPUSnapshot::GetStateTimeTotal(unsigned int state) const { return mEntries[INDEX_TOT].GetStateTime(state); }

inline std::size_t CPUSnapshot::GetStateTime(unsigned int state, unsigned int cpu) const
{
	// skip total
	++cpu;

	if(cpu < mEntries.size())
		return mEntries[cpu].GetStateTime(state);
	else
		return 0;
}

inline std::size_t CPUSnapshot::GetTotalTimeTotal() const { return mEntries[INDEX_TOT].GetTotalTime(); }

inline std::size_t CPUSnapshot::GetTotalTime(unsigned int cpu) const
{
	// skip total
	++cpu;

	if(cpu < mEntries.size())
		return mEntries[cpu].GetTotalTime();
	else
		return 0;
}


text:
import json

import html5lib

def parse(path="html5ents.xml"):
    return html5lib.parse(open(path), treebuilder="lxml")

def entity_table(tree):
    return dict((entity_name("".join(tr[0].xpath(".//text()"))),
                 entity_characters(tr[1].text))
                for tr in tree.xpath("//h:tbody/h:tr",
                                     namespaces={"h":"http://www.w3.org/1999/xhtml"}))

def entity_name(inp):
    return inp.strip()

def entity_characters(inp):
    return "".join(codepoint_to_character(item)
                    for item in inp.split()
                    if item)

def codepoint_to_character(inp):
    return ("\U000"+inp[2:]).decode("unicode-escape")

def make_tests_json(entities):
    test_list = make_test_list(entities)
    tests_json = {"tests":
                      [make_test(*item) for item in test_list]
                  }
    return tests_json

def make_test(name, characters, good):
    return {
        "description":test_description(name, good),
        "input":"&%s"%name,
        "output":test_expected(name, characters, good)
        }

def test_description(name, good):
    with_semicolon = name.endswith(";")
    semicolon_text = {True:"with a semi-colon",
                      False:"without a semi-colon"}[with_semicolon]
    if good:
        text = "Named entity: %s %s"%(name, semicolon_text)
    else:
        text = "Bad named entity: %s %s"%(name, semicolon_text)
    return text

def test_expected(name, characters, good):
    rv = []
    if not good or not name.endswith(";"):
        rv.append("ParseError")
    rv.append(["Character", characters])
    return rv

def make_test_list(entities):
    tests = []
    for entity_name, characters in entities.items():
        if entity_name.endswith(";") and not subentity_exists(entity_name, entities):
            tests.append((entity_name[:-1], "&" + entity_name[:-1], False))
        tests.append((entity_name, characters, True))
    return sorted(tests)

def subentity_exists(entity_name, entities):
    for i in range(1, len(entity_name)):
        if entity_name[:-i] in entities:
            return True
    return False

def make_entities_code(entities):
    entities_text = "\n".join("    \"%s\": u\"%s\","%(
            name, entities[name].encode(
                "unicode-escape").replace("\"", "\\\""))
                              for name in sorted(entities.keys()))
    return """entities = {
%s
}"""%entities_text

def main():
    entities = entity_table(parse())
    tests_json = make_tests_json(entities)
    json.dump(tests_json, open("namedEntities.test", "w"), indent=4)
    code = make_entities_code(entities)
    open("entities_constants.py", "w").write(code)

if __name__ == "__main__":
    main()


text:
[ "$P4C" == "" ] && echo The environment variable \$P4C has to be defined to run $0 && exit 1
[ "$RTE_SDK" == "" ] && echo The environment variable \$RTE_SDK has to be defined to run $0 && exit 1

# how many Ctrl-C presses will force termination
MAX_INTERRUPTS=${MAX_INTERRUPTS-1}

P4TESTS_EXTRA_OPTS=""
EXTRA_OPT_PREFIX="p4opts+=--p4opt="
for txt in $*; do
    if [[ $txt = "${EXTRA_OPT_PREFIX}"* ]]; then
        EXTRA_OPT="${txt#${EXTRA_OPT_PREFIX}}"
        P4TESTS_EXTRA_OPTS="${P4TESTS_EXTRA_OPTS} -D ${EXTRA_OPT} "
    fi
done

declare -A exitcode
declare -A skips
declare -A skipped
declare -A testcases
declare -A models
declare -A dirname
declare -A src_p4
declare -A ext_p4
declare -A p4files

declare -a sorted_testcases
declare -a sorted_skipped

success_count=0
failure_count=0

START_DIR=${START_DIR-examples}
START_DIR=`realpath "${START_DIR}"`

BASE_DIR=$(realpath `pwd`)

HTML_REPORT=${HTML_REPORT-no}
RUN_COUNT=${RUN_COUNT-1}
TIMEOUT=${TIMEOUT-60}
FORCE_TIMEOUT=${FORCE_TIMEOUT-60}
SKIP_FILE=${SKIP_FILE-tests_to_skip.txt}

if [ -f "$SKIP_FILE" ]; then
    IFS=$'\n'
    while read -r skip_opt; do
        skips[$skip_opt]="$skip_opt"
    done < <(cat "$SKIP_FILE" | sed -e "s/^[ ]*#.*$//g" | sed -e "s/\w[ \t]{1,2}\w//g" | sed -e "s/[ \t]*//g" | grep -v '^[ \t]*$')
fi

PREFIX=${PREFIX-%}
std="@std"
[ "$PREFIX" == "%" ] && std="@test"
PRECOMPILE=${PRECOMPILE-yes}

rm /tmp/t4p4s_precompile_output_*
for file in `find -L "${START_DIR}" -name "test-*.c"`; do
    base=$(basename $file)
    noc="${base%%.c}"
    noprefix="${noc##test-}"

    found=0
    for p4file in "$noc" "$noprefix"; do
        for file2 in `find -L "${START_DIR}" -type f -regex ".*${p4file}[.]p4\(_[0-9][0-9]*\)?"`; do
            base2=`basename "$file2"`
            base2=${base2%.*}
            [ "$base2" != "$noprefix" ] && [ "$base2" != "test-$noprefix" ] && continue

            SRC_P4="$file2"
            found=1
            break 2
        done
    done

    [ $found -eq 0 ] && echo "P4 file for $file not found" && continue

    for testcase_row in `cat $file | grep "&t4p4s_testcase_" | grep -ve "^[[:blank:]]*//" | sed -e "s/[[:blank:]]//g" | sed -e "s/[{}\"]//g"`; do
        testcase=`echo $testcase_row | cut -f1 -d,`
        model=`echo $testcase_row | cut -f3 -d,`

        PREPART="$PREFIX"
        if [ -z ${POSTFIX+x} ]; then
            TESTPART="${p4file}=${testcase}"
        else
            TESTPART="${p4file}$POSTFIX"
        fi

        testid="$PREPART$TESTPART"
        testcases["$testid"]="$testid"
        p4files["$testid"]="$p4file"
        src_p4["$testid"]="$SRC_P4"
        models["$testid"]=$model
        ext="${SRC_P4##*.}"
        ext_p4["$testid"]="$ext"

        dirname["$testid"]=`echo "$testid" | sed -e "s/=/${std}-/g" | tr -d '%'`

        [ "${skipped[$PREPART$TESTPART]}" != "" ] && continue
        [ "$testcase" == "test" ] && [ "${skipped[\"$PREPART$TESTPART=test\"]}" != "" ] && continue

        for skip in ${skips[@]}; do
            [ "$skip" == "$TESTPART" ]         && skipped[$PREPART$TESTPART]="$skip" && continue 2
            [ "$PREPART$skip" == "$TESTPART" ] && skipped[$PREPART$TESTPART]="$skip" && continue 2
            [ "$skip" == "$PREPART$TESTPART" ] && skipped[$PREPART$TESTPART]="$skip" && continue 2
            [ "$testcase" == "test" ] && [ "$skip=test" == "$TESTPART" ]         && skipped[$PREPART$TESTPART]="$skip" && continue 2
            [ "$testcase" == "test" ] && [ "$PREPART$skip=test" == "$TESTPART" ] && skipped[$PREPART$TESTPART]="$skip" && continue 2
        done
    done

    if [ "$PRECOMPILE" == "yes" ]; then
        [ "${skipped[$testid]+x}" ] && continue

        TARGET_DIR="./build/${dirname[$testid]}/cache"
        TARGET_JSON="${TARGET_DIR}/${p4files[$testid]}.${ext_p4[$testid]}.json.cached"
        mkdir -p ${TARGET_DIR}

        [ -f ${TARGET_JSON} ] && [ ${TARGET_JSON} -nt "${src_p4[$testid]}" ] && echo -n "|" && continue

        [ "${ext_p4[$testid]}" == "p4_14" ] && P4VSN=14
        [ "${ext_p4[$testid]}" == "p4"    ] && P4VSN=16

        model_compile_argument=""
        [ "${models[$testid]}" == "v1model" ] && model_compile_argument="-D__TARGET_V1__"
        [ "${models[$testid]}" == "psa" ] && model_compile_argument="-D__TARGET_PSA__"

        # $P4C/build/p4test ${P4TESTS_EXTRA_OPTS} "${src_p4[$testid]}" --toJSON ${TARGET_JSON} --p4v $P4VSN --Wdisable=unused --ndebug $model_compile_argument -I $BASE_DIR/examples/include && \
        $P4C/build/p4test "${src_p4[$testid]}" --toJSON ${TARGET_JSON} --p4v $P4VSN --Wdisable=unused --ndebug $model_compile_argument -I $BASE_DIR/examples/include 2>&1 | tee /tmp/t4p4s_precompile_output_$testid && \
            gzip ${TARGET_JSON} && \
            mv ${TARGET_JSON}.gz ${TARGET_JSON} && \
            echo -n "|" &
    fi

done

wait

total_count=0
for TESTCASE in ${testcases[@]}; do
    [ "${skipped[$TESTCASE]+x}" ] && continue
    ((++total_count))
done

echo Precompiled ${total_count} P4 files to JSON

echo

summary_echo() {
    echo "$*"
    echo "$*" >> ${SUMMARY_FILE}
    echo "$*" >> ${LAST_SUMMARY_FILE}
}

summary_only_echo() {
    echo "$*" >> ${SUMMARY_FILE}
    echo "$*" >> ${LAST_SUMMARY_FILE}
}

LOG_DIR=build/all-run-logs
SUMMARY_FILE=${LOG_DIR}/$(date +"%Y%m%d_%H%M%S")_log.txt
REPORT_OUTPUT_FILE=${LOG_DIR}/$(date +"%Y%m%d_%H%M%S")_output
LAST_SUMMARY_FILE=${LOG_DIR}/last_log.txt
mkdir -p ${LOG_DIR}
rm -f ${LOG_DIR}/*.result.txt
rm -f ${SUMMARY_FILE}
rm -f ${LAST_SUMMARY_FILE}

# sorting testcases
readarray -t sorted_testcases < <(printf '%s\0' "${testcases[@]}" | sort -z | xargs -0n1)
readarray -t sorted_skipped < <(printf '%s\0' "${skipped[@]}" | sort -z | xargs -0n1)

echo "Will write summary to ${LAST_SUMMARY_FILE}"
summary_only_echo Will skip ${#skipped[@]} test cases:

previous_case=""
for test in ${sorted_skipped[@]}; do
    [ "$previous_case" != "" ] && [ "${test%%=*}" != "$previous_case" ] && summary_only_echo ""
    summary_only_echo "    $test"

    previous_case=${test%%=*}
done | sort

summary_only_echo Will run the following ${total_count} test cases:

previous_case=""
for TESTCASE in ${sorted_testcases[@]}; do
    [ "${skipped[$TESTCASE]+x}" ] && continue

    [ "$previous_case" != "" ] && [ "${TESTCASE%%=*}" != "$previous_case" ] && summary_only_echo ""
    previous_case=${TESTCASE%%=*}
    summary_only_echo "    ${TESTCASE}"
done

echo Will run ${total_count} cases and skip ${#skipped[@]} cases

current_idx=1

if [ ${HTML_REPORT} == "yes" ]; then
  COLLECTOR_PATH="examples/test_scripts/data_collector/data_collector.py"
  actual_commit_hash=`git rev-parse HEAD`
  echo "python3 ${COLLECTOR_PATH} new $REPORT_OUTPUT_FILE commitHash=$actual_commit_hash"
  echo ""
  python3 ${COLLECTOR_PATH} new $REPORT_OUTPUT_FILE commitHash=$actual_commit_hash
fi

INTERRUPT_COUNT=0
for TESTCASE in ${sorted_testcases[@]}; do
    [ "${skipped[$TESTCASE]+x}" ] && continue

    all_arguments="$TESTCASE model=${models[$TESTCASE]} $*"
    echo
    echo
    echo Running test case ${current_idx}/${total_count}: ./t4p4s.sh $all_arguments

    if [ ${HTML_REPORT} == "yes" ]; then
        tmpFilename="/tmp/t4p4s_run_result"
        set -o pipefail

        for i in $(seq $RUN_COUNT); do
          python3 examples/test_scripts/timeoutee/timeoutee.py $TIMEOUT $FORCE_TIMEOUT ${tmpFilename}_pure_output ./t4p4s.sh $all_arguments 2>&1
          exitcode["$TESTCASE"]="$?"
          [ ${exitcode["$TESTCASE"]} -ne 0 ] && break
        done
        set +o pipefail

        echo ${current_idx} > $tmpFilename
        echo $TESTCASE >> $tmpFilename
        echo ${exitcode["$TESTCASE"]} >> $tmpFilename
        echo "$TESTCASE" >> $tmpFilename
        if test -f "/tmp/t4p4s_precompile_output_$TESTCASE"; then
            echo " ------- Precompile output ------- "  >> $tmpFilename
            cat "/tmp/t4p4s_precompile_output_$TESTCASE"  >> $tmpFilename
            echo "\n\n ------- T4P4S output ------- "  >> $tmpFilename
        fi
        cat "${tmpFilename}_pure_output" >> $tmpFilename

        echo ""
        echo "python3 ${COLLECTOR_PATH} add $REPORT_OUTPUT_FILE $tmpFilename"
        python3 ${COLLECTOR_PATH} add $REPORT_OUTPUT_FILE $tmpFilename
    else
        for i in $(seq $RUN_COUNT); do
          ./t4p4s.sh $all_arguments
          exitcode["$TESTCASE"]="$?"
          [ ${exitcode["$TESTCASE"]} -ne 0 ] && break
        done
    fi
    ((++current_idx))

    [ ${exitcode["$TESTCASE"]} -eq 0 ] && ((++success_count))
    [ ${exitcode["$TESTCASE"]} -ne 0 ] && ((++failure_count))

    # if there is an interrupt, finish executing test cases
    if [ ${exitcode["$TESTCASE"]} -eq 254 ]; then
        INTERRUPT_COUNT=$((++INTERRUPT_COUNT))
        [ $INTERRUPT_COUNT -eq $MAX_INTERRUPTS ] && break
    fi
done

if [ ${HTML_REPORT} == "yes" ]; then
  echo "python3 ${COLLECTOR_PATH} end $REPORT_OUTPUT_FILE"
  python3 ${COLLECTOR_PATH} end $REPORT_OUTPUT_FILE
fi

resultcode=0

[ ${#skipped[@]} -gt 0 ] && echo "Skipped ${#skipped[@]} test cases"

if [ ${success_count} -eq $((${#testcases[@]}-${#skipped[@]})) ]; then
    echo "All ${success_count} test cases ran successfully"
else
    [ ${success_count} -gt 0 ] && summary_echo "Successful (${success_count}):"

    for test in ${!exitcode[@]}; do
        [ ${exitcode[$test]} -ne 0 ] && continue
        summary_echo "    $test"
    done | sort

    declare -A fail_codes
    fail_codes[1]="P4 to C compilation failed"
    fail_codes[2]="C compilation failed (meson)"
    fail_codes[3]="C compilation failed"
    fail_codes[4]="Too many iterations, possible infinite loop"
    fail_codes[5]="Packets were unexpectedly dropped/sent"
    fail_codes[6]="Execution finished with wrong output"
    fail_codes[7]="Control flow requirements not met"
    fail_codes[8]="Not enough memory"
    fail_codes[9]="Compiler tool not found"
    fail_codes[10]="Could not determine model (e.g. v1model or psa)"
    fail_codes[11]="Egress port was not set"
    fail_codes[124]="Timeout error"
    fail_codes[134]="Stack smashing"
    fail_codes[139]="C code execution: Segmentation fault"
    fail_codes[247]="Timeout error (sigkill was needed instead of sigterm)"
    fail_codes[254]="Execution interrupted"
    fail_codes[255]="Switch execution error"

    for fc in `seq 139 -1 1` `seq 200 255`; do
        failcode_count=0
        for test in ${!exitcode[@]}; do
            [ ${exitcode[$test]} -eq $fc ] && ((++failcode_count))
        done

        [ ${failcode_count} -eq 0 ] && continue

        summary_echo "Failed with code $fc ($failcode_count examples): ${fail_codes[$fc]}"

        for test in ${!exitcode[@]}; do
            [ ${exitcode[$test]} -ne $fc ] && continue

            part1=`echo "${test%%=*}" | tr -d '%'`
            part2="${test##*=}"
            fctxt=`printf "%03d" $fc`
            [ -f "build/${part1}@test-${part2}/log/last.lit.txt" ] && cp "build/${part1}@test-${part2}/log/last.lit.txt" "${LOG_DIR}/fail${fctxt}_${part1}-${part2}.result.txt"

            summary_echo "    $test"
            resultcode=1
        done | sort
    done
fi

IFS=ORIG_IFS

echo "Summary written to ${LAST_SUMMARY_FILE}"

exit $resultcode


text:
import React from 'react';
import { render } from 'react-dom';
import { BrowserRouter as Router, Route } from 'react-router-dom';
import { Provider } from 'mobx-react';
// Service Worker for PWA
import serviceWorkerRegister from './registerServiceWorker';
// Import our Stores Here
import UserStore from './stores/user';
import LanguageStore from './stores/language';
import UIStore from './stores/ui';

// Import Components
import App from './containers/app';

// Execute the ServiceWorker
serviceWorkerRegister();

// Because they're classes, we have to instantiate them here :)
const userStore = UserStore.create({
  id: '1',
  name: 'Alex',
  lastName: 'Casillas',
  age: 27,
  xp: 0
});
const languageStore = LanguageStore.create({ language: 'en' });
const uiStore = UIStore.create({ borderRadius: 3, textColor: 'white' });

const store = {
  user: userStore,
  language: languageStore,
  ui: uiStore
};

const router = (
  <Provider {...store}>
    <Router>
      <Route exact path="/" component={App} />
    </Router>
  </Provider>
);

render(router, document.getElementById('root'));


text:
<package format="2">
  <name>tile_map</name>
  <version>1.4.1</version>
  <description>

     Tile map provides a slippy map style interface for visualizing
     OpenStreetMap and GooleMap tiles.  A mapviz visualization plug-in is also
     implemented

  </description>
  <author>Marc Alban</author>
  <maintainer email="malban@swri.org">Marc Alban</maintainer>
  <license>BSD</license>
  <url>https://github.com/swri-robotics/mapviz</url>

  <buildtool_depend>catkin</buildtool_depend>
  <buildtool_depend>qt5-qmake</buildtool_depend>

  <build_depend>libjsoncpp-dev</build_depend>
  <build_depend>qtbase5-dev</build_depend>
  <build_depend>libqt5-opengl-dev</build_depend>

  <depend>libglew-dev</depend>
  <depend>mapviz</depend>
  <depend>pluginlib</depend>
  <depend>roscpp</depend>
  <depend>swri_math_util</depend>
  <depend>swri_transform_util</depend>
  <depend>swri_yaml_util</depend>
  <depend>tf</depend>

  <exec_depend>libjsoncpp</exec_depend>
  <exec_depend>libqt5-core</exec_depend>
  <exec_depend>libqt5-opengl</exec_depend>

  <export>
    <mapviz plugin="${prefix}/mapviz_plugins.xml" />
  </export>

</package>


text:
using System;

namespace Python.Runtime {

    /// <summary>
    /// Represents a Python (ansi) string object. See the documentation at
    /// http://www.python.org/doc/current/api/stringObjects.html for details.
    /// 2011-01-29: ...Then why does the string constructor call PyUnicode_FromUnicode()???
    /// </summary>

    public class PyString : PySequence {

    /// <summary>
    /// PyString Constructor
    /// </summary>
    ///
    /// <remarks>
    /// Creates a new PyString from an existing object reference. Note
    /// that the instance assumes ownership of the object reference.
    /// The object reference is not checked for type-correctness.
    /// </remarks>

    public PyString(IntPtr ptr) : base(ptr) {}

    /// <summary>
    /// PyString Constructor
    /// </summary>
    ///
    /// <remarks>
    /// Copy constructor - obtain a PyString from a generic PyObject.
    /// An ArgumentException will be thrown if the given object is not
    /// a Python string object.
    /// </remarks>

    public PyString(PyObject o) : base() {
        if (!IsStringType(o)) {
            throw new ArgumentException("object is not a string");
        }
        Runtime.Incref(o.obj);
        obj = o.obj;
    }

    /// <summary>
    /// PyString Constructor
    /// </summary>
    ///
    /// <remarks>
    /// Creates a Python string from a managed string.
    /// </remarks>

    public PyString(string s) : base() {
        obj = Runtime.PyUnicode_FromUnicode(s, s.Length);
        if (obj == IntPtr.Zero) {
            throw new PythonException();
        }
    }

    /// <summary>
    /// IsStringType Method
    /// </summary>
    ///
    /// <remarks>
    /// Returns true if the given object is a Python string.
    /// </remarks>

    public static bool IsStringType(PyObject value) {
        return Runtime.PyString_Check(value.obj);
    }

    }

}


text:
title: 'Week 10 (Nov 8 - 14)'
date: 11/08/2017
published: false
hide_from_post_list: false
---

##### Your H5 Heading
Your _awesome_ summary goes here.

===

##### Your H5 Heading
Your even **more amazing** content goes here.


text:
package com.untzuntz.ustackserver.peer;

import org.apache.log4j.Logger;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelHandlerContext;
import org.jboss.netty.handler.codec.frame.FrameDecoder;

public class PeerDeliveryDecoder extends FrameDecoder {

    static Logger           		logger               	= Logger.getLogger(PeerDeliveryDecoder.class);

	@Override
	protected Object decode(ChannelHandlerContext ctx, Channel channel, ChannelBuffer buf) throws Exception {

		if (buf.readableBytes() < 4) {

			return null;
		}

		buf.markReaderIndex();
		int length = buf.readInt();
		logger.debug("Reading message from remote : " + length + " bytes");

		if (buf.readableBytes() < length)
		{
			logger.debug("\t- Not enough bytes : Needs " + length + " has " + buf.readableBytes());
			buf.resetReaderIndex();
			return null;
		}

		int nameLen = buf.readInt();
		ChannelBuffer nameBuf = buf.readBytes(nameLen);
		PeerDelivery delivery = new PeerDelivery(new String(nameBuf.array()));
		logger.debug("Handle delivery to : " + delivery.getTarget() + " via " + channel.getRemoteAddress());
		return delivery;
	}

}


text:
Dangerous Good PDF Update Dangerous Good PDF

<a href="<?php echo base_url(); ?>dashboard"> Dashboard

Dangerous Goods PDF

Update Dangerous Good PDF

                    <form id="update_dangerous_good_pdf" method="post" enctype="multipart/form-data" role="form">

								<?php
								if (is_file(FCPATH . 'uploads/brochures/dangerous_goods_pdf/' . $configuration_array['configuration_value'])) {
									?>
									<a href="<?php echo base_url() . 'uploads/brochures/dangerous_goods_pdf/' . $configuration_array['configuration_value']; ?>" title="click to view" id="pdf_link" target="_blank">

<a href="<?php echo base_url() . 'uploads/brochures/dangerous_goods_pdf/' . $configuration_array['configuration_value']; ?>" title="click to view" id="pdf_link" target="_blank">Click to view brochure<?php
								} else {
									echo '
No File Uploaded.
';
								}
								?>

								 Select File
								 Change Dangerous Good PDF (.pdf , 100 MB max)
								<input type="hidden" name="configuration_value" id="configuration_value">

							<button id="update_dangerous_goods_pdf_button" type="button" class="btn btn-primary" onclick="update_dangerous_goods_pdf();" data-loading-text="Please Wait..">Update </button>

					</form>


text:
package de.omnikryptec.render.objects;

import de.omnikryptec.libapi.exposed.render.Texture;
import de.omnikryptec.render.batch.Batch2D;
import de.omnikryptec.util.data.Color;
import de.omnikryptec.util.math.transform.Transform2Df;

public class SimpleSprite extends Sprite {

    private Transform2Df transform = new Transform2Df();
    private float width = 1;
    private float height = 1;

    private Color color;
    private Texture texture;

    @Override
    public void draw(final Batch2D batch) {
        batch.color().set(this.color == null ? Color.ONE : this.color);
        batch.draw(this.texture, this.transform.worldspace(), this.width, this.height, false, false);
    }

    public Transform2Df getTransform() {
        return this.transform;
    }

    public void setTransform(final Transform2Df mat) {
        this.transform = mat;
    }

    public float getWidth() {
        return this.width;
    }

    public void setWidth(final float width) {
        this.width = width;
    }

    public float getHeight() {
        return this.height;
    }

    public void setHeight(final float height) {
        this.height = height;
    }

    public Color getColor() {
        return this.color;
    }

    public void setColor(final Color color) {
        this.color = color;
    }

    public void setTexture(final Texture tex) {
        this.texture = tex;
    }

    public Texture getTexture() {
        return this.texture;
    }

}


text:
using namespace std;

class CBuild
{
public:
  static bool Start(vector<CGameObject*> gameObjects);
  static bool Run();
  static bool Load();

private:
  static bool Compile();
};

#endif


text:
package com.intellij.java.codeInsight.daemon.quickFix;

import com.intellij.codeInsight.daemon.QuickFixBundle;
import com.intellij.codeInsight.intention.IntentionAction;
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase;

public class StaticImportMethodWithCommonNameTest extends LightCodeInsightFixtureTestCase {
  @Override
  protected void setUp() throws Exception {
    super.setUp();
    int idx = 0;
    while (idx++ < 450) {
      myFixture.addClass("package a; class ATest" + idx + "{ public void format(String s, String s1) {}}");
    }
  }

  public void testFindStaticMember() {
    myFixture.configureByText("a.java", "class A { {String s = for<caret>mat(\"\",\"\");}}");
    final IntentionAction intention = myFixture.findSingleIntention(QuickFixBundle.message("static.import.method.text"));
    assertNotNull(intention);
    myFixture.launchAction(intention);
    myFixture.checkResult("import static java.lang.String.format;\n" +
                          "\n" +
                          "class A { {String s = format(\"\",\"\");}}", false);
  }
}


text:
package org.opentosca.yamlconverter.switchmapper.typemapper;

import org.opentosca.yamlconverter.main.exceptions.NoTypeMappingException;

/**
 * @author Sebi
 */
public abstract class AbstractTypeMapper {

	/**
	 * Base names for YAML types.
	 */
	protected static final String TOSCA_RELATIONSHIPS = "tosca.relationships.";
	protected static final String TOSCA_CAPABILITIES = "tosca.capabilities.";
	protected static final String TOSCA_NODES = "tosca.nodes.";
	protected static final String TOSCA_ARTIFACTS = "tosca.artifacts.";

	/**
	 * Selects the relationship type name from XML for {@code yamlRelationshipType}.
	 *
	 * @param yamlRelationshipType name of the relationship type
	 * @return the name of its XML representation
	 * @throws org.opentosca.yamlconverter.main.exceptions.NoTypeMappingException if no mapping exists for {@code yamlRelationshipType}
	 */
	public abstract String getXmlRelationshipType(String yamlRelationshipType) throws NoTypeMappingException;

	/**
	 * Selects the capability type name from XML for {@code yamlCapabilityType}.
	 *
	 * @param yamlCapabilityType name of the capability type
	 * @return the name of its XML representation
	 * @throws org.opentosca.yamlconverter.main.exceptions.NoTypeMappingException if no mapping exists for {@code yamlCapabilityType}
	 */
	public abstract String getXmlCapabilityType(String yamlCapabilityType) throws NoTypeMappingException;

	/**
	 * Selects the interface name from XML for {@code yamlInterfaceName}.
	 *
	 * @param yamlInterfaceName name of the interface
	 * @return the name of its XML representation
	 * @throws org.opentosca.yamlconverter.main.exceptions.NoTypeMappingException if no mapping exists for {@code yamlInterfaceName}
	 */
	public abstract String getXmlInterface(String yamlInterfaceName) throws NoTypeMappingException;

	/**
	 * Selects the node type name from XML for {@code yamlNodeType}.
	 *
	 * @param yamlNodeType name of the node type
	 * @return the name of its XML representation
	 * @throws org.opentosca.yamlconverter.main.exceptions.NoTypeMappingException if no mapping exists for {@code yamlNodeType}
	 */
	public abstract String getXmlNodeType(String yamlNodeType) throws NoTypeMappingException;

	/**
	 * Selects the artifact type name from XML for {@code yamlArtifactType}.
	 *
	 * @param yamlArtifactType name of the artifact type
	 * @return the name of its XML representation
	 * @throws org.opentosca.yamlconverter.main.exceptions.NoTypeMappingException if no mapping exists for {@code yamlArtifactType}
	 */
	public abstract String getXmlArtifactType(String yamlArtifactType) throws NoTypeMappingException;

	/**
	 * Selects the requirement type name from XML for {@code yamlRequirementType}.
	 *
	 * @param yamlRequirementType name of the requirement type
	 * @return the name of its XML representation
	 * @throws org.opentosca.yamlconverter.main.exceptions.NoTypeMappingException if no mapping exists for {@code yamlRequirementType}
	 */
	public abstract String getXmlRequirementType(String yamlRequirementType) throws NoTypeMappingException;
}


text:
package com.google.api.client.googleapis.json;

import com.google.api.client.http.HttpRequest;
import com.google.api.client.http.HttpResponse;
import com.google.api.client.http.HttpStatusCodes;
import com.google.api.client.http.HttpTransport;
import com.google.api.client.http.LowLevelHttpRequest;
import com.google.api.client.json.Json;
import com.google.api.client.json.JsonFactory;
import com.google.api.client.json.JsonParser;
import com.google.api.client.json.jackson2.JacksonFactory;
import com.google.api.client.testing.http.HttpTesting;
import com.google.api.client.testing.http.MockHttpTransport;
import com.google.api.client.testing.http.MockLowLevelHttpRequest;
import com.google.api.client.testing.http.MockLowLevelHttpResponse;

import junit.framework.TestCase;

/**
 * Tests {@link GoogleJsonError}.
 *
 * @author Yaniv Inbar
 */
public class GoogleJsonErrorTest extends TestCase {

  static final JsonFactory FACTORY = new JacksonFactory();
  static final String ERROR = "{" + "\"code\":403," + "\"errors\":[{"
      + "\"domain\":\"usageLimits\"," + "\"message\":\"Access Not Configured\","
      + "\"reason\":\"accessNotConfigured\"" + "}]," + "\"message\":\"Access Not Configured\"}";
  static final String ERROR_RESPONSE = "{\"error\":" + ERROR + "}";

  public void test_json() throws Exception {
    JsonParser parser = FACTORY.createJsonParser(ERROR);
    parser.nextToken();
    GoogleJsonError e = parser.parse(GoogleJsonError.class);
    assertEquals(ERROR, FACTORY.toString(e));
  }

  static class ErrorTransport extends MockHttpTransport {
    final MockLowLevelHttpResponse response;

    ErrorTransport() {
      this(ERROR_RESPONSE, Json.MEDIA_TYPE);
    }

    ErrorTransport(String content, String contentType) {
      response = new MockLowLevelHttpResponse().setContent(content)
          .setContentType(contentType).setStatusCode(HttpStatusCodes.STATUS_CODE_FORBIDDEN);
    }

    @Override
    public LowLevelHttpRequest buildRequest(String name, String url) {
      return new MockLowLevelHttpRequest(url).setResponse(response);
    }
  }

  public void testParse() throws Exception {
    HttpTransport transport = new ErrorTransport();
    HttpRequest request =
        transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL);
    request.setThrowExceptionOnExecuteError(false);
    HttpResponse response = request.execute();
    GoogleJsonError errorResponse = GoogleJsonError.parse(FACTORY, response);
    assertEquals(ERROR, FACTORY.toString(errorResponse));
  }
}


text:
#pragma once

#include "il2cpp-config.h"

#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif

#include <stdint.h>
#include <assert.h>
#include <exception>

// System.IO.MonoIOStat
struct MonoIOStat_t1960471149;
struct MonoIOStat_t1960471149_marshaled_pinvoke;
struct MonoIOStat_t1960471149_marshaled_com;

#include "codegen/il2cpp-codegen.h"

// Methods for marshaling
struct MonoIOStat_t1960471149;
struct MonoIOStat_t1960471149_marshaled_pinvoke;

extern "C" void MonoIOStat_t1960471149_marshal_pinvoke(const MonoIOStat_t1960471149& unmarshaled, MonoIOStat_t1960471149_marshaled_pinvoke& marshaled);
extern "C" void MonoIOStat_t1960471149_marshal_pinvoke_back(const MonoIOStat_t1960471149_marshaled_pinvoke& marshaled, MonoIOStat_t1960471149& unmarshaled);
extern "C" void MonoIOStat_t1960471149_marshal_pinvoke_cleanup(MonoIOStat_t1960471149_marshaled_pinvoke& marshaled);

// Methods for marshaling
struct MonoIOStat_t1960471149;
struct MonoIOStat_t1960471149_marshaled_com;

extern "C" void MonoIOStat_t1960471149_marshal_com(const MonoIOStat_t1960471149& unmarshaled, MonoIOStat_t1960471149_marshaled_com& marshaled);
extern "C" void MonoIOStat_t1960471149_marshal_com_back(const MonoIOStat_t1960471149_marshaled_com& marshaled, MonoIOStat_t1960471149& unmarshaled);
extern "C" void MonoIOStat_t1960471149_marshal_com_cleanup(MonoIOStat_t1960471149_marshaled_com& marshaled);


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Git.Framework.Printer.Pager
{
    /// <summary>
    /// 图片坐标系
    /// </summary>
    public partial class ImageEntity : ContentEntity
    {
        public ImageEntity() { }

        public float Left { get; set; }

        public float Top { get; set; }

        public float Width { get; set; }

        public float Heigth { get; set; }
    }
}


text:
package com.ocdsoft.bacta.swg.server.controller.login;

import com.ocdsoft.bacta.soe.ServerType;
import com.ocdsoft.bacta.soe.connection.SoeUdpConnection;
import com.ocdsoft.bacta.soe.controller.ConnectionRolesAllowed;
import com.ocdsoft.bacta.soe.controller.GameNetworkMessageController;
import com.ocdsoft.bacta.soe.controller.MessageHandled;
import com.ocdsoft.bacta.swg.server.message.login.RequestExtendedClusterInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@MessageHandled(handles = RequestExtendedClusterInfo.class, type = ServerType.LOGIN)
@ConnectionRolesAllowed({})
public class RequestExtendedClusterInfoController implements GameNetworkMessageController<RequestExtendedClusterInfo> {

    private static Logger logger = LoggerFactory.getLogger(RequestExtendedClusterInfoController.class.getSimpleName());

    @Override
    public void handleIncoming(SoeUdpConnection loginConnection, RequestExtendedClusterInfo message) throws Exception {
        logger.warn("This controller is not implemented");
    }
}


text:
package org.terasology.engine.logic.delay;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.terasology.engine.TerasologyTestingEnvironment;
import org.terasology.engine.core.Time;
import org.terasology.engine.entitySystem.entity.EntityRef;
import org.terasology.gestalt.entitysystem.event.ReceiveEvent;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

@Tag("TteTest")
public class DelayedActionSystemTest extends TerasologyTestingEnvironment {

    long nextFakeEntityId = 1;
    int lookingForId; // Use this for ordering the time events. 0 is earliest.

    private DelayedActionSystem delayedActionSystem;
    private List<Integer> vals; // Use this for ordering the expected values.

    private Time time;

    @BeforeEach
    @Override
    public void setup() throws Exception {
        super.setup();

        delayedActionSystem = new DelayedActionSystem();
        nextFakeEntityId = 1;
        lookingForId = 0;

        time = mockTime;
        delayedActionSystem.setTime(mockTime);
    }

    private EntityRef createFakeEntityWith(ArbritaryDelayActionComponent arbritaryDelayActionComp) {
        EntityRef entRef = mock(EntityRef.class);
        when(entRef.getComponent(ArbritaryDelayActionComponent.class)).thenReturn(arbritaryDelayActionComp);
        when(entRef.exists()).thenReturn(true);
        when(entRef.getId()).thenReturn(nextFakeEntityId++);
        return entRef;
    }

    @Test
    public void test1DelayedAction() {
        ArbritaryDelayActionComponent a1 = new ArbritaryDelayActionComponent();
        a1.value = 3;

        vals = new ArrayList<Integer>(Arrays.asList(3));

        delayedActionSystem.addDelayedAction(createFakeEntityWith(a1),
                "Blah Blah", ((time.getGameTimeInMs() + 1000) - time.getGameTimeInMs()));
        nextFakeEntityId++;
    }

    @Test
    public void test2DelayedActionsInChronoOrder() {
        ArbritaryDelayActionComponent a1 = new ArbritaryDelayActionComponent();
        ArbritaryDelayActionComponent a2 = new ArbritaryDelayActionComponent();

        a1.value = 3;
        a2.value = 2;

        vals = new ArrayList<Integer>(Arrays.asList(3, 2));

        delayedActionSystem.addDelayedAction(createFakeEntityWith(a1),
                "First", (time.getGameTimeInMs() + 1000) - time.getGameTimeInMs());
        delayedActionSystem.addDelayedAction(createFakeEntityWith(a2),
                "Second", (time.getGameTimeInMs() + 1500) - time.getGameTimeInMs());
    }

    @Test
    public void test2DelayedActionsInReverseChronoOrder() {
        ArbritaryDelayActionComponent a1 = new ArbritaryDelayActionComponent();
        ArbritaryDelayActionComponent a2 = new ArbritaryDelayActionComponent();

        a1.value = 5;
        a2.value = 8;

        vals = new ArrayList<Integer>(Arrays.asList(5, 8));

        delayedActionSystem.addDelayedAction(createFakeEntityWith(a2),
                "Second", (time.getGameTimeInMs() + 1500) - time.getGameTimeInMs());
        delayedActionSystem.addDelayedAction(createFakeEntityWith(a1),
                "First", (time.getGameTimeInMs() + 1000) - time.getGameTimeInMs());
    }

    @Test
    public void testMultipleDelayedActionsInChronoOrder() {
        ArbritaryDelayActionComponent a1 = new ArbritaryDelayActionComponent();
        ArbritaryDelayActionComponent a2 = new ArbritaryDelayActionComponent();
        ArbritaryDelayActionComponent a3 = new ArbritaryDelayActionComponent();
        ArbritaryDelayActionComponent a4 = new ArbritaryDelayActionComponent();
        ArbritaryDelayActionComponent a5 = new ArbritaryDelayActionComponent();

        a1.value = 13;
        a2.value = 22;
        a3.value = 10;
        a4.value = 50;
        a5.value = 1;

        vals = new ArrayList<Integer>(Arrays.asList(13, 22, 10, 50, 1));

        delayedActionSystem.addDelayedAction(createFakeEntityWith(a1),
                "First", (time.getGameTimeInMs() + 1000) - time.getGameTimeInMs());
        delayedActionSystem.addDelayedAction(createFakeEntityWith(a2),
                "Second", (time.getGameTimeInMs() + 1500) - time.getGameTimeInMs());
        delayedActionSystem.addDelayedAction(createFakeEntityWith(a3),
                "Third", (time.getGameTimeInMs() + 2000) - time.getGameTimeInMs());
        delayedActionSystem.addDelayedAction(createFakeEntityWith(a4),
                "Fourth", (time.getGameTimeInMs() + 2500) - time.getGameTimeInMs());
        delayedActionSystem.addDelayedAction(createFakeEntityWith(a5),
                "Fifth", (time.getGameTimeInMs() + 3000) - time.getGameTimeInMs());
    }

    @Test
    public void testMultipleDelayedActionsInRandomOrder() {
        ArbritaryDelayActionComponent a3 = new ArbritaryDelayActionComponent();
        ArbritaryDelayActionComponent a5 = new ArbritaryDelayActionComponent();
        ArbritaryDelayActionComponent a2 = new ArbritaryDelayActionComponent();
        ArbritaryDelayActionComponent a1 = new ArbritaryDelayActionComponent();
        ArbritaryDelayActionComponent a4 = new ArbritaryDelayActionComponent();

        a1.value = 100;
        a2.value = 200;
        a3.value = 314;
        a4.value = 12;
        a5.value = 51;

        vals = new ArrayList<Integer>(Arrays.asList(100, 200, 314, 12, 51));

        delayedActionSystem.addDelayedAction(createFakeEntityWith(a3),
                "Third", (time.getGameTimeInMs() + 2000) - time.getGameTimeInMs());
        delayedActionSystem.addDelayedAction(createFakeEntityWith(a5),
                "Fifth", (time.getGameTimeInMs() + 3000) - time.getGameTimeInMs());
        delayedActionSystem.addDelayedAction(createFakeEntityWith(a2),
                "Second", (time.getGameTimeInMs() + 1500) - time.getGameTimeInMs());
        delayedActionSystem.addDelayedAction(createFakeEntityWith(a1),
                "First", (time.getGameTimeInMs() + 1000) - time.getGameTimeInMs());
        delayedActionSystem.addDelayedAction(createFakeEntityWith(a4),
                "Fourth", (time.getGameTimeInMs() + 2500) - time.getGameTimeInMs());
    }

    @ReceiveEvent
    public void finishWaiting(DelayedActionTriggeredEvent event, EntityRef entity, ArbritaryDelayActionComponent arbritaryDelayActionComp) {
        assertEquals(vals.get(lookingForId).intValue(), arbritaryDelayActionComp.value);
        lookingForId++;
    }
}


text:
package com.monospace.framework;

public interface Music {
    public void play();

    public void stop();

    public void pause();

    public void setLooping(boolean looping);

    public void setVolume(float volume);

    public boolean isPlaying();

    public boolean isStopped();

    public boolean isLooping();

    public void dispose();

	void seekBegin();
}


text:
import rclpy
from rclpy.action import ActionClient
from rclpy.node import Node
from rclpy.publisher import Publisher

from bitbots_utils.utils import get_parameter_dict
from humanoid_league_msgs.action import PlayAnimation
from bitbots_msgs.action import Dynup

from bitbots_blackboard.capsules.animation_capsule import AnimationCapsule
from bitbots_blackboard.capsules.blackboard_capsule import BlackboardCapsule
from bitbots_blackboard.capsules.game_status_capsule import GameStatusCapsule
from bitbots_blackboard.capsules.head_capsule import HeadCapsule
from bitbots_blackboard.capsules.kick_capsule import KickCapsule
from bitbots_blackboard.capsules.pathfinding_capsule import PathfindingCapsule
from bitbots_blackboard.capsules.team_data_capsule import TeamDataCapsule
from bitbots_blackboard.capsules.world_model_capsule import WorldModelCapsule

class BodyBlackboard:
    def __init__(self, node: Node):
        self.node = node

        self.config = get_parameter_dict(node, "body")
        self.base_footprint_frame = self.node.get_parameter("base_footprint_frame").get_parameter_value().string_value
        self.map_frame = self.node.get_parameter("map_frame").get_parameter_value().string_value
        self.blackboard = BlackboardCapsule(node)
        self.gamestate = GameStatusCapsule(node)
        self.animation = AnimationCapsule(node)
        self.kick = KickCapsule(self)
        self.world_model = WorldModelCapsule(self)
        self.pathfinding = PathfindingCapsule(self, node)
        self.team_data = TeamDataCapsule(node)
        # animations
        self.animation_action_client = ActionClient(node, PlayAnimation, 'animation')
        self.dynup_action_client = ActionClient(node, Dynup, 'dynup')
        self.goalie_arms_animation = self.node.get_parameter(
            "Animations.Goalie.goalieArms").get_parameter_value().string_value
        self.goalie_falling_right_animation = self.node.get_parameter(
            "Animations.Goalie.fallRight").get_parameter_value().string_value
        self.goalie_falling_left_animation = self.node.get_parameter(
            "Animations.Goalie.fallLeft").get_parameter_value().string_value
        self.goalie_falling_center_animation = self.node.get_parameter(
            "Animations.Goalie.fallCenter").get_parameter_value().string_value
        self.cheering_animation = self.node.get_parameter("Animations.Misc.cheering").get_parameter_value().string_value
        self.init_animation = self.node.get_parameter("Animations.Misc.init").get_parameter_value().string_value

        self.dynup_action_client = None
        self.dynup_cancel_pub = None  # type: Publisher
        self.hcm_deactivate_pub = None  # type: Publisher

class HeadBlackboard:
    def __init__(self, node: Node):
        self.node = node
        self.config = get_parameter_dict(node, "head")
        self.head_capsule = HeadCapsule(self)
        self.world_model = WorldModelCapsule(self)


text:
<title>ros::message_traits::IsFixedSize< ::mofs::FuzzyControl_IORequest_< ContainerAllocator > > Struct Template Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="search/search.css" rel="stylesheet" type="text/css"/>

Main Page

Namespaces

Classes

Files

          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Class List

Class Hierarchy

Class Members

 All Classes Namespaces Files Functions Variables Typedefs

ros

message_traits

IsFixedSize< ::mofs::FuzzyControl_IORequest_< ContainerAllocator > >

ros::message_traits::IsFixedSize< ::mofs::FuzzyControl_IORequest_< ContainerAllocator > > Struct Template Reference

#include <FuzzyControl_IO.h>

Inheritance diagram for ros::message_traits::IsFixedSize< ::mofs::FuzzyControl_IORequest_< ContainerAllocator > >:

[legend]

Detailed Description

template<class ContainerAllocator>

struct ros::message_traits::IsFixedSize< ::mofs::FuzzyControl_IORequest_< ContainerAllocator > >

Definition at line 135 of file FuzzyControl_IO.h.

The documentation for this struct was generated from the following file:

FuzzyControl_IO.h

mofs

Author(s): Miguel A. Olivares-Mendez

autogenerated on Wed Oct 16 2013 16:14:48


text:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:context="http://www.springframework.org/schema/context"
	xmlns:task="http://www.springframework.org/schema/task"
	xsi:schemaLocation="
		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
    	http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
    	http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd">

	<!-- ========================基本配置,入口配置======================== -->

	<!-- load config file -->
	<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
		<property name="ignoreResourceNotFound" value="true" />
		<property name="ignoreUnresolvablePlaceholders" value="true" />
		<property name="locations">
			<list>
				<value>classpath:config.properties</value>
				<!-- <value>file:D:/bussiness_resource/config.properties</value>
				<value>file:/data/bussiness_resource/config.properties</value> -->
			</list>
		</property>
	</bean>

	<!-- load xml files -->
	<import resource="springmvc.xml" />
	<import resource="dataSource.xml" />

	<!-- scan idsoy package -->
	<context:component-scan base-package="org.idsoy" />

	<!-- scan task -->
	<!-- <task:annotation-driven/> -->

</beans>


text:
using HomeSeerAPI;
using Hspi.Connector;
using Hspi.Utils;
using Nito.AsyncEx;
using NullGuard;
using Scheduler;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Globalization;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using static System.FormattableString;

namespace Hspi.Pages
{
    ///
    /// Helper class to generate configuration page for plugin
    ///
    /// <seealso cref="Scheduler.PageBuilderAndMenu.clsPageBuilder" />
    [NullGuard(ValidationFlags.Arguments | ValidationFlags.NonPublic)]
    internal class RemoteHelperConfigPage : PageHelper, IConnectionProvider
    {
        ///
        /// Initializes a new instance of the <see cref="RemoteHelperConfigPage" /> class.
        ///
        /// <param name="HS">The hs.</param>
        /// <param name="pluginConfig">The plugin configuration.</param>
        public RemoteHelperConfigPage(IHSApplication HS, PluginConfig pluginConfig) : base(HS, Name)
        {
            this.pluginConfig = pluginConfig;
        }

        ///
        /// Gets the name of the web page.
        ///
        public static string Name => pageName;

        IDeviceCommandHandler IConnectionProvider.GetCommandHandler(DeviceType deviceType)
        {
            throw new NotImplementedException();
        }

        IDeviceFeedbackProvider IConnectionProvider.GetFeedbackProvider(DeviceType deviceType)
        {
            throw new NotImplementedException();
        }

        ///
        /// Get the web page string for the configuration page.
        ///
        /// <returns>
        /// System.String.
        /// </returns>
        public string GetWebPage(string queryString)
        {
            try
            {
                NameValueCollection parts = HttpUtility.ParseQueryString(queryString);

                string pageType = parts[PageTypeId];

                reset();

                System.Text.StringBuilder stb = new System.Text.StringBuilder();
                stb.Append(HS.GetPageHeader(Name, "Configuration", string.Empty, string.Empty, false, false));

                stb.Append(PageBuilderAndMenu.clsPageBuilder.DivStart("pluginpage", ""));
                switch (pageType)
                {
                    case EditDevicePageType:
                        DeviceType deviceId = GetDeviceId(parts);
                        pluginConfig.Devices.TryGetValue(deviceId, out var device);
                        stb.Append(BuildAddNewWebPageBody(device)); break;

                    default:
                        stb.Append(BuildMainWebPageBody()); break;
                }
                stb.Append(PageBuilderAndMenu.clsPageBuilder.DivEnd());
                AddBody(stb.ToString());

                AddFooter(HS.GetPageFooter());
                suppressDefaultFooter = true;

                return BuildPage();
            }
            catch (Exception)
            {
                return "error";
            }
        }

        ///
        /// The user has selected a control on the configuration web page.
        /// The post data is provided to determine the control that initiated the post and the state of the other controls.
        ///
        /// <param name="data">The post data.</param>
        /// <param name="user">The name of logged in user.</param>
        /// <param name="userRights">The rights of the logged in user.</param>
        /// <returns>Any serialized data that needs to be passed back to the web page, generated by the clsPageBuilder class.</returns>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling")]
        public string PostBackProc(string data, [AllowNull]string user, int userRights)
        {
            NameValueCollection parts = HttpUtility.ParseQueryString(data);

            string form = parts["id"];

            if (form == NameToIdWithPrefix(SaveDeviceName))
            {
                StringBuilder results = new StringBuilder();

                // Validate
                IPAddress ipAddress = null;
                if (string.IsNullOrWhiteSpace(parts[DeviceIPId]) ||
                    !IPAddress.TryParse(parts[DeviceIPId], out ipAddress))
                {
                    results.AppendLine("IP Address is not Valid.
");
                }

                string name = parts[NameId];
                if (string.IsNullOrWhiteSpace(name))
                {
                    results.AppendLine("Name is not Valid.
");
                }

                if (results.Length > 0)
                {
                    divToUpdate.Add(SaveErrorDivId, results.ToString());
                }
                else
                {
                    DeviceType deviceId = GetDeviceId(parts);

                    var additionalValues = new Dictionary<string, string>();
                    foreach (var item in pluginConfig.Devices[deviceId].AdditionalValues)
                    {
                        additionalValues[item.Key] = parts[item.Key];
                    }

                    var enabledPorts = new SortedSet<int>();
                    foreach (var item in Enumerable.Range(1, PortsMax))
                    {
                        if (parts[NameToId(item.ToString(CultureInfo.InvariantCulture))] == "checked")
                        {
                            enabledPorts.Add(item);
                        }
                    }

                    var device = new DeviceControlConfig(deviceId, parts[NameId], ipAddress, additionalValues,
                                                         parts[NameToId(EnabledId)] == "checked");

                    try
                    {
                        using (var tmp = device.Create(this,
                                                       new AsyncProducerConsumerQueue<Devices.DeviceCommand>(),
                                                       new AsyncProducerConsumerQueue<Devices.FeedbackValue>())) { }
                        pluginConfig.UpdateDevice(device);
                        pluginConfig.FireConfigChanged();
                        divToUpdate.Add(SaveErrorDivId, RedirectPageJS(Invariant($"/{HttpUtility.UrlEncode(RemoteHelperConfigPage.Name)}")));
                    }
                    catch (Exception ex)
                    {
                        divToUpdate.Add(SaveErrorDivId, Invariant($"Some Values are invalid with Error:{ex.GetFullMessage()}"));
                    }
                }
            }
            else if (form == NameToIdWithPrefix(CancelDeviceName))
            {
                divToUpdate.Add(SaveErrorDivId, RedirectPageJS(Invariant($"/{HttpUtility.UrlEncode(RemoteHelperConfigPage.Name)}")));
            }
            else if (form == NameToIdWithPrefix(DebugLoggingId))
            {
                pluginConfig.DebugLogging = parts[NameToId(DebugLoggingId)] == "checked";
            }

            return base.postBackProc(Name, data, user, userRights);
        }

        protected string PageTypeButton(string name, string label, string type, string deviceId = null)
        {
            var b = new clsJQuery.jqButton(name, label, PageName, false)
            {
                id = NameToIdWithPrefix(name),
                url = Invariant($"/{HttpUtility.UrlEncode(RemoteHelperConfigPage.Name)}?{PageTypeId}={HttpUtility.UrlEncode(type)}&{DeviceIdId}={HttpUtility.UrlEncode(deviceId ?? string.Empty)}"),
            };

            return b.Build();
        }

        private static DeviceType GetDeviceId(NameValueCollection parts)
        {
            return (DeviceType)Enum.Parse(typeof(DeviceType), parts[DeviceIdId]);
        }

        private static string NameToId(string name)
        {
            return name.Replace(' ', '_');
        }

        private string BuildAddNewWebPageBody(DeviceControlConfig deviceConfig)
        {
            string id = deviceConfig.DeviceType.ToString();
            StringBuilder stb = new StringBuilder();

            stb.Append(PageBuilderAndMenu.clsPageBuilder.FormStart("ftmDeviceChange", "IdChange", "Post"));

            stb.Append(@"
");
            stb.Append(@"
>");
            stb.Append("

");
            stb.Append(Invariant($"
Edit {deviceConfig.DeviceType}
"));
            stb.Append(Invariant($"
Name:	{HtmlTextBox(NameId, deviceConfig.Name)}
"));
            stb.Append(Invariant($"
DeviceIP:	{HtmlTextBox(DeviceIPId, deviceConfig.DeviceIP.ToString())}
"));
            stb.Append(Invariant($"
Enabled:	{FormCheckBox(EnabledId, string.Empty, deviceConfig.Enabled, false)}
"));

            foreach (var item in deviceConfig.AdditionalValues)
            {
                stb.Append(Invariant($"
{item.Key}:	{HtmlTextBox(item.Key.ToString(), item.Value)}
"));
            }

            stb.Append(Invariant($"
{HtmlTextBox(DeviceIdId, id, type: "hidden")}

"));
            stb.Append(Invariant($"
{FormPageButton(SaveDeviceName, "Save")}"));

            stb.Append(FormPageButton(CancelDeviceName, "Cancel"));
            stb.Append(Invariant($"
"));
            stb.Append("

");
            stb.Append(@"
");
            stb.Append(@"
");
            stb.Append(PageBuilderAndMenu.clsPageBuilder.FormEnd());

            return stb.ToString();
        }

        private string BuildMainWebPageBody()
        {
            StringBuilder stb = new StringBuilder();

            stb.Append(@"
");
            stb.Append(@"
");
            stb.Append("

");
            stb.Append("
Devices
");
            stb.Append(@"
" +
                        "Type	" +
                        "Name	" +
                        "Device IP Address	" +
                        "Additional Values	" +
                         "
");

            foreach (var device in pluginConfig.Devices)
            {
                stb.Append(@"
");
                stb.Append(Invariant($"{device.Value.DeviceType}	"));
                stb.Append(Invariant($"{device.Value.Name}	"));
                stb.Append(Invariant($"{device.Value.DeviceIP}	"));
                stb.Append(@"");
                foreach (var item in device.Value.AdditionalValues)
                {
                    stb.Append(Invariant($"{item.Key}:{item.Value}
"));
                }

                stb.Append("	");
                stb.Append(Invariant($"{PageTypeButton(Invariant($"Edit{device.Key}"), "Edit", EditDevicePageType, deviceId: device.Key.ToString())}
 "));
            }

            stb.Append("

");
            stb.Append(Invariant($"
"));
            stb.Append(PageBuilderAndMenu.clsPageBuilder.FormStart("ftmSettings", "Id", "Post"));
            stb.Append(Invariant($"Debug Logging Enabled:{FormCheckBox(DebugLoggingId, string.Empty, pluginConfig.DebugLogging, true)}"));
            stb.Append(PageBuilderAndMenu.clsPageBuilder.FormEnd());
            stb.Append("
");

            stb.Append(Invariant($"

"));
            stb.Append(@"

");
            stb.Append(@"
");
            stb.Append(@"
");

            return stb.ToString();
        }

        private const string CancelDeviceName = "CancelDeviceName";
        private const string DebugLoggingId = "DebugLoggingId";
        private const string DeviceIdId = "DeviceIdId";
        private const string DeviceIPId = "DeviceIPId";
        private const string EditDevicePageType = "addNew";
        private const string EnabledId = "EnabledId";
        private const string NameId = "NameId";
        private const int PortsMax = 8;
        private const string SaveDeviceName = "SaveButton";
        private const string SaveErrorDivId = "message_id";
        private static readonly string pageName = Invariant($"{PluginData.PluginName} Configuration").Replace(' ', '_');
        private readonly PluginConfig pluginConfig;
    }
}


text:
Parsed configuration options
============================

    format: html
    highlight_code: false
    include_styles: true
    isbn: null
    labels: [array]
        0: appendix
        1: chapter
        2: figure
    margin: [array]
        top: 25mm
        bottom: 25mm
        inner: 30mm
        outter: 20mm
    page_size: A4
    theme: clean
    toc: [array]
        deep: 2
        elements: [array]
            0: appendix
            1: chapter
    two_sided: true
    price: 10
    pages: 250
    option1: Value of option1
    option2: [array]
        suboption1: Value of suboption1
        suboption2: Value of the second suboption


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

using AutoMapper;
using Microsoft.Azure.Commands.Network.Models;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using Microsoft.Azure.Commands.ResourceManager.Common.Tags;
using Microsoft.Azure.Management.Network;
using Microsoft.Azure.Management.Network.Models;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Management.Automation;

namespace Microsoft.Azure.Commands.Network
{
    [Cmdlet(VerbsCommon.Remove, "AzureRmNetworkWatcherConnectionMonitor", SupportsShouldProcess = true, DefaultParameterSetName = "SetByResource"),
        OutputType(typeof(bool))]
    public class RemoveAzureNetworkWatcherConnectionMonitorCommand : ConnectionMonitorBaseCmdlet
    {
        [Parameter(
             Mandatory = true,
             ValueFromPipeline = true,
             HelpMessage = "The network watcher resource.",
             ParameterSetName = "SetByResource")]
        [ValidateNotNull]
        public PSNetworkWatcher NetworkWatcher { get; set; }

        [Parameter(
            Mandatory = true,
            ValueFromPipelineByPropertyName = true,
            HelpMessage = "The name of network watcher.",
            ParameterSetName = "SetByName")]
        [ValidateNotNullOrEmpty]
        public string NetworkWatcherName { get; set; }

        [Parameter(
            Mandatory = true,
            ValueFromPipelineByPropertyName = true,
            HelpMessage = "The name of the network watcher resource group.",
            ParameterSetName = "SetByName")]
        [ResourceGroupCompleter]
        [ValidateNotNullOrEmpty]
        public string ResourceGroupName { get; set; }

        [Parameter(
            Mandatory = true,
            ValueFromPipelineByPropertyName = true,
            HelpMessage = "Location of the network watcher.",
            ParameterSetName = "SetByLocation")]
        [LocationCompleterAttribute]
        [ValidateNotNull]
        public string Location { get; set; }

        [Parameter(
            Mandatory = true,
            ValueFromPipelineByPropertyName = true,
            HelpMessage = "Resource ID.",
            ParameterSetName = "SetByResourceId")]
        [ValidateNotNull]
        public string ResourceId { get; set; }

        [Parameter(
            Mandatory = true,
            ValueFromPipelineByPropertyName = true,
            HelpMessage = "Connection monitor object.",
            ParameterSetName = "SetByInputObject")]
        [ValidateNotNull]
        public PSConnectionMonitorResult InputObject { get; set; }

        [Alias("ConnectionMonitorName")]
        [Parameter(
            Mandatory = false,
            ValueFromPipelineByPropertyName = true,
            HelpMessage = "The connection monitor name.")]
        [ValidateNotNullOrEmpty]
        public string Name { get; set; }

        [Parameter(Mandatory = false)]
        public SwitchParameter PassThru { get; set; }

        [Parameter(Mandatory = false, HelpMessage = "Run cmdlet in the background")]
        public SwitchParameter AsJob { get; set; }

        public override void Execute()
        {
            base.Execute();

            string connectionMonitorName = this.Name;
            string resourceGroupName = string.Empty;
            string networkWatcherName = string.Empty;

            if (ParameterSetName.Contains("SetByResourceId"))
            {
                ConnectionMonitorDetails connectionMonitorDetails = new ConnectionMonitorDetails();
                connectionMonitorDetails = this.GetConnectionMonitorDetails(this.ResourceId);

                connectionMonitorName = connectionMonitorDetails.ConnectionMonitorName;
                resourceGroupName = connectionMonitorDetails.ResourceGroupName;
                networkWatcherName = connectionMonitorDetails.NetworkWatcherName;
            }
            else if (ParameterSetName.Contains("SetByResource"))
            {
                resourceGroupName = this.NetworkWatcher.ResourceGroupName;
                networkWatcherName = this.NetworkWatcher.Name;
            }
            else if (ParameterSetName.Contains("SetByName"))
            {
                resourceGroupName = this.ResourceGroupName;
                networkWatcherName = this.NetworkWatcherName;
            }
            else if (ParameterSetName.Contains("SetByInputObject"))
            {
                ConnectionMonitorDetails connectionMonitorDetails = new ConnectionMonitorDetails();
                connectionMonitorDetails = this.GetConnectionMonitorDetails(this.InputObject.Id);

                connectionMonitorName = connectionMonitorDetails.ConnectionMonitorName;
                resourceGroupName = connectionMonitorDetails.ResourceGroupName;
                networkWatcherName = connectionMonitorDetails.NetworkWatcherName;
            }
            else
            {
                var networkWatcher = this.GetNetworkWatcherByLocation(this.Location);

                if (networkWatcher == null)
                {
                    throw new ArgumentException("There is no network watcher in the specified location");
                }

                resourceGroupName = NetworkBaseCmdlet.GetResourceGroup(networkWatcher.Id);
                networkWatcherName = networkWatcher.Name;
            }

            ConfirmAction(
                Properties.Resources.RemoveResourceMessage,
                connectionMonitorName,
                () =>
                {
                    this.ConnectionMonitors.Delete(resourceGroupName, networkWatcherName, connectionMonitorName);

                    if (PassThru)
                    {
                        WriteObject(true);
                    }
                });
        }
    }
}


text:
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Runtime.CompilerServices;

namespace Fakes.Contrib.Helpers
{
    internal static class AssertHelper
    {
        public static void HandleFail([CallerMemberName] string assertionName = null, string message = "", params object[] parameters)
        {
            var args = string.Format(message ?? "", parameters ?? new object[0]);
            var msg = $"{assertionName} failed. {args}";

            throw new AssertFailedException(msg);
        }
    }
}


text:
class Node:
    __slots__ = ('data', 'link')

    def __init__(self, data = None, link = None):
        self.data = data
        self.link = link

#FIFO
class Queue:
    __slots__ = ('front', 'back')

    def __init__(self):
        self.front = self.back = None

    def isEmpty(self):
        return self.front == None

    def printQ(self):
        print '-' * 8

        if(self.isEmpty()):
            print "Empty Queue!"
        else:
            node = self.front
            while node != None:
                print node.data.getTitle()
                node = node.link

        print '=' * 8

    def enqueue(self, node):
        node.link = None #security
        if(self.isEmpty()):
            self.back = self.front = node
        else:
            self.back.link = node
            self.back = node

    def dequeue(self):
        if self.isEmpty():
            print "Empty Queue! Dequeue is not allowed!"
            return None
        else:
            node = self.front
            self.front = node.link
            if(self.front == None): self.back = self.front
            return node.data

#LIFO
class Stack:
    __slots__ = ('top')

    def __init__(self):
        self.top = None

    def isEmpty(self):
        return self.top == None

    def printStack(self):
        print "-" * 8
        if(self.isEmpty()):
            print "Empty Stack!"
        else:
            node = self.top
            while node != None:
                print node.data.getTitle()
                node = node.link

        print "=" * 8

    def push(self, node):
        if self.isEmpty():
            node.link = None
            self.top = node
        else:
            node.link = self.top
            self.top = node

    def pop(self):
        if self.isEmpty():
            print "Empty Stack! Pop is not allowed!"
            return None
        else:
            node = self.top
            self.top = self.top.link
            return node.data


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

	<!-- nbn crud library -->

    <parent>
        <groupId>uk.org.nbn</groupId>
        <artifactId>nbnv</artifactId>
        <version>0.1-SNAPSHOT</version>
    </parent>

    <artifactId>nbnv-crud</artifactId>

    <name>${project.artifactId}-${project.version}</name>

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

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.persistence</groupId>
            <artifactId>javax.persistence</artifactId>
            <version>2.0.3</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.persistence</groupId>
            <artifactId>org.eclipse.persistence.jpa.modelgen.processor</artifactId>
            <version>2.3.0</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.persistence</groupId>
            <artifactId>org.eclipse.persistence.jpa.modelgen</artifactId>
            <version>2.3.0</version>
        </dependency>
        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>jsr250-api</artifactId>
            <version>1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.transaction</groupId>
            <artifactId>jta</artifactId>
            <version>1.1</version>
            <scope>provided</scope>
        </dependency>
        <!-- http://stackoverflow.com/questions/6942407/setting-up-maven-dependency-for-sql-server -->
        <dependency>
            <groupId>com.microsoft.sqlserver</groupId>
            <artifactId>sqljdbc4</artifactId>
            <version>4.0</version>
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <version>1.0.0.GA</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>4.3.0.Final</version>
        </dependency>
    </dependencies>
    <repositories>
        <repository>
            <url>http://download.eclipse.org/rt/eclipselink/maven.repo/</url>
            <id>eclipselink</id>
            <layout>default</layout>
            <name>Repository for library Library[eclipselink]</name>
        </repository>
    </repositories>

</project>


text:
require 'user_agent'

describe "UserAgent: 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)'" do
  before do
    @useragent = UserAgent.parse("Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)")
  end

  it { expect(@useragent).to be_bot }
end

describe "UserAgent: 'Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)'" do
  before do
    @useragent = UserAgent.parse("Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)")
  end

  it { expect(@useragent).to be_bot }
end

describe "UserAgent: 'Twitterbot/1.0'" do
  before do
    @useragent = UserAgent.parse("Twitterbot/1.0")
  end

  it { expect(@useragent).to be_bot}
end

describe "UserAgent: Mozilla/5.0 (iPhone; CPU iPhone OS 8_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12B411 Safari/600.1.4 (compatible; YandexMobileBot/3.0; +http://yandex.com/bots)" do
  before do
    @useragent = UserAgent.parse("Mozilla/5.0 (iPhone; CPU iPhone OS 8_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12B411 Safari/600.1.4 (compatible; YandexMobileBot/3.0; +http://yandex.com/bots)")
  end

  it { expect(@useragent).to be_bot}
end

describe "UserAgent: Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" do
  before do
    @useragent = UserAgent.parse("Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)")
  end

  it { expect(@useragent).to be_bot}
end


text:
'use strict';

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }

var React = require('react');
var StylePropable = require('../mixins/style-propable');
var WindowListenable = require('../mixins/window-listenable');
var TimePickerDialog = require('./time-picker-dialog');
var TextField = require('../text-field');
var ThemeManager = require('../styles/theme-manager');
var DefaultRawTheme = require('../styles/raw-themes/light-raw-theme');

var emptyTime = new Date();
emptyTime.setHours(0);
emptyTime.setMinutes(0);
emptyTime.setSeconds(0);
emptyTime.setMilliseconds(0);

var TimePicker = React.createClass({
  displayName: 'TimePicker',

  mixins: [StylePropable, WindowListenable],

  propTypes: {
    autoOk: React.PropTypes.bool,
    defaultTime: React.PropTypes.object,
    format: React.PropTypes.oneOf(['ampm', '24hr']),
    pedantic: React.PropTypes.bool,
    onFocus: React.PropTypes.func,
    onTouchTap: React.PropTypes.func,
    onChange: React.PropTypes.func,
    onShow: React.PropTypes.func,
    onDismiss: React.PropTypes.func,
    style: React.PropTypes.object,
    textFieldStyle: React.PropTypes.object
  },

  contextTypes: {
    muiTheme: React.PropTypes.object
  },

  windowListeners: {
    'keyup': '_handleWindowKeyUp'
  },

  getDefaultProps: function getDefaultProps() {
    return {
      defaultTime: null,
      format: 'ampm',
      pedantic: false,
      autoOk: false,
      style: {}
    };
  },

  getInitialState: function getInitialState() {
    return {
      time: this.props.defaultTime || emptyTime,
      dialogTime: new Date(),
      muiTheme: this.context.muiTheme ? this.context.muiTheme : ThemeManager.getMuiTheme(DefaultRawTheme)
    };
  },

  formatTime: function formatTime(date) {
    var hours = date.getHours();
    var mins = date.getMinutes().toString();

    if (this.props.format === "ampm") {
      var isAM = hours < 12;
      hours = hours % 12;
      var additional = isAM ? " am" : " pm";
      hours = (hours || 12).toString();

      if (mins.length < 2) mins = "0" + mins;

      if (this.props.pedantic) {
        // Treat midday/midnight specially http://www.nist.gov/pml/div688/times.cfm
        if (hours === "12" && mins === "00") {
          return additional === " pm" ? "12 noon" : "12 midnight";
        }
      }

      return hours + (mins === "00" ? "" : ":" + mins) + additional;
    }

    hours = hours.toString();

    if (hours.length < 2) hours = "0" + hours;
    if (mins.length < 2) mins = "0" + mins;

    return hours + ":" + mins;
  },

  render: function render() {
    var _props = this.props;
    var autoOk = _props.autoOk;
    var format = _props.format;
    var onFocus = _props.onFocus;
    var onTouchTap = _props.onTouchTap;
    var onShow = _props.onShow;
    var onDismiss = _props.onDismiss;
    var style = _props.style;
    var textFieldStyle = _props.textFieldStyle;

    var other = _objectWithoutProperties(_props, ['autoOk', 'format', 'onFocus', 'onTouchTap', 'onShow', 'onDismiss', 'style', 'textFieldStyle']);

    var defaultInputValue = undefined;

    if (this.props.defaultTime) {
      defaultInputValue = this.formatTime(this.props.defaultTime);
    }

    return React.createElement(
      'div',
      { style: this.prepareStyles(style) },
      React.createElement(TextField, _extends({}, other, {
        style: textFieldStyle,
        ref: 'input',
        defaultValue: defaultInputValue,
        onFocus: this._handleInputFocus,
        onTouchTap: this._handleInputTouchTap })),
      React.createElement(TimePickerDialog, {
        ref: 'dialogWindow',
        initialTime: this.state.dialogTime,
        onAccept: this._handleDialogAccept,
        onShow: onShow,
        onDismiss: onDismiss,
        format: format,
        autoOk: autoOk })
    );
  },

  getTime: function getTime() {
    return this.state.time;
  },

  setTime: function setTime(t) {
    if (t) {
      this.setState({
        time: t
      });

      this.refs.input.setValue(this.formatTime(t));
    } else {
      this.setState({
        time: emptyTime
      });

      this.refs.input.setValue(null);
    }
  },

  /**
   * Alias for `openDialog()` for an api consistent with TextField.
   */
  focus: function focus() {
    this.openDialog();
  },

  openDialog: function openDialog() {
    this.setState({
      dialogTime: this.getTime()
    });

    this.refs.dialogWindow.show();
  },

  _handleDialogAccept: function _handleDialogAccept(t) {
    this.setTime(t);
    if (this.props.onChange) this.props.onChange(null, t);
  },

  _handleInputFocus: function _handleInputFocus(e) {
    e.target.blur();
    if (this.props.onFocus) this.props.onFocus(e);
  },

  _handleInputTouchTap: function _handleInputTouchTap(e) {
    e.preventDefault();

    this.openDialog();

    if (this.props.onTouchTap) this.props.onTouchTap(e);
  }
});

module.exports = TimePicker;


text:
typedef enum {
    MYPAINT_BRUSH_INPUT_PRESSURE,
    MYPAINT_BRUSH_INPUT_SPEED1,
    MYPAINT_BRUSH_INPUT_SPEED2,
    MYPAINT_BRUSH_INPUT_RANDOM,
    MYPAINT_BRUSH_INPUT_STROKE,
    MYPAINT_BRUSH_INPUT_DIRECTION,
    MYPAINT_BRUSH_INPUT_TILT_DECLINATION,
    MYPAINT_BRUSH_INPUT_TILT_ASCENSION,
    MYPAINT_BRUSH_INPUT_CUSTOM,
    MYPAINT_BRUSH_INPUTS_COUNT
} MyPaintBrushInput;

typedef enum {
    MYPAINT_BRUSH_SETTING_OPAQUE,
    MYPAINT_BRUSH_SETTING_OPAQUE_MULTIPLY,
    MYPAINT_BRUSH_SETTING_OPAQUE_LINEARIZE,
    MYPAINT_BRUSH_SETTING_RADIUS_LOGARITHMIC,
    MYPAINT_BRUSH_SETTING_HARDNESS,
    MYPAINT_BRUSH_SETTING_ANTI_ALIASING,
    MYPAINT_BRUSH_SETTING_DABS_PER_BASIC_RADIUS,
    MYPAINT_BRUSH_SETTING_DABS_PER_ACTUAL_RADIUS,
    MYPAINT_BRUSH_SETTING_DABS_PER_SECOND,
    MYPAINT_BRUSH_SETTING_RADIUS_BY_RANDOM,
    MYPAINT_BRUSH_SETTING_SPEED1_SLOWNESS,
    MYPAINT_BRUSH_SETTING_SPEED2_SLOWNESS,
    MYPAINT_BRUSH_SETTING_SPEED1_GAMMA,
    MYPAINT_BRUSH_SETTING_SPEED2_GAMMA,
    MYPAINT_BRUSH_SETTING_OFFSET_BY_RANDOM,
    MYPAINT_BRUSH_SETTING_OFFSET_BY_SPEED,
    MYPAINT_BRUSH_SETTING_OFFSET_BY_SPEED_SLOWNESS,
    MYPAINT_BRUSH_SETTING_SLOW_TRACKING,
    MYPAINT_BRUSH_SETTING_SLOW_TRACKING_PER_DAB,
    MYPAINT_BRUSH_SETTING_TRACKING_NOISE,
    MYPAINT_BRUSH_SETTING_COLOR_H,
    MYPAINT_BRUSH_SETTING_COLOR_S,
    MYPAINT_BRUSH_SETTING_COLOR_V,
    MYPAINT_BRUSH_SETTING_RESTORE_COLOR,
    MYPAINT_BRUSH_SETTING_CHANGE_COLOR_H,
    MYPAINT_BRUSH_SETTING_CHANGE_COLOR_L,
    MYPAINT_BRUSH_SETTING_CHANGE_COLOR_HSL_S,
    MYPAINT_BRUSH_SETTING_CHANGE_COLOR_V,
    MYPAINT_BRUSH_SETTING_CHANGE_COLOR_HSV_S,
    MYPAINT_BRUSH_SETTING_SMUDGE,
    MYPAINT_BRUSH_SETTING_SMUDGE_LENGTH,
    MYPAINT_BRUSH_SETTING_SMUDGE_RADIUS_LOG,
    MYPAINT_BRUSH_SETTING_ERASER,
    MYPAINT_BRUSH_SETTING_STROKE_THRESHOLD,
    MYPAINT_BRUSH_SETTING_STROKE_DURATION_LOGARITHMIC,
    MYPAINT_BRUSH_SETTING_STROKE_HOLDTIME,
    MYPAINT_BRUSH_SETTING_CUSTOM_INPUT,
    MYPAINT_BRUSH_SETTING_CUSTOM_INPUT_SLOWNESS,
    MYPAINT_BRUSH_SETTING_ELLIPTICAL_DAB_RATIO,
    MYPAINT_BRUSH_SETTING_ELLIPTICAL_DAB_ANGLE,
    MYPAINT_BRUSH_SETTING_DIRECTION_FILTER,
    MYPAINT_BRUSH_SETTING_LOCK_ALPHA,
    MYPAINT_BRUSH_SETTING_COLORIZE,
    MYPAINT_BRUSH_SETTING_SNAP_TO_PIXEL,
    MYPAINT_BRUSH_SETTING_PRESSURE_GAIN_LOG,
    MYPAINT_BRUSH_SETTINGS_COUNT
} MyPaintBrushSetting;

typedef enum {
    MYPAINT_BRUSH_STATE_X,
    MYPAINT_BRUSH_STATE_Y,
    MYPAINT_BRUSH_STATE_PRESSURE,
    MYPAINT_BRUSH_STATE_PARTIAL_DABS,
    MYPAINT_BRUSH_STATE_ACTUAL_RADIUS,
    MYPAINT_BRUSH_STATE_SMUDGE_RA,
    MYPAINT_BRUSH_STATE_SMUDGE_GA,
    MYPAINT_BRUSH_STATE_SMUDGE_BA,
    MYPAINT_BRUSH_STATE_SMUDGE_A,
    MYPAINT_BRUSH_STATE_LAST_GETCOLOR_R,
    MYPAINT_BRUSH_STATE_LAST_GETCOLOR_G,
    MYPAINT_BRUSH_STATE_LAST_GETCOLOR_B,
    MYPAINT_BRUSH_STATE_LAST_GETCOLOR_A,
    MYPAINT_BRUSH_STATE_LAST_GETCOLOR_RECENTNESS,
    MYPAINT_BRUSH_STATE_ACTUAL_X,
    MYPAINT_BRUSH_STATE_ACTUAL_Y,
    MYPAINT_BRUSH_STATE_NORM_DX_SLOW,
    MYPAINT_BRUSH_STATE_NORM_DY_SLOW,
    MYPAINT_BRUSH_STATE_NORM_SPEED1_SLOW,
    MYPAINT_BRUSH_STATE_NORM_SPEED2_SLOW,
    MYPAINT_BRUSH_STATE_STROKE,
    MYPAINT_BRUSH_STATE_STROKE_STARTED,
    MYPAINT_BRUSH_STATE_CUSTOM_INPUT,
    MYPAINT_BRUSH_STATE_RNG_SEED,
    MYPAINT_BRUSH_STATE_ACTUAL_ELLIPTICAL_DAB_RATIO,
    MYPAINT_BRUSH_STATE_ACTUAL_ELLIPTICAL_DAB_ANGLE,
    MYPAINT_BRUSH_STATE_DIRECTION_DX,
    MYPAINT_BRUSH_STATE_DIRECTION_DY,
    MYPAINT_BRUSH_STATE_DECLINATION,
    MYPAINT_BRUSH_STATE_ASCENSION,
    MYPAINT_BRUSH_STATES_COUNT
} MyPaintBrushState;


text:
<!doctype html>

    <title>To do List - homework</title>

    <link href="css/styles.css" rel="stylesheet" />
    <meta charset="utf-8" />

Make your "TODO" List

        <form id="create-todo">
            <input name="item" placeholder="Add task..." required="required" />
            <button type="submit">Add</button>
        </form>

            <button id="show-item">Show All</button>
            <button id="hide-item">Hide</button>
            <button id="delete-item">Delete</button>
            <button id="deleteAll-items">Delete All</button>


text:
package com.emmbi.mobile.example.fragments.toolbar;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.emmbi.R;

/**
 * Created by mbagliojr on 2/23/15.
 */
public class BasicToolbarFragment extends Fragment {

    public View view;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        super.onCreateView(inflater, container, savedInstanceState);

        view = inflater.inflate(R.layout.base_back_button_toolbar,
                container, false);

        return view;
    }

    public void setTitle(String title) {
        ((TextView) view.findViewById(R.id.toolbar_title)).setText(title);
    }
}


text:
'use strict';

var http = require('http');
var app = require('./lib/app');
var port = app.get('port');
var env = app.get('env');

app.services.database.sequelize.sync({ force: true }).then(function() {
  http.createServer(app).listen(port, function() {
    console.log('Server listening in %s mode on port %d', env, port);
  });
});


text:
using DomainModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ServiceLayer
{
    public interface ICurrencyService
    {
        void AddCurrency(Currency currency);
        Currency GetCurrencyByName(String currencyName);
        void DropCurrency(String currencyName);
    }
}


text:
#include <mongoc/mongoc.h>
#include "mongoc/mongoc-client-private.h"

#include "TestSuite.h"
#include "mock_server/mock-server.h"
#include "mock_server/future.h"
#include "mock_server/future-functions.h"
#include "test-conveniences.h"
#include "test-libmongoc.h"

static void
_test_query_flag (mongoc_query_flags_t flag, bson_t *opt)
{
   mock_server_t *server;
   mongoc_client_t *client;
   mongoc_collection_t *collection;
   mongoc_cursor_t *cursor;
   bson_error_t error;
   future_t *future;
   request_t *request;
   const bson_t *doc;

   server = mock_server_with_auto_hello (WIRE_VERSION_MAX);
   mock_server_run (server);
   client =
      test_framework_client_new_from_uri (mock_server_get_uri (server), NULL);
   collection = mongoc_client_get_collection (client, "db", "collection");
   cursor = mongoc_collection_aggregate (
      collection, flag, tmp_bson ("{'pipeline': []}"), opt, NULL);

   ASSERT_OR_PRINT (!mongoc_cursor_error (cursor, &error), error);

   /* "aggregate" command */
   future = future_cursor_next (cursor, &doc);
   request =
      mock_server_receives_msg (server,
                                MONGOC_QUERY_NONE,
                                tmp_bson ("{'aggregate': 'collection',"
                                          " 'pipeline': [ ],"
                                          " 'tailable': {'$exists': false}}"));
   ASSERT (request);
   mock_server_replies_simple (request,
                               "{'ok': 1,"
                               " 'cursor': {"
                               "    'id': {'$numberLong': '123'},"
                               "    'ns': 'db.collection',"
                               "    'nextBatch': [{}]}}");
   ASSERT (future_get_bool (future));
   request_destroy (request);
   future_destroy (future);

   /* "getMore" command */
   future = future_cursor_next (cursor, &doc);
   request =
      mock_server_receives_msg (server,
                                MONGOC_QUERY_NONE,
                                tmp_bson ("{'getMore': {'$numberLong': '123'},"
                                          " 'collection': 'collection',"
                                          " 'tailable': {'$exists': false}}"));
   ASSERT (request);
   mock_server_replies_simple (request,
                               "{'ok': 1,"
                               " 'cursor': {"
                               "    'id': {'$numberLong': '0'},"
                               "    'ns': 'db.collection',"
                               "    'nextBatch': [{}]}}");

   ASSERT (future_get_bool (future));

   request_destroy (request);
   future_destroy (future);
   mongoc_cursor_destroy (cursor);
   mongoc_collection_destroy (collection);
   mongoc_client_destroy (client);
   mock_server_destroy (server);
}

static void
test_query_flags (void)
{
   int i;

   typedef struct {
      mongoc_query_flags_t flag;
      bson_t *opt;
   } flag_and_opt_t;

   flag_and_opt_t flags_and_opts[] = {
      {MONGOC_QUERY_TAILABLE_CURSOR, tmp_bson ("{'tailable': true}")},
      {MONGOC_QUERY_TAILABLE_CURSOR | MONGOC_QUERY_AWAIT_DATA,
       tmp_bson ("{'tailable': true, 'awaitData': true}")}};

   /* test with both flag and opt */
   for (i = 0; i < (sizeof flags_and_opts) / (sizeof (flag_and_opt_t)); i++) {
      _test_query_flag (flags_and_opts[i].flag, NULL);
      _test_query_flag (MONGOC_QUERY_NONE, flags_and_opts[i].opt);
   }
}

void
test_aggregate_install (TestSuite *suite)
{
   TestSuite_AddMockServerTest (
      suite, "/Aggregate/query_flags", test_query_flags);
}


text:
<?xml version="1.0" encoding="utf-8"?>
<localization xmlns="obout:grid:localization-schema">
  <grid
     page_size_text  = "Записи на стр.:"
     records_text    = "Записи:"
     to_text         = "-"
     of_text         = "от"
     pages_text      = "Стр.:"
     loading_text    = "Зареждане..."
     no_records_text = "Няма съществуващи записи."
     resizing_tooltip_width = "широчина:"
     resizing_tooltip_pixels = "pixels"
     type_validation_error = "Стойността, коята въведохте в колона XXXXX е невалидна."
     maxlength_validation_error = "Стойността, която въведохте в колона XXXXX превишава максимума от YYYYY символа позволен в колоната."
     js_warning = "Грешка при ициализаране на Grid със  ID '[GRID_ID]'.\n\n[WARNING]\n\nМоля, информирайте на geryon.dzzd@gmail.com !"
     >

    <commands
      add_link	      = "Добави нов"
      edit_link       = "Редакция"
      delete_link     = "Изтриване"
      update_link     = "Обновяване"
      cancel_link     = "Отказ"
      save_link       = "Запис"
      save_all_link   = "Запази всички"
      cancel_all_link = "Откажи всички"
      remove_link     = "Премахни"
      modify_link     = "Модифицирай"
      undelete_link   = "Възстанови"
    />

    <filter
      button_show_filter   = "Покажи филтър"
      button_hide_filter   = "Скрий"
      button_filter        = "Приложи"
      button_remove_filter = "Премахни"

      filter_criteria_nofilter                 = "Няма филтър"
      filter_criteria_contains                 = "Съдържа"
      filter_criteria_does_not_contain         = "Не съдържа"
      filter_criteria_starts_with              = "Започва със"
      filter_criteria_ends_with                = "Завършва със"
      filter_criteria_equal_to                 = "Равно на"
      filter_criteria_not_equal_to             = "Не е равно на"
      filter_criteria_smaller_than             = "Помалко от"
      filter_criteria_greater_than             = "Поголямо от"
      filter_criteria_smaller_than_or_equal_to = "Помалко от или равно на"
      filter_criteria_greater_than_or_equal_to = "Поголямо от или равно на"
      filter_criteria_is_null                  = "Е Null"
      filter_criteria_is_not_null              = "Не е Null"
      filter_criteria_is_empty                 = "Празно"
      filter_criteria_is_not_empty             = "Не е празно"
    />

    <grouping
      grouping_area_text = "Постави заглавието на колоната ТУК за групиране ."
      group_information_count = " (XXXXX записа)"
      group_information_count_single = " (XXXXX запис)"
      group_information_next_page = " (Показани са  XXXXX от YYYYY записа - Тази група продължава на следващата страница)"
      group_information_previous_page = " (Показани са XXXXX от YYYYY записа - Тази група започва от предишна страница)"
      group_information_previous_next_page = " (Показани са XXXXX от YYYYY записа -Тази група започва от предишна страница и продължава на следващата страница)"
    />

    <paging
      total_number_of_pages  = " (Стр. XXXXX)"
      manual_paging_link  = "Отиди на стр. »"
      page_size_options_all = "Всички"
    />

  </grid>
</localization>