text:
from pathlib import Path
from tempfile import TemporaryDirectory
from ..core.model import OpenVINOModel
from bigdl.nano.utils.inference.tf.model import AcceleratedKerasModel
from .utils import export
from .dataloader import KerasOpenVINODataLoader
from .metric import KerasOpenVINOMetric
import tensorflow as tf
from bigdl.nano.utils.log4Error import invalidInputError
from ..core.utils import save

class KerasOpenVINOModel(AcceleratedKerasModel):
    def __init__(self, model, thread_num=None, config=None, logging=True):
        """
        Create a OpenVINO model from Keras.

        :param model: Keras model to be converted to OpenVINO for inference or
                      path to Openvino saved model.
        :param thread_num: a int represents how many threads(cores) is needed for
                    inference. default: None.
        :param config: The config to be inputted in core.compile_model.
                       inference. default: None.
        :param logging: whether to log detailed information of model conversion.
                        default: True.
        """
        ov_model_path = model
        with TemporaryDirectory() as dir:
            dir = Path(dir)
            if isinstance(model, tf.keras.Model):
                export(model, str(dir / 'tmp.xml'), logging=logging)
                ov_model_path = dir / 'tmp.xml'
            self.ov_model = OpenVINOModel(ov_model_path,
                                          thread_num=thread_num,
                                          config=config)
            super().__init__(None)

    def forward_step(self, *inputs):
        return self.ov_model.forward_step(*inputs)

    def on_forward_start(self, inputs):
        self.ov_model._model_exists_or_err()
        inputs = self.tensors_to_numpy(inputs)
        return inputs

    def on_forward_end(self, outputs):
        outputs = tuple(outputs.values())
        if len(outputs) == 1:
            outputs = outputs[0]
        return outputs

    @property
    def status(self):
        status = super().status
        status.update({"xml_path": 'ov_saved_model.xml',
                       "weight_path": 'ov_saved_model.bin',
                       "config": self.ov_model.final_config})
        return status

    def pot(self,
            dataset,
            metric=None,
            higher_better=True,
            drop_type="relative",
            maximal_drop=0.999,
            max_iter_num=1,
            n_requests=None,
            config=None,
            sample_size=300,
            thread_num=None):
        if metric:
            metric = KerasOpenVINOMetric(metric=metric, higher_better=higher_better)
        dataloader = KerasOpenVINODataLoader(dataset, collate_fn=self.tensors_to_numpy)
        model = self.ov_model.pot(dataloader, metric=metric, drop_type=drop_type,
                                  maximal_drop=maximal_drop, max_iter_num=max_iter_num,
                                  n_requests=n_requests, sample_size=sample_size)
        return KerasOpenVINOModel(model, config=config, thread_num=thread_num)

    @staticmethod
    def _load(path):
        """
        Load an OpenVINO model for inference from directory.

        :param path: Path to model to be loaded.
        :return: KerasOpenVINOModel model for OpenVINO inference.
        """
        status = KerasOpenVINOModel._load_status(path)
        if status.get('xml_path', None):
            xml_path = Path(status['xml_path'])
            invalidInputError(xml_path.suffix == '.xml',
                              "Path of openvino model must be with '.xml' suffix.")
        else:
            invalidInputError(False, "nano_model_meta.yml must specify 'xml_path' for loading.")
        xml_path = Path(path) / status['xml_path']
        return KerasOpenVINOModel(xml_path, config=status['config'])

    def _save_model(self, path):
        """
        Save KerasOpenVINOModel to local as xml and bin file

        :param path: Directory to save the model.
        """
        self.ov_model._model_exists_or_err()
        path = Path(path)
        path.mkdir(exist_ok=True)
        xml_path = path / self.status['xml_path']
        save(self.ov_model.ie_network, xml_path)


text:
static char* key1 = "key1";
static char* key2 = "key2";
static char* key3 = "key3";

static char* val1 = "val1";
static char* val2 = "val2";
static char* val3 = "val3";

