text:
<link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-checkbox.html">
<link rel="import" href="chrome://resources/cr_elements/cr_events/cr_events.html">
<link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_behavior.html">
<link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_indicator.html">
<link rel="import" href="chrome://md-settings/pref_tracker/pref_tracker.html">

<dom-module id="settings-checkbox">
  <link rel="import" type="css" href="chrome://resources/cr_elements/shared.css">
  <template>

    <cr-events id="events"></cr-events>
    <settings-pref-tracker pref="[[pref]]"></settings-pref-tracker>

      <paper-checkbox id="checkbox" checked="{{checked}}"
          disabled="[[checkboxDisabled_(disabled, pref)]]">

[[label]]

[[subLabel]]

      </paper-checkbox>
      <template is="dom-if" if="[[pref.policySource]]">
        <cr-policy-pref-indicator pref="[[pref]]"></cr-policy-pref-indicator>
      </template>

  </template>

</dom-module>


text:
package org.olat.presentation.portfolio;

import org.apache.log4j.Logger;
import org.olat.data.basesecurity.Identity;
import org.olat.data.portfolio.structure.EPDefaultMap;
import org.olat.data.portfolio.structure.EPStructuredMap;
import org.olat.data.portfolio.structure.PortfolioStructureMap;
import org.olat.data.repository.RepositoryEntry;
import org.olat.lms.portfolio.EPFrontendManager;
import org.olat.lms.portfolio.EPTemplateMapResource;
import org.olat.presentation.framework.core.UserRequest;
import org.olat.presentation.framework.core.components.Component;
import org.olat.presentation.framework.core.components.link.Link;
import org.olat.presentation.framework.core.components.link.LinkFactory;
import org.olat.presentation.framework.core.components.panel.Panel;
import org.olat.presentation.framework.core.components.velocity.VelocityContainer;
import org.olat.presentation.framework.core.control.Controller;
import org.olat.presentation.framework.core.control.WindowControl;
import org.olat.presentation.framework.core.control.controller.BasicController;
import org.olat.presentation.framework.core.control.generic.closablewrapper.CloseableCalloutWindowController;
import org.olat.presentation.framework.core.control.generic.closablewrapper.CloseableModalWindowWrapperController;
import org.olat.presentation.framework.core.control.generic.dtabs.Activateable;
import org.olat.presentation.portfolio.structel.EPCreateMapController;
import org.olat.presentation.portfolio.structel.EPMapCreatedEvent;
import org.olat.presentation.portfolio.structel.EPMapEvent;
import org.olat.presentation.portfolio.structel.EPMultipleMapController;
import org.olat.presentation.portfolio.structel.EPStructureEvent;
import org.olat.presentation.repository.ReferencableEntriesSearchController;
import org.olat.presentation.search.SearchController;
import org.olat.presentation.search.SearchServiceUIFactory;
import org.olat.presentation.search.SearchServiceUIFactory.DisplayOption;
import org.olat.system.commons.StringHelper;
import org.olat.system.commons.configuration.ConfigOnOff;
import org.olat.system.event.Event;
import org.olat.system.logging.log4j.LoggerHelper;
import org.olat.system.spring.CoreSpringFactory;

/**
 * Description:

 * Shows all Maps of a user.
 *

 * Initial Date: 11.06.2010

 *
 * @author Roman Haag, roman.haag@frentix.com, http://www.frentix.com
 */
public class EPMapRunController extends BasicController implements Activateable {

    private static final Logger log = LoggerHelper.getLogger();
    private VelocityContainer vC;
    private Link createMapLink;
    private Link createMapFromTemplateLink;
    private EPCreateMapController createMapCtrl;
    private CloseableModalWindowWrapperController createMapBox;
    private ReferencableEntriesSearchController searchTemplateCtrl;
    private EPMultipleMapController multiMapCtrl;
    private SearchController searchController;

    private final boolean create;
    private final Identity choosenOwner;
    private final EPMapRunViewOption option;
    private final EPFrontendManager ePFMgr;
    private Link createMapCalloutLink;
    private CloseableCalloutWindowController mapCreateCalloutCtrl;

    /**
     * @param ureq
     * @param wControl
     * @param create
     *            Can user create new maps in this context
     * @param option
     *            Select the view option from the maps
     * @param choosenOwner
     *            Limit the list to maps from one specific owner
     * @param types
     */
    public EPMapRunController(final UserRequest ureq, final WindowControl wControl, final boolean create, final EPMapRunViewOption option, final Identity choosenOwner) {
        super(ureq, wControl);
        this.create = create;
        this.option = option;
        this.choosenOwner = choosenOwner;
        ePFMgr = (EPFrontendManager) CoreSpringFactory.getBean(EPFrontendManager.class);

        Component viewComp = new Panel("empty");
        final ConfigOnOff portfolioModule = (ConfigOnOff) CoreSpringFactory.getBean("portfolioModule");
        if (portfolioModule.isEnabled()) {
            init(ureq);
            viewComp = vC;
        }

        putInitialPanel(viewComp);
    }

    private void init(final UserRequest ureq) {
        vC = createVelocityContainer("mymapsmain");
        if (create) {
            createMapLink = LinkFactory.createButton("create.map", vC, this);
        }

        String documentType = null;
        switch (option) {
        case MY_DEFAULTS_MAPS:
            documentType = "type.d*." + EPDefaultMap.class.getSimpleName();
            break;
        case MY_EXERCISES_MAPS:
            documentType = "type.*." + EPStructuredMap.class.getSimpleName();
            break;
        }

        if (documentType != null) {
            final SearchServiceUIFactory searchServiceUIFactory = (SearchServiceUIFactory) CoreSpringFactory.getBean(SearchServiceUIFactory.class);
            searchController = searchServiceUIFactory.createInputController(ureq, getWindowControl(), DisplayOption.STANDARD, null);
            listenTo(searchController);
            vC.put("search_input", searchController.getInitialComponent());

            searchController.setDocumentType(documentType);
            searchController.setResourceContextEnable(true);
            searchController.setResourceUrl(null);
        }

        initTitle();
        removeAsListenerAndDispose(multiMapCtrl);
        multiMapCtrl = new EPMultipleMapController(ureq, getWindowControl(), option, choosenOwner);
        listenTo(multiMapCtrl);
        vC.put("mapCtrl", multiMapCtrl.getInitialComponent());
    }

    private void initTitle() {
        String titleKey;
        String descriptionKey;
        switch (option) {
        case OTHER_MAPS:
            titleKey = "othermap.title";
            descriptionKey = "othermap.intro";
            break;
        case OTHERS_MAPS:
            titleKey = "othermaps.title";
            descriptionKey = "othermaps.intro";
            break;
        case MY_EXERCISES_MAPS:
            titleKey = "mystructuredmaps.title";
            descriptionKey = "mystructuredmaps.intro";
            break;
        default:// MY_DEFAULTS_MAPS:
            titleKey = "mymaps.title";
            descriptionKey = "mymaps.intro";
            break;
        }

        vC.contextPut("title", titleKey);
        vC.contextPut("description", descriptionKey);
    }

    @Override
    public void activate(final UserRequest ureq, final String viewIdentifier) {
        if (!StringHelper.containsNonWhitespace(viewIdentifier)) {
            return;
        }

        final int index = viewIdentifier.indexOf("[map:");
        if (index >= 0) {
            multiMapCtrl.activate(ureq, viewIdentifier);
        } else {
            try {
                Long.parseLong(viewIdentifier);
            } catch (final Exception e) {
                log.error("could not convert viewIdentifier to mapID", e);
            } finally {
                multiMapCtrl.activate(ureq, viewIdentifier);
            }
        }

    }

    @SuppressWarnings("unused")
    @Override
    protected void event(final UserRequest ureq, final Component source, final Event event) {
        if (source == createMapLink) {
            // if only normal maps can be created, show popup immediately, else present selection in callout
            if (option.equals(EPMapRunViewOption.MY_DEFAULTS_MAPS)) {
                final VelocityContainer mapCreateVC = createVelocityContainer("createMapCallout");
                createMapCalloutLink = LinkFactory.createLink("create.map.default", mapCreateVC, this);
                createMapFromTemplateLink = LinkFactory.createLink("create.map.fromTemplate", mapCreateVC, this);
                final String title = translate("create.map");

                removeAsListenerAndDispose(mapCreateCalloutCtrl);
                mapCreateCalloutCtrl = new CloseableCalloutWindowController(ureq, getWindowControl(), mapCreateVC, createMapLink, title, true, null);
                listenTo(mapCreateCalloutCtrl);
                mapCreateCalloutCtrl.activate();
            } else {
                popUpCreateMapBox(ureq);
            }
        } else if (source == createMapFromTemplateLink) {
            closeCreateMapCallout();
            popUpCreateMapFromTemplateBox(ureq);
        } else if (source == createMapCalloutLink) {
            closeCreateMapCallout();
            popUpCreateMapBox(ureq);
        }
    }

    private void closeCreateMapCallout() {
        if (mapCreateCalloutCtrl != null) {
            mapCreateCalloutCtrl.deactivate();
            removeAsListenerAndDispose(mapCreateCalloutCtrl);
            mapCreateCalloutCtrl = null;
        }
    }

    /**
	 */
    @Override
    protected void event(final UserRequest ureq, final Controller source, final Event event) {
        super.event(ureq, source, event);
        if (source == createMapBox) {
            popDownCreateMapBox();
        } else if (source == createMapCtrl) {
            if (event instanceof EPMapCreatedEvent) {
                final PortfolioStructureMap newMap = ((EPMapCreatedEvent) event).getPortfolioStructureMap();
                multiMapCtrl.activateMap(ureq, newMap);
            }
            createMapBox.deactivate();
            popDownCreateMapBox();
        } else if (source == searchTemplateCtrl) {
            if (event == ReferencableEntriesSearchController.EVENT_REPOSITORY_ENTRY_SELECTED) {
                final RepositoryEntry repoEntry = searchTemplateCtrl.getSelectedEntry();
                final PortfolioStructureMap newMap = createMapFromTemplate(repoEntry);
                multiMapCtrl.activateMap(ureq, newMap);
            }
            createMapBox.deactivate();
            popDownCreateMapBox();
        } else if (source == multiMapCtrl) {
            if (event instanceof EPMapEvent) {
                final String cmd = event.getCommand();
                if (EPStructureEvent.SELECT.equals(cmd)) {
                    if (createMapLink != null) {
                        createMapLink.setVisible(false);
                    }
                } else if (EPStructureEvent.CLOSE.equals(cmd)) {
                    if (createMapLink != null) {
                        createMapLink.setVisible(true);
                    }
                }
            }
        } else if (source == mapCreateCalloutCtrl && event == CloseableCalloutWindowController.CLOSE_WINDOW_EVENT) {
            removeAsListenerAndDispose(mapCreateCalloutCtrl);
            mapCreateCalloutCtrl = null;
        }
    }

    private void popDownCreateMapBox() {
        removeAsListenerAndDispose(createMapCtrl);
        createMapCtrl = null;
        createMapBox.dispose();
        createMapBox = null;
    }

    /**
     * @param ureq
     */
    private void popUpCreateMapBox(final UserRequest ureq) {
        final String title = translate("create.map");
        createMapCtrl = new EPCreateMapController(ureq, getWindowControl());
        listenTo(createMapCtrl);
        createMapBox = new CloseableModalWindowWrapperController(ureq, getWindowControl(), title, createMapCtrl.getInitialComponent(), "addMapBox");
        listenTo(createMapBox);
        createMapBox.setInitialWindowSize(750, 300);
        createMapBox.activate();
    }

    private void popUpCreateMapFromTemplateBox(final UserRequest ureq) {
        final String title = translate("create.map");
        final String commandLabel = translate("create.map.selectTemplate");
        removeAsListenerAndDispose(searchTemplateCtrl);
        searchTemplateCtrl = new ReferencableEntriesSearchController(getWindowControl(), ureq, new String[] { EPTemplateMapResource.TYPE_NAME }, commandLabel, false,
                false, false);
        listenTo(searchTemplateCtrl);
        createMapBox = new CloseableModalWindowWrapperController(ureq, getWindowControl(), title, searchTemplateCtrl.getInitialComponent(), "addMapFromTemplateBox");
        listenTo(createMapBox);
        createMapBox.setInitialWindowSize(800, 600);
        createMapBox.activate();
    }

    private PortfolioStructureMap createMapFromTemplate(final RepositoryEntry repoEntry) {
        final PortfolioStructureMap template = (PortfolioStructureMap) ePFMgr.loadPortfolioStructure(repoEntry.getOlatResource());
        final PortfolioStructureMap copy = ePFMgr.createAndPersistPortfolioDefaultMap(getIdentity(), template.getTitle(), template.getDescription());
        ePFMgr.copyStructureRecursively(template, copy, true);
        return copy;
    }

