text:
<?php

class Template_Portal {

    protected $_ci;

    function __construct() {

        $this->_ci = &get_instance();
    }

    function display($data = null) {
        $data['pageContentTitle'] = ((isset($data['pageTitle']) == '') ? ' ' : $data['pageTitle']);
        $data['pageTitle'] = 'Online University Management System' . ((isset($data['pageTitle']) == '') ? ' ' : ' || ' . $data['pageTitle']);
        $data['breadcrumbs'] = ((isset($data['breadcrumbs']) == '') ? array() : $data['breadcrumbs']);
        $data['_content'] = $this->_ci->load->view((isset($data['content_view_page']) == '') ? 'portal/template/content' : $data['content_view_page'], $data, true);

        $data['_bottom_effect'] = '' . (((isset($data['bottom_effect']) == '') ? ' ' : '' . $data['bottom_effect']));
        $data['_slider'] = '' . (((isset($data['slider']) == '') ? ' ' : '' . $data['slider']));

        $this->_ci->load->view('portal/template.php', $data);
    }

}

?>


text:
<?php namespace Fungku\NetSuite\Classes;

class CustomerMonthlyClosing {
	static $paramtypesmap = array(
	);
	const _one = "_one";
	const _five = "_five";
	const _ten = "_ten";
	const _fifteen = "_fifteen";
	const _twenty = "_twenty";
	const _twentyFive = "_twentyFive";
	const _endOfTheMonth = "_endOfTheMonth";
}

redpajama_set_name: RedPajamaGithub


text:
class SurveyParticipant < ActiveRecord::Base
end


text:
extern crate crypto as crypto_rs;

use self::crypto_rs::{ symmetriccipher, buffer, aes, blockmodes };
use self::crypto_rs::buffer::{ ReadBuffer, WriteBuffer, BufferResult };
// Copied verbatim from the rust-crypto sample code, which coincidentally is exactly what we need
// https://github.com/DaGenix/rust-crypto/blob/master/examples/symmetriccipher.rs
// Actually we don't need the buffers to be 4k like they are in the example
pub fn encrypt(data: &[u8], key: &[u8], iv: &[u8]) -> Result<Vec<u8>, symmetriccipher::SymmetricCipherError> {
    let mut encryptor = aes::cbc_encryptor(aes::KeySize::KeySize256, key, iv, blockmodes::PkcsPadding);

    let mut final_result = Vec::<u8>::new();
    let mut read_buffer = buffer::RefReadBuffer::new(data);
    let mut buffer: [u8; 256] = [0; 256];
    let mut write_buffer = buffer::RefWriteBuffer::new(&mut buffer);

    loop {
        let result = try!(encryptor.encrypt(&mut read_buffer, &mut write_buffer, true));
        final_result.extend(write_buffer.take_read_buffer().take_remaining().iter().map(|&i| i));

        match result {
            BufferResult::BufferUnderflow => break,
            BufferResult::BufferOverflow => { }
        }
    }

    Ok(final_result)
}

pub fn decrypt(encrypted_data: &[u8], key: &[u8], iv: &[u8]) -> Result<Vec<u8>, symmetriccipher::SymmetricCipherError> {
    let mut decryptor = aes::cbc_decryptor(
            aes::KeySize::KeySize256,
            key,
            iv,
            blockmodes::PkcsPadding);

    let mut final_result = Vec::<u8>::new();
    let mut read_buffer = buffer::RefReadBuffer::new(encrypted_data);
    let mut buffer: [u8; 256] = [0; 256];
    let mut write_buffer = buffer::RefWriteBuffer::new(&mut buffer);

    loop {
        let result = try!(decryptor.decrypt(&mut read_buffer, &mut write_buffer, true));
        final_result.extend(write_buffer.take_read_buffer().take_remaining().iter().map(|&i| i));
        match result {
            BufferResult::BufferUnderflow => break,
            BufferResult::BufferOverflow => { }
        }
    }

    Ok(final_result)
}


text:
// Package config implements a global configuration to be used with gophish.
package config


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>16. UNIX ARM platform — OpenSplice Getting Started Guide</title>

    <link rel="stylesheet" href="_static/vortex.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />

    <link rel="top" title="OpenSplice Getting Started Guide" href="index.html" />
    <link rel="next" title="17. ELinOS" href="elinos.html" />
    <link rel="prev" title="15. PikeOS POSIX" href="pikeos-posix.html" />

Navigation

          index

          next |

          previous |

OpenSplice Getting Started Guide »

16. UNIX ARM platform¶

This chapter provides a brief description of how to deploy Vortex OpenSplice
on a UNIX ARM platform

16.1. Installation for UNIX ARM platform¶

The installation of the Vortex OpenSplice HDE or RTS on a UNIX ARM platform is depended
on the type of installer that has been provided. Dependent on the platform the installer
is either an executable or a tar file. An executable installer has either the extension
.run or .exe. A tar file installer has the extension .tar.

The following combinations may be provided
- both the HDE and RTS installers are executables
- the HDE installer is an executable and the RTS is an tar file
- both the HDE and RTS installers are tar files.

When the installer is provided as an executable follow the normal install procedure as
described in section Installation for UNIX and Windows Platforms.

When the installer is provided as an tar file follow the procedure described below.

Step 1

Untar the installer tar file,

go to the directory where Vortex OpenSplice has to be installed.

untar the tar file in this directory

<tt class="docutils literal">tar xf P<code>-VortexOpenSplice<version>-<E>-<platform>.<os>-<comp>-<type>-<target>-installer.tar</tt>

where, some being optional,

<code> - ADLINK’s code for the platform
<version> - the Vortex OpenSplice version number,
for example <tt class="docutils literal">V6.0</tt>

<E> - the environment, either <tt class="docutils literal">HDE</tt> or <tt class="docutils literal">RTS</tt>

<platform> - the platform architecture,
for example <tt class="docutils literal">sparc</tt> or <tt class="docutils literal">x86</tt>

<os> - the operating system
for example <tt class="docutils literal">solaris8</tt> or <tt class="docutils literal">linux2.6</tt>

<comp> - the compiler or glibc version

<type> - release, debug or dev, which is release with symbols

<target> - the target architecture for host/target builds.

Step 2

Configure the Vortex OpenSplice environment.

Go to the <install_dir>/<E>/<platform> directory, where <E> is <tt class="docutils literal">HDE</tt> of <tt class="docutils literal">RTS</tt>
and <platform is for example <tt class="docutils literal">armv7l.linux</tt>.

When bash is used as shell:

Source the release.com file from the shell command line.

Otherwise:

First set the OSPL_HOME variable to the directory in which OpenSplice was installed
and then source the release.com file.

Table Of Contents

16. UNIX ARM platform

16.1. Installation for UNIX ARM platform

Previous topic

15. PikeOS POSIX

Next topic

17. ELinOS

This Page

Show Source

Quick search

    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>

    Enter search terms or a module, class or function name.

Navigation

          index

          next |

          previous |

OpenSplice Getting Started Guide »

        © Copyright 2018, ADLINK Technology Limited.


text:
require_relative 'attributable'
require_relative 'serializable'
require_relative 'validatable'
require_relative 'requestable'
require_relative 'configurable'
require_relative 'resource_invalid'

require_relative 'http_errors'

module Served
  module Resource
    # Service Resources should inherit directly from this class. Provides
    # interfaces necessary for communicating with services based on the namespace.
    # Classes should be namespaced under Services::ServiceName where ServiceName is
    # the name of the service the resource lives on. The resource determines the
    # host of the service based on this this namespace and what is in the
    # configuration.
    #
    # Service Resources supports some ActiveModel validations so that a developer can
    # include client side validations if desired. Validation options can be passed
    # to the #attribute class method using the same options as ActiveModel#validate.
    #
    # A resource may also serialize values as specific classes, including nested
    # resources. If serialize is set to a Served Resource, it will validate the
    # nested resource as well as the top level.
    class Base
      include Configurable
      include Requestable
      include Attributable
      include Validatable
      include Serializable

      attribute :id
    end
  end
end


text:
lint:
	./node_modules/.bin/jshint ./test ./index.js ./lib/nuid.js

test:
	@NODE_ENV=test ./node_modules/.bin/mocha -c\
	  --reporter list \
	  --slow 5000 \
	  --timeout 10000

test-cov:
	@NODE_ENV=test ./node_modules/.bin/istanbul cover \
	./node_modules/mocha/bin/mocha -- -R spec --slow 5000

test-coveralls:
	echo TRAVIS_JOB_ID $(TRAVIS_JOB_ID)
	$(MAKE) lint
	$(MAKE) test
	@NODE_ENV=test ./node_modules/.bin/istanbul cover \
	./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec --slow 5000 && \
	  cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js || true

.PHONY: test


text:
define(
    function () {

        /**
         * @class QueryOutputDelete
         * @constructor
         * @class QueryOutputDelete  Creates a delete type in query output
         * @param {Object} options Rendering options for the view
         */
        var QueryOutputDelete = function (options) {
            /*
             Data storing structure as follows
                eventType: 'CURRENT_EVENTS|EXPIRED_EVENTS|ALL_EVENTS',
                on*: ''
            */
            if (options !== undefined) {
                this.eventType = (options.eventType !== undefined) ? (options.eventType).toUpperCase() : undefined;
                this.on = options.on;
            }
        };

        QueryOutputDelete.prototype.getEventType = function () {
            return this.eventType;
        };

        QueryOutputDelete.prototype.getOn = function () {
            return this.on;
        };

        QueryOutputDelete.prototype.setEventType = function (eventType) {
            this.eventType = eventType.toUpperCase();
        };

        QueryOutputDelete.prototype.setOn = function (on) {
            this.on = on;
        };

        return QueryOutputDelete;

    });


