text:
package com.example.app.activity;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;

import com.example.app.R;
import com.example.app.fragment.BaseFragment;
import com.example.app.test.ChaineIntent;

public class MainActivity extends BaseActivity {
    private final MainActivity self = this;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.ac_main);

        $initialize();

        if (savedInstanceState == null) {
            getSupportFragmentManager().beginTransaction()
                    .add(R.id.container, new PlaceholderFragment())
                    .commit();
        }
    }

    @Override
    protected void $initialize() {
    }

    public boolean onCreateOptionsMenu(Menu menu) {

        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        int id = item.getItemId();
        if (id == R.id.action_settings) {
            return true;
        }
        return super.onOptionsItemSelected(item);

    }

    /**
     * A placeholder fragment containing a simple view.
     */
    public static class PlaceholderFragment extends BaseFragment {

        public ChaineIntent ci;

        public PlaceholderFragment() {
        }

        @Override
        public View onCreateView(LayoutInflater inflater, ViewGroup container,
                                 Bundle savedInstanceState) {
            View rootView = inflater.inflate(R.layout.fr_main, container, false);
            ci = new ChaineIntent(getActivity());
            return rootView;
        }

        @Override
        public void onActivityCreated(Bundle savedInstanceState) {
            super.onActivityCreated(savedInstanceState);
            aq.id(R.id.button).clicked(this, "click");
        }

        public void click() {
            ci.move(Sample.class).finish().moveActivity();
        }
    }

}

redpajama_set_name: RedPajamaGithub