    @Override
    protected void doDispose() {
        if (createMapBox != null) {
            createMapBox.dispose();
            createMapBox = null;
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
CHANGELOG for Fighting Slumlords
================================

(No need to update version numbers as of yet, just add to the list for 1.0.0)

* 1.0.0
  * Login and registration is now working (FOSUserBundle).
  * Twitter Bootstrap is now integrated with our views.


text:
package com.android.gallery3d.exif;

import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.util.ArrayList;
import java.util.List;

import android.util.Log;

class ExifModifier {
    private static class TagOffset {
        final int mOffset;
        final ExifTag mTag;

        TagOffset(ExifTag tag,int offset){
            mTag=tag;
            mOffset=offset;
        }
    }

    public static final String TAG="ExifModifier";
    public static final boolean DEBUG=false;
    private final ByteBuffer mByteBuffer;
    private final ExifData mTagToModified;
    private final List<TagOffset> mTagOffsets=new ArrayList<TagOffset>();
    private final ExifInterface mInterface;

    private int mOffsetBase;

    protected ExifModifier(ByteBuffer byteBuffer,ExifInterface iRef) throws IOException,
    ExifInvalidFormatException{
        mByteBuffer=byteBuffer;
        mOffsetBase=byteBuffer.position();
        mInterface=iRef;
        InputStream is=null;
        try{
            is=new ByteBufferInputStream(byteBuffer);
            // Do not require any IFD;
            ExifParser parser=ExifParser.parse(is,mInterface);
            mTagToModified=new ExifData(parser.getByteOrder());
            mOffsetBase+=parser.getTiffStartPosition();
            mByteBuffer.position(0);
        }finally{
            ExifInterface.closeSilently(is);
        }
    }

    protected boolean commit() throws IOException,ExifInvalidFormatException{
        InputStream is=null;
        try{
            is=new ByteBufferInputStream(mByteBuffer);
            int flag=0;
            IfdData[] ifdDatas=new IfdData[]{
                    mTagToModified.getIfdData(IfdId.TYPE_IFD_0),
                    mTagToModified.getIfdData(IfdId.TYPE_IFD_1),
                    mTagToModified.getIfdData(IfdId.TYPE_IFD_EXIF),
                    mTagToModified.getIfdData(IfdId.TYPE_IFD_INTEROPERABILITY),
                    mTagToModified.getIfdData(IfdId.TYPE_IFD_GPS)
            };

            if(ifdDatas[IfdId.TYPE_IFD_0] != null){
                flag|=ExifParser.OPTION_IFD_0;
            }
            if(ifdDatas[IfdId.TYPE_IFD_1] != null){
                flag|=ExifParser.OPTION_IFD_1;
            }
            if(ifdDatas[IfdId.TYPE_IFD_EXIF] != null){
                flag|=ExifParser.OPTION_IFD_EXIF;
            }
            if(ifdDatas[IfdId.TYPE_IFD_GPS] != null){
                flag|=ExifParser.OPTION_IFD_GPS;
            }
            if(ifdDatas[IfdId.TYPE_IFD_INTEROPERABILITY] != null){
                flag|=ExifParser.OPTION_IFD_INTEROPERABILITY;
            }

            ExifParser parser=ExifParser.parse(is,flag,mInterface);
            int event=parser.next();
            IfdData currIfd=null;
            while(event != ExifParser.EVENT_END){
                switch(event){
                    case ExifParser.EVENT_START_OF_IFD:
                        currIfd=ifdDatas[parser.getCurrentIfd()];
                        if(currIfd == null){
                            parser.skipRemainingTagsInCurrentIfd();
                        }
                        break;
                    case ExifParser.EVENT_NEW_TAG:
                        ExifTag oldTag=parser.getTag();
                        ExifTag newTag=currIfd.getTag(oldTag.getTagId());
                        if(newTag != null){
                            if(newTag.getComponentCount() != oldTag.getComponentCount()
                                    || newTag.getDataType() != oldTag.getDataType()){
                                return false;
                            }else{
                                mTagOffsets.add(new TagOffset(newTag,oldTag.getOffset()));
                                currIfd.removeTag(oldTag.getTagId());
                                if(currIfd.getTagCount() == 0){
                                    parser.skipRemainingTagsInCurrentIfd();
                                }
                            }
                        }
                        break;
                }
                event=parser.next();
            }
            for(IfdData ifd:ifdDatas){
                if(ifd != null && ifd.getTagCount() > 0){ return false; }
            }
            modify();
        }finally{
            ExifInterface.closeSilently(is);
        }
        return true;
    }

    protected ByteOrder getByteOrder(){
        return mTagToModified.getByteOrder();
    }

    private void modify(){
        mByteBuffer.order(getByteOrder());
        for(TagOffset tagOffset:mTagOffsets){
            writeTagValue(tagOffset.mTag,tagOffset.mOffset);
        }
    }

    public void modifyTag(ExifTag tag){
        mTagToModified.addTag(tag);
    }

    private void writeTagValue(ExifTag tag,int offset){
        if(DEBUG){
            Log.v(TAG,"modifying tag to: \n" + tag.toString());
            Log.v(TAG,"at offset: " + offset);
        }
        mByteBuffer.position(offset + mOffsetBase);
        switch(tag.getDataType()){
            case ExifTag.TYPE_ASCII:
                byte buf[]=tag.getStringByte();
                if(buf.length == tag.getComponentCount()){
                    buf[buf.length - 1]=0;
                    mByteBuffer.put(buf);
                }else{
                    mByteBuffer.put(buf);
                    mByteBuffer.put((byte)0);
                }
                break;
            case ExifTag.TYPE_LONG:
            case ExifTag.TYPE_UNSIGNED_LONG:
                for(int i=0,n=tag.getComponentCount();i < n;i++){
                    mByteBuffer.putInt((int)tag.getValueAt(i));
                }
                break;
            case ExifTag.TYPE_RATIONAL:
            case ExifTag.TYPE_UNSIGNED_RATIONAL:
                for(int i=0,n=tag.getComponentCount();i < n;i++){
                    Rational v=tag.getRational(i);
                    mByteBuffer.putInt((int)v.getNumerator());
                    mByteBuffer.putInt((int)v.getDenominator());
                }
                break;
            case ExifTag.TYPE_UNDEFINED:
            case ExifTag.TYPE_UNSIGNED_BYTE:
                buf=new byte[tag.getComponentCount()];
                tag.getBytes(buf);
                mByteBuffer.put(buf);
                break;
            case ExifTag.TYPE_UNSIGNED_SHORT:
                for(int i=0,n=tag.getComponentCount();i < n;i++){
                    mByteBuffer.putShort((short)tag.getValueAt(i));
                }
                break;
        }
    }
}


text:
require 'spec_helper'

xdescribe StandardScoresController do
  before (:each) do
    @admin = FactoryGirl.create(:super_admin_user)
    @user = FactoryGirl.create(:data_entry_volunteer_user)
    @other_user = FactoryGirl.create(:data_entry_volunteer_user)
    sign_in @admin

    @judge = FactoryGirl.create(:judge, user_id: @user.id)

    @comp = FactoryGirl.create(:event_competitor, competition: @judge.competition)
    @comp2 = FactoryGirl.create(:event_competitor, competition: @judge.competition)
    @judge.competition.competitors << @comp2
    @judge.competition.competitors << @comp
    @judge.save!
  end

  # This should return the minimal set of attributes required to create a valid
  # Score. As you add validations to Score, be sure to
  # update the return value of this method accordingly.
  def valid_attributes
    { }
  end

  describe "GET index" do
    it "assigns all competitors as @competitors" do
      get :index, judge_id: @judge.id
      expect(response).to be_success
      expect(assigns(:competitors)).to eq([@comp, @comp2])
    end
  end

  describe "GET new" do
    it "assigns the associated skills_routines as @skills" do
      FactoryGirl.create(:standard_execution_score, judge: @judge, competitor: @comp)
      @routine = FactoryGirl.create(:standard_skill_routine, registrant: @comp.registrants.first)
      skill = FactoryGirl.create(:standard_skill_routine_entry, standard_skill_routine: @routine)

      get :new, judge_id: @judge.id, competitor_id: @comp.id
      expect(assigns(:skills)).to eq([skill])
    end
  end
end


text:
/* jslint node: true, esnext: true */

'use strict';

const fs = require('fs');

exports.registerWithManager = manager =>
	manager.registerStep(Object.assign({}, require('kronos-step').Step, {
		name: 'kronos-file',
		endpoints: { in : { in : true
			}
		},
		initialize(manager, name, conf, properties) {
			const fileName = conf.fileName;

			properties._start = {
				value: function () {
					this.endpoints.in.receive = request => {
						return new Promise((fullfill, reject) => {
							const writer = fs.createWriteStream(fileName);
							request.payload.pipe(writer);

							request.payload.on('end', () => fullfill());
							writer.on('error', error => reject(error));
						});
					};
					return Promise.resolve();
				}
			};

			return this;
		}
	}));


text:
<!doctype html>

    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <base href="/">
    <title></title><meta name="description" content="">
    <meta name="viewport" content="width=device-width">

      <link rel="stylesheet" href="app/app.css">

      <link rel="stylesheet" href="app/about/about.css">
      <link rel="stylesheet" href="app/admin/admin.css">
      <link rel="stylesheet" href="app/app.css">
      <link rel="stylesheet" href="app/classprogress/classprogress.css">
      <link rel="stylesheet" href="app/dashboard/dashboard.css">
      <link rel="stylesheet" href="app/main/main.css">
      <link rel="stylesheet" href="app/modifications/modifications.css">
      <link rel="stylesheet" href="app/profile/profile.css">
      <link rel="stylesheet" href="app/s/s.css">
      <link rel="stylesheet" href="components/footer/footer.css">
      <link rel="stylesheet" href="components/oauth-buttons/oauth-buttons.css">

    <link rel="import" href="bower_components/polymer/polymer.html">
    <link rel="import" href="bower_components/iron-icons/iron-icons.html">

    <link rel="import" href="elements/elements.html">

      <paper-header-panel class="flex" main mode="waterfall">

        <paper-toolbar ng-controller="NavbarCtrl" style="background:#FF3B30">

            <paper-tabs>
              <paper-tab ui-sref="main" ng-show="loggedIn">Home</paper-tab>
              <paper-tab ui-sref="landing" ng-show="!loggedIn">Home</paper-tab>
              <paper-tab ui-sref="profile" ng-show="loggedIn">Profile</paper-tab>
              <paper-tab ui-sref="dashboard" ng-show="isTeacher">Dashboard</paper-tab>
              <paper-tab ui-sref="about">About</paper-tab>
              <paper-tab ui-sref="login" ng-show="!loggedIn">Sign In</paper-tab>
              <paper-tab ui-sref="logout" ng-show="loggedIn">Sign Out</paper-tab>
            </paper-tabs>

        </paper-toolbar>

    <ui-view class="fit"></ui-view>

     </paper-header-panel>


text: {{ mirrored_content.data|safe }}


text:
package ua.com.fielden.platform.entity.meta.test_entities;

import ua.com.fielden.platform.entity.AbstractEntity;
import ua.com.fielden.platform.entity.annotation.Dependent;
import ua.com.fielden.platform.entity.annotation.IsProperty;
import ua.com.fielden.platform.entity.annotation.KeyType;
import ua.com.fielden.platform.entity.annotation.Observable;
import ua.com.fielden.platform.entity.annotation.Required;
import ua.com.fielden.platform.entity.annotation.mutator.AfterChange;
import ua.com.fielden.platform.entity.annotation.mutator.BeforeChange;
import ua.com.fielden.platform.entity.annotation.mutator.Handler;
import ua.com.fielden.platform.entity.meta.test_entities.definers.EntityWithCircularDependentPropertiesAndDefiners_PropTwoAndThree_Definer;
import ua.com.fielden.platform.entity.meta.test_entities.definers.EntityWithCircularDependentPropertiesAndDefiners_PropOne_Definer;
import ua.com.fielden.platform.entity.meta.test_entities.validators.EntityWithCircularDependentPropertiesAndDefiners_PropTree_Validator;

@KeyType(String.class)
public class EntityWithCircularDependentPropertiesAndDefiners extends AbstractEntity<String> {

    @IsProperty
    @Required
    @Dependent({"two", "three"})
    @AfterChange(EntityWithCircularDependentPropertiesAndDefiners_PropOne_Definer.class)
    private String one;

    @IsProperty
    @Dependent({ "three" })
    @AfterChange(EntityWithCircularDependentPropertiesAndDefiners_PropTwoAndThree_Definer.class)
    private String two;

    @IsProperty
    @Dependent({ "two" })
    @BeforeChange(@Handler(EntityWithCircularDependentPropertiesAndDefiners_PropTree_Validator.class))
    @AfterChange(EntityWithCircularDependentPropertiesAndDefiners_PropTwoAndThree_Definer.class)
    private String three;

    public String getOne() {
        return one;
    }

    @Observable
    public void setOne(final String one) {
        this.one = one;
    }

    public String getTwo() {
        return two;
    }

    @Observable
    public void setTwo(final String two) {
        this.two = two;
    }

    public String getThree() {
        return three;
    }

    @Observable
    public void setThree(final String three) {
        this.three = three;
    }

}


text:
/* ###################################################################
**     This component module is generated by Processor Expert. Do not modify it.
**     Filename    : DataUart.h
**     Project     : Luchador Serial Fimware KL27
**     Processor   : MKL27Z256VLH4
**     Component   : fsl_lpuart
**     Version     : Component 1.3.0, Driver 01.00, CPU db: 3.00.000
**     Repository  : KSDK 1.3.0
**     Compiler    : GNU C Compiler
**     Date/Time   : 2018-12-08, 16:34, # CodeGen: 37
**     Contents    :
**         LPUART_DRV_DmaInit                - lpuart_status_t LPUART_DRV_DmaInit(uint32_t instance,lpuart_dma_state_t *...
**         LPUART_DRV_DmaDeinit              - lpuart_status_t LPUART_DRV_DmaDeinit(uint32_t instance);
**         LPUART_DRV_DmaSendDataBlocking    - lpuart_status_t LPUART_DRV_DmaSendDataBlocking(uint32_t instance,const...
**         LPUART_DRV_DmaSendData            - lpuart_status_t LPUART_DRV_DmaSendData(uint32_t instance,const uint8_t *...
**         LPUART_DRV_DmaGetTransmitStatus   - lpuart_status_t LPUART_DRV_DmaGetTransmitStatus(uint32_t instance,uint32_t *...
**         LPUART_DRV_DmaAbortSendingData    - lpuart_status_t LPUART_DRV_DmaAbortSendingData(uint32_t instance);
**         LPUART_DRV_DmaReceiveDataBlocking - lpuart_status_t LPUART_DRV_DmaReceiveDataBlocking(uint32_t instance,uint8_t *...
**         LPUART_DRV_DmaReceiveData         - lpuart_status_t LPUART_DRV_DmaReceiveData(uint32_t instance,uint8_t *...
**         LPUART_DRV_DmaGetReceiveStatus    - lpuart_status_t LPUART_DRV_DmaGetReceiveStatus(uint32_t instance,uint32_t *...
**         LPUART_DRV_DmaAbortReceivingData  - lpuart_status_t LPUART_DRV_DmaAbortReceivingData(uint32_t instance);
**
**     Copyright : 1997 - 2015 Freescale Semiconductor, Inc.
**     All Rights Reserved.
**
**     Redistribution and use in source and binary forms, with or without modification,
**     are permitted provided that the following conditions are met:
**
**     o Redistributions of source code must retain the above copyright notice, this list
**       of conditions and the following disclaimer.
**
**     o Redistributions in binary form must reproduce the above copyright notice, this
**       list of conditions and the following disclaimer in the documentation and/or
**       other materials provided with the distribution.
**
**     o Neither the name of Freescale Semiconductor, Inc. nor the names of its
**       contributors may be used to endorse or promote products derived from this
**       software without specific prior written permission.
**
**     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
**     ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
**     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
**     DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
**     ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
**     (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
**     LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
**     ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
**     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
**     SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
**     http: www.freescale.com
**     mail: support@freescale.com
** ###################################################################*/
/*!
** @file DataUart.h
** @version 01.00
*/
/*!
**  @addtogroup DataUart_module DataUart module documentation
**  @{
*/
#ifndef __DataUart_H
#define __DataUart_H
/* MODULE DataUart. */
/* Include inherited beans */
#include "osa1.h"
#include "clockMan1.h"
#include "dmaController1.h"
#include "Cpu.h"
#include "fsl_lpuart_dma_driver.h"
/*! @brief Device instance number */
#define DataUart_IDX LPUART0_IDX
/*! @brief Device instance number for backward compatibility */
#define FSL_DATAUART DataUart_IDX

/*! Driver state structure with DMA */
extern lpuart_dma_state_t DataUart_State;

/*! @brief Configuration declaration */
extern const lpuart_dma_user_config_t DataUart_InitConfig0;

#endif
/* ifndef __DataUart_H */
/*!
** @}
*/
/*
** ###################################################################
**
**     This file was created by Processor Expert 10.5 [05.21]
**     for the Freescale Kinetis series of microcontrollers.
**
** ###################################################################
*/


text:
<!doctype html>

    <title>INTO THE OKAVANGO</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" href="static/css/index.css">
    <link rel="stylesheet" type="text/css" href="https://cloud.typography.com/6479954/6270552/css/fonts.css" />

INTO THE OKAVANGO


text:
<?php

namespace Google\Service\RecommendationsAI;

class GoogleCloudRecommendationengineV1beta1ImportCatalogItemsResponse extends \Google\Collection
{
  protected $collection_key = 'errorSamples';
  protected $errorSamplesType = GoogleRpcStatus::class;
  protected $errorSamplesDataType = 'array';
  protected $errorsConfigType = GoogleCloudRecommendationengineV1beta1ImportErrorsConfig::class;
  protected $errorsConfigDataType = '';

  /**
   * @param GoogleRpcStatus[]
   */
  public function setErrorSamples($errorSamples)
  {
    $this->errorSamples = $errorSamples;
  }
  /**
   * @return GoogleRpcStatus[]
   */
  public function getErrorSamples()
  {
    return $this->errorSamples;
  }
  /**
   * @param GoogleCloudRecommendationengineV1beta1ImportErrorsConfig
   */
  public function setErrorsConfig(GoogleCloudRecommendationengineV1beta1ImportErrorsConfig $errorsConfig)
  {
    $this->errorsConfig = $errorsConfig;
  }
  /**
   * @return GoogleCloudRecommendationengineV1beta1ImportErrorsConfig
   */
  public function getErrorsConfig()
  {
    return $this->errorsConfig;
  }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudRecommendationengineV1beta1ImportCatalogItemsResponse::class, 'Google_Service_RecommendationsAI_GoogleCloudRecommendationengineV1beta1ImportCatalogItemsResponse');


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

namespace NNR.Web.Models
{
    public class ComboBase
    {
        public int Id { get; set; }
        public string DisplayValue { get; set; }

    }
}


text:
using System;
using System.Security.Cryptography;
using NUnit.Framework;
using TestUtilities.Serialization;
using Utilities;

namespace TestUtilities.Cryptography {
	[TestFixture]
	public class TestCryptography {
		ICryptoTransform m_Encryptor;
		ICryptoTransform m_Decryptor;

		[SetUp]
		public void SetUp() {
			using ( AesCryptoServiceProvider aesAlg = new AesCryptoServiceProvider() ) {
				m_Encryptor = aesAlg.CreateEncryptor();
				m_Decryptor = aesAlg.CreateDecryptor();
			}
		}

		[Test]
		public void EncryptDecrypt() {
			const string orignal = "Hello World";
			byte[] encrypted = orignal.Encrypt( m_Encryptor );
			Assert.NotNull( encrypted );
			Assert.IsNotEmpty( encrypted );

			string decrypted = encrypted.Decrypt( m_Decryptor );

			Assert.AreEqual( orignal, decrypted );

		}

		[Test]
		public void TestObjectEncryptDecrypt() {
			TestBinarySerializer.TestBinarySerializerClassB orignal = new TestBinarySerializer.TestBinarySerializerClassB() { MyInt = 4, MyString = "Hello World", MyDouble = 4.2 };
			byte[] encrypted = orignal.Encrypt( m_Encryptor );
			Assert.NotNull( encrypted );
			Assert.IsNotEmpty( encrypted );

			TestBinarySerializer.TestBinarySerializerClassB decrypted = encrypted.Decrypt< TestBinarySerializer.TestBinarySerializerClassB>( m_Decryptor );

			Assert.AreEqual( orignal, decrypted );
		}
	}
}


text:
using System;
using System.Collections;
using System.IO;
using Raksha.Asn1;
using Raksha.Asn1.Cms;
using Raksha.Asn1.X509;
using Raksha.Utilities;

namespace Raksha.Cms
{
	/**
	* Parsing class for an CMS Authenticated Data object from an input stream.
	*

	* Note: that because we are in a streaming mode only one recipient can be tried and it is important
	* that the methods on the parser are called in the appropriate order.
	*

	*

	* Example of use - assuming the first recipient matches the private key we have.
	*

	*      CMSAuthenticatedDataParser     ad = new CMSAuthenticatedDataParser(inputStream);
	*
	*      RecipientInformationStore  recipients = ad.getRecipientInfos();
	*
	*      Collection  c = recipients.getRecipients();
	*      Iterator    it = c.iterator();
	*
	*      if (it.hasNext())
	*      {
	*          RecipientInformation   recipient = (RecipientInformation)it.next();
	*
	*          CMSTypedStream recData = recipient.getContentStream(privateKey, "BC");
	*
	*          processDataStream(recData.getContentStream());
	*
	*          if (!Arrays.equals(ad.getMac(), recipient.getMac())
	*          {
	*              System.err.println("Data corrupted!!!!");
	*          }
	*      }
	*

	*  Note: this class does not introduce buffering - if you are processing large files you should create
	*  the parser with:
	*

	*          CMSAuthenticatedDataParser     ep = new CMSAuthenticatedDataParser(new BufferedInputStream(inputStream, bufSize));
	*

	*  where bufSize is a suitably large buffer size.
	*

	*/
	public class CmsAuthenticatedDataParser
		: CmsContentInfoParser
	{
		internal RecipientInformationStore	_recipientInfoStore;
		internal AuthenticatedDataParser	authData;

		private AlgorithmIdentifier			macAlg;
		private byte[]						mac;
		private Asn1.Cms.AttributeTable		authAttrs;
		private Asn1.Cms.AttributeTable		unauthAttrs;

		private bool authAttrNotRead;
		private bool unauthAttrNotRead;

		public CmsAuthenticatedDataParser(
			byte[] envelopedData)
			: this(new MemoryStream(envelopedData, false))
		{
		}

		public CmsAuthenticatedDataParser(
			Stream envelopedData)
			: base(envelopedData)
		{
			this.authAttrNotRead = true;
			this.authData = new AuthenticatedDataParser(
				(Asn1SequenceParser)contentInfo.GetContent(Asn1Tags.Sequence));

			// TODO Validate version?
			//DerInteger version = this.authData.getVersion();

			//
			// read the recipients
			//
			Asn1Set recipientInfos = Asn1Set.GetInstance(authData.GetRecipientInfos().ToAsn1Object());

			this.macAlg = authData.GetMacAlgorithm();

			//
			// read the authenticated content info
			//
			ContentInfoParser data = authData.GetEnapsulatedContentInfo();
			ICmsReadable readable = new CmsProcessableInputStream(
				((Asn1OctetStringParser)data.GetContent(Asn1Tags.OctetString)).GetOctetStream());
			CmsSecureReadable secureReadable = new CmsEnvelopedHelper.CmsAuthenticatedSecureReadable(
				this.macAlg, readable);

			//
			// build the RecipientInformationStore
			//
			this._recipientInfoStore = CmsEnvelopedHelper.BuildRecipientInformationStore(
				recipientInfos, secureReadable);
		}

		public AlgorithmIdentifier MacAlgorithmID
		{
			get { return macAlg; }
		}

		/**
		* return the object identifier for the mac algorithm.
		*/
		public string MacAlgOid
		{
			get { return macAlg.ObjectID.Id; }
		}

		/**
		 * return the ASN.1 encoded encryption algorithm parameters, or null if
		 * there aren't any.
		 */
		public Asn1Object MacAlgParams
		{
			get
			{
				Asn1Encodable ae = macAlg.Parameters;

				return ae == null ? null : ae.ToAsn1Object();
			}
		}

		/**
		* return a store of the intended recipients for this message
		*/
		public RecipientInformationStore GetRecipientInfos()
		{
			return _recipientInfoStore;
		}

		public byte[] GetMac()
		{
			if (mac == null)
			{
				GetAuthAttrs();
				mac = authData.GetMac().GetOctets();
			}
			return Arrays.Clone(mac);
		}

		/**
		* return a table of the unauthenticated attributes indexed by
		* the OID of the attribute.
		* @exception java.io.IOException
		*/
		public Asn1.Cms.AttributeTable GetAuthAttrs()
		{
			if (authAttrs == null && authAttrNotRead)
			{
				Asn1SetParser s = authData.GetAuthAttrs();

				authAttrNotRead = false;

				if (s != null)
				{
					Asn1EncodableVector v = new Asn1EncodableVector();

					IAsn1Convertible o;
					while ((o = s.ReadObject()) != null)
					{
						Asn1SequenceParser seq = (Asn1SequenceParser)o;

						v.Add(seq.ToAsn1Object());
					}

					authAttrs = new Asn1.Cms.AttributeTable(new DerSet(v));
				}
			}

			return authAttrs;
		}

		/**
		* return a table of the unauthenticated attributes indexed by
		* the OID of the attribute.
		* @exception java.io.IOException
		*/
		public Asn1.Cms.AttributeTable GetUnauthAttrs()
		{
			if (unauthAttrs == null && unauthAttrNotRead)
			{
				Asn1SetParser s = authData.GetUnauthAttrs();

				unauthAttrNotRead = false;

				if (s != null)
				{
					Asn1EncodableVector v = new Asn1EncodableVector();

					IAsn1Convertible o;
					while ((o = s.ReadObject()) != null)
					{
						Asn1SequenceParser seq = (Asn1SequenceParser)o;

						v.Add(seq.ToAsn1Object());
					}

					unauthAttrs = new Asn1.Cms.AttributeTable(new DerSet(v));
				}
			}

			return unauthAttrs;
		}
	}
}


text:
from django.db import models
from django.contrib.auth.models import User

class Love(models.Model):
    id = models.AutoField(
        '#',
        primary_key=True
    )

    user = models.ForeignKey(
        User,
        verbose_name=u'User',
        related_name="love_user"
    )

    time = models.DateTimeField(
        u'When',
        auto_now_add=True
    )

    track_id = models.CharField(
        u"Track ID",
        max_length=20
    )

    track_position = models.PositiveIntegerField(
        u"Position in the playlist",
        default=0,
    )

    def for_json(self):
        return "%s" % self.track_id

    class Meta:
        get_latest_by = 'time'
        ordering = ('-id',)
        verbose_name = u"Favorite"
        verbose_name_plural = u"Favorites"

    def __unicode__(self):
        return u"%s Loves %s" % (self.user, self.track_id)

    def save_without_recount(self, *args, **kwargs):
        super(Love, self).save(*args, **kwargs)

    def save(self, *args, **kwargs):
        self.track_position = Love.objects.filter(user=self.user).count()
        super(Love, self).save(*args, **kwargs)


text:
namespace Microsoft.Azure.Management.EventHub.Models
{
    using Azure;
    using Management;
    using EventHub;
    using Rest;
    using Rest.Serialization;
    using Newtonsoft.Json;
    using System.Linq;

    /// <summary>
    /// Single item in List or Get Consumer group operation
    /// </summary>
    [JsonTransformation]
    public partial class ConsumerGroupResource : Resource
    {
        /// <summary>
        /// Initializes a new instance of the ConsumerGroupResource class.
        /// </summary>
        public ConsumerGroupResource() { }

        /// <summary>
        /// Initializes a new instance of the ConsumerGroupResource class.
        /// </summary>
        /// <param name="id">Resource Id</param>
        /// <param name="name">Resource name</param>
        /// <param name="type">Resource type</param>
        /// <param name="createdAt">Exact time the message was created.</param>
        /// <param name="eventHubPath">The path of the Event Hub.</param>
        /// <param name="updatedAt">The exact time the message was
        /// updated.</param>
        /// <param name="userMetadata">The user metadata.</param>
        public ConsumerGroupResource(string id = default(string), string name = default(string), string type = default(string), System.DateTime? createdAt = default(System.DateTime?), string eventHubPath = default(string), System.DateTime? updatedAt = default(System.DateTime?), string userMetadata = default(string))
            : base(id, name, type)
        {
            CreatedAt = createdAt;
            EventHubPath = eventHubPath;
            UpdatedAt = updatedAt;
            UserMetadata = userMetadata;
        }

        /// <summary>
        /// Gets exact time the message was created.
        /// </summary>
        [JsonProperty(PropertyName = "properties.createdAt")]
        public System.DateTime? CreatedAt { get; protected set; }

        /// <summary>
        /// Gets the path of the Event Hub.
        /// </summary>
        [JsonProperty(PropertyName = "properties.eventHubPath")]
        public string EventHubPath { get; protected set; }

        /// <summary>
        /// Gets the exact time the message was updated.
        /// </summary>
        [JsonProperty(PropertyName = "properties.updatedAt")]
        public System.DateTime? UpdatedAt { get; protected set; }

        /// <summary>
        /// Gets or sets the user metadata.
        /// </summary>
        [JsonProperty(PropertyName = "properties.userMetadata")]
        public string UserMetadata { get; set; }

    }
}


text:
<?php
/**
 * @var yii\web\View $this
 * @var common\models\User $user
 */

use yii\helpers\Url;
use backend\components\helpers\UserHelper;
use common\models\User;
use backend\widgets\UserNameAndPhotoBlockWidget;

$this->title = 'Просмотр данных пользователя - ' . $user->getFullName();
$this->params['page_name'] = $this->title;
$this->params['breadcrumbs'] = [
    [
        'label' => 'Пользователи',
        'url' => Url::to('/users'),
    ],
    [
        'label' => $this->title,
    ]
];
?>

            <?php echo UserNameAndPhotoBlockWidget::widget([
                'user' => $user,
                'photoWidth' => UserNameAndPhotoBlockWidget::PHOTO_WIDTH_150,
                'showName' => false,
            ]);?>

<?= $user->getFullName();?>

Тип пользователя: <?= UserHelper::getAllRoles()[$user->getRole()];?>

E-mail: <?= $user->getEmail();?>

                <?php
                if (User::STATUS_DISABLED == $user->getStatus()) {
                    $statusLabelClass = 'default';
                } elseif (User::STATUS_DELETED == $user->getStatus()) {
                    $statusLabelClass = 'danger';
                } else {
                    $statusLabelClass = 'primary';
                }
                ?>
                Статус: <span class="label label-<?= $statusLabelClass;?>">
                    <?= UserHelper::getStatuses()[$user->getStatus()];?>

Дата регистрации: 12 ноября 2014

            <?php if (Yii::$app->user->can('userAccess', ['userId' => $user->getId(), 'action' => 'edit'])):?>
                <a href="<?= Url::to(['/user/edit/', 'id' => $user->getId()]);?>" class="btn btn-w-m btn-success user-view-edit">Редактировать
            <?php endif;?>


text:
package org.jabref.logic.importer.fileformat;

import java.io.IOException;
import java.net.URISyntaxException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Path;

import org.jabref.logic.util.StandardFileType;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;

public class RISImporterTest {

    private RisImporter importer;

    @BeforeEach
    public void setUp() {
        importer = new RisImporter();
    }

    @Test
    public void testGetFormatName() {
        assertEquals("RIS", importer.getName());
    }

    @Test
    public void testGetCLIId() {
        assertEquals("ris", importer.getId());
    }

    @Test
    public void testsGetExtensions() {
        assertEquals(StandardFileType.RIS, importer.getFileType());
    }

    @Test
    public void testGetDescription() {
        assertEquals("Imports a Biblioscape Tag File.", importer.getDescription());
    }

    @Test
    public void testIfNotRecognizedFormat() throws IOException, URISyntaxException {
        Path file = Path.of(RISImporterTest.class.getResource("RisImporterCorrupted.ris").toURI());
        assertFalse(importer.isRecognizedFormat(file, StandardCharsets.UTF_8));
    }
}


text:
<?php
namespace Chamilo\Application\Weblcms\Tool\Implementation\Note\Component;

use Chamilo\Application\Weblcms\Tool\Implementation\Note\Manager;

/**
 * $Id: note_publisher.class.php 216 2009-11-13 14:08:06Z kariboe $
 *
 * @package application.lib.weblcms.tool.note.component
 */
class PublisherComponent extends Manager
{

    public function get_additional_parameters()
    {
        return array(
            \Chamilo\Core\Repository\Viewer\Manager::PARAM_ID,
            \Chamilo\Core\Repository\Viewer\Manager::PARAM_ACTION,
            \Chamilo\Core\Repository\Viewer\Manager::PARAM_IN_WORKSPACES,
            \Chamilo\Core\Repository\Viewer\Manager::PARAM_WORKSPACE_ID);
    }
}


text:
// This file is automatically generated.

package adila.db;

/*
 * Bush Spira B2 7 tablet
 *
 * DEVICE: ac70ox
 * MODEL: Bush Spira B2 7 tablet
 */
final class ac70ox_bush20spira20b220720tablet {
    public static final String DATA = "Bush|Spira B2 7 tablet|";
}


text:
from codec import *
from connection_factory import *
from router import *
from service import *


text:
function playground(opts) {
	var simple = opts['simple'];
	var code = $(opts['codeEl']);
	var editor;

	// autoindent helpers for simple mode.
	function insertTabs(n) {
		// find the selection start and end
		var start = code[0].selectionStart;
		var end   = code[0].selectionEnd;
		// split the textarea content into two, and insert n tabs
		var v = code[0].value;
		var u = v.substr(0, start);
		for (var i=0; i<n; i++) {
			u += "\t";
		}
		u += v.substr(end);
		// set revised content
		code[0].value = u;
		// reset caret position after inserted tabs
		code[0].selectionStart = start+n;
		code[0].selectionEnd = start+n;
	}
	function autoindent(el) {
		var curpos = el.selectionStart;
		var tabs = 0;
		while (curpos > 0) {
			curpos--;
			if (el.value[curpos] == "\t") {
				tabs++;
			} else if (tabs > 0 || el.value[curpos] == "\n") {
				break;
			}
		}
		setTimeout(function() {
			insertTabs(tabs, 1);
		}, 1);
	}

	function keyHandler(e) {
		if (simple && e.keyCode == 9) { // tab
			insertTabs(1);
			e.preventDefault();
			return false;
		}
		if (e.keyCode == 13) { // enter
			if (e.shiftKey) { // +shift
				run();
				e.preventDefault();
				return false;
			} else if (simple) {
				autoindent(e.target);
			}
		}
		return true;
	}
	if (simple) {
		code.unbind('keydown').bind('keydown', keyHandler);
	} else {
		editor = CodeMirror.fromTextArea(
			code[0],
			{
				lineNumbers: true,
				indentUnit: 8,
				indentWithTabs: true,
				onKeyEvent: function(editor, e) { keyHandler(e); }
			}
		);
	}
	var output = $(opts['outputEl']);

	function clearErrors() {
		if (!editor) {
			return;
		}
		var lines = editor.lineCount();
		for (var i = 0; i < lines; i++) {
			editor.setLineClass(i, null);
		}
	}
	function highlightErrors(text) {
		if (!editor) {
			return;
		}
		var errorRe = /[a-z]+\.go:([0-9]+):/g;
		var result;
		while ((result = errorRe.exec(text)) != null) {
			var line = result[1]*1-1;
			editor.setLineClass(line, "errLine")
		}
	}
	function body() {
		if (editor) {
			return editor.getValue();
		}
		return $(opts['codeEl']).val();
	}
	function setBody(text) {
		if (editor) {
			editor.setValue(text);
			return;
		}
		$(opts['codeEl']).val(text);
	}
	function origin(href) {
		return (""+href).split("/").slice(0, 3).join("/");
	}
	function loading() {
		output.removeClass("error").html(
			'
Waiting for remote server...
'
		);
	}
	function setOutput(text, error) {
		output.empty();
		if (error) {
			output.addClass("error");
		}
		$("
").text(text).appendTo(output);
	}

	var seq = 0;
	function run() {
		clearErrors();
		loading();
		seq++;
		var cur = seq;
		var data = {"body": body()};
		if (opts['preCompile']) {
			opts['preCompile'](data);
		}
		$.ajax("/gocompile", {
			data: data,
			type: "POST",
			dataType: "json",
			success: function(data) {
				if (seq != cur) {
					return;
				}
				if (opts['postCompile']) {
					opts['postCompile'](data);
				}
				if (!data) {
					return;
				}
				if (data.compile_errors != "") {
					setOutput(data.compile_errors, true);
					highlightErrors(data.compile_errors);
					return;
				}
				var out = ""+data.output;
				if (out.indexOf("IMAGE:") == 0) {
					var img = $("");
					var url = "data:image/png;base64,";
					url += out.substr(6)
					img.attr("src", url);
					output.empty().append(img);
					return;
				}
				setOutput(out, false);
			},
			error: function() {
				output.addClass("error").text(
					"Error communicating with remote server."
				);
			}
		});
	}
	$(opts['runEl']).click(run);

	$(opts['fmtEl']).click(function() {
		loading();
		$.ajax("/goformat", {
			data: {"body": body()},
			type: "POST",
			dataType: "json",
			success: function(data) {
				if (data.Error) {
					setOutput(data.Error, true);
					highlightErrors(data.Error);
					return;
				}
				setBody(data.Body);
				setOutput("", false);
			}
		});
	});

	$(opts['toysEl']).bind('change', function() {
		var toy = $(this).val();
		loading();
		$.ajax("/doc/play/"+toy, {
			processData: false,
			type: "GET",
			complete: function(xhr) {
				if (xhr.status != 200) {
					setOutput("Server error; try again.", true);
					return;
				}
				setBody(xhr.responseText);
				setOutput("", false);
			}
		});
	});

	if (opts['shareEl'] != null && (opts['shareURLEl'] != null || opts['shareRedirect'] != null)) {
		var shareURL;
		if (opts['shareURLEl']) {
			shareURL = $(opts['shareURLEl']).hide();
		}
		var sharing = false;
		$(opts['shareEl']).click(function() {
			if (sharing) return;
			sharing = true;
			$.ajax("/share", {
				processData: false,
				data: body(),
				type: "POST",
				complete: function(xhr) {
					sharing = false;
					if (xhr.status != 200) {
						alert("Server error; try again.");
						return;
					}
					if (opts['shareRedirect']) {
						window.location = opts['shareRedirect'] + xhr.responseText;
					}
					if (shareURL) {
						var url = origin(window.location) + "/p/" + xhr.responseText;
						shareURL.show().val(url).focus().select();
					}
				}
			});
		});
	}

	return editor;
}


text:
package logstash

import (
	"sync"
	"testing"
	"time"

	"github.com/elastic/beats/libbeat/common"
	"github.com/elastic/beats/libbeat/common/streambuf"
	"github.com/elastic/beats/libbeat/outputs/mode"
	"github.com/elastic/beats/libbeat/outputs/transport"
	"github.com/elastic/beats/libbeat/outputs/transport/transptest"
)

type testSyncDriver struct {
	client  mode.ProtocolClient
	ch      chan testDriverCommand
	returns []testClientReturn
	wg      sync.WaitGroup
}

type clientServer struct {
	*transptest.MockServer
}

func TestClientSendZero(t *testing.T) {
	testSendZero(t, makeTestClient)
}

func TestClientSimpleEvent(t *testing.T) {
	testSimpleEvent(t, makeTestClient)
}

func TestClientStructuredEvent(t *testing.T) {
	testStructuredEvent(t, makeTestClient)
}

func TestClientCloseAfterWindowSize(t *testing.T) {
	testCloseAfterWindowSize(t, makeTestClient)
}

func TestClientMultiFailMaxTimeouts(t *testing.T) {
	testMultiFailMaxTimeouts(t, makeTestClient)
}

func newClientServerTCP(t *testing.T, to time.Duration) *clientServer {
	return &clientServer{transptest.NewMockServerTCP(t, to, "", nil)}
}

func (s *clientServer) connectPair(compressLevel int) (*mockConn, *client, error) {
	client, transp, err := s.MockServer.ConnectPair()
	if err != nil {
		return nil, nil, err
	}

	lc, err := newLumberjackClient(transp, compressLevel,
		defaultConfig.BulkMaxSize, 100 * time.Millisecond,
		"test")
	if err != nil {
		return nil, nil, err
	}

	conn := &mockConn{client, streambuf.New(nil)}
	return conn, lc, nil
}

func makeTestClient(conn *transport.Client) testClientDriver {
	return newClientTestDriver(newLumberjackTestClient(conn))
}

func newClientTestDriver(client mode.ProtocolClient) *testSyncDriver {
	driver := &testSyncDriver{
		client:  client,
		ch:      make(chan testDriverCommand),
		returns: nil,
	}

	driver.wg.Add(1)
	go func() {
		defer driver.wg.Done()

		for {
			cmd, ok := <-driver.ch
			if !ok {
				return
			}

			switch cmd.code {
			case driverCmdQuit:
				return
			case driverCmdPublish:
				events, err := driver.client.PublishEvents(cmd.events)
				n := len(cmd.events) - len(events)
				driver.returns = append(driver.returns, testClientReturn{n, err})
			}
		}
	}()

	return driver
}

func (t *testSyncDriver) Stop() {
	if t.ch != nil {
		t.ch <- testDriverCommand{code: driverCmdQuit}
		t.wg.Wait()
		close(t.ch)
		t.client.Close()
		t.ch = nil
	}
}

func (t *testSyncDriver) Publish(events []common.MapStr) {
	t.ch <- testDriverCommand{code: driverCmdPublish, events: events}
}

func (t *testSyncDriver) Returns() []testClientReturn {
	return t.returns
}


text:
.x-tree-checkbox {
	background:url('../../resources/images/default/form/checkbox.gif') no-repeat 0 0;
	height:13px;
	width:13px;
	margin:0 1px;
	vertical-align:middle;
}
.x-tree-checkbox-over .x-tree-checkbox {
	background-position:-13px 0;
}
.x-tree-checkbox-down .x-tree-checkbox {
	background-position:-26px 0;
}
.x-tree-node-disabled .x-tree-checkbox {
	background-position:-39px 0;
}
.x-tree-node-checked {
	background-position:0 -13px;
}
.x-tree-checkbox-over .x-tree-node-checked {
	background-position:-13px -13px;
}
.x-tree-checkbox-down .x-tree-node-checked {
	background-position:-26px -13px;
}
.x-tree-node-disabled .x-tree-node-checked {
	background-position:-39px -13px;
}
.x-tree-node-grayed {
	background-position:0 -26px;
}
.x-tree-checkbox-over .x-tree-node-grayed {
	background-position:-13px -26px;
}
.x-tree-checkbox-down .x-tree-node-grayed {
	background-position:-26px -26px;
}
.x-tree-node-disabled .x-tree-node-grayed {
	background-position:-39px -26px;
}

/* eof */


text:
"""Records the time it takes to suspend and resume a cluster of vms."""

import time
from typing import List

from perfkitbenchmarker import benchmark_spec
from perfkitbenchmarker import configs
from perfkitbenchmarker import sample
from perfkitbenchmarker import virtual_machine
from perfkitbenchmarker import vm_util

BENCHMARK_NAME = 'suspend_resume'
BENCHMARK_CONFIG = """
suspend_resume:
  description: >
      Create a cluster, record all times to suspend and resume.
      Specify the cluster size with --num_vms.
  vm_groups:
    default:
      vm_spec:
        AWS:
          machine_type: m5.large
          zone: us-east-1
        Azure:
          machine_type: Standard_D2s_v3
          zone: eastus
          boot_disk_type: StandardSSD_LRS
        GCP:
          machine_type: n1-standard-2
          zone: us-central1-a
          boot_disk_type: pd-ssd
        IBMCloud:
          machine_type: cx2-2x4
          zone: us-south-1
        Kubernetes:
          image: null
        OpenStack:
          machine_type: t1.small
          zone: nova
      vm_count: null
  flags:
    # We don't want boot time samples to be affected from retrying, so don't
    # retry cluster_boot when rate limited.
    retry_on_rate_limited: False
    aws_vm_hibernate: True
    # AWS boot disk size must be specified for an encrypted disk mapping to be
    # created.
    aws_boot_disk_size: 150
"""

def GetConfig(user_config):
  return configs.LoadConfig(BENCHMARK_CONFIG, user_config, BENCHMARK_NAME)

def Prepare(unused_benchmark_spec):
  pass

def _GetVmOperationDataSamples(
    operation_times: List[int], cluster_time: int, operation: str,
    vms: List[virtual_machine.BaseVirtualMachine]) -> List[sample.Sample]:
  """Append samples from given data.

  Args:
    operation_times: The list of times for each vms.
    cluster_time: The cluster time for the benchmark.
    operation: The benchmark operation being run, capitalized with no spaces.
    vms: list of virtual machines.

  Returns:
    List of samples constructed from data.
  """
  samples = []
  metadata_list = []
  for i, vm in enumerate(vms):
    metadata = {
        'machine_instance': i,
        'num_vms': len(vms),
        'os_type': vm.OS_TYPE
    }
    metadata_list.append(metadata)

  for operation_time, metadata in zip(operation_times, metadata_list):
    samples.append(
        sample.Sample(f'{operation} Time', operation_time, 'seconds', metadata))
  os_types = set([vm.OS_TYPE for vm in vms])
  metadata = {'num_vms': len(vms), 'os_type': ','.join(sorted(os_types))}
  samples.append(
      sample.Sample(f'Cluster {operation} Time', cluster_time, 'seconds',
                    metadata))
  return samples

def GetTimeToSuspend(
    vms: List[virtual_machine.BaseVirtualMachine]) -> List[sample.Sample]:
  """Creates Samples for the suspend time of a list of vms.

  The suspend time is the duration form when the VM is suspended to when the VM
  is no longer responsive to SSH commands.

  Args:
    vms: A list of Virtual Machines(GCE) (already booted/running)

  Returns:
    List of samples containing the suspend times and cluster suspend time.
  """

  if not vms:
    return []

  before_suspend_timestamp = time.time()

  # call suspend function on the list of vms.
  suspend_durations = vm_util.RunThreaded(lambda vm: vm.Suspend(), vms)

  # get cluster_suspend_time(duration)
  cluster_suspend_time = time.time() - before_suspend_timestamp

  # get samples for the cluster of vms
  return _GetVmOperationDataSamples(suspend_durations, cluster_suspend_time,
                                    'Suspend', vms)

def GetTimeToResume(
    vms: List[virtual_machine.BaseVirtualMachine]) -> List[sample.Sample]:
  """Measures the time it takes to resume a cluster of vms that were suspended.

  Args:
    vms: List of BaseVirtualMachine subclasses.

  Returns:
    List of samples containing the resume times of the vms, the cluster
    resume time(duration) and the time stamps when the resume was completed.
  """

  if not vms:
    return []

  before_resume_timestamp = time.time()

  # call resume function on the list of vms to get the resume times
  resume_durations = vm_util.RunThreaded(lambda vm: vm.Resume(), vms)

  # get cluster resume time(duration)
  cluster_resume_time = time.time() - before_resume_timestamp

  # get samples for the cluster of vms
  return _GetVmOperationDataSamples(resume_durations, cluster_resume_time,
                                    'Resume', vms)

def Run(spec: benchmark_spec.BenchmarkSpec) -> List[sample.Sample]:
  """Measure the boot time for all VMs.

  Args:
    spec: The benchmark specification.

  Returns:
    An empty list (all boot samples will be added later).
  """
  samples = []
  samples.extend(GetTimeToSuspend(spec.vms))
  samples.extend(GetTimeToResume(spec.vms))
  return samples

def Cleanup(unused_benchmark_spec):
  pass


text:
<service>
    <id>${pkg.name}</id>
    <name>${project.name}</name>
    <description>${project.description}</description>
    <workingdirectory>%BASE%\conf</workingdirectory>
    <logpath>${pkg.winWrapperLogFolder}</logpath>
    <logmode>rotate</logmode>
    <env name="LOADER_PATH" value="%BASE%\conf" />
    <executable>java</executable>
    <startargument>-Dplatform=windows</startargument>
    <startargument>-jar</startargument>
    <startargument>%BASE%\lib\${pkg.name}.jar</startargument>
</service>


text:
mkdir -p /data/db/m040/repl/{1,2,3}

# Starts up the servers.
mongod -f /shared/rs1_linux.conf
mongod -f /shared/rs2_linux.conf
mongod -f /shared/rs3_linux.conf

# Initiates the replicaSet.
mongo --eval 'rs.initiate()'
mongo --eval 'rs.add("m040:27027");rs.add("m040:27037")'

# Gives some time to the replicaSet for configuration.
sleep 10

# Validates the lab.
mongo --quiet validate_lab1.js


text:
package com.intrigus.mavigen;

/** Defines the configuration for building a native shared library for a specific platform. Used with {@link AntScriptGenerator} to
 * create Ant build files that invoke the compiler toolchain to create the shared libraries. */
public class BuildTarget {
	/** The target operating system of a build target. */
	public enum TargetOs {
		Windows, Linux, MacOsX, Android, IOS
	}

	/** the target operating system **/
	public BuildTarget.TargetOs os;
	/** whether this is a 64-bit build, not used for Android **/
	public boolean is64Bit;
	/** the C files and directories to be included in the build, accepts Ant path format, must not be null **/
	public String[] cIncludes;
	/** the C files and directories to be excluded from the build, accepts Ant path format, must not be null **/
	public String[] cExcludes;
	/** the C++ files and directories to be included in the build, accepts Ant path format, must not be null **/
	public String[] cppIncludes;
	/** the C++ files and directories to be excluded from the build, accepts Ant path format, must not be null **/
	public String[] cppExcludes;
	/** the directories containing headers for the build, must not be null **/
	public String[] headerDirs;
	/** prefix for the compiler (g++, gcc), useful for cross compilation, must not be null **/
	public String compilerPrefix;
	/** the flags passed to the C compiler, must not be null **/
	public String cFlags;
	/** the flags passed to the C++ compiler, must not be null **/
	public String cppFlags;
	/** the flags passed to the linker, must not be null **/
	public String linkerFlags;
	/** the name of the generated build file for this target, defaults to "build-${target}(64)?.xml", must not be null **/
	public String buildFileName;
	/** whether to exclude this build target from the master build file, useful for debugging **/
	public boolean excludeFromMasterBuildFile = false;
	/** Ant XML executed in a target before compilation **/
	public String preCompileTask;
	/** Ant Xml executed in a target after compilation **/
	public String postCompileTask;
	/** the libraries to be linked to the output, specify via e.g. -ldinput -ldxguid etc. **/
	public String libraries;
	/** The name used for folders for this specific target. Defaults to "${target}(64)" **/
	public String osFileName;
	/** The name used for the library file. This is a full file name, including file extension. Default is platform specific.
	 *  E.g. "lib{sharedLibName}64.so" **/
	public String libName;

	/** Creates a new build target. See members of this class for a description of the parameters. */
	public BuildTarget (BuildTarget.TargetOs targetType, boolean is64Bit, String[] cIncludes, String[] cExcludes,
		String[] cppIncludes, String[] cppExcludes, String[] headerDirs, String compilerPrefix, String cFlags, String cppFlags,
		String linkerFlags) {
		if (targetType == null) throw new IllegalArgumentException("targetType must not be null");
		if (cIncludes == null) cIncludes = new String[0];
		if (cExcludes == null) cExcludes = new String[0];
		if (cppIncludes == null) cppIncludes = new String[0];
		if (cppExcludes == null) cppExcludes = new String[0];
		if (headerDirs == null) headerDirs = new String[0];
		if (compilerPrefix == null) compilerPrefix = "";
		if (cFlags == null) cFlags = "";
		if (cppFlags == null) cppFlags = "";
		if (linkerFlags == null) linkerFlags = "";

		this.os = targetType;
		this.is64Bit = is64Bit;
		this.cIncludes = cIncludes;
		this.cExcludes = cExcludes;
		this.cppIncludes = cppIncludes;
		this.cppExcludes = cppExcludes;
		this.headerDirs = headerDirs;
		this.compilerPrefix = compilerPrefix;
		this.cFlags = cFlags;
		this.cppFlags = cppFlags;
		this.linkerFlags = linkerFlags;
		this.libraries = "";
	}

	/** Creates a new default BuildTarget for the given OS, using common default values. */
	public static BuildTarget newDefaultTarget (BuildTarget.TargetOs type, boolean is64Bit) {
		if (type == TargetOs.Windows && !is64Bit) {
			// Windows 32-Bit
			return new BuildTarget(TargetOs.Windows, false, new String[] {"**/*.c"}, new String[0], new String[] {"**/*.cpp"},
				new String[0], new String[0], "i686-w64-mingw32-", "-c -Wall -O2 -mfpmath=sse -msse2 -fmessage-length=0 -m32",
				"-c -Wall -O2 -mfpmath=sse -msse2 -fmessage-length=0 -m32",
				"-Wl,--kill-at -shared -m32 -static -static-libgcc -static-libstdc++");
		}

		if (type == TargetOs.Windows && is64Bit) {
			// Windows 64-Bit
			return new BuildTarget(TargetOs.Windows, true, new String[] {"**/*.c"}, new String[0], new String[] {"**/*.cpp"},
				new String[0], new String[0], "x86_64-w64-mingw32-", "-c -Wall -O2 -mfpmath=sse -msse2 -fmessage-length=0 -m64",
				"-c -Wall -O2 -mfpmath=sse -msse2 -fmessage-length=0 -m64",
				"-Wl,--kill-at -shared -static -static-libgcc -static-libstdc++ -m64");
		}

		if (type == TargetOs.Linux && !is64Bit) {
			// Linux 32-Bit
			return new BuildTarget(TargetOs.Linux, false, new String[] {"**/*.c"}, new String[0], new String[] {"**/*.cpp"},
				new String[0], new String[0], "", "-c -Wall -O2 -mfpmath=sse -msse -fmessage-length=0 -m32 -fPIC",
				"-c -Wall -O2 -mfpmath=sse -msse -fmessage-length=0 -m32 -fPIC", "-shared -m32");
		}

		if (type == TargetOs.Linux && is64Bit) {
			// Linux 64-Bit
			return new BuildTarget(TargetOs.Linux, true, new String[] {"**/*.c"}, new String[0], new String[] {"**/*.cpp"},
				new String[0], new String[0], "", "-c -Wall -O2 -mfpmath=sse -msse -fmessage-length=0 -m64 -fPIC",
				"-c -Wall -O2 -mfpmath=sse -msse -fmessage-length=0 -m64 -fPIC", "-shared -m64 -Wl,-wrap,memcpy");
		}

		if (type == TargetOs.MacOsX && !is64Bit) {
			// Mac OS X x86 & x86_64
			BuildTarget mac = new BuildTarget(TargetOs.MacOsX, false, new String[] {"**/*.c"}, new String[0],
				new String[] {"**/*.cpp"}, new String[0], new String[0], "",
				"-c -Wall -O2 -arch i386 -DFIXED_POINT -fmessage-length=0 -fPIC -mmacosx-version-min=10.5",
				"-c -Wall -O2 -arch i386 -DFIXED_POINT -fmessage-length=0 -fPIC -mmacosx-version-min=10.5",
				"-shared -arch i386 -mmacosx-version-min=10.5");
			return mac;
		}

		if (type == TargetOs.MacOsX && is64Bit) {
			// Mac OS X x86 & x86_64
			BuildTarget mac = new BuildTarget(TargetOs.MacOsX, true, new String[] {"**/*.c"}, new String[0],
				new String[] {"**/*.cpp"}, new String[0], new String[0], "",
				"-c -Wall -O2 -arch x86_64 -DFIXED_POINT -fmessage-length=0 -fPIC -mmacosx-version-min=10.5",
				"-c -Wall -O2 -arch x86_64 -DFIXED_POINT -fmessage-length=0 -fPIC -mmacosx-version-min=10.5",
				"-shared -arch x86_64 -mmacosx-version-min=10.5");
			return mac;
		}

		if (type == TargetOs.Android) {
			BuildTarget android = new BuildTarget(TargetOs.Android, false, new String[] {"**/*.c"}, new String[0],
				new String[] {"**/*.cpp"}, new String[0], new String[0], "", "-O2 -Wall -D__ANDROID__", "-O2 -Wall -D__ANDROID__",
				"-lm");
			return android;
		}

		if(type == TargetOs.IOS) {
			// iOS, 386 simulator and armv7a, compiled to fat static lib
			BuildTarget ios = new BuildTarget(TargetOs.IOS, false, new String[] {"**/*.c"}, new String[0],
				new String[] {"**/*.cpp"}, new String[0], new String[0], "",
				"-c -Wall -O2",
				"-c -Wall -O2",
				"rcs");
			return ios;
		}

		throw new RuntimeException("Unknown target type");
	}
}


text:
<?php

declare(strict_types=1);

namespace Sylius\Bundle\ShopBundle\Locale;

use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;

/**
 * @author Kamil Kokot <kamil@kokot.me>
 */
final class UrlBasedLocaleSwitcher implements LocaleSwitcherInterface
{
    /**
     * @var UrlGeneratorInterface
     */
    private $urlGenerator;

    /**
     * @param UrlGeneratorInterface $urlGenerator
     */
    public function __construct(UrlGeneratorInterface $urlGenerator)
    {
        $this->urlGenerator = $urlGenerator;
    }

    /**
     * {@inheritdoc}
     */
    public function handle(Request $request, $localeCode)
    {
        return new RedirectResponse($this->urlGenerator->generate('sylius_shop_homepage', ['_locale' => $localeCode]));
    }
}


text:
using namespace std;

class Cruise
{
private:
	int cap_1st;
	int cap_coach;
	int sold_1st;
	int sold_coach;
	double price_1st;
	double price_coach;
	double cost_harbor;
	int num_harbor;
	double cruise_expense();
	double ticket_income();

public:
	Cruise();
	Cruise(int firstclass, int coach, int harbor);
	int get_cap_1st();
	int get_cap_coach();
	int get_sold_1st();
	int get_sold_coach();
	void set_cap_1st(int firstclass);
	void set_cap_coach(int coach);
	void set_price_1st(double firstcost);
	void set_price_coach(double coachcost);
	void set_cost_harbor(double harborcost);
	void set_num_harbor(int harbors);
	void sales_1st(int firstsales);
	void sales_coach(int coachsales);
	void input_cruise_info();
	double calc_ticket_cost(int price, char sectioncode);
	void print_cruise_stat(ostream& outs, char cruisecode);
};
#endif


text:
<!DOCTYPE html>
{% import 'macros.html' as m %}

    <meta charset="utf-8"/>
  <title>{{ SITENAME }} -- {% block title %}Home{% endblock title %}</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  <meta name="author" content="{{ author|e }}"/>

  <link rel="stylesheet" href="//cdn.jsdelivr.net/bootstrap/2.3.2/css/bootstrap.min.css"/>
  <link rel="stylesheet" href="//cdn.jsdelivr.net/bootstrap/2.3.2/css/bootstrap-responsive.min.css"/>
  <link rel="stylesheet" href="//cdn.jsdelivr.net/fontawesome/4.0.3/css/font-awesome.min.css"/>
  <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.0.0/magnific-popup.min.css"/>
  <link rel="stylesheet" href="{{ SITEURL }}/theme/css/jquery.mglass.css"/>
  <link rel="stylesheet" href="{{ SITEURL }}/theme/css/pygment-solarized-dark.css"/>
  <link rel="stylesheet" href="{{ SITEURL }}/theme/css/style.css"/>

  <link href='https://fonts.googleapis.com/css?family=Inconsolata' rel='stylesheet' type='text/css'>
  <link href='//fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'/>
  <link href='//fonts.googleapis.com/css?family=Istok+Web' rel='stylesheet' type='text/css'/>
  <link href='//fonts.googleapis.com/css?family=Droid+Sans+Mono' rel='stylesheet' type='text/css'/>
  {% if TYPOGRIFY %}
    <link href='//fonts.googleapis.com/css?family=Expletus+Sans' rel='stylesheet' type='text/css'>
  {% endif %}
  {% block extra_css %}{% endblock %}
  <link rel="icon" href="{{ SITEURL }}/theme/img/favicon.ico" type="image/x-icon">
  <link rel="shortcut icon" href="{{ SITEURL }}/theme/img/favicon.ico" type="image/x-icon">

  {% if FEED_ALL_ATOM %}
    <link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|e }} Full Atom Feed"/>
  {% endif %}
  {% if FEED_ALL_RSS %}
    <link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME|e }} Full RSS Feed"/>
  {% endif %}
  {% if FEED_ATOM %}
    <link href="{{ FEED_DOMAIN }}/{{ FEED_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|e }} Atom Feed"/>
  {% endif %}
  {% if FEED_RSS %}
    <link href="{{ FEED_DOMAIN }}/{{ FEED_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME|e }} RSS Feed"/>
  {% endif %}
  {% if CATEGORY_FEED_ATOM and category is defined %}
    <link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_ATOM|format(category.slug) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|e }} Categories Atom Feed"/>
  {% endif %}
  {% if CATEGORY_FEED_RSS and category is defined %}
    <link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_RSS|format(category.slug) }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME|e }} Categories RSS Feed"/>
  {% endif %}
  {% if TAG_FEED_ATOM and tag is defined %}
    <link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_ATOM|format(tag.slug) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|e }} Tags Atom Feed"/>
  {% endif %}
  {% if TAG_FEED_RSS and tag is defined %}
    <link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_RSS|format(tag.slug) }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME|e }} Tags RSS Feed"/>
  {% endif %}
  {% block head %}
  {% endblock %}

        {% if SITE_THUMBNAIL %}

            {% if SITE_THUMBNAIL_TEXT %}