text:
package ThreadsLogic;

public class MultiThreadingLogic implements Runnable {

		   Thread t;
		   MultiThreadingLogic() {
		      t = new Thread(this, "Nuevo Thread");

		      t.start(); 		   }

		  		   public void run() {
		      try {
		         for(int i = 5; i > 0; i--) {
		            Thread.sleep(50);
		         }
		     } catch (InterruptedException e) {

		     }
		     System.out.println("Thread iterrumped");
		   }
	}


text:
var dbm = global.dbm || require('db-migrate');
var type = dbm.dataType;

exports.up = function(db, callback) {
  db.runSql("alter table participants add constraint unique_paymenttoken unique (paymenttoken);",callback);
};

exports.down = function(db, callback) {
  db.runSql("alter table participants drop constraint unique_paymenttoken;",callback);
};


text:
namespace boost
{
    template<class T>
    struct is_std_unordered_set
        : boost::mpl::false_
    {};

    template<class T>
    struct is_std_unordered_multiset
        : boost::mpl::false_
    {};

    template<class T>
    struct is_std_unordered_map
        : boost::mpl::false_
    {};

    template<class T>
    struct is_std_unordered_multimap
        : boost::mpl::false_
    {};

#ifdef BOOST_PHOENIX_HAS_UNORDERED_SET_AND_MAP

    template<
        class Kty
      , class Hash
      , class Cmp
      , class Alloc
    >
    struct is_std_unordered_set< std::unordered_set<Kty,Hash,Cmp,Alloc> >
        : boost::mpl::true_
    {};

    template<
        class Kty
      , class Hash
      , class Cmp
      , class Alloc
    >
    struct is_std_unordered_multiset< std::unordered_multiset<Kty,Hash,Cmp,Alloc> >
        : boost::mpl::true_
    {};

    template<
        class Kty
      , class Ty
      , class Hash
      , class Cmp
      , class Alloc
    >
    struct is_std_unordered_map< std::unordered_map<Kty,Ty,Hash,Cmp,Alloc> >
        : boost::mpl::true_
    {};

    template<
        class Kty
      , class Ty
      , class Hash
      , class Cmp
      , class Alloc
    >
    struct is_std_unordered_multimap< std::unordered_multimap<Kty,Ty,Hash,Cmp,Alloc> >
        : boost::mpl::true_
    {};

#endif
} // namespace boost

#endif


text:
<?xml version="1.0" encoding="UTF-8"?>
<billStatus>
  <bill>
    <committees>
      <billCommittees>
        <item>
          <type>Standing</type>
          <chamber>Senate</chamber>
          <name>Homeland Security and Governmental Affairs Committee</name>
          <activities>
            <item>
              <name>Referred to</name>
              <date>2017-05-18T17:59:15Z</date>
            </item>
          </activities>
          <subcommittees />
          <systemCode>ssga00</systemCode>
        </item>
      </billCommittees>
    </committees>
    <billType>S</billType>
    <createDate>2017-05-19T00:26:39Z</createDate>
    <title>A bill to designate the area between the intersections of International Drive, Northwest and Van Ness Street, Northwest and International Drive, Northwest and International Place, Northwest in Washington, District of Columbia, as "Liu Xiaobo Plaza", and for other purposes.</title>
    <billNumber>1187</billNumber>
    <summaries>
      <billSummaries>
        <item>
          <actionDesc>Introduced in Senate</actionDesc>
          <actionDate>2017-05-18</actionDate>
          <text><![CDATA[
This bill designates as "Liu Xiaobo Plaza" the area between the intersections of International Drive Northwest and Van Ness Street Northwest and International Drive Northwest and International Place Northwest in Washington, DC.
]]></text>
          <lastSummaryUpdateDate>2017-06-01T21:47:45Z</lastSummaryUpdateDate>
          <versionCode>00</versionCode>
          <name>Introduced in Senate</name>
          <updateDate>2017-05-18T04:00:00Z</updateDate>
        </item>
      </billSummaries>
    </summaries>
    <subjects>
      <billSubjects>
        <legislativeSubjects>
          <item>
            <name>Asia</name>
          </item>
          <item>
            <name>China</name>
          </item>
          <item>
            <name>Congressional tributes</name>
          </item>
          <item>
            <name>Detention of persons</name>
          </item>
          <item>
            <name>District of Columbia</name>
          </item>
          <item>
            <name>Government buildings, facilities, and property</name>
          </item>
          <item>
            <name>Human rights</name>
          </item>
          <item>
            <name>Roads and highways</name>
          </item>
        </legislativeSubjects>
        <policyArea>
          <name>Government Operations and Politics</name>
        </policyArea>
      </billSubjects>
    </subjects>
    <congress>115</congress>
    <relatedBills>
      <item>
        <type>HR</type>
        <relationshipDetails>
          <item>
            <type>Identical bill</type>
            <identifiedBy>CRS</identifiedBy>
          </item>
        </relationshipDetails>
        <latestTitle>To designate the area between the intersections of International Drive Northwest and Van Ness Street Northwest and International Drive Northwest and International Place Northwest in Washington, District of Columbia, as "Liu Xiaobo Plaza", and for other purposes.</latestTitle>
        <latestAction>
          <text>Referred to the House Committee on Oversight and Government Reform.</text>
          <actionDate>2017-05-18</actionDate>
        </latestAction>
        <number>2537</number>
        <congress>115</congress>
      </item>
    </relatedBills>
    <notes />
    <amendments />
    <policyArea>
      <name>Government Operations and Politics</name>
    </policyArea>
    <actions>
      <actionByCounts>
        <senate>2</senate>
      </actionByCounts>
      <actionTypeCounts>
        <referredToCommittee>1</referredToCommittee>
        <introducedInSenate>1</introducedInSenate>
      </actionTypeCounts>
      <item>
        <actionDate>2017-05-18</actionDate>
        <committee>
          <systemCode>ssga00</systemCode>
          <name>Homeland Security and Governmental Affairs Committee</name>
        </committee>
        <links />
        <sourceSystem>
          0
          <name>Senate</name>
        </sourceSystem>
        <text>Read twice and referred to the Committee on Homeland Security and Governmental Affairs.</text>
        <type>IntroReferral</type>
      </item>
      <item>
        <text>Introduced in Senate</text>
        <type>IntroReferral</type>
        <actionDate>2017-05-18</actionDate>
        <actionCode>10000</actionCode>
        <links />
        <sourceSystem>
          9
          <name>Library of Congress</name>
        </sourceSystem>
        <committee />
      </item>
    </actions>
    <latestAction>
      <actionDate>2017-05-18</actionDate>
      <text>Read twice and referred to the Committee on Homeland Security and Governmental Affairs.</text>
      <links />
    </latestAction>
    <committeeReports />
    <sponsors>
      <item>
        <firstName>Ted</firstName>
        <state>TX</state>
        <middleName />
        <bioguideId>C001098</bioguideId>
        <byRequestType />
        <party>R</party>
        <fullName>Sen. Cruz, Ted [R-TX]</fullName>
        <lastName>Cruz</lastName>
        <identifiers>
          <bioguideId>C001098</bioguideId>
          <lisID>2175</lisID>
          <gpoId />
        </identifiers>
      </item>
    </sponsors>
    <titles>
      <item>
        <chamberName />
        <title>A bill to designate the area between the intersections of International Drive, Northwest and Van Ness Street, Northwest and International Drive, Northwest and International Place, Northwest in Washington, District of Columbia, as "Liu Xiaobo Plaza", and for other purposes.</title>
        <titleType>Official Title as Introduced</titleType>
        <parentTitleType />
        <chamberCode />
      </item>
      <item>
        <chamberName />
        <title>A bill to designate the area between the intersections of International Drive, Northwest and Van Ness Street, Northwest and International Drive, Northwest and International Place, Northwest in Washington, District of Columbia, as "Liu Xiaobo Plaza", and for other purposes.</title>
        <titleType>Display Title</titleType>
        <parentTitleType />
        <chamberCode />
      </item>
    </titles>
    <calendarNumbers />
    <introducedDate>2017-05-18</introducedDate>
    <version>1.0.0</version>
    <cosponsors>
      <item>
        <middleName />
        <sponsorshipDate>2017-05-18</sponsorshipDate>
        <sponsorshipWithdrawnDate />
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <bioguideId>T000461</bioguideId>
        <lastName>Toomey</lastName>
        <firstName>Pat</firstName>
        <identifiers>
          <lisID>1594</lisID>
          <gpoId />
          <bioguideId>T000461</bioguideId>
        </identifiers>
        <fullName>Sen. Toomey, Pat [R-PA]</fullName>
        <state>PA</state>
        <party>R</party>
      </item>
      <item>
        <middleName />
        <sponsorshipDate>2017-05-18</sponsorshipDate>
        <sponsorshipWithdrawnDate />
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <bioguideId>R000595</bioguideId>
        <lastName>Rubio</lastName>
        <firstName>Marco</firstName>
        <identifiers>
          <lisID>2084</lisID>
          <bioguideId>R000595</bioguideId>
          <gpoId>8242</gpoId>
        </identifiers>
        <fullName>Sen. Rubio, Marco [R-FL]</fullName>
        <state>FL</state>
        <party>R</party>
      </item>
    </cosponsors>
    <recordedVotes />
    <cboCostEstimates />
    <updateDate>2017-07-20T16:56:28Z</updateDate>
    <laws />
    <originChamber>Senate</originChamber>
  </bill>
  <dublinCore xmlns:dc="http://purl.org/dc/elements/1.1/">
    <dc:format>text/xml</dc:format>
    <dc:language>EN</dc:language>
    <dc:rights>Pursuant to Title 17 Section 105 of the United States Code, this file is not subject to copyright protection and is in the public domain.</dc:rights>
    <dc:contributor>Congressional Research Service, Library of Congress</dc:contributor>
    <dc:description>This file contains bill summaries and statuses for federal legislation. A bill summary describes the most significant provisions of a piece of legislation and details the effects the legislative text may have on current law and federal programs. Bill summaries are authored by the Congressional Research Service (CRS) of the Library of Congress. As stated in Public Law 91-510 (2 USC 166 (d)(6)), one of the duties of CRS is "to prepare summaries and digests of bills and resolutions of a public general nature introduced in the Senate or House of Representatives". For more information, refer to the User Guide that accompanies this file.</dc:description>
  </dublinCore>