text:
package com.amazonaws.services.stepfunctions.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 *
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class StateExitedEventDetails implements Serializable, Cloneable, StructuredPojo {

    /**
     *

     * The name of the state.
     *

     */
    private String name;
    /**
     *

     * The JSON output data of the state.
     *

     */
    private String output;

    /**
     *

     * The name of the state.
     *

     *
     * @param name
     *        The name of the state.
     */

    public void setName(String name) {
        this.name = name;
    }

    /**
     *

     * The name of the state.
     *

     *
     * @return The name of the state.
     */

    public String getName() {
        return this.name;
    }

    /**
     *

     * The name of the state.
     *

     *
     * @param name
     *        The name of the state.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public StateExitedEventDetails withName(String name) {
        setName(name);
        return this;
    }

    /**
     *

     * The JSON output data of the state.
     *

     *
     * @param output
     *        The JSON output data of the state.
     */

    public void setOutput(String output) {
        this.output = output;
    }

    /**
     *

     * The JSON output data of the state.
     *

     *
     * @return The JSON output data of the state.
     */

    public String getOutput() {
        return this.output;
    }

    /**
     *

     * The JSON output data of the state.
     *

     *
     * @param output
     *        The JSON output data of the state.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public StateExitedEventDetails withOutput(String output) {
        setOutput(output);
        return this;
    }

    /**
     * Returns a string representation of this object; useful for testing and debugging.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getName() != null)
            sb.append("Name: ").append(getName()).append(",");
        if (getOutput() != null)
            sb.append("Output: ").append(getOutput());
        sb.append("}");
        return sb.toString();
    }

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

        if (obj instanceof StateExitedEventDetails == false)
            return false;
        StateExitedEventDetails other = (StateExitedEventDetails) obj;
        if (other.getName() == null ^ this.getName() == null)
            return false;
        if (other.getName() != null && other.getName().equals(this.getName()) == false)
            return false;
        if (other.getOutput() == null ^ this.getOutput() == null)
            return false;
        if (other.getOutput() != null && other.getOutput().equals(this.getOutput()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
        hashCode = prime * hashCode + ((getOutput() == null) ? 0 : getOutput().hashCode());
        return hashCode;
    }

    @Override
    public StateExitedEventDetails clone() {
        try {
            return (StateExitedEventDetails) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
        }
    }

    @com.amazonaws.annotation.SdkInternalApi
    @Override
    public void marshall(ProtocolMarshaller protocolMarshaller) {
        com.amazonaws.services.stepfunctions.model.transform.StateExitedEventDetailsMarshaller.getInstance().marshall(this, protocolMarshaller);
    }
}


text:
cask 'plex-media-player' do
  version '2.39.0.1005-1b0839a8'
  sha256 'e689395495ac5a05c25f2864aa7ac498a5aecbf47c0c93f4c8d8f2926d5d7cf0'

  url "https://downloads.plex.tv/plexmediaplayer/#{version}/PlexMediaPlayer-#{version}-macosx-x86_64.zip"
  appcast 'https://plex.tv/api/downloads/3.json'
  name 'Plex Media Player'
  homepage 'https://www.plex.tv/'

  auto_updates true
  depends_on macos: '>= :yosemite'

  app 'Plex Media Player.app'

  zap trash: [
               '~/Library/Application Support/Plex Media Player',
               '~/Library/Caches/Plex Media Player',
               '~/Library/Logs/Plex Media Player',
               '~/Library/Preferences/tv.plex.Plex Media Player.plist',
             ]
end


text:
/* tslint:disable:no-unused-variable */

import { TestBed, async } from '@angular/core/testing';
import { OrderTableComponent } from './order-table.component';

describe('Component: OrderTable', () => {
  it('should create an instance', () => {
    let component = new OrderTableComponent();
    expect(component).toBeTruthy();
  });
});


text:
<?php
declare(strict_types=1);

namespace Cocoon\Exception;

use LogicException;

/**
 * Exception thrown when a reserved variable name is added to a view,
 * such as "content" which is reserved for emmbedding a template into another template.
 */
class ReservedTermException extends LogicException
{
}


text:
package org.jboss.aerogear.unifiedpush.api;

import org.codehaus.jackson.annotate.JsonIgnore;

import javax.validation.constraints.NotNull;

/**
 * Contains metadata about a variant, of the push message request, such as successful delivery to the push network
 * or involved client devices.
 */
public class VariantMetricInformation extends BaseModel {

    @NotNull
    private String variantID;
    private long receivers;
    private Boolean deliveryStatus = Boolean.FALSE;
    private String reason;
    private long variantOpenCounter;

    @JsonIgnore
    private PushMessageInformation pushMessageInformation;

    public VariantMetricInformation() {
    }

    /**
     * The ID of the involved variant
     *
     * @return variant ID
     */
    public String getVariantID() {
        return variantID;
    }

    public void setVariantID(String variantID) {
        this.variantID = variantID;
    }

    /**
     * Number of receivers for this variant that were found for the submitted push request
     *
     * @return number of receivers
     */
    public long getReceivers() {
        return receivers;
    }

    public void setReceivers(long receivers) {
        this.receivers = receivers;
    }

    /**
     * Indicator if the request to the actual push network, for the related variant, was successful or not.
     *
     * @return status of the delivery
     */
    public Boolean getDeliveryStatus() {
        return deliveryStatus;
    }

    public void setDeliveryStatus(Boolean deliveryStatus) {
        this.deliveryStatus = deliveryStatus;
    }

    /**
     * In case of an error (deliveryStatus:false), there is most likely a reason which may give some more insights.
     *
     * @return error details
     */
    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public PushMessageInformation getPushMessageInformation() {
        return pushMessageInformation;
    }

    public void setPushMessageInformation(PushMessageInformation pushMessageInformation) {
        this.pushMessageInformation = pushMessageInformation;
    }

    /**
     * To track how many time this variant has been opened after a Push Notification
     *
     * @return long , the times this variant has been opened after a Push Notification
     */
    public long getVariantOpenCounter() {
        return variantOpenCounter;
    }

    public void setVariantOpenCounter(long variantOpenCounter) {
        this.variantOpenCounter = variantOpenCounter;
    }

    public void incrementVariantOpenCounter() {
        this.setVariantOpenCounter(this.getVariantOpenCounter() + 1);
    }
}


text:
<?php

namespace Phorm\Builder;

use Phorm\Element\Content;

/**
 * Class OptionBuilder
 *
 * @package Phorm\Builder
 * @author  Bo Thinggaard <bo@unpossiblesystems.com>
 */
class OptionBuilder extends ContentBuilder {
	/**
	 * Set disabled.
	 *
	 * @param string $value
	 *
	 * @return $this
	 */
	public function disabled($value) {
		return $this->setAttribute('disabled', $value);
	}

	/**
	 * Set label.
	 *
	 * @param string $value
	 *
	 * @return $this
	 */
	public function label($value) {
		return $this->setAttribute('label', $value);
	}

	/**
	 * Set selected.
	 *
	 * @param string $value
	 *
	 * @return $this
	 */
	public function selected($value) {
		return $this->setAttribute('selected', $value);
	}

	/**
	 * Set value.
	 *
	 * @param string $value
	 *
	 * @return $this
	 */
	public function value($value) {
		return $this->setAttribute('value', $value);
	}

	/**
	 * Build element.
	 *
	 * @param Content $element
	 *
	 * @return Content
	 */
	public function build(Content $element = null) {
		return $this
			->buildInternal($element ? $element : new Content())
			->setElementType('option');
	}
}


text:
<!doctype html>

        <title>TabScheduler Popup</title>
        <link rel="stylesheet" type="text/css" href="/css/popup.css">
        <link rel="stylesheet" type="text/css" href="/css/bootstrap-switch/bootstrap-switch.min.css">

TabScheduler

You have 0 sites scheduled at 15:00.

            <input type="checkbox" id="switch" data-size="mini">

        <button id="options">Manage sites</button>


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Uses of Class org.apache.cassandra.utils.EstimatedHistogram (apache-cassandra API)</title>
<meta name="date" content="2014-11-05">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Class
org.apache.cassandra.utils.EstimatedHistogram

Packages that use EstimatedHistogram

Package
Description

org.apache.cassandra.io.sstable

org.apache.cassandra.io.sstable.metadata

org.apache.cassandra.metrics

org.apache.cassandra.utils

Uses of EstimatedHistogram in org.apache.cassandra.io.sstable

Methods in org.apache.cassandra.io.sstable that return EstimatedHistogram

Modifier and Type
Method and Description

EstimatedHistogram
SSTableReader.getEstimatedColumnCount()

EstimatedHistogram
SSTableReader.getEstimatedRowSize()

Uses of EstimatedHistogram in org.apache.cassandra.io.sstable.metadata

Fields in org.apache.cassandra.io.sstable.metadata declared as EstimatedHistogram

Modifier and Type
Field and Description

protected EstimatedHistogram
MetadataCollector.estimatedColumnCount

EstimatedHistogram
StatsMetadata.estimatedColumnCount

protected EstimatedHistogram
MetadataCollector.estimatedRowSize

EstimatedHistogram
StatsMetadata.estimatedRowSize

Methods in org.apache.cassandra.io.sstable.metadata with parameters of type EstimatedHistogram

Modifier and Type
Method and Description

MetadataCollector
MetadataCollector.estimatedColumnCount(EstimatedHistogram estimatedColumnCount)

MetadataCollector
MetadataCollector.estimatedRowSize(EstimatedHistogram estimatedRowSize)

Constructors in org.apache.cassandra.io.sstable.metadata with parameters of type EstimatedHistogram

Constructor and Description

StatsMetadata(EstimatedHistogram estimatedRowSize,
             EstimatedHistogram estimatedColumnCount,
             ReplayPosition replayPosition,
             long minTimestamp,
             long maxTimestamp,
             int maxLocalDeletionTime,
             double compressionRatio,
             StreamingHistogram estimatedTombstoneDropTime,
             int sstableLevel,
             java.util.List<java.nio.ByteBuffer> minColumnNames,
             java.util.List<java.nio.ByteBuffer> maxColumnNames,
             boolean hasLegacyCounterShards,
             long repairedAt)

Uses of EstimatedHistogram in org.apache.cassandra.metrics

Fields in org.apache.cassandra.metrics declared as EstimatedHistogram

Modifier and Type
Field and Description

EstimatedHistogram
LatencyMetrics.recentLatencyHistogram

Deprecated.

EstimatedHistogram
ColumnFamilyMetrics.recentSSTablesPerRead

Deprecated.

EstimatedHistogram
ColumnFamilyMetrics.sstablesPerRead

Deprecated.

EstimatedHistogram
LatencyMetrics.totalLatencyHistogram

Deprecated.

Uses of EstimatedHistogram in org.apache.cassandra.utils

Methods in org.apache.cassandra.utils that return EstimatedHistogram

Modifier and Type
Method and Description

EstimatedHistogram
HistogramBuilder.buildWithStdevRangesAroundMean()

See HistogramBuilder.buildWithStdevRangesAroundMean(int)

EstimatedHistogram
HistogramBuilder.buildWithStdevRangesAroundMean(int maxdevs)

Calculate the min, mean, max and standard deviation of the items in the builder, and
 generate an EstimatedHistogram with upto maxdev stdev size ranges  either
 side of the mean, until min/max are hit; if either min/max are not reached a further range is
 inserted at the relevant ends.

EstimatedHistogram
EstimatedHistogram.EstimatedHistogramSerializer.deserialize(java.io.DataInput in)

EstimatedHistogram
MerkleTree.histogramOfRowCountPerLeaf()

EstimatedHistogram
MerkleTree.histogramOfRowSizePerLeaf()

Methods in org.apache.cassandra.utils with parameters of type EstimatedHistogram

Modifier and Type
Method and Description

void
EstimatedHistogram.EstimatedHistogramSerializer.serialize(EstimatedHistogram eh,
         DataOutputPlus out)

long
EstimatedHistogram.EstimatedHistogramSerializer.serializedSize(EstimatedHistogram eh,
              TypeSizes typeSizes)

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Copyright © 2014 The Apache Software Foundation


text:
import Component from 'react-pure-render/component';
import React, { PropTypes } from 'react';
import styles from '../styles';
import { Text } from 'react-native';

// React Native Text component preserves spaces. This solves problem with string
// defined via ES6 template strings. It normalizes '\n    ' stuff.
const normalizeMultilineString = message => message.replace(/ +/g, ' ').trim();

export default class AppText extends Component {

  static propTypes = {
    children: PropTypes.node.isRequired,
    style: Text.propTypes.style,
  };

  render() {
    const { children, style } = this.props;
    return (
      <Text {...this.props} style={[styles.text, style]}>
        {typeof children === 'string'
          ? normalizeMultilineString(children)
          : children
        }
      </Text>
    );
  }

}


text:
*::-webkit-input-placeholder {
  color: #7bbeb3;
  opacity: 1; }

/* VARS */
/* CUSTOM STYLE */
section {
  min-height: 100vh; }
  section h2 {
    font-family: 'LatoLight';
    text-transform: uppercase;
    color: #fff;
    font-size: 5rem;
    text-align: center; }

/*HEADER*/
.header {
  background-image: url(../img/bg_header.png);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: 100% bottom;
  min-height: 100vh;
  background-attachment: fixed; }

.logo {
  font-family: 'CharlevoixProThin';
  color: #fff;
  float: left;
  padding: 15px 0;
  font-size: 3rem;
  -webkit-transform: scale(1);
      -ms-transform: scale(1);
          transform: scale(1);
  -webkit-transition: ease .5s all;
  transition: ease .5s all; }
  .logo:hover {
    text-decoration: none;
    -webkit-transform: scale(1.2);
        -ms-transform: scale(1.2);
            transform: scale(1.2);
    color: #fff; }

/* NAV */
.nav {
  text-align: right; }

.menu {
  display: inline-block; }
  .menu li {
    float: left;
    padding: 30px 10px 15px 10px;
    margin: 0 5px;
    list-style-type: none;
    -webkit-border-radius: 0 0 5px 5px;
            border-radius: 0 0 5px 5px;
    letter-spacing: 1px;
    -webkit-transition: all ease .5s;
    transition: all ease .5s; }
    .menu li:hover {
      background-color: #74c7d5; }
  .menu a {
    color: #fff;
    font-family: 'CharlevoixProThin'; }
    .menu a:hover {
      text-decoration: none;
      color: #fff; }

/*CONTENT HEADER*/
.header-content {
  margin-top: 15%;
  text-align: center;
  color: #74c7d5; }

.header-content-text {
  color: #74c7d5;
  line-height: 1; }
  .header-content-text h1 {
    font-family: 'LatoLight';
    font-size: 6rem;
    text-transform: uppercase; }
  .header-content-text span {
    font-family: 'LatoBold';
    text-transform: uppercase;
    font-size: 8rem;
    letter-spacing: 5px; }

/*Button menu style*/
.btn_mnu {
  width: 50px;
  height: 50px;
  display: -webkit-flex;
  display: -moz-flex;
  display: -ms-flex;
  display: -o-flex;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
      -ms-flex-pack: center;
          justify-content: center;
  background-color: #3e3e3e;
  cursor: pointer;
  position: fixed;
  margin-top: 15px;
  left: 80%;
  z-index: 9999; }

.btn_row {
  height: 2px;
  width: 60%;
  margin: 2px 0;
  background-color: #fff;
  position: relative;
  -webkit-transition: all .5s;
  transition: all .5s; }

.btn_mnu.active .btn_row:first-child {
  -webkit-transform: rotate(-135deg);
  -ms-transform: rotate(-135deg);
  transform: rotate(-135deg);
  top: 6px; }

.btn_mnu.active .btn_row:last-child {
  -webkit-transform: rotate(-225deg);
  -ms-transform: rotate(-225deg);
  transform: rotate(-225deg);
  top: -6px; }

.btn_mnu.active .btn_row:nth-child(2) {
  opacity: 0; }

/*Button menu style end */
/* section2 services */
.services {
  background-image: url(../img/s2_bg.png);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: bottom 100%;
  background-attachment: fixed; }

/* NAV section 2*/
.sect-nav__2 li:hover {
  background-color: #df5c64; }

/*section2 text*/
.text-section {
  text-align: center;
  color: #fff; }
  .text-section p {
    font-size: 1.65rem;
    text-transform: uppercase;
    font-family: 'LatoLight'; }
    .text-section p span {
      color: #e28b90;
      font-weight: bold; }
  .text-section .services-text__small {
    font-size: 1.2rem;
    color: #e28b90;
    font-weight: bold;
    -webkit-animation-delay: .5s;
            animation-delay: .5s; }

.work-filter-wraper hr {
  border-color: #94b963; }

/*section2 item*/
.services-item {
  margin-top: 80px; }

.services-item-content {
  text-align: center;
  background-color: #c45158;
  -webkit-border-radius: 8px;
          border-radius: 8px;
  color: #fff;
  margin-bottom: 25px; }
  .services-item-content img {
    padding-top: 40px; }
  .services-item-content h3 {
    margin-top: 25px;
    font-family: 'LatoLight';
    text-transform: uppercase;
    font-size: 2.5rem; }
  .services-item-content p {
    padding: 10px 15px 40px 15px;
    font-family: 'LatoRegular';
    font-size: 1.188rem; }

/*section3 team*/
.team {
  background-image: url(../img/s3_bg.png);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: bottom 100%; }
  .team .services-text__small__purpur {
    color: #e6d1e3; }

.sect-nav__3 li:hover {
  background-color: #91778e; }

.team-baner {
  margin: 60px auto;
  display: block;
  width: 250px;
  padding: 15px 40px;
  text-align: center;
  background-color: #a1ca6c;
  font-family: 'LatoBold';
  text-transform: uppercase;
  color: #fff;
  font-size: 2.1rem;
  -webkit-border-radius: 8px;
          border-radius: 8px;
  position: relative;
  -webkit-animation-delay: .5s;
          animation-delay: .5s; }
  .team-baner::before {
    content: ' ';
    height: 0;
    width: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 20px solid #a1ca6c;
    position: absolute;
    top: 100%;
    left: 43.5%; }

/*section3 item content*/
.team-item-content {
  background-color: rgba(92, 75, 90, 0.3);
  text-align: center;
  -webkit-border-radius: 8px;
          border-radius: 8px;
  margin-bottom: 30px;
  -webkit-transition: ease all .8s;
  transition: ease all .8s; }
  .team-item-content h3 {
    font-size: 2.5rem;
    margin: 0;
    text-transform: uppercase;
    font-family: 'LatoBold';
    color: #c7b6c5; }
  .team-item-content span {
    color: #9dc26b;
    font-family: 'LatoRegular';
    font-size: 1.3rem; }

.team-item-img {
  padding: 40px 0; }

.user-img-hover {
  -webkit-transition: ease all .8s;
  transition: ease all .8s;
  display: none; }

.team-item-social {
  padding: 30px 0; }
  .team-item-social .fa {
    background-color: #a1859e;
    -webkit-border-radius: 50%;
            border-radius: 50%;
    padding: 15px 15px;
    width: 45px;
    display: inline-block;
    font-size: 1.5rem;
    color: #fff;
    -webkit-transition: ease all .8s;
    transition: ease all .8s; }

/*Hover item*/
.team-item-content {
  -webkit-transition: ease all .8s;
  transition: ease all .8s; }
  .team-item-content:hover {
    background-color: #5c4b5a;
    -webkit-transition: ease all .8s;
    transition: ease all .8s; }
    .team-item-content:hover .team-item-img .user-img {
      display: none; }
    .team-item-content:hover .team-item-img .user-img-hover {
      display: inline-block; }
    .team-item-content:hover h3 {
      color: #fff;
      -webkit-transition: ease all .8s;
      transition: ease all .8s; }
    .team-item-content:hover span {
      color: #d1766a;
      -webkit-transition: ease all .8s;
      transition: ease all .8s; }
    .team-item-content:hover .fa-facebook {
      color: #fff;
      background-color: #4f689e;
      -webkit-transition: ease all .8s;
      transition: ease all .8s; }
    .team-item-content:hover .fa-twitter {
      background-color: #74c7d5;
      -webkit-transition: ease all .8s;
      transition: ease all .8s; }
    .team-item-content:hover .fa-github-alt {
      background-color: #df5c64;
      -webkit-transition: ease all .8s;
      transition: ease all .8s; }
    .team-item-content:hover .fa-linkedin {
      background-color: #3e61af;
      -webkit-transition: ease all .8s;
      transition: ease all .8s; }

/*section4 work*/
.work {
  background-image: url(../img/s4_bg.png);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: bottom 100%;
  background-attachment: fixed; }
  .work .services-text__small__white {
    color: #fff; }

.sect-nav__4 li:hover {
  background-color: #a1ca6c; }

/*filter label*/
.work-filter-wraper h3 {
  text-transform: uppercase;
  color: #fff;
  font-family: 'LatoBold';
  font-size: 2rem;
  padding: 0;
  margin: 15px 0; }

.filter-button {
  text-align: right;
  margin: 15px 0; }
  .filter-button ul,
  .filter-button li {
    padding: 0;
    margin: 0;
    list-style-type: none; }
  .filter-button li {
    display: inline-block;
    padding: 5px 25px;
    cursor: pointer;
    color: #fff;
    font-family: 'LatoLight';
    font-weight: bold;
    font-size: 1.4rem;
    -webkit-transition: all .5s ease;
    transition: all .5s ease; }
    .filter-button li.active {
      background-color: #f5c149;
      -webkit-border-radius: 5px;
              border-radius: 5px; }
    .filter-button li:hover {
      background-color: #a1ca6c;
      -webkit-border-radius: 5px;
              border-radius: 5px; }

/*filter item*/
.filter-item-wrap hr {
  border-color: #94b963; }

.filter-item-content {
  background-color: #eeeeee;
  -webkit-border-radius: 5px;
          border-radius: 5px;
  position: relative;
  margin-bottom: 25px;
  -webkit-transition: all .8s ease;
  transition: all .8s ease; }
  .filter-item-content img {
    -webkit-border-radius: 5px 5px 0 0;
            border-radius: 5px 5px 0 0;
    -webkit-transition: all .8s ease;
    transition: all .8s ease; }
  .filter-item-content p {
    text-transform: uppercase;
    text-align: center;
    padding: 20px 0;
    color: #727272;
    font-size: 1.18rem;
    font-family: 'LatoRegular'; }
    .filter-item-content p::before {
      content: ' ';
      height: 0;
      width: 0;
      border-left: 20px solid transparent;
      border-right: 20px solid transparent;
      border-bottom: 20px solid #eeeeee;
      position: absolute;
      top: 65%;
      left: 42.5%; }

.filter-item-content:hover img {
  opacity: .8;
  -webkit-transition: all .8s ease;
  transition: all .8s ease; }

/*section5 contact*/
.contact {
  background-image: url(../img/s5_bg.png);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: bottom 100%;
  background-attachment: fixed; }
  .contact .services-text__small__white {
    color: #fff;
    font-size: 1.2rem;
    text-align: center;
    text-transform: uppercase;
    font-family: 'LatoLight';
    font-weight: bold; }

.sect-nav__5 li:hover {
  background-color: #82c8bd; }

/* contact content*/
.contact-info {
  margin-top: 20px;
  color: #fff;
  font-family: 'LatoLight'; }
  .contact-info h3 {
    font-size: 2.5rem; }
  .contact-info p {
    font-family: 'LatoBold';
    font-size: 1.6rem;
    color: #b9dbd6; }
  .contact-info span {
    font-size: 1.3rem; }
  .contact-info img {
    padding-top: 8%; }

.contact-info__file {
  margin-top: 35px; }
  .contact-info__file p {
    font-size: 1.3rem; }
    .contact-info__file p span {
      color: #fff;
      text-decoration: underline;
      padding-left: 25px;
      font-family: 'LatoLight';
      cursor: pointer; }

/* contact form*/
.form {
  text-align: center; }
  .form .col-md-6 {
    padding: 0;
    margin: 0; }
  .form .form-input {
    width: 99%;
    padding: 10px	20px;
    margin: 20px 0;
    background-color: #68a097;
    border: 1px solid transparent;
    -webkit-border-radius: 5px;
            border-radius: 5px;
    font-family: 'LatoRegular';
    font-size: 1.5rem;
    color: #1e1e1e; }
    .form .form-input:focus {
      background-color: #fff;
      border-color: transparent; }

.form-message {
  height: 150px;
  width: 100%;
  -webkit-border-radius: 5px;
          border-radius: 5px;
  margin-top: 15px;
  background-color: #68a097;
  border: none;
  padding: 15px 20px;
  color: #1e1e1e;
  font-family: 'LatoRegular';
  font-size: 1.5rem; }
  .form-message:focus {
    background-color: #fff;
    border-color: #1e1e1e; }

/* button send */
.form-button {
  display: inline-block;
  margin-top: 30px;
  padding: 10px 95px;
  background-color: #df5c64;
  text-transform: uppercase;
  color: #fff;
  font-family: 'LatoBold';
  font-size: 2.1rem;
  -webkit-border-radius: 5px;
          border-radius: 5px;
  -webkit-box-shadow: 0 5px 0 #c8535a;
          box-shadow: 0 5px 0 #c8535a;
  -webkit-transform: scale(1);
      -ms-transform: scale(1);
          transform: scale(1);
  -webkit-transition: all ease .5s;
  transition: all ease .5s; }
  .form-button:hover {
    -webkit-transform: scale(1.1);
        -ms-transform: scale(1.1);
            transform: scale(1.1);
    color: #fff;
    text-decoration: none; }

/* social */
.social {
  text-align: center;
  margin-top: 80px;
  background-color: #68a097;
  padding: 35px 0; }
  .social img {
    height: 50px;
    width: auto;
    padding-left: 25px;
    -webkit-transform: scale(1);
        -ms-transform: scale(1);
            transform: scale(1);
    -webkit-transition: all ease .5s;
    transition: all ease .5s; }
    .social img:hover {
      -webkit-transform: scale(1.5);
          -ms-transform: scale(1.5);
              transform: scale(1.5); }

/*Animation delay*/
.animation_itm1 {
  -webkit-animation-delay: .3s;
          animation-delay: .3s; }

.animation_itm2 {
  -webkit-animation-delay: .5s;
          animation-delay: .5s; }

.animation_itm3 {
  -webkit-animation-delay: .7s;
          animation-delay: .7s; }

.animation_itm4 {
  -webkit-animation-delay: .9s;
          animation-delay: .9s; }

.animation_gallery {
  -webkit-animation-duration: 1.3s;
          animation-duration: 1.3s; }

.animation_gallery1 {
  -webkit-animation-duration: 1.3s;
          animation-duration: 1.3s; }


text:
#pragma once
#include <aws/sdb/SimpleDB_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
#include <aws/core/utils/memory/stl/AWSString.h>

namespace Aws
{
namespace Utils
{
namespace Xml
{
  class XmlNode;
} // namespace Xml
} // namespace Utils
namespace SimpleDB
{
namespace Model
{
  /*

  */
  class AWS_SIMPLEDB_API Attribute
  {
  public:
    Attribute();
    Attribute(const Aws::Utils::Xml::XmlNode& xmlNode);
    Attribute& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);

    void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
    void OutputToStream(Aws::OStream& oStream, const char* location) const;

    /*
     The name of the attribute.
    */
    inline const Aws::String& GetName() const{ return m_name; }

    /*
     The name of the attribute.
    */
    inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }

    /*
     The name of the attribute.
    */
    inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = value; }

    /*
     The name of the attribute.
    */
    inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }

    /*
     The name of the attribute.
    */
    inline Attribute& WithName(const Aws::String& value) { SetName(value); return *this;}

    /*
     The name of the attribute.
    */
    inline Attribute& WithName(Aws::String&& value) { SetName(value); return *this;}

    /*
     The name of the attribute.
    */
    inline Attribute& WithName(const char* value) { SetName(value); return *this;}

    /*

    */
    inline const Aws::String& GetAlternateNameEncoding() const{ return m_alternateNameEncoding; }

    /*

    */
    inline void SetAlternateNameEncoding(const Aws::String& value) { m_alternateNameEncodingHasBeenSet = true; m_alternateNameEncoding = value; }

    /*

    */
    inline void SetAlternateNameEncoding(Aws::String&& value) { m_alternateNameEncodingHasBeenSet = true; m_alternateNameEncoding = value; }

    /*

    */
    inline void SetAlternateNameEncoding(const char* value) { m_alternateNameEncodingHasBeenSet = true; m_alternateNameEncoding.assign(value); }

    /*

    */
    inline Attribute& WithAlternateNameEncoding(const Aws::String& value) { SetAlternateNameEncoding(value); return *this;}

    /*

    */
    inline Attribute& WithAlternateNameEncoding(Aws::String&& value) { SetAlternateNameEncoding(value); return *this;}

    /*

    */
    inline Attribute& WithAlternateNameEncoding(const char* value) { SetAlternateNameEncoding(value); return *this;}

    /*
     The value of the attribute.
    */
    inline const Aws::String& GetValue() const{ return m_value; }

    /*
     The value of the attribute.
    */
    inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; }

    /*
     The value of the attribute.
    */
    inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = value; }

    /*
     The value of the attribute.
    */
    inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); }

    /*
     The value of the attribute.
    */
    inline Attribute& WithValue(const Aws::String& value) { SetValue(value); return *this;}

    /*
     The value of the attribute.
    */
    inline Attribute& WithValue(Aws::String&& value) { SetValue(value); return *this;}

    /*
     The value of the attribute.
    */
    inline Attribute& WithValue(const char* value) { SetValue(value); return *this;}

    /*

    */
    inline const Aws::String& GetAlternateValueEncoding() const{ return m_alternateValueEncoding; }

    /*

    */
    inline void SetAlternateValueEncoding(const Aws::String& value) { m_alternateValueEncodingHasBeenSet = true; m_alternateValueEncoding = value; }

    /*

    */
    inline void SetAlternateValueEncoding(Aws::String&& value) { m_alternateValueEncodingHasBeenSet = true; m_alternateValueEncoding = value; }

    /*

    */
    inline void SetAlternateValueEncoding(const char* value) { m_alternateValueEncodingHasBeenSet = true; m_alternateValueEncoding.assign(value); }

    /*

    */
    inline Attribute& WithAlternateValueEncoding(const Aws::String& value) { SetAlternateValueEncoding(value); return *this;}

    /*

    */
    inline Attribute& WithAlternateValueEncoding(Aws::String&& value) { SetAlternateValueEncoding(value); return *this;}

    /*

    */
    inline Attribute& WithAlternateValueEncoding(const char* value) { SetAlternateValueEncoding(value); return *this;}

  private:
    Aws::String m_name;
    bool m_nameHasBeenSet;
    Aws::String m_alternateNameEncoding;
    bool m_alternateNameEncodingHasBeenSet;
    Aws::String m_value;
    bool m_valueHasBeenSet;
    Aws::String m_alternateValueEncoding;
    bool m_alternateValueEncodingHasBeenSet;
  };

} // namespace Model
} // namespace SimpleDB
} // namespace Aws


text:
import mock
import six

import tuskarclient.common.formatting as fmt
import tuskarclient.tests.utils as tutils
from tuskarclient.v2 import plans

class PrintTest(tutils.TestCase):

    def setUp(self):
        super(PrintTest, self).setUp()
        self.outfile = six.StringIO()

    def test_print_dict(self):
        dict_ = {'k': 'v', 'key': 'value'}
        formatters = {'key': lambda v: 'custom ' + v}
        custom_labels = {'k': 'custom_key'}

        fmt.print_dict(dict_, formatters, custom_labels,
                       outfile=self.outfile)
        self.assertEqual(
            ('+------------+--------------+\n'
             '| Property   | Value        |\n'
             '+------------+--------------+\n'
             '| custom_key | v            |\n'
             '| key        | custom value |\n'
             '+------------+--------------+\n'),
            self.outfile.getvalue()
        )

    def test_print_list(self):
        fields = ['thing', 'color', '!artistic_name']
        formatters = {
            '!artistic_name': lambda obj: '{0} {1}'.format(obj.color,
                                                           obj.thing),
            'color': lambda c: c.split(' ')[1],
        }
        custom_labels = {'thing': 'name', '!artistic_name': 'artistic name'}

        fmt.print_list(self.objects(), fields, formatters, custom_labels,
                       outfile=self.outfile)
        self.assertEqual(
            ('+------+-------+-----------------+\n'
             '| name | color | artistic name   |\n'
             '+------+-------+-----------------+\n'
             '| moon | green | dark green moon |\n'
             '| sun  | blue  | bright blue sun |\n'
             '+------+-------+-----------------+\n'),
            self.outfile.getvalue()
        )

    def test_print_list_custom_field_without_formatter(self):
        fields = ['!artistic_name']

        self.assertRaises(KeyError, fmt.print_list, self.objects(), fields)

    def objects(self):
        return [
            mock.Mock(thing='sun', color='bright blue'),
            mock.Mock(thing='moon', color='dark green'),
        ]

class FormattersTest(tutils.TestCase):

    def test_attributes_formatter(self):
        """Test the attributes formatter displays the attributes correctly."""

        attributes = {
            'password': 'pass',
            'mysql_host': 'http://somewhere',
            'a thing': 'a value'
        }
        self.assertEqual(
            ("a thing=a value\nmysql_host=http://somewhere\npassword=pass\n"),
            fmt.attributes_formatter(attributes),
        )

    def test_list_plan_roles_formatter(self):
        roles = plans.Plan(None,
                           {'roles': [{'name': 'foo_role'},
                                      {'name': 'bar_role'}]}).roles
        self.assertEqual(
            "foo_role, bar_role",
            fmt.list_plan_roles_formatter(roles)
        )


text:
package org.apache.sling.launchpad.testservices.servlets;

import java.io.IOException;
import java.util.Arrays;

import javax.jcr.Repository;
import javax.servlet.ServletException;

import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Properties;
import org.apache.felix.scr.annotations.Property;
import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.Service;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.SlingHttpServletResponse;
import org.apache.sling.api.servlets.SlingSafeMethodsServlet;
import org.apache.sling.commons.json.JSONException;
import org.apache.sling.commons.json.io.JSONWriter;

/** Test servlet that dumps our repository descriptors */
@SuppressWarnings("serial")
@Component(immediate = true)
@Service
@Properties({ @Property(name = "service.description", value = "Repository Descriptors Servlet"),
        @Property(name = "service.vendor", value = "The Apache Software Foundation"),
        @Property(name = "sling.servlet.paths", value = "/testing/RepositoryDescriptors"),
        @Property(name = "sling.servlet.extensions", value = "json")})
public class RepositoryDescriptorsServlet extends SlingSafeMethodsServlet {

    @Reference
    private Repository repository;

    @Override
    protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response)
    throws ServletException,IOException {
        response.setContentType("application/json");
        response.setCharacterEncoding("UTF-8");
        try {
            final JSONWriter w = new JSONWriter(response.getWriter());
            w.setTidy(Arrays.asList(request.getRequestPathInfo().getSelectors()).contains("tidy"));
            w.object();
            w.key("descriptors");
            w.object();
            for(String key : repository.getDescriptorKeys()) {
                w.key(key).value(repository.getDescriptor(key));
            }
            w.endObject();
            w.endObject();
        } catch(JSONException je) {
            throw (IOException)new IOException("JSONException in doGet").initCause(je);
        }
        response.getWriter().flush();
    }
}


text:
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Threading;

namespace SoukeyNetget.Listener
{
    class cFileMonitor
    {

        private string m_MonitorFile;
        private FileSystemWatcher Fw;
        private System.Threading.Timer m_timer;
        private bool m_IsMonitoring=false;
        private int TimeoutMillis = 2000;
        private bool m_IsTrigger=false ;
        private cGlobalParas.MessageType mType=cGlobalParas.MessageType.ReloadPlan ;

        public cFileMonitor(string monitorFile)
        {
            m_MonitorFile = monitorFile;

        }

        //Èç¹û·¢Éú¸ü¸Ä£¬Ôò´¥·¢Ê¼þ
        protected void OnChanged(object sender, FileSystemEventArgs e)
        {
            m_IsTrigger = true;

            //ÖØÐÂÉèÖö¨Ê±Æ÷µÄ´¥·¢¼ä¸ô£¬²¢ÇÒ½ö½ö´¥·¢Ò»´Î
            m_timer.Change(TimeoutMillis, Timeout.Infinite);

            mType = cGlobalParas.MessageType.ReloadPlan;
        }

        //¼à¿ØÎļþʧ°Üʱ¼ä°´£¬½øÐд¥·¢
        protected void OnError(object sender, ErrorEventArgs e)
        {
            m_IsTrigger = true;

            //ÖØÐÂÉèÖö¨Ê±Æ÷µÄ´¥·¢¼ä¸ô£¬²¢ÇÒ½ö½ö´¥·¢Ò»´Î
            m_timer.Change(TimeoutMillis, Timeout.Infinite);

            mType = cGlobalParas.MessageType.MonitorFileFaild;
        }

        public void Start()
        {
            string path = Path.GetDirectoryName(m_MonitorFile);
            string baseName = Path.GetFileName(m_MonitorFile);

            Fw = new FileSystemWatcher(path, baseName);
            Fw.NotifyFilter = NotifyFilters.LastWrite;
            Fw.Changed += this.OnChanged;
            Fw.Error += this.OnError;
            Fw.EnableRaisingEvents = true;

            //Æô¶¯¶¨Ê±Æ÷
            if (m_timer == null)
            {
                //ÉèÖö¨Ê±Æ÷µÄ»Øµ÷º¯Êý¡£´Ëʱ¶¨Ê±Æ÷δÆô¶¯
                m_timer = new System.Threading.Timer(new TimerCallback(m_OnWatchedFileChange_CallBack), null, Timeout.Infinite, Timeout.Infinite);
            }

            m_IsMonitoring = true;

        }

        public void Stop()
        {
            Fw = null;
            m_timer.Dispose();

            m_IsMonitoring = false;
        }

        private void m_OnWatchedFileChange_CallBack(object state)
        {

            if (m_IsTrigger == true)
            {
                e_ReloadPlanFile(this, new cCommandEventArgs(mType));
                m_IsTrigger = false;
            }

        }

        void timerTick(object sender, EventArgs e)
        {
            //UpdateBasedOnFileTime();
        }

        private void ClearTimer()
        {
            //if (null != timer)
            //{
            //    timer.Tick -= timerTick;
            //    timer.Dispose();
            //    timer = null;
            //}
        }

        private readonly Object m_eventLock = new Object();

        #region 'þ
        ///
        private event EventHandler<cCommandEventArgs> e_ReloadPlanFile;
        internal event EventHandler<cCommandEventArgs> ReloadPlanFile
        {
            add { lock (m_eventLock) { e_ReloadPlanFile += value; } }
            remove { lock (m_eventLock) { e_ReloadPlanFile -= value; } }
        }

        #endregion

    }
}


text:
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { SprkIconModule } from '../sprk-icon/sprk-icon.module';
import { SprkLinkDirectiveModule } from '../../directives/sprk-link/sprk-link.module';
import { SprkToggleComponent } from './sprk-toggle.component';

@NgModule({
  imports: [
    CommonModule,
    SprkIconModule,
    SprkLinkDirectiveModule
  ],
  declarations: [SprkToggleComponent],
  exports: [SprkToggleComponent]
})
export class SprkToggleModule {}


text:
package basearch.service.impl;

import javax.inject.Inject;

import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import basearch.dao.AuthDao;
import basearch.service.AuthService;

@Service
@Transactional
public class AuthServiceImpl implements AuthService {

	private AuthDao authDao;

	@Inject
	public AuthServiceImpl(AuthDao authDao) {
		this.authDao = authDao;
	}

	@Override
	public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
		UserDetails u = authDao.loadUserByUsername(username);
		return u;
	}

}


text:
using System.Collections.Generic;
using System.Threading.Tasks;
using Orleans.GrainDirectory;

namespace Orleans.Runtime.Placement
{
    internal interface IPlacementRuntime : IPlacementContext
    {
        /// <summary>
        /// Lookup locally known directory information for a target grain
        /// </summary>
        /// <param name="grain"></param>
        /// <param name="addresses">Local addresses will always be complete, remote may be partial</param>
        /// <returns>True if remote addresses are complete within freshness constraint</returns>
        bool FastLookup(GrainId grain, out List<ActivationAddress> addresses);

        Task<List<ActivationAddress>> FullLookup(GrainId grain);

        bool LocalLookup(GrainId grain, out List<ActivationData> addresses);

        /// <summary>
        /// Try to get the transaction state of the activation if it is available on this silo
        /// </summary>
        /// <param name="id"></param>
        /// <param name="activationData"></param>
        /// <returns></returns>
        bool TryGetActivationData(ActivationId id, out ActivationData activationData);
    }

    internal static class PlacementRuntimeExtensions
    {
        public static string GetGrainTypeName(this IPlacementRuntime @this, GrainId grainId, string genericArguments = null)
        {
            return @this.GetGrainTypeName(grainId, genericArguments);
        }

        public static void GetGrainTypeInfo(this IPlacementRuntime @this, GrainId grainId, out string grainClass, out PlacementStrategy placement, string genericArguments = null)
        {
            @this.GetGrainTypeInfo(grainId, out grainClass, out placement, genericArguments);
        }
    }
}


text: Web from basics in summer 2015


text:
import { MissionPage } from './app.po';

describe('mission App', () => {
  let page: MissionPage;

  beforeEach(() => {
    page = new MissionPage();
  });

  it('should display message saying app works', () => {
    page.navigateTo();
    expect(page.getParagraphText()).toEqual('app works!');
  });
});


text:
<?php

namespace TLE\Elfbot\Task\DYMOLabel\PrintLabel;

use TLE\Elfbot\Task\AbstractTask;
use Symfony\Component\Process\ExecutableFinder;
use Symfony\Component\Process\Process;
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Psr\Log\LoggerInterface;

class Task extends AbstractTask
{
    static public function getDefinition(NodeDefinition $service, NodeDefinition $task)
    {
        $service->children()
            ->scalarNode('osascript')
                ->info('The path to osascript')
                ->defaultValue('osascript')
                ->beforeNormalization()
                    ->always()
                    ->then(function ($value) {
                        return ('/' == $value[0]) ? $value : (new ExecutableFinder())->find($value);
                    })
                    ->end()
                ->end()
            ->end()
            ;

        $task->children()
            ->scalarNode('label_url')
                ->info('URL to download the label file')
                ->isRequired()
                ->end()
            ->scalarNode('print')
                ->info('Number of copies of the label to print')
                ->defaultValue(1)
                ->end()
            ->end()
            ;
    }

    public function execute(LoggerInterface $logger, array $options)
    {
        $res = $this->container['http.app']->request('GET', $options['label_url']);

        file_put_contents(
            $r1 = (uniqid('/tmp/tle-r1-') . '.applescript'),
            file_get_contents(__DIR__ . '/script.applescript')
        );

        file_put_contents(
            $r2 = (uniqid('/tmp/tle-r2-') . '.label'),
            $res->getBody()->getContents()
        );

        $p = new Process(
            sprintf(
                '%s %s %s %s',
                $this->options['osascript'],
                $r1,
                $r2,
                $options['print']
            )
        );

        $p->run(
            function ($type, $bytes) use ($logger) {
                $logger->debug($type . ': ' . $bytes);
            }
        );

        unlink($r1);
        unlink($r2);
    }
}


text:
var Mexc = {};
/**
 * Handles the login popup
 *
 */
Mexc.LoginPopup = Class.create({
	initialize: function(link_id, box_id)
	{
		this.ids = {link_id:link_id, box_id:box_id};
		if (document.loaded) this.loaded();
		else document.observe('dom:loaded', this.loaded.bind(this));
	},
	loaded: function(ev)
	{
		this.loginBox = $(this.ids.box_id);
		this.link = $(this.ids.link_id);

		this.link.observe('click', this.open.bind(this));
		this.link.observe('mousedown', this.active.bind(this));
		document.observe('click', this.close.bind(this));
	},
	active: function(ev)
	{
		this.link.addClassName('activated');
	},
	open: function(ev)
	{
		ev.stop();
		this.loginBox.show();

		new Effect.ScrollTo('site', {
			duration: 0.5,
			afterFinish:function() {
				var input = this.loginBox.down('input[type=text]');
				input.focus();
				input.select();
			}.bind(this)
		});
	},
	close: function(ev)
	{
		var element = ev.findElement('#'+this.ids.box_id);
		if (!element || element == document)
		{
			this.loginBox.fade({duration:0.2});
			this.link.removeClassName('activated');
		}
	}
});

/**
 * Handles the 'Programas' section in the first page
 * where all sub-sites are shown
 */
Mexc.SitePreview = Class.create({
	initialize: function(id)
	{
		this.div = $(id);
		this.previews = this.div.select('.fact_site_minipreview').invoke('hide');
		this.index = Math.floor(Math.random()*this.previews.length)

		this.div
			.observe('mouseover', this.over.bind(this))
			.observe('mouseout', this.out.bind(this));
		this.over = false;
		this.show();
		this.startSlideshow();
	},
	startSlideshow: function()
	{
		this.executer = new PeriodicalExecuter(this.show.bind(this), 4);
	},
	over: function(ev)
	{
		this.over=true;
	},
	out: function(ev)
	{
		this.over=false;
	},
	show: function()
	{
		if (!this.over)
		{
			current = this.index;
			this.index = next = (this.index+1) % this.previews.length;
			if (next == current)
				return this.previews[current].show();

			new Effect.Parallel([
				new Effect.Fade(this.previews[current], { sync: true }),
				new Effect.Appear(this.previews[next], { sync: true })
			], { duration: 1 });
		}
	}
});

/**
 * Gallery interface
 */
Mexc.GalleryRoller = Class.create({
	initialize: function(id, url)
	{
		this.url = url;
		this.div = $(id);
		this.link = this.div.down('a.more_content');
		this.link.observe('click', this.more.bind(this));

		this.loading = this.link.next('img');
		if (this.loading)
			this.loading.hide();

		this.updateable = this.div.down('div.updateable');
		this.cache = $H({});
		this.full = false;
		this.current = this.updateable.readAttribute('id').replace('id', '');

		this.cache.set(this.current, this.updateable.innerHTML);
	},
	more: function(ev)
	{
		ev.stop();
		if (this.full)
			this.pickRandom();
		else
			new Ajax.Request(this.url, {
				parameters: {'data[ids]': this.cache.keys().join('|')},
				onCreate: function()
				{
					if (this.loading) this.loading.show();
				}.bind(this),
				onComplete: function(response)
				{
					if ((json = response.responseJSON) && json.content)
					{
						this.cache.set(json.id, json.content);
						var img_src = json.content.match(/img.+src="([^"]+)"/)
						if (img_src.length > 1)
						{
							var I = new Image();
							I.onload = this.update.bind(this, json.id);
							I.src = img_src[1];
						}
						else
						{
							this.update(json.id);
						}
					}
					else
					{
						this.full = true;
						this.pickRandom();
					}
				}.bind(this)
			});
	},
	pickRandom: function()
	{
		var keys = this.cache.keys();
		if (this.current)
			keys.splice(keys.indexOf(this.current), 1);
		this.update(keys[Math.floor(Math.random()*(keys.length-0.001))]);
	},
	update: function(id)
	{
		this.current = id;
		this.updateable.update(this.cache.get(id));
		if (this.loading)
			this.loading.hide();
	}
});

/**
 * Autocompleter used on search input
 *
 */
Mexc.Autocompleter = Class.create({
	initialize: function(input_id, div_id, url)
	{
		this.request = false;
		this.updateable = $(div_id);
		this.url = url;
		this.input = $(input_id);

		this.input.observe('focus', this.cancelClose.bind(this));
		this.input.observe('blur', this.scheduleClose.bind(this));
		this.input.writeAttribute('autocomplete', 'off');
		this.input.store('old_value', this.input.value);

		this.pe = new PeriodicalExecuter(this.checkInput.bind(this), 0.5);
	},
	scheduleClose: function(ev)
	{
		this.timeout = window.setTimeout(this.close.bind(this), 2000);
	},
	cancelClose: function(ev)
	{
		if (this.timeout)
			window.clearTimeout(this.timeout);
		this.timeout = false;
	},
	checkInput: function(pe)
	{
		if (this.input.value != this.input.retrieve('old_value') && !this.request)
		{
			this.input.store('old_value', this.input.value);
			if (this.input.value.length >= 3)
				this.request = new Ajax.Request(this.url, {parameters: this.input.serialize(), onComplete: this.complete.bind(this)});
			else
				this.close();
		}
	},
	complete: function(response)
	{
		this.updateable.show();
		this.request = false;
		if (response.responseJSON)
			this.parseData(response.responseJSON);
		else
			this.close();
	},
	parseData: function(json)
	{
		this.updateable.update();
		$H(json).each(function(pair){
			if (!pair.value.content)
				return;

			if (!Object.isArray(pair.value.content))
				pair.value.content = [pair.value.content];

			if (pair.value.content.length)
			{
				var content = pair.value.content.map(this.createSearchLink.bind(this)),
					label, span;

				if (pair.value.label)
					label = new Element('span').insert(pair.value.label);

				span = new Element('span');
				while (content.length)
					span.insert(content.pop()).insert(' ');

				this.updateable.insert(
					new Element('div').insert(label).insert(label?' ':'').insert(span)
				);
			}
		}.bind(this));
	},
	createSearchLink: function (data)
	{
		return (new Element('a', {href: '', 'mexc:search':data.search}).insert(data.label).observe('click', this.clickSearch.bind(this)));
	},
	clickSearch: function(ev)
	{
		ev.stop();
		var search_str = ev.findElement('a').readAttribute('mexc:search');
		location.href = this.input.up('form').action + '?' + this.input.name + '=' + search_str;
	},
	close: function()
	{
		var ef = new Effect.BlindUp(this.updateable, {duration: 0.3});
	}
});

/**
 * General No-Paste script
 *
 */
Mexc.NoPaste = Class.create({
	threshold: 5,
	initialize : function (input_id)
	{
		this.input = $(input_id);
		this.old_value = this.input.value;
		this.pe = new PeriodicalExecuter(this.checkInput.bind(this), 0.2);
	},
	checkInput: function(pe)
	{
		if(this.old_value.length - this.input.value.length < -this.threshold)
		{
			this.input.value = '';
		}
		this.old_value = this.input.value;
	}
});

Mexc.Veil = Class.create({
	initialize: function(ontop)
	{
		this.ontop = $(ontop);
		this.veil = new Element('div', {className: 'veil'}).setOpacity(0);
		document.body.appendChild(this.veil);
		this.veil.insert({after: ontop});
		this.veil.style.zIndex = 999;

		new Effect.Opacity(this.veil, {from:0, to:0.6, afterFinish: Element.show.bind(ontop, ontop)});
		ontop.makePositioned().setStyle({zIndex: 1000}).hide();

		this.resizeBinded = this.resize.bind(this)
		Event.observe(window, 'resize', this.resizeBinded);
		Event.observe(window, 'scroll', this.resizeBinded);
		this.resize();
	},
	resize: function()
	{
		this.veil.setStyle({
			'top': document.viewport.getScrollOffsets().top+'px',
			'left': document.viewport.getScrollOffsets().left+'px',
			'height': document.viewport.getHeight()+'px',
			'width': document.viewport.getWidth()+'px'
		});
	},
	hide: function()
	{
		this.veil.setStyle({
			'display': 'none',
		});
	},
	destroy: function()
	{
		Event.stopObserving(window, 'resize', this.resizeBinded);
		Event.stopObserving(window, 'scroll', this.resizeBinded);
		this.veil.remove();
		this.ontop.undoPositioned();
	}
});

/**
 * Digital Collection input tags change on advanced search
 *
 */
function AddTextToTag(text)
	{
		if (text == '')
		{
			$("MexcDigitalCollectionTags").value = "";
			return;
		}
		if ($("MexcDigitalCollectionTags").value.search(text) < 0)
		{
			$("MexcDigitalCollectionTags").value = text + $("MexcDigitalCollectionTags").value;
		}
	}


text:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <title>UI - Day 49</title>

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

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

Looper

          2012

          119 mins

Action

Crime

Sci-fi

In 2074, when the mob wants to get rid of someone, the target is sent into the past, where a hired gun awaits - someone like Joe.

7.5

Tron: Legacy

          2010

          125 mins

Action

Adventure

Fantasy

Sci-fi

The son of a virtual world designer goes looking for his father and ends up inside the digital world that his father designed. He meets his father's corrupted creation and a unique ally who was born inside the digital world.

6.8

Garden State

          2004

          102 mins

Comedy

Drama

Romance

A quietly troubled young man returns home for his mother's funeral after being estranged from his family for a decade.

7.6

Interstellar

          2014

          169 mins

Adventure

Drama

Sci-fi

With our time on Earth coming to an end, a team of explorers undertakes the most important mission in human history; traveling beyond this galaxy to discover whether mankind has a future among the stars.

8.7

Walter Mitty

          2013

          114 mins

Adventure

Comedy

Drama

When his job along with that of his co-worker are threatened, Walter takes action in the real world embarking on a global journey that turns into an adventure more extraordinary than anything he could have ever imagined.

7.4

Cloud Atlas

          2012

          172 mins

Drama

Sci-Fi

An exploration of how the actions of individual lives impact one another in the past, present and future, as one soul is shaped from a killer into a hero, and an act of kindness ripples across centuries to inspire a revolution.

7.5

    <button type="button" data-play></button>


text:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<PolicySet xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" PolicyCombiningAlgId="urn:oasis:names:tc:xacml:1.0:policy-combining-algorithm:first-applicable" PolicySetId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policyset" Version="1.0" >
    <Description>
        Policy for Conformance Test IIIA023.
        Purpose: test Advices on Policies, Case: NotApplicable: PolicyCombiningAlgorithm FirstApplicable
    </Description>
    <Target/>
    <Policy PolicyId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policy1" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:first-applicable" Version="1.0">
        <Description>
            Policy1 for Conformance Test IIIA023.
        </Description>
        <Target/>
        <Rule Effect="Deny" RuleId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:rule1">
            <Description>
                A subject whose name is J. Hibbert may not
                read Bart Simpson's medical record.  NOTAPPLICABLE
            </Description>
            <Target>
                <AnyOf>
                    <AllOf>
                        <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
                            <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">J. Hibbert</AttributeValue>
                            <AttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
                        </Match>
                    </AllOf>
                </AnyOf>
            </Target>
        </Rule>
    <AdviceExpressions>
        <AdviceExpression AppliesTo="Permit" AdviceId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policy1:Advice-1">
            <AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policy1:assignment1">
                    <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">assignment1</AttributeValue>
                </AttributeAssignmentExpression>
            <AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policy1:assignment2">
                    <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">assignment2</AttributeValue>
                </AttributeAssignmentExpression>
        </AdviceExpression>
        <AdviceExpression AppliesTo="Permit" AdviceId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policy1:Advice-2">
            <AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policy1:assignment1">
                    <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">assignment1</AttributeValue>
                </AttributeAssignmentExpression>
            <AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policy1:assignment2">
                    <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">assignment2</AttributeValue>
                </AttributeAssignmentExpression>
        </AdviceExpression>
        <AdviceExpression AppliesTo="Deny" AdviceId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policy1:Advice-3">
            <AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policy1:assignment1">
                    <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">assignment1</AttributeValue>
                </AttributeAssignmentExpression>
            <AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policy1:assignment2">
                    <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">assignment2</AttributeValue>
                </AttributeAssignmentExpression>
        </AdviceExpression>
        <AdviceExpression AppliesTo="Deny" AdviceId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policy1:Advice-4">
            <AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policy1:assignment1">
                    <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">assignment1</AttributeValue>
                </AttributeAssignmentExpression>
            <AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policy1:assignment2">
                    <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">assignment2</AttributeValue>
                </AttributeAssignmentExpression>
        </AdviceExpression>
    </AdviceExpressions>
    </Policy>
    <Policy PolicyId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policy2" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:first-applicable" Version="1.0">
        <Description>
            Policy2 for Conformance Test IIIA023.
        </Description>
        <Target/>
        <Rule Effect="Permit" RuleId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:rule2">
            <Description>
                A subject who is at least 55 years older than Bart
                Simpson may read Bart Simpson's medical record. NOT-APPLICABLE.
            </Description>
            <Condition>
<Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-greater-than-or-equal">
                <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-subtract">
                    <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-one-and-only">
                        <AttributeDesignator AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:age" Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" DataType="http://www.w3.org/2001/XMLSchema#integer" MustBePresent="false"/>
                    </Apply>
                    <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-one-and-only">
                        <AttributeDesignator AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:bart-simpson-age" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:environment" DataType="http://www.w3.org/2001/XMLSchema#integer" MustBePresent="false"/>
                    </Apply>
                </Apply>
                <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#integer">55</AttributeValue>
</Apply>
            </Condition>
        </Rule>
    <AdviceExpressions>
        <AdviceExpression AppliesTo="Permit" AdviceId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policy2:Advice-1">
            <AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policy2:assignment1">
                    <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">assignment1</AttributeValue>
                </AttributeAssignmentExpression>
            <AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policy2:assignment2">
                    <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">assignment2</AttributeValue>
                </AttributeAssignmentExpression>
        </AdviceExpression>
        <AdviceExpression AppliesTo="Permit" AdviceId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policy2:Advice-2">
            <AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policy2:assignment1">
                    <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">assignment1</AttributeValue>
                </AttributeAssignmentExpression>
            <AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policy2:assignment2">
                    <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">assignment2</AttributeValue>
                </AttributeAssignmentExpression>
        </AdviceExpression>
        <AdviceExpression AppliesTo="Deny" AdviceId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policy2:Advice-3">
            <AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policy2:assignment1">
                    <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">assignment1</AttributeValue>
                </AttributeAssignmentExpression>
            <AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policy2:assignment2">
                    <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">assignment2</AttributeValue>
                </AttributeAssignmentExpression>
        </AdviceExpression>
        <AdviceExpression AppliesTo="Deny" AdviceId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policy2:Advice-4">
            <AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policy2:assignment1">
                    <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">assignment1</AttributeValue>
                </AttributeAssignmentExpression>
            <AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policy2:assignment2">
                    <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">assignment2</AttributeValue>
                </AttributeAssignmentExpression>
        </AdviceExpression>
    </AdviceExpressions>
    </Policy>
    <AdviceExpressions>
        <AdviceExpression AppliesTo="Permit" AdviceId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policyset:Advice-1">
            <AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policyset:assignment1">
                <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">assignment1</AttributeValue>
            </AttributeAssignmentExpression>
            <AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policyset:assignment2">
                <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">assignment2</AttributeValue>
            </AttributeAssignmentExpression>
        </AdviceExpression>
        <AdviceExpression AppliesTo="Permit" AdviceId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policyset:Advice-2">
            <AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policyset:assignment1">
                <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">assignment1</AttributeValue>
            </AttributeAssignmentExpression>
            <AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policyset:assignment2">
                <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">assignment2</AttributeValue>
            </AttributeAssignmentExpression>
        </AdviceExpression>
        <AdviceExpression AppliesTo="Deny" AdviceId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policyset:Advice-3">
            <AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policyset:assignment1">
                <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">assignment1</AttributeValue>
            </AttributeAssignmentExpression>
            <AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policyset:assignment2">
                <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">assignment2</AttributeValue>
            </AttributeAssignmentExpression>
        </AdviceExpression>
        <AdviceExpression AppliesTo="Deny" AdviceId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policyset:Advice-4">
            <AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policyset:assignment1">
                <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">assignment1</AttributeValue>
            </AttributeAssignmentExpression>
            <AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IIIA023:policyset:assignment2">
                <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">assignment2</AttributeValue>
            </AttributeAssignmentExpression>
        </AdviceExpression>
    </AdviceExpressions>
</PolicySet>


text:
if (!global.Promise) {
  //global.Promise = require('es6-promise').Promise;
}

//Promise defer
if (!Promise.defer) {
  Promise.defer = function(){
    var deferred = {};
    deferred.promise = new Promise(function(resolve, reject){
      deferred.resolve = resolve;
      deferred.reject = reject;
    });
    return deferred;
  }
}
var getPeddingPromise = function(){
  var deferred = Promise.defer();
  deferred.promise.then(function(){
    return 1;
  }).catch(function(){
    return 2;
  })
  return deferred.promise;
}

var getResolvePromise = function(){
  var deferred = Promise.defer();
  deferred.promise.then(function(){
    return 1;
  })
  //deferred.resolve();
  return deferred.promise;
}

function test(){
  for(var i=0;i<100000;i++){
    getResolvePromise();
  }
}

setInterval(function(){
  test();
  console.log(process.memoryUsage());
}, 100)


text:
#ifndef otbUnaryFunctorNeighborhoodVectorImageFilter_h
#define otbUnaryFunctorNeighborhoodVectorImageFilter_h

#include "itkInPlaceImageFilter.h"
#include "itkImageRegionIteratorWithIndex.h"
#include "itkConstNeighborhoodIterator.h"

namespace otb
{
/** \class UnaryFunctorNeighborhoodVectorImageFilter
 * \brief Implements neighborhood-wise generic operation of one vector image.
 *
 * This class is parameterized over the types of the input image
 * and the type of the output image.  It is also parameterized by the
 * operation to be applied.  A Functor style is used.
 *
 * \ingroup IntensityImageFilters   Multithreaded
 *
 * \ingroup OTBCommon
 */
template <class TInputImage, class TOutputImage, class TFunction>
class ITK_EXPORT UnaryFunctorNeighborhoodVectorImageFilter : public itk::InPlaceImageFilter<TInputImage, TOutputImage>
{
public:
  /** Standard class typedefs. */
  typedef UnaryFunctorNeighborhoodVectorImageFilter Self;
  typedef itk::InPlaceImageFilter<TInputImage, TOutputImage> Superclass;
  typedef itk::SmartPointer<Self>       Pointer;
  typedef itk::SmartPointer<const Self> ConstPointer;

  /** Method for creation through the object factory. */
  itkNewMacro(Self);

  /** Run-time type information (and related methods). */
  itkTypeMacro(UnaryFunctorNeighborhoodVectorImageFilter, InPlaceImageFilter);

  /** Dimension */
  itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
  itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);

  /** Some convenient typedefs. */
  typedef TFunction                             FunctorType;
  typedef TInputImage                           InputImageType;
  typedef typename InputImageType::ConstPointer InputImagePointer;
  typedef typename InputImageType::RegionType   InputImageRegionType;
  typedef typename InputImageType::PixelType    InputImagePixelType;
  typedef TOutputImage                          OutputImageType;
  typedef typename OutputImageType::Pointer     OutputImagePointer;
  typedef typename OutputImageType::RegionType  OutputImageRegionType;
  typedef typename OutputImageType::PixelType   OutputImagePixelType;

  typedef itk::ProcessObject ProcessObjectType;

  /** Get the functor object.  The functor is returned by reference.
   * (Functors do not have to derive from itk::LightObject, so they do
   * not necessarily have a reference count. So we cannot return a
   * SmartPointer.) */
  FunctorType& GetFunctor()
  {
    return m_Functor;
  }

  /** Set the functor object.  This replaces the current Functor with a
   * copy of the specified Functor. This allows the user to specify a
   * functor that has ivars set differently than the default functor.
   * This method requires an operator!=() be defined on the functor
   * (or the compiler's default implementation of operator!=() being
   * appropriate). */
  void SetFunctor(const FunctorType& functor)
  {
    m_Functor = functor;
    this->Modified();
  }

  typedef itk::ConstNeighborhoodIterator<TInputImage>   NeighborhoodIteratorType;
  typedef typename NeighborhoodIteratorType::RadiusType RadiusType;

  /** Set/Get Radius
   * The main difference from itkUnaryFunctiorNeighborhoodImageFilter
   * and otbBinaryFunctorNeighborhoodVectorImageFilter is that the
   * radius may not be square...
   */
  itkSetMacro(Radius, RadiusType);
  itkGetMacro(Radius, RadiusType);

protected:
  UnaryFunctorNeighborhoodVectorImageFilter();
  ~UnaryFunctorNeighborhoodVectorImageFilter() override
  {
  }

  /** UnaryFunctorNeighborhoodVectorImageFilter can be implemented as a multithreaded filter.
   * Therefore, this implementation provides a ThreadedGenerateData() routine
   * which is called for each processing thread. The output image data is
   * allocated automatically by the superclass prior to calling
   * ThreadedGenerateData().  ThreadedGenerateData can only write to the
   * portion of the output image specified by the parameter
   * "outputRegionForThread"
   *
   * \sa ImageToImageFilter::ThreadedGenerateData(),
   *     ImageToImageFilter::GenerateData()  */
  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId) override;

  /**
   * Since the number of components per pixel depends on the radius range, one must reimplement
   * this method to set the proper number of component on the filter output.
   */
  void GenerateOutputInformation(void) override;

  RadiusType m_Radius;

private:
  UnaryFunctorNeighborhoodVectorImageFilter(const Self&) = delete;
  void operator=(const Self&) = delete;

  FunctorType m_Functor;
}; // end of class

} // namespace otb

#ifndef OTB_MANUAL_INSTANTIATION
#include "otbUnaryFunctorNeighborhoodVectorImageFilter.hxx"
#endif

#endif


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical">
    <LinearLayout
        android:id="@+id/linearLayout4"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="5dp">
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="ID"
            android:layout_marginLeft="5dp"
            android:layout_marginRight="25dp">
        </TextView>
        <EditText
            android:id="@+id/etID"
            android:layout_width="70dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="2dp">
        </EditText>
        <Button
            android:id="@+id/btnUpd"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Update">
        </Button>
        <Button
            android:id="@+id/btnDel"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Delete">
        </Button>
    </LinearLayout>
    <LinearLayout
        android:id="@+id/linearLayout1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Name"
            android:layout_marginLeft="5dp"
            android:layout_marginRight="5dp">
        </TextView>
        <EditText
            android:id="@+id/etName"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1">
            <requestFocus>
            </requestFocus>
        </EditText>
    </LinearLayout>
    <LinearLayout
        android:id="@+id/linearLayout3"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <TextView
            android:id="@+id/textView2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Email"
            android:layout_marginLeft="5dp"
            android:layout_marginRight="5dp">
        </TextView>
        <EditText
            android:id="@+id/etEmail"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1">
        </EditText>
    </LinearLayout>
    <LinearLayout
        android:id="@+id/linearLayout2"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <Button
            android:id="@+id/btnAdd"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Add">
        </Button>
        <Button
            android:id="@+id/btnRead"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Read">
        </Button>
        <Button
            android:id="@+id/btnClear"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Clear">
        </Button>
    </LinearLayout>
</LinearLayout>


text:
#include "task-scheduler.h"
#include <stdio.h>
#include <util/atomic.h>
#include "timer.h"
#include "debug.h"

/***                Definitions                 ***/

/***         Private Global Variables           ***/

// Enum to track task type
enum taskType_e {
    TASK_EMPTY  = 0,                ///< Unallocated task
    TASK_TIMED,                     ///< Timed task, due when timer expires
    TASK_QUEUED,                    ///< Queued task, due at next call to tsMain()
    TASK_CONDITIONAL,               ///< Conditional task, due when (reg & mask) > 0
    TASK_CONDITIONAL_SH,            ///< Conditional task, single shot
};

// parameters unique to timed tasks
struct timedParams_s {
    timer_t dueTimer;               ///< timer indicating when task is due again
    uint16_t period;                ///< period for rescheduling repeating task
};

// parameters unique to queued tasks
struct queuedParams_s {
    ///< empty at this point
};

// parameters unique to conditional tasks
struct conditionalParams_s {
    uint8_t (*cb)(device_t *);      ///< callback function pointer to determine if task should run
};

// a single task
struct tsTask_s {
    task_ptr cb;
    enum taskType_e type;
    union {
        struct timedParams_s        timed;
        struct queuedParams_s       queued;
        struct conditionalParams_s  conditional;
    } params;
};

//! static memory for all task definitions
static struct tsTask_s tasks[TS_MAX_TASKS];

/***          Public Global Variables           ***/

/***        Private function portotypes         ***/

static task_t *allocTask(void);
static void releaseTask(task_t *t);

/***                   ISRs                     ***/

/***             Private Functions              ***/

/*  Return pointer to a new uninitialized task struct. Return NULL if out of memory.
 */
static task_t *allocTask(void)
{
    uint8_t i;

    for (i=0; i < sizeof tasks / sizeof tasks[0]; i++) {
        if (tasks[i].type == TASK_EMPTY) {
            return &tasks[i];
        }
    }
    fputs_P(PSTR("allocTask: Out of memory.\r\n"), debug);
    return NULL;
}

/*  Return used task to task memory pool
 */
static void releaseTask(task_t *t)
{
    t->type = TASK_EMPTY;
}

/***             Public Functions               ***/

/*  Create a new timed repeating task.
 *
 */
task_t *tsNewTimedTask(task_ptr task, int16_t period)
{
    task_t *new;

    // allocate new task, check if NULL
    new = allocTask();
    if (new == NULL || task == NULL) {
        tsReleaseTask(new);
        return NULL;
    }

    // initialize new task
    new->cb = task;
    new->type = TASK_TIMED;
    timerInit(&new->params.timed.dueTimer, period);
    new->params.timed.period = period;
    return new;
}

/*  Create a new timed one-shot task.
 *
 */
task_t *tsNewTimedSingleShotTask(task_ptr task, int16_t period)
{
    task_t *new;

    // allocate new task, check if NULL
    new = allocTask();
    if (new == NULL || task == NULL) {
        tsReleaseTask(new);
        return NULL;
    }

    // initialize new task
    new->cb = task;
    new->type = TASK_TIMED;
    timerInit(&new->params.timed.dueTimer, period);
    new->params.timed.period = 0;
    return new;
}

/*  Create a new queued task.
 *
 */
task_t *tsEnqueueTask(task_ptr task)
{
    task_t *new;

    // allocate new task, check if NULL
    new = allocTask();
    if (new == NULL || task == NULL) {
        tsReleaseTask(new);
        return NULL;
    }

    // initialize new task
    new->cb = task;
    new->type = TASK_QUEUED;
    return new;
}

/*  Create a new conditional task.\n
 *  \param task Function pointer to task.
 *  \param cb Function pointer to callback which dtermines if task should run.
 *  Callback should return nonzero to run task, 0 to not run task.
 */
task_t *tsNewConditionalTask(task_ptr task, uint8_t (*cb)(device_t *))
{
    task_t *new;

    // allocate new task, check if NULL
    new = allocTask();
    if (new == NULL || task == NULL) {
        tsReleaseTask(new);
        return NULL;
    }

    // initialize new task
    new->cb = task;
    new->type = TASK_CONDITIONAL;
    new->params.conditional.cb = cb;
    return new;
}

/*  Create a new conditional task.\n
 *  \param task Function pointer to task.
 *  \param cb Function pointer to callback which dtermines if task should run.
 *  Callback should return nonzero to run task, 0 to not run task.
 */
task_t *tsNewConditionalSingleShotTask(task_ptr task, uint8_t (*cb)(device_t *))
{
    task_t *new;

    // allocate new task, check if NULL
    new = allocTask();
    if (new == NULL || task == NULL) {
        tsReleaseTask(new);
        return NULL;
    }

    // initialize new task
    new->cb = task;
    new->type = TASK_CONDITIONAL_SH;
    new->params.conditional.cb = cb;
    return new;
}

/*  Release a task and recycle associated memory. Cancels any pending task callbacks.
 *
 */
void tsReleaseTask(task_t *t)
{
    if (t != NULL) {
        releaseTask(t);
    }
}

/*  Main task manager. Iterates through all tasks and manages task execution.
 *
 */
void tsMain(device_t *dev)
{
    uint8_t i;

    // first iterate through timed tasks
    for (i=0; i < sizeof tasks / sizeof tasks[0]; i++) {
        if (tasks[i].type == TASK_TIMED) {
            if (timerActive(&tasks[i].params.timed.dueTimer) == 0) {
                // task timer has elapsed
                //fprintf_P(debug, PSTR("t: %p\r\n"), tasks[i].cb);
                tasks[i].cb(dev);
                if (tasks[i].params.timed.period > 0) {
                    // task is not single shot, renew timer
                    timerAddPeriod(&tasks[i].params.timed.dueTimer, tasks[i].params.timed.period);
                } else {
                    // task is single shot, release it
                    tsReleaseTask(&tasks[i]);
                }
            }
        }
    }

    // next iterate through conditional and queued tasks
    for (i=0; i < sizeof tasks / sizeof tasks[0]; i++) {
        switch (tasks[i].type) {

            case TASK_QUEUED:
                //fprintf_P(debug, PSTR("t: %p\r\n"), tasks[i].cb);
                tasks[i].cb(dev);
                tsReleaseTask(&tasks[i]);
                break;

            case TASK_CONDITIONAL:
                if (tasks[i].params.conditional.cb(dev) != 0) {
                    // conditional check passed
                    //fprintf_P(debug, PSTR("t: %p\r\n"), tasks[i].cb);
                    tasks[i].cb(dev);
                }
                break;

            case TASK_CONDITIONAL_SH:
                if (tasks[i].params.conditional.cb(dev) != 0) {
                    // conditional check passed
                    //fprintf_P(debug, PSTR("t: %p\r\n"), tasks[i].cb);
                    tasks[i].cb(dev);
                    tsReleaseTask(&tasks[i]);
                }
                break;

            default:
                break;
        }
    }
}


text:
#ifndef StreamLocalizerStub_hpp
#define StreamLocalizerStub_hpp

#include <stdio.h>
#include "bleloc.h"
#include "StreamLocalizer.hpp"

namespace loc {
    class StreamLocalizerStub : public StreamLocalizer{
    public:

        StreamLocalizerStub();
        ~StreamLocalizerStub();

        StreamLocalizer& putAcceleration(const Acceleration acceleration) override;
        StreamLocalizer& putAttitude(const Attitude attitude) override;
        StreamLocalizer& putBeacons(const Beacons beacons) override;
        virtual StreamLocalizer& putLocalHeading(const LocalHeading heading) override;
        virtual StreamLocalizer& putAltimeter(const Altimeter altimeter) override;
        StreamLocalizer& updateHandler(void (*functionCalledAfterUpdate)(Status*)) override;
        StreamLocalizer& updateHandler(void (*functionCalledAfterUpdate)(void*, Status*), void* inUserData) override;

        Status* getStatus() override;

        bool resetStatus() override;
        bool resetStatus(Pose pose) override;
        bool resetStatus(Pose meanPose, Pose stdevPose) override;
        bool resetStatus(Pose meanPose, Pose stdevPose, double contamiRate) override;
        /*
        StreamLocalizer* pedometer(Pedometer* pedometer);
        StreamLocalizer* orientationMeter(OrientationMeter*  orientationMeter);
        */
        bool resetStatus(const Beacons& beacons) override;
        bool resetStatus(const Location& location, const Beacons& beacons) override;

    private:
        Status* status;
        void updateStateStub();

        void callback(Status*);
        void (*mFunctionCalledAfterUpdate)(Status*) = NULL;
        void (*mFunctionCalledAfterUpdate2)(void*, Status*) = NULL;
        void *mUserData;
    };

}

#endif /* StreamLocalizerStub_hpp */


text:
package lv.ctco.cukes.core;

public class CukesRuntimeException extends RuntimeException {
    public CukesRuntimeException(Throwable cause) {
        super(cause);
    }

    public CukesRuntimeException(String message, Throwable cause) {
        super(message, cause);
    }

    public CukesRuntimeException(String message) {
        super(message);
    }
}


text:
Int32 type: MaxValue
--DESCRIPTION--
Generated by scripts/convert-bson-corpus-tests.php

DO NOT EDIT THIS FILE
--FILE--
<?php

require_once __DIR__ . '/../utils/basic.inc';

$canonicalBson = hex2bin('0C000000106900FFFFFF7F00');
$canonicalExtJson = '{"i" : {"$numberInt": "2147483647"}}';
$relaxedExtJson = '{"i" : 2147483647}';

// Canonical BSON -> Native -> Canonical BSON
echo bin2hex(fromPHP(toPHP($canonicalBson))), "\n";

// Canonical BSON -> Canonical extJSON
echo json_canonicalize(toCanonicalExtendedJSON($canonicalBson)), "\n";

// Canonical BSON -> Relaxed extJSON
echo json_canonicalize(toRelaxedExtendedJSON($canonicalBson)), "\n";

// Canonical extJSON -> Canonical BSON
echo bin2hex(fromJSON($canonicalExtJson)), "\n";

// Relaxed extJSON -> BSON -> Relaxed extJSON
echo json_canonicalize(toRelaxedExtendedJSON(fromJSON($relaxedExtJson))), "\n";

?>
===DONE===
<?php exit(0); ?>
--EXPECT--
0c000000106900ffffff7f00
{"i":{"$numberInt":"2147483647"}}
{"i":2147483647}
0c000000106900ffffff7f00
{"i":2147483647}
===DONE===