int test_hash_table_pointer()
{
	int count;
	char* value;
	wHashTable* table;

	table = HashTable_New(TRUE);

	HashTable_Add(table, key1, val1);
	HashTable_Add(table, key2, val2);
	HashTable_Add(table, key3, val3);

	count = HashTable_Count(table);

	if (count != 3)
	{
		printf("HashTable_Count: Expected : %d, Actual: %d\n", 3, count);
		return -1;
	}

	HashTable_Remove(table, key2);

	count = HashTable_Count(table);

	if (count != 2)
	{
		printf("HashTable_Count: Expected : %d, Actual: %d\n", 2, count);
		return -1;
	}

	HashTable_Remove(table, key3);

	count = HashTable_Count(table);

	if (count != 1)
	{
		printf("HashTable_Count: Expected : %d, Actual: %d\n", 1, count);
		return -1;
	}

	HashTable_Remove(table, key1);

	count = HashTable_Count(table);

	if (count != 0)
	{
		printf("HashTable_Count: Expected : %d, Actual: %d\n", 0, count);
		return -1;
	}

	HashTable_Add(table, key1, val1);
	HashTable_Add(table, key2, val2);
	HashTable_Add(table, key3, val3);

	count = HashTable_Count(table);

	if (count != 3)
	{
		printf("HashTable_Count: Expected : %d, Actual: %d\n", 3, count);
		return -1;
	}

	value = (char*) HashTable_GetItemValue(table, key1);

	if (strcmp(value, val1) != 0)
	{
		printf("HashTable_GetItemValue: Expected : %s, Actual: %s\n", val1, value);
		return -1;
	}

	value = (char*) HashTable_GetItemValue(table, key2);

	if (strcmp(value, val2) != 0)
	{
		printf("HashTable_GetItemValue: Expected : %s, Actual: %s\n", val2, value);
		return -1;
	}

	value = (char*) HashTable_GetItemValue(table, key3);

	if (strcmp(value, val3) != 0)
	{
		printf("HashTable_GetItemValue: Expected : %s, Actual: %s\n", val3, value);
		return -1;
	}

	HashTable_SetItemValue(table, key2, "apple");

	value = (char*) HashTable_GetItemValue(table, key2);

	if (strcmp(value, "apple") != 0)
	{
		printf("HashTable_GetItemValue: Expected : %s, Actual: %s\n", "apple", value);
		return -1;
	}

	if (!HashTable_Contains(table, key2))
	{
		printf("HashTable_Contains: Expected : %d, Actual: %d\n", TRUE, FALSE);
		return -1;
	}

	if (!HashTable_Remove(table, key2))
	{
		printf("HashTable_Remove: Expected : %d, Actual: %d\n", TRUE, FALSE);
		return -1;
	}

	if (HashTable_Remove(table, key2))
	{
		printf("HashTable_Remove: Expected : %d, Actual: %d\n", FALSE, TRUE);
		return -1;
	}

	HashTable_Clear(table);

	count = HashTable_Count(table);

	if (count != 0)
	{
		printf("HashTable_Count: Expected : %d, Actual: %d\n", 0, count);
		return -1;
	}

	HashTable_Free(table);

	return 1;
}