</billStatus>


text:
module Transmission
  class Config
    class << self
      def set(options = {})
        @@config = options
        @@connector = Transmission::RPC.new @@config
      end

      def get
        @@config
      end

      def get_connector
        @@connector
      end
    end
  end
end


text:
package org.typemeta.funcj.parser.expr;

import org.typemeta.funcj.data.Chr;
import org.typemeta.funcj.functions.Functions.Op2;
import org.typemeta.funcj.parser.*;

import static org.typemeta.funcj.parser.Text.*;
import static org.typemeta.funcj.parser.expr.Model.*;

public abstract class Grammar {

    private static <A> Parser<Chr, A> pure(A a) {
        return Parser.pure(a);
    }

    static {
        // To get around circular references.
        final Ref<Chr, Expr> expr = Parser.ref();

        final Parser<Chr, Chr> open = chr('(');
        final Parser<Chr, Chr> close = chr(')');
        final Parser<Chr, Chr> comma = chr(',');

        final Parser<Chr, UnaryOp> plus = chr('+').andR(pure(UnaryOp.POS));
        final Parser<Chr, UnaryOp> minus = chr('-').andR(pure(UnaryOp.NEG));

        final Parser<Chr, BinOp> add = chr('+').andR(pure(BinOp.ADD));
        final Parser<Chr, BinOp> sub = chr('-').andR(pure(BinOp.SUBTRACT));
        final Parser<Chr, BinOp> mult = chr('*').andR(pure(BinOp.MULTIPLY));
        final Parser<Chr, BinOp> div = chr('/').andR(pure(BinOp.DIVIDE));

        // addSub = add | sub
        final Parser<Chr, Op2<Expr>> addSub =
            add.or(sub).map(BinOp::ctor);

        // multDiv = mult | div
        final Parser<Chr, Op2<Expr>> multDiv =
            mult.or(div).map(BinOp::ctor);

        // num = <dble>
        final Parser<Chr, Expr> num = dble.map(Model::numExpr);

        // brackExpr = open expr close
        final Parser<Chr, Expr> brackExpr =
            open.andR(expr).andL(close);

        // var = <alpha>
        final Parser<Chr, Expr> var =
            alpha.map(Chr::charValue).map(Model::varExpr);

        // sign = + | -
        final Parser<Chr, UnaryOp> sign = plus.or(minus);

        // signedExpr = sign expr
        final Parser<Chr, Expr> signedExpr =
            sign.and(expr).map(Model::unaryOpExpr);

        // term = num | brackExpr | funcN | signedExpr
        final Parser<Chr, Expr> term =
            num.or(brackExpr).or(var).or(signedExpr);

        // prod = term chainl1 multDiv
        final Parser<Chr, Expr> prod = term.chainl1(multDiv);

        // expr = prod chainl1 addSub
        parser = expr.set(prod.chainl1(addSub));
    }

    public static final Parser<Chr, Expr> parser;

    public static Result<Chr, Expr> parse(String s) {
        return parser.parse(Input.of(s));
    }
}


text:
'use strict';

var gulp = require('gulp');
var sass = require('gulp-sass');
var webpack = require("webpack");
var gutil = require("gulp-util");
var purify = require('gulp-purifycss');
var uglifycss = require('gulp-uglifycss');
var shell = require('gulp-shell')

gulp.task('icons', function() {
    return gulp.src('./node_modules/font-awesome/fonts/**.*')
      .pipe(gulp.dest('./static/fonts'));
});

gulp.task('sass', function () {
  gulp.src('./front-src/sass/**/*.scss')
    .pipe(sass().on('error', sass.logError))
    .pipe(gulp.dest('./static/css/'));
});

gulp.task('sass:prod', function () {
  gulp.src('./front-src/sass/**/*.scss')
    .pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))
    .pipe(purify(['./static/**/*.js', './views/**/*.tpl']))
    .pipe(uglifycss())
    .pipe(gulp.dest('./static/css/'));
});

var configWebpack = require("./webpack.config.js")

gulp.task("webpack", function(callback) {
  webpack(configWebpack, function(err, stats) {
    if(err) throw new gutil.PluginError("webpack", err);
    gutil.log("[webpack]", stats.toString({
      colors: true
    }));
    callback();
  });
});

gulp.task("webpack:prod", function(callback) {
  configWebpack.plugins = configWebpack.plugins.concat(
  new webpack.DefinePlugin({
    "process.env": {
      "NODE_ENV": JSON.stringify("production")
    }
  }),
  new webpack.optimize.DedupePlugin(),
  new webpack.optimize.UglifyJsPlugin()
);
  webpack(configWebpack, function(err, stats) {
    if(err) throw new gutil.PluginError("webpack", err);
    gutil.log("[webpack]", stats.toString({
      colors: true
    }));
    callback();
  });
});

gulp.task('watch', function () {
  gulp.watch(['./static/**/*.js', './views/**/*.tpl', './front-src/sass/**/*.scss'], ['sass']);
  gulp.watch('./front-src/js/**/*.js', ['webpack']);
});

gulp.task('run:beego', shell.task([
  'bee run'
]))

gulp.task('run:goconvey', ['dev'], shell.task([
  'cd $GOPATH/src/github.com/QQorp/QQat/tests/ && $GOPATH/bin/goconvey'
]))

gulp.task('run', ['run:beego', 'run:goconvey', 'dev'])

gulp.task('dev', ['icons', 'sass', 'webpack', 'watch'])

gulp.task('default', ['icons', 'sass:prod', 'webpack:prod']);


text:
<?php

namespace Brainbits\Transcoder\Tests\Encoder;

use Brainbits\Transcoder\Encoder\NullEncoder;
use PHPUnit\Framework\TestCase;

/**
 * @covers \Brainbits\Transcoder\Encoder\NullEncoder
 */
class NullEncoderTest extends TestCase
{
    /**
      * @var NullEncoder
      */
    private $encoder;

    protected function setUp()
    {
        $this->encoder = new NullEncoder();
    }

    public function testEncode()
    {
        $testString = 'a string to be compressed';

        $result = $this->encoder->encode($testString);

        $this->assertSame($testString, $result);
    }

    public function testSupports()
    {
        $this->assertTrue($this->encoder->supports('null'));
        $this->assertTrue($this->encoder->supports(null));
        $this->assertFalse($this->encoder->supports('foo'));
    }
}


text:
#include <xml_xpath_context.h>

int vasprintf (char **strp, const char *fmt, va_list ap);

static void deallocate(xmlXPathContextPtr ctx)
{
  NOKOGIRI_DEBUG_START(ctx);
  xmlXPathFreeContext(ctx);
  NOKOGIRI_DEBUG_END(ctx);
}

/*
 * call-seq:
 *  register_ns(prefix, uri)
 *
 * Register the namespace with +prefix+ and +uri+.
 */
static VALUE register_ns(VALUE self, VALUE prefix, VALUE uri)
{
  xmlXPathContextPtr ctx;
  Data_Get_Struct(self, xmlXPathContext, ctx);

  xmlXPathRegisterNs( ctx,
                      (const xmlChar *)StringValuePtr(prefix),
                      (const xmlChar *)StringValuePtr(uri)
  );
  return self;
}

/*
 * call-seq:
 *  register_variable(name, value)
 *
 * Register the variable +name+ with +value+.
 */
static VALUE register_variable(VALUE self, VALUE name, VALUE value)
{
   xmlXPathContextPtr ctx;
   xmlXPathObjectPtr xmlValue;
   Data_Get_Struct(self, xmlXPathContext, ctx);

   xmlValue = xmlXPathNewCString(StringValuePtr(value));

   xmlXPathRegisterVariable( ctx,
      (const xmlChar *)StringValuePtr(name),
      xmlValue
   );

   return self;
}