{{ SITE_THUMBNAIL_TEXT }}

            {% endif %}

      {% endif %}

{{ SITENAME }} &nbsp&nbsp&nbsp&nbsp{{ SITESUBTITLE|safe }}

        {{ SITENAME }}

          {% for title, link in MENUITEMS %}
            {% set active_page = page is defined and link == "/%s"|format(page.url) -%}

{{ title }}

          {% endfor %}
          {% if DISPLAY_PAGES_ON_MENU %}
            {% for p in PAGES %}

{{ p.title }}

            {% endfor %}
          {% endif %}

        {% if GOOGLE_SEARCH %}
          <form class="navbar-search pull-right" action="http://www.google.com" target="_blank">
            <input type="text" name="q" class="search-query span2" placeholder="Search"/>

            <input type="hidden" name="cx" value="{{ GOOGLE_SEARCH }}" />
            <input type="hidden" name="ie" value="UTF-8" />
          </form>
        {% endif %}
        {% if TIPUE_SEARCH %}
          <form class="navbar-search pull-right" action="{{ SITEURL }}/search.html" onsubmit="return validateForm(this.elements['q'].value);">
            <input type="text" name="q" id="tipue_search_input" class="search-query span2" placeholder="Search" required/>

          </form>
        {% endif %}

    {% set has_left_content = has_left or LEFT_SIDEBAR is defined %}
    {% set has_right_content = has_right or RIGHT_SIDEBAR is defined %}

      {% block top_center %}
      {% endblock %}

    {% if LAYOUT != 'full-width' and has_left_content %}

        {% block left_sidebar %}
        {% endblock %}
        {{ LEFT_SIDEBAR }}

    {% endif %}

    {% block content %}
    {% endblock %}

  {% if LAYOUT != 'full-width' and has_right_content %}

      {% block right_sidebar %}
      {% endblock %}
      {{ RIGHT_SIDEBAR }}

  {% endif %}

