text:
// ECMAScript 5 strict mode
"use strict";

assert2(cr, "cr namespace not created");
assert2(cr.behaviors, "cr.behaviors not created");

/////////////////////////////////////
// Behavior class
cr.behaviors.Rex_Duration = function(runtime)
{
	this.runtime = runtime;
};

(function ()
{

    // TimerCacheKlass
    var TimerCacheKlass = function ()
    {
        this.lines = [];
    };
    var TimerCacheKlassProto = TimerCacheKlass.prototype;

	TimerCacheKlassProto.alloc = function(timeline, on_timeout)
	{
        var timer;
        if (this.lines.length > 0)
        {
            timer = this.lines.pop();
			timer.Reset();
        }
        else
        {
            timer = timeline.CreateTimer(on_timeout);
        }
		return timer;
	};

	TimerCacheKlassProto.free = function(timer)
	{
        this.lines.push(timer);
	};
	// TimerCacheKlass
	cr.behaviors.Rex_Duration.timer_cache = new TimerCacheKlass();

	var behaviorProto = cr.behaviors.Rex_Duration.prototype;

	/////////////////////////////////////
	// Behavior type class
	behaviorProto.Type = function(behavior, objtype)
	{
		this.behavior = behavior;
		this.objtype = objtype;
		this.runtime = behavior.runtime;
	};

	var behtypeProto = behaviorProto.Type.prototype;

	behtypeProto.onCreate = function()
	{
        this.timeline = null;
        this.timelineUid = -1;    // for loading
        this.timer_cache = cr.behaviors.Rex_Duration.timer_cache;
	};

    behtypeProto._timeline_get = function ()
    {
        if (this.timeline != null)
            return this.timeline;

        assert2(cr.plugins_.Rex_TimeLine, "Duration behavior: Can not find timeline oject.");
        var plugins = this.runtime.types;
        var name, inst;
        for (name in plugins)
        {
            inst = plugins[name].instances[0];
            if (inst instanceof cr.plugins_.Rex_TimeLine.prototype.Instance)
            {
                this.timeline = inst;
                return this.timeline;
            }
        }
        assert2(this.timeline, "Duration behavior: Can not find timeline oject.");
        return null;
    };

	behtypeProto.timer_create = function(on_timeout, plugin)
	{
	    var timer = this.timer_cache.alloc(this._timeline_get(), on_timeout);
		timer.plugin = plugin;
        return timer;
	};

	behtypeProto.timer_free = function(timer)
	{
	    timer.plugin = null;
        this.timer_cache.free(timer);
	};

	behtypeProto.timer_cache_clean = function()
	{
        this.timer_cache.lines.length = 0;
	};

	/////////////////////////////////////
	// Behavior instance class
	behaviorProto.Instance = function(type, inst)
	{
		this.type = type;
		this.behavior = type.behavior;
		this.inst = inst;				// associated object instance to modify
		this.runtime = type.runtime;
	};

	var behinstProto = behaviorProto.Instance.prototype;

	behinstProto.onCreate = function()
	{
	    if (!this.recycled)
	    {
            this.timers = {};
        }
		this.sync_timescale = (this.properties[0] == 1);
        this._trigger_duration_name = "";
        this.is_my_call = false;
        this.timers_save = null;
        this.timer_cache = cr.behaviors.Rex_Duration.timer_cache;
        this.pre_ts = 1;
	};

	behinstProto.onDestroy = function()
	{
        var name, timer;
        for (name in this.timers)
        {
            this.destroy_timer(name);
        }
	};

	behinstProto.create_timer = function (duration_name)
	{
	    var timer = this.timers[duration_name];
	    if (timer != null)
	    {
	        timer.Remove();
	        return timer;
	    }

        timer = this.type.timer_create(on_timeout, this);
        timer._duration_name = duration_name;
        this.timers[duration_name] = timer;
        return timer;
	};

	behinstProto.destroy_timer = function (duration_name)
	{
        var timer = this.timers[duration_name];
        if (timer == null)
            return;

        timer.Remove();
        delete this.timers[duration_name];
        this.type.timer_free(timer);
	};

	behinstProto.tick = function ()
	{
	    if (this.sync_timescale)
            this.sync_ts();
	};

    // handler of timeout for timers in this plugin, this=timer
    var on_timeout = function ()
    {
        this.plugin.on_timeout(this);
    };

    behinstProto.on_timeout = function(timer)
    {
        var duration_name = timer._duration_name;
        this._trigger_duration_name = duration_name;
        var duration_remain = timer._duration_remain_time;
        var interval = timer._interval_time;

        // run start callback
        if (timer.run_start)
        {
            timer.run_start = false;
            this.run_callback(cr.behaviors.Rex_Duration.prototype.cnds.OnStart);
        }
        else  // others
        {
            if (duration_remain <= interval)
            {
                timer._duration_remain_time = 0;
                if (duration_remain == interval)
                    this.run_callback(cr.behaviors.Rex_Duration.prototype.cnds.OnInterval);
                this.run_callback(cr.behaviors.Rex_Duration.prototype.cnds.OnEnd);
            }
            else
            {
                duration_remain -= interval;
                timer._duration_remain_time = duration_remain;
                this.run_callback(cr.behaviors.Rex_Duration.prototype.cnds.OnInterval);
            }
        }

        if (timer._duration_remain_time > 0)
            timer.Start(Math.min(duration_remain, interval));
        else
            this.destroy_timer(duration_name);
    };

    behinstProto.run_callback = function(callback)
    {
        this.is_my_call = true;
        this.runtime.trigger(callback, this.inst);
        this.is_my_call = false;
    };

    var remain_time_get = function (timer)
    {
        return timer._duration_remain_time - timer.ElapsedTimeGet();
    };

	behinstProto.sync_ts = function ()
	{
	    var ts = this.get_timescale();
	    if (this.pre_ts == ts)
	        return;

	    var n;
	    for (n in this.timers)
	        this.timers[n].SetTimescale(ts);

	    this.pre_ts = ts;
	};

	behinstProto.get_timescale = function ()
	{
	    var ts = this.inst.my_timescale;
	    if (ts == -1)
	        ts = 1;
	    return ts;
	};

	behinstProto.saveToJSON = function ()
	{
	    var tims_save = {};
        var name, timer, timer_save;
        for (name in this.timers)
        {
            timer = this.timers[name];
            timer_save = timer.saveToJSON();
            timer_save["_dt"] = timer._duration_time;
            timer_save["_it"] = timer._interval_time;
            timer_save["_drt"] = timer._duration_remain_time;
            timer_save["_iss"] = timer.run_start;
            tims_save[name] = timer_save;

        }
		return { "tims": tims_save,
                 "tluid": (this.type.timeline != null)? this.type.timeline.uid: (-1)
                };
	};

	behinstProto.loadFromJSON = function (o)
	{
        this.timers_save = o["tims"];
        this.type.timelineUid = o["tluid"];
        this.type.timer_cache_clean();
	};

	behinstProto.afterLoad = function ()
	{
		if (this.type.timelineUid === -1)
			this.type.timeline = null;
		else
		{
			this.type.timeline = this.runtime.getObjectByUID(this.type.timelineUid);
			assert2(this.type.timeline, "Timer: Failed to find timeline object by UID");
		}

        if (this.timers_save == null)
            this.timers = {};
        else
        {
            var name, timer, timer_save;
            for (name in this.timers_save)
            {
                timer_save = this.timers_save[name];
                timer = this.create_timer(name);

                timer._duration_time = timer_save["_dt"];
                timer._interval_time = timer_save["_it"];
                timer._duration_remain_time = timer_save["_drt"];
                timer.run_start = timer_save["_iss"];

                timer.loadFromJSON(timer_save);
                timer.afterLoad();
            }
        }
        this.timers_save = null;
	};
	//////////////////////////////////////
	// Conditions
	function Cnds() {};
	behaviorProto.cnds = new Cnds();

	Cnds.prototype.IsRunning = function (name)
	{
        var timer = this.timers[name];
        return (timer != null);
	};

	Cnds.prototype.OnStart = function (name)
	{
        return ((this._trigger_duration_name == name) && this.is_my_call);
	};

	Cnds.prototype.OnInterval = function (name)
	{
        return ((this._trigger_duration_name == name) && this.is_my_call);
	};

	Cnds.prototype.OnEnd = function (name)
	{
        return ((this._trigger_duration_name == name) && this.is_my_call);
	};

	//////////////////////////////////////
	// Actions
	function Acts() {};
	behaviorProto.acts = new Acts();

    // ---- deprecated ----
    Acts.prototype.Setup_deprecated = function () { };
    Acts.prototype.Start_deprecated = function () { };
    // ---- deprecated ----

    Acts.prototype.Start = function (duration_name, duration_time, interval_time)
	{
        var timer = this.create_timer(duration_name);

        timer._duration_time = duration_time;
        timer._interval_time = interval_time;
        timer._duration_remain_time = duration_time;
        timer.run_start = true;
        timer.Start(0);

		if (this.sync_timescale)
		{
            timer.SetTimescale(this.get_timescale());
	    }
	};

    Acts.prototype.Pause = function (duration_name)
	{
        var timer = this.timers[duration_name];
        if (timer != null)
            timer.Suspend();
	};

    Acts.prototype.Resume = function (duration_name)
	{
        var timer = this.timers[duration_name];
        if (timer != null)
            this.timer.Resume();
	};

    Acts.prototype.ForceToEnd = function (duration_name)
	{
	    var timer = this.timers[duration_name];
	    if ((timer != null) && (!timer.run_start))
		{
		    this._trigger_duration_name = duration_name;
		    this.run_callback(cr.behaviors.Rex_Duration.prototype.cnds.OnEnd);
		}
	    this.destroy_timer(duration_name);
	};

    Acts.prototype.PauseAll = function ()
	{
        var name, timer;
        for (name in this.timers)
        {
            timer = this.timers[name];
            if (timer.IsActive());
                timer.Suspend();
        }
	};

    Acts.prototype.ResumeAll = function ()
	{
        var name, timer;
        for (name in this.timers)
        {
            timer = this.timers[name];
            if (timer.IsActive());
                timer.Resume();
        }
	};

    Acts.prototype.ForceToEndAll = function ()
	{
        var name, timer;
        for (name in this.timers)
        {
		    if (!this.timers[name].run_start)
			{
			    this._trigger_duration_name = name;
			    this.run_callback(cr.behaviors.Rex_Duration.prototype.cnds.OnEnd);
			}
            this.destroy_timer(name);
        }
	};

    Acts.prototype.Cancel = function (duration_name)
	{
	    this.destroy_timer(duration_name);
	};

    Acts.prototype.Setup2 = function (timeline_objs)
	{
        var timeline = timeline_objs.instances[0];
        if (timeline.check_name == "TIMELINE")
            this.type.timeline = timeline;
        else
            alert ("Duration behavior should connect to a timeline object");
	};

    Acts.prototype.AddDurationTime = function (duration_name, duration_time)
	{
        if (duration_time == 0)
            return;

        var timer = this.timers[duration_name];
        if (timer == null)
            return;

        timer._duration_time += duration_time;
        timer._duration_remain_time += duration_time;
        if (duration_time < 0)
        {
            var duration_remain_time = timer._duration_remain_time;
            if (duration_remain_time < 0)
                timer.Start(duration_remain_time);
            else if (timer._interval_time > duration_remain_time);
                timer.Start(duration_remain_time);
        }
	};

    Acts.prototype.SetIntervalTime = function (duration_name, interval_time)
	{
        var timer = this.timers[duration_name];
        if (timer == null)
            return;

        timer._interval_time = interval_time;
	};
	//////////////////////////////////////
	// Expressions
	function Exps() {};
	behaviorProto.exps = new Exps();

    Exps.prototype.Remainder = function (ret, duration_name)
	{
        if (duration_name == null)
            duration_name = this._trigger_duration_name;
	    var timer = this.timers[duration_name];
	    var val;
	    if (timer == null)
	        val = 0;
	    else
	        val = remain_time_get(timer);
	    ret.set_float(val);
	};

	Exps.prototype.Elapsed = function (ret, duration_name)
	{
        if (duration_name == null)
            duration_name = this._trigger_duration_name;
	    var timer = this.timers[duration_name];
	    var val;
	    if (timer == null)
	        val = 0;
	    else
	        val = timer._duration_time - remain_time_get(timer);
	    ret.set_float(val);
	};

    Exps.prototype.RemainderPercent = function (ret, duration_name)
	{
        if (duration_name == null)
            duration_name = this._trigger_duration_name;
	    var timer = this.timers[duration_name];
	    var val;
	    if (timer == null)
	        val = 0;
	    else
	        val = remain_time_get(timer)/timer._duration_time;
	    ret.set_float(val);
	};

	Exps.prototype.ElapsedPercent = function (ret, duration_name)
	{
        if (duration_name == null)
            duration_name = this._trigger_duration_name;
	    var timer = this.timers[duration_name];
	    var val;
	    if (timer == null)
	        val = 0;
	    else
	        val = (timer._duration_time - remain_time_get(timer))/timer._duration_time;
	    ret.set_float(val);
	};

    Exps.prototype.Interval = function (ret, duration_name)
	{
        if (duration_name == null)
            duration_name = this._trigger_duration_name;
	    var timer = this.timers[duration_name];
	    var val;
	    if (timer == null)
	        val = 0;
	    else
	        val = timer._interval_time;
	    ret.set_float(val);
	};

	Exps.prototype.Duration = function (ret, duration_name)
	{
        if (duration_name == null)
            duration_name = this._trigger_duration_name;
	    var timer = this.timers[duration_name];
	    var val;
	    if (timer == null)
	        val = 0;
	    else
	        val = timer._duration_time;
	    ret.set_float(val);
	};
}());


