text:
import requests
import json
import time
from datetime import datetime, timedelta
from pytz import timezone
from pytz import utc
import re
from os.path import expanduser

# Store and your Bot token in your home directory -> ~/.tokens/telegram_bot
home = expanduser("~")
token_file = str(home) + '/.tokens/telegram_bot'
with open(token_file) as f:
    token = f.readline().strip()

tg_url = 'https://api.telegram.org/bot{token}/'.format(**locals())
meetup_dict = {'hydpy': 'Hyderabad-Python-Meetup-Group',
               'coderplex': 'coderplex'}

def get_url(url):
    response = requests.get(url)
    return json.loads(response.text)

def get_updates(offset=None):
    if offset:
        return get_url(tg_url+'getUpdates?timeout=100'+"&offset={offset}".format(**locals()))
    return get_url(tg_url+'getUpdates?timeout=100')

def send_updates(chat_id, text):
    return get_url(tg_url+'sendMessage?chat_id={chat_id}&text={text}'.format(**locals()))

def send_inline(answer):
    return requests.post(url=tg_url + 'answerInlineQuery', params=answer)

def last_update_id(updates):
    update_ids = []
    for update in updates['result']:
        update_ids.append(int(update['update_id']))
    return max(update_ids)

def echo_all(updates):
    for update in updates['result']:
        try:
            chat_id = update['message']['chat']['id']
            text = update['message']['text']
            from_id = update['message']['from']['username']
            # print('Received from ' + from_id + ' > ' + text)
            send_updates(chat_id, text)
            print('Chat Echoed ' + from_id + ' > ' + text)
        except Exception as e:
            print(e)

def prt_recd_from(data, method, query):
    try:
        from_id = data['from']['username']
        if method == 'inline_query':
            print('Inline Query Received from ' + from_id + ' > ' + query)
        elif method == 'message':
            print('Chat Received from ' + from_id + ' > ' + query)
        return from_id
    except Exception as e:
        print(e)
    return

def prt_sent_to(from_id, method, action):
    try:
        if from_id:
            if method == 'inline_query':
                print('Inline Query answered to ' + from_id + ' > ' + action)
            elif method == 'message':
                print('Chat Replied to ' + from_id + ' > ' + action)
    except Exception as e:
        print(e)
    return

