text:
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:bind="http://schemas.android.com/tools">

    <data>
        <variable
            name="viewmodel"
            type="com.barzinga.viewmodel.UserViewModel"/>

    </data>

    <LinearLayout
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <ImageView
                android:layout_width="130dp"
                android:layout_height="90dp"
                android:layout_gravity="left|center_vertical"
                android:paddingBottom="@dimen/centi_margin"
                android:paddingLeft="@dimen/hecto_margin"
                android:src="@drawable/logo_barzinga"/>

            <include
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"
                android:layout_gravity="right|center_vertical"
                android:id="@+id/userInfo"
                bind:viewmodel="@{viewmodel}"
                layout="@layout/view_user_info" />

        </FrameLayout>

    </LinearLayout>
</layout>


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

namespace MediaLibraryTests {
    class MockMediaLocation : IMediaLocation {

        public MockMediaLocation() { }

        public MockMediaLocation(string path) {
            this.Path = path;
        }

        public IFolderMediaLocation Parent {
            get;
            set;
        }

        public string Path {
            get;
            set;
        }

        public Guid Id {
            get {
                return Path.GetMD5();
            }
        }

        public string Contents { get; set; }
    }
}

redpajama_set_name: RedPajamaGithub


text:
<?php
// Autogenerated by Translator Builder

return [

        'meta_title' => 'Talented Europe qui relie des jeunes talents et des employeurs dans toute l´Europe',

        'tagline' => 'qui relie
 des jeunes talents et des employeurs
 dans toute l´Europe',

        'days' => 'jours',

        'hours' => 'heures',

        'minutes' => 'minutes',

        'seconds' => 'secondes',

        'more' => 'en savoir plus',

        'what_is_title' => 'Qu´est-ce que l´Europe des talents?',

        'what_is_cta' => 'Découvrir plus. Recevoir la brochure.',

        'what_is_text_1' => 'Et si vous aviez l\'opportunité d\'embaucher les meilleurs étudiants d\'Europe?

Etudiants, et si vous aviez la possibilité de faire partie de l\'élite en Europe?

Des milliers d´entreprises auront accès direct à vos coordonnées.

Obtenez les meilleurs notes pour accéder à un plus grand choix d\'offres d\'emploi',

        'what_is_text_2' => 'C\'est ce que l\'Europe des talents vous offre.

Une vitrine du classement des meilleurs étudiants en Europe.  Une idée simple qui relie des employeurs et des étudiants. Le point de rencontre de l´excellence.',

        'subscribe_title' => 'Abonnez vous et suivez nos actualités',

        'subscribe_text' => 'Etre averti de tous les événements et nouveautés sur l´Europe des talents',

        'subscribe_form_placeholder' => 'Entrer une addresse électronique',

        'subscribe_btn_text' => 'Abonnez-vous',

        'subscribe_follow_text' => 'ou suivez-nous sur',

        'subscribe_text_question' => 'Recevez des nouvelles sur Talented Europe par mail',

        'meta_description' => 'Projet co-financé par le programme Erasmus Plus qui permet de faciliter l\' accès des excellents étudiants  à l\'emploi et aux stages en Europe',

        'coming_soon' => 'le contenu sera bientot ajouté',

        'search_placeholder' => 'Vous recherchez?',

        'search_where' => 'où',

        'search_btn' => 'Recherche',

        'statistics_title' => 'Statistiques',

        'contacts' => 'Contacts entre les étudiants et les entreprises',

        'companies_institutions' => 'Entreprises et Institutions',

        'students_title' => 'les étudiants doués',

        'no_students' => 'Aucun étudiant disponible',

        'join_talented_europe_today' => 'Rejoignez l\'Europe talentueuse dès aujourd\'hui!',

        'talented_for_students' => ' Pour les étudiants  - Europe talentueuse améliorera votre employabilité avec l\'aval de vos tuteurs et vous mettra en contact avec les employeurs en Europe pour des stages ou des emplois de première carrière.',

        'talented_for_employers' => ' Pour les étudiants  - Europe talentueuse améliorera votre employabilité  Pour les employeurs  - Europe talentueuse vous liera avec de jeunes étudiants talentueux en Europe et vous aidera à trouver la bonne personne qui peut contribuer à l\'organisation de votre entreprise Réussir avec de vrais talents ayant les compétences que vous recherchez.',

        'go_to_app' => 'Aller à l\'application',

        'what_is_text_1_txt' => 'Et si vous aviez l\'opportunité d\'embaucher les meilleurs étudiants d\'Europe?

Etudiants, et si vous aviez la possibilité de faire partie de l\'élite en Europe?

Des milliers d´entreprises auront accès direct à vos coordonnées.

Obtenez les meilleurs notes pour accéder à un plus grand choix d\'offres d\'emploi',

        'what_is_text_2_txt' => 'C\'est ce que l\'Europe des talents vous offre.

Une vitrine du classement des meilleurs étudiants en Europe.  Une idée simple qui relie des employeurs et des étudiants. Le point de rencontre de l´excellence.',

        'download_app' => 'Télécharger l\'application',

];


text:
<?xml version="1.0" encoding="UTF-8"?>
<fozone-validators>
	<validator name="required" class="cc.fozone.validation.validators.RequiredValidator"/>
	<validator name="match" class="cc.fozone.validation.validators.MatchValidator"/>
	<validator name="between" class="cc.fozone.validation.validators.BetweenValidator"/>
	<validator name="min" class="cc.fozone.validation.validators.MinValidator"/>
	<validator name="max" class="cc.fozone.validation.validators.MaxValidator"/>
	<validator name="equals" class="cc.fozone.validation.validators.EqualsValidator"/>
	<validator name="timestampLessEqual" class="cc.fozone.validation.validators.TimestampLessEqualValidator"/>
	<validator name="timestampCreaterEqual" class="cc.fozone.validation.validators.TimestampCreaterEqualValidator"/>
	<validator name="spring"  useSpring="true" class="cc.fozone.validation.validators.SpringValidator"/>

	<validator name="custom" class="validationfo.custom.CustomValidator"/>
</fozone-validators>


text:
package com.instructure.canvasapi.model;

import android.os.Parcel;

import com.instructure.canvasapi.utilities.APIHelpers;

import java.util.Date;

public class Alert extends CanvasModel<Alert>{

    //Variables from API
    private long id;
    private boolean read;
    private boolean dismissed;
    private String alert_type;
    private String title;
    private String action_date;
    private String creation_date;
    private long observer_id;
    private long student_id;
    private long course_id;
    private long alert_criteria_id;
    private String asset_url;

    public enum ALERT_TYPE { COURSE_ANNOUNCEMENT, INSTITUTION_ANNOUNCEMENT, ASSIGNMENT_GRADE_HIGH,
                        ASSIGNMENT_GRADE_LOW, ASSIGNMENT_MISSING, COURSE_GRADE_HIGH, COURSE_GRADE_LOW }

    @Override
    public long getId() {
        return id;
    }
    @Override
    public Date getComparisonDate() {
        return null;
    }
    @Override
    public String getComparisonString() {
        return null;
    }

    //region Getters/Setters

    public void setId(long id){
        this.id = id;
    }

    public void setRead(boolean isRead){
        this.read = isRead;
    }

    public boolean isRead(){
        return this.read;
    }

    public void setDismissed(boolean dismissed){
        this.dismissed = dismissed;
    }

    public boolean isDismissed(){
        return this.dismissed;
    }

    public void setAlertType(ALERT_TYPE alert_type){
        this.alert_type = alertTypeToAPIString(alert_type);
    }

    public ALERT_TYPE getAlertType(){
        return getAlertTypeFromString(alert_type);
    }

    public void setTitle(String title){
        this.title = title;
    }

    public String getTitle(){
        return this.title;
    }

    public void setActionDate(String actionDate){
        this.action_date = actionDate;
    }

    public Date getActionDate(){
        return APIHelpers.stringToDate(this.action_date);
    }

    public void setCreationDate(String creationDate){
        this.creation_date = creationDate;
    }

    public Date getCreationDate(){
        return APIHelpers.stringToDate(this.creation_date);
    }

    public void setObserverId(long observerId){
        this.observer_id = observerId;
    }

    public long getObserverId(){
        return this.observer_id;
    }

    public void setStudentId(long studentId){
        this.student_id = studentId;
    }

    public long getStudentId(){
        return this.student_id;
    }

    public void setCourseId(long courseId){
        this.course_id = courseId;
    }

    public long getCourseId(){
        return this.course_id;
    }

    public void setAssetUrl(String assetUrl){
        this.asset_url = assetUrl;
    }

    public String getAssetUrl(){
        return this.asset_url;
    }

    public long getAlertCriteriaId() {
        return alert_criteria_id;
    }

    public void setAlertCriteriaId(long alert_criteria_id) {
        this.alert_criteria_id = alert_criteria_id;
    }

    //endregion

    public static ALERT_TYPE getAlertTypeFromString(String alert_type){
        switch(alert_type){
            case("course_announcement"):
                return ALERT_TYPE.COURSE_ANNOUNCEMENT;
            case("institution_announcement"):
                return ALERT_TYPE.INSTITUTION_ANNOUNCEMENT;
            case("assignment_grade_high"):
                return ALERT_TYPE.ASSIGNMENT_GRADE_HIGH;
            case("assignment_grade_low"):
                return ALERT_TYPE.ASSIGNMENT_GRADE_LOW;
            case("assignment_missing"):
                return ALERT_TYPE.ASSIGNMENT_MISSING;
            case("course_grade_high"):
                return ALERT_TYPE.COURSE_GRADE_HIGH;
            case("course_grade_low"):
                return ALERT_TYPE.COURSE_GRADE_LOW;
            default:
                return null;
        }
    }

    public static String alertTypeToAPIString(ALERT_TYPE alert_type){
        switch(alert_type){
            case COURSE_ANNOUNCEMENT:
                return "course_announcement";
            case INSTITUTION_ANNOUNCEMENT:
                return "institution_announcement";
            case ASSIGNMENT_GRADE_HIGH:
                return "assignment_grade_high";
            case ASSIGNMENT_GRADE_LOW:
                return "assignment_grade_low";
            case ASSIGNMENT_MISSING:
                return "assignment_missing";
            case COURSE_GRADE_HIGH:
                return "course_grade_high";
            case COURSE_GRADE_LOW:
                return "course_grade_low";
            default:
                return null;
        }
    }