int test_hash_table_string()
{
	int count;
	char* value;
	wHashTable* table;

	table = HashTable_New(TRUE);

	table->hash = HashTable_StringHash;
	table->keyCompare = HashTable_StringCompare;
	table->valueCompare = HashTable_StringCompare;
	table->keyClone = HashTable_StringClone;
	table->valueClone = HashTable_StringClone;
	table->keyFree = HashTable_StringFree;
	table->valueFree = HashTable_StringFree;

	HashTable_Add(table, key1, val1);
	HashTable_Add(table, key2, val2);
	HashTable_Add(table, key3, val3);

	count = HashTable_Count(table);

	if (count != 3)
	{
		printf("HashTable_Count: Expected : %d, Actual: %d\n", 3, count);
		return -1;
	}

	HashTable_Remove(table, key2);

	count = HashTable_Count(table);

	if (count != 2)
	{
		printf("HashTable_Count: Expected : %d, Actual: %d\n", 2, count);
		return -1;
	}

	HashTable_Remove(table, key3);

	count = HashTable_Count(table);

	if (count != 1)
	{
		printf("HashTable_Count: Expected : %d, Actual: %d\n", 1, count);
		return -1;
	}

	HashTable_Remove(table, key1);

	count = HashTable_Count(table);

	if (count != 0)
	{
		printf("HashTable_Count: Expected : %d, Actual: %d\n", 0, count);
		return -1;
	}

	HashTable_Add(table, key1, val1);
	HashTable_Add(table, key2, val2);
	HashTable_Add(table, key3, val3);

	count = HashTable_Count(table);

	if (count != 3)
	{
		printf("HashTable_Count: Expected : %d, Actual: %d\n", 3, count);
		return -1;
	}

	value = (char*) HashTable_GetItemValue(table, key1);

	if (strcmp(value, val1) != 0)
	{
		printf("HashTable_GetItemValue: Expected : %s, Actual: %s\n", val1, value);
		return -1;
	}

	value = (char*) HashTable_GetItemValue(table, key2);

	if (strcmp(value, val2) != 0)
	{
		printf("HashTable_GetItemValue: Expected : %s, Actual: %s\n", val2, value);
		return -1;
	}

	value = (char*) HashTable_GetItemValue(table, key3);

	if (strcmp(value, val3) != 0)
	{
		printf("HashTable_GetItemValue: Expected : %s, Actual: %s\n", val3, value);
		return -1;
	}

	HashTable_SetItemValue(table, key2, "apple");

	value = (char*) HashTable_GetItemValue(table, key2);

	if (strcmp(value, "apple") != 0)
	{
		printf("HashTable_GetItemValue: Expected : %s, Actual: %s\n", "apple", value);
		return -1;
	}

	if (!HashTable_Contains(table, key2))
	{
		printf("HashTable_Contains: Expected : %d, Actual: %d\n", TRUE, FALSE);
		return -1;
	}

	if (!HashTable_Remove(table, key2))
	{
		printf("HashTable_Remove: Expected : %d, Actual: %d\n", TRUE, FALSE);
		return -1;
	}

	if (HashTable_Remove(table, key2))
	{
		printf("HashTable_Remove: Expected : %d, Actual: %d\n", FALSE, TRUE);
		return -1;
	}

	HashTable_Clear(table);

	count = HashTable_Count(table);

	if (count != 0)
	{
		printf("HashTable_Count: Expected : %d, Actual: %d\n", 0, count);
		return -1;
	}

	HashTable_Free(table);

	return 1;
}

int TestHashTable(int argc, char* argv[])
{
	if (test_hash_table_pointer() < 0)
		return 1;

	if (test_hash_table_string() < 0)
		return 1;

	return 0;
}

redpajama_set_name: RedPajamaGithub


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

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

/**
 *
 *             Represents a limit on the number of times a single viewer can be exposed to
 *             the same {@link LineItem} in a specified time period.
 *
 *
 *
Java class for FrequencyCap complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="FrequencyCap">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="maxImpressions" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
 *         <element name="numTimeUnits" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
 *         <element name="timeUnit" type="{https://www.google.com/apis/ads/publisher/v201308}TimeUnit" minOccurs="0"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "FrequencyCap", propOrder = {
    "maxImpressions",
    "numTimeUnits",
    "timeUnit"
})
public class FrequencyCap {

    protected Integer maxImpressions;
    protected Integer numTimeUnits;
    protected TimeUnit timeUnit;

    /**
     * Gets the value of the maxImpressions property.
     *
     * @return
     *     possible object is
     *     {@link Integer }
     *
     */
    public Integer getMaxImpressions() {
        return maxImpressions;
    }

    /**
     * Sets the value of the maxImpressions property.
     *
     * @param value
     *     allowed object is
     *     {@link Integer }
     *
     */
    public void setMaxImpressions(Integer value) {
        this.maxImpressions = value;
    }

    /**
     * Gets the value of the numTimeUnits property.
     *
     * @return
     *     possible object is
     *     {@link Integer }
     *
     */
    public Integer getNumTimeUnits() {
        return numTimeUnits;
    }

    /**
     * Sets the value of the numTimeUnits property.
     *
     * @param value
     *     allowed object is
     *     {@link Integer }
     *
     */
    public void setNumTimeUnits(Integer value) {
        this.numTimeUnits = value;
    }

    /**
     * Gets the value of the timeUnit property.
     *
     * @return
     *     possible object is
     *     {@link TimeUnit }
     *
     */
    public TimeUnit getTimeUnit() {
        return timeUnit;
    }

    /**
     * Sets the value of the timeUnit property.
     *
     * @param value
     *     allowed object is
     *     {@link TimeUnit }
     *
     */
    public void setTimeUnit(TimeUnit value) {
        this.timeUnit = value;
    }

}


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>
	<version>0.0.1-SNAPSHOT</version>
	<groupId>com.takin</groupId>
	<artifactId>emmet</artifactId>

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

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

		<dependency>
			<groupId>com.google.code.findbugs</groupId>
			<artifactId>jsr305</artifactId>
			<version>3.0.1</version>
		</dependency>

		<dependency>
			<groupId>org.ow2.asm</groupId>
			<artifactId>asm</artifactId>
			<version>5.2</version>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.5</version>
		</dependency>

		<dependency>
			<groupId>org.javassist</groupId>
			<artifactId>javassist</artifactId>
			<version>3.17.1-GA</version>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.7.22</version>
		</dependency>
		<dependency>
			<groupId>org.jsoup</groupId>
			<artifactId>jsoup</artifactId>
			<version>1.9.2</version>
		</dependency>
		<dependency>
			<groupId>com.lmax</groupId>
			<artifactId>disruptor</artifactId>
			<version>3.3.2</version>
		</dependency>

		<dependency>
			<groupId>org.objenesis</groupId>
			<artifactId>objenesis</artifactId>
			<version>2.5</version>
		</dependency>

	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.1</version>
				<configuration>
					<attach>true</attach>
				</configuration>
				<executions>
					<execution>
						<phase>compile</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<skip>true</skip>
				</configuration>
			</plugin>
		</plugins>
	</build>