def meetup_api(group_name=None):
    if group_name is not None:
        group_urlname = meetup_dict[group_name]
        response = requests.get(r'https://api.meetup.com/{group_urlname}/events'
                                '?&sign=true&photo-host=public&page=20'.format(**locals()))
        parsed_json = json.loads(response.text)
        meetup_list = []
        if len(parsed_json) > 0:
            for i in range(len(parsed_json)):
                utc_dt = utc.localize(datetime.utcfromtimestamp(parsed_json[i]['time']//1000))
                ist_dt = utc_dt.astimezone(timezone('Asia/Kolkata'))
                try:
                    venue = parsed_json[i]['venue']['name']
                except Exception as e:
                    print(e)
                    venue = 'Location unavailable'
                text = ('Meetup Name: ' + parsed_json[i]['name'] + '\n' +
                        'Location: ' + venue + '\n' +
                        'Time: ' + str(ist_dt.strftime('%I:%M %p, %b %d,%Y (%Z)')) + '\n' +
                        'RSVP Here: ' + parsed_json[i]['link'])
                meetup_list.append({'name': parsed_json[i]['name'],
                                    'location': venue,
                                    'time': str(ist_dt.strftime('%I:%M %p, %b %d,%Y (%Z)')),
                                    'url': parsed_json[i]['link'],
                                    'going': parsed_json[i]['yes_rsvp_count'],
                                    'who': parsed_json[i]['group']['who'],
                                    'groupname': parsed_json[i]['group']['name'],
                                    'text': text},)
        return meetup_list
    return

def send_inline_meetups(meetup_list, inline_query_id, from_id):
    results = []
    if len(meetup_list) > 0:
        for u_id, meetup in enumerate(meetup_list):
            results.append({'type': 'article',
                            'id': u_id,
                            'title': meetup['name'],
                            'parse_mode': 'Markdown',
                            'message_text': meetup['text'],
                            'description': '{} {} are going'.format(meetup['going'], meetup['who'])})
        answer = {'inline_query_id': inline_query_id, 'results': json.dumps(results), 'cache_time': '30'}
        send_inline(answer)
        prt_sent_to(from_id, 'inline_query', meetup_list[0]['groupname'] + ' Meetup Details')
    else:
        results.append({'type': 'article',
                        'id': 0,
                        'title': 'No Meetups scheduled in this group',
                        'parse_mode': 'Markdown',
                        'message_text': 'No Meetups scheduled in this group',
                        'description': 'Check again later'})
        answer = {'inline_query_id': inline_query_id, 'results': json.dumps(results), 'cache_time': '30'}
        send_inline(answer)
        prt_sent_to(from_id, 'inline_query',  ' No meetups scheduled')
    return

def send_chat_meetups(meetup_list, chat_id, from_id):
    if len(meetup_list) > 0:
        send_updates(chat_id, 'I noticed ' + str(len(meetup_list)) + ' Meetup' + ('s' if len(meetup_list)>1 else ''))
        for meetup in meetup_list:
            send_updates(chat_id, meetup['text'].replace('&','%26'))
        prt_sent_to(from_id, 'message', meetup_list[0]['groupname'] + ' Meetup Details')
    else:
        send_updates(chat_id, 'There are no new Meetups scheduled :(')
        prt_sent_to(from_id, 'message', ' No meetups scheduled')
    return

def process_meetups(query, query_type, send_id, from_id):
    if query in meetup_dict:
        meetup_list = meetup_api(query)
        if query_type == 'inline':
            send_inline_meetups(meetup_list, send_id, from_id)
        elif query_type == 'chat':
            send_chat_meetups(meetup_list, send_id, from_id)
    else:
        return None
    return True

def commander(updates):
    for update in updates['result']:
        if 'inline_query' in update:
            inline_query = update['inline_query']
            inline_query_id = inline_query['id']
            query = inline_query['query'].lower().strip('/')
            from_id = prt_recd_from(inline_query, 'inline_query', query)
            process_meetups(query, 'inline', inline_query_id, from_id)
        else:
            try:
                message = update['message']
                chat_id = message['chat']['id']
                query = message['text'].strip('/')
                from_id = prt_recd_from(message, 'message', query)
                check = process_meetups(query, 'chat', chat_id, from_id)
                if check is None:
                    echo_all(updates)
            except Exception as e:
                print(e)

def main():
    offset = None
    while True:
        try:
            all_updates_json = get_updates(offset)
            if len(all_updates_json['result']) > 0:
                offset = last_update_id(all_updates_json) + 1
                commander(all_updates_json)
        except Exception as e:
            print(e)
        time.sleep(0.4)

if __name__ == '__main__':
    main()


text:
package ab.biol498.ACRD;

import java.util.jar.JarFile;

import com.clcbio.api.base.plugin.PluginValidator;

public class ACRDValidator implements PluginValidator {
    @Override
    public void setJarFile(JarFile jarFile) {
    }

    @Override
    public boolean validate() {
        return true;
    }
}

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Google\Service\Slides;

class DeleteObjectRequest extends \Google\Model
{
  /**
   * @var string
   */
  public $objectId;

  /**
   * @param string
   */
  public function setObjectId($objectId)
  {
    $this->objectId = $objectId;
  }
  /**
   * @return string
   */
  public function getObjectId()
  {
    return $this->objectId;
  }
}

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


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

namespace HelixToolkit.Wpf.SharpDX
{
    public interface IRenderMatrices
    {
        Matrix ViewMatrix { get; }

        Matrix ProjectionMatrix { get; }

        Matrix WorldMatrix { get; }

        Matrix ViewportMatrix { get; }

        Matrix ScreenViewProjectionMatrix { get; }

        double ActualWidth { get; }
        double ActualHeight { get; }
    }
}


text:
namespace Microsoft.Azure.Management.Compute.Models
{
    using Newtonsoft.Json;
    using System.Collections;
    using System.Collections.Generic;
    using System.Linq;

    /// <summary>
    /// The status of virtual machine patch operations.
    /// </summary>
    public partial class VirtualMachinePatchStatus
    {
        /// <summary>
        /// Initializes a new instance of the VirtualMachinePatchStatus class.
        /// </summary>
        public VirtualMachinePatchStatus()
        {
            CustomInit();
        }

        /// <summary>
        /// Initializes a new instance of the VirtualMachinePatchStatus class.
        /// </summary>
        /// <param name="availablePatchSummary">The available patch summary of
        /// the latest assessment operation for the virtual machine.</param>
        /// <param name="lastPatchInstallationSummary">The installation summary
        /// of the latest installation operation for the virtual
        /// machine.</param>
        /// <param name="configurationStatuses">The enablement status of the
        /// specified patchMode</param>
        public VirtualMachinePatchStatus(AvailablePatchSummary availablePatchSummary = default(AvailablePatchSummary), LastPatchInstallationSummary lastPatchInstallationSummary = default(LastPatchInstallationSummary), IList<InstanceViewStatus> configurationStatuses = default(IList<InstanceViewStatus>))
        {
            AvailablePatchSummary = availablePatchSummary;
            LastPatchInstallationSummary = lastPatchInstallationSummary;
            ConfigurationStatuses = configurationStatuses;
            CustomInit();
        }

        /// <summary>
        /// An initialization method that performs custom operations like setting defaults
        /// </summary>
        partial void CustomInit();

        /// <summary>
        /// Gets or sets the available patch summary of the latest assessment
        /// operation for the virtual machine.
        /// </summary>
        [JsonProperty(PropertyName = "availablePatchSummary")]
        public AvailablePatchSummary AvailablePatchSummary { get; set; }

        /// <summary>
        /// Gets or sets the installation summary of the latest installation
        /// operation for the virtual machine.
        /// </summary>
        [JsonProperty(PropertyName = "lastPatchInstallationSummary")]
        public LastPatchInstallationSummary LastPatchInstallationSummary { get; set; }

        /// <summary>
        /// Gets the enablement status of the specified patchMode
        /// </summary>
        [JsonProperty(PropertyName = "configurationStatuses")]
        public IList<InstanceViewStatus> ConfigurationStatuses { get; private set; }

    }
}


text:
Caller Example:
```
python celltk/caller.py input_files/ktr_inputs/input_anisoinh.yml
```
This yaml file contains the following items:
- OUTPUT_DIR: a parental folder to save output
- operations: a sequence of operations implemented in the order.

We call a set of function name, input, output and parameters as an operation.
Here is the example of the operation:
```
- function: flatfield_references
  images: /home/KTRimages/IL1B/Pos006/*DAPI*
  output: op000
  params:
    ff_paths: /home/KTRimages/IL1B/FF/*DAPI*
```
Each operation contains ___function___, ___images (and/or labels)___ , ___output___ and ___params___.

### function and params
The ___celltk\/\*\_operations.py___ modules contains a list of functions, which they take an input image and transform it.
___function___ is simply a function name from these modules. You can find a function called ___flatfield\_refernces___ in ___celltk/preprocess\_operations.py___; ___ff_paths___ is an argument for this function.

You can quickly check available functions by typing one of the following commands:
```
celltk-preprocess
celltk-segment
celltk-subdetect
celltk-track
celltk-postprocess
```

### images (and/or labels) and output

#### Lazy syntax
For specifying a series of image files, you may use file names specified by wildcards or a folder containing the files (either relative or absolute). Whenever you use the relative path, it will look for a path under OUTPUT_DIR.
For example, imagine you have two files as _/home/example/op/img0.tif_ and _/home/example/op/img1.tif_. If `OUTPUT_DIR: /home/example/`, then any of the following syntaxes can be used to take these images as input:
```
images: /home/example/op/img*.tif
images: /home/example/op
images: op/img*.tif
images: op
```

#### A sequence of a sequence
Operations can also be specified as a nested sequence instead of a sequence.

```
- - function: example0
    images: op0
  - function: example1
  - function: example2
    output: op1
```

In this case, it takes a series of images from op0, apply functions  example0 to example2, and finally save the transformed images in op1 folder. Note that images and output are specified only in the first and last operation, respectively.

Typically, tracking uses this format so that it enables an incremental tracking with several algorithms. Objects which could not be tracked by the first algorithm are passed to the second algorithm, and so on.
Tracking e.g.
```
- - function: run_lap
    images: DAPI
    labels: op001
    params:
      MASSTHRES: 0.25
  - function: track_neck_cut
    params:
      THRES_ANGLE: 180
  - function: track_neck_cut
    params:
      THRES_ANGLE: 160
    output: tracked
```
In this example, cells are first attempted for tracking with ___run\_lap___; cells that were not linked by ___run\_lap___ is then passed to ___track\_neck\_cut___ with _THRES\_ANGLE: 180_, and whatever left is finally passed to ___track\_neck\_cut___ with _THRES\_ANGLE: 160_.
In general, order tracking algorithms from conservative to more radical algorithms.

At the end, however, we want to extract vectors or arrays representing extracted parameters. This is implemented through apply.


text:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans>
  <bean id="stringBean" class="java.lang.String"/>
</beans>


text:
#include "common.hpp"
#include <boost/test/unit_test.hpp>

template <class IArchive, class OArchive>
void test_unordered_set()
{
  std::random_device rd;
  std::mt19937 gen(rd());

  for(int ii=0; ii<100; ++ii)
  {
    std::unordered_set<int> o_podunordered_set;
    for(int j=0; j<100; ++j)
      o_podunordered_set.insert(random_value<int>(gen));

    std::unordered_set<StructInternalSerialize, StructHash<StructInternalSerialize>> o_iserunordered_set;
    for(int j=0; j<100; ++j)
      o_iserunordered_set.insert({ random_value<int>(gen), random_value<int>(gen) });

    std::unordered_set<StructInternalSplit, StructHash<StructInternalSplit>> o_isplunordered_set;
    for(int j=0; j<100; ++j)
      o_isplunordered_set.insert({ random_value<int>(gen), random_value<int>(gen) });

    std::unordered_set<StructExternalSerialize, StructHash<StructExternalSerialize>> o_eserunordered_set;
    for(int j=0; j<100; ++j)
      o_eserunordered_set.insert({ random_value<int>(gen), random_value<int>(gen) });

    std::unordered_set<StructExternalSplit, StructHash<StructExternalSplit>> o_esplunordered_set;
    for(int j=0; j<100; ++j)
      o_esplunordered_set.insert({ random_value<int>(gen), random_value<int>(gen) });

    std::ostringstream os;
    {
      OArchive oar(os);

      oar(o_podunordered_set);
      oar(o_iserunordered_set);
      oar(o_isplunordered_set);
      oar(o_eserunordered_set);
      oar(o_esplunordered_set);
    }

    std::unordered_set<int> i_podunordered_set;
    std::unordered_set<StructInternalSerialize, StructHash<StructInternalSerialize>>   i_iserunordered_set;
    std::unordered_set<StructInternalSplit, StructHash<StructInternalSplit>>           i_isplunordered_set;
    std::unordered_set<StructExternalSerialize, StructHash<StructExternalSerialize>>   i_eserunordered_set;
    std::unordered_set<StructExternalSplit, StructHash<StructExternalSplit>>           i_esplunordered_set;

    std::istringstream is(os.str());
    {
      IArchive iar(is);

      iar(i_podunordered_set);
      iar(i_iserunordered_set);
      iar(i_isplunordered_set);
      iar(i_eserunordered_set);
      iar(i_esplunordered_set);
    }

    for(auto const & p : i_podunordered_set)
    {
      BOOST_CHECK_EQUAL(o_podunordered_set.count(p), 1);
    }

    for(auto const & p : i_iserunordered_set)
    {
      BOOST_CHECK_EQUAL(o_iserunordered_set.count(p), 1);
    }

    for(auto const & p : i_isplunordered_set)
    {
      BOOST_CHECK_EQUAL(o_isplunordered_set.count(p), 1);
    }

    for(auto const & p : i_eserunordered_set)
    {
      BOOST_CHECK_EQUAL(o_eserunordered_set.count(p), 1);
    }

    for(auto const & p : i_esplunordered_set)
    {
      BOOST_CHECK_EQUAL(o_esplunordered_set.count(p), 1);
    }
  }
}

BOOST_AUTO_TEST_CASE( binary_unordered_set )
{
  test_unordered_set<cereal::BinaryInputArchive, cereal::BinaryOutputArchive>();
}

BOOST_AUTO_TEST_CASE( portable_binary_unordered_set )
{
  test_unordered_set<cereal::PortableBinaryInputArchive, cereal::PortableBinaryOutputArchive>();
}

BOOST_AUTO_TEST_CASE( xml_unordered_set )
{
  test_unordered_set<cereal::XMLInputArchive, cereal::XMLOutputArchive>();
}

BOOST_AUTO_TEST_CASE( json_unordered_set )
{
  test_unordered_set<cereal::JSONInputArchive, cereal::JSONOutputArchive>();
}


text:
init = function () {

    /* OVERLAY BEHAVIOR
    ********************/
    var overlaySelector = '.overlay',
        $triggerBtn = $('.trigger-overlay'),
        $closeBtn = $('.close-overlay');

    $triggerBtn.click(function(e) {
        var overlayTarget = "";
        if($(this).data('target')){ //add data-target to target a specific overlay
            overlayTarget = '.' + $(this).data('target') + '-overlay';
        }
        overlay = $(overlaySelector + overlayTarget);
        overlay.removeClass('close').addClass('open');
    });

    $closeBtn.click(function(e) {
        overlay = $(overlaySelector);
        overlay.removeClass('open').addClass('close');
    });

    /* SLIDER */
    $('.selector').on("click", function (e) {
        e.preventDefault();

        var viewer = '.overlay',
            swiperContainer = '.swiper-container',
            swiperWrapper = '.swiper-wrapper',
            totalSlides = $(this).siblings().length,
            currentSlide = $('.media').index(this),
            isSingle = currentSlide === totalSlides;

        $(swiperWrapper).html('');

        $('.gallery .media').find('img').each(function () {
            var sourceImageSrc = $(this).data('highres') ,
                $slideDom = $('<div/>', {
                    class: "swiper-slide"
                }),
                $figure = $('<figure/>', {
                    class: "media"
                });
            $(swiperWrapper).append($slideDom.append($figure.append($(this).clone().attr('src', sourceImageSrc))));
        });

        if (isSingle) {
            $(swiperWrapper + ' .nav').hide() //not used in the current version
        } else {
            $(swiperWrapper + ' .nav').show();
            // init swiper object
            swiperObject = new Swiper(swiperContainer, {
                mode: 'horizontal',
                loop: false,
                speed: 500,
                resistanceRatio: 0.8,
                keyboardControl: true,
                mousewheelControl: true,
                initialSlide: currentSlide
            });
            swiperObject.update();
            currentSlide = swiperObject.activeIndex + 1;

            swiperObject.on('slideChangeStart', function () {
                swiperObject.update();
                currentSlide = swiperObject.activeIndex + 1;
                $(viewer + ' .pagination .current-slide').html(currentSlide);
            });

            $(viewer + ' .pagination .current-slide').html(currentSlide);
            $(viewer + ' .pagination .total-slides').html(swiperObject.slides.length);
        };
    });
}

// On window load
$(function () {
    init();
})

// After ajax load, tu restart the scripts
$(window).on('statechangecomplete', function () {
    init();
});


text:
namespace NewsSite.Data.Common
{
    public enum RoleType
    {
        Admin = 0,
        Moderator = 1,
        TrustedUser = 2,
        RegularUser = 3,
    }
}


text:
package com.xtremelabs.robolectric.shadows;

import android.view.animation.Animation;
import android.view.animation.LinearInterpolator;
import android.view.animation.Transformation;
import com.xtremelabs.robolectric.WithTestDefaultsRunner;
import com.xtremelabs.robolectric.util.TestAnimationListener;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;

import static com.xtremelabs.robolectric.Robolectric.shadowOf;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.hamcrest.CoreMatchers.sameInstance;
import static org.junit.Assert.assertThat;

@RunWith(WithTestDefaultsRunner.class)
public class AnimationTest {

	private TestAnimation animation;
	private ShadowAnimation shadow;
	private TestAnimationListener listener;

	@Before
	public void setUp() throws Exception {
		animation = new TestAnimation();
		shadow = shadowOf(animation);
		listener = new TestAnimationListener();
		animation.setAnimationListener(listener);
	}

	@Test
	public void startShouldInvokeStartCallback() throws Exception {
		assertThat(listener.wasStartCalled, equalTo(false));
		animation.start();
		assertThat(listener.wasStartCalled, equalTo(true));
		assertThat(listener.wasEndCalled, equalTo(false));
		assertThat(listener.wasRepeatCalled, equalTo(false));
	}

	@Test
	public void cancelShouldInvokeEndCallback() throws Exception {
		assertThat(listener.wasEndCalled, equalTo(false));
		animation.cancel();
		assertThat(listener.wasStartCalled, equalTo(false));
		assertThat(listener.wasEndCalled, equalTo(true));
		assertThat(listener.wasRepeatCalled, equalTo(false));
	}

	@Test
	public void invokeRepeatShouldInvokeRepeatCallback() throws Exception {
		assertThat(listener.wasRepeatCalled, equalTo(false));
		shadow.invokeRepeat();
		assertThat(listener.wasStartCalled, equalTo(false));
		assertThat(listener.wasEndCalled, equalTo(false));
		assertThat(listener.wasRepeatCalled, equalTo(true));
	}

	@Test
	public void invokeEndShouldInvokeEndCallback() throws Exception {
		assertThat(listener.wasEndCalled, equalTo(false));
		shadow.invokeEnd();
		assertThat(listener.wasStartCalled, equalTo(false));
		assertThat(listener.wasEndCalled, equalTo(true));
		assertThat(listener.wasRepeatCalled, equalTo(false));
	}

    @Test
	public void simulateAnimationEndShouldInvokeApplyTransformationWith1() throws Exception {
		assertThat(animation.interpolatedTime, equalTo(0f));
		shadow.invokeEnd();
        assertThat(animation.interpolatedTime, equalTo(1f));
	}

	@Test
	public void testHasStarted() throws Exception {
		assertThat(animation.hasStarted(), equalTo(false));
		animation.start();
		assertThat(animation.hasStarted(), equalTo(true));
		animation.cancel();
		assertThat(animation.hasStarted(), equalTo(false));
	}

	@Test
	public void testDuration() throws Exception {
		assertThat(animation.getDuration(), not(equalTo(1000l)));
		animation.setDuration(1000);
		assertThat(animation.getDuration(), equalTo(1000l));
	}

	@Test
	public void testInterpolation() throws Exception {
		assertThat(animation.getInterpolator(), nullValue());
		LinearInterpolator i = new LinearInterpolator();
		animation.setInterpolator(i);
		assertThat((LinearInterpolator)animation.getInterpolator(), sameInstance(i));
	}

	private class TestAnimation extends Animation {
        float interpolatedTime;
        Transformation t;

        @Override protected void applyTransformation(float interpolatedTime, Transformation t) {
            this.interpolatedTime = interpolatedTime;
            this.t = t;
        }
    }
}


text:
"use strict";

var JSDOM = require("jsdom").JSDOM;
var referee = require("@sinonjs/referee");
var setupDOM = require("jsdom-global");
var sinon = require("sinon");

var fakeServerWithClock = require("./fake-server-with-clock");
var sinonFakeServer = require("./index");

var FakeTimers = require("@sinonjs/fake-timers");
var FakeXMLHttpRequest = require("../fake-xhr").FakeXMLHttpRequest;

var JSDOMParser;
if (JSDOM) {
    JSDOMParser = new JSDOM().window.DOMParser;
}

var assert = referee.assert;
var refute = referee.refute;

var globalSetTimeout = setTimeout;

describe("fakeServerWithClock", function() {
    beforeEach(function() {
        if (JSDOMParser) {
            global.DOMParser = JSDOMParser;
            this.cleanupDOM = setupDOM();
        }
    });

    afterEach(function() {
        if (JSDOMParser) {
            delete global.DOMParser;
            this.cleanupDOM();
        }
    });

    describe("without pre-existing fake clock", function() {
        beforeEach(function() {
            this.server = fakeServerWithClock.create();
        });

        afterEach(function() {
            this.server.restore();
            if (this.clock) {
                this.clock.uninstall();
            }
        });

        it("calls 'super' when adding requests", function() {
            var sandbox = sinon.createSandbox();
            var addRequest = sandbox.stub(sinonFakeServer, "addRequest");
            var xhr = {};
            this.server.addRequest(xhr);

            assert(addRequest.calledWith(xhr));
            assert(addRequest.calledOn(this.server));
            sandbox.restore();
        });

        it("sets reference to clock when adding async request", function() {
            this.server.addRequest({ async: true });

            assert.isObject(this.server.clock);
            assert.isFunction(this.server.clock.tick);
        });

        it("sets longest timeout from setTimeout", function() {
            this.server.addRequest({ async: true });

            // eslint-disable-next-line no-empty-function
            setTimeout(function() {}, 12);
            // eslint-disable-next-line no-empty-function
            setTimeout(function() {}, 29);
            // eslint-disable-next-line no-empty-function
            setInterval(function() {}, 12);
            // eslint-disable-next-line no-empty-function
            setTimeout(function() {}, 27);

            assert.equals(this.server.longestTimeout, 29);
        });

        it("sets longest timeout from setInterval", function() {
            this.server.addRequest({ async: true });

            // eslint-disable-next-line no-empty-function
            setTimeout(function() {}, 12);
            // eslint-disable-next-line no-empty-function
            setTimeout(function() {}, 29);
            // eslint-disable-next-line no-empty-function
            setInterval(function() {}, 132);
            // eslint-disable-next-line no-empty-function
            setTimeout(function() {}, 27);

            assert.equals(this.server.longestTimeout, 132);
        });

        it("resets clock", function() {
            this.server.addRequest({ async: true });

            this.server.respond("");
            assert.same(setTimeout, globalSetTimeout);
        });

        it("does not reset clock second time", function() {
            this.server.addRequest({ async: true });
            this.server.respond("");
            this.clock = FakeTimers.install();
            this.server.addRequest({ async: true });
            this.server.respond("");

            refute.same(setTimeout, globalSetTimeout);
        });
    });

    describe("existing clock", function() {
        beforeEach(function() {
            this.clock = FakeTimers.install();
            this.server = fakeServerWithClock.create();
        });

        afterEach(function() {
            this.clock.uninstall();
            this.server.restore();
        });

        it("uses existing clock", function() {
            this.server.addRequest({ async: true });

            assert.same(this.server.clock, this.clock);
        });

        it("records longest timeout using setTimeout and existing clock", function() {
            this.server.addRequest({ async: true });

            // eslint-disable-next-line no-empty-function
            setInterval(function() {}, 42);
            // eslint-disable-next-line no-empty-function
            setTimeout(function() {}, 23);
            // eslint-disable-next-line no-empty-function
            setTimeout(function() {}, 53);
            // eslint-disable-next-line no-empty-function
            setInterval(function() {}, 12);

            assert.same(this.server.longestTimeout, 53);
        });

        it("records longest timeout using setInterval and existing clock", function() {
            this.server.addRequest({ async: true });

            // eslint-disable-next-line no-empty-function
            setInterval(function() {}, 92);
            // eslint-disable-next-line no-empty-function
            setTimeout(function() {}, 73);
            // eslint-disable-next-line no-empty-function
            setTimeout(function() {}, 53);
            // eslint-disable-next-line no-empty-function
            setInterval(function() {}, 12);

            assert.same(this.server.longestTimeout, 92);
        });

        it("does not reset clock", function() {
            this.server.respond("");

            assert.same(setTimeout.clock, this.clock);
        });
    });

    describe(".respond", function() {
        var sandbox;

        beforeEach(function() {
            this.server = fakeServerWithClock.create();
            this.server.addRequest({ async: true });
        });

        afterEach(function() {
            this.server.restore();
            if (sandbox) {
                sandbox.restore();
                sandbox = null;
            }
        });

        it("ticks the clock to fire the longest timeout", function() {
            this.server.longestTimeout = 96;

            this.server.respond();

            assert.equals(this.server.clock.now, 96);
        });

        it("ticks the clock to fire the longest timeout when multiple responds", function() {
            // eslint-disable-next-line no-empty-function
            setInterval(function() {}, 13);
            this.server.respond();
            var xhr = new FakeXMLHttpRequest();
            // please the linter, we can't have unused variables
            // even when we're instantiating FakeXMLHttpRequest for its side effects
            assert(xhr);
            // eslint-disable-next-line no-empty-function
            setInterval(function() {}, 17);
            this.server.respond();

            assert.equals(this.server.clock.now, 17);
        });

        it("resets longest timeout", function() {
            this.server.longestTimeout = 96;

            this.server.respond();

            assert.equals(this.server.longestTimeout, 0);
        });

        it("calls original respond", function() {
            sandbox = sinon.createSandbox();
            var obj = {};
            var respond = sandbox.stub(sinonFakeServer, "respond").returns(obj);

            var result = this.server.respond("GET", "/", "");

            assert.equals(result, obj);
            assert(respond.calledWith("GET", "/", ""));
            assert(respond.calledOn(this.server));
        });

        it("does not trigger a timeout event", function() {
            sandbox = sinon.createSandbox();

            var xhr = new FakeXMLHttpRequest();
            xhr.open("GET", "/");
            xhr.timeout = 1;
            xhr.triggerTimeout = sandbox.spy();
            xhr.send();

            this.server.respond();

            assert.isFalse(xhr.triggerTimeout.called);
        });
    });

    describe("jQuery compat mode", function() {
        beforeEach(function() {
            this.server = fakeServerWithClock.create();

            this.request = new FakeXMLHttpRequest();
            this.request.open("get", "/", true);
            this.request.send();
            sinon.spy(this.request, "respond");
        });

        afterEach(function() {
            this.server.restore();
        });

        it("handles clock automatically", function() {
            this.server.respondWith("OK");
            var spy = sinon.spy();

            setTimeout(spy, 13);
            this.server.respond();
            this.server.restore();

            assert(spy.called);
            assert.same(setTimeout, globalSetTimeout);
        });

        it("finishes xhr from setInterval like jQuery 1.3.x does", function() {
            this.server.respondWith("Hello World");
            var xhr = new FakeXMLHttpRequest();
            xhr.open("GET", "/");
            xhr.send();

            var spy = sinon.spy();

            setInterval(function() {
                spy(xhr.responseText, xhr.statusText, xhr);
            }, 13);

            this.server.respond();

            assert.equals(spy.args[0][0], "Hello World");
            assert.equals(spy.args[0][1], "OK");
            assert.equals(spy.args[0][2].status, 200);
        });
    });
});


text:
<?php

defined( '_JEXEC' ) or die( 'Restricted access' );
defined('_MJ') or die('Incorrect usage of Mobile Joomla.');
$MobileJoomla = MobileJoomla::getInstance();
?>
<!DOCTYPE html>
<html<?php echo $MobileJoomla->getXmlnsString(); ?>>

	<meta http-equiv="Content-Type" content="<?php echo $MobileJoomla->getContentString(); ?>">
	<title><?php echo $this->error->get('code'); ?> - <?php echo $this->title; ?></title>
	<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
	<meta name="format-detection" content="telephone=no" />
	<meta name="format-detection" content="address=no" />
	<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/system/css/error.css" type="text/css" />
	<?php if($this->direction == 'rtl') : ?>
	<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/error_rtl.css" type="text/css" />
	<?php endif; ?>

<?php echo $this->error->get('code'); ?> - <?php echo $this->error->get('message'); ?>

<?php echo JText::_('You may not be able to visit this page because of:'); ?>

<?php echo JText::_('An out-of-date bookmark/favourite'); ?>

<?php echo JText::_('A search engine that has an out-of-date listing for this site'); ?>

<?php echo JText::_('A mis-typed address'); ?>

<?php echo JText::_('You have no access to this page'); ?>

<?php echo JText::_('The requested resource was not found'); ?>

<?php echo JText::_('An error has occurred while processing your request.'); ?>

<?php echo JText::_('Please try one of the following pages:'); ?>

<a href="<?php echo $this->baseurl; ?>/index.php" title="<?php echo JText::_('Go to the home page'); ?>"><?php echo JText::_('Home Page'); ?>

<?php echo JText::_('If difficulties persist, please contact the system administrator of this site.'); ?>

<?php echo $this->error->get('message'); ?>

				<?php if($this->debug) :
					echo $this->renderBacktrace();
				endif; ?>


text:
**This mod is obsolete and no longer maintained.**

----

**Rotate Toolbar** is a [Stardew Valley](http://stardewvalley.net/) mod that lets you rotate the top
inventory row for the toolbar by pressing `Tab` (configurable):
![](example.gif)

## Contents
* [Install](#install)
* [Configure](#configure)
* [Compatibility](#compatibility)
* [See also](#see-also)

## Install
1. [Install the latest version of SMAPI](https://smapi.io/).
2. [Install this mod from Nexus mods](http://www.nexusmods.com/stardewvalley/mods/1100).
3. Run the game using SMAPI.

## Configure
The mod creates a `config.json` file in its mod folder the first time you run it. You can open that
file in a text editor to configure the mod.

These are the available settings:

setting    | what it affects
---------- | -------------------
`Controls` | The configured controller, keyboard, and mouse buttons (see [key bindings](https://stardewvalleywiki.com/Modding:Key_bindings)). You can separate multiple buttons with commas. The default values are `Tab` to show the next row. Available inputs:

`ShiftToPrevious`: show the previous inventory row.

`ShiftToNext`: show the next inventory row.

## Compatibility
Rotate Toolbar is compatible with Stardew Valley 1.3+ on Linux/Mac/Windows, both single-player and
multiplayer. There are no known issues in multiplayer (even if other players don't have it installed).

## See also
* [Release notes](release-notes.md)
* [Nexus mod](http://www.nexusmods.com/stardewvalley/mods/1100)


text:
define("main",[],
function(){
    function define(clazz) {

    }
    return {
        define : define,
        extend : extend
    };

});


text:
'use strict';

import angular from 'angular';

const HeaderCtrl = function($rootScope, $scope, $state, $window, $document, providerService) {
    $scope.hasAuthProviders = false;
    $scope.showLogout = false;

    $scope.logout = function() {
        providerService.unRegisterProviders()
            .then(function() {
                activate();
                $rootScope.hasAuthProviders = false;
                $state.go('login');
            })
            .catch(function() {
                //Error handling
                $state.go('default.module.application.home');
            });
    };

    $scope.toggleLogout = function() {
        $scope.showLogout = !$scope.showLogout;
    };

    angular.element($window).resize(hideLogout);
    angular.element($document).click(hideLogout);

    function hideLogout(e) {
        if (angular.element(e.target).closest('.login').length > 0) {
            return;
        }
        $scope.showLogout = false;
        $scope.$apply();
    }

    function activate() {
        const watchHandler = $scope.$watch(() => {
            var registratedProviders = providerService.registeredProviders
                .map((providerName) => providerService.dataProviders[providerName]);
            return registratedProviders;
        }, (registeredProviders) => {
            const authProviders = registeredProviders.filter(provider => provider.authenticationModel !== 'Anonymous')
            if (authProviders.length > 0) {
                $scope.hasAuthProviders = true;
                watchHandler();
            }
        }, true);
    }

    activate();
};

HeaderCtrl.$inject = ['$rootScope', '$scope', '$state', '$window', '$document', 'providerService'];

export default HeaderCtrl;


text:
namespace orbit_process_service_internal {

TEST(ProcessList, ProcessList) {
  ProcessList process_list;
  const auto result1 = process_list.Refresh();
  ASSERT_TRUE(result1.has_value()) << result1.error().message();

  const auto process1 = process_list.GetProcessByPid(getpid());
  EXPECT_TRUE(process1.has_value());

  const auto total_cpu_cycles = orbit_process_service::GetCumulativeTotalCpuTime().value();

  // We wait until the stats have been updated
  while (orbit_process_service::GetCumulativeTotalCpuTime().value().jiffies.value ==
         total_cpu_cycles.jiffies.value) {
    // If this loop never ends it will be caught by the automatic timeout feature
    usleep(10'000);
  }

  const auto result2 = process_list.Refresh();
  ASSERT_TRUE(result2.has_value()) << result2.error().message();

  const auto process2 = process_list.GetProcessByPid(getpid());
  EXPECT_TRUE(process2.has_value());
}

}  // namespace orbit_process_service_internal


text:
#ifndef MOVABLE_HPP_A063CBC7_C7FC_470D_901E_620E0D6A2D51
#define MOVABLE_HPP_A063CBC7_C7FC_470D_901E_620E0D6A2D51
#pragma once

/*
movable.hpp

Helper class to set variable to default value after move,
e. g. to use default move ctor/operator=, but skip any custom logic in dtor dependent on this variable

*/
/*
Copyright © 2016 Far Group
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
2. 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.
3. The name of the authors may not be used to endorse or promote products
   derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
*/

#include "preprocessor.hpp"

#include <iterator>

//----------------------------------------------------------------------------

template<typename T, T Default = T{}>
class movable
{
public:
	NONCOPYABLE(movable);

	movable() = default;
	movable(T Value): m_Value(Value){}
	auto& operator=(T Value) { m_Value = Value; return *this; }
	auto& operator+=(T Value) { m_Value += Value; return *this; }
	auto& operator-=(T Value) { m_Value -= Value; return *this; }
	auto& operator++() { ++m_Value; return *this; }
	auto& operator--() { --m_Value; return *this; }

	movable(movable&& rhs) noexcept { *this = std::move(rhs); }
	auto& operator=(movable&& rhs) noexcept { m_Value = std::exchange(rhs.m_Value, Default); return *this; }

	[[nodiscard]]
	bool operator==(T Value) const { return m_Value == Value; }

	[[nodiscard]]
	bool operator<(T Value) const { return m_Value < Value; }

	[[nodiscard]]
	operator T() const { return m_Value; }

private:
	T m_Value{Default};
};

#endif // MOVABLE_HPP_A063CBC7_C7FC_470D_901E_620E0D6A2D51


text:
package net.ujacha.onmyojibot;

import org.junit.Test;

import net.ujacha.onmyojibot.utils.KoreanInitialUtils;

public class KoreanTextTest {

	@Test
	public void test() {

		for(int i = 0; i < 19; i++) {

			char c = (char) (0xac00 + ((28 * 21 * i) + (28 * 0) + 0));

			System.out.format("%c - %c\n", c, KoreanInitialUtils.initialCharacter(c));
		}

		System.out.println(KoreanInitialUtils.initialString("강남스타일"));

		System.out.println(KoreanInitialUtils.initialString("강남 스타일"));

		System.out.println(KoreanInitialUtils.initialString("강남 style"));

	}
}


text:
Requests is written and maintained by Kenneth Reitz and
various contributors:

Development Lead
````````````````

- Kenneth Reitz <me@kennethreitz.org> `@kennethreitz <https://github.com/kennethreitz>`_

Core Contributors
`````````````````

- Cory Benfield <cory@lukasa.co.uk> `@lukasa <https://github.com/lukasa>`_
- Ian Cordasco <graffatcolmingov@gmail.com> `@sigmavirus24 <https://github.com/sigmavirus24>`_

Urllib3
```````

- Andrey Petrov <andrey.petrov@shazow.net>

Patches and Suggestions
```````````````````````

- Various Pocoo Members
- Chris Adams
- Flavio Percoco Premoli
- Dj Gilcrease
- Justin Murphy
- Rob Madole
- Aram Dulyan
- Johannes Gorset
- 村山めがね (Megane Murayama)
- James Rowe
- Daniel Schauenberg
- Zbigniew Siciarz
- Daniele Tricoli 'Eriol'
- Richard Boulton
- Miguel Olivares <miguel@moliware.com>
- Alberto Paro
- Jérémy Bethmont
- 潘旭 (Xu Pan)
- Tamás Gulácsi
- Rubén Abad
- Peter Manser
- Jeremy Selier
- Jens Diemer
- Alex (`@alopatin <https://github.com/alopatin>`_)
- Tom Hogans <tomhsx@gmail.com>
- Armin Ronacher
- Shrikant Sharat Kandula
- Mikko Ohtamaa
- Den Shabalin
- Daniel Miller <danielm@vs-networks.com>
- Alejandro Giacometti
- Rick Mak
- Johan Bergström
- Josselin Jacquard
- Travis N. Vaught
- Fredrik Möllerstrand
- Daniel Hengeveld
- Dan Head
- Bruno Renié
- David Fischer
- Joseph McCullough
- Juergen Brendel
- Juan Riaza
- Ryan Kelly
- Rolando Espinoza La fuente
- Robert Gieseke
- Idan Gazit
- Ed Summers
- Chris Van Horne
- Christopher Davis
- Ori Livneh
- Jason Emerick
- Bryan Helmig
- Jonas Obrist
- Lucian Ursu
- Tom Moertel
- Frank Kumro Jr
- Chase Sterling
- Marty Alchin
- takluyver
- Ben Toews (`@mastahyeti <https://github.com/mastahyeti>`_)
- David Kemp
- Brendon Crawford
- Denis (`@Telofy <https://github.com/Telofy>`_)
- Matt Giuca
- Adam Tauber
- Honza Javorek
- Brendan Maguire <maguire.brendan@gmail.com>
- Chris Dary
- Danver Braganza <danverbraganza@gmail.com>
- Max Countryman
- Nick Chadwick
- Jonathan Drosdeck
- Jiri Machalek
- Steve Pulec
- Michael Kelly
- Michael Newman <newmaniese@gmail.com>
- Jonty Wareing <jonty@jonty.co.uk>
- Shivaram Lingamneni
- Miguel Turner
- Rohan Jain (`@crodjer <https://github.com/crodjer>`_)
- Justin Barber <barber.justin@gmail.com>
- Roman Haritonov (`@reclosedev <https://github.com/reclosedev>`_)
- Josh Imhoff <joshimhoff13@gmail.com>
- Arup Malakar <amalakar@gmail.com>
- Danilo Bargen (`@dbrgn <https://github.com/dbrgn>`_)
- Torsten Landschoff
- Michael Holler (`@apotheos <https://github.com/apotheos>`_)
- Timnit Gebru
- Sarah Gonzalez
- Victoria Mo
- Leila Muhtasib
- Matthias Rahlf <matthias@webding.de>
- Jakub Roztocil <jakub@roztocil.name>
- Rhys Elsmore
- André Graf (`@dergraf <https://github.com/dergraf>`_)
- Stephen Zhuang (`@everbird <https://github.com/everbird>`_)
- Martijn Pieters
- Jonatan Heyman
- David Bonner <dbonner@gmail.com> (`@rascalking <https://github.com/rascalking>`_)
- Vinod Chandru
- Johnny Goodnow <j.goodnow29@gmail.com>
- Denis Ryzhkov <denisr@denisr.com>
- Wilfred Hughes <me@wilfred.me.uk>
- Dmitry Medvinsky <me@dmedvinsky.name>
- Bryce Boe <bbzbryce@gmail.com> (`@bboe <https://github.com/bboe>`_)
- Colin Dunklau <colin.dunklau@gmail.com> (`@cdunklau <https://github.com/cdunklau>`_)
- Bob Carroll <bob.carroll@alum.rit.edu> (`@rcarz <https://github.com/rcarz>`_)
- Hugo Osvaldo Barrera <hugo@osvaldobarrera.com.ar> (`@hobarrera <https://github.com/hobarrera>`_)
- Łukasz Langa <lukasz@langa.pl>
- Dave Shawley <daveshawley@gmail.com>
- James Clarke (`@jam <https://github.com/jam>`_)
- Kevin Burke <kev@inburke.com>
- Flavio Curella
- David Pursehouse <david.pursehouse@gmail.com> (`@dpursehouse <https://github.com/dpursehouse>`_)
- Jon Parise
- Alexander Karpinsky (`@homm86 <https://twitter.com/homm86>`_)
- Marc Schlaich (`@schlamar <https://github.com/schlamar>`_)
- Park Ilsu <daftonshady@gmail.com> (`@daftshady <https://github.com/daftshady>`_)
- Matt Spitz (`@mattspitz <https://github.com/mattspitz>`_)
- Vikram Oberoi (`@voberoi <https://github.com/voberoi>`_)
- Can Ibanoglu <can.ibanoglu@gmail.com> (`@canibanoglu <https://github.com/canibanoglu>`_)
- Thomas Weißschuh <thomas@t-8ch.de> (`@t-8ch <https://github.com/t-8ch>`_)
- Jayson Vantuyl <jayson@aggressive.ly>
- Pengfei.X <pengphy@gmail.com>
- Kamil Madac <kamil.madac@gmail.com>
- Michael Becker <mike@beckerfuffle.com> (`@beckerfuffle <https://twitter.com/beckerfuffle>`_)
- Erik Wickstrom <erik@erikwickstrom.com> (`@erikwickstrom <https://github.com/erikwickstrom>`_)
- Константин Подшумок (`@podshumok <https://github.com/podshumok>`_)
- Ben Bass (`@codedstructure <https://github.com/codedstructure>`_)
- Jonathan Wong <evolutionace@gmail.com> (`@ContinuousFunction <https://github.com/ContinuousFunction>`_)
- Martin Jul (`@mjul <https://github.com/mjul>`_)


text:
package org.apache.atlas.catalog;

import org.apache.atlas.AtlasException;
import org.apache.atlas.catalog.definition.ResourceDefinition;
import org.apache.atlas.catalog.exception.CatalogRuntimeException;
import org.apache.atlas.catalog.exception.ResourceAlreadyExistsException;
import org.apache.atlas.catalog.exception.ResourceNotFoundException;
import org.apache.atlas.services.MetadataService;
import org.apache.atlas.typesystem.ITypedReferenceableInstance;
import org.apache.atlas.typesystem.Referenceable;
import org.apache.atlas.typesystem.Struct;
import org.apache.atlas.typesystem.exception.EntityExistsException;
import org.apache.atlas.typesystem.exception.EntityNotFoundException;
import org.apache.atlas.typesystem.exception.TraitNotFoundException;
import org.apache.atlas.typesystem.exception.TypeExistsException;
import org.apache.atlas.typesystem.json.TypesSerialization;
import org.apache.atlas.typesystem.types.*;

import java.util.Collection;
import java.util.Collections;
import java.util.Map;

/**
 * Default implementation.
 */
public class DefaultTypeSystem implements AtlasTypeSystem {
    private final MetadataService metadataService;

    /**
     * Constructor.
     *
     * @param metadataService  atlas metadata service
     */
    public DefaultTypeSystem(MetadataService metadataService) {
        this.metadataService = metadataService;
    }

    @Override
    public void createEntity(ResourceDefinition definition, Request request) throws ResourceAlreadyExistsException {
        String typeName = definition.getTypeName();
        try {
            createClassType(definition, typeName, typeName + " Definition");
        } catch (ResourceAlreadyExistsException e) {
            // ok if type already exists
        }
        try {
            Referenceable entity = new Referenceable(typeName, request.getQueryProperties());
            ITypedReferenceableInstance typedInstance = metadataService.getTypedReferenceableInstance(entity);
            metadataService.createEntities(Collections.singletonList(typedInstance).toArray(new ITypedReferenceableInstance[1]));
        } catch (EntityExistsException e) {
            throw new ResourceAlreadyExistsException(
                    "Attempted to create an entity which already exists: " + request.getQueryProperties());
        } catch (AtlasException e) {
            throw new CatalogRuntimeException("An expected exception occurred creating an entity: " + e, e);
        }
    }

    @Override
    public void deleteEntity(ResourceDefinition definition, Request request) throws ResourceNotFoundException {
        String typeName = definition.getTypeName();
        String cleanIdPropName = definition.getIdPropertyName();
        String idValue = request.getProperty(cleanIdPropName);
        try {
            // transaction handled by atlas repository
            metadataService.deleteEntityByUniqueAttribute(typeName, cleanIdPropName, idValue);
        } catch (EntityNotFoundException e) {
            throw new ResourceNotFoundException(String.format("The specified entity doesn't exist: type=%s, %s=%s",
                    typeName, cleanIdPropName, idValue));
        } catch (AtlasException e) {
            throw new CatalogRuntimeException(String.format(
                    "An unexpected error occurred while attempting to delete entity: type=%s, %s=%s : %s",
                    typeName, cleanIdPropName, idValue, e), e);
        }
    }

    @Override
    public void createClassType(ResourceDefinition resourceDefinition, String name, String description)
            throws ResourceAlreadyExistsException {

        createType(resourceDefinition.getPropertyDefinitions(), ClassType.class, name, description, false);
    }

    @Override
    public void createTraitType(ResourceDefinition resourceDefinition, String name, String description)
            throws ResourceAlreadyExistsException {

        createType(resourceDefinition.getPropertyDefinitions(), TraitType.class, name, description, true);
    }

    @Override
    public void createTraitInstance(String guid, String typeName, Map<String, Object> properties)
            throws ResourceAlreadyExistsException {

        try {
            // not using the constructor with properties argument because it is marked 'InterfaceAudience.Private'
            Struct struct = new Struct(typeName);
            for (Map.Entry<String, Object> propEntry : properties.entrySet()) {
                struct.set(propEntry.getKey(), propEntry.getValue());
            }
            metadataService.addTrait(guid, metadataService.createTraitInstance(struct));
        } catch (IllegalArgumentException e) {
            //todo: unfortunately, IllegalArgumentException can be thrown for other reasons
            if (e.getMessage().contains("is already defined for entity")) {
                throw new ResourceAlreadyExistsException(
                        String.format("Tag '%s' already associated with the entity", typeName));
            } else {
                throw e;
            }
        } catch (AtlasException e) {
            throw new CatalogRuntimeException(String.format(
                    "Unable to create trait instance '%s' in type system: %s", typeName, e), e);
        }
    }

    @Override
    public void deleteTag(String guid, String traitName) throws ResourceNotFoundException {
        try {
            metadataService.deleteTrait(guid, traitName);
        } catch (TraitNotFoundException e) {
            throw new ResourceNotFoundException(String.format(
                    "The trait '%s' doesn't exist for entity '%s'", traitName, guid));
        } catch (AtlasException e) {
            throw new CatalogRuntimeException(String.format(
                    "Unable to delete tag '%s' from entity '%s'", traitName, guid), e);
        }
    }

    private <T extends HierarchicalType> void createType(Collection<AttributeDefinition> attributes,
                                                         Class<T> type,
                                                         String name,
                                                         String description,
                                                         boolean isTrait)
                                                         throws ResourceAlreadyExistsException {

        try {
            HierarchicalTypeDefinition<T> definition = new HierarchicalTypeDefinition<>(type, name, description, null,
                    attributes.toArray(new AttributeDefinition[attributes.size()]));

            metadataService.createType(TypesSerialization.toJson(definition, isTrait));
        } catch (TypeExistsException e) {
            throw new ResourceAlreadyExistsException(String.format("Type '%s' already exists", name));
        } catch (AtlasException e) {
            throw new CatalogRuntimeException(String.format(
                    "Unable to create type '%s' in type system: %s", name, e), e);
        }
    }
}


text: Tu aimes les courgettes fdp ? Développe ton empire de légumes spatiaux.


text:
<?php
include __DIR__ . '/../vendor/autoload.php';

use FsWatcher\Watcher;
use Sh\Sh;

$directoryToWatch = './';
$sh = new Sh();

$watcher = Watcher::factory($directoryToWatch);
$watcher->registerExtensionToWatch('php');

$watcher->onSave(function ($file) use ($sh) {
    echo $sh->php("-l {$file}");
    echo "\n";
});

$watcher->onDelete(function ($file) {
    echo "DELETED: {$file}\n";
});

$watcher->onCreate(function ($file) {
    echo "CREATED: {$file}\n";
});

$watcher->start();


text:
#ifndef __vgVideoScrubber_h
#define __vgVideoScrubber_h

#include <QWidget>

#include <qtGlobal.h>

#include <vgExport.h>

#include <vgNamespace.h>
#include <vgTimeStamp.h>

class vgVideoScrubberPrivate;

class QTVG_WIDGETS_EXPORT vgVideoScrubber : public QWidget
{
  Q_OBJECT

  Q_PROPERTY(vgTimeStamp minimum READ minimum WRITE setMinimum)
  Q_PROPERTY(vgTimeStamp maximum READ maximum WRITE setMaximum)
  Q_PROPERTY(vgTimeStamp singleStep READ singleStep WRITE setSingleStep)
  Q_PROPERTY(vgTimeStamp wheelStep READ wheelStep WRITE setWheelStep)
  Q_PROPERTY(vgTimeStamp pageStep READ pageStep WRITE setPageStep)
  Q_PROPERTY(vgTimeStamp value READ value WRITE setValue NOTIFY valueChanged
                               USER true)

public:
  explicit vgVideoScrubber(QWidget* parent = 0);
  virtual ~vgVideoScrubber();

  vgTimeStamp minimum() const;
  vgTimeStamp maximum() const;

  vgTimeStamp singleStep() const;
  vgTimeStamp wheelStep() const;
  vgTimeStamp pageStep() const;

  vgTimeStamp value() const;

  bool isRangeEmpty() const;

signals:
  void valueChanged(vgTimeStamp, vg::SeekMode);
  void rangeChanged(vgTimeStamp min, vgTimeStamp max);

public slots:
  void setMinimum(vgTimeStamp);
  void setMaximum(vgTimeStamp);
  void setRange(vgTimeStamp min, vgTimeStamp max);

  void setSingleStep(vgTimeStamp);
  void setWheelStep(vgTimeStamp);
  void setPageStep(vgTimeStamp);

  void setValue(vgTimeStamp, vg::SeekMode = vg::SeekExact);

protected slots:
  void setDirectionFromSliderAction(int action);
  void updateValue();

protected:
  QTE_DECLARE_PRIVATE_RPTR(vgVideoScrubber)

  virtual void resizeEvent(QResizeEvent*);
  virtual void wheelEvent(QWheelEvent*);

private:
  QTE_DECLARE_PRIVATE(vgVideoScrubber)
  Q_DISABLE_COPY(vgVideoScrubber)
};

#endif


text:
<?php /* Smarty version Smarty-3.1.18, created on 2014-10-23 19:19:25
         compiled from "/srv/www/server.com/public_html/design/backend/templates/views/block_manager/components/update_layout.tpl" */ ?>
<?php /*%%SmartyHeaderCode:57882379754491c7dbe85a0-60826593%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' =>
  array (
    '97ce617114fa8f392da05193efbe215a4bde51e8' =>
    array (
      0 => '/srv/www/server.com/public_html/design/backend/templates/views/block_manager/components/update_layout.tpl',
      1 => 1409124627,
      2 => 'tygh',
    ),
  ),
  'nocache_hash' => '57882379754491c7dbe85a0-60826593',
  'function' =>
  array (
  ),
  'variables' =>
  array (
    'layout_data' => 0,
    'id' => 0,
    'all_layouts' => 0,
    'layout' => 0,
    'themes' => 0,
    'theme_manifest' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.18',
  'unifunc' => 'content_54491c7dcff439_66866061',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_54491c7dcff439_66866061')) {function content_54491c7dcff439_66866061($_smarty_tpl) {?><?php
fn_preload_lang_vars(array('block_manager.error_changing_layout_in_css_mode','general','name','copy_from_layout','default','block_manager.grid_columns','block_manager.layout_width','block_manager.fixed_layout','block_manager.fluid_layout','block_manager.full_width_layout','block_manager.min_width','block_manager.max_width','delete'));
?>
<?php if ($_smarty_tpl->tpl_vars['layout_data']->value) {?>
    <?php $_smarty_tpl->tpl_vars['id'] = new Smarty_variable($_smarty_tpl->tpl_vars['layout_data']->value['layout_id'], null, 0);?>
<?php } else { ?>
    <?php $_smarty_tpl->tpl_vars['id'] = new Smarty_variable(0, null, 0);?>
<?php }?>

<form action="<?php echo htmlspecialchars(fn_url(''), ENT_QUOTES, 'UTF-8');?>
" method="post" name="update_layout_form" class="form-horizontal form-edit ">
<input type="hidden" name="layout_id" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');?>
">

            <li id="tab_update_layout_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');?>
" class="cm-js active"><?php echo $_smarty_tpl->__("general");?>

    <div class="cm-tabs-content" id="content_tab_update_layout_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');?>
">
    <fieldset>

            <label class="control-label cm-required" for="elm_layout_name_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');?>
"><?php echo $_smarty_tpl->__("name");?>

                <input type="text" id="elm_layout_name_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');?>
" name="layout_data[name]" value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['layout_data']->value['name'], ENT_QUOTES, 'UTF-8');?>
" />

        <?php if (!$_smarty_tpl->tpl_vars['id']->value) {?>

            <label class="control-label cm-required" for="elm_layout_copy_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');?>
"><?php echo $_smarty_tpl->__("copy_from_layout");?>

                <select name="layout_data[from_layout_id]" id="elm_layout_copy_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');?>
">
                    <option value="0">--</option>
                    <?php  $_smarty_tpl->tpl_vars["layout"] = new Smarty_Variable; $_smarty_tpl->tpl_vars["layout"]->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['all_layouts']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars["layout"]->key => $_smarty_tpl->tpl_vars["layout"]->value) {
$_smarty_tpl->tpl_vars["layout"]->_loop = true;
?>
                    <option value="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['layout']->value['layout_id'], ENT_QUOTES, 'UTF-8');?>
"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['themes']->value['installed'][$_smarty_tpl->tpl_vars['layout']->value['theme_name']]['title'], ENT_QUOTES, 'UTF-8');?>
: <?php echo htmlspecialchars($_smarty_tpl->tpl_vars['layout']->value['name'], ENT_QUOTES, 'UTF-8');?>
</option>
                    <?php } ?>
                </select>

        <?php }?>

            <label class="control-label" for="elm_layout_is_default_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');?>
"><?php echo $_smarty_tpl->__("default");?>

                <input type="checkbox" id="elm_layout_is_default_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');?>
" name="layout_data[is_default]" value="1" <?php if ($_smarty_tpl->tpl_vars['layout_data']->value['is_default']) {?>checked="checked" disabled="disabled"<?php }?> />

            <label class="control-label" for="elm_layout_width_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');?>
"><?php echo $_smarty_tpl->__("block_manager.grid_columns");?>

                <select name="layout_data[width]" id="elm_layout_width_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');?>
">
                    <option value="12" <?php if ($_smarty_tpl->tpl_vars['layout_data']->value['width']=="12") {?>selected="selected"<?php }?>>12</option>
                    <option value="16" <?php if ($_smarty_tpl->tpl_vars['layout_data']->value['width']=="16"||!$_smarty_tpl->tpl_vars['layout_data']->value['width']) {?>selected="selected"<?php }?>>16</option>
                </select>

            <label class="control-label" for="elm_layout_width_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');?>
"><?php echo $_smarty_tpl->__("block_manager.layout_width");?>

                <select name="layout_data[layout_width]" id="elm_layout_type_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');?>
">
                    <option value="fixed" <?php if ($_smarty_tpl->tpl_vars['layout_data']->value['layout_width']=="fixed") {?>selected="selected"<?php }?>><?php echo $_smarty_tpl->__("block_manager.fixed_layout");?>
</option>
                    <option value="fluid" <?php if ($_smarty_tpl->tpl_vars['layout_data']->value['layout_width']=="fluid") {?>selected="selected"<?php }?> ><?php echo $_smarty_tpl->__("block_manager.fluid_layout");?>
</option>
                    <option value="full_width" <?php if ($_smarty_tpl->tpl_vars['layout_data']->value['layout_width']=="full_width") {?>selected="selected"<?php }?>><?php echo $_smarty_tpl->__("block_manager.full_width_layout");?>
</option>
                </select>

        <div id="fluid_layout_settings_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');?>
" <?php if ($_smarty_tpl->tpl_vars['layout_data']->value['layout_width']!="fluid") {?>class="hidden"<?php }?>>

                <label class="control-label" for="elm_min_width_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');?>
"><?php echo $_smarty_tpl->__("block_manager.min_width");?>

                    <input type="text" id="elm_min_width_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');?>
" name="layout_data[min_width]" value="<?php echo htmlspecialchars((($tmp = @$_smarty_tpl->tpl_vars['layout_data']->value['min_width'])===null||$tmp==='' ? 760 : $tmp), ENT_QUOTES, 'UTF-8');?>
" />

                <label class="control-label" for="elm_max_width_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');?>
"><?php echo $_smarty_tpl->__("block_manager.max_width");?>

                    <input type="text" id="elm_max_width_<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['id']->value, ENT_QUOTES, 'UTF-8');?>
" name="layout_data[max_width]" value="<?php echo htmlspecialchars((($tmp = @$_smarty_tpl->tpl_vars['layout_data']->value['max_width'])===null||$tmp==='' ? 960 : $tmp), ENT_QUOTES, 'UTF-8');?>
" />

    </fieldset>

    <?php if ($_smarty_tpl->tpl_vars['id']->value&&!$_smarty_tpl->tpl_vars['layout_data']->value['is_default']) {?>
        <a href="<?php echo htmlspecialchars(fn_url("block_manager.delete_layout?layout_id=".((string)$_smarty_tpl->tpl_vars['layout_data']->value['layout_id'])), ENT_QUOTES, 'UTF-8');?>
" class="cm-confirm pull-left btn cm-tooltip" title="<?php echo $_smarty_tpl->__("delete");?>
">
    <?php }?>
    <?php echo $_smarty_tpl->getSubTemplate ("buttons/save_cancel.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('but_name'=>"dispatch[block_manager.update_layout]",'cancel_action'=>"close",'save'=>$_smarty_tpl->tpl_vars['id']->value), 0);?>

</form>
<?php }} ?>


text:
package io.github.mzmine.modules.io.import_rawdata_mzml.msdk.util;

import io.github.msdk.MSDKRuntimeException;
import java.util.ArrayDeque;
import javolution.text.CharArray;

/**
 * This class is not thread safe. If more than one thread attempts to use {@link #enter(CharArray)}
 * or {@link #exit(CharArray)} methods, the behavior is undefined.
 */
public class TagTracker {

  private ArrayDeque<CharArray> stack;
  private ArrayDeque<CharArray> pool;
  /** Constant DEFAULT_CHAR_ARR_SIZE=64 */
  protected final static int DEFAULT_CHAR_ARR_SIZE = 64;

  /**
   * If the stack grows larger than this value, something is likely not OK. Will throw an exception
   * in such a case.
   */
  private int maxDepth;
  /** Constant DEFAULT_MAX_DEPTH=128 */
  protected static final int DEFAULT_MAX_DEPTH = 128;

  /**
   *
Constructor for TagTracker.

   *
   * @param maxDepth a int.
   */
  public TagTracker(int maxDepth) {
    this.maxDepth = maxDepth;
    stack = new ArrayDeque<>();
    pool = new ArrayDeque<>();
  }

  /**
   * Creates a tracker with default max depth {@link #DEFAULT_MAX_DEPTH}.
   */
  public TagTracker() {
    this(DEFAULT_MAX_DEPTH);
  }

  /**
   *
enter.

   *
   * @param tag a {@link CharArray} object.
   */
  public void enter(CharArray tag) {
    final CharArray arr = borrowArr(tag.length());
    copyContent(tag, arr);
    stack.push(arr);
    if (stack.size() > maxDepth)
      throw new IllegalStateException("Max stack depth [" + maxDepth + "] exceeded");
  }

  /**
   *
exit.

   *
   * @param tag a {@link CharArray} object.
   */
  public void exit(CharArray tag) {
    final CharArray top = stack.peek();
    if (top == null) {
      throw new MSDKRuntimeException("Stack exit called when the stack was empty.");
    }
    if (!top.equals(tag)) {
      throw (new MSDKRuntimeException(
          "Cannot exit tag '" + tag + "'. Last tag entered was '" + top + "'"));
    }
    returnArr(stack.pop());
  }

  /**
   *
inside.

   *
   * @param tag a {@link CharSequence} object.
   * @return a boolean.
   */
  public boolean inside(CharSequence tag) {
    if (tag == null)
      return false;
    for (CharArray aStack : stack) {
      if (aStack.contentEquals(tag)) {
        return true;
      }
    }
    return false;
  }

  /**
   *
current.

   *
   * @return a {@link CharArray} object.
   */
  public CharArray current() {
    final CharArray top = stack.peek();
    if (top == null)
      return new CharArray("");
    return top;
  }

  private CharArray createArr(int capacity) {
    return new CharArray(capacity);
  }

  private CharArray borrowArr(int capacity) {
    if (pool.isEmpty())
      return createArr(capacity);
    final CharArray c = pool.pop();
    if (c.array().length < capacity) {
      c.setArray(new char[capacity], 0, 0);
    }
    return c;
  }

  /**
   * Copy content from c1 to c2. If c2's buffer is not big enough, it will be reassigned.
   *
   * @param c1 Copy from.
   * @param c2 Copy to. Potentially increasing the buffer size and erasing all previous content.
   */
  private void copyContent(final CharArray c1, CharArray c2) {
    final char[] a1 = c1.array();
    final char[] a2 = c2.array().length >= c1.length() ? c2.array() : new char[c1.length()];
    for (int i = 0; i < c1.length(); i++) {
      a2[i] = a1[c1.offset() + i];
    }
    c2.setArray(a2, 0, c1.length());
  }

  private void returnArr(CharArray arr) {
    pool.push(arr);
  }

}


text:
<?php
/**
 * Created by PhpStorm.
 * User: icqparty
 * Date: 22.10.14
 * Time: 23:37
 */

namespace Application\Form;

use Zend\Form\Form;
use Zend\InputFilter\InputFilterProviderInterface;
use Zend\ServiceManager\ServiceLocatorAwareInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use Zend\Validator\EmailAddress;
use Zend\Validator\NotEmpty;

class NotificationForm extends Form implements InputFilterProviderInterface, ServiceLocatorAwareInterface
{
    protected $serviceLocator;

    public function init()
    {
        $this->setAttribute('method', 'post');
        $this->setAttribute('class', 'notification_form');
        $this->setAttribute('id', 'notification_form');

        $this->add(array(
            'name' => 'smtp_host',
            'type' => 'text',
            'options' => array(
                'label' => 'SMTP Server',
            ),
            'attributes' => array(
                'placeholder' => 'smtp.example.com...',
                'class' => "form-control"
            ),
        ));

        $this->add(array(
            'name' => 'smtp_port',
            'type' => 'text',
            'options' => array(
                'label' => 'SMTP Port',
            ),
            'attributes' => array(
                'placeholder' => 'port...',
                'class' => "form-control"
            ),
        ));
        $this->add(array(
            'name' => 'smtp_username',
            'type' => 'text',
            'options' => array(
                'label' => 'SMTP Username',
            ),
            'attributes' => array(
                'placeholder' => 'username...',
                'class' => "form-control"
            ),
        ));
        $this->add(array(
            'name' => 'smtp_password',
            'type' => 'password',
            'options' => array(
                'label' => 'SMTP Password',
            ),
            'attributes' => array(
                'placeholder' => 'password...',
                'class' => "form-control"
            ),
        ));

        $this->add(array(
            'name' => 'smtp_email',
            'type' => 'text',
            'options' => array(
                'label' => 'From Email Address',
            ),
            'attributes' => array(
                'placeholder' => 'email...',
                'class' => "form-control"
            ),
        ));
        $this->add(array(
            'name' => 'smtp_crypt',
            'type' => 'checkbox',
            'options' => array(
                'label' => 'Email crypt',
                'use_hidden_element' => false,
                'checked_value' => 1,
                'unchecked_value' => 0,
            )
        ));

        $this->add(array(
            'name' => 'submit',
            'attributes' => array(
                'type' => 'submit',
                'value' => 'Сохранить',
                'class' => 'complite-btn'
            ),
        ));
    }

    public function getInputFilterSpecification()
    {
        return array(
            'smtp_host' => array(
                'required' => true,
            ),
            'smtp_port' => array(
                'required' => true,
            ),
            'smtp_username' => array(
                'required' => true,
            ),
            'smtp_password' => array(
                'required' => true,
            ),
            'smtp_email' => array(
                'required' => true,
                'filters' => array(
                    array('name' => 'StripTags'),
                    array('name' => 'StringTrim'),
                    array('name' => 'StringToLower')
                ),
                'validators' => array(
                    array(
                        'name' => 'NotEmpty',
                        'options' => array(
                            'messages' => array(
                                NotEmpty::IS_EMPTY => 'Не указан элетронный адрес'
                            ),
                        ),
                        'break_chain_on_failure' => true
                    ),
                    array(
                        'name' => 'EmailAddress',
                        'options' => array(
                            'messages' => array(
                                EmailAddress::INVALID_FORMAT => 'Проверте правельность электронного адреса'
                            )
                        ),
                        'break_chain_on_failure' => true
                    ),
                )
            ),
            'smtp_crypt' => array(
                'required' => false,
            ),
        );
    }

    public function getServiceLocator()
    {
        return $this->serviceLocator;
    }

    public function setServiceLocator(ServiceLocatorInterface $sl)
    {
        $this->serviceLocator = $sl;
    }
}


text:
.class public interface abstract Lcom/android/internal/widget/WaveView$OnTriggerListener;
.super Ljava/lang/Object;
.source "WaveView.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/android/internal/widget/WaveView;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x609
    name = "OnTriggerListener"
.end annotation

# static fields
.field public static final CENTER_HANDLE:I = 0xa

.field public static final NO_HANDLE:I

# virtual methods
.method public abstract onGrabbedStateChange(Landroid/view/View;I)V
.end method

.method public abstract onTrigger(Landroid/view/View;I)V
.end method


text:
{extend name="default/template/base_index" /}

{block name="area_header"}
    <link rel="stylesheet" type="text/css" media="all" href="__CDN__/jquery-datetimepicker/jquery.datetimepicker.css">

	<link rel="stylesheet" type="text/css" href="__CDN__/comp/wxuploader.css" />
	<link type="text/css" rel="stylesheet" href="__CDN__/jquery-uploadify/3.2.1/uploadify.css" />

{/block}

{block name="area_body"}
	{include file="default/Widget/topbar" /}

		{include file="default/Widget/left" /}

			{include file="default/Widget/breadcrumb" /}

			<form class="form-horizontal well validateForm">
				<fieldset>
					<legend>{$type} - Banners添加</legend>

						图片标题
(可选)

							<input type="text" class="required form-control input-short" name="title" id="title" placeholder="图片标识,以示区别">

(图片标识,以示区别)

					<input type="hidden" name="position" value="{$type}">

						图片地址

							<input type="hidden" class="" name="img" id="img" placeholder="图片地址">

(上传图片,尺寸:640像素*200像素)

              链接类型

                  <select name="url_type" class="form-control  input-normal" >
					{:w_datatree(getDatatree('BANNERS_URL_TYPE'),true,$type)}
				  </select>

						跳转链接
(可选)

							<input name="url" class="form-control input-normal" type="text" />

(点击图片跳转链接,完整的链接地址)

						图片描述
(可选)

							<input type="text" name="notes" class="form-control input-normal" />

(图片描述:attr,40字以内)

					    排序
(可选)

					        <input name="sort" class="form-control input-short" type="text" value="1" />

(图片排序序号)

							保存

								返回

				</fieldset>
			</form>

			{include file="default/template/wxpicture" /}

{/block}

{block name="area_footer"}

{/block}


text:
#pragma once
#include <string>
#include <map>
#include <vector>
#include <istream>
#include "LibChemist/SetOfAtoms.hpp"

/** \file This file contains the machinery for parsing a string representation
 *  of a set of atoms.
 *
 * Unfortunately, like basis sets, there are a plethora of formats for
 * representing collections of atoms.  We again break the parsing into two
 * phases an examination of the line, and a data obtaining phase.  For the
 * former phase we have the following actions:
 * - none: the line is not worth parsing
 * - new_atom: the line contains information for a new atom
 * - same_atom: the line contains information for the current atom
 * - overall_system: the line contains information for the overall system
 *
 * If your parser signals the line is worth parsing you will be given the line
 * again and this time you will need to return the data the line contains. The
 * choices at the moment are:
 * - AtNum: the atomic number of the atom
 * - x: the x-coordinate of the atom (you are expected to ensure it is in a.u.
 * - y: same as x except for the y-coordinate
 * - z: same as x and y except for the z-coordinate
 * - charge: the overall system charge
 * - multiplicity: the overall system multiplicity
 *
 * \TODO The following data pieces will be needed eventually, but have not been
 * coded up:
 * - q: the charge of a point charge
 * - point: a dummy atom
 * - ghost: a ghost atom
 * - UCSides: the sides of the unit cell
 * - UCAngles: the angles of the unit cell
 * - SpaceGroup: which space group the unit cell belongs to.
 */

namespace LibChemist {

/** \brief This class abstracts away the layout of a string representation of a
 *  SetOfAtoms.
 *
 *  This is the base class for all classes specifying the layout of a
 *  SetOfAtoms file.
 */
struct SetOfAtomsFileParser
{
    enum class action_type{none,new_atom,same_atom,overall_system};
    enum class data_type{AtNum,x,y,z,charge,multiplicity};
    virtual action_type worth_parsing(const std::string& line)const=0;
    virtual std::map<data_type,std::vector<double>>
    parse(const std::string& line)const=0;
};

/** \brief This class implements a SetOfAtomsParser for the xyz format.
 *
 */
struct XYZParser: public SetOfAtomsFileParser
{
    action_type worth_parsing(const std::string& line)const override;
    std::map<data_type, std::vector<double> >
    parse(const std::string& line)const override;
};

/** \brief The function to call to parse a SetOfAtomsFile.
 *
 * \param[in] is An input stream containing a string representation of a
 *               SetOfAtoms instance in a format the parser understands.
 * \param[in] parser The parser to be used to parse the input stream.
 * \returns The SetOfAtoms instance represented in the input stream.
 *
 */
SetOfAtoms parse_SetOfAtoms_file(std::istream& is,
                                 const SetOfAtomsFileParser& parser);

}//End namespace