text:
package org.apache.camel.component.google.bigquery.sql.springboot;

import javax.annotation.Generated;
import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * Google BigQuery data warehouse for analytics (using SQL queries).
 *
 * Generated by camel-package-maven-plugin - do not edit this file!
 */
@Generated("org.apache.camel.maven.packaging.SpringBootAutoConfigurationMojo")
@ConfigurationProperties(prefix = "camel.component.google-bigquery-sql")
public class GoogleBigQuerySQLComponentConfiguration
        extends
            ComponentConfigurationPropertiesCommon {

    /**
     * Whether to enable auto configuration of the google-bigquery-sql
     * component. This is enabled by default.
     */
    private Boolean enabled;
    /**
     * Google Cloud Project Id
     */
    private String projectId;
    /**
     * ConnectionFactory to obtain connection to Bigquery Service. If non
     * provided the default one will be used
     */
    private GoogleBigQueryConnectionFactoryNestedConfiguration connectionFactory;
    /**
     * Whether the component should resolve property placeholders on itself when
     * starting. Only properties which are of String type can use property
     * placeholders.
     */
    private Boolean resolvePropertyPlaceholders = true;

    public String getProjectId() {
        return projectId;
    }

    public void setProjectId(String projectId) {
        this.projectId = projectId;
    }

    public GoogleBigQueryConnectionFactoryNestedConfiguration getConnectionFactory() {
        return connectionFactory;
    }

    public void setConnectionFactory(
            GoogleBigQueryConnectionFactoryNestedConfiguration connectionFactory) {
        this.connectionFactory = connectionFactory;
    }

    public Boolean getResolvePropertyPlaceholders() {
        return resolvePropertyPlaceholders;
    }

    public void setResolvePropertyPlaceholders(
            Boolean resolvePropertyPlaceholders) {
        this.resolvePropertyPlaceholders = resolvePropertyPlaceholders;
    }

    public static class GoogleBigQueryConnectionFactoryNestedConfiguration {
        public static final Class CAMEL_NESTED_CLASS = org.apache.camel.component.google.bigquery.GoogleBigQueryConnectionFactory.class;
    }
}

redpajama_set_name: RedPajamaGithub


text:
* store file permission
* use gps permission