</project>


text:
using UnityEngine;

namespace DefaultNamespace
{
    public class Test02 : MonoBehaviour
    {
        public void Update()
        {
            Vector2[] calculatedPositions = {};
            Vector2 newPos = (calculatedPositions[0] - (Vector2) this.transform.localPosition) * {caret}10f *
                            Time.deltaTime;
        }
    }
}


text:
import xml.dom.minidom

import timex2

class TernDocument(timex2.Timex2XmlDocument):
    """
    A class which can handle TERN documents
    """

    @staticmethod
    def create(sents, docid, tok_offsets=None, add_S=False, add_LEX=False, pos_attr=False, dct=''):
        """
        Creates a TERN document from the internal representation

        sents is the [[(word, pos, timexes), ...], ...] format.

        tok_offsets is used to correctly reinsert whitespace lost in
        tokenisation. It's in the format of a list of lists of integers, where
        each integer is the offset from the start of the sentence of that token.
        If set to None (the default), then a single space is assumed between
        all tokens.

        If add_S is set to something other than false, then the tags to indicate
        sentence boundaries are added, with the name of the tag being the value
        of add_S

        add_LEX is similar, but for token boundaries

        pos_attr is similar but refers to the name of the attribute on the LEX
        (or whatever) tag that holds the POS tag.

        dct is the document creation time string
        """

        # Create a blank XML document
        impl = xml.dom.minidom.getDOMImplementation()
        doc = impl.createDocument(None, 'DOC', None)

        # Add necessary tags
        docid_tag = doc.createElement('DOCNO')
        docid_tag.appendChild(doc.createTextNode(docid))
        doc.documentElement.appendChild(docid_tag)

        if dct != '':
            dct_tag = doc.createElement('DATE_TIME')
            dct_tag.appendChild(doc.createTextNode(dct[4:6] + '/' + dct[6:8] + '/' + dct[:4]))
            doc.documentElement.appendChild(dct_tag)

        body_tag = doc.createElement('BODY')
        doc.documentElement.appendChild(body_tag)

        text_tag = doc.createElement('TEXT')
        body_tag.appendChild(text_tag)

        # Add text to document
        TernDocument._add_words_to_node_from_sents(doc, text_tag, sents, tok_offsets)

        # Now create the object
        x = TernDocument(doc)

        # Now reconcile the S, LEX and TIMEX tags
        x.reconcile(sents, add_S, add_LEX, pos_attr)

        return x

    def __init__(self, file, nodename='TEXT', has_S=False, has_LEX=False, pos_attr=False):
        timex2.Timex2XmlDocument.__init__(self, file, nodename, has_S, has_LEX, pos_attr)

    def _dct_to_xml_body(self):
        """
        Set the XML body to be the tag containing the document creation time
        """
        dtags = self._xml_doc.documentElement.getElementsByTagName('DATE_TIME')
        if len(dtags) == 1:
            self._xml_body = dtags[0]
        else:
            dtags = self._xml_doc.documentElement.getElementsByTagName('DATE')
            if len(dtags) == 1:
                self._xml_body = dtags[0]
            else:
                return False

    def get_dct_sents(self):
        """
        Returns the creation time sents for this document.
        """
        old_xml_body = self._xml_body
        if self._dct_to_xml_body() is False:
            return [[]]
        s = self.get_sents()
        self._xml_body = old_xml_body
        return s

    def reconcile_dct(self, dct, add_S=False, add_LEX=False, pos_attr=False):
        """
        Adds a TIMEX to the DCT tag and return the DCT
        """
        old_xml_body = self._xml_body
        old_has_S = self._has_S
        old_has_LEX = self._has_LEX
        old_pos_attr = self._pos_attr
        if self._dct_to_xml_body() is False:
            return
            # Set functionInDocument
        for sent in dct:
            for (doc, pos, ts) in sent:
                for t in ts:
                    t.document_role = 'CREATION_TIME'
        self.reconcile(dct, add_S, add_LEX, pos_attr)
        self._xml_body = old_xml_body
        self._has_S = old_has_S
        self._has_LEX = old_has_LEX
        self._pos_attr = old_pos_attr