About Me:

    {{BIO|safe}}

      {% set SOCIAL_WIDGET_NAME = SOCIAL_WIDGET_NAME or 'Social' %}
      {% for group_title, group_links in ((SOCIAL_WIDGET_NAME, SOCIAL), ) %}

        {% if group_links %}

{{ group_title }}:

              {% for title, link in group_links %}

{{ m.render_link_icon(link, title, GRAB_ICONS) }}

              {% endfor %}

        {% endif %}

      {% endfor %}

IRC nick:
{{IRC_NICK}}

    {% set LINKS_WIDGET_NAME = LINKS_WIDGET_NAME or 'Links' %}

      {% for group_title, group_links in ((LINKS_WIDGET_NAME, LINKS), ) %}

        {% if group_links %}

{{ group_title }}:

              {% for title, link in group_links %}

{{ m.render_link_icon(link, title, GRAB_ICONS) }}

              {% endfor %}

        {% endif %}

      {% endfor %}

Browse content by

        {% if CATEGORIES_SAVE_AS %}

 Categories

        {% endif %}
        {% if ARCHIVES_SAVE_AS %}

 Dates

        {% endif %}
        {% if TAGS_SAVE_AS %}

 Tags

        {% endif %}
        {% if TAG_FEED_ATOM and tag is defined %}

 Feed

          {% elif TAG_FEED_RSS and tag is defined %}

 Feed

          {% elif CATEGORY_FEED_ATOM and category is defined %}

 Feed

          {% elif CATEGORY_FEED_RSS and category is defined %}

 Feed

          {% elif FEED_ALL_ATOM %}

 Feed

          {% elif FEED_ALL_RSS %}

 Feed

        {% endif %}

 Back to top

  A Pelican-powered blog, themed with  Plumage

  {% set date_start = dates[-1].date.year if dates else None %}
  {% set date_end   = dates[0].date.year if dates else None %}

  {% if COPYRIGHT %}
    {{ COPYRIGHT }}
    {%else%}
    &copy {{ date_start if date_start }}{{ '-%s' % date_end if date_end and date_end != date_start }} {{ AUTHOR }}. Some Rights Reserved
  {% endif %}