static void ruby_funcall(xmlXPathParserContextPtr ctx, int nargs)
{
  VALUE xpath_handler = Qnil;
  VALUE result;
  VALUE *argv;
  VALUE doc;
  VALUE node_set = Qnil;
  xmlNodeSetPtr xml_node_set = NULL;
  xmlXPathObjectPtr obj;
  int i;

  assert(ctx);
  assert(ctx->context);
  assert(ctx->context->userData);
  assert(ctx->context->doc);
  assert(DOC_RUBY_OBJECT_TEST(ctx->context->doc));

  xpath_handler = (VALUE)(ctx->context->userData);

  argv = (VALUE *)calloc((size_t)nargs, sizeof(VALUE));
  for (i = 0 ; i < nargs ; ++i) {
    rb_gc_register_address(&argv[i]);
  }

  doc = DOC_RUBY_OBJECT(ctx->context->doc);

  i = nargs - 1;
  do {
    obj = valuePop(ctx);
    switch(obj->type) {
      case XPATH_STRING:
        argv[i] = NOKOGIRI_STR_NEW2(obj->stringval);
        break;
      case XPATH_BOOLEAN:
        argv[i] = obj->boolval == 1 ? Qtrue : Qfalse;
        break;
      case XPATH_NUMBER:
        argv[i] = rb_float_new(obj->floatval);
        break;
      case XPATH_NODESET:
        argv[i] = Nokogiri_wrap_xml_node_set(obj->nodesetval, doc);
        break;
      default:
        argv[i] = NOKOGIRI_STR_NEW2(xmlXPathCastToString(obj));
    }
    xmlXPathFreeNodeSetList(obj);
  } while(i-- > 0);

  result = rb_funcall2(
      xpath_handler,
      rb_intern((const char *)ctx->context->function),
      nargs,
      argv
  );

  for (i = 0 ; i < nargs ; ++i) {
    rb_gc_unregister_address(&argv[i]);
  }
  free(argv);

  switch(TYPE(result)) {
    case T_FLOAT:
    case T_BIGNUM:
    case T_FIXNUM:
      xmlXPathReturnNumber(ctx, NUM2DBL(result));
      break;
    case T_STRING:
      xmlXPathReturnString(
          ctx,
          (xmlChar *)xmlXPathWrapCString(StringValuePtr(result))
      );
      break;
    case T_TRUE:
      xmlXPathReturnTrue(ctx);
      break;
    case T_FALSE:
      xmlXPathReturnFalse(ctx);
      break;
    case T_NIL:
      break;
    case T_ARRAY:
      {
        VALUE args[2];
	args[0] = doc;
	args[1] = result;
        node_set = rb_class_new_instance(2, args, cNokogiriXmlNodeSet);
        Data_Get_Struct(node_set, xmlNodeSet, xml_node_set);
        xmlXPathReturnNodeSet(ctx, xmlXPathNodeSetMerge(NULL, xml_node_set));
      }
      break;
    case T_DATA:
      if(rb_obj_is_kind_of(result, cNokogiriXmlNodeSet)) {
        Data_Get_Struct(result, xmlNodeSet, xml_node_set);
        /* Copy the node set, otherwise it will get GC'd. */
        xmlXPathReturnNodeSet(ctx, xmlXPathNodeSetMerge(NULL, xml_node_set));
        break;
      }
    default:
      rb_raise(rb_eRuntimeError, "Invalid return type");
  }
}

static xmlXPathFunction lookup( void *ctx,
                                const xmlChar * name,
                                const xmlChar* ns_uri )
{
  VALUE xpath_handler = (VALUE)ctx;
  if(rb_respond_to(xpath_handler, rb_intern((const char *)name)))
    return ruby_funcall;

  return NULL;
}

NORETURN(static void xpath_exception_handler(void * ctx, xmlErrorPtr error));
static void xpath_exception_handler(void * ctx, xmlErrorPtr error)
{
  VALUE xpath = rb_const_get(mNokogiriXml, rb_intern("XPath"));
  VALUE klass = rb_const_get(xpath, rb_intern("SyntaxError"));

  rb_exc_raise(Nokogiri_wrap_xml_syntax_error(klass, error));
}

NORETURN(static void xpath_generic_exception_handler(void * ctx, const char *msg, ...));
static void xpath_generic_exception_handler(void * ctx, const char *msg, ...)
{
  char * message;

  va_list args;
  va_start(args, msg);
  vasprintf(&message, msg, args);
  va_end(args);

  rb_raise(rb_eRuntimeError, message);
}

/*
 * call-seq:
 *  evaluate(search_path, handler = nil)
 *
 * Evaluate the +search_path+ returning an XML::XPath object.
 */
static VALUE evaluate(int argc, VALUE *argv, VALUE self)
{
  VALUE search_path, xpath_handler;
  VALUE thing = Qnil;
  xmlXPathContextPtr ctx;
  xmlXPathObjectPtr xpath;
  xmlChar *query;

  Data_Get_Struct(self, xmlXPathContext, ctx);

  if(rb_scan_args(argc, argv, "11", &search_path, &xpath_handler) == 1)
    xpath_handler = Qnil;

  query = (xmlChar *)StringValuePtr(search_path);

  if(Qnil != xpath_handler) {
    /* FIXME: not sure if this is the correct place to shove private data. */
    ctx->userData = (void *)xpath_handler;
    xmlXPathRegisterFuncLookup(ctx, lookup, (void *)xpath_handler);
  }

  xmlResetLastError();
  xmlSetStructuredErrorFunc(NULL, xpath_exception_handler);

  /* For some reason, xmlXPathEvalExpression will blow up with a generic error */
  /* when there is a non existent function. */
  xmlSetGenericErrorFunc(NULL, xpath_generic_exception_handler);

  xpath = xmlXPathEvalExpression(query, ctx);
  xmlSetStructuredErrorFunc(NULL, NULL);
  xmlSetGenericErrorFunc(NULL, NULL);

  if(xpath == NULL) {
    VALUE xpath = rb_const_get(mNokogiriXml, rb_intern("XPath"));
    VALUE klass = rb_const_get(xpath, rb_intern("SyntaxError"));

    xmlErrorPtr error = xmlGetLastError();
    rb_exc_raise(Nokogiri_wrap_xml_syntax_error(klass, error));
  }

  assert(ctx->doc);
  assert(DOC_RUBY_OBJECT_TEST(ctx->doc));

  switch(xpath->type) {
    case XPATH_STRING:
      thing = NOKOGIRI_STR_NEW2(xpath->stringval);
      break;
    case XPATH_NODESET:
      if(NULL == xpath->nodesetval) {
        thing = Nokogiri_wrap_xml_node_set(xmlXPathNodeSetCreate(NULL),
          DOC_RUBY_OBJECT(ctx->doc));
      } else {
        thing = Nokogiri_wrap_xml_node_set(xpath->nodesetval,
            DOC_RUBY_OBJECT(ctx->doc));
      }
      break;
    case XPATH_NUMBER:
      thing = rb_float_new(xpath->floatval);
      break;
    case XPATH_BOOLEAN:
      thing = xpath->boolval == 1 ? Qtrue : Qfalse;
      break;
    default:
      thing = Nokogiri_wrap_xml_node_set(xmlXPathNodeSetCreate(NULL),
        DOC_RUBY_OBJECT(ctx->doc));
  }

  xmlXPathFreeNodeSetList(xpath);

  return thing;
}

/*
 * call-seq:
 *  new(node)
 *
 * Create a new XPathContext with +node+ as the reference point.
 */
static VALUE new(VALUE klass, VALUE nodeobj)
{
  xmlNodePtr node;
  xmlXPathContextPtr ctx;
  VALUE self;

  xmlXPathInit();

  Data_Get_Struct(nodeobj, xmlNode, node);

  ctx = xmlXPathNewContext(node->doc);
  ctx->node = node;
  self = Data_Wrap_Struct(klass, 0, deallocate, ctx);
  /*rb_iv_set(self, "@xpath_handler", Qnil); */
  return self;
}

VALUE cNokogiriXmlXpathContext;
void init_xml_xpath_context(void)
{
  VALUE module = rb_define_module("Nokogiri");

  /*
   * Nokogiri::XML
   */
  VALUE xml = rb_define_module_under(module, "XML");

  /*
   * XPathContext is the entry point for searching a Document by using XPath.
   */
  VALUE klass = rb_define_class_under(xml, "XPathContext", rb_cObject);

  cNokogiriXmlXpathContext = klass;

  rb_define_singleton_method(klass, "new", new, 1);
  rb_define_method(klass, "evaluate", evaluate, -1);
  rb_define_method(klass, "register_variable", register_variable, 2);
  rb_define_method(klass, "register_ns", register_ns, 2);
}


text:
<?php

namespace tests\Maketok\Util;

class ConfigGetterTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @test
     */
    public function getConfig()
    {
        $configGetter = $this->getMock('Maketok\Util\ConfigGetter', ['getLoader']);
        $loaderMock = $this->getMock('Symfony\Component\Config\Loader\LoaderInterface');
        $map = [
            ['config.yml', null, null],
            ['admin.config.yml', null, ['value' => [1]]],
            ['config.php', null, ['value' => [2]]],
            ['admin.config.php', null, ['value' => [3]]],
        ];
        $loaderMock->expects($this->any())->method('load')->willReturnMap($map);
        $this->assertEquals(['value' => [1]], $loaderMock->load('admin.config.yml', null));
        $configGetter->expects($this->any())->method('getLoader')->will($this->returnValue($loaderMock));
        $this->assertEquals([
            ['value' => [1]],
            ['value' => [2]],
            ['value' => [3]],
        ], $configGetter->getConfig('testpath', 'config', 'admin'));
    }
}


text:
#pragma once
#include <aws/iam/IAM_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/iam/model/ResponseMetadata.h>
#include <aws/iam/model/ServerCertificateMetadata.h>

namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;

namespace Utils
{
namespace Xml
{
  class XmlDocument;
} // namespace Xml
} // namespace Utils
namespace IAM
{
namespace Model
{
  /*

Contains the response to a successful ListServerCertificates request.

  */
  class AWS_IAM_API ListServerCertificatesResult
  {
  public:
    ListServerCertificatesResult();
    ListServerCertificatesResult(const AmazonWebServiceResult<Aws::Utils::Xml::XmlDocument>& result);
    ListServerCertificatesResult& operator=(const AmazonWebServiceResult<Aws::Utils::Xml::XmlDocument>& result);

    /*

A list of server certificates.

    */
    inline const Aws::Vector<ServerCertificateMetadata>& GetServerCertificateMetadataList() const{ return m_serverCertificateMetadataList; }

    /*

A list of server certificates.

    */
    inline void SetServerCertificateMetadataList(const Aws::Vector<ServerCertificateMetadata>& value) { m_serverCertificateMetadataList = value; }

    /*

A list of server certificates.

    */
    inline void SetServerCertificateMetadataList(Aws::Vector<ServerCertificateMetadata>&& value) { m_serverCertificateMetadataList = value; }