text:
exports.setEnvironment = function() {
  process.env['AZURE_BATCH_ACCOUNT'] = 'lchency4';
  process.env['AZURE_BATCH_ENDPOINT'] = 'https://lchency4.westcentralus.batch.azure.com';
  process.env['AZURE_SUBSCRIPTION_ID'] = '3ee7eaf5-6a2f-49fd-953f-d760b5ac2e05';
};

exports.scopes = [[function (nock) {
var result =
nock('http://lchency4.westcentralus.batch.azure.com:443')
  .filteringRequestBody(function (path) { return '*';})
.post('/pools?api-version=2018-03-01.6.1', '*')
  .reply(201, "", { 'transfer-encoding': 'chunked',
  'last-modified': 'Fri, 09 Mar 2018 22:44:04 GMT',
  etag: '0x8D5860F42C979DB',
  location: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1',
  server: 'Microsoft-HTTPAPI/2.0',
  'request-id': 'd409329b-fca1-4288-9136-68b9e1f429fc',
  'strict-transport-security': 'max-age=31536000; includeSubDomains',
  'x-content-type-options': 'nosniff',
  dataserviceversion: '3.0',
  dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1',
  date: 'Fri, 09 Mar 2018 22:44:04 GMT',
  connection: 'close' });
 return result; },
function (nock) {
var result =
nock('https://lchency4.westcentralus.batch.azure.com:443')
  .filteringRequestBody(function (path) { return '*';})
.post('/pools?api-version=2018-03-01.6.1', '*')
  .reply(201, "", { 'transfer-encoding': 'chunked',
  'last-modified': 'Fri, 09 Mar 2018 22:44:04 GMT',
  etag: '0x8D5860F42C979DB',
  location: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1',
  server: 'Microsoft-HTTPAPI/2.0',
  'request-id': 'd409329b-fca1-4288-9136-68b9e1f429fc',
  'strict-transport-security': 'max-age=31536000; includeSubDomains',
  'x-content-type-options': 'nosniff',
  dataserviceversion: '3.0',
  dataserviceid: 'https://lchency4.westcentralus.batch.azure.com/pools/nodesdktestpool1',
  date: 'Fri, 09 Mar 2018 22:44:04 GMT',
  connection: 'close' });
 return result; }]];


text:
<?xml version="1.0" encoding="utf-8"?>

<!-- Copyright (C) 2012 The Android Open Source Project

     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.
-->

<case name="dut_speaker_play" version="1.0" description="Play DUT speaker for some time">
	<setup> <!-- 1 setup -->
		<!-- prepare sound source id: to be used in output, sine 1000Hz, 20000ms long -->
		<sound id="sound1" type="sin:32000:100:5000" preload="1" />
	</setup>

	<action> <!-- 1 action -->
		<!--  equivalent of for loop. all children will be completed before moving to the next
		      stage.repeat up to 100 times unless stopped by some condition -->
		<sequential repeat="20" index="i">
			<!--  sync start : execute only sync complete : execute + complete
			      For sync start, complete will be called when the parent completes -->
			<output device="DUT" id="sound1" gain="100" sync="start" waitforcompletion="1" />
		</sequential>
	</action>