    //region Parcel stuffs

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeLong(this.id);
        parcel.writeLong(this.alert_criteria_id);
        parcel.writeByte(this.read ? (byte) 1 : (byte) 0);
        parcel.writeByte(this.dismissed ? (byte) 1 : (byte) 0);
        parcel.writeString(this.alert_type);
        parcel.writeString(this.title);
        parcel.writeString(this.action_date);
        parcel.writeString(this.creation_date);
        parcel.writeLong(this.observer_id);
        parcel.writeLong(this.student_id);
        parcel.writeLong(this.course_id);
        parcel.writeString(this.asset_url);
    }

    private Alert(Parcel parcel){
        this.alert_criteria_id = parcel.readLong();
        this.id = parcel.readLong();
        this.read = parcel.readByte() != 0;
        this.dismissed = parcel.readByte() != 0;
        this.alert_type = parcel.readString();
        this.title = parcel.readString();
        this.action_date = parcel.readString();
        this.creation_date = parcel.readString();
        this.observer_id = parcel.readLong();
        this.student_id = parcel.readLong();
        this.course_id = parcel.readLong();
        this.asset_url = parcel.readString();
    }

    public static Creator<Alert> CREATOR = new Creator<Alert>() {
        public Alert createFromParcel(Parcel parcel) {
            return new Alert(parcel);
        }

        public Alert[] newArray(int size) {
            return new Alert[size];
        }
    };

    //endregion
}


text:
import GoatsListingModule from './goatsListing'
import GoatsListingController from './goatsListing.controller';
import GoatsListingComponent from './goatsListing.component';
import GoatsListingTemplate from './goatsListing.html';

describe('GoatsListing', () => {
  let $rootScope, makeController;

  beforeEach(window.module(GoatsListingModule.name));
  beforeEach(inject((_$rootScope_) => {
    $rootScope = _$rootScope_;
    makeController = () => {
      return new GoatsListingController();
    };
  }));

  describe('Template', () => {
      it('renders goat-list component', () => {
         expect(GoatsListingTemplate).to.match(/<goats-list/g);
      });

      it('passes goatslist to goat-list component', () => {
          expect(GoatsListingTemplate).to.match(/goats="vm\.goatsList"/g);
      });
  });

  describe('Component', () => {
      // component/directive specs
      let component = GoatsListingComponent;

      it('includes the intended template',() => {
        expect(component.template).to.equal(GoatsListingTemplate);
      });

      it('uses `controllerAs` syntax', () => {
        expect(component).to.have.property('controllerAs');
      });

      it('invokes the right controller', () => {
        expect(component.controller).to.equal(GoatsListingController);
      });
  });
});


text:
import numpy as np
import scipy.special
import random

class NeuralNetwork(object):
	def __init__(self, weights):
		self.weights = [np.matrix(weighting) for weighting in weights]

	def calculate_output_layer(self, input_layer):
		layer_values = np.matrix([input_layer])
		for layer_weights in self.weights:
			layer_values = layer_values * layer_weights
			layer_values = scipy.special.expit(layer_values)
		return np.asarray(layer_values)[0]

	def mutate(self, factor):
		mutation = np.vectorize(lambda x: x * random.uniform(1 - factor, 1 + factor))
		self.weights = [mutation(layer_weights) for layer_weights in self.weights]

def random_weights(topology, weight_range):
	weights = []
	for num_in, num_out in zip(topology[:-1], topology[1:]):
		layer_weights = [[random.uniform(-weight_range, weight_range) for x in range(num_out)] for y in range(num_in)]
		weights.append(layer_weights)
	return weights


text:
package org.elasticsearch.xpack.security.transport.netty4;

import io.netty.channel.Channel;
import io.netty.channel.ChannelHandler;
import io.netty.handler.ssl.SslHandler;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.elasticsearch.common.network.NetworkService;
import org.elasticsearch.common.settings.ClusterSettings;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.BigArrays;
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
import org.elasticsearch.http.HttpChannel;
import org.elasticsearch.http.netty4.Netty4HttpServerTransport;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.transport.SharedGroupFactory;
import org.elasticsearch.xpack.core.ssl.SSLConfiguration;
import org.elasticsearch.xpack.core.ssl.SSLService;
import org.elasticsearch.xpack.security.transport.SecurityHttpExceptionHandler;
import org.elasticsearch.xpack.security.transport.filter.IPFilter;

import javax.net.ssl.SSLEngine;

import static org.elasticsearch.xpack.core.XPackSettings.HTTP_SSL_ENABLED;

public class SecurityNetty4HttpServerTransport extends Netty4HttpServerTransport {
    private static final Logger logger = LogManager.getLogger(SecurityNetty4HttpServerTransport.class);

    private final SecurityHttpExceptionHandler securityExceptionHandler;
    private final IPFilter ipFilter;
    private final SSLService sslService;
    private final SSLConfiguration sslConfiguration;

    public SecurityNetty4HttpServerTransport(Settings settings, NetworkService networkService, BigArrays bigArrays, IPFilter ipFilter,
                                             SSLService sslService, ThreadPool threadPool, NamedXContentRegistry xContentRegistry,
                                             Dispatcher dispatcher, ClusterSettings clusterSettings,
                                             SharedGroupFactory sharedGroupFactory) {
        super(settings, networkService, bigArrays, threadPool, xContentRegistry, dispatcher, clusterSettings, sharedGroupFactory);
        this.securityExceptionHandler = new SecurityHttpExceptionHandler(logger, lifecycle, (c, e) -> super.onException(c, e));
        this.ipFilter = ipFilter;
        final boolean ssl = HTTP_SSL_ENABLED.get(settings);
        this.sslService = sslService;
        if (ssl) {
            this.sslConfiguration = sslService.getHttpTransportSSLConfiguration();
            if (sslService.isConfigurationValidForServerUsage(sslConfiguration) == false) {
                throw new IllegalArgumentException("a key must be provided to run as a server. the key should be configured using the " +
                        "[xpack.security.http.ssl.key] or [xpack.security.http.ssl.keystore.path] setting");
            }
        } else {
            this.sslConfiguration = null;
        }
    }

    @Override
    public void onException(HttpChannel channel, Exception e) {
        securityExceptionHandler.accept(channel, e);
    }

    @Override
    protected void doStart() {
        super.doStart();
        ipFilter.setBoundHttpTransportAddress(this.boundAddress());
    }

    @Override
    public ChannelHandler configureServerChannelHandler() {
        return new HttpSslChannelHandler();
    }

    private final class HttpSslChannelHandler extends HttpChannelHandler {
        HttpSslChannelHandler() {
            super(SecurityNetty4HttpServerTransport.this, handlingSettings);
        }