    /*

A list of server certificates.

    */
    inline ListServerCertificatesResult& WithServerCertificateMetadataList(const Aws::Vector<ServerCertificateMetadata>& value) { SetServerCertificateMetadataList(value); return *this;}

    /*

A list of server certificates.

    */
    inline ListServerCertificatesResult& WithServerCertificateMetadataList(Aws::Vector<ServerCertificateMetadata>&& value) { SetServerCertificateMetadataList(value); return *this;}

    /*

A list of server certificates.

    */
    inline ListServerCertificatesResult& AddServerCertificateMetadataList(const ServerCertificateMetadata& value) { m_serverCertificateMetadataList.push_back(value); return *this; }

    /*

A list of server certificates.

    */
    inline ListServerCertificatesResult& AddServerCertificateMetadataList(ServerCertificateMetadata&& value) { m_serverCertificateMetadataList.push_back(value); return *this; }

    /*

A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more items.

    */
    inline bool GetIsTruncated() const{ return m_isTruncated; }

    /*

A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more items.

    */
    inline void SetIsTruncated(bool value) { m_isTruncated = value; }

    /*

A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the Marker request parameter to retrieve more items.

    */
    inline ListServerCertificatesResult& WithIsTruncated(bool value) { SetIsTruncated(value); return *this;}

    /*

When IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.

    */
    inline const Aws::String& GetMarker() const{ return m_marker; }

    /*

When IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.

    */
    inline void SetMarker(const Aws::String& value) { m_marker = value; }

    /*

When IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.

    */
    inline void SetMarker(Aws::String&& value) { m_marker = value; }

    /*

When IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.

    */
    inline void SetMarker(const char* value) { m_marker.assign(value); }

    /*

When IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.

    */
    inline ListServerCertificatesResult& WithMarker(const Aws::String& value) { SetMarker(value); return *this;}

    /*

When IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.

    */
    inline ListServerCertificatesResult& WithMarker(Aws::String&& value) { SetMarker(value); return *this;}

    /*

When IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a subsequent pagination request.

    */
    inline ListServerCertificatesResult& WithMarker(const char* value) { SetMarker(value); return *this;}

    inline const ResponseMetadata& GetResponseMetadata() const{ return m_responseMetadata; }

    inline void SetResponseMetadata(const ResponseMetadata& value) { m_responseMetadata = value; }

    inline void SetResponseMetadata(ResponseMetadata&& value) { m_responseMetadata = value; }

    inline ListServerCertificatesResult& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;}

    inline ListServerCertificatesResult& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(value); return *this;}

  private:
    Aws::Vector<ServerCertificateMetadata> m_serverCertificateMetadataList;
    bool m_isTruncated;
    Aws::String m_marker;
    ResponseMetadata m_responseMetadata;
  };

} // namespace Model
} // namespace IAM
} // namespace Aws


text:
namespace g{namespace Fuse{namespace Scripting{namespace Duktape{struct JSONObject;}}}}

namespace g{
namespace Fuse{
namespace Scripting{
namespace Duktape{

// public static extern class JSONObject :1127
// {
uClassType* JSONObject_typeof();
void JSONObject__Stringify_fn(uObject* value, uString** __retval);

struct JSONObject : uObject
{
    static uString* Stringify(uObject* value);
};
// }

}}}} // ::g::Fuse::Scripting::Duktape


text:
/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "http://localhost:3000/packs/";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = "./app/javascript/packs/application.js");
/******/ })
/************************************************************************/
/******/ ({

/***/ "./app/javascript/packs/application.js":
/*!*********************************************!*\
  !*** ./app/javascript/packs/application.js ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports) {

/* eslint no-console:0 */
// This file is automatically compiled by Webpack, along with any other files
// present in this directory. You're encouraged to place your actual application logic in
// a relevant structure within app/javascript and only use these pack files to reference
// that code so it'll be compiled.
//
// To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate
// layout file, like app/views/layouts/application.html.erb
// Uncomment to copy all static images under ../images to the output folder and reference
// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)
// or the `imagePath` JavaScript helper below.
//
// const images = require.context('../images', true)
// const imagePath = (name) => images(name, true)
console.log('Hello World from Webpacker');

/***/ })

/******/ });
//# sourceMappingURL=application-5c68c425a3e0b5990600.js.map


text:
package com.yuxie.tgd.pojo.bean.dataMerge;

public class DataJsonAndFormProperty extends DataJsonAndOrder {
    //是否允许编辑
    private boolean canBeEdit;

    @Override
    public String toString() {
        return "DataJsonAndFormProperty{" +
                "canBeEdit=" + canBeEdit +
                "} " + super.toString();
    }

    public boolean isCanBeEdit() {
        return canBeEdit;
    }

    public void setCanBeEdit(boolean canBeEdit) {
        this.canBeEdit = canBeEdit;
    }
}


text:
local textures = requirex("textures")

local snow_density = 0.05

local config =
{
	["fog_start"] = 0,
	["fog_end"] = 7000,
	["fog_max_density"] = 0.25,
	["fog_color"] = Vector(255,255,255)*0.8,
	["start_intensity"] = 0,
	["sky_topcolor"] = Vector(1,1,1)*0.5,
	["sky_bottomcolor"] = Vector(1,1,1)*0.5,
	["sky_starfade"] = 0,
	["sky_duskintensity"] = 0,
}

tod.AddOverrideConfig("snow", config, 0.5)

if SERVER then
	hook.Add("PlayerFootstep", "snow", function(ply, pos, foot, sound, volume, rf)
		sound = sound:lower()
		if sound:find("grass", nil, true) or sound:find("dirt", nil, true) then
			ply:EmitSound(("player/footsteps/snow%s.wav"):format(math.random(6)), 60, math.random(95,105))
			return true
		end
	end)
end

if CLIENT then
	-- emit the particles from points
	local emt = ParticleEmitter(EyePos(), false)

	hook.Add("Think", "tod_snow", function()
		local g = physenv.GetGravity().z
		local b = tod.GetWeatherChance(0.5)

		tod.EnableSectorThink(b)

		for k,v in pairs(player.GetAll()) do
			if math.sin(RealTime() * 2.5 + v:UniqueID()) > 0.5 then
				local i = v:LookupAttachment("mouth")
				if i ~= 0 then
					local mouth = v:GetAttachment(i)

					local up = mouth.Ang:Up()
					local p = emt:Add("particle/snow", mouth.Pos + up + VectorRand()*0.25)
					p:SetVelocity((up+VectorRand()*0.25)*-math.random()*30)
					p:SetDieTime(2)
					p:SetStartAlpha(6)
					p:SetStartSize(0)
					p:SetEndSize(math.random(2, 4))
					p:SetAirResistance(300)
					p:SetGravity(VectorRand()*0.1)
					p:SetLighting(true)
					p:SetAngles(Angle(math.random(360), math.random(360), math.random(360)))
				end
			end
		end

		if not b then return end

		for _, point in pairs(tod.GetOutsideSectors()) do
			if math.random() > snow_density then continue end

			local pos = point + VectorRand() * 50

			local p = emt:Add("particle/snow", pos)
			p:SetVelocity(VectorRand() * 100 * Vector(1,1,0))
			p:SetAngles(Angle(math.random(360), math.random(360), math.random(360)))
			p:SetLifeTime(0)
			p:SetDieTime(10)
			p:SetStartAlpha(255)
			p:SetEndAlpha(0)
			p:SetStartSize(0)
			p:SetEndSize(3)
			p:SetGravity(Vector(0,0,math.Rand(-10, -200)))
			p:SetCollide(true)
		--	p:SetLighting(true)]]
		end
	end)

	hook.Add("TOD_ReplaceGrassTexture", "tod_snow", function(path)
		path = path:lower()
		if path:find("grass") or path:find("mud") or path:find("sand") then
			textures.ReplaceTexture("tod", path, "nature/snowfloor002a")
			textures.SetColor("tod", path, Vector(1,1,1)*0.3)
		end
	end)
end


text:
#ifndef itkQuasiNewtonOptimizerv4EstimateNewtonStepThreader_h
#define itkQuasiNewtonOptimizerv4EstimateNewtonStepThreader_h

#include "itkDomainThreader.h"
#include "itkThreadedIndexedContainerPartitioner.h"

namespace itk
{
template<typename TInternalComputationValueType>
class ITK_FORWARD_EXPORT QuasiNewtonOptimizerv4Template;

/** \class QuasiNewtonOptimizerv4EstimateNewtonStepThreaderTemplate
 * \brief Estimate the quasi-Newton step in a thread.
 * \ingroup ITKOptimizersv4
 * */
template<typename TInternalComputationValueType>
class ITK_TEMPLATE_EXPORT QuasiNewtonOptimizerv4EstimateNewtonStepThreaderTemplate
  : public DomainThreader< ThreadedIndexedContainerPartitioner, QuasiNewtonOptimizerv4Template<TInternalComputationValueType> >
{
public:
  ITK_DISALLOW_COPY_AND_ASSIGN(QuasiNewtonOptimizerv4EstimateNewtonStepThreaderTemplate);

  /** Standard class type aliases. */
  using Self = QuasiNewtonOptimizerv4EstimateNewtonStepThreaderTemplate;
  using Superclass =
      DomainThreader< ThreadedIndexedContainerPartitioner, QuasiNewtonOptimizerv4Template<TInternalComputationValueType> >;
  using Pointer = SmartPointer< Self >;
  using ConstPointer = SmartPointer< const Self >;

  itkTypeMacro( QuasiNewtonOptimizerv4EstimateNewtonStepThreaderTemplate, DomainThreader );

  itkNewMacro( Self );

  using DomainType = typename Superclass::DomainType;
  using AssociateType = typename Superclass::AssociateType;
  using IndexRangeType = DomainType;

protected:
  void ThreadedExecution( const IndexRangeType & subrange,
                                  const ThreadIdType threadId ) override;

  QuasiNewtonOptimizerv4EstimateNewtonStepThreaderTemplate() = default;
  ~QuasiNewtonOptimizerv4EstimateNewtonStepThreaderTemplate() override = default;
};

/** This helps to meet backward compatibility */
using QuasiNewtonOptimizerv4EstimateNewtonStepThreader = QuasiNewtonOptimizerv4EstimateNewtonStepThreaderTemplate<double>;

} // end namespace itk