</case>


text:
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>**Dev Firebat Web UI**</title>
    <meta name="description" content="">
    <meta name="author" content="">
    <link href="static/css/bootstrap.css" rel="stylesheet">
    <link href="static/css/font-awesome.css" rel="stylesheet">
    <style>
        body {
            padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
        }
        </style>
</head>

<body>
<!-- 3rd party js libs -->
<script src="static/js/3d_party/jquery-1.8.3.min.js"></script>
<script src="static/js/3d_party/bootstrap.min.js"></script>
<script src="static/js/3d_party/bootstrap-dropdown.js"></script>
<script src="static/js/3d_party/bootstrap-tooltip.js"></script>
<script src="static/js/3d_party/mousetrap.min.js"></script>
<script src="static/js/3d_party/handlebars-1.0.rc.2.js"></script>
<script src="static/js/3d_party/ember-1.0.0-pre.4.min.js"></script>
<script src="https://gist.github.com/raw/4628483/3ad866d0921ac05ecb466513e3048296a07db6ce/ember-11.js"></script>

<!-- Firebat app -->
<script src="static/js/app/const.js"></script>
<script src="static/js/app/helpers.js"></script>
<script src="static/js/app/ya.js"></script>

<!-- Load templates with AJAX and start Ember app after -->
<script>
  var app_script_url = 'static/js/app/app.js';
  var templates = ['application', 'settingsTemplate', 'testsTemplate', 'testTemplate', 'tanksTemplate'],
      requests = [];

  $.each(templates, function(index, template) {
      requests.push(
          $.ajax({
              url : 'static/tmpl/' + template + '.hbs',
              dataType : 'text',
              success : function(templateSrc) {
                  Em.TEMPLATES[template] = Em.Handlebars.compile(templateSrc);
              }
          })
      );
  });

  $.when(requests).then(function() {
      console.log('Tempates loaded');
      var headID = document.getElementsByTagName("head")[0];
      var newScript = document.createElement('script');
      newScript.type = 'text/javascript';
      newScript.src = 'static/js/app/app.js';
      headID.appendChild(newScript);
  });
</script>

</body>
</html>


text:
<?php

namespace Invertus\DibsEasy\Adapter;

/**
 * Class ConfigurationAdapter
 *
 * @package Invertus\DibsEasy\Adapter
 */
class ConfigurationAdapter
{
    /**
     * Set configuration value
     *
     * @param string $key
     * @param string|int $value
     *
     * @return bool
     */
    public function set($key, $value)
    {
        return \Configuration::updateValue($key, $value);
    }

    /**
     * Get configuration value
     *
     * @param string $key
     *
     * @return string
     */
    public function get($key)
    {
        return \Configuration::get($key);
    }

    /**
     * Get canceled order state ID
     *
     * @return int
     */
    public function getCanceledOrderStateId()
    {
        return (int) $this->get('DIBS_CANCELED_ORDER_STATE_ID');
    }

    /**
     * Get awaiting payment order state ID
     *
     * @return int
     */
    public function getAwaitingOrderStateId()
    {
        return (int) $this->get('DIBS_AWAITING_ORDER_STATE_ID');
    }

    /**
     * Get refunded payment order state ID
     *
     * @return int
     */
    public function getRefundedOrderStateId()
    {
        return (int) $this->get('DIBS_REFUNDED_ORDER_STATE_ID');
    }

    /**
     * Get completed payment order state ID
     *
     * @return int
     */
    public function getCompletedOrderStateId()
    {
        return (int) $this->get('DIBS_COMPLETED_ORDER_STATE_ID');
    }

    /**
     * Delete configuration by name
     *
     * @param string $key
     *
     * @return bool
     */
    public function remove($key)
    {
        return \Configuration::deleteByName($key);
    }
}


text:
    Upload Image <input style="display: none;" type="file" ngFileSelect [options]="options" (onUpload)="handleUpload($event)" (beforeUpload)="beforeUpload($event)" accept="image/*">

 0" class="well" id="uploaded">


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

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/no_reviews"
        android:gravity="center_horizontal"
        android:layout_centerVertical="true"
        android:textColor="@color/selected_item_color"/>
    <ListView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:divider="@null"
        android:id="@+id/review_list"
        android:dividerHeight="0dp">

    </ListView>