{% include "analytics.html" %}

{% block extra_js %}{% endblock %}


text:
package com.xiaofong.prototype.pattern;

import java.util.Hashtable;

import com.xiaofong.prototype.pattern.abst.Shape;
import com.xiaofong.prototype.pattern.abst.impl.Circle;
import com.xiaofong.prototype.pattern.abst.impl.Rectangle;
import com.xiaofong.prototype.pattern.abst.impl.Square;

public class ShapeCache {

	private static Hashtable<String, Shape> shapeMap = new Hashtable<String, Shape>();

	public static Shape getShape(String shapeId) {
		Shape cacheShape = shapeMap.get(shapeId);
		return (Shape) cacheShape.clone();
	}

	// ¶ÔÿÖÖÐÎ×´¶¼ÔËÐÐÊý¾Ý¿â²éѯ, ²¢´´½¨¸ÃÐÎ×´
	public static void loadCache() {

		Circle circle = new Circle();
		circle.setId("1");
		shapeMap.put(circle.getId(), circle);

		Rectangle rectangle = new Rectangle();
		rectangle.setId("2");
		shapeMap.put(rectangle.getId(), rectangle);

		Square square = new Square();
		square.setId("3");
		shapeMap.put(square.getId(), square);

	}

}


text:
function noop() {};
self = {};
document = {
	addEventListener: noop,
	createElement: function() {
		return {
			addEventListener: noop,
			width: 100,
			height: 100,
			getContext: function(){
				return {
					activeTexture: noop,
					attachShader: noop,
					bindAttribLocation: noop,
					bindBuffer: noop,
					bindFramebuffer: noop,
					bindRenderbuffer: noop,
					bindTexture: noop,
					blendColor: noop,
					blendEquation: noop,
					blendEquationSeparate: noop,
					blendFunc: noop,
					blendFuncSeparate: noop,
					bufferData: noop,
					bufferSubData: noop,
					checkFramebufferStatus: noop,
					clear: noop,
					clearColor: noop,
					clearDepth: noop,
					clearStencil: noop,
					colorMask: noop,
					compileShader: noop,
					compressedTexImage2D: noop,
					compressedTexSubImage2D: noop,
					copyTexImage2D: noop,
					copyTexSubImage2D: noop,
					createBuffer: noop,
					createFramebuffer: noop,
					createProgram: noop,
					createRenderbuffer: noop,
					createShader: noop,
					createTexture: noop,
					cullFace: noop,
					deleteBuffer: noop,
					deleteFramebuffer: noop,
					deleteProgram: noop,
					deleteRenderbuffer: noop,
					deleteShader: noop,
					deleteTexture: noop,
					depthFunc: noop,
					depthMask: noop,
					depthRange: noop,
					detachShader: noop,
					disable: noop,
					disableVertexAttribArray: noop,
					drawArrays: noop,
					drawArraysInstancedANGLE: noop,
					drawElements: noop,
					drawElementsInstancedANGLE: noop,
					enable: noop,
					enableVertexAttribArray: noop,
					framebufferRenderbuffer: noop,
					framebufferTexture2D: noop,
					frontFace: noop,
					generateMipmap: noop,
					getActiveAttrib: noop,
					getActiveUniform: noop,
					getAttachedShaders: noop,
					getAttribLocation: noop,
					getBufferParameter: noop,
					getContextAttributes: noop,
					getError: noop,
					getExtension: function () {
						return null;
					},
					getFramebufferAttachmentParameter: noop,
					getParameter: noop,
					getProgramInfoLog: function() {
						return '';
					},
					getProgramParameter: noop,
					getRenderbufferParameter: noop,
					getShaderInfoLog: function() {
						return '';
					},
					getShaderParameter: noop,
					getShaderPrecisionFormat: function() {
						return {
							precision: 0
						}
					},
					getShaderSource: noop,
					getSupportedExtensions: noop,
					getTexParameter: noop,
					getUniform: noop,
					getUniformLocation: noop,
					getVertexAttrib: noop,
					getVertexAttribOffset: noop,
					isBuffer: noop,
					isContextLost: noop,
					isEnabled: noop,
					isFramebuffer: noop,
					isProgram: noop,
					isRenderbuffer: noop,
					isShader: noop,
					isTexture: noop,
					lineWidth: noop,
					linkProgram: noop,
					pixelStorei: noop,
					polygonOffset: noop,
					readPixels: noop,
					renderbufferStorage: noop,
					sampleCoverage: noop,
					scissor: noop,
					shaderSource: noop,
					stencilFunc: noop,
					stencilFuncSeparate: noop,
					stencilMask: noop,
					stencilMaskSeparate: noop,
					stencilOp: noop,
					stencilOpSeparate: noop,
					texImage2D: noop,
					texParameterf: noop,
					texParameteri: noop,
					texSubImage2D: noop,
					uniform1f: noop,
					uniform1fv: noop,
					uniform1i: noop,
					uniform1iv: noop,
					uniform2f: noop,
					uniform2fv: noop,
					uniform2i: noop,
					uniform2iv: noop,
					uniform3f: noop,
					uniform3fv: noop,
					uniform3i: noop,
					uniform3iv: noop,
					uniform4f: noop,
					uniform4fv: noop,
					uniform4i: noop,
					uniform4iv: noop,
					uniformMatrix2fv: noop,
					uniformMatrix3fv: noop,
					uniformMatrix4fv: noop,
					useProgram: noop,
					validateProgram: noop,
					vertexAttribDivisorANGLE: noop,
					vertexAttribPointer: noop,
					viewport: noop
				};
			}
		}
	}
};