#ifndef ITK_MANUAL_INSTANTIATION
#include "itkQuasiNewtonOptimizerv4EstimateNewtonStepThreader.hxx"
#endif

#endif


text:
using Azure.Messaging.ServiceBus;
using Paramore.Brighter.MessagingGateway.AzureServiceBus.ClientProvider;

namespace Paramore.Brighter.MessagingGateway.AzureServiceBus.AzureServiceBusWrappers
{
    internal class ServiceBusReceiverProvider : IServiceBusReceiverProvider
    {
        private readonly ServiceBusClient _client;

        public ServiceBusReceiverProvider(IServiceBusClientProvider clientProvider)
        {
            _client = clientProvider.GetServiceBusClient();
        }

        public IServiceBusReceiverWrapper Get(string topicName, string subscriptionName, ServiceBusReceiveMode receiveMode)
        {
            var messageReceiver = _client.CreateReceiver(topicName, subscriptionName,
                new ServiceBusReceiverOptions() {ReceiveMode = receiveMode,});
            return new ServiceBusReceiverWrapper(messageReceiver);
        }
    }
}


text:
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { EditorComponent } from './editor.component';

const routes: Routes = [{ path: '', component: EditorComponent }];

@NgModule({
    imports: [RouterModule.forChild(routes)],
    exports: [RouterModule]
})
export class EditorRoutingModule { }


text:
package services

import java.net.InetSocketAddress
import javax.inject.{Inject, Singleton}

import com.kli.hot.potato.v0.models.Player
import com.kli.hot.potato.v0.models.json._
import com.loopfor.zookeeper.{ACL, Configuration => ZkConfig, Ephemeral, Zookeeper}
import play.api.inject.ApplicationLifecycle
import play.api.libs.json.Json
import play.api.{Configuration, Logger}

import scala.concurrent.Future
import scala.util.{Random, Try}

@Singleton
class PlayerRegistry @Inject() (config: Configuration, appLifeCycle: ApplicationLifecycle){
  val address = new InetSocketAddress("localhost", 2181)
  val zkConfig = ZkConfig(address::Nil)
  val zkClient = Zookeeper(zkConfig)

  val ownPort = config.getInt("http.port").get
  val self = Player(s"player-$ownPort", ownPort)

  // Register ones-self with zookeeper
  val selfPath = s"/hot-potato/${self.name}.json"
  Logger.info(s"Registering player @ $selfPath")
  zkClient.sync.create(selfPath, Json.toJson(self).toString.getBytes, ACL.AnyoneAll, Ephemeral)

  appLifeCycle.addStopHook { () =>
    Try {
      unregisterSelf()
    }

    Future.successful[Unit]()
  }

  def getRandomOpponent: Option[Player] = {
    val opponents = zkClient.sync.children("/hot-potato").filterNot( nodeName => nodeName == s"${self.name}.json" )
    if (opponents.isEmpty) {
      None
    } else {
      val i = Random.nextInt(opponents.length)
      val (data, status) = zkClient.sync.get(s"/hot-potato/${opponents(i)}")
      val player = Json.fromJson[Player](Json.parse(data)).get

      Some(player)
    }
  }

  def getPlayers: Seq[Player] = {
    val nodes = zkClient.sync.children("/hot-potato")
    nodes.map{ node =>
      val (data, status) = zkClient.sync.get(s"/hot-potato/$node")
      Json.fromJson[Player](Json.parse(data)).get
    }
  }

  def unregisterSelf(): Unit = zkClient.sync.delete(selfPath, None)

}


text:
API

Waves.init(config)

Initialise Waves with an optional config.

                    Arguments

config - (optional) Configuration object for displaying Waves effect.