</RelativeLayout>


text:
using Com.Ericmas001.XmTemplating.Attributes;
using Com.Ericmas001.XmTemplating.Serialization;
using Com.Ericmas001.XmTemplating.VariableExtraction;

namespace Com.Ericmas001.XmTemplating
{
    [TemplateElementSerializer(typeof(StaticTemplateSerializer))]
    [TemplateElementVariableExtractor(typeof(StaticVariableExtractor))]
    public class StaticTemplateElement : AbstractTemplateElement
    {
        public string Content { get; set; }

        public StaticTemplateElement(AbstractTemplateElement parent) : base(parent)
        {
        }
    }
}


text:
<?php

// =============================================================================
// VIEWS/ADMIN/OPTIONS-PAGE-MAIN.PHP
// -----------------------------------------------------------------------------
// Plugin options page main content.
// =============================================================================

// =============================================================================
// TABLE OF CONTENTS
// -----------------------------------------------------------------------------
//   01. Main Content
// =============================================================================

// Main Content
// =============================================================================

?>

      <div class="handlediv" title="<?php _e( 'Click to toggle', '__x__' ); ?>">

<?php _e( 'Enable', '__x__' ); ?>

<?php _e( 'Select the checkbox below to enable the plugin.', '__x__' ); ?>

                <?php _e( 'Enable Under Construction', '__x__' ); ?>
                <?php _e( 'Select to enable the plugin and display options below.', '__x__' ); ?>

              <fieldset>
                <legend class="screen-reader-text">input type="checkbox"</legend>
                <input type="checkbox" class="checkbox" name="x_under_construction_enable" id="x_under_construction_enable" value="1" <?php echo ( isset( $x_under_construction_enable ) && checked( $x_under_construction_enable, '1', false ) ) ? checked( $x_under_construction_enable, '1', false ) : ''; ?>>
              </fieldset>

    <div id="meta-box-settings" class="postbox" style="display: <?php echo ( isset( $x_under_construction_enable ) && $x_under_construction_enable == 1 ) ? 'block' : 'none'; ?>;">
      <div class="handlediv" title="<?php _e( 'Click to toggle', '__x__' ); ?>">

<?php _e( 'Settings', '__x__' ); ?>