text:
AndroidListViewSamples
======================

Android List View Samples


text:
/*************************************************************************/
/*  gd_mono_marshal.h                                                    */
/*************************************************************************/
/*                       This file is part of:                           */
/*                           GODOT ENGINE                                */
/*                      https://godotengine.org                          */
/*************************************************************************/
/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.                 */
/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)    */
/*                                                                       */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the       */
/* "Software"), to deal in the Software without restriction, including   */
/* without limitation the rights to use, copy, modify, merge, publish,   */
/* distribute, sublicense, and/or sell copies of the Software, and to    */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions:                                             */
/*                                                                       */
/* The above copyright notice and this permission notice shall be        */
/* included in all copies or substantial portions of the Software.       */
/*                                                                       */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY  */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,  */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
/*************************************************************************/

#ifndef GDMONOMARSHAL_H
#define GDMONOMARSHAL_H

#include "gd_mono.h"
#include "gd_mono_utils.h"
#include "variant.h"

namespace GDMonoMarshal {

template <typename T>
T unbox(MonoObject *p_obj) {
	return *(T *)mono_object_unbox(p_obj);
}

#define BOX_DOUBLE(x) mono_value_box(mono_domain_get(), CACHED_CLASS_RAW(double), &x)
#define BOX_FLOAT(x) mono_value_box(mono_domain_get(), CACHED_CLASS_RAW(float), &x)
#define BOX_INT64(x) mono_value_box(mono_domain_get(), CACHED_CLASS_RAW(int64_t), &x)
#define BOX_INT32(x) mono_value_box(mono_domain_get(), CACHED_CLASS_RAW(int32_t), &x)
#define BOX_INT16(x) mono_value_box(mono_domain_get(), CACHED_CLASS_RAW(int16_t), &x)
#define BOX_INT8(x) mono_value_box(mono_domain_get(), CACHED_CLASS_RAW(int8_t), &x)
#define BOX_UINT64(x) mono_value_box(mono_domain_get(), CACHED_CLASS_RAW(uint64_t), &x)
#define BOX_UINT32(x) mono_value_box(mono_domain_get(), CACHED_CLASS_RAW(uint32_t), &x)
#define BOX_UINT16(x) mono_value_box(mono_domain_get(), CACHED_CLASS_RAW(uint16_t), &x)
#define BOX_UINT8(x) mono_value_box(mono_domain_get(), CACHED_CLASS_RAW(uint8_t), &x)
#define BOX_BOOLEAN(x) mono_value_box(mono_domain_get(), CACHED_CLASS_RAW(bool), &x)
#define BOX_PTR(x) mono_value_box(mono_domain_get(), CACHED_CLASS_RAW(IntPtr), x)
#define BOX_ENUM(m_enum_class, x) mono_value_box(mono_domain_get(), m_enum_class, &x)

Variant::Type managed_to_variant_type(const ManagedType &p_type);

// String

String mono_to_utf8_string(MonoString *p_mono_string);
String mono_to_utf16_string(MonoString *p_mono_string);

_FORCE_INLINE_ String mono_string_to_godot_not_null(MonoString *p_mono_string) {
	if (sizeof(CharType) == 2)
		return mono_to_utf16_string(p_mono_string);

	return mono_to_utf8_string(p_mono_string);
}

_FORCE_INLINE_ String mono_string_to_godot(MonoString *p_mono_string) {
	if (p_mono_string == NULL)
		return String();

	return mono_string_to_godot_not_null(p_mono_string);
}

_FORCE_INLINE_ MonoString *mono_from_utf8_string(const String &p_string) {
	return mono_string_new(mono_domain_get(), p_string.utf8().get_data());
}

_FORCE_INLINE_ MonoString *mono_from_utf16_string(const String &p_string) {
	return mono_string_from_utf16((mono_unichar2 *)p_string.c_str());
}

_FORCE_INLINE_ MonoString *mono_string_from_godot(const String &p_string) {
	if (sizeof(CharType) == 2)
		return mono_from_utf16_string(p_string);

	return mono_from_utf8_string(p_string);
}

// Variant

MonoObject *variant_to_mono_object(const Variant *p_var, const ManagedType &p_type);
MonoObject *variant_to_mono_object(const Variant *p_var);

_FORCE_INLINE_ MonoObject *variant_to_mono_object(Variant p_var) {
	return variant_to_mono_object(&p_var);
}

Variant mono_object_to_variant(MonoObject *p_obj);

// Array

MonoArray *Array_to_mono_array(const Array &p_array);
Array mono_array_to_Array(MonoArray *p_array);

// PoolIntArray

MonoArray *PoolIntArray_to_mono_array(const PoolIntArray &p_array);
PoolIntArray mono_array_to_PoolIntArray(MonoArray *p_array);

// PoolByteArray

MonoArray *PoolByteArray_to_mono_array(const PoolByteArray &p_array);
PoolByteArray mono_array_to_PoolByteArray(MonoArray *p_array);

// PoolRealArray

MonoArray *PoolRealArray_to_mono_array(const PoolRealArray &p_array);
PoolRealArray mono_array_to_PoolRealArray(MonoArray *p_array);

// PoolStringArray

MonoArray *PoolStringArray_to_mono_array(const PoolStringArray &p_array);
PoolStringArray mono_array_to_PoolStringArray(MonoArray *p_array);

// PoolColorArray

MonoArray *PoolColorArray_to_mono_array(const PoolColorArray &p_array);
PoolColorArray mono_array_to_PoolColorArray(MonoArray *p_array);

// PoolVector2Array

MonoArray *PoolVector2Array_to_mono_array(const PoolVector2Array &p_array);
PoolVector2Array mono_array_to_PoolVector2Array(MonoArray *p_array);

// PoolVector3Array

MonoArray *PoolVector3Array_to_mono_array(const PoolVector3Array &p_array);
PoolVector3Array mono_array_to_PoolVector3Array(MonoArray *p_array);

#ifdef YOLO_COPY
#define MARSHALLED_OUT(m_t, m_in, m_out) m_t *m_out = (m_t *)&m_in;
#define MARSHALLED_IN(m_t, m_in, m_out) m_t m_out = *reinterpret_cast<m_t *>(m_in);
#else

// Expects m_in to be of type float*

#define MARSHALLED_OUT(m_t, m_in, m_out) MARSHALLED_OUT_##m_t(m_in, m_out)
#define MARSHALLED_IN(m_t, m_in, m_out) MARSHALLED_IN_##m_t(m_in, m_out)

// Vector2

#define MARSHALLED_OUT_Vector2(m_in, m_out) real_t m_out[2] = { m_in.x, m_in.y };
#define MARSHALLED_IN_Vector2(m_in, m_out) Vector2 m_out(m_in[0], m_in[1]);

// Rect2

#define MARSHALLED_OUT_Rect2(m_in, m_out) real_t m_out[4] = { m_in.position.x, m_in.position.y, m_in.size.width, m_in.size.height };
#define MARSHALLED_IN_Rect2(m_in, m_out) Rect2 m_out(m_in[0], m_in[1], m_in[2], m_in[3]);

// Transform2D

#define MARSHALLED_OUT_Transform2D(m_in, m_out) real_t m_out[6] = { m_in[0].x, m_in[0].y, m_in[1].x, m_in[1].y, m_in[2].x, m_in[2].y };
#define MARSHALLED_IN_Transform2D(m_in, m_out) Transform2D m_out(m_in[0], m_in[1], m_in[2], m_in[3], m_in[4], m_in[5]);

// Vector3

#define MARSHALLED_OUT_Vector3(m_in, m_out) real_t m_out[3] = { m_in.x, m_in.y, m_in.z };
#define MARSHALLED_IN_Vector3(m_in, m_out) Vector3 m_out(m_in[0], m_in[1], m_in[2]);

// Basis

#define MARSHALLED_OUT_Basis(m_in, m_out) real_t m_out[9] = { \
	m_in[0].x, m_in[0].y, m_in[0].z,                          \
	m_in[1].x, m_in[1].y, m_in[1].z,                          \
	m_in[2].x, m_in[2].y, m_in[2].z                           \
};
#define MARSHALLED_IN_Basis(m_in, m_out) Basis m_out(m_in[0], m_in[1], m_in[2], m_in[3], m_in[4], m_in[5], m_in[6], m_in[7], m_in[8]);