{{#code class="lang-javascript"}}
var config = {
    // How long Waves effect duration
    // when it's clicked (in milliseconds)
    duration: 500,

    // Delay showing Waves effect on touch
    // and hide the effect if user scrolls
    // (0 to disable delay) (in milliseconds)
    delay: 200
};

// Initialise Waves with the config
Waves.init(config);
{{/code}}

Waves.attach(elements, classes)

Attach ripple effect by adding .waves-effect to HTML element. Make sure you call Waves.init() to activated the ripple.

Arguments

elements - A string selector, DOM element, or array of DOM elements to add .waves-effect and other classes to.

classes - (optional) Waves classes to add to theses elements, for example: 'waves-light waves-classic'. Accepts a single string, or array of classes.

{{#code class="lang-javascript"}}
// Adds .waves-effect and .waves-light to <button> elems
Waves.attach('button', 'waves-light');

// Make .box ripple when user moves the mouse over it
// with no additional classes
Waves.attach('.box', null);
{{/code}}

Waves.ripple(elements, options)

Create a ripple effect in HTML element programmaticaly.

Arguments

elements - A string selector, DOM element, or array of DOM elements. Note: the elements must have the .waves-effect class already applied, it can be added via Waves.attach(elements)

options - (optional) Specify how long to wait between starting and stopping the ripple, and it's position inside the element.

{{#code class="lang-javascript"}}
// Default values for options
var options = {
    wait: 0,        // null = infinite
    position: null  // null = centre
};
{{/code}}

{{#code class="lang-javascript"}}
// Cause a ripple to occur on .box
Waves.ripple('.box');

// Ripple with a 1s delay between starting
// and stopping the ripple, centred at
// (20px, 20px) inside .box
var options = {
    wait: 1000, //ms
    position: { // This position relative to HTML element.
        x: 20, //px
        y: 20  //px
    }
};
Waves.ripple('.box', options);
{{/code}}

Waves.calm(elements)

Remove all ripples from inside an element immediately.

Arguments

elements - A string selector for elements to remove ripples from.

{{#code class="lang-javascript"}}
// Cause a non-terminating ripple at centre of .box
Waves.ripple('.box', {wait: null});

// ...

// Clear all ripples from .box
Waves.calm('.box');

// Ripple on hover
$('button').mouseenter(function() {
    Waves.ripple(this, {wait: null});
}).mouseleave(function() {
    Waves.calm(this);
});
{{/code}}


text:
import uuid
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, Integer, String, Sequence

Base = declarative_base()

class Subscription(Base):
    __tablename__ = 'subscriptions'

    id      = Column(Integer, Sequence('subscription_id_seq'), primary_key=True)
    sr_id   = Column(String, index=True)
    method  = Column(String)
    contact = Column(String)
    key    = Column(String, index=True)

    def __init__(self, **kwargs):
        # if we aren't being initialized with a unique key, create one
        if 'key' not in kwargs:
            self.key = self.generate_uuid()

        super(Subscription, self).__init__(**kwargs)

    def generate_uuid(self):
        '''Generate a unique key for this subscription.'''
        return str(uuid.uuid4()).replace('-', '')

class UpdateInfoItem(Base):
    __tablename__ = 'updateinfo'

    key   = Column(String, primary_key=True)
    value = Column(String)


text:
        This metric reports the number of lines of product code in the project.
        Comments are counted for purposes of this metric, but whitespace is not.

Abbreviation: LOCp

Powered by MetricsReloaded


text:
package org.zazukoians.zz2h.style

import org.apache.clerezza.platform.typerendering._
import org.apache.clerezza.rdf.scala.utils.RichGraphNode
import org.apache.clerezza.rdf.ontologies._
import org.apache.clerezza.rdf.core._
import org.apache.clerezza.rdf.utils._
import org.apache.clerezza.rdf.scala.utils.Preamble._
import org.apache.clerezza.platform.typerendering.scala._
import org.osgi.service.component.annotations._

/**
 * Renders resources using ld2h on the client.
 */
@Component(service = Array(classOf[TypeRenderlet]))
class ResourceRenderlet extends SRenderlet {

  val getRdfType = RDFS.Resource

  override def getModePattern = "(?!.*naked)(?!.*menu).*"

  protected def defaultTitle(res: RichGraphNode) = "A Resource" + (res*)

  override def renderedPage(arguments: XmlResult.Arguments) = {
    new XmlResult(arguments) {
      def menuLink(href: String, label: String) =
        if ((res*).endsWith(href) || (res*).endsWith(href + "index")) {
          { label }
        } else {
          { label }
        }
      override def content = {

            <title>{"A Resource" + (res*)}</title>
            <link rel="matchers" href="/zz2h/matchers" type="text/turtle" />

This will be replaced by rendered RDF.

      }
    }
  }

}


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

using SchoolSystem.Cli.Core.Commands.Contracts;
using SchoolSystem.Cli.Core.Contracts;

namespace SchoolSystem.Cli.Core.Providers
{
    public class CommandParserProvider : IParser
    {
        public ICommand ParseCommand(string fullCommand)
        {
            var commandName = fullCommand.Split(' ')[0];
            var commandTypeInfo = this.FindCommand(commandName);
            var command = Activator.CreateInstance(commandTypeInfo) as ICommand;

            return command;
        }

        public IList<string> ParseParameters(string fullCommand)
        {
            var commandParts = fullCommand.Split(' ').ToList();
            commandParts.RemoveAt(0);

            if (commandParts.Count() == 0)
            {
                return null;
            }

            return commandParts;
        }

        private TypeInfo FindCommand(string commandName)
        {
            var currentAssembly = this.GetType().GetTypeInfo().Assembly;
            var commandTypeInfo = currentAssembly.DefinedTypes
                .Where(type => type.ImplementedInterfaces.Any(inter => inter == typeof(ICommand)))
                .Where(type => type.Name.ToLower().Contains(commandName.ToLower()))
                .SingleOrDefault();

            if (commandTypeInfo == null)
            {
                throw new ArgumentException("The passed command is not found!");
            }

            return commandTypeInfo;
        }
    }
}


text:
export const CREATE_ENTITY_SET_REQUEST = 'CREATE_ENTITY_SET_REQUEST';
export const CREATE_ENTITY_SET_REJECT = 'CREATE_ENTITY_SET_REJECT';
export const CREATE_ENTITY_SET_RESOLVE = 'CREATE_ENTITY_SET_RESOLVE';
export const CREATE_ENTITY_SET_RESET = 'CREATE_ENTITY_SET_RESET';


text:
// Type: Highsoft.Web.Mvc.Stocks.ArearangeSeriesDataLabelsOverflow

namespace Highsoft.Web.Mvc.Stocks
{
    public enum ArearangeSeriesDataLabelsOverflow
    {
        Justify,
        None,
    }
}


text:
// *****************************************************************************
//
//  © Component Factory Pty Ltd 2012. All rights reserved.
//	The software and associated documentation supplied hereunder are the
//  proprietary information of Component Factory Pty Ltd, 17/267 Nepean Hwy,
//  Seaford, Vic 3198, Australia and are supplied subject to licence terms.
//
//  Version 4.4.1.0 	www.ComponentFactory.com
// *****************************************************************************

using System;
using System.IO;
using System.Drawing;
using System.ComponentModel;
using System.Windows.Forms;
using System.Diagnostics;
using System.Collections.Generic;
using System.Reflection;
using ComponentFactory.Krypton.Toolkit;

namespace ComponentFactory.Krypton.Navigator
{
	/// <summary>
    /// Implements the NavigatorMode.OutlookFull mode.
	/// </summary>
    internal class ViewBuilderOutlookFull : ViewBuilderOutlookBase
    {
        #region Instance Fields
        private ViewLayoutOutlookFull _viewOutlook;
        #endregion

        #region Public
        /// <summary>
        /// Gets the top level control of the source.
        /// </summary>
        public override Control SeparatorControl
        {
            get { return _viewOutlook.ViewControl.ChildControl; }
        }

        /// <summary>
        /// Gets the box representing the minimum and maximum allowed splitter movement.
        /// </summary>
        public override Rectangle SeparatorMoveBox
        {
            get { return _viewOutlook.ViewControl.ChildControl.ClientRectangle; }
        }

        /// <summary>
        /// Gets a value indicating if the mode is a tab strip style mode.
        /// </summary>
        public override bool IsTabStripMode
        {
            get { return false; }
        }

        /// <summary>
        /// Process a change in the selected page
        /// </summary>
        public override void SelectedPageChanged()
        {
            // If we have a selected page then we need to bring it into view
            if (Navigator.SelectedPage != null)
            {
                // We should have a view for representing the page
                if (_pageStackLookup.ContainsKey(Navigator.SelectedPage))
                {
                    // Get the check button used to represent the selected page
                    ViewDrawNavCheckButtonBase selected = _pageStackLookup[Navigator.SelectedPage];

                    // Can only bring page into view if actually visible
                    if (selected.Visible)
                    {
                        // Get the client rectangle of the check button
                        Rectangle buttonRect = selected.ClientRectangle;

                        // Ask the viewport to bring this rectangle into view
                        _viewOutlook.BringIntoView(buttonRect);
                    }
                }
            }

            // Let base class perform common actions
            base.SelectedPageChanged();
        }

        /// <summary>
        /// Ensure the correct state palettes are being used.
        /// </summary>
        public override void UpdateStatePalettes()
        {
            PaletteBorderEdge buttonEdge;

            // If whole navigator is disabled then all of view is disabled
            bool enabled = Navigator.Enabled;

            // If there is no selected page
            if (Navigator.SelectedPage == null)
            {
                // Then use the states defined in the navigator itself
                if (Navigator.Enabled)
                    buttonEdge = Navigator.StateNormal.BorderEdge;
                else
                    buttonEdge = Navigator.StateDisabled.BorderEdge;
            }
            else
            {
                // Use states defined in the selected page
                if (Navigator.SelectedPage.Enabled)
                    buttonEdge = Navigator.SelectedPage.StateNormal.BorderEdge;
                else
                    buttonEdge = Navigator.SelectedPage.StateDisabled.BorderEdge;
            }

            // Update the main view elements
            _viewOutlook.Enabled = enabled;
            _viewOutlook.SetPalettes(buttonEdge);

            // Let base class perform common actions
            base.UpdateStatePalettes();
        }

        /// <summary>
        /// Is the provided over a part of the view that wants the mouse.
        /// </summary>
        /// <param name="pt">Mouse point.</param>
        /// <returns>True if the view wants the mouse position; otherwise false.</returns>
        public override bool DesignerGetHitTest(Point pt)
        {
            if (base.DesignerGetHitTest(pt))
                return true;

            // Check that the point is into the stack scrolling viewport
            if (_viewOutlook.ClientRectangle.Contains(pt))
            {
                // Get the control that owns the view layout
                Control owningControl = _viewLayout.OwningControl;

                // Convert incoming point from navigator to owning control
                pt = owningControl.PointToClient(Navigator.PointToScreen(pt));

                // Check if any of the stack check buttons want the point
                foreach (ViewBase item in _viewLayout)
                    if (item is ViewDrawNavOutlookStack)
                        if (item.ClientRectangle.Contains(pt))
                            return true;

                // Check if any of the overflow check buttons want the point
                foreach (ViewBase item in _viewOverflowLayout)
                    if (item is ViewDrawNavOutlookOverflow)
                        if (item.ClientRectangle.Contains(pt))
                            return true;
            }

            return false;
        }

        /// <summary>
        /// Destruct the previously created view.
        /// </summary>
        public override void Destruct()
        {
            // Unhook from events
            _viewOutlook.AnimateStep -= new EventHandler(OnViewportAnimation);

            // Put the child panel back into the navigator
            _viewOutlook.RevertParent(Navigator, Navigator.ChildPanel);

            // Let base class perform common operations
            base.Destruct();
        }
        #endregion

        #region Protected
        /// <summary>
        /// Creates and returns the view element that laysout the main client area.
        /// </summary>
        /// <returns></returns>
        protected override ViewBase CreateMainLayout()
        {
            // Layout contains all the stack elements
            _viewLayout = new ViewLayoutDocker();
            _viewLayout.PreferredSizeAll = true;

            // Cache the border edge palette to use
            PaletteBorderEdge buttonEdgePalette = (Navigator.Enabled ? Navigator.StateNormal.BorderEdge :
                                                                       Navigator.StateDisabled.BorderEdge);

            // Create the scrolling viewport and pass in the _viewLayout as the content to scroll
            _viewOutlook = new ViewLayoutOutlookFull(this, Navigator, _viewLayout, buttonEdgePalette, null, PaletteMetricPadding.None,
                                                     PaletteMetricInt.None, VisualOrientation.Top, RelativePositionAlign.Near, false,
                                                     (Navigator.Outlook.Orientation == Orientation.Vertical), NeedPaintDelegate);

            // Reparent the child panel that contains the actual pages, into the child control
            _viewOutlook.MakeParent(Navigator.ChildPanel);

            return _viewOutlook;
        }

        /// <summary>
        /// Create an overflow check button.
        /// </summary>
        /// <param name="page">Page to associate the check button with.</param>
        /// <param name="checkButtonOrient">Orientation of the check button.</param>
        /// <param name="dockFar">Docking position of the check button.</param>
        /// <returns></returns>
        protected override ViewDrawNavOutlookOverflow CreateOverflowItem(KryptonPage page,
                                                                         VisualOrientation checkButtonOrient,
                                                                         ViewDockStyle dockFar)
        {
            // Let base class create the actual check button
            ViewDrawNavOutlookOverflow checkButton = base.CreateOverflowItem(page, checkButtonOrient, dockFar);

            // Add to the end of the overflow collection
            _viewOverflowLayout.Add(checkButton, dockFar);

            return checkButton;
        }

        /// <summary>
        /// Allow operations to occur after main construct actions.
        /// </summary>
        protected override void PostConstruct()
        {
            // Hook into the viewport animation steps
            _viewOutlook.AnimateStep += new EventHandler(OnViewportAnimation);
            base.PostConstruct();
        }

        /// <summary>
        /// Bring the specified page into view within the viewport.
        /// </summary>
        /// <param name="page">Page to bring into view.</param>
        protected override void BringPageIntoView(KryptonPage page)
        {
            // Remember the view for the requested page
            ViewDrawNavCheckButtonBase viewPage = null;

            // Make sure only the selected page is checked
            foreach (ViewDrawNavCheckButtonBase child in _pageStackLookup.Values)
            {
                // Should this check button be selected
                if (Navigator.SelectedPage == child.Page)
                {
                    viewPage = child;
                    break;
                }
            }

            // If we found a matching view
            if (viewPage != null)
            {
                // Ask the viewport to bring this rectangle of the view
                _viewOutlook.BringIntoView(viewPage.ClientRectangle);
            }
        }

        /// <summary>
        /// Process the change in a property that might effect the view builder.
        /// </summary>
        /// <param name="sender">Source of the event.</param>
        /// <param name="e">Property changed details.</param>
        protected override void OnViewBuilderPropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            switch (e.PropertyName)
            {
                case "OrientationOutlook":
                    _viewOutlook.VerticalViewport = (Navigator.Outlook.Orientation == Orientation.Vertical);
                    break;
            }

            // Let base class perform other actions
            base.OnViewBuilderPropertyChanged(sender, e);
        }
        #endregion

        #region Implementation
        private void OnViewportAnimation(object sender, EventArgs e)
        {
            Navigator.PerformNeedPaint(true);
        }
        #endregion
    }
}


text:
We have not approved your account yet

Hang in there. We will contact you if we need more information.

If you have questions please <a href="<?=$our_email?>">email us.


text:
<?php
namespace RtLopez;

/**
 * Fixed-point implementation
 * @author rtlopez
 */
class DecimalFixed extends Decimal
{
  private $scale = 1;

  public function __construct($value = 0, $prec = null)
  {
    parent::__construct($value, $prec);
    $this->scale = pow(10, $this->prec);
    $this->value = $this->_normalize($value);
  }

  public function toString()
  {
    $sign = '';
    if($this->value >= 0)
    {
      $total = floor($this->value / $this->scale);
      $factor = $this->value - ($total * $this->scale);
    }
    else
    {
      $total = ceil($this->value / $this->scale);
      $factor = ($total * $this->scale) - $this->value;
      $sign = '-';
    }
    return $this->_trim(sprintf('%s%d.%0' . $this->prec . 'd', $sign, abs($total), $factor));
  }

  protected function _add(Decimal $op)
  {
    return $this->value + $op->value;
  }

  protected function _sub(Decimal $op)
  {
    return $this->value - $op->value;
  }

  protected function _mul(Decimal $op)
  {
    return $this->value * $op->value / $this->scale;
  }

  protected function _div(Decimal $op)
  {
    return $this->value / $op->value * $this->scale;
  }

  protected function _mod(Decimal $op)
  {
    return $this->truncate()->value % $op->value;
  }

  protected function _pow(Decimal $op)
  {
    return pow($this->value / $this->scale, $op->value / $this->scale) * $this->scale;
  }

  protected function _sqrt()
  {
    return sqrt($this->value / $this->scale) * $this->scale;
  }

  protected function _round($number, $prec = null)
  {
    $prec = $prec !== null ? $prec : 0;
    return (int)round($number, $prec - $this->prec);
  }

  protected function _ceil($number, $prec = 0)
  {
    $scale = pow(10, $this->prec - $prec);
    return ceil($number / $scale) * $scale;
  }

  protected function _floor($number, $prec = 0)
  {
    $scale = pow(10, $this->prec - $prec);
    return floor($number / $scale) * $scale;
  }

  protected function _eq(Decimal $op)
  {
    return $this->value == $op->value;
  }

  protected function _lt(Decimal $op)
  {
    return $this->value < $op->value;
  }

  protected function _gt(Decimal $op)
  {
    return $this->value > $op->value;
  }

  protected function _fix($value)
  {
    return $this->_round($value, $this->prec);
  }

  protected function _normalize($op)
  {
    if($op instanceof $this)
    {
      $scale = pow(10, $this->prec - $op->prec);
      return $this->_fix($op->value * $scale);
    }
    else
    {
      return $this->_fix((string)$op * $this->scale);
    }
  }
}


text:
using System;
using CoreGraphics;
using Foundation;
using UIKit;

using Masonry;

namespace MasonrySample
{
	public class ViewController : UIViewController
	{
		private CGSize buttonSize = new CGSize (100, 100);
		private UIButton growingButton;

		private bool topLeft = true;
		private UIButton movingButton;

		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();

			View.BackgroundColor = UIColor.White;

			// create the sub views

			var greenView = new UIView ();
			greenView.BackgroundColor = UIColor.Green;
			greenView.Layer.BorderColor = UIColor.Black.CGColor;
			greenView.Layer.BorderWidth = 2;
			View.AddSubview (greenView);

			var redView = new UIView ();
			redView.BackgroundColor = UIColor.Red;
			redView.Layer.BorderColor = UIColor.Black.CGColor;
			redView.Layer.BorderWidth = 2;
			View.AddSubview (redView);

			var blueView = new UIView ();
			blueView.BackgroundColor = UIColor.Blue;
			blueView.Layer.BorderColor = UIColor.Black.CGColor;
			blueView.Layer.BorderWidth = 2;
			View.AddSubview (blueView);

			// create the constraints

			var padding = 10;
			var superview = View;

			// basic constraints

			greenView.MakeConstraints (make => {
				make.Top.And.Left.EqualTo (superview).Offset (padding); // chain .Top and .Left
				make.Bottom.EqualTo (blueView.Top ()).Offset (-padding);
				make.Right.EqualTo (redView.Left ()).Offset (-padding);

				make.Width.EqualTo (redView.Width ());

				make.Height.EqualTo (redView.Height ());
				make.Height.EqualTo (blueView.Height ());
			});

			// .With and .And are semantic and optional
			redView.MakeConstraints (make => {
				make.Top.EqualTo (superview.Top ()).With.Offset (padding); // with .Width
				make.Left.EqualTo (greenView.Right ()).Offset (padding); // no .Width
				make.Bottom.EqualTo (blueView.Top ()).And.Offset (-padding); // with .And
				make.Right.EqualTo (superview.Right ()).Offset (-padding); // no .And
				make.Width.EqualTo (greenView.Width ());

				make.Height.EqualTo (NSArray.FromNSObjects (new []{ greenView, blueView })); // can pass array of views
			});

			blueView.MakeConstraints (make => {
				make.Top.EqualTo (greenView.Bottom ()).Offset (padding);
				make.Left.EqualTo (superview.Left ()).Offset (padding);
				make.Bottom.EqualTo (superview.Bottom ()).Offset (-padding);
				make.Right.EqualTo (superview.Right ()).Offset (-padding);
				make.Height.EqualTo (NSArray.FromNSObjects (new [] { greenView.Height (), redView.Height( ) })) ; // can pass array of attributes
			});

			// demonstrate update

			growingButton = new UIButton(UIButtonType.System);
			growingButton.SetTitle("Grow Me!", UIControlState.Normal);
			growingButton.BackgroundColor = UIColor.White;
			growingButton.Layer.BorderColor = UIColor.Green.CGColor;
			growingButton.Layer.BorderWidth = 3;
			View.AddSubview(growingButton);

			growingButton.TouchUpInside += delegate {
				buttonSize = new CGSize (buttonSize.Width * 1.3f, buttonSize.Height * 1.3f);

				// tell constraints they need updating
				View.SetNeedsUpdateConstraints ();

				// update constraints now so we can animate the change
				View.UpdateConstraintsIfNeeded ();

				UIView.Animate (0.4, () => View.LayoutIfNeeded ());
			};

			// demonstrate remake

			movingButton = new UIButton(UIButtonType.System);
			movingButton.SetTitle("Move Me!", UIControlState.Normal);
			movingButton.BackgroundColor = UIColor.White;
			movingButton.Layer.BorderColor = UIColor.Green.CGColor;
			movingButton.Layer.BorderWidth = 3;
			View.AddSubview(movingButton);

			movingButton.TouchUpInside += delegate {
				topLeft = !topLeft;

				// tell constraints they need updating
				View.SetNeedsUpdateConstraints ();

				// update constraints now so we can animate the change
				View.UpdateConstraintsIfNeeded ();

				UIView.Animate (0.4, () => View.LayoutIfNeeded ());
			};
		}

		public override void UpdateViewConstraints ()
		{
			// update is used only when updating the constant value
			growingButton.UpdateConstraints (make => {
				make.Center.EqualTo (View);
				make.Width.EqualTo (NSNumber.FromNFloat (buttonSize.Width)).PriorityLow ();
				make.Height.EqualTo (NSNumber.FromNFloat (buttonSize.Height)).PriorityLow ();
				make.Width.LessThanOrEqualTo (View);
				make.Height.LessThanOrEqualTo (View);
			});

			// remake is used when changing constraints
			movingButton.RemakeConstraints (make => {
				make.Height.EqualTo (NSNumber.FromNFloat (100));
				make.Width.EqualTo (movingButton.Height ()).MultipliedBy (2.0f);

				if (topLeft) {
					make.Left.EqualTo (View.LeftMargin ());
					make.Top.EqualTo (this.TopLayoutGuide ());
				} else {
					make.Right.EqualTo (View.RightMargin ());
					make.Bottom.EqualTo (this.BottomLayoutGuide ());
				}
			});

			base.UpdateViewConstraints ();
		}
	}
}


text:
// Copyright (c) Autofac Project. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

namespace Autofac.Test.Scenarios.ScannedAssembly.MetadataAttributeScanningScenario
{
    [Name("My Name")]
    public class OpenGenericScannedComponentWithName<T>
    {
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<beans
        xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
                           http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
                           http://camel.apache.org/schema/spring
                           http://camel.apache.org/schema/spring/camel-spring.xsd"
        >

    <camelContext id="first" xmlns="http://camel.apache.org/schema/spring">
        <restConfiguration component="resteasy" >
            <componentProperty key="proxyConsumersClasses" value="org.apache.camel.component.resteasy.test.beans.ProxyServiceInterface"/>
            <endpointProperty key="servletName" value="resteasy-camel-servlet"/>
            <endpointProperty key="proxy" value="true"/>
        </restConfiguration>

        <rest path="/proxy">
            <get uri="/get">
                <to uri="direct:start"/>
            </get>
        </rest>

        <route>
            <from uri="direct:start"/>
            <setHeader headerName="CamelHttpResponseCode">
                <constant>200</constant>
            </setHeader>
            <setBody>
                <constant>Address from ProxyInterface</constant>
            </setBody>
        </route>
    </camelContext>

    <bean id="resteasy" class="org.apache.camel.component.resteasy.ResteasyComponent">
        <property name="proxyConsumersClasses" value="org.apache.camel.component.resteasy.test.beans.ProxyServiceInterface"/>
    </bean>

</beans>