<?php _e( 'Select your plugin settings below.', '__x__' ); ?>

                <?php _e( 'Heading', '__x__' ); ?>
                <?php _e( 'Enter your desired heading.', '__x__' ); ?>

            <input name="x_under_construction_heading" id="x_under_construction_heading" type="text" value="<?php echo ( isset( $x_under_construction_heading ) ) ? $x_under_construction_heading : ''; ?>" class="large-text">

                <?php _e( 'Subheading', '__x__' ); ?>
                <?php _e( 'Enter your desired subheading.', '__x__' ); ?>

            <input name="x_under_construction_subheading" id="x_under_construction_subheading" type="text" value="<?php echo ( isset( $x_under_construction_subheading ) ) ? $x_under_construction_subheading : ''; ?>" class="large-text">

                <?php _e( 'Completed By', '__x__' ); ?>
                <?php _e( 'Set the date when maintenance is expected to be complete.', '__x__' ); ?>

            <input name="x_under_construction_date" id="x_under_construction_date" type="text" value="<?php echo ( isset( $x_under_construction_date ) ) ? $x_under_construction_date : ''; ?>" class="large-text datepicker">

                <?php _e( 'Facebook Profile', '__x__' ); ?>
                <?php _e( 'Enter the URL to your Facebook profile.', '__x__' ); ?>

            <input name="x_under_construction_facebook" id="x_under_construction_facebook" type="text" value="<?php echo ( isset( $x_under_construction_facebook ) ) ? $x_under_construction_facebook : ''; ?>" class="large-text">

                <?php _e( 'Twitter Profile', '__x__' ); ?>
                <?php _e( 'Enter the URL to your Twitter profile.', '__x__' ); ?>

            <input name="x_under_construction_twitter" id="x_under_construction_twitter" type="text" value="<?php echo ( isset( $x_under_construction_twitter ) ) ? $x_under_construction_twitter : ''; ?>" class="large-text">

                <?php _e( 'Google+ Profile', '__x__' ); ?>
                <?php _e( 'Enter the URL to your Google+ profile.', '__x__' ); ?>

            <input name="x_under_construction_google_plus" id="x_under_construction_google_plus" type="text" value="<?php echo ( isset( $x_under_construction_google_plus ) ) ? $x_under_construction_google_plus : ''; ?>" class="large-text">

                <?php _e( 'Instagram Profile', '__x__' ); ?>
                <?php _e( 'Enter the URL to your Instagram profile.', '__x__' ); ?>

            <input name="x_under_construction_instagram" id="x_under_construction_instagram" type="text" value="<?php echo ( isset( $x_under_construction_instagram ) ) ? $x_under_construction_instagram : ''; ?>" class="large-text">

                <?php _e( 'Background Image', '__x__' ); ?>
                <?php _e( 'Optionally set a background image.', '__x__' ); ?>

            <input name="x_under_construction_background_image" id="x_under_construction_background_image" type="text" value="<?php echo ( isset( $x_under_construction_background_image ) ) ? $x_under_construction_background_image : ''; ?>" class="large-text">

                <?php _e( 'Background', '__x__' ); ?>
                <?php _e( 'Select your color.', '__x__' ); ?>

            <input name="x_under_construction_background_color" id="x_under_construction_background_color" type="text" value="<?php echo ( isset( $x_under_construction_background_color ) ) ? $x_under_construction_background_color : '#34495e'; ?>" class="wp-color-picker" data-default-color="#34495e">

                <?php _e( 'Headings', '__x__' ); ?>
                <?php _e( 'Select your color.', '__x__' ); ?>

            <input name="x_under_construction_heading_color" id="x_under_construction_heading_color" type="text" value="<?php echo ( isset( $x_under_construction_heading_color ) ) ? $x_under_construction_heading_color : '#ffffff'; ?>" class="wp-color-picker" data-default-color="#ffffff">

                <?php _e( 'Subheading', '__x__' ); ?>
                <?php _e( 'Select your color.', '__x__' ); ?>

            <input name="x_under_construction_subheading_color" id="x_under_construction_subheading_color" type="text" value="<?php echo ( isset( $x_under_construction_subheading_color ) ) ? $x_under_construction_subheading_color : '#ffffff'; ?>" class="wp-color-picker" data-default-color="#ffffff">

                <?php _e( 'Completed By', '__x__' ); ?>
                <?php _e( 'Select your color.', '__x__' ); ?>

            <input name="x_under_construction_date_color" id="x_under_construction_date_color" type="text" value="<?php echo ( isset( $x_under_construction_date_color ) ) ? $x_under_construction_date_color : '#ffffff'; ?>" class="wp-color-picker" data-default-color="#ffffff">

                <?php _e( 'Social Profile Links', '__x__' ); ?>
                <?php _e( 'Select your color.', '__x__' ); ?>

            <input name="x_under_construction_social_color" id="x_under_construction_social_color" type="text" value="<?php echo ( isset( $x_under_construction_social_color ) ) ? $x_under_construction_social_color : '#ffffff'; ?>" class="wp-color-picker" data-default-color="#ffffff">


text:
#ifndef KNOSSOS_LAUNCHER_BROWSER_KNOSSOS_DEV_TOOLS
#define KNOSSOS_LAUNCHER_BROWSER_KNOSSOS_DEV_TOOLS

#include "include/cef_browser.h"
#include "include/views/cef_browser_view.h"
#include "include/views/cef_window.h"

class KnossosDevToolsWindowDelegate : public CefWindowDelegate {
public:
  explicit KnossosDevToolsWindowDelegate(CefRefPtr<CefBrowserView> browser_view)
        : browser_view_(browser_view) {}

  void OnWindowCreated(CefRefPtr<CefWindow> window) override;
  void OnWindowDestroyed(CefRefPtr<CefWindow> window) override;

  CefRect GetInitialBounds(CefRefPtr<CefWindow> window) override;
private:
  CefRefPtr<CefBrowserView> browser_view_;

  IMPLEMENT_REFCOUNTING(KnossosDevToolsWindowDelegate);
  DISALLOW_COPY_AND_ASSIGN(KnossosDevToolsWindowDelegate);
};

void KnossosShowDevTools(CefRefPtr<CefBrowser> browser);

#endif /* KNOSSOS_LAUNCHER_BROWSER_KNOSSOS_DEV_TOOLS */