// Quat

#define MARSHALLED_OUT_Quat(m_in, m_out) real_t m_out[4] = { m_in.x, m_in.y, m_in.z, m_in.w };
#define MARSHALLED_IN_Quat(m_in, m_out) Quat m_out(m_in[0], m_in[1], m_in[2], m_in[3]);

// Transform

#define MARSHALLED_OUT_Transform(m_in, m_out) real_t m_out[12] = { \
	m_in.basis[0].x, m_in.basis[0].y, m_in.basis[0].z,             \
	m_in.basis[1].x, m_in.basis[1].y, m_in.basis[1].z,             \
	m_in.basis[2].x, m_in.basis[2].y, m_in.basis[2].z,             \
	m_in.origin.x, m_in.origin.y, m_in.origin.z                    \
};
#define MARSHALLED_IN_Transform(m_in, m_out) Transform m_out(                                   \
		Basis(m_in[0], m_in[1], m_in[2], m_in[3], m_in[4], m_in[5], m_in[6], m_in[7], m_in[8]), \
		Vector3(m_in[9], m_in[10], m_in[11]));

// AABB

#define MARSHALLED_OUT_AABB(m_in, m_out) real_t m_out[6] = { m_in.position.x, m_in.position.y, m_in.position.z, m_in.size.x, m_in.size.y, m_in.size.z };
#define MARSHALLED_IN_AABB(m_in, m_out) AABB m_out(Vector3(m_in[0], m_in[1], m_in[2]), Vector3(m_in[3], m_in[4], m_in[5]));