* [Download](https://www.google.com/intl/en/chrome/?standalone=1)

## Documents

* [Home](https://developers.google.com/web/tools/chrome-devtools/)
* [Network Analysis Reference](https://developers.google.com/web/tools/chrome-devtools/network-performance/reference#timing-explanation)
* [What's New In DevTools (Chrome 66)](https://developers.google.com/web/updates/2018/02/devtools)
* [What's New In DevTools (Chrome 68)](https://developers.google.com/web/updates/2018/05/devtools)
* [What's New In DevTools (Chrome 70)](https://developers.google.com/web/updates/2018/08/devtools#watch)
* [如何使用 Timeline 工具](https://developers.google.com/web/tools/chrome-devtools/evaluate-performance/timeline-tool)

## Skills

### Search

在开发者工具中按下 Esc 键调出 Console 面板,点击其顶部左侧的三个点按钮下的 search,可以对页面所有关联 css、js 内容进行搜索,这对于搜索页面元素的 js 事件很有帮助。

## Tools

+ [ChromeCacheView](http://www.nirsoft.net/utils/chrome_cache_view.html)
  Chrome 缓存查看工具。

## 书签的位置

在运行中输入

```Bash
%LOCALAPPDATA%\Google\Chrome\User Data\Default
```

在目录中找到名为"Bookmarks"的文件,用技术本工具打开即可看到书签数据的组织格式是 JSON。

[ref](http://superuser.com/a/376369)


text:
<?php
/**
 * Created by PhpStorm.
 * User: Casa
 * Date: 20/10/2016
 * Time: 14:36
 */

namespace app\controllers;

use app\models\Usuario;
use app\models\UsuarioDeleteForm;
use app\models\UsuarioForm;
use app\models\UsuarioMailForm;
use app\models\UsuarioPasswordForm;
use app\models\UsuarioUpdateForm;
use yii\web\Controller;
use Yii;

class UsuarioController extends Controller
{

    public function beforeAction($action){
        if (!Yii::$app->user->isGuest && Yii::$app->user->identity->ace_id != 1) {
            Yii::$app->user->logout();
            return $this->goHome();
        } else {
            return $action;
        }
    }

    private function verificarLogin(){
        if(Yii::$app->user->identity == null){
            return false;
        }
        return true;
    }

    public function actionConfig(){
        if($this->verificarLogin()) {
            $user = $this->findModel(Yii::$app->user->identity->usu_login);
            $model = new UsuarioForm();
            $model->usu_login = $user->usu_login;
            $model->usu_nome = $user->usu_nome;
            $model->usu_data_nascimento = $user->usu_data_nascimento;
            $model->usu_sexo = $user->usu_sexo;
            $model->_user = $user;
            if ($model->load(Yii::$app->request->post()) && $model->updateUser()) {
                Yii::$app->getSession()->setFlash('sucess', 'Dados Alterados Com Sucesso.');
                $this->goHome();
            } else {
                return $this->render('config', [
                    'model' => $model,
                ]);
            }
        }else{
            $this->goHome();
        }
    }

    public function actionDelete(){
        if($this->verificarLogin()) {
            $model = new UsuarioDeleteForm();
            $model->usu_id = Yii::$app->user->identity->getId();
            if ($model->load(Yii::$app->request->post()) && $model->deleteUser()) {
                Yii::$app->getSession()->setFlash('sucess', 'Usuario Deletado.');
                return $this->redirect(["/site/index"]);

            }
            return $this->render('delete', [
                'model' => $model,
            ]);
        }else{
            $this->goHome();
        }
    }

    public function actionCreate()
    {
        if($this->verificarLogin()) {
            $model = new UsuarioForm();
            if ($model->load(Yii::$app->request->post()) && $model->createUser()) {
                //Yii::$app->set
                Yii::$app->user->logout();
                $this->goHome();
            } else {
                $model->usu_sexo = 'M';
                return $this->render('create', [
                    'model' => $model,
                ]);
            }
        }else{
            $this->goHome();
        }
    }

    public function actionPassword(){
        if($this->verificarLogin()) {
            $model = new UsuarioPasswordForm();
            $model->usu_id = Yii::$app->user->identity->getId();
            if ($model->load(Yii::$app->request->post()) && $model->updatePassword()) {
                Yii::$app->getSession()->setFlash('sucess', 'Senha Alterada Com Sucesso.');
                return $this->redirect(["/usuario/index"]);
            } else {
                return $this->render('password', [
                    'model' => $model,
                ]);
            }
        }else{
            $this->goHome();
        }
    }

    public function actionMail(){
        if($this->verificarLogin()) {
            $user = $this->findModel(Yii::$app->user->identity->usu_login);
            $model = new UsuarioMailForm();
            $model->_user = $user;
            if ($model->load(Yii::$app->request->post()) && $model->updateEmail()) {
                Yii::$app->getSession()->setFlash('sucess', 'Email Alterado Com Sucesso.');
                return $this->redirect(["/usuario/index"]);
            } else {
                return $this->render('mail', [
                    'model' => $model,
                ]);
            }
        }else{
            $this->goHome();
        }
    }

    protected function findModel($usuario)
    {
        if (($model = Usuario::findByUsername($usuario)) !== null) {
            return $model;
        } else {
            throw new NotFoundHttpException('The requested page does not exist.');
        }
    }

}


text:
(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory();
	else if(typeof define === 'function' && define.amd)
		define([], factory);
	else if(typeof exports === 'object')
		exports["AsyncFn"] = factory();
	else
		root["AsyncFn"] = factory();
})(this, function() {
return /******/ (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] = {
/******/ 			exports: {},
/******/ 			id: moduleId,
/******/ 			loaded: false
/******/ 		};

/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);

/******/ 		// Flag the module as loaded
/******/ 		module.loaded = 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;

/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";

/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {

	module.exports = __webpack_require__(1);

/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {

	var $;

	$ = __webpack_require__(2).$;

	module.exports = window.AsyncFn = (function() {
	  function AsyncFn(asyncFn) {
	    this.dfd = new $.Deferred();
	    this.fn = asyncFn;
	  }

	  AsyncFn.prototype.done = function(callback) {
	    this.callback = callback;
	    if (this.isCalled) {
	      return this.callback();
	    }
	  };

	  AsyncFn.prototype.call = function() {
	    if (this.isCalled) {
	      return;
	    }
	    return this.fn().always((function(_this) {
	      return function() {
	        _this.isCalled = true;
	        _this.dfd.resolve();
	        if (_this.callback) {
	          return _this.callback();
	        }
	      };
	    })(this));
	  };

	  AsyncFn.addToCallQueue = function(fn) {
	    var asyncFn;
	    asyncFn = new AsyncFn(fn);
	    if (this.currentFn != null) {
	      this.currentFn.done(function() {
	        return asyncFn.call();
	      });
	    } else {
	      asyncFn.call();
	    }
	    return this.currentFn = asyncFn;
	  };

	  AsyncFn.setImmediate = (function() {
	    var ID, head, onmessage, tail;
	    head = {};
	    tail = head;
	    ID = Math.random();
	    onmessage = function(e) {
	      var func, ref;
	      if (((ref = e.data) != null ? ref.toString() : void 0) !== ID.toString()) {
	        return;
	      }
	      head = head.next;
	      func = head.func;
	      delete head.func;
	      return func();
	    };
	    if (window.addEventListener && window.postMessage) {
	      window.addEventListener('message', onmessage, false);
	      return function(func) {
	        tail = tail.next = {
	          func: func
	        };
	        return window.postMessage(ID, '*');
	      };
	    } else {
	      return function(func) {
	        return setTimeout(func, 0);
	      };
	    }
	  })();

	  return AsyncFn;

	})();

/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {

	var jquery;

	if (true) {
	  module.exports = {
	    $: window.$
	  };
	} else {
	  jquery = require('jquery');
	  module.exports = {
	    $: jquery
	  };
	}

/***/ })
/******/ ])
});
;


text:
@implementation CCView (CompactConstraint)

- (NSLayoutConstraint *)addCompactConstraint:(NSString *)relationship metrics:(NSDictionary *)metrics views:(NSDictionary *)views
{
    NSLayoutConstraint *constraint = [NSLayoutConstraint compactConstraint:relationship metrics:metrics views:views self:self];
    [self addConstraint:constraint];
    return constraint;
}

- (NSArray *)addCompactConstraints:(NSArray *)relationshipStrings metrics:(NSDictionary *)metrics views:(NSDictionary *)views;
{
    NSMutableArray *mConstraints = [NSMutableArray arrayWithCapacity:relationshipStrings.count];
    for (NSString *relationship in relationshipStrings) {
        if ([relationship hasPrefix:@"H:"] || [relationship hasPrefix:@"V:"] || [relationship hasPrefix:@"|"] || [relationship hasPrefix:@"["]) {
            [mConstraints addObjectsFromArray:[NSLayoutConstraint identifiedConstraintsWithVisualFormat:relationship options:0 metrics:metrics views:views]];
        } else {
            [mConstraints addObject:[NSLayoutConstraint compactConstraint:relationship metrics:metrics views:views self:self]];
        }
    }
    NSArray *constraints = [mConstraints copy];
    [self addConstraints:constraints];
    return constraints;
}

- (void)addConstraintsWithVisualFormat:(NSString *)format options:(NSLayoutFormatOptions)opts metrics:(NSDictionary *)metrics views:(NSDictionary *)views
{
    [self addConstraints:[NSLayoutConstraint identifiedConstraintsWithVisualFormat:format options:opts metrics:metrics views:views]];
}

@end


text:
package com.sshtools.forker.wrapper;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PipedInputStream;
import java.io.PipedOutputStream;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.List;

import com.sshtools.forker.client.ForkerProcess;
import com.sshtools.forker.client.EffectiveUser;
import com.sshtools.forker.client.ForkerBuilder;
import com.sshtools.forker.client.ForkerProcessFactory;
import com.sshtools.forker.client.ForkerProcessListener;
import com.sshtools.forker.common.Util;

/**
 * {@link WrapperProcessFactory} implementation that allows the construction of
 * wrapped applications using {@link ForkerBuilder}. Simply set the
 * {@link ForkerBuilder#io(com.sshtools.forker.common.IO)} mode to
 * {@link WrapperIO#WRAPPER} and build the Java (or native) command to run. The
 * wrapper can be configured using
 * {@link WrapperProcessFactory#addOption(KeyValuePair)} (and the factory itself
 * may be obtained using {@link ForkerBuilder#processFactory(Class)}.
 *

 * Note, if you want to run a native command, you will also need to set the
 * 'native' option.
 *
 *

 * fb.processFactory(WrapperProcessFactory.class).addOption(new KeyValuePair("native"));
 *

 *
 */
public class WrapperProcessFactory implements ForkerProcessFactory {

	private final class WrapperProcessImpl extends ForkerProcess implements Runnable {
		private Thread thread;
		private int exitValue = 1;
		private InputStream inPipe;
		private InputStream errPipe;
		private OutputStream outPipe;
		private boolean redirectError;
		private ForkerWrapper wrapper;

		private WrapperProcessImpl(ForkerWrapper wrapper, boolean redirectError) {
			thread = new Thread(this, "ForkerWrapper");
			this.wrapper = wrapper;
			this.redirectError = redirectError;
		}

		@Override
		public int waitFor() throws InterruptedException {
			thread.join();
			return exitValue;
		}

		@Override
		public OutputStream getOutputStream() {
			return outPipe;
		}

		@Override
		public InputStream getInputStream() {
			return inPipe;
		}

		@Override
		public InputStream getErrorStream() {
			return errPipe;
		}

		@Override
		public int exitValue() {
			if (thread.isAlive())
				throw new IllegalThreadStateException("Process still running.");
			return exitValue;
		}

		@Override
		public void destroy() {
			try {
				wrapper.stop();
			} catch (InterruptedException e) {
			}
		}

		@Override
		public void run() {
			try {
				wrapper.start();
			} catch (IOException e) {
				e.printStackTrace();
				exitValue = 1;
			} catch (InterruptedException e) {
				e.printStackTrace();
				exitValue = 1;
			}

		}

		public void start() throws IOException {

			PipedOutputStream inPipeOut = new PipedOutputStream();
			wrapper.setDefaultOut(new PrintStream(inPipeOut));
			inPipe = new PipedInputStream(inPipeOut) {
				@Override
				public synchronized int read() throws IOException {
					try {
						return super.read();
					} catch (IOException ioe) {
						// TODO Blegh
						if (ioe.getMessage().indexOf("Write end dead") == -1
								&& ioe.getMessage().indexOf("Pipe broken") == -1)
							throw ioe;
						else
							return -1;
					}
				}
			};

			if (redirectError) {
				wrapper.setDefaultErr(wrapper.getDefaultOut());
			} else {
				PipedOutputStream errPipeOut = new PipedOutputStream();
				wrapper.setDefaultErr(new PrintStream(errPipeOut));
				errPipe = new PipedInputStream(errPipeOut);
			}

			PipedInputStream outPipeIn = new PipedInputStream();
			wrapper.setDefaultIn(outPipeIn);
			outPipe = new PipedOutputStream(outPipeIn);

			exitValue = 0;
			thread.start();
		}
	}

	private boolean separateProcess;
	private List<KeyValuePair> options = new ArrayList<KeyValuePair>();

	public WrapperProcessFactory() {
	}

	public void addOption(KeyValuePair option) {
		options.add(option);
	}

	public boolean isSeparateProcess() {
		return separateProcess;
	}

	public void setSeparateProcess(boolean separateProcess) {
		this.separateProcess = separateProcess;
	}

	@Override
	public ForkerProcess createProcess(ForkerBuilder builder, ForkerProcessListener listener) throws IOException {
		if (builder.io() == WrapperIO.WRAPPER) {
			List<String> allArgs = new ArrayList<String>(builder.command());
			EffectiveUser effectiveUser = builder.effectiveUser();
			if (separateProcess) {
				ForkerBuilder fb = new ForkerBuilder();
				fb.java();
				for (Integer i : builder.affinity()) {
					fb.command().add("--cpu=" + i);
				}
				if (builder.getCommand().getPriority() != null) {
					fb.command().add("--priority=" + builder.getCommand().getPriority().name());
				}
				fb.command().add(ForkerWrapper.class.getName());
				if (effectiveUser != null)
					fb.effectiveUser(effectiveUser);
				for (KeyValuePair opt : options) {
					String optv = "--" + opt.getName();
					String value = opt.getValue();
					if (value != null && !Boolean.TRUE.equals(value) && !"true".equals(value)) {
						if (value.contains(" "))
							optv += "'";
						optv += "=" + Util.escapeSingleQuotes(value);
						if (value.contains(" "))
							optv += "'";
					}
					fb.command().add(optv);
				}
				if (builder.background())
					fb.command().add("--daemon");
				fb.command().add("--");
				fb.command().addAll(allArgs);
				fb.environment().putAll(builder.environment());
				if (builder.redirectErrorStream())
					fb.redirectErrorStream(true);

				return (ForkerProcess) fb.start();
			} else {
				if (effectiveUser != null)
					throw new IOException("Cannot set effective user when running in same VM.");

				ForkerWrapper wrapper = new ForkerWrapper();
				for (KeyValuePair opt : options) {
					wrapper.getConfiguration().getProperties().add(opt);
				}
				wrapper.getWrappedApplication().setClassname(allArgs.remove(0));
				wrapper.getConfiguration().setRemaining(allArgs.toArray(new String[0]));
				WrapperProcessImpl wrapperProcessImpl = new WrapperProcessImpl(wrapper, builder.redirectErrorStream());
				wrapperProcessImpl.start();
				return wrapperProcessImpl;
			}
		}
		return null;
	}

}


text:
<#assign bathPath=springMacroRequestContext.getContextPath() />
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title> - 注册</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico">
    <link href="${bathPath}/resources/assets/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="${bathPath}/resources/assets/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="${bathPath}/resources/assets/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="${bathPath}/resources/assets/css/animate.css" rel="stylesheet">
    <link href="${bathPath}/resources/assets/css/style.css?v=4.1.0" rel="stylesheet">

6

欢迎注册

            <form id="formId" class="m-t" role="form" action="register.html" method="post">

                    <input id="account" type="text" class="form-control" placeholder="请输入用户名" required="">

                    <input id="password" type="password" class="form-control" placeholder="请输入密码" required="">

                    <input id="password_confirm" type="password" class="form-control" placeholder="请再次输入密码" required="">

                            <input id="check" type="checkbox"> 我同意注册协议

                <button type="submit" onclick="submitClick()" class="btn btn-primary block full-width m-b">注 册</button>

已经有账户了?点此登录

            </form>


text:
package org.apache.arrow.driver.jdbc.utils;

import static com.google.common.base.Preconditions.checkNotNull;

import java.sql.Array;
import java.sql.Blob;
import java.sql.CallableStatement;
import java.sql.Clob;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.NClob;
import java.sql.PreparedStatement;
import java.sql.SQLClientInfoException;
import java.sql.SQLException;
import java.sql.SQLWarning;
import java.sql.SQLXML;
import java.sql.Savepoint;
import java.sql.Statement;
import java.sql.Struct;
import java.util.Map;
import java.util.Properties;
import java.util.concurrent.Executor;

import org.apache.arrow.driver.jdbc.ArrowFlightJdbcPooledConnection;

/**
 * Auxiliary wrapper class for {@link Connection}, used on {@link ArrowFlightJdbcPooledConnection}.
 */
public class ConnectionWrapper implements Connection {
  private final Connection realConnection;

  public ConnectionWrapper(final Connection connection) {
    realConnection = checkNotNull(connection);
  }

  @Override
  public <T> T unwrap(final Class<T> type) {
    return type.cast(realConnection);
  }

  @Override
  public boolean isWrapperFor(final Class<?> type) {
    return realConnection.getClass().isAssignableFrom(type);
  }

  @Override
  public Statement createStatement() throws SQLException {
    return realConnection.createStatement();
  }

  @Override
  public PreparedStatement prepareStatement(final String sqlQuery) throws SQLException {
    return realConnection.prepareStatement(sqlQuery);
  }

  @Override
  public CallableStatement prepareCall(final String sqlQuery) throws SQLException {
    return realConnection.prepareCall(sqlQuery);
  }

  @Override
  public String nativeSQL(final String sqlStatement) throws SQLException {
    return realConnection.nativeSQL(sqlStatement);
  }

  @Override
  public void setAutoCommit(boolean autoCommit) throws SQLException {
    realConnection.setAutoCommit(autoCommit);
  }

  @Override
  public boolean getAutoCommit() throws SQLException {
    return realConnection.getAutoCommit();
  }

  @Override
  public void commit() throws SQLException {
    realConnection.commit();
  }

  @Override
  public void rollback() throws SQLException {
    realConnection.rollback();
  }

  @Override
  public void close() throws SQLException {
    realConnection.close();
  }

  @Override
  public boolean isClosed() throws SQLException {
    return realConnection.isClosed();
  }

  @Override
  public DatabaseMetaData getMetaData() throws SQLException {
    return realConnection.getMetaData();
  }

  @Override
  public void setReadOnly(final boolean readOnly) throws SQLException {
    realConnection.setReadOnly(readOnly);
  }

  @Override
  public boolean isReadOnly() throws SQLException {
    return realConnection.isReadOnly();
  }

  @Override
  public void setCatalog(final String catalogName) throws SQLException {
    realConnection.setCatalog(catalogName);
  }

  @Override
  public String getCatalog() throws SQLException {
    return realConnection.getCatalog();
  }

  @Override
  public void setTransactionIsolation(final int transactionIsolationId) throws SQLException {
    realConnection.setTransactionIsolation(transactionIsolationId);
  }

  @Override
  public int getTransactionIsolation() throws SQLException {
    return realConnection.getTransactionIsolation();
  }

  @Override
  public SQLWarning getWarnings() throws SQLException {
    return realConnection.getWarnings();
  }

  @Override
  public void clearWarnings() throws SQLException {
    realConnection.clearWarnings();
  }

  @Override
  public Statement createStatement(final int resultSetTypeId, final int resultSetConcurrencyId)
      throws SQLException {
    return realConnection.createStatement(resultSetTypeId, resultSetConcurrencyId);
  }

  @Override
  public PreparedStatement prepareStatement(final String sqlQuery, final int resultSetTypeId,
                                            final int resultSetConcurrencyId)
      throws SQLException {
    return realConnection.prepareStatement(sqlQuery, resultSetTypeId, resultSetConcurrencyId);
  }

  @Override
  public CallableStatement prepareCall(final String query, final int resultSetTypeId,
                                       final int resultSetConcurrencyId)
      throws SQLException {
    return realConnection.prepareCall(query, resultSetTypeId, resultSetConcurrencyId);
  }

  @Override
  public Map<String, Class<?>> getTypeMap() throws SQLException {
    return realConnection.getTypeMap();
  }

  @Override
  public void setTypeMap(final Map<String, Class<?>> typeNameToClass) throws SQLException {
    realConnection.setTypeMap(typeNameToClass);
  }

  @Override
  public void setHoldability(final int holdabilityId) throws SQLException {
    realConnection.setHoldability(holdabilityId);
  }

  @Override
  public int getHoldability() throws SQLException {
    return realConnection.getHoldability();
  }

  @Override
  public Savepoint setSavepoint() throws SQLException {
    return realConnection.setSavepoint();
  }

  @Override
  public Savepoint setSavepoint(final String savepointName) throws SQLException {
    return realConnection.setSavepoint(savepointName);
  }

  @Override
  public void rollback(final Savepoint savepoint) throws SQLException {
    realConnection.rollback(savepoint);
  }

  @Override
  public void releaseSavepoint(final Savepoint savepoint) throws SQLException {
    realConnection.releaseSavepoint(savepoint);
  }

  @Override
  public Statement createStatement(final int resultSetType,
                                   final int resultSetConcurrency,
                                   final int resultSetHoldability) throws SQLException {
    return realConnection.createStatement(resultSetType, resultSetConcurrency,
        resultSetHoldability);
  }

  @Override
  public PreparedStatement prepareStatement(final String sqlQuery,
                                            final int resultSetType,
                                            final int resultSetConcurrency,
                                            final int resultSetHoldability) throws SQLException {
    return realConnection.prepareStatement(sqlQuery, resultSetType, resultSetConcurrency,
        resultSetHoldability);
  }

  @Override
  public CallableStatement prepareCall(final String sqlQuery,
                                       final int resultSetType,
                                       final int resultSetConcurrency,
                                       final int resultSetHoldability) throws SQLException {
    return realConnection.prepareCall(sqlQuery, resultSetType, resultSetConcurrency,
        resultSetHoldability);
  }

  @Override
  public PreparedStatement prepareStatement(final String sqlQuery, final int autoGeneratedKeysId)
      throws SQLException {
    return realConnection.prepareStatement(sqlQuery, autoGeneratedKeysId);
  }

  @Override
  public PreparedStatement prepareStatement(final String sqlQuery, final int... columnIndices)
      throws SQLException {
    return realConnection.prepareStatement(sqlQuery, columnIndices);
  }

  @Override
  public PreparedStatement prepareStatement(final String sqlQuery, final String... columnNames)
      throws SQLException {
    return realConnection.prepareStatement(sqlQuery, columnNames);
  }

  @Override
  public Clob createClob() throws SQLException {
    return realConnection.createClob();
  }

  @Override
  public Blob createBlob() throws SQLException {
    return realConnection.createBlob();
  }

  @Override
  public NClob createNClob() throws SQLException {
    return realConnection.createNClob();
  }

  @Override
  public SQLXML createSQLXML() throws SQLException {
    return realConnection.createSQLXML();
  }

  @Override
  public boolean isValid(final int timeout) throws SQLException {
    return realConnection.isValid(timeout);
  }

  @Override
  public void setClientInfo(final String propertyName, final String propertyValue)
      throws SQLClientInfoException {
    realConnection.setClientInfo(propertyName, propertyValue);
  }

  @Override
  public void setClientInfo(final Properties properties) throws SQLClientInfoException {
    realConnection.setClientInfo(properties);
  }

  @Override
  public String getClientInfo(final String propertyName) throws SQLException {
    return realConnection.getClientInfo(propertyName);
  }

  @Override
  public Properties getClientInfo() throws SQLException {
    return realConnection.getClientInfo();
  }

  @Override
  public Array createArrayOf(final String typeName, final Object... elements) throws SQLException {
    return realConnection.createArrayOf(typeName, elements);
  }

  @Override
  public Struct createStruct(final String typeName, final Object... attributes)
      throws SQLException {
    return realConnection.createStruct(typeName, attributes);
  }

  @Override
  public void setSchema(final String schemaName) throws SQLException {
    realConnection.setSchema(schemaName);
  }

  @Override
  public String getSchema() throws SQLException {
    return realConnection.getSchema();
  }

  @Override
  public void abort(final Executor executor) throws SQLException {
    realConnection.abort(executor);
  }

  @Override
  public void setNetworkTimeout(final Executor executor, final int timeoutInMillis)
      throws SQLException {
    realConnection.setNetworkTimeout(executor, timeoutInMillis);
  }

  @Override
  public int getNetworkTimeout() throws SQLException {
    return realConnection.getNetworkTimeout();
  }
}


text:
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
        "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
        "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">

<module name="Checker">
    <module name="SuppressionCommentFilter"/>

    <module name="StrictDuplicateCode">
        <property name="min" value="250"/>
    </module>

    <module name="SuppressionFilter">
        <property name="file" value="checkstyle/bc-suppressions.xml"/>
    </module>

    <module name="TreeWalker">

        <!-- Check that blocks are always used with if, else, while, do, and for. -->
        <module name="NeedBraces"/>

        <!-- Check that '{' is on a new line with control statements -->
        <module name="LeftCurly">
            <property name="option" value="nl"/>
        </module>

        <!-- Check that '}' is on a new line with else/catch/finally -->
        <module name="RightCurly">
            <property name="option" value="alone"/>
        </module>
        <!-- check for spaces in parentheses -->
        <module name="ParenPad"/>

        <!-- Checking Import Statements -->
        <module name="IllegalImport">
            <property name="illegalPkgs" value="sun, com.sun, com"/>
        </module>
        <!-- defaults to sun.* packages -->
<!--
        <module name="RedundantImport"/>
        <module name="UnusedImports"/>
        <module name="AvoidStarImport"/>
-->

        <!-- Check that equals is overridden properly -->
        <module name="CovariantEquals"/>

        <!-- Check for bogus double checked locking optimisation -->
        <module name="DoubleCheckedLocking"/>

        <!-- enforce default on switch statement -->
        <!-- <module name="MissingSwitchDefault"/> -->
        <!-- make sure default is always last in a switch statement -->
        <module name="DefaultComesLast"/>
        <!-- don't allow control variable to be modified inside a for loop -->
        <module name="ModifiedControlVariable"/>
        <!-- eliminate if (blah == true)... -->
        <module name="SimplifyBooleanExpression"/>
        <!-- eliminate if (blah) return true; else return false; -->
        <module name="SimplifyBooleanReturn"/>
        <!-- check for unneeded parentheses -->
        <!-- <module name="UnnecessaryParentheses"/> -->
        <!-- check for declaration order
        <module name="DeclarationOrder"/> -->
        <!-- check for tab characters -->
        <module name="TabCharacter"/>
        <!-- check for parameter assignment -->
<!--
        <module name="ParameterAssignment"/>
        <module name="SuperClone"/>
        <module name="SuperFinalize"/>
        <module name="ExplicitInitialization"/>
-->

        <!-- Make sure names meet coding standards -->
        <!-- <module name="ConstantName"/> -->
        <module name="PackageName">
            <property name="format" value="^[a-z]+(\.[a-z][a-z0-9_]*)*$"/>
        </module>
<!--
        <module name="LocalFinalVariableName"/>
        <module name="LocalVariableName"/>
        <module name="ParameterName"/>
-->

        <!-- check for x == "foo" -->
        <module name="StringLiteralEquality"/>

        <!-- Must implement hashCode with equals -->
        <module name="EqualsHashCode"/>
        <module name="EmptyStatement"/>

        <!-- Disallow certain abstract types - must use interface -->
        <module name="IllegalType">
            <property
                    name="illegalClassNames"
                    value="java.util.GregorianCalendar, java.util.HashSet, java.util.HashMap,
                       java.util.ArrayList, java.util.LinkedList, java.util.LinkedHashMap, java.util.LinkedHashSet,
                       java.util.TreeSet, java.util.TreeMap"/>
            <!-- Don't disallow based on name pattern -->
            <property name="format" value="^$"/>
        </module>

        <!-- check for deeply nested ifs -->
        <module name="NestedIfDepth">
            <property name="max" value="7"/>
        </module>

        <!-- check for nested trys -->
        <module name="NestedTryDepth">
            <property name="max" value="2"/>
        </module>

        <!-- Don't allow too many executable statements per method -->
        <module name="ExecutableStatementCount">
            <property name="max" value="1000"/>
        </module>

        <module name="ParameterNumber">
            <property name="max" value="15"/>
        </module>
        <module name="MethodLength">
            <property name="tokens" value="METHOD_DEF,CTOR_DEF"/>
            <property name="max" value="1215"/>
        </module>
        <module name="FileLength">
            <property name="max" value="5209"/>
        </module>

        <!-- Used with the suppression comment filter -->
        <module name="FileContentsHolder"/>

        <module name="GenericIllegalRegexp">
            <property name="format" value="\.printStackTrace"/>
        </module>
    </module>
</module>


text:
package com.twitter.common.examples.echo;

/**
 * This is part of the pants echo example. Please see:
 * src/java/com/twitter/common/examples/echo/README.md
 */
public final class EchoMain {

  private EchoMain() {
  }

  /**
   * First arg is {@link Echoer} implementation to use.
   */
  public static void main(String[] args) throws Exception {
    System.out.println("Using Echoer: " + args[0]);
    Echoer echoer = (Echoer) Class.forName(args[0]).newInstance();
    System.out.println(echoer.echo());
  }
}


text:
package jlibs.xml.sax.dog.expr.nodset;

import jlibs.xml.sax.dog.Scope;
import jlibs.xml.sax.dog.expr.Evaluation;
import jlibs.xml.sax.dog.expr.Expression;
import jlibs.xml.sax.dog.expr.LinkableEvaluation;
import jlibs.xml.sax.dog.sniff.Event;

/**
 * @author Santhosh Kumar T
 */
public final class PredicateEvaluation extends LinkableEvaluation<Expression>{
    private final Event event;
    private Object resultItem;
    private final Expression predicate;
    private final Evaluation booleanEvaluation;

    public PredicateEvaluation(Expression expression, long order, Object resultItem, Event event, Expression predicate, Evaluation booleanEvaluation){
        super(expression, order);
        this.resultItem = resultItem;
        this.event = event;
        this.predicate = predicate;
        this.booleanEvaluation = booleanEvaluation;
    }

    @Override
    public void start(){
        if(resultItem instanceof Evaluation){
            Evaluation eval = (Evaluation)resultItem;
            eval.addListener(this);
            eval.start();
        }

        if(booleanEvaluation==null)
            event.addListener(predicate, this);
        else{
            booleanEvaluation.addListener(this);
            booleanEvaluation.start();
        }
    }

    protected Object result;

    @Override
    public void finished(Evaluation evaluation){
        if(evaluation==resultItem)
            resultItem = evaluation.getResult();
        else{
            if(evaluation.getResult()==Boolean.TRUE)
                result = resultItem;
            fireFinished();
        }
    }

    @Override
    protected void fireFinished(){
        super.fireFinished();
        if(resultItem instanceof Evaluation)
            ((Evaluation)resultItem).removeListener(this);
    }

    @Override
    protected void dispose(){
        if(resultItem instanceof Evaluation)
            ((Evaluation)resultItem).removeListener(this);
        else if(nodeSetListener !=null)
            nodeSetListener.discard(order);

        if(booleanEvaluation==null){
            if(predicate.scope()==Scope.DOCUMENT)
                event.removeListener(predicate, this);
        }else
            booleanEvaluation.removeListener(this);
    }

    @Override
    public Object getResult(){
        throw new UnsupportedOperationException();
    }

    public NodeSetListener nodeSetListener;
}


text:
module Toy
  module Extensions
    module Symbol
      def to_store(value, *)
        value.nil? ? nil : value.to_s
      end

      def from_store(value, *)
        value.nil? ? nil : value.to_sym
      end
    end
  end
end

class Symbol
  extend Toy::Extensions::Symbol
end


text:
<! DOCTYPE html>
<html>
	<head>
		<title>Keyur's Local Storage</title>
		<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>
		<script src="assets/js/main.js" type="text/javascript"></script>
		<link rel="stylesheet" type="text/css" href="assets/stylesheets/main.css">
	</head>
	<body>
		<section>
			<textarea placeholder="OHAI..."></textarea>
		</section>
	</body>
</html>


text:
$(document).ready(function () {
        $('#slide4Show').bind('inview', function(event, isInView, visiblePartX, visiblePartY) {
            if (isInView) {
                // element is now visible in the viewport
                if (visiblePartY == 'top') {
                  // top part of element is visible
                }
                else if (visiblePartY == 'bottom') {
                  // bottom part of element is visible
                }
                else {
                    $("#carte,#carteImage").attr({"width":"716px", "height":"433px"}).show();
                     //choisir un point comme le point d'origine: ex. BEGARD:(48.633333,-3.3)
                    var pointOriginX = 578;
                    var pointOriginY = 228;                         //point d'origin: BEGARD (210, 122)
                    var pointOriginGPSX = -1.683333;
                    var pointOriginGPSY = 48.083333;     //point GPS :BEGARD (-3.3, 48.633333)
                    var coefficientH = 180;                         //coefficient horizontal
                    var coefficientV = -267;                        //coefficient vertical

                    //Transformation des coordonnées
                    var svg = Snap("#carte");
                    var carteImage = svg.select("#carteImage");
                    var ghelp = svg.select("#help");
                    carteImage.animate({
                        x:carteImage.attr("x")
                    }, 200, function(){
                        carteImage.animate({
                                    x: 0
                                }, 800, mina.elastic);

                        ghelp.animate({},780,function(){
                                    importDonnees(agros22,agros22total,"rectangle","dp22");
                                    importDonnees(agros29,agros29total,"rectangle","dp29");
                                    importDonnees(agros35,agros35total,"rectangle","dp35");
                                    importDonnees(agros56,agros56total,"rectangle","dp56");
                                    importDonnees(automobiles22,automobiles22total,"rond","dp22");
                                    importDonnees(automobiles29,automobiles29total,"rond","dp29");
                                    importDonnees(automobiles35,automobiles35total,"rond","dp35");
                                    importDonnees(automobiles56,automobiles56total,"rond","dp56");
                                    importDonnees(numeriques22,numeriques22total,"triangle","dp22");
                                    importDonnees(numeriques29,numeriques29total,"triangle","dp29");
                                    importDonnees(numeriques35,numeriques35total,"triangle","dp35");
                                    importDonnees(numeriques56,numeriques56total,"triangle","dp56");

                                    $(".departement g rect,circle,polygon").each(function(){
                                        $(this).mouseover(function(){
                                            tooltip.pop(this, $(this).attr("description"), {position:0});
                                        });
                                    });
                        });

                        // carteImage.animate({
                        //             x: 0
                        //         }, 800, mina.elastic,function(){
                        //         importDonnees(agros22,agros22total,"rectangle","dp22");
                        //         importDonnees(agros29,agros29total,"rectangle","dp29");
                        //         importDonnees(agros35,agros35total,"rectangle","dp35");
                        //         importDonnees(agros56,agros56total,"rectangle","dp56");
                        //         importDonnees(automobiles22,automobiles22total,"rond","dp22");
                        //         importDonnees(automobiles29,automobiles29total,"rond","dp29");
                        //         importDonnees(automobiles35,automobiles35total,"rond","dp35");
                        //         importDonnees(automobiles56,automobiles56total,"rond","dp56");
                        //         importDonnees(numeriques22,numeriques22total,"triangle","dp22");
                        //         importDonnees(numeriques29,numeriques29total,"triangle","dp29");
                        //         importDonnees(numeriques35,numeriques35total,"triangle","dp35");
                        //         importDonnees(numeriques56,numeriques56total,"triangle","dp56");

                        //         $(".departement g rect,circle,polygon").each(function(){
                        //             $(this).mouseover(function(){
                        //                 tooltip.pop(this, $(this).attr("description"), {position:0});
                        //             });
                        //         });
                        // });

                    });

                    function importDonnees(coordonnees,dpttotal,form, id){
                        var dpid = '#'+id;
                        var gcible = svg.select(dpid + " ." + form);

                        var nomDpt = dpttotal[0]["Commune"];
                        var effTotal = dpttotal[0]["eff2012"];
                        var nb_etabTotal = dpttotal[0]["nb_etab2012"];
                        var descriptionDpt = "
"+nomDpt+"
"+ effTotal + " employés"+"
"+ nb_etabTotal+" établissements
";
                        if ($(dpid).children(".tooltipDpt").length <= 0)
                            var gdpt = $(dpid).append(descriptionDpt);

                        for (var i = 0; i < coordonnees.length; i++) {
                            var coordonnee = coordonnees[i];
                            var nom = coordonnee["Commune"];
                            var effectif2012 = coordonnee["eff2012"];
                            var nb_etab2012 = coordonnee["nb_etab2012"];
                            var description = "
"+nom+"
"+ effectif2012 + " employés"+"
"+ nb_etab2012+" établissements
";
                            var cX = (coordonnee["Longitude"] - pointOriginGPSX) * coefficientH + pointOriginX;
                            var cY = (coordonnee["Latitude"] - pointOriginGPSY) * coefficientV + pointOriginY;
                            /*Ajouter le point sur la carte*/
                            //Changer le rayon du point selon le nombre d'entreprise numérique
                            // var r = Math.log(effectif2012+1)/1.5;
                            // if (r >= 5) r = 5;
                            // if (r <= 1) r = 1;

                            var r = Math.sqrt(nb_etab2012)+1.5;
                            if (r >= 5) r = 5;
                            if (r <= 1) r = 2;

                            var random = parseInt(Math.random()*100);
                            var offsetAnimateY = 400;
                            cY = cY - random - offsetAnimateY;

                            // Draw ronds
                            if (form == "rond") {
                                // var grond = svg.select("#rond");
                                var circle = gcible.circle(cX, cY, r*2-1);

                                circle.animate({
                                    cy: cY-r/2 + offsetAnimateY + random
                                }, 1000+random*7, mina.easeinout);

                                circle.attr({
                                    id: nom,
                                    fill: "#EC6B6A",
                                    description: description
                                });
                                $(dpid + " .rond").hide();
                            }

                            //Draw rectangle
                            if (form == "rectangle") {
                                // var grectangle = svg.select("#rectangle");
                                r *= 2;
                                var rect = gcible.rect(cX-r/2, cY-r/2, r, r, 1, 1);

                                rect.animate({
                                    y: cY-r/2 + offsetAnimateY + random
                                }, 500+random*7, mina.easeinout);

                                rect.attr({
                                    id: nom,
                                    fill: "#6C85A3",
                                    description: description
                                });
                                $(dpid + " .rectangle").hide();
                            }

                            //Draw triangles
                            if (form == "triangle") {
                                // var gtriangle = svg.select("#triangle");
                                var triangle = gcible.polygon(calculTriangle(cX,cY,r*3+2));

                                triangle.animate({
                                    points: calculTriangle(cX, cY-r/2 + offsetAnimateY + random, r*3+2)
                                }, 1000+random*7, mina.easeinout);

                                triangle.attr({
                                    id: description,
                                    fill: "#2C3944",
                                    description: description
                                });
                                $(dpid + " .triangle").hide();
                                $(dpid + " .triangle").show();
                            }
                        }
                        $(dpid).hide();
                        $(dpid).show();

                    }
                    //Calculer 3 coordonnees de chaque triangle
                    function calculTriangle(cX,cY,r){
                        return [cX, cY-0.57735*r, cX-r/2, cY+0.28868*r, cX+r/2, cY+0.28868*r];
                    }

                    //Dessiner la frontière de chaque département
                    $("#departements .departement").each(function(){
                        var dpid = $(this).attr("id");
                        $(this).children(".regionPath").attr('d', contourDpts[dpid]);
                    });

                    //Cacher les autres départements quand un est sélectionné
                    $(".regionPath").each(function(){
                        $(this).mousedown(function(event){
                            var offsetX = this.getBBox().width;
                            var offsetY = this.getBBox().height/2;
                            tooltip.pop(this,
                                '#tooltip'+$(this).parent().attr("id"),
                                {position:1,
                                   smartPosition:false,
                                   offsetX:offsetX,
                                   offsetY:offsetY
                               });

                            if ($(this).siblings(".bgPath").length < 1){
                                var p = svg.paper.path("M10-5-10,15M15,0,0,15M0-5-20,15").attr({
                                    fill: "none",
                                    stroke: "#beceeb",
                                    strokeWidth: 5
                                }).pattern(0, 0, 10, 10);
                                var dp = svg.select('#' + $(this).parent().attr("id"));

                                dp.path($(this).attr("d") + contour).attr({
                                    class: "bgPath",
                                    fill: p,
                                    "fill-rule": "evenodd",
                                    opacity: 0.5
                                })
                            }
                                $(this).parent().siblings().show();
                                $(this).parent().siblings().hide();
                                $(this).parent().hide();
                                $(this).parent().show();
                                $(this).siblings(".bgPath").show();

                            $(".bgPath").each(function(){
                                $(this).click(function(event){
                                    $(this).hide();
                                    $(this).parent().siblings().show()
                                });
                            });
                        });
                    });

                    //Chercher la commune
                    function searchCommune(node, pat) {
                        if (node.nodeType == 1 && node.childNodes) {
                            for (var i = 0; i < node.childNodes.length; ++i) {
                                var childNode = node.childNodes[i];
                                if(/(rect|circle|polygon)/i.test(childNode.tagName)){
                                    var pos = childNode.id.toUpperCase().indexOf(pat.toUpperCase());
                                    if (pos >= 0)
                                        tooltip.pop(childNode, $(childNode).attr("description"), {position:0});
                                }
                            }
                        }
                    }

                    $('#text-search').bind('keyup change', function(ev) {
                        var searchTerm = $(this).val();

                        if ( searchTerm ) {
                            $('#departements .rond,.rectangle,.triangle').each(function(){
                                if ($(this).attr("style").indexOf("display: inline") >= 0 && $(this).parent().attr("style").indexOf("display: inline") >= 0)
                                    searchCommune($(this)[0], searchTerm);
                            });
                        }
                    });

                    //Choisir le form(rond, rectangle, triangle)
                    $(".select-form input").iCheck({
                        checkboxClass: 'icheckbox_flat-red',
                        radioClass: 'iradio_flat-red'
                    });
                    $(".select-form input").on('ifChecked', function(){
                        if ($(this)[0].id == "checkbox-1")
                            $(".rectangle").fadeIn(1000);
                        if ($(this)[0].id == "checkbox-2")
                            $(".rond").fadeIn(1000);
                        if ($(this)[0].id == "checkbox-3")
                            $(".triangle").fadeIn(1000);
                    });

                    $(".select-form input").on('ifUnchecked', function(){
                        if ($(this)[0].id == "checkbox-1")
                            $(".rectangle").fadeOut(1000);
                        if ($(this)[0].id == "checkbox-2")
                            $(".rond").fadeOut(1000);
                        if ($(this)[0].id == "checkbox-3")
                            $(".triangle").fadeOut(1000);
                    });
                }
            } else {
                // element has gone out of viewport
                var svg = Snap("#carte");
                var carteImage = svg.select("#carteImage");
                carteImage.animate({
                    x: 1000
                }, 2000, mina.elastic);
                $("#carte").fadeOut();

                $(".departement .rectangle,.rond,.triangle").each(function(){
                    $(this).empty();
                });
                $(".departement .bgPath").remove();
				$("input#checkbox-1").iCheck("uncheck");
				$("input#checkbox-2").iCheck("uncheck");
				$("input#checkbox-3").iCheck("check");
            }
        });

    });


text:
exports.config = {
  allScriptsTimeout: 11000,

  specs: [
    '*.js'
  ],

  capabilities: {
    'browserName': 'chrome'
  },

  baseUrl: 'http://localhost:8000/app/index.html',

  framework: 'jasmine',

  jasmineNodeOpts: {
    defaultTimeoutInterval: 30000
  }
};


text:
These source code samples are assembled by their programming language and functions they apply. ByteScout Data Extraction Suite is the bundle that includes three SDK tools for data extraction from PDF, scans, images and from spreadsheets: PDF Extractor SDK, Data Extraction SDK, Barcode Reader SDK. It can be applied to add background image with spreadsheet sdk using C#.

 These C# code samples for C# guide developers to speed up coding of the application when using ByteScout Data Extraction Suite. Follow the instructions from scratch to work and copy the C# code. Enjoy writing a code with ready-to-use sample codes in C#.

ByteScout Data Extraction Suite free trial version is available on our website. C# and other programming languages are supported.

## REQUEST FREE TECH SUPPORT

[Click here to get in touch](https://bytescout.zendesk.com/hc/en-us/requests/new?subject=ByteScout%20Data%20Extraction%20Suite%20Question)

or just send email to [support@bytescout.com](mailto:support@bytescout.com?subject=ByteScout%20Data%20Extraction%20Suite%20Question)

## ON-PREMISE OFFLINE SDK

[Get Your 60 Day Free Trial](https://bytescout.com/download/web-installer?utm_source=github-readme)
[Explore SDK Docs](https://bytescout.com/documentation/index.html?utm_source=github-readme)
[Sign Up For Online Training](https://academy.bytescout.com/)

## ON-DEMAND REST WEB API

[Get your API key](https://pdf.co/documentation/api?utm_source=github-readme)
[Explore Web API Documentation](https://pdf.co/documentation/api?utm_source=github-readme)
[Explore Web API Samples](https://github.com/bytescout/ByteScout-SDK-SourceCode/tree/master/PDF.co%20Web%20API)

## VIDEO REVIEW

[https://www.youtube.com/watch?v=NEwNs2b9YN8](https://www.youtube.com/watch?v=NEwNs2b9YN8)

<!-- code block begin -->

##### ****AddBackgroundImage.VS2005.csproj:**

```
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>8.0.50727</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{8FD65C30-B5D2-45DB-9D77-4779502363AD}</ProjectGuid>
    <OutputType>Exe</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>AddBackgroundImage</RootNamespace>
    <AssemblyName>AddBackgroundImage</AssemblyName>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="Bytescout.Spreadsheet, Version=2.2.0.383, Culture=neutral, PublicKeyToken=f7dd1bd9d40a50eb, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\..\..\..\..\..\XLSRW\bin\Release\Bytescout.Spreadsheet.dll</HintPath>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Program.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
  </ItemGroup>
  <ItemGroup>
    <Content Include="image1.jpg">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>
```

<!-- code block end -->

<!-- code block begin -->

##### ****AddBackgroundImage.VS2008.csproj:**

```
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>9.0.21022</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{8FD65C30-B5D2-45DB-9D77-4779502363AD}</ProjectGuid>
    <OutputType>Exe</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>AddBackgroundImage</RootNamespace>
    <AssemblyName>AddBackgroundImage</AssemblyName>
    <OldToolsVersion>2.0</OldToolsVersion>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="Bytescout.Spreadsheet, Version=2.2.0.383, Culture=neutral, PublicKeyToken=f7dd1bd9d40a50eb, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\..\..\..\..\..\XLSRW\bin\Release\Bytescout.Spreadsheet.dll</HintPath>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Program.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
  </ItemGroup>
  <ItemGroup>
    <Content Include="image1.jpg">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>
```

<!-- code block end -->

<!-- code block begin -->

##### ****AddBackgroundImage.VS2010.csproj:**

```
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>
    </ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{8FD65C30-B5D2-45DB-9D77-4779502363AD}</ProjectGuid>
    <OutputType>Exe</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>AddBackgroundImage</RootNamespace>
    <AssemblyName>AddBackgroundImage</AssemblyName>
    <OldToolsVersion>3.5</OldToolsVersion>
    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="Bytescout.Spreadsheet, Version=2.2.0.383, Culture=neutral, PublicKeyToken=f7dd1bd9d40a50eb, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\..\..\..\..\..\XLSRW\bin\Release\Bytescout.Spreadsheet.dll</HintPath>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Program.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
  </ItemGroup>
  <ItemGroup>
    <Content Include="image1.jpg">
      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>
```

<!-- code block end -->

<!-- code block begin -->

##### ****Program.cs:**

```
using System.Diagnostics;
using System.Drawing;
using Bytescout.Spreadsheet;

namespace AddBackgroundImage
{
	class Program
	{
		static void Main(string[] args)
		{
			// Create new spreadsheet (or open existing)
			Spreadsheet doc = new Spreadsheet();
			doc.RegistrationName = "demo";
            doc.RegistrationKey = "demo";

			// Add worksheet
			Worksheet worksheet = doc.Worksheets.Add();

			// Put background image on the worksheet
			worksheet.BackgroundPicture = Image.FromFile("image1.jpg");

			// Save document
			doc.SaveAs("output.xls");

			// Close spreadsheet
			doc.Close();

			// Open generated XLS document in default application
			Process.Start("output.xls");

			doc.Dispose();
		}
	}
}

```

<!-- code block end -->


text:
#include "JsonSerializer.h"
#include "LaunchUtils.h"
#include "ServiceExample.h"
#include "PrfFrc.h"
#include "PrfOs.h"
#include "DpaTransactionTask.h"
#include "IDaemon.h"
#include "IqrfLogging.h"

INIT_COMPONENT(IService, ServiceExample)

const std::string SCHEDULED_SEND_FRC_TASK("SND_FRC");
const std::string SCHEDULED_SEND_THM_TASK("SND_THM");

ServiceExample::ServiceExample(const std::string & name)
  :m_name(name)
  , m_messaging(nullptr)
  , m_daemon(nullptr)
  , m_serializer(nullptr)
{
  m_taskQueue = std::unique_ptr<TaskQueue<PrfThermometerSchd*>>(
    ant_new TaskQueue<PrfThermometerSchd*>([this](PrfThermometerSchd* pm) {
    this->processPrfThermometerFromTaskQueue(*pm);
  }));
}

ServiceExample::~ServiceExample()
{
}

void ServiceExample::update(const rapidjson::Value& cfg)
{
  updateConfiguration(cfg);
}

//------------------------
void ServiceExample::updateConfiguration(const rapidjson::Value& cfg)
{
  TRC_ENTER("");
  jutils::assertIsObject("", cfg);

  m_frcPeriod = jutils::getPossibleMemberAs<int>("FrcPeriod", cfg, m_frcPeriod);
  m_sleepPeriod = jutils::getPossibleMemberAs<int>("SleepPeriod", cfg, m_sleepPeriod);

  const auto v = jutils::getMember("DpaRequestJsonPattern", cfg);
  if (!v->value.IsObject())
    THROW_EX(std::logic_error, "Expected: Json Object, detected: " << NAME_PAR(name, v->value.GetString()) << NAME_PAR(type, v->value.GetType()));

  std::vector<int> vect = jutils::getMemberAsVector<int>("Thermometers", cfg);
  for (int node : vect) {
    PrfThermometerJson prfThermometerJson(v->value);
    prfThermometerJson.setAddress(node);
    PrfThermometerSchd pm(prfThermometerJson, m_daemon->getScheduler());
    m_watchedThermometers.push_back(pm);
  }

  TRC_LEAVE("");
}

void ServiceExample::setDaemon(IDaemon* daemon)
{
  m_daemon = daemon;
}

void ServiceExample::setSerializer(ISerializer* serializer)
{
  m_serializer = serializer;
  m_messaging->registerMessageHandler([this](const ustring& msg) {
    this->handleMsgFromMessaging(msg);
  });
}

void ServiceExample::setMessaging(IMessaging* messaging)
{
  m_messaging = messaging;
}

void ServiceExample::start()
{
  TRC_ENTER("");

  //remove all possible configured tasks
  m_daemon->getScheduler()->removeAllMyTasks(getName());

  //register task handler
  m_daemon->getScheduler()->registerMessageHandler(m_name, [this](const std::string& task) {
    this->handleTaskFromScheduler(task);
  });

  //schedule FRCs to get running nodes
  setFrc(true);

  TRC_INF("ServiceExample :" << PAR(m_name) << " started");

  TRC_LEAVE("");
}

void ServiceExample::stop()
{
  TRC_ENTER("");

  m_taskQueue.reset();

  TRC_INF("ServiceExample :" << PAR(m_name) << " stopped");
  TRC_LEAVE("");
}

void ServiceExample::handleTaskFromScheduler(const std::string& task)
{
  TRC_DBG("==================================" << std::endl <<
    "Received from Scheduler: " << std::endl << task);

  if (SCHEDULED_SEND_FRC_TASK == task) {
    processFrcFromScheduler(task);
  }
  else if (task.find(SCHEDULED_SEND_THM_TASK) != std::string::npos) {
    processPrfThermometerFromScheduler(task);
  }
}

void ServiceExample::handleMsgFromMessaging(const ustring& msg)
{
  TRC_DBG("==================================" << std::endl <<
    "Received from Messaging: " << std::endl << FORM_HEX(msg.data(), msg.size()));

  //get input message
  std::string msgs((const char*)msg.data(), msg.size());
  //TODO
}

void ServiceExample::setFrc(bool val)
{
  if (val == m_frcActive)
    return;

  if (val && !m_frcActive) {
    TRC_DBG("Start FRC");
    m_frcHandle = m_daemon->getScheduler()->scheduleTaskPeriodic(getName(),
      SCHEDULED_SEND_FRC_TASK, std::chrono::seconds(m_frcPeriod));
    m_frcActive = true;
  }

  if (!val && m_frcActive) {
    TRC_DBG("Stop FRC");
    m_daemon->getScheduler()->removeTask(getName(), m_frcHandle);
    m_frcActive = false;
  }
}

//Process FRC sent from Scheduler
void ServiceExample::processFrcFromScheduler(const std::string& task)
{
  //prepare FRC
  PrfFrc frc(PrfFrc::Cmd::SEND, PrfFrc::FrcCmd::Prebonding);
  DpaTransactionTask trans(frc);
  m_daemon->executeDpaTransaction(trans);
  int result = trans.waitFinish();

  TRC_DBG("Response: " << NAME_PAR(STATUS, trans.getErrorStr()));

  if (0 == trans.getError()) {
    bool stopFrc = true;
    for (auto& pm : m_watchedThermometers) {
      bool isSync = pm.isSync();
      if (!isSync && frc.getFrcData_bit2(pm.getDpa().getAddress()))
        m_taskQueue->pushToQueue(&pm);
      else if (!isSync)
        stopFrc = false; //not all synced
    }
    setFrc(!stopFrc);;
  }
}

//Process thermometer task from TaskQueue
//The tasks are stored there as results from FRC handling from Scheduler
void ServiceExample::processPrfThermometerFromTaskQueue(PrfThermometerSchd& pm)
{
  if (!pm.isSync()) {
    TRC_INF(std::endl << "PMETER: " << NAME_PAR(node, pm.getDpa().getAddress()) << " ALIVE !!!!!!!!!!!!!!!" << std::endl);
    pm.setSync(true);

    //Schedule next read
    std::ostringstream os;
    os << SCHEDULED_SEND_THM_TASK << ' ' << pm.getDpa().getAddress();
    pm.scheduleTaskPeriodic(getName(), os.str(), std::chrono::seconds(m_sleepPeriod));
  }
}

void ServiceExample::processPrfThermometerFromScheduler(const std::string& task)
{
  //parse cmd and address from scheduled task
  std::string cmd;
  uint16_t adr = 0;
  std::istringstream is(task);
  is >> cmd >> adr;

  if (adr == 0) {
    TRC_WAR("Invalid address: " << PAR(adr));
    return;
  }

  //find according address from watched thermometers
  PrfThermometerSchd* prfThermometerSchd(nullptr);
  for (auto& tm : m_watchedThermometers) {
    if (tm.getDpa().getAddress() == adr) {
      prfThermometerSchd = &tm;
      break;
    }
  }

  if (nullptr == prfThermometerSchd) {
    TRC_WAR("Unknown address: " << PAR(adr));
    return;
  }

  //send read
  int sleepPeriod = m_sleepPeriod > 2 ? m_sleepPeriod - 2 : 0;
  prfThermometerSchd->getDpa().setCmd(PrfThermometer::Cmd::READ);
  DpaTransactionTask transRead(prfThermometerSchd->getDpa());
  m_daemon->executeDpaTransaction(transRead);
  int resultRead = transRead.waitFinish();

  //send sleep
  PrfOs prfOs(prfThermometerSchd->getDpa().getAddress());
  prfOs.sleep(std::chrono::milliseconds(sleepPeriod * 1000), (uint8_t)PrfOs::TimeControl::LEDG_FLASH);
  DpaTransactionTask transSleep(prfOs);
  m_daemon->executeDpaTransaction(transSleep);
  int resultSleep = transSleep.waitFinish();

  TRC_DBG(">>>>>>>>>>>>>>>>>> Thermometer result: " << NAME_PAR(TransactionError, transRead.getErrorStr())
    << NAME_PAR(TransactionError, prfThermometerSchd->getDpa().getAddress()));

  switch (resultRead) {
    case 0:
    {
      //encode output message
      std::ostringstream os;
      os << prfThermometerSchd->getDpa().encodeResponse(transRead.getErrorStr());

      ustring msgu((unsigned char*)os.str().data(), os.str().size());
      m_messaging->sendMessage(msgu);
    }
    break;

    case -1: //ERROR_TIMEOUT
    {
      //we probably lost pmeter - start FRC to sync again
      prfThermometerSchd->removeSchedule(getName());
      TRC_DBG("Lost Thermometer");
      prfThermometerSchd->setSync(false);
      setFrc(true);
    }
    break;

    case ERROR_PNUM:
    {
      //there isn't pmeter device in the address - stop trying
      prfThermometerSchd->removeSchedule(getName());
      TRC_DBG("Stop seeking Thermometer");
    }
    break;

    default:
    { //other error
      prfThermometerSchd->removeSchedule(getName());
      TRC_DBG("Stop seeking Thermometer");
    }
  }
}


text:
const crypto = require("crypto");

const opts = {
  cock: {
    algo: "sha1",
    separator: ";",
    prefix: "SB:",
    name(name) {
      return name.toLowerCase();
    },
    digest(digest) {
      // 10 digits of base 16 -> 8 digits of base 32
      return parseInt(digest.slice(0, 10), 16).toString(32).padStart(8, "0");
    }
  },
};

function hash(deck, opts) {
  let items = [];
  for (let zoneName in deck) {
    const prefix = zoneName === "side"
      ? opts.prefix
      : "";

    const cards = deck[zoneName];
    for (let cardName in cards) {
      let count = cards[cardName];
      const item = prefix + opts.name(cardName);
      while (count--)
        items.push(item);
    }
  }

  const data = items.sort().join(opts.separator);
  const digest = crypto
    .createHash(opts.algo)
    .update(data)
    .digest("hex");
  return opts.digest(digest);
}

module.exports = function (deck) {
  return {
    cock: hash(deck, opts.cock),
  };
};


text:
const Screen = require("./abstract/Screen");
const TopPanel = require("./panels/ActivityRunners/TopPanel");
const BottomPanel = require("./panels/ActivityRunners/BottomPanel");
const createStore = require("redux").createStore;
const reducers = require("../reducers");
const actions = require("../actions");
const TidalApi = require("../backend/api/ApiWrapper");
const TempManager = require("../backend/TempManager/TempManager");
const SigninPanel = require("./panels/SigninPanel");
const childProcess = require("child_process");

module.exports = class extends Screen {
	constructor(appArguments) {
		super();
		this.store = createStore(reducers);
		this.tidalApi = new TidalApi();
		this.tempManager = new TempManager("/tmp/tidal-cli-client");

		this.getScreenPixelRatio(appArguments).then(values => {
			this.pixelRatio = values;
			this.store.dispatch(actions.basic.setTempManager(this.tempManager));
			this.store.dispatch(actions.ui.setPixelRatio(this.pixelRatio));
			this.store.dispatch(actions.basic.setTidalApi(this.tidalApi));
			this.run().then();
		});
	}

	async exitValueChangeListener() {
		const storeCurrentExitValue = this.store.getState().basic.exit;
		if(storeCurrentExitValue) {
			this.exitApp();
		}
	}

	async storeListener() {
		await this.exitValueChangeListener();
	}

	exitApp() {
		//TODO: IMPROVE MPV SESSION EXITING METHOD
		childProcess.exec("pkill -9 mpv");
		process.exit(0);
	}

	async run() {
		this.store.subscribe(() => this.storeListener().then(() => {}));

		this.children = [new TopPanel(this, this.store), new BottomPanel(this, this.store)];
		await this.showElements(this.children);

		this.store.dispatch(actions.ui.setCurrentActivity(SigninPanel, {}));
	}

};


text:
<?php
/**
 * Created by PhpStorm.
 * User: leeovery
 * Date: 20/12/2016
 * Time: 12:16
 */

namespace LeeOvery\WordpressToLaravel;

class PostUpdated
{
    public $post;

    /**
     * PostUpdated constructor.
     *
     * @param $post
     */
    public function __construct($post)
    {
        $this->post = $post;
    }
}


text:
'use strict'
exports.User = require('./User')
exports.Thermostat = require('./Thermostat')
exports.Login = require('./Login')
exports.CoolingProfile = require('./CoolingProfile')


text:
using System;

namespace XenAdmin.Controls.MainWindowControls
{
    interface INavigationItem
    {
        INavigationItem PairedItem { get; set; }

        event Action<object> NavigationViewChanged;
    }

    interface INotificationItem
    {
        int UnreadEntries { get; set; }
    }
}