        @Override
        protected void initChannel(Channel ch) throws Exception {
            super.initChannel(ch);
            if (sslConfiguration != null) {
                SSLEngine sslEngine = sslService.createSSLEngine(sslConfiguration, null, -1);
                sslEngine.setUseClientMode(false);
                ch.pipeline().addFirst("ssl", new SslHandler(sslEngine));
            }
            ch.pipeline().addFirst("ip_filter", new IpFilterRemoteAddressFilter(ipFilter, IPFilter.HTTP_PROFILE_NAME));
        }
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Demon Parrot" nameDescription="a demon parrot" race="blood" experience="225" speed="300" manacost="250">
	<health now="360" max="360"/>
	<look type="217" corpse="6056"/>
	<targetchange interval="5000" chance="20"/>
	<flags>
		<flag summonable="0"/>
		<flag attackable="1"/>
		<flag hostile="1"/>
		<flag illusionable="0"/>
		<flag convinceable="0"/>
		<flag pushable="0"/>
		<flag canpushitems="1"/>
		<flag canpushcreatures="1"/>
		<flag targetdistance="1"/>
		<flag staticattack="90"/>
		<flag runonhealth="0"/>
	</flags>
	<attacks>
		<attack name="melee" interval="1200" min="-0" max="-100"/>
		<attack name="drunk" interval="1000" chance="30" length="5" spread="0">
			<attribute key="areaEffect" value="rednote"/>
		</attack>
		<attack name="lifedrain" interval="1000" chance="30" range="5" min="-25" max="-45">
			<attribute key="shootEffect" value="suddendeath"/>
		</attack>
		<attack name="lifedrain" interval="1000" chance="30" range="1" min="-15" max="-45"/>
	</attacks>
	<defenses armor="30" defense="35"/>
	<immunities>
		<immunity lifedrain="1"/>
		<immunity invisible="1"/>
		<immunity drown="1"/>
		<immunity drunk="1"/>
	</immunities>
	<voices interval="5000" chance="10">
		<voice sentence="ISHH THAT THE BESHHT YOU HAVE TO OFFERRR, TIBIANSHH?"/>
		<voice sentence="YOU ARRRRRE DOOMED!"/>
		<voice sentence="I SHHMELL FEEAARRR!"/>
		<voice sentence="MY SHHEED IS FEARRR AND MY HARRRVEST ISHH YOURRR SHHOUL!"/>
		<voice sentence="Your shhoooul will be mineee!"/>
	</voices>
	<loot>
		<item id="2148" countmax="99" chance="50000"/><!-- gold coins -->
	</loot>
</monster>


text:
var assert = require('assert'),
    time_ago_in_words = require('../time_ago_in_words'),
    date = new Date()

describe("time_ago_in_words", function() {
  it("Rounds up to 'One minute ago' when the value is over 30 seconds but less than 1 minute.", function() {
    assert.equal(time_ago_in_words(date - 1000 * 60), '1 minute ago')
  })

  it("Displays 'Just now' when the value is less than 30 seconds", function() {
    assert.equal(time_ago_in_words(date - 1000), 'Just now')
  })

  it("Displays 'One minute ago' when the time is 1 and 1.5 minutes", function() {
    assert.equal(time_ago_in_words(date - 1000 * 60), '1 minute ago')
    assert.equal(time_ago_in_words(date - 1000 * 80), '1 minute ago')
  })

  it("Correctly pluralises any value over 1", function() {
    assert.notEqual(time_ago_in_words(date - 1000 * 95).indexOf('minutes '), -1)
  })

  it("Displays Hours/Days/Weeks/Months correctly", function() {
    var hour, day, week, month

    month = (week =  (day = (hour = 1000 * 60 * 60) * 24) * 7) * 4.5

    assert.notEqual(time_ago_in_words(date - hour).indexOf('hour'), -1)
    assert.notEqual(time_ago_in_words(date - day).indexOf('day'), -1)
    assert.notEqual(time_ago_in_words(date - week).indexOf('week'), -1)
    assert.notEqual(time_ago_in_words(date - month).indexOf('month'), -1)
  })

  it("Returns seconds if the second parameter is false", function() {
    assert.notEqual(time_ago_in_words(date - 1000 * 50, false).indexOf('seconds '), -1)
  })
})


text:
Transports data from various sources and over diverse protocols fresh to your application.

## References

* [Linked Data](https://en.wikipedia.org/wiki/Linked_Data)


text:
<?php

use Model\Cart;

/**
*
*/

class Controller_Bag extends Controller_Base {

	/**
	*	My Account Page
	*/
	public function action_index()
	{
		$items = Cart::get_items();

		$total_items = Cart::total_items();

		// view
		$this->template->body_id = "shoppingbag";
		$this->template->title = "My Shopping Bag";
		$this->template->content = View::forge('bag/index', array(
			'items'       => $items,
			'total_items' => $total_items,
			'subtotal'	  => Cart::calculate_total(),
		));
	}

	public function action_remove($product_id)
	{
		$success = Cart::remove_item($product_id);

		if ($success)
		{
			Session::set_flash('notice', "Item $product_id removed from shopping bag");
		}

		else
		{
			Session::set_flash('notice', "There was a problem removing that from your shopping bag");
		}

		Response::redirect('bag');
	}
}


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

//
// This source code was auto-generated by xsd, Version=4.6.1055.0.
//

using System.Xml.Serialization;

namespace VsGallery.Core.Vsix.Schemas {
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [XmlType(AnonymousType=true, Namespace="http://schemas.microsoft.com/developer/vsx-schema/2011")]
    [XmlRoot(Namespace="http://schemas.microsoft.com/developer/vsx-schema/2011", IsNullable=false)]
    public partial class PackageManifest {

        private Metadata metadataField;

        private Installation installationField;

        private Dependency[] dependenciesField;

        private Asset[] assetsField;

        private System.Xml.XmlElement[] anyField;

        private string versionField;

        /// <remarks/>
        public Metadata Metadata {
            get {
                return this.metadataField;
            }
            set {
                this.metadataField = value;
            }
        }

        /// <remarks/>
        public Installation Installation {
            get {
                return this.installationField;
            }
            set {
                this.installationField = value;
            }
        }

        /// <remarks/>
        [XmlArrayItem(IsNullable=false)]
        public Dependency[] Dependencies {
            get {
                return this.dependenciesField;
            }
            set {
                this.dependenciesField = value;
            }
        }

        /// <remarks/>
        [XmlArrayItem(IsNullable=false)]
        public Asset[] Assets {
            get {
                return this.assetsField;
            }
            set {
                this.assetsField = value;
            }
        }

        /// <remarks/>
        [XmlAnyElement()]
        public System.Xml.XmlElement[] Any {
            get {
                return this.anyField;
            }
            set {
                this.anyField = value;
            }
        }

        /// <remarks/>
        [XmlAttribute()]
        public string Version {
            get {
                return this.versionField;
            }
            set {
                this.versionField = value;
            }
        }
    }

    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [XmlType(Namespace="http://schemas.microsoft.com/developer/vsx-schema/2011")]
    public partial class Metadata {

        private MetadataIdentity identityField;

        private string displayNameField;

        private string descriptionField;

        private string moreInfoField;

        private string licenseField;

        private string gettingStartedGuideField;

        private string releaseNotesField;

        private string iconField;

        private string previewImageField;

        private string tagsField;

        private System.Xml.XmlElement[] anyField;

        /// <remarks/>
        public MetadataIdentity Identity {
            get {
                return this.identityField;
            }
            set {
                this.identityField = value;
            }
        }

        /// <remarks/>
        public string DisplayName {
            get {
                return this.displayNameField;
            }
            set {
                this.displayNameField = value;
            }
        }

        /// <remarks/>
        public string Description {
            get {
                return this.descriptionField;
            }
            set {
                this.descriptionField = value;
            }
        }

        /// <remarks/>
        public string MoreInfo {
            get {
                return this.moreInfoField;
            }
            set {
                this.moreInfoField = value;
            }
        }

        /// <remarks/>
        public string License {
            get {
                return this.licenseField;
            }
            set {
                this.licenseField = value;
            }
        }

        /// <remarks/>
        public string GettingStartedGuide {
            get {
                return this.gettingStartedGuideField;
            }
            set {
                this.gettingStartedGuideField = value;
            }
        }

        /// <remarks/>
        public string ReleaseNotes {
            get {
                return this.releaseNotesField;
            }
            set {
                this.releaseNotesField = value;
            }
        }

        /// <remarks/>
        public string Icon {
            get {
                return this.iconField;
            }
            set {
                this.iconField = value;
            }
        }

        /// <remarks/>
        public string PreviewImage {
            get {
                return this.previewImageField;
            }
            set {
                this.previewImageField = value;
            }
        }

        /// <remarks/>
        public string Tags {
            get {
                return this.tagsField;
            }
            set {
                this.tagsField = value;
            }
        }

        /// <remarks/>
        [XmlAnyElement()]
        public System.Xml.XmlElement[] Any {
            get {
                return this.anyField;
            }
            set {
                this.anyField = value;
            }
        }
    }

    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [XmlType(AnonymousType=true, Namespace="http://schemas.microsoft.com/developer/vsx-schema/2011")]
    public partial class MetadataIdentity {

        private string idField;

        private string versionField;

        private string languageField;

        private string publisherField;

        /// <remarks/>
        [XmlAttribute()]
        public string Id {
            get {
                return this.idField;
            }
            set {
                this.idField = value;
            }
        }

        /// <remarks/>
        [XmlAttribute()]
        public string Version {
            get {
                return this.versionField;
            }
            set {
                this.versionField = value;
            }
        }

        /// <remarks/>
        [XmlAttribute()]
        public string Language {
            get {
                return this.languageField;
            }
            set {
                this.languageField = value;
            }
        }

        /// <remarks/>
        [XmlAttribute()]
        public string Publisher {
            get {
                return this.publisherField;
            }
            set {
                this.publisherField = value;
            }
        }
    }

    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [XmlType(Namespace="http://schemas.microsoft.com/developer/vsx-schema/2011")]
    public partial class Asset {

        private System.Xml.XmlElement[] anyField;

        private string typeField;

        private string pathField;

        private System.Xml.XmlAttribute[] anyAttrField;

        /// <remarks/>
        [XmlAnyElement()]
        public System.Xml.XmlElement[] Any {
            get {
                return this.anyField;
            }
            set {
                this.anyField = value;
            }
        }

        /// <remarks/>
        [XmlAttribute()]
        public string Type {
            get {
                return this.typeField;
            }
            set {
                this.typeField = value;
            }
        }

        /// <remarks/>
        [XmlAttribute()]
        public string Path {
            get {
                return this.pathField;
            }
            set {
                this.pathField = value;
            }
        }

        /// <remarks/>
        [XmlAnyAttribute()]
        public System.Xml.XmlAttribute[] AnyAttr {
            get {
                return this.anyAttrField;
            }
            set {
                this.anyAttrField = value;
            }
        }
    }

    /// <remarks/>
    [XmlInclude(typeof(Dependency))]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [XmlType(Namespace="http://schemas.microsoft.com/developer/vsx-schema/2011")]
    public partial class DependencyInfo {

        private string idField;

        private string displayNameField;

        private string locationField;

        private System.Xml.XmlAttribute[] anyAttrField;

        /// <remarks/>
        [XmlAttribute()]
        public string Id {
            get {
                return this.idField;
            }
            set {
                this.idField = value;
            }
        }

        /// <remarks/>
        [XmlAttribute()]
        public string DisplayName {
            get {
                return this.displayNameField;
            }
            set {
                this.displayNameField = value;
            }
        }

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

        /// <remarks/>
        [XmlAnyAttribute()]
        public System.Xml.XmlAttribute[] AnyAttr {
            get {
                return this.anyAttrField;
            }
            set {
                this.anyAttrField = value;
            }
        }
    }

    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [XmlType(Namespace="http://schemas.microsoft.com/developer/vsx-schema/2011")]
    public partial class Dependency : DependencyInfo {

        private string versionField;

        private bool canAutoDownloadField;

        private bool isRequiredField;

        public Dependency() {
            this.canAutoDownloadField = false;
            this.isRequiredField = true;
        }

        /// <remarks/>
        [XmlAttribute()]
        public string Version {
            get {
                return this.versionField;
            }
            set {
                this.versionField = value;
            }
        }

        /// <remarks/>
        [XmlAttribute()]
        [System.ComponentModel.DefaultValueAttribute(false)]
        public bool CanAutoDownload {
            get {
                return this.canAutoDownloadField;
            }
            set {
                this.canAutoDownloadField = value;
            }
        }

        /// <remarks/>
        [XmlAttribute()]
        [System.ComponentModel.DefaultValueAttribute(true)]
        public bool IsRequired {
            get {
                return this.isRequiredField;
            }
            set {
                this.isRequiredField = value;
            }
        }
    }

    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [XmlType(Namespace="http://schemas.microsoft.com/developer/vsx-schema/2011")]
    public partial class InstallationTarget {

        private string idField;

        private string versionField;

        private string targetPlatformIdentifierField;

        private string targetPlatformVersionField;

        private string sdkNameField;

        private string sdkVersionField;

        private System.Xml.XmlAttribute[] anyAttrField;

        /// <remarks/>
        [XmlAttribute()]
        public string Id {
            get {
                return this.idField;
            }
            set {
                this.idField = value;
            }
        }

        /// <remarks/>
        [XmlAttribute()]
        public string Version {
            get {
                return this.versionField;
            }
            set {
                this.versionField = value;
            }
        }

        /// <remarks/>
        [XmlAttribute()]
        public string TargetPlatformIdentifier {
            get {
                return this.targetPlatformIdentifierField;
            }
            set {
                this.targetPlatformIdentifierField = value;
            }
        }

        /// <remarks/>
        [XmlAttribute()]
        public string TargetPlatformVersion {
            get {
                return this.targetPlatformVersionField;
            }
            set {
                this.targetPlatformVersionField = value;
            }
        }

        /// <remarks/>
        [XmlAttribute()]
        public string SdkName {
            get {
                return this.sdkNameField;
            }
            set {
                this.sdkNameField = value;
            }
        }

        /// <remarks/>
        [XmlAttribute()]
        public string SdkVersion {
            get {
                return this.sdkVersionField;
            }
            set {
                this.sdkVersionField = value;
            }
        }

        /// <remarks/>
        [XmlAnyAttribute()]
        public System.Xml.XmlAttribute[] AnyAttr {
            get {
                return this.anyAttrField;
            }
            set {
                this.anyAttrField = value;
            }
        }
    }

    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [XmlType(Namespace="http://schemas.microsoft.com/developer/vsx-schema/2011")]
    public partial class Installation {

        private InstallationTarget[] installationTargetField;

        private bool installedByMsiField;

        private bool installedByMsiFieldSpecified;

        private bool systemComponentField;

        private bool systemComponentFieldSpecified;

        private bool allUsersField;

        private bool allUsersFieldSpecified;

        private bool experimentalField;

        private bool experimentalFieldSpecified;

        private string scopeField;

        /// <remarks/>
        [XmlElement("InstallationTarget")]
        public InstallationTarget[] InstallationTarget {
            get {
                return this.installationTargetField;
            }
            set {
                this.installationTargetField = value;
            }
        }

        /// <remarks/>
        [XmlAttribute()]
        public bool InstalledByMsi {
            get {
                return this.installedByMsiField;
            }
            set {
                this.installedByMsiField = value;
            }
        }

        /// <remarks/>
        [XmlIgnore()]
        public bool InstalledByMsiSpecified {
            get {
                return this.installedByMsiFieldSpecified;
            }
            set {
                this.installedByMsiFieldSpecified = value;
            }
        }

        /// <remarks/>
        [XmlAttribute()]
        public bool SystemComponent {
            get {
                return this.systemComponentField;
            }
            set {
                this.systemComponentField = value;
            }
        }

        /// <remarks/>
        [XmlIgnore()]
        public bool SystemComponentSpecified {
            get {
                return this.systemComponentFieldSpecified;
            }
            set {
                this.systemComponentFieldSpecified = value;
            }
        }

        /// <remarks/>
        [XmlAttribute()]
        public bool AllUsers {
            get {
                return this.allUsersField;
            }
            set {
                this.allUsersField = value;
            }
        }

        /// <remarks/>
        [XmlIgnore()]
        public bool AllUsersSpecified {
            get {
                return this.allUsersFieldSpecified;
            }
            set {
                this.allUsersFieldSpecified = value;
            }
        }

        /// <remarks/>
        [XmlAttribute()]
        public bool Experimental {
            get {
                return this.experimentalField;
            }
            set {
                this.experimentalField = value;
            }
        }

        /// <remarks/>
        [XmlIgnore()]
        public bool ExperimentalSpecified {
            get {
                return this.experimentalFieldSpecified;
            }
            set {
                this.experimentalFieldSpecified = value;
            }
        }

        /// <remarks/>
        [XmlAttribute()]
        public string Scope {
            get {
                return this.scopeField;
            }
            set {
                this.scopeField = value;
            }
        }
    }
}


text:
#include "face_cull_unit.hpp"
#include "context.hpp"

namespace glpp {

	face_cull_unit::face_cull_unit(context & ctx) :
		m_ctx(ctx) {
	}

	void face_cull_unit::enable() {
		::glEnable(GL_CULL_FACE);
	}

	void face_cull_unit::disable() {
		::glDisable(GL_CULL_FACE);
	}

	bool face_cull_unit::is_enabled() {
		return ::glIsEnabled(GL_CULL_FACE);
	}

	void face_cull_unit::set_culled_face(face_type face) {
		::glCullFace(GLPP_CAST_TO_SCALAR(GLenum, face));
	}

	face_type face_cull_unit::get_culled_face() {
		return GLPP_CAST_TO_SAFE_ENUM(face_type, m_ctx.get_param_int(context_param_type::CULL_FACE_MODE));
	}

	void face_cull_unit::set_frontface_orientation(face_orientation orientation) {
		::glFrontFace(GLPP_CAST_TO_SCALAR(GLenum, orientation));
	}

	face_orientation face_cull_unit::get_frontface_orientation(face_orientation){
		return GLPP_CAST_TO_SAFE_ENUM(face_orientation, m_ctx.get_param_int(context_param_type::FRONT_FACE));
	}

}


text:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<!--L
  Copyright HealthCare IT, Inc.

  Distributed under the OSI-approved BSD 3-Clause License.
  See http://ncip.github.com/edct-collector/LICENSE.txt for details.
L-->

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xform="http://www.w3.org/2002/xforms">

<head>
		<xform:model>
			<xform:instance>
				<person xmlns="">
				    <name>Javier</name>
				    <birthdate>1979-08-31</birthdate>
				    <gender>M</gender>
				    <telephones>
				        <telephone type="mobile">666005000</telephone>
				        <telephone type="home">986888888</telephone>
				    </telephones>
				</person>
			</xform:instance>
			<xform:bind nodeset="name" required="true()" type="xsd:Name"/>
			<xform:bind nodeset="birthdate" type="xsd:date"/>
	  <xform:submission id="sendData"
                         method="post"
                         includenamespaceprefixes=""
                         action="/Echo.do">
          <xform:message ev:event="xforms-submit-error" level="modal">Unable to submit</xform:message>
      </xform:submission>

			<xform:submission id="s01" method="post" show="new" replace="all" action="xsltforms/txs.php?exec=beautify.txs">
				<xform:message level="modeless" ev:event="xforms-submit-error">Submit error.</xform:message>
			</xform:submission>
			<xform:submission id="s02" method="xml-urlencoded-post" replace="none" action="xsltforms/txs.php?exec=returnasattachment.txs&file=mycontact.xml">
				<xform:message level="modeless" ev:event="xforms-submit-error">Submit error.</xform:message>
			</xform:submission>
		</xform:model>
</head>
<body>
		<xform:group >
			<xform:input ref="name">
				<xform:label>Name</xform:label>
			</xform:input>
			<xform:select1 ref="gender">
				<xform:label>Gender</xform:label>
				<xform:item>
					<xform:label>Male</xform:label>
					<xform:value>M</xform:value>
				</xform:item>
				<xform:item>
					<xform:label>Female</xform:label>
					<xform:value>F</xform:value>
				</xform:item>
			</xform:select1>
			<xform:input ref="birthdate">
				<xform:label>Birth date</xform:label>
			</xform:input>
			<xform:group>
				<xform:label>Telephones</xform:label>
				<xform:repeat id="repeat" nodeset="telephones/telephone" appearance="compact">
					<xform:select1 ref="@type" appearance="minimal">
						<xform:label>Type</xform:label>
						<xform:item>
							<xform:label>Home</xform:label>
							<xform:value>hombe</xform:value>
						</xform:item>
						<xform:item>
							<xform:label>Mobile</xform:label>
							<xform:value>mobile</xform:value>
						</xform:item>
						<xform:item>
							<xform:label>Company</xform:label>
							<xform:value>company</xform:value>
						</xform:item>
					</xform:select1>
					<xform:input ref=".">
						<xform:label>Number</xform:label>
					</xform:input>
					<xform:trigger>
						<xform:label>X</xform:label>
						<xform:delete nodeset="." at="1" if="count(//telephone) > 1"
                                ev:event="DOMActivate" />
						</xform:trigger>
					</xform:repeat>
				</xform:group>
			</xform:group>

			<xform:submit submission="sendData">
				<xform:label>Save</xform:label>
			</xform:submit>

			<xform:trigger>
				<xform:label>Reset</xform:label>
				<xform:reset ev:event="DOMActivate"/>
			</xform:trigger>
</body>
</html>


text:
var
  browserify = require('browserify'),
  gulp = require('gulp'),
  source = require('vinyl-source-stream'),
  buffer = require('vinyl-buffer'),
  uglify = require('gulp-uglify'),
  gutil = require('gulp-util'),
  sourcemaps = require('gulp-sourcemaps'),
  getNPMPackageIds = require('./helpers').getNPMPackageIds,
  nodeResolve = require('resolve');

module.exports = function(name, dest) {

  var b = browserify({debug: true});
  var filename = name + '.min.js';

  getNPMPackageIds().forEach(function (id) {
    b.require(nodeResolve.sync(id), { expose: id });
  });

  return b.bundle()
    .on('error', gutil.log)
    .pipe(source(filename))
    .pipe(buffer())
    .pipe(sourcemaps.init({loadMaps: true}))
    .pipe(sourcemaps.write('./'))
    .on('end', () => {
      gutil.log('File Saved', gutil.colors.cyan(dest + '/' + name + '.min.js'));
    })
    .pipe(gulp.dest(dest));
};


text:
namespace bubblefs {
namespace myvoyager {

class ClientSocket : public BaseSocket {
 public:
  ClientSocket(int domain, bool nonblocking)
      : BaseSocket(domain, nonblocking) {}

  explicit ClientSocket(int socketfd) : BaseSocket(socketfd) {}

  int Connect(const struct sockaddr* sa, socklen_t salen) const;

 private:
  // No copying allowed
  ClientSocket(const ClientSocket&);
  void operator=(const ClientSocket&);
};

}  // namespace myvoyager
}  // namespace bubblefs

#endif  // BUBBLEFS_PLATFORM_VOYAGER_CLIENT_SOCKET_H_


text:
#include <stdlib.h>
#include <string.h>

#include "shared-bindings/dotenv/__init__.h"

#include "py/misc.h"
#include "py/mpstate.h"
#include "py/objstr.h"
#include "supervisor/filesystem.h"

#if defined(UNIX)
typedef FILE *file_arg;
STATIC bool open_file(const char *name, file_arg *active_file) {
    FILE *result = fopen(name, "r");
    if (result) {
        *active_file = result;
    }
    return result != NULL;
}
STATIC void close_file(file_arg *active_file) {
    fclose(*active_file);
}
STATIC uint8_t get_next_character(file_arg *active_file) {
    int value = fgetc(*active_file);
    if (value == EOF) {
        return 0;
    }
    return value;
}
STATIC void seek_minus_one(file_arg *active_file) {
    fseek(*active_file, -1, SEEK_CUR);
}
#else
#include "extmod/vfs.h"
#include "extmod/vfs_fat.h"
typedef FIL file_arg;
STATIC bool open_file(const char *name, file_arg *active_file) {
    FATFS *fs = filesystem_circuitpy();
    FRESULT result = f_open(fs, active_file, name, FA_READ);
    return result == FR_OK;
}
STATIC void close_file(file_arg *active_file) {
    // nothing
}

// Return 0 if there is no next character (EOF).
STATIC uint8_t get_next_character(FIL *active_file) {
    uint8_t character = 0;
    UINT quantity_read;
    // If there's an error or quantity_read is 0, character will remain 0.
    f_read(active_file, &character, 1, &quantity_read);
    return character;
}
STATIC void seek_minus_one(file_arg *active_file) {
    f_lseek(active_file, f_tell(active_file) - 1);
}
#endif

// Discard whitespace, except for newlines, returning the next character after the whitespace.
// Return 0 if there is no next character (EOF).
STATIC uint8_t consume_whitespace(file_arg *active_file) {
    uint8_t character;
    do {
        character = get_next_character(active_file);
    } while (character != '\n' && character != 0 && unichar_isspace(character));
    return character;
}

// Starting at the start of a new line, determines if the key matches the given
// key. File pointer is set to be just before the = after the key.
STATIC bool key_matches(file_arg *active_file, const char *key) {
    uint8_t character;
    character = consume_whitespace(active_file);
    if (character == 0) {
        return false;
    }
    bool quoted = false;
    if (character == '\'') {
        // Beginning of single-quoted string.
        quoted = true;
        character = get_next_character(active_file);
    }
    size_t key_pos = 0;
    bool escaped = false;
    bool matches = true;
    size_t key_len = strlen(key);
    while (character != 0) {
        if (character == '\\' && !escaped && quoted) {
            escaped = true;
        } else if (!escaped && quoted && character == '\'') {
            quoted = false;
            // End of quoted key. Skip over the ending quote.
            character = get_next_character(active_file);
            break;
        } else if (!quoted && (unichar_isspace(character) || character == '=' || character == '\n' || character == '#' || character == 0)) {
            // End of unquoted key.
            break;
        } else {
            // Still on tentative key; see if it matches the next supplied key character,
            // but don't run off the end of the supplied key.
            if (key_pos < key_len) {
                matches = matches && (unsigned char)key[key_pos] == character;
                escaped = false;
                key_pos++;
            } else {
                // Key on line is too long.
                matches = false;
            }
        }
        character = get_next_character(active_file);
    }
    if (character == '=' || character == '\n' || character == '#' || character == 0) {
        // Rewind one so the value, if any, can be found.
        seek_minus_one(active_file);
    } else if (!unichar_isspace(character)) {
        // We're followed by something else that is invalid syntax.
        matches = false;
    }

    return matches && key_pos == key_len;
}

STATIC bool next_line(file_arg *active_file) {
    uint8_t character;
    bool quoted = false;
    bool escaped = false;
    // Track comments because they last until the end of the line.
    bool comment = false;
    // Consume all characters while quoted or others up to \n.
    do {
        character = get_next_character(active_file);

        if ((!quoted || character == '#') || comment) {
            // Comments consume any escaping.
            comment = true;
        } else if (!escaped) {
            if (character == '\'') {
                quoted = !quoted;
            } else if (character == '\\') {
                escaped = true;
            }
        } else {
            escaped = false;
        }
    } while (character != 0 && (quoted || character != '\n'));

    return character != 0;
}

STATIC mp_int_t read_value(file_arg *active_file, char *value, size_t value_len) {
    uint8_t character;
    // Consume spaces before "=", and get first character of interest.
    character = consume_whitespace(active_file);
    if (character != '=') {
        if (character == '#' || character == '\n') {
            // Keys without an = after them are valid with the value None.
            return -1;
        }
        // All other characters are invalid.
        return -1;
    }
    // Consume space after =
    if (character != '#') {
        // a # immediately after = is part of the value!
        character = consume_whitespace(active_file);
    }
    bool quoted = false;
    if (character == '\'') {
        quoted = true;
        character = get_next_character(active_file);
    }
    if (character == '"') {
        // We don't support double quoted values.
        return -1;
    }
    // Copy the value over.
    size_t value_pos = 0;
    bool escaped = false;
    // Count trailing spaces so we can ignore them at the end of unquoted
    // values.
    size_t trailing_spaces = 0;
    bool first_char = true;
    while (character != 0) {
        // Consume the first \ if the value is quoted.
        if (quoted && character == '\\' && !escaped) {
            escaped = true;
            // Drop this backslash by short circuiting the rest of the loop.
            character = get_next_character(active_file);
            continue;
        }
        if (quoted && !escaped && character == '\'') {
            // trailing ' means the value is done.
            break;
        }
        // Unquoted values are ended by a newline or comment.
        if (!quoted && (character == '\n' || (character == '#' && !first_char))) {
            if (character == '\n') {
                // Rewind one so the next_line can find the \n.
                seek_minus_one(active_file);
            }
            break;
        }
        if (!quoted && unichar_isspace(character)) {
            trailing_spaces += 1;
        } else {
            trailing_spaces = 0;
        }
        escaped = false;
        // Only copy the value over if we have space. Otherwise, we'll just
        // count the overall length.
        if (value_pos < value_len) {
            value[value_pos] = character;
        }
        value_pos++;
        character = get_next_character(active_file);
        first_char = false;
    }

    return value_pos - trailing_spaces;
}

mp_int_t dotenv_get_key(const char *path, const char *key, char *value, mp_int_t value_len) {
    file_arg active_file;
    if (!open_file(path, &active_file)) {
        return -1;
    }

    mp_int_t actual_value_len = -1;
    bool read_ok = true;
    while (read_ok) {
        if (key_matches(&active_file, key)) {
            actual_value_len = read_value(&active_file, value, value_len);
        }

        read_ok = next_line(&active_file);
    }
    close_file(&active_file);
    return actual_value_len;
}

mp_obj_t common_hal_dotenv_get_key(const char *path, const char *key) {
    // Use the stack for short values. Longer values will require a heap allocation after we know
    // the length.
    char value[64];
    mp_int_t actual_len = dotenv_get_key(path, key, value, sizeof(value));
    if (actual_len < 0) {
        return mp_const_none;
    }
    if ((size_t)actual_len >= sizeof(value)) {
        byte *buf = m_new(byte, actual_len + 1);
        dotenv_get_key(path, key, (char *)buf, actual_len);
        buf[actual_len] = 0;

        mp_obj_str_t *o = m_new_obj(mp_obj_str_t);
        o->base.type = &mp_type_str;
        o->len = actual_len;
        o->data = buf;
        o->hash = qstr_compute_hash(buf, actual_len);

        return MP_OBJ_FROM_PTR(o);
    }
    return mp_obj_new_str(value, actual_len);
}

bool dotenv_get_key_terminated(const char *path, const char *key, char *value, mp_int_t value_len) {
    mp_int_t actual_len = dotenv_get_key(path, key, value, value_len - 1);
    if (actual_len >= value_len) {
        return false;
    }
    value[actual_len] = '\0'; // terminate string
    return true;
}

bool dotenv_get_key_int(const char *path, const char *key, mp_int_t *value) {
    char buf[16];
    if (!dotenv_get_key_terminated(path, key, buf, (mp_int_t)sizeof(buf))) {
        return false;
    }
    char *end;
    long result = strtol(buf, &end, 0);
    if (end == buf || *end) { // If the whole buffer was not consumed it's an error
        return false;
    }
    *value = (mp_int_t)result;
    return true;
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Erwine.Leonard.T.RexT.Views
{
    public partial class RegecOptionsControl : UserControl
    {
        public RegecOptionsControl()
        {
            InitializeComponent();
        }
    }
}


text:
import { h, computed, inject, getCurrentInstance } from 'vue'

import { createComponent } from '../../utils/private/create.js'
import { hSlot } from '../../utils/private/render.js'
import { pageContainerKey, layoutKey } from '../../utils/private/symbols.js'

export default createComponent({
  name: 'QPage',

  props: {
    padding: Boolean,
    styleFn: Function
  },

  setup (props, { slots }) {
    const { proxy: { $q } } = getCurrentInstance()

    const $layout = inject(layoutKey)
    inject(pageContainerKey, () => {
      console.error('QPage needs to be child of QPageContainer')
    })

    const style = computed(() => {
      const offset
        = ($layout.header.space === true ? $layout.header.size : 0)
        + ($layout.footer.space === true ? $layout.footer.size : 0)

      if (typeof props.styleFn === 'function') {
        const height = $layout.isContainer.value === true
          ? $layout.containerHeight.value
          : $q.screen.height

        return props.styleFn(offset, height)
      }

      return {
        minHeight: $layout.isContainer.value === true
          ? ($layout.containerHeight.value - offset) + 'px'
          : (
              $q.screen.height === 0
                ? (offset !== 0 ? `calc(100vh - ${ offset }px)` : '100vh')
                : ($q.screen.height - offset) + 'px'
            )
      }
    })

    const classes = computed(() =>
      `q-page ${ props.padding === true ? ' q-layout-padding' : '' }`
    )

    return () => h('main', {
      class: classes.value,
      style: style.value
    }, hSlot(slots.default))
  }
})


text: from approver.decorators.login_required import login_required


text:
All URIs are relative to *https://ems-gateway-aws-eu-central-1-dev.coinapi.io*

| Method | HTTP request | Description |
| ------ | ------------ | ----------- |
| [**v1_orders_cancel_all_post**](OrdersApi.md#v1_orders_cancel_all_post) | **POST** /v1/orders/cancel/all | Cancel all orders request |
| [**v1_orders_cancel_post**](OrdersApi.md#v1_orders_cancel_post) | **POST** /v1/orders/cancel | Cancel order request |
| [**v1_orders_get**](OrdersApi.md#v1_orders_get) | **GET** /v1/orders | Get open orders |
| [**v1_orders_history_time_start_time_end_get**](OrdersApi.md#v1_orders_history_time_start_time_end_get) | **GET** /v1/orders/history/{time_start}/{time_end} | History of order changes |
| [**v1_orders_post**](OrdersApi.md#v1_orders_post) | **POST** /v1/orders | Send new order |
| [**v1_orders_status_client_order_id_get**](OrdersApi.md#v1_orders_status_client_order_id_get) | **GET** /v1/orders/status/{client_order_id} | Get order execution report |

## v1_orders_cancel_all_post

> <MessageReject> v1_orders_cancel_all_post(order_cancel_all_request)

Cancel all orders request

This request cancels all open orders on single specified exchange.

### Examples

```ruby
require 'time'
require 'openapi_client'

api_instance = OpenapiClient::OrdersApi.new
order_cancel_all_request = OpenapiClient::OrderCancelAllRequest.new({exchange_id: 'KRAKEN'}) # OrderCancelAllRequest | OrderCancelAllRequest object.

begin
  # Cancel all orders request
  result = api_instance.v1_orders_cancel_all_post(order_cancel_all_request)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling OrdersApi->v1_orders_cancel_all_post: #{e}"
end
```

#### Using the v1_orders_cancel_all_post_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> <Array(<MessageReject>, Integer, Hash)> v1_orders_cancel_all_post_with_http_info(order_cancel_all_request)

```ruby
begin
  # Cancel all orders request
  data, status_code, headers = api_instance.v1_orders_cancel_all_post_with_http_info(order_cancel_all_request)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <MessageReject>
rescue OpenapiClient::ApiError => e
  puts "Error when calling OrdersApi->v1_orders_cancel_all_post_with_http_info: #{e}"
end
```

### Parameters

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **order_cancel_all_request** | [**OrderCancelAllRequest**](OrderCancelAllRequest.md) | OrderCancelAllRequest object. |  |

### Return type

[**MessageReject**](MessageReject.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json, appliction/json

## v1_orders_cancel_post

> <OrderExecutionReport> v1_orders_cancel_post(order_cancel_single_request)

Cancel order request

Request cancel for an existing order. The order can be canceled using the `client_order_id` or `exchange_order_id`.

### Examples

```ruby
require 'time'
require 'openapi_client'

api_instance = OpenapiClient::OrdersApi.new
order_cancel_single_request = OpenapiClient::OrderCancelSingleRequest.new({exchange_id: 'KRAKEN'}) # OrderCancelSingleRequest | OrderCancelSingleRequest object.

begin
  # Cancel order request
  result = api_instance.v1_orders_cancel_post(order_cancel_single_request)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling OrdersApi->v1_orders_cancel_post: #{e}"
end
```

#### Using the v1_orders_cancel_post_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> <Array(<OrderExecutionReport>, Integer, Hash)> v1_orders_cancel_post_with_http_info(order_cancel_single_request)

```ruby
begin
  # Cancel order request
  data, status_code, headers = api_instance.v1_orders_cancel_post_with_http_info(order_cancel_single_request)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <OrderExecutionReport>
rescue OpenapiClient::ApiError => e
  puts "Error when calling OrdersApi->v1_orders_cancel_post_with_http_info: #{e}"
end
```

### Parameters

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **order_cancel_single_request** | [**OrderCancelSingleRequest**](OrderCancelSingleRequest.md) | OrderCancelSingleRequest object. |  |

### Return type

[**OrderExecutionReport**](OrderExecutionReport.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json, appliction/json

## v1_orders_get

> <Array<OrderExecutionReport>> v1_orders_get(opts)

Get open orders

Get last execution reports for open orders across all or single exchange.

### Examples

```ruby
require 'time'
require 'openapi_client'

api_instance = OpenapiClient::OrdersApi.new
opts = {
  exchange_id: 'KRAKEN' # String | Filter the open orders to the specific exchange.
}

begin
  # Get open orders
  result = api_instance.v1_orders_get(opts)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling OrdersApi->v1_orders_get: #{e}"
end
```

#### Using the v1_orders_get_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> <Array(<Array<OrderExecutionReport>>, Integer, Hash)> v1_orders_get_with_http_info(opts)

```ruby
begin
  # Get open orders
  data, status_code, headers = api_instance.v1_orders_get_with_http_info(opts)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <Array<OrderExecutionReport>>
rescue OpenapiClient::ApiError => e
  puts "Error when calling OrdersApi->v1_orders_get_with_http_info: #{e}"
end
```

### Parameters

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **exchange_id** | **String** | Filter the open orders to the specific exchange. | [optional] |

### Return type

[**Array<OrderExecutionReport>**](OrderExecutionReport.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json, appliction/json

## v1_orders_history_time_start_time_end_get

> <Array<OrderHistory>> v1_orders_history_time_start_time_end_get(time_start, time_end)

History of order changes

Based on the date range, all changes registered in the orderbook.

### Examples

```ruby
require 'time'
require 'openapi_client'

api_instance = OpenapiClient::OrdersApi.new
time_start = '2022-05-01T00:00:00' # String | Start date
time_end = '2022-05-01T12:00:00' # String | End date

begin
  # History of order changes
  result = api_instance.v1_orders_history_time_start_time_end_get(time_start, time_end)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling OrdersApi->v1_orders_history_time_start_time_end_get: #{e}"
end
```

#### Using the v1_orders_history_time_start_time_end_get_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> <Array(<Array<OrderHistory>>, Integer, Hash)> v1_orders_history_time_start_time_end_get_with_http_info(time_start, time_end)

```ruby
begin
  # History of order changes
  data, status_code, headers = api_instance.v1_orders_history_time_start_time_end_get_with_http_info(time_start, time_end)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <Array<OrderHistory>>
rescue OpenapiClient::ApiError => e
  puts "Error when calling OrdersApi->v1_orders_history_time_start_time_end_get_with_http_info: #{e}"
end
```

### Parameters

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **time_start** | **String** | Start date |  |
| **time_end** | **String** | End date |  |

### Return type

[**Array<OrderHistory>**](OrderHistory.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

## v1_orders_post

> <OrderExecutionReport> v1_orders_post(order_new_single_request)

Send new order

This request creating new order for the specific exchange.

### Examples

```ruby
require 'time'
require 'openapi_client'

api_instance = OpenapiClient::OrdersApi.new
order_new_single_request = OpenapiClient::OrderNewSingleRequest.new({exchange_id: 'KRAKEN', client_order_id: '6ab36bc1-344d-432e-ac6d-0bf44ee64c2b', amount_order: 0.045, price: 0.0783, side: OpenapiClient::OrdSide::BUY, order_type: OpenapiClient::OrdType::LIMIT, time_in_force: OpenapiClient::TimeInForce::GOOD_TILL_CANCEL}) # OrderNewSingleRequest | OrderNewSingleRequest object.

begin
  # Send new order
  result = api_instance.v1_orders_post(order_new_single_request)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling OrdersApi->v1_orders_post: #{e}"
end
```

#### Using the v1_orders_post_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> <Array(<OrderExecutionReport>, Integer, Hash)> v1_orders_post_with_http_info(order_new_single_request)

```ruby
begin
  # Send new order
  data, status_code, headers = api_instance.v1_orders_post_with_http_info(order_new_single_request)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <OrderExecutionReport>
rescue OpenapiClient::ApiError => e
  puts "Error when calling OrdersApi->v1_orders_post_with_http_info: #{e}"
end
```

### Parameters

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **order_new_single_request** | [**OrderNewSingleRequest**](OrderNewSingleRequest.md) | OrderNewSingleRequest object. |  |

### Return type

[**OrderExecutionReport**](OrderExecutionReport.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json, appliction/json

## v1_orders_status_client_order_id_get

> <OrderExecutionReport> v1_orders_status_client_order_id_get(client_order_id)

Get order execution report

Get the last order execution report for the specified order. The requested order does not need to be active or opened.

### Examples

```ruby
require 'time'
require 'openapi_client'

api_instance = OpenapiClient::OrdersApi.new
client_order_id = '6ab36bc1-344d-432e-ac6d-0bf44ee64c2b' # String | The unique identifier of the order assigned by the client.

begin
  # Get order execution report
  result = api_instance.v1_orders_status_client_order_id_get(client_order_id)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling OrdersApi->v1_orders_status_client_order_id_get: #{e}"
end
```

#### Using the v1_orders_status_client_order_id_get_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> <Array(<OrderExecutionReport>, Integer, Hash)> v1_orders_status_client_order_id_get_with_http_info(client_order_id)

```ruby
begin
  # Get order execution report
  data, status_code, headers = api_instance.v1_orders_status_client_order_id_get_with_http_info(client_order_id)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <OrderExecutionReport>
rescue OpenapiClient::ApiError => e
  puts "Error when calling OrdersApi->v1_orders_status_client_order_id_get_with_http_info: #{e}"
end
```

### Parameters

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **client_order_id** | **String** | The unique identifier of the order assigned by the client. |  |

### Return type

[**OrderExecutionReport**](OrderExecutionReport.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json


text:
import basic_container

class RustContainer(basic_container.BasicContainer):

    def __init__(self):
	super(self.__class__, self).__init__()

	self.image = "schickling/rust"
	self.command = 'sh -c "rustc main.rs -o main && ./main"'
	self.file_extension = ".rs"


text:
//
//  Generated by the J2ObjC translator.  DO NOT EDIT!
//  source: android/libcore/luni/src/main/java/java/lang/ClassNotFoundException.java
//

#include "../../J2ObjC_header.h"

#pragma push_macro("INCLUDE_ALL_JavaLangClassNotFoundException")
#ifdef RESTRICT_JavaLangClassNotFoundException
#define INCLUDE_ALL_JavaLangClassNotFoundException 0
#else
#define INCLUDE_ALL_JavaLangClassNotFoundException 1
#endif
#undef RESTRICT_JavaLangClassNotFoundException

#pragma clang diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"

#if !defined (JavaLangClassNotFoundException_) && (INCLUDE_ALL_JavaLangClassNotFoundException || defined(INCLUDE_JavaLangClassNotFoundException))
#define JavaLangClassNotFoundException_

#define RESTRICT_JavaLangReflectiveOperationException 1
#define INCLUDE_JavaLangReflectiveOperationException 1
#include "../../java/lang/ReflectiveOperationException.h"

/*!
 @brief Thrown when a class loader is unable to find a class.
 */
@interface JavaLangClassNotFoundException : JavaLangReflectiveOperationException

#pragma mark Public

/*!
 @brief Constructs a new ClassNotFoundException that includes the current
 stack trace.
 */
- (instancetype)init;

/*!
 @brief Constructs a new ClassNotFoundException with the current stack
 trace and the specified detail message.
 @param detailMessage
 the detail message for this exception.
 */
- (instancetype)initWithNSString:(NSString *)detailMessage;

/*!
 @brief Constructs a new ClassNotFoundException with the current stack
 trace, the specified detail message and the exception that occurred when
 loading the class.
 @param detailMessage
 the detail message for this exception.
 @param exception
 the exception which occurred while loading the class.
 */
- (instancetype)initWithNSString:(NSString *)detailMessage
                 withNSException:(NSException *)exception;

/*!
 @brief Returns the cause of this Throwable, or null if there is no
 cause.
 @return Throwable the receiver's cause.
 */
- (NSException *)getCause;

/*!
 @brief Returns the exception which occurred when loading the class.
 @return Throwable the exception which occurred while loading the class.
 */
- (NSException *)getException;

@end

J2OBJC_EMPTY_STATIC_INIT(JavaLangClassNotFoundException)

FOUNDATION_EXPORT void JavaLangClassNotFoundException_init(JavaLangClassNotFoundException *self);

FOUNDATION_EXPORT JavaLangClassNotFoundException *new_JavaLangClassNotFoundException_init() NS_RETURNS_RETAINED;

FOUNDATION_EXPORT JavaLangClassNotFoundException *create_JavaLangClassNotFoundException_init();

FOUNDATION_EXPORT void JavaLangClassNotFoundException_initWithNSString_(JavaLangClassNotFoundException *self, NSString *detailMessage);

FOUNDATION_EXPORT JavaLangClassNotFoundException *new_JavaLangClassNotFoundException_initWithNSString_(NSString *detailMessage) NS_RETURNS_RETAINED;

FOUNDATION_EXPORT JavaLangClassNotFoundException *create_JavaLangClassNotFoundException_initWithNSString_(NSString *detailMessage);

FOUNDATION_EXPORT void JavaLangClassNotFoundException_initWithNSString_withNSException_(JavaLangClassNotFoundException *self, NSString *detailMessage, NSException *exception);

FOUNDATION_EXPORT JavaLangClassNotFoundException *new_JavaLangClassNotFoundException_initWithNSString_withNSException_(NSString *detailMessage, NSException *exception) NS_RETURNS_RETAINED;

FOUNDATION_EXPORT JavaLangClassNotFoundException *create_JavaLangClassNotFoundException_initWithNSString_withNSException_(NSString *detailMessage, NSException *exception);

J2OBJC_TYPE_LITERAL_HEADER(JavaLangClassNotFoundException)

#endif

#pragma clang diagnostic pop
#pragma pop_macro("INCLUDE_ALL_JavaLangClassNotFoundException")


text:
#include "kaa/logging/Log.hpp"
#include "kaa/logging/LoggingUtils.hpp"
#include "kaa/channel/SyncDataProcessor.hpp"

namespace kaa {

SyncDataProcessor::SyncDataProcessor(
                      IMetaDataTransportPtr       metaDataTransport
                    , IBootstrapTransportPtr      bootstrapTransport
                    , IProfileTransportPtr        profileTransport
                    , IConfigurationTransportPtr  configurationTransport
                    , INotificationTransportPtr   notificationTransport
                    , IUserTransportPtr           userTransport
                    , IEventTransportPtr          eventTransport
                    , ILoggingTransportPtr        loggingTransport
                    , IRedirectionTransportPtr    redirectionTransport
                    , IKaaClientStateStoragePtr   clientStatus)
        : metaDataTransport_(metaDataTransport)
        , bootstrapTransport_(bootstrapTransport)
        , profileTransport_(profileTransport)
        , configurationTransport_(configurationTransport)
        , notificationTransport_(notificationTransport)
        , userTransport_(userTransport)
        , eventTransport_(eventTransport)
        , loggingTransport_(loggingTransport)
        , redirectionTransport_(redirectionTransport)
        , clientStatus_(clientStatus)
        , requestId(0)
{

}

std::vector<std::uint8_t> SyncDataProcessor::compileRequest(const std::map<TransportType, ChannelDirection>& transportTypes)
{
    SyncRequest request;

    request.requestId = ++requestId;
    request.bootstrapSyncRequest.set_null();
    request.configurationSyncRequest.set_null();
    request.eventSyncRequest.set_null();
    request.logSyncRequest.set_null();
    request.notificationSyncRequest.set_null();
    request.profileSyncRequest.set_null();
    request.userSyncRequest.set_null();

    KAA_LOG_DEBUG(boost::format("Compiling sync request. RequestId: %1%") % requestId);

    auto metaRequest = metaDataTransport_->createSyncRequestMetaData();
    request.syncRequestMetaData.set_SyncRequestMetaData(*metaRequest);
    KAA_LOG_DEBUG(boost::format("Compiled SyncRequestMetaData: %1%")
                        % LoggingUtils::MetaDataSyncRequestToString(request.syncRequestMetaData));

    for (const auto& t : transportTypes) {
        bool isDownDirection = (t.second == ChannelDirection::DOWN);
        switch (t.first) {
            case TransportType::BOOTSTRAP :
                if (isDownDirection) {
                    request.bootstrapSyncRequest.set_null();
                } else if (bootstrapTransport_) {
                    auto ptr = bootstrapTransport_->createBootstrapSyncRequest();
                    if (ptr) {
                        request.bootstrapSyncRequest.set_BootstrapSyncRequest(*ptr);
                    } else {
                        request.bootstrapSyncRequest.set_null();
                    }
                } else {
                    KAA_LOG_WARN("Bootstrap transport was not specified.");
                }
                KAA_LOG_DEBUG(boost::format("Compiled BootstrapSyncRequest: %1%")
                    % LoggingUtils::BootstrapSyncRequestToString(request.bootstrapSyncRequest));
            break;
            case TransportType::PROFILE :
                if (isDownDirection) {
                    request.profileSyncRequest.set_null();
                } else if (profileTransport_) {
                    auto ptr = profileTransport_->createProfileRequest();
                    if (ptr) {
                        request.profileSyncRequest.set_ProfileSyncRequest(*ptr);
                    } else {
                        request.profileSyncRequest.set_null();
                    }
                } else {
                    KAA_LOG_WARN("Profile transport was not specified.");
                }
                KAA_LOG_DEBUG(boost::format("Compiled ProfileSyncRequest: %1%")
                    % LoggingUtils::ProfileSyncRequestToString(request.profileSyncRequest));
                break;
            case TransportType::CONFIGURATION:
                if (configurationTransport_) {
                    auto ptr = configurationTransport_->createConfigurationRequest();
                    if (ptr) {
                        request.configurationSyncRequest.set_ConfigurationSyncRequest(*ptr);
                    } else {
                        request.configurationSyncRequest.set_null();
                    }
                } else {
                    KAA_LOG_WARN("Configuration transport was not specified.");
                }
                KAA_LOG_DEBUG(boost::format("Compiled ConfigurationSyncRequest: %1%")
                   % LoggingUtils::ConfigurationSyncRequestToString(request.configurationSyncRequest));
                break;
            case TransportType::NOTIFICATION:
                if (notificationTransport_) {
                    if (isDownDirection) {
                        request.notificationSyncRequest.set_NotificationSyncRequest(*notificationTransport_->createEmptyNotificationRequest());
                    } else {
                        auto ptr = notificationTransport_->createNotificationRequest();
                        if (ptr) {
                            request.notificationSyncRequest.set_NotificationSyncRequest(*ptr);
                        } else {
                            request.notificationSyncRequest.set_null();
                        }
                    }
                } else {
                    KAA_LOG_WARN("Notification transport was not specified.");
                }
                KAA_LOG_DEBUG(boost::format("Compiled NotificationSyncRequest: %1%")
                   % LoggingUtils::NotificationSyncRequestToString(request.notificationSyncRequest));
                break;
            case TransportType::USER:
                if (isDownDirection) {
                    UserSyncRequest user;
                    user.endpointAttachRequests.set_null();
                    user.endpointDetachRequests.set_null();
                    user.userAttachRequest.set_null();
                    request.userSyncRequest.set_UserSyncRequest(user);
                } else if (userTransport_) {
                    auto ptr = userTransport_->createUserRequest();
                    if (ptr) {
                        request.userSyncRequest.set_UserSyncRequest(*ptr);
                    } else {
                        request.userSyncRequest.set_null();
                    }
                } else {
                    KAA_LOG_WARN("User transport was not specified.");
                }
                KAA_LOG_DEBUG(boost::format("Compiled UserSyncRequest: %1%")
                    % LoggingUtils::UserSyncRequestToString(request.userSyncRequest));
                break;
            case TransportType::EVENT:
                if (isDownDirection) {
                    EventSyncRequest event;
                    event.eventListenersRequests.set_null();
                    event.events.set_null();
                    request.eventSyncRequest.set_EventSyncRequest(event);
                } else if (eventTransport_) {
                    auto ptr = eventTransport_->createEventRequest(requestId);
                    if (ptr) {
                        request.eventSyncRequest.set_EventSyncRequest(*ptr);
                    } else {
                        request.eventSyncRequest.set_null();
                    }
                } else {
                    KAA_LOG_WARN("Event transport was not specified.");
                }
                KAA_LOG_DEBUG(boost::format("Compiled EventSyncRequest: %1%")
                    % LoggingUtils::EventSyncRequestToString(request.eventSyncRequest));
                break;
            case TransportType::LOGGING:
                if (isDownDirection) {
                    LogSyncRequest log;
                    log.logEntries.set_null();
                    log.requestId = 0;
                    request.logSyncRequest.set_LogSyncRequest(log);
                } else if (loggingTransport_) {
                    auto ptr = loggingTransport_->createLogSyncRequest();
                    if (ptr) {
                        request.logSyncRequest.set_LogSyncRequest(*ptr);
                    } else {
                        request.logSyncRequest.set_null();
                    }
                } else {
                    KAA_LOG_WARN("Log upload transport was not specified.");
                }
                KAA_LOG_DEBUG(boost::format("Compiled LogSyncRequest: %1%")
                    % LoggingUtils::LogSyncRequestToString(request.logSyncRequest));
                break;
            default:
                break;
        }
    }

    std::vector<std::uint8_t> encodedData;
    requestConverter_.toByteArray(request, encodedData);

    return encodedData;
}

void SyncDataProcessor::processResponse(const std::vector<std::uint8_t> &response)
{
    SyncResponse syncResponse = responseConverter_.fromByteArray(response.data(), response.size());
    std::int32_t requestId = syncResponse.requestId;
    KAA_LOG_INFO(boost::format("Got SyncResponse: requestId: %1%, result: %2%")
        % requestId % LoggingUtils::SyncResponseResultTypeToString(syncResponse.status));

    if (!syncResponse.bootstrapSyncResponse.is_null()) {
        KAA_LOG_DEBUG(boost::format("Got BootstrapSyncResponse: %1%")
            % LoggingUtils::BootstrapSyncResponseToString(syncResponse.bootstrapSyncResponse));
        if (bootstrapTransport_) {
            bootstrapTransport_->onBootstrapResponse(syncResponse.bootstrapSyncResponse.get_BootstrapSyncResponse());
        } else {
            KAA_LOG_ERROR("Got bootstrap sync response, but profile transport was not set!");
        }
    }

    if (!syncResponse.profileSyncResponse.is_null()) {
        KAA_LOG_DEBUG(boost::format("Got ProfileSyncResponse: %1%")
            % LoggingUtils::ProfileSyncResponseToString(syncResponse.profileSyncResponse));
        if (profileTransport_) {
            profileTransport_->onProfileResponse(syncResponse.profileSyncResponse.get_ProfileSyncResponse());
        } else {
            KAA_LOG_ERROR("Got profile sync response, but profile transport was not set!");
        }
    } else if (syncResponse.status == SyncResponseResultType::PROFILE_RESYNC) {
        if (profileTransport_) {
            profileTransport_->onProfileResync();
        } else {
            KAA_LOG_ERROR("Got profile resync request, but profile transport was not set!");
        }
    }

    if (!syncResponse.configurationSyncResponse.is_null()) {
        KAA_LOG_DEBUG(boost::format("Got ConfigurationSyncResponse: %1%")
                % LoggingUtils::ConfigurationSyncResponseToString(syncResponse.configurationSyncResponse));
        if (configurationTransport_) {
            configurationTransport_->onConfigurationResponse(syncResponse.configurationSyncResponse.get_ConfigurationSyncResponse());
        } else {
            KAA_LOG_ERROR("Got configuration sync response, but configuration transport was not set!");
        }
    }

    if (eventTransport_) {
        eventTransport_->onSyncResponseId(requestId);
        if (!syncResponse.eventSyncResponse.is_null()) {
            KAA_LOG_DEBUG(boost::format("Got EventSyncResponse: %1%")
                    % LoggingUtils::EventSyncResponseToString(syncResponse.eventSyncResponse));
                eventTransport_->onEventResponse(syncResponse.eventSyncResponse.get_EventSyncResponse());
        }
    } else {
        KAA_LOG_ERROR("Event transport was not set!");
    }

    if (!syncResponse.notificationSyncResponse.is_null()) {
        KAA_LOG_DEBUG(boost::format("Got NotificationSyncResponse: %1%")
                % LoggingUtils::NotificationSyncResponseToString(syncResponse.notificationSyncResponse));
        if (notificationTransport_) {
            notificationTransport_->onNotificationResponse(syncResponse.notificationSyncResponse.get_NotificationSyncResponse());
        } else {
            KAA_LOG_ERROR("Got notification sync response, but notification transport was not set!");
        }
    }

    if (!syncResponse.userSyncResponse.is_null()) {
        KAA_LOG_DEBUG(boost::format("Got UserSyncResponse: %1%")
                % LoggingUtils::UserSyncResponseToString(syncResponse.userSyncResponse));
        if (userTransport_) {
            userTransport_->onUserResponse(syncResponse.userSyncResponse.get_UserSyncResponse());
        } else {
            KAA_LOG_ERROR("Got user sync response, but user transport was not set!");
        }
    }

    if (!syncResponse.logSyncResponse.is_null()) {
        KAA_LOG_DEBUG(boost::format("Got LogSyncResponse: %1%")
                % LoggingUtils::LogSyncResponseToString(syncResponse.logSyncResponse));
        if (loggingTransport_) {
            loggingTransport_->onLogSyncResponse(syncResponse.logSyncResponse.get_LogSyncResponse());
        } else {
            KAA_LOG_ERROR("Got log upload sync response, but logging transport was not set!");
        }
    }

    if (!syncResponse.redirectSyncResponse.is_null()) {
        KAA_LOG_DEBUG(boost::format("Got RedirectSyncResponse: %1%")
                % LoggingUtils::RedirectSyncResponseToString(syncResponse.redirectSyncResponse));
        if (redirectionTransport_) {
            redirectionTransport_->onRedirectionResponse(syncResponse.redirectSyncResponse.get_RedirectSyncResponse());
        } else {
            KAA_LOG_ERROR("Got redirection sync response, but redirection transport was not set!");
        }
    }

    KAA_LOG_DEBUG("Processed SyncResponse");
    clientStatus_->save();
}

}  // namespace kaa


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.02.25 at 12:05:09 AM CET
//

package com.hack23.cia.model.internal.application.system.impl;

import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.hack23.cia.model.common.api.ModelObject;
import com.hack23.cia.model.common.impl.xml.XmlDateTimeTypeAdapter;

/**
 *
Java class for LanguageData complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="LanguageData">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="modelObjectId" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
 *         <element name="modelObjectVersion" type="{http://www.w3.org/2001/XMLSchema}int"/>
 *         <element name="createdDate" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
 *         <element name="languageName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="languageCode" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="translationStatus" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="languageEnabled" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
 *         <element name="autoTranslationEnabled" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
 *         <element name="lastModifiedDate" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "LanguageData", propOrder = {
    "modelObjectId",
    "modelObjectVersion",
    "createdDate",
    "languageName",
    "languageCode",
    "translationStatus",
    "languageEnabled",
    "autoTranslationEnabled",
    "lastModifiedDate"
})
@Entity(name = "LanguageData")
@Table(name = "LANGUAGE_DATA")
@Inheritance(strategy = InheritanceType.JOINED)
public class LanguageData
    implements ModelObject
{

    /**
	 *
	 */
	private static final long serialVersionUID = 1L;
	protected Integer modelObjectId;
    protected int modelObjectVersion;
    @XmlElement(type = String.class)
    @XmlJavaTypeAdapter(XmlDateTimeTypeAdapter.class)
    @XmlSchemaType(name = "dateTime")
    protected Date createdDate;
    protected String languageName;
    protected String languageCode;
    protected String translationStatus;
    protected Boolean languageEnabled;
    protected Boolean autoTranslationEnabled;
    @XmlElement(type = String.class)
    @XmlJavaTypeAdapter(XmlDateTimeTypeAdapter.class)
    @XmlSchemaType(name = "dateTime")
    protected Date lastModifiedDate;
    @XmlAttribute(name = "Hjid")
    protected Long hjid;

    /**
     * Gets the value of the modelObjectId property.
     *
     * @return
     *     possible object is
     *     {@link Integer }
     *
     */
    @Basic
    @Column(name = "MODEL_OBJECT_ID", precision = 10, scale = 0)
    public Integer getModelObjectId() {
        return modelObjectId;
    }

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

    /**
     * Gets the value of the modelObjectVersion property.
     *
     */
    @Version
    @Column(name = "MODEL_OBJECT_VERSION")
    public int getModelObjectVersion() {
        return modelObjectVersion;
    }

    /**
     * Sets the value of the modelObjectVersion property.
     *
     */
    public void setModelObjectVersion(final int value) {
        this.modelObjectVersion = value;
    }

    /**
     * Gets the value of the createdDate property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    @Basic
    @Column(name = "CREATED_DATE")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getCreatedDate() {
        return createdDate;
    }

    /**
     * Sets the value of the createdDate property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setCreatedDate(final Date value) {
        this.createdDate = value;
    }

    /**
     * Gets the value of the languageName property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    @Basic
    @Column(name = "LANGUAGE_NAME")
    public String getLanguageName() {
        return languageName;
    }

    /**
     * Sets the value of the languageName property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setLanguageName(final String value) {
        this.languageName = value;
    }

    /**
     * Gets the value of the languageCode property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    @Basic
    @Column(name = "LANGUAGE_CODE")
    public String getLanguageCode() {
        return languageCode;
    }

    /**
     * Sets the value of the languageCode property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setLanguageCode(final String value) {
        this.languageCode = value;
    }

    /**
     * Gets the value of the translationStatus property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    @Basic
    @Column(name = "TRANSLATION_STATUS")
    public String getTranslationStatus() {
        return translationStatus;
    }

    /**
     * Sets the value of the translationStatus property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setTranslationStatus(final String value) {
        this.translationStatus = value;
    }

    /**
     * Gets the value of the languageEnabled property.
     *
     * @return
     *     possible object is
     *     {@link Boolean }
     *
     */
    @Basic
    @Column(name = "LANGUAGE_ENABLED")
    public Boolean isLanguageEnabled() {
        return languageEnabled;
    }

    /**
     * Sets the value of the languageEnabled property.
     *
     * @param value
     *     allowed object is
     *     {@link Boolean }
     *
     */
    public void setLanguageEnabled(final Boolean value) {
        this.languageEnabled = value;
    }

    /**
     * Gets the value of the autoTranslationEnabled property.
     *
     * @return
     *     possible object is
     *     {@link Boolean }
     *
     */
    @Basic
    @Column(name = "AUTO_TRANSLATION_ENABLED")
    public Boolean isAutoTranslationEnabled() {
        return autoTranslationEnabled;
    }

    /**
     * Sets the value of the autoTranslationEnabled property.
     *
     * @param value
     *     allowed object is
     *     {@link Boolean }
     *
     */
    public void setAutoTranslationEnabled(final Boolean value) {
        this.autoTranslationEnabled = value;
    }

    /**
     * Gets the value of the lastModifiedDate property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    @Basic
    @Column(name = "LAST_MODIFIED_DATE")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getLastModifiedDate() {
        return lastModifiedDate;
    }

    /**
     * Sets the value of the lastModifiedDate property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setLastModifiedDate(final Date value) {
        this.lastModifiedDate = value;
    }

    public LanguageData withModelObjectId(final Integer value) {
        setModelObjectId(value);
        return this;
    }

    public LanguageData withModelObjectVersion(final int value) {
        setModelObjectVersion(value);
        return this;
    }

    public LanguageData withCreatedDate(final Date value) {
        setCreatedDate(value);
        return this;
    }

    public LanguageData withLanguageName(final String value) {
        setLanguageName(value);
        return this;
    }

    public LanguageData withLanguageCode(final String value) {
        setLanguageCode(value);
        return this;
    }

    public LanguageData withTranslationStatus(final String value) {
        setTranslationStatus(value);
        return this;
    }

    public LanguageData withLanguageEnabled(final Boolean value) {
        setLanguageEnabled(value);
        return this;
    }

    public LanguageData withAutoTranslationEnabled(final Boolean value) {
        setAutoTranslationEnabled(value);
        return this;
    }

    public LanguageData withLastModifiedDate(final Date value) {
        setLastModifiedDate(value);
        return this;
    }

	@Override
	public final String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
	}

    /**
     * Gets the value of the hjid property.
     *
     * @return
     *     possible object is
     *     {@link Long }
     *
     */
    @Id
    @Column(name = "HJID")
    @GeneratedValue(strategy = GenerationType.AUTO)
    public Long getHjid() {
        return hjid;
    }

    /**
     * Sets the value of the hjid property.
     *
     * @param value
     *     allowed object is
     *     {@link Long }
     *
     */
    public void setHjid(final Long value) {
        this.hjid = value;
    }

	@Override
	public final boolean equals(final Object obj) {
		return EqualsBuilder.reflectionEquals(this, obj);
	}

	@Override
	public final int hashCode() {
		return HashCodeBuilder.reflectionHashCode(this);
	}

}