// Color

#define MARSHALLED_OUT_Color(m_in, m_out) real_t m_out[4] = { m_in.r, m_in.g, m_in.b, m_in.a };
#define MARSHALLED_IN_Color(m_in, m_out) Color m_out(m_in[0], m_in[1], m_in[2], m_in[3]);

// Plane

#define MARSHALLED_OUT_Plane(m_in, m_out) real_t m_out[4] = { m_in.normal.x, m_in.normal.y, m_in.normal.z, m_in.d };
#define MARSHALLED_IN_Plane(m_in, m_out) Plane m_out(m_in[0], m_in[1], m_in[2], m_in[3]);

#endif

} // namespace GDMonoMarshal

#endif // GDMONOMARSHAL_H


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
      <module fileurl="file://$PROJECT_DIR$/AD_AggregatedDashboards_Sample.iml" filepath="$PROJECT_DIR$/AD_AggregatedDashboards_Sample.iml" />
    </modules>
  </component>
</project>


text:
package org.onosproject.iptopology.api;

import static com.google.common.base.MoreObjects.toStringHelper;

import java.util.Iterator;
import java.util.List;
import java.util.Objects;

import org.onlab.packet.IpAddress;

/**
 * This class provides implementation of prefix traffic engineering data.
 */
public class PrefixTed {
    private final IgpFlags igpFlags;
    private final List<RouteTag> routeTag;
    private final List<ExtendedRouteTag> extendedRouteTag;
    private final Metric metric;
    private final IpAddress fwdingAddress;

    /**
     * Constructor to initialize its fields.
     *
     * @param igpFlags IS-IS and OSPF flags assigned to the prefix
     * @param routeTag IGP (ISIS or OSPF) tags of the prefix
     * @param extendedRouteTag extended ISIS route tags of the prefix
     * @param metric metric of the prefix
     * @param fwdingAddress OSPF forwarding address
     */
    public PrefixTed(IgpFlags igpFlags, List<RouteTag> routeTag, List<ExtendedRouteTag> extendedRouteTag,
            Metric metric, IpAddress fwdingAddress) {
        this.igpFlags = igpFlags;
        this.routeTag = routeTag;
        this.extendedRouteTag = extendedRouteTag;
        this.metric = metric;
        this.fwdingAddress = fwdingAddress;
    }

    /**
     * Provides IS-IS and OSPF flags assigned to the prefix.
     *
     * @return IGP flags
     */
    public IgpFlags igpFlags() {
        return igpFlags;
    }

    /**
     * Provides IGP (ISIS or OSPF) tags of the prefix.
     *
     * @return IGP route tag.
     */
    public List<RouteTag> routeTag() {
        return routeTag;
    }

    /**
     * Provides extended ISIS route tags of the prefix.
     *
     * @return extended IS-IS route tag
     */
    public List<ExtendedRouteTag> extendedRouteTag() {
        return extendedRouteTag;
    }

    /**
     * Provides metric of the prefix.
     *
     * @return prefix metric
     */
    public Metric metric() {
        return metric;
    }

    /**
     * Provides OSPF forwarding address.
     *
     * @return forwarding address
     */
    public IpAddress fwdingAddress() {
        return fwdingAddress;
    }

    @Override
    public int hashCode() {
        return Objects.hash(igpFlags, routeTag, extendedRouteTag, metric, fwdingAddress);
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }

        if (obj instanceof PrefixTed) {
            PrefixTed other = (PrefixTed) obj;
            Iterator<RouteTag> objListIterator = other.routeTag.iterator();
            int countOtherCommonRouteTag = other.routeTag.size();
            int countCommonRouteTag = routeTag.size();

            Iterator<ExtendedRouteTag> objListIterator1 = other.extendedRouteTag.iterator();
            int countOtherCommonExtRouteTag = other.extendedRouteTag.size();
            int countCommonExtRouteTag = extendedRouteTag.size();

            boolean isCommonRouteType = true;
            boolean isCommonExtRouteType = true;
            if (countOtherCommonRouteTag != countCommonRouteTag
                    || countOtherCommonExtRouteTag != countCommonExtRouteTag) {
                return false;
            } else {
                while (objListIterator.hasNext() && isCommonRouteType) {
                    RouteTag subTlv = objListIterator.next();
                    if (routeTag.contains(subTlv) && other.routeTag.contains(subTlv)) {
                        isCommonRouteType = Objects.equals(routeTag.get(routeTag.indexOf(subTlv)),
                                other.routeTag.get(other.routeTag.indexOf(subTlv)));
                    } else {
                        isCommonRouteType = false;
                    }
                }
                while (objListIterator1.hasNext() && isCommonExtRouteType) {
                    ExtendedRouteTag subTlv = objListIterator1.next();
                    if (extendedRouteTag.contains(subTlv) && other.extendedRouteTag.contains(subTlv)) {
                        isCommonExtRouteType = Objects.equals(extendedRouteTag.get(extendedRouteTag.indexOf(subTlv)),
                                other.extendedRouteTag.get(other.extendedRouteTag.indexOf(subTlv)));
                    } else {
                        isCommonExtRouteType = false;
                    }
                }
                return isCommonRouteType && isCommonExtRouteType && Objects.equals(igpFlags, other.igpFlags)
                        && Objects.equals(metric, other.metric) && Objects.equals(fwdingAddress, other.fwdingAddress);
            }
        }
        return false;
    }

    @Override
    public String toString() {
        return toStringHelper(this)
                .omitNullValues()
                .add("igpFlags", igpFlags)
                .add("extendedRouteTag", extendedRouteTag)
                .add("routeTag", routeTag)
                .add("metric", metric)
                .add("fwdingAddress", fwdingAddress)
                .toString();
    }
}


text:
package org.robotframework;

/**
 * An interface class that is used for creating a Jython object capable of
 * running Robot Framework.
 */
public interface RobotRunner {

    public int run(String[] args);

}