text:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Common_controller extends Root_Controller
{
    private  $message;
    public function __construct()
    {
        parent::__construct();
        $this->message="";

    }

    //location setup
    public function get_dropdown_zones_by_divisionid()
    {
        $division_id = $this->input->post('division_id');
        $html_container_id='#zone_id';
        if($this->input->post('html_container_id'))
        {
            $html_container_id=$this->input->post('html_container_id');
        }
        $data['items']=Query_helper::get_info($this->config->item('table_setup_location_zones'),array('id value','name text'),array('division_id ='.$division_id,'status ="'.$this->config->item('system_status_active').'"'),0,0,array('ordering ASC'));
        $ajax['status']=true;
        $ajax['system_content'][]=array("id"=>$html_container_id,"html"=>$this->load->view("dropdown_with_select",$data,true));

        $this->jsonReturn($ajax);
    }
    public function get_dropdown_territories_by_zoneid()
    {
        $zone_id = $this->input->post('zone_id');
        $html_container_id='#territory_id';
        if($this->input->post('html_container_id'))
        {
            $html_container_id=$this->input->post('html_container_id');
        }
        $data['items']=Query_helper::get_info($this->config->item('table_setup_location_territories'),array('id value','name text'),array('zone_id ='.$zone_id,'status ="'.$this->config->item('system_status_active').'"'),0,0,array('ordering ASC'));
        $ajax['status']=true;
        $ajax['system_content'][]=array("id"=>$html_container_id,"html"=>$this->load->view("dropdown_with_select",$data,true));

        $this->jsonReturn($ajax);
    }
    public function get_dropdown_districts_by_territoryid()
    {
        $territory_id = $this->input->post('territory_id');
        $html_container_id='#district_id';
        if($this->input->post('html_container_id'))
        {
            $html_container_id=$this->input->post('html_container_id');
        }
        $data['items']=Query_helper::get_info($this->config->item('table_setup_location_districts'),array('id value','name text'),array('territory_id ='.$territory_id,'status ="'.$this->config->item('system_status_active').'"'),0,0,array('ordering ASC'));
        $ajax['status']=true;
        $ajax['system_content'][]=array("id"=>$html_container_id,"html"=>$this->load->view("dropdown_with_select",$data,true));

        $this->jsonReturn($ajax);
    }
    public function get_dropdown_upazillas_by_districtid()
    {
        $district_id = $this->input->post('district_id');
        $html_container_id='#upazilla_id';
        if($this->input->post('html_container_id'))
        {
            $html_container_id=$this->input->post('html_container_id');
        }
        $data['items']=Query_helper::get_info($this->config->item('table_setup_location_upazillas'),array('id value','name text'),array('district_id ='.$district_id,'status ="'.$this->config->item('system_status_active').'"'),0,0,array('ordering ASC'));
        $ajax['status']=true;
        $ajax['system_content'][]=array("id"=>$html_container_id,"html"=>$this->load->view("dropdown_with_select",$data,true));

        $this->jsonReturn($ajax);
    }
    public function get_dropdown_unions_by_upazillaid()
    {
        $upazilla_id = $this->input->post('upazilla_id');
        $html_container_id='#union_id';
        if($this->input->post('html_container_id'))
        {
            $html_container_id=$this->input->post('html_container_id');
        }
        $data['items']=Query_helper::get_info($this->config->item('table_setup_location_unions'),array('id value','name text'),array('upazilla_id ='.$upazilla_id,'status ="'.$this->config->item('system_status_active').'"'),0,0,array('ordering ASC'));
        $ajax['status']=true;
        $ajax['system_content'][]=array("id"=>$html_container_id,"html"=>$this->load->view("dropdown_with_select",$data,true));

        $this->jsonReturn($ajax);
    }
    public function get_dropdown_customers_by_districtid()
    {
        $district_id = $this->input->post('district_id');
        $html_container_id='#customer_id';
        if($this->input->post('html_container_id'))
        {
            $html_container_id=$this->input->post('html_container_id');
        }
        //$this->db->from($this->config->item('table_csetup_customers'));
        //$this->db->select('id value');
        //$this->db->select('CONCAT(customer_code,"-",name) text',false);
        //$data['items']=$this->db->get()->result_array();
        $data['items']=Query_helper::get_info($this->config->item('table_csetup_customers'),array('id value','CONCAT(customer_code," - ",name) text'),array('district_id ='.$district_id,'status ="'.$this->config->item('system_status_active').'"'),0,0,array('ordering ASC'));
        $ajax['status']=true;
        $ajax['system_content'][]=array("id"=>$html_container_id,"html"=>$this->load->view("dropdown_with_select",$data,true));

        $this->jsonReturn($ajax);
    }
    public function get_dropdown_armbankaccounts_by_armbankid()
    {
        $arm_bank_id = $this->input->post('arm_bank_id');
        $html_container_id='#arm_bank_account_id';
        if($this->input->post('html_container_id'))
        {
            $html_container_id=$this->input->post('html_container_id');
        }
        $data['items']=Query_helper::get_info($this->config->item('table_basic_setup_arm_bank_accounts'),array('id value','account_no text'),array('bank_id ='.$arm_bank_id,'status ="'.$this->config->item('system_status_active').'"'));
        $ajax['status']=true;
        $ajax['system_content'][]=array("id"=>$html_container_id,"html"=>$this->load->view("dropdown_with_select",$data,true));

        $this->jsonReturn($ajax);
    }

    //crop classification

    public function get_dropdown_croptypes_by_cropid()
    {
        $crop_id = $this->input->post('crop_id');
        $html_container_id='#crop_type_id';
        if($this->input->post('html_container_id'))
        {
            $html_container_id=$this->input->post('html_container_id');
        }
        $data['items']=Query_helper::get_info($this->config->item('table_setup_classification_crop_types'),array('id value','name text'),array('crop_id ='.$crop_id,'status ="'.$this->config->item('system_status_active').'"'),0,0,array('ordering ASC'));
        $ajax['status']=true;
        $ajax['system_content'][]=array("id"=>$html_container_id,"html"=>$this->load->view("dropdown_with_select",$data,true));

        $this->jsonReturn($ajax);
    }
    public function get_dropdown_varieties_by_croptypeid()
    {
        $crop_type_id = $this->input->post('crop_type_id');
        $html_container_id='#variety_id';
        if($this->input->post('html_container_id'))
        {
            $html_container_id=$this->input->post('html_container_id');
        }
        $data['items']=Query_helper::get_info($this->config->item('table_setup_classification_varieties'),array('id value','name text'),array('crop_type_id ='.$crop_type_id,'status ="'.$this->config->item('system_status_active').'"'),0,0,array('ordering ASC'));
        $ajax['status']=true;
        $ajax['system_content'][]=array("id"=>$html_container_id,"html"=>$this->load->view("dropdown_with_select",$data,true));

        $this->jsonReturn($ajax);
    }
    public function get_dropdown_armvarieties_by_croptypeid()
    {
        $crop_type_id = $this->input->post('crop_type_id');
        $html_container_id='#variety_id';
        if($this->input->post('html_container_id'))
        {
            $html_container_id=$this->input->post('html_container_id');
        }
        $data['items']=Query_helper::get_info($this->config->item('table_setup_classification_varieties'),array('id value','name text'),array('crop_type_id ='.$crop_type_id,'status ="'.$this->config->item('system_status_active').'"','whose ="ARM"'),0,0,array('ordering ASC'));
        $ajax['status']=true;
        $ajax['system_content'][]=array("id"=>$html_container_id,"html"=>$this->load->view("dropdown_with_select",$data,true));

        $this->jsonReturn($ajax);
    }
    //stock in
    public function get_dropdown_crops_by_warehouseid()
    {
        $html_container_id='#crop_id';
        if($this->input->post('html_container_id'))
        {
            $html_container_id=$this->input->post('html_container_id');
        }
        $warehouse_id = $this->input->post('warehouse_id');
        $this->db->from($this->config->item('table_basic_setup_warehouse_crops').' wc');
        $this->db->select('wc.crop_id value,c.name text');
        $this->db->join($this->config->item('table_setup_classification_crops').' c','c.id =wc.crop_id','INNER');
        $this->db->where('wc.warehouse_id',$warehouse_id);
        $this->db->where('wc.revision',1);
        $this->db->order_by('c.ordering ASC');
        $data['items']=$this->db->get()->result_array();
        $ajax['status']=true;
        $ajax['system_content'][]=array("id"=>$html_container_id,"html"=>$this->load->view("dropdown_with_select",$data,true));

        $this->jsonReturn($ajax);
    }
    public function get_dropdown_allcrops()
    {
        $html_container_id='#crop_id';
        if($this->input->post('html_container_id'))
        {
            $html_container_id=$this->input->post('html_container_id');
        }
        $data['items']=Query_helper::get_info($this->config->item('table_setup_classification_crops'),array('id value','name text'),array(),0,0,array('ordering ASC'));
        $ajax['status']=true;
        $ajax['system_content'][]=array("id"=>$html_container_id,"html"=>$this->load->view("dropdown_with_select",$data,true));

        $this->jsonReturn($ajax);
    }
    public function get_dropdown_allpack_sizes()
    {
        $html_container_id='#pack_size_id';
        if($this->input->post('html_container_id'))
        {
            $html_container_id=$this->input->post('html_container_id');
        }
        $data['items']=Query_helper::get_info($this->config->item('table_setup_classification_vpack_size'),array('id value','name text'),array('status ="'.$this->config->item('system_status_active').'"'),0,0,array('name ASC'));
        $ajax['status']=true;
        $ajax['system_content'][]=array("id"=>$html_container_id,"html"=>$this->load->view("dropdown_with_select",$data,true));

        $this->jsonReturn($ajax);
    }
    public function get_dropdown_packsizes_by_variety_warehouse()
    {
        $html_container_id='#pack_size_id';
        if($this->input->post('html_container_id'))
        {
            $html_container_id=$this->input->post('html_container_id');
        }

        $variety_id = $this->input->post('variety_id');
        $warehouse_id = $this->input->post('warehouse_id');

        $this->db->from($this->config->item('table_stockin_varieties').' stv');
        //$this->db->from($this->config->item('table_basic_setup_warehouse_crops').' wc');
        $this->db->select('stv.pack_size_id value,pack.name text');
        $this->db->join($this->config->item('table_setup_classification_vpack_size').' pack','pack.id =stv.pack_size_id','INNER');
        if($warehouse_id>0)
        {
            $this->db->where('stv.warehouse_id',$warehouse_id);
        }

        $this->db->where('stv.variety_id',$variety_id);
        $this->db->where('stv.status',$this->config->item('system_status_active'));
        $this->db->group_by('stv.pack_size_id');

        $data['items']=$this->db->get()->result_array();
        $ajax['status']=true;
        $ajax['system_content'][]=array("id"=>$html_container_id,"html"=>$this->load->view("dropdown_with_select",$data,true));

        $this->jsonReturn($ajax);
    }
    public function get_price_by_variety_pack_size_id()
    {
        $html_container_id='#pack_price';
        if($this->input->post('html_container_id'))
        {
            $html_container_id=$this->input->post('html_container_id');
        }
        $variety_id = $this->input->post('variety_id');
        $pack_size_id = $this->input->post('pack_size_id');
        $info=Query_helper::get_info($this->config->item('table_setup_classification_variety_price'),array('price'),array('variety_id ='.$variety_id,'pack_size_id ='.$pack_size_id,'revision =1'),1);
        $price=$this->lang->line('LABEL_NOT_SET');
        if($info)
        {
            $price=$info['price'];
        }
        $ajax['status']=true;
        $ajax['system_content'][]=array("id"=>$html_container_id,"html"=>$price);

        $this->jsonReturn($ajax);
    }
    public function get_dropdown_curent_stock_by_variety_pack_size_id()
    {
        $html_container_id='#stock_current';
        if($this->input->post('html_container_id'))
        {
            $html_container_id=$this->input->post('html_container_id');
        }

        $variety_id = $this->input->post('variety_id');
        $pack_size_id = $this->input->post('pack_size_id');
        $this->load->model("sales_model");
        $stock_info=$this->sales_model->get_stocks(array(array('variety_id'=>$variety_id,'pack_size_id'=>$pack_size_id)));
        $current_stock='';
        if(isset($stock_info[$variety_id][$pack_size_id]))
        {
            $current_stock=$stock_info[$variety_id][$pack_size_id]['current_stock'];
        }

        $ajax['status']=true;
        $ajax['system_content'][]=array("id"=>$html_container_id,"html"=>$current_stock);

        $this->jsonReturn($ajax);
    }
    public function get_credit_by_customer_id()
    {
        $html_container_id_tp='#credit_tp';
        $html_container_id_net='#credit_net';
        if($this->input->post('html_container_id_tp'))
        {
            $html_container_id_tp=$this->input->post('html_container_id_tp');
        }
        if($this->input->post('html_container_id_net'))
        {
            $html_container_id_net=$this->input->post('html_container_id_net');
        }
        $customer_id = $this->input->post('customer_id');
        $this->load->model("sales_model");
        $current_credit=$this->sales_model->get_customer_current_credit($customer_id);
        $ajax['status']=true;
        $ajax['system_content'][]=array("id"=>$html_container_id_tp,"html"=>number_format($current_credit['tp'],2));
        $ajax['system_content'][]=array("id"=>$html_container_id_net,"html"=>number_format($current_credit['net'],2));
        $this->jsonReturn($ajax);
    }

}


text:
class CreateThinkspaceTeamSetTeamables < ActiveRecord::Migration
  def change

    create_table :thinkspace_team_team_set_teamables, force: true do |t|
      t.references  :team_set
      t.references  :teamable, polymorphic: true
      t.timestamps
      t.index  [:team_set_id],                  name: :idx_thinkspace_team_team_set_teamables_on_team_set
      t.index  [:teamable_id, :teamable_type],  name: :idx_thinkspace_team_team_set_teamables_on_teamable
    end

  end
end

redpajama_set_name: RedPajamaGithub


text:
echo "Hello, you are running sass --watch!"

dir=$(dirname $0)
echo "The directory is " \"$dir\".
echo "Converting /scss/style.scss => /css/style.css"

echo "SASS is running, happy coding bebe :-)"

sudo sass --watch $dir/scss/style.scss:$dir/css/style.css  --style expanded

echo "\n DOING some Cleanup"
sudo rm -r .sass-cache/
echo "\n SASS finished working, GOOD BY!!!"


text:
package io.github.enbyex.libextort.impl;

import io.github.enbyex.libextort.Argument;
import io.github.enbyex.libextort.BooleanArgument;
import io.github.enbyex.libextort.util.ArgumentData;

/**
 * @author soniex2
 */
public class GenericBooleanArgument implements BooleanArgument<Boolean> {
    protected final ArgumentData argData;

    public GenericBooleanArgument(String id) {
        this.argData = new ArgumentData(id);
    }

    @Override
    public boolean parseBoolean(String s) {
        return Boolean.parseBoolean(s);
    }

    @Override
    public GenericBooleanArgument setShortDescription(String shortDescription) {
        argData.setShortDescription(shortDescription);
        return this;
    }

    @Override
    public GenericBooleanArgument setLongDescription(String longDescription) {
        argData.setLongDescription(longDescription);
        return this;
    }

    @Override
    public String getId() {
        return argData.getId();
    }

    @Override
    public String getShortDescription() {
        return argData.getShortDescription();
    }

    @Override
    public String getLongDescription() {
        return argData.getLongDescription();
    }

    @Override
    public Boolean parse(String s) {
        return parseBoolean(s);
    }
}


text:
var cdb = require('cartodb.js');
var InfowindowView = require('./infowindow/infowindow-click-view');
var TooltipView = require('./infowindow/infowindow-hover-view');
var createTextLabelsTabPane = require('../../../components/tab-pane/create-text-labels-tab-pane');
var TabPaneTemplate = require('../../tab-pane-submenu.tpl');

module.exports = cdb.core.View.extend({

  initialize: function (opts) {
    if (!opts.layerDefinitionModel) throw new Error('Layer definition is required');
    if (!opts.querySchemaModel) throw new Error('querySchemaModel is required');
    if (!opts.editorModel) throw new Error('editorModel is required');
    this._layerDefinitionModel = opts.layerDefinitionModel;
    this._querySchemaModel = opts.querySchemaModel;
    this._editorModel = opts.editorModel;
    this._layerInfowindowModel = this._layerDefinitionModel.infowindowModel;
    this._layerTooltipModel = this._layerDefinitionModel.tooltipModel;

    this._editorModel.on('change:edition', this._changeStyle, this);
    this.add_related_model(this._editorModel);
  },

  render: function () {
    this._unbindEvents();
    this.clearSubViews();
    this.$el.empty();

    this._initViews();
    this._bindEvents();
    return this;
  },

  _initViews: function () {
    var self = this;

    var tabPaneTabs = [{
      label: _t('editor.layers.infowindow-menu-tab-pane-labels.click'),
      createContentView: function () {
        return new InfowindowView({
          className: 'Editor-content',
          querySchemaModel: self._querySchemaModel,
          editorModel: self._editorModel,
          layerInfowindowModel: self._layerInfowindowModel,
          layerDefinitionModel: self._layerDefinitionModel,
          templateStyles: [
            {
              value: 'none',
              label: _t('editor.layers.infowindow.style.none')
            }, {
              value: 'infowindow_light',
              label: _t('editor.layers.infowindow.style.light')
            }, {
              value: 'infowindow_dark',
              label: _t('editor.layers.infowindow.style.dark')
            }, {
              value: 'infowindow_light_header_blue',
              label: _t('editor.layers.infowindow.style.color')
            }, {
              value: 'infowindow_header_with_image',
              label: _t('editor.layers.infowindow.style.image')
            }
          ]
        });
      }
    }, {
      label: _t('editor.layers.infowindow-menu-tab-pane-labels.hover'),
      createContentView: function () {
        return new TooltipView({
          className: 'Editor-content',
          querySchemaModel: self._querySchemaModel,
          editorModel: self._editorModel,
          layerInfowindowModel: self._layerTooltipModel,
          layerDefinitionModel: self._layerDefinitionModel,
          templateStyles: [
            {
              value: 'none',
              label: _t('editor.layers.infowindow.style.none')
            }, {
              value: 'tooltip_dark',
              label: _t('editor.layers.infowindow.style.dark')
            }, {
              value: 'tooltip_light',
              label: _t('editor.layers.infowindow.style.light')
            }
          ]
        });
      }
    }];

    var tabPaneOptions = {
      tabPaneOptions: {
        template: TabPaneTemplate,
        tabPaneItemOptions: {
          tagName: 'li',
          className: 'CDB-NavSubmenu-item'
        }
      },
      tabPaneItemLabelOptions: {
        tagName: 'button',
        className: 'CDB-NavSubmenu-link u-upperCase'
      }
    };

    this._layerTabPaneView = createTextLabelsTabPane(tabPaneTabs, tabPaneOptions);
    this.$el.append(this._layerTabPaneView.render().$el);
    this.addView(this._layerTabPaneView);
  },

  _changeStyle: function (m) {
    this._layerTabPaneView.changeStyleMenu(m);
  },

  _unbindEvents: function () {
    if (this._layerTabPaneView && this._layerTabPaneView.collection) {
      this._layerTabPaneView.collection.off('change:selected', this._quitEditing, this);
    }
  },

  _bindEvents: function () {
    this._layerTabPaneView.collection.on('change:selected', this._quitEditing, this);
    this.add_related_model(this._layerTabPaneView.collection);
  },

  _quitEditing: function () {
    this._editorModel.set({edition: false});
  }
});


text:
rabbitmq-service-provider
=========================

[![Build Status](http://drone.etna-alternance.net/api/badge/github.com/etna-alternance/composer-rabbitmq-service-provider/status.svg?branch=master)](http://drone.etna-alternance.net/github.com/etna-alternance/composer-rabbitmq-service-provider)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/etna-alternance/composer-rabbitmq-service-provider/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/etna-alternance/composer-rabbitmq-service-provider/?branch=master)

Installation
------------

Modifier `composer.json` :

```
{
    // ...
    "require": {
        "etna/rabbitmq-service-provider": "~0.1"
    },
    "repositories": [
       {
           "type": "composer",
           "url": "http://blu-composer.herokuapp.com"
       }
   ]
}
```
La version 2.6.0 de videlalvaro/php-amqplib génère des erreurs et bloque les jobs trop gros par conséquent on reste sur la version 2.5.2


text:
Imports SistFoncreagro.Report
Public Class ReporteNotasBalance
    Inherits System.Web.UI.Page
   Dim FechaFin As String
    Dim IdProyecto As String
    Dim Tipo As String
    Dim Proyecto As String
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        FechaFin = Request.QueryString("FechaFin")
        IdProyecto = Request.QueryString("IdProyecto")
        Tipo = Request.QueryString("Tipo")
        Proyecto = Request.QueryString("Proyecto")

        Me.ReportViewer1.Report = New RepNotasBalance
        Me.ReportViewer1.Report.ReportParameters(0).Value = FechaFin
        Me.ReportViewer1.Report.ReportParameters(1).Value = IdProyecto
        Me.ReportViewer1.Report.ReportParameters(2).Value = Tipo
        Me.ReportViewer1.Report.ReportParameters(3).Value = Proyecto
    End Sub

End Class


text:
package com.zekunyan.linktextview;

import android.content.Context;
import android.graphics.Color;
import android.text.Layout;
import android.text.Selection;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.TextPaint;
import android.text.method.LinkMovementMethod;
import android.text.style.ClickableSpan;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.widget.TextView;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * Created by zekunyan on 14-10-21.
 * Email: zekunyan@163.com
 */
public class LinkTextView extends TextView {
    //Map for linkID to holder.
    private HashMap<Integer, LinkTextHolder> mLinkIDMap = new HashMap<Integer, LinkTextHolder>();
    //Base id for each link.
    private int mBaseID = 1;
    //The plain content text.
    private String mOriginText = "";
    //Spannable string for adding link
    private SpannableString mSpannableString = null;
    //If the view has been attached to window
    private boolean mHasShown = false;

    private static class LinkTextHolder {
        private String mText = "";
        private int mLinkID = -1;
        private int mBeginIndex = 0;
        private int mEndIndex = 0;
        //Color config.
        private LinkTextConfig mLinkTextConfig;
        //On click callback
        private OnClickInLinkText mOnClickInLinkText = null;
        //Attachment data
        private Object mAttachment = null;
    }

    public static class LinkTextConfig {
        public boolean mIsLinkUnderLine = false;
        public int mTextNormalColor = Color.BLACK;
        public int mTextPressedColor = Color.BLUE;
        public int mBackgroundNormalColor = Color.WHITE;
        public int mBackgroundPressedColor = Color.WHITE;
    }

    public interface OnClickInLinkText {
        /**
         * Called when click the link.
         *
         * @param clickText Link text.
         * @param linkID Link ID.
         * @param attachment Data attached to the link.
         */
        public void onLinkTextClick(String clickText, int linkID, Object attachment);
    }

    //Constructors
    public LinkTextView(Context context) {
        super(context);
    }

    public LinkTextView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    //Set text and reset to default config

    /**
     * Set the text you want to show. This should be called before addClick.
     * @param text The text you want to show.
     */
    public void setClickableText(String text) {
        this.mHasShown = false;
        this.mOriginText = text;
        this.mLinkIDMap.clear();
        this.mSpannableString = new SpannableString(mOriginText);
    }

    /**
     * Add a new clickable link.
     *
     * @param start Begin index for link.
     * @param end End index for link.
     * @param click Callback.
     * @param attachment Data attached to the link.
     * @return The ID for this clickable link.
     */
    public int addClick(int start, int end, OnClickInLinkText click, Object attachment) {
        if (start < 0 || end < 0 || start >= mOriginText.length() || end >= mOriginText.length()) {
            return -1;
        }

        final LinkTextHolder linkTextHolder = new LinkTextHolder();
        linkTextHolder.mLinkTextConfig = new LinkTextConfig();
        linkTextHolder.mAttachment = attachment;
        linkTextHolder.mBeginIndex = start;
        linkTextHolder.mEndIndex = end;
        linkTextHolder.mLinkID = mBaseID;
        linkTextHolder.mOnClickInLinkText = click;
        linkTextHolder.mText = mOriginText.substring(start, end);
        mLinkIDMap.put(mBaseID++, linkTextHolder);

        mSpannableString.setSpan(new TouchableSpan(linkTextHolder) {
            @Override
            public void onClick(View view) {
                if (linkTextHolder.mOnClickInLinkText != null) {
                    linkTextHolder.mOnClickInLinkText.onLinkTextClick(linkTextHolder.mText,
                            linkTextHolder.mLinkID, linkTextHolder.mAttachment);
                }
            }
        }, start, end, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);

        updateLinks();

        return linkTextHolder.mLinkID;
    }

    /**
     * Add a new clickable link with additional configurations.
     * Color is 0xARGB.
     *
     * @param start Begin index for link.
     * @param end End index for link.
     * @param click Callback.
     * @param attachment Data attached to the link.
     * @param isUnderLine Whether to show the under line.
     * @param textNormalColor Normal color for text.
     * @param textPressedColor Pressed color for text.
     * @param bgNormalColor Normal color for background.
     * @param bgPressedColor Pressed color for background.
     * @return The ID for this clickable link.
     */
    public int addClick(int start, int end, OnClickInLinkText click, Object attachment, boolean isUnderLine,
                        int textNormalColor, int textPressedColor,
                        int bgNormalColor, int bgPressedColor) {
        int id = this.addClick(start, end, click, attachment);
        if (id == -1) {
            return id;
        }

        LinkTextHolder linkTextHolder = mLinkIDMap.get(id);
        //Set custom color
        linkTextHolder.mLinkTextConfig.mIsLinkUnderLine = isUnderLine;
        linkTextHolder.mLinkTextConfig.mTextNormalColor = textNormalColor;
        linkTextHolder.mLinkTextConfig.mTextPressedColor = textPressedColor;
        linkTextHolder.mLinkTextConfig.mBackgroundNormalColor = bgNormalColor;
        linkTextHolder.mLinkTextConfig.mBackgroundPressedColor = bgPressedColor;

        updateLinks();

        return id;
    }

    /**
     * Remove link by link ID
     *
     * @param linkID
     */
    public void removeLink(int linkID) {
        if (!mLinkIDMap.containsKey(linkID)) {
            return;
        }

        try {
            mLinkIDMap.remove(linkID);
        } catch (Exception e) {
            //TODO: Log...
        }

        //Reset all links
        mSpannableString = new SpannableString(mOriginText);
        for (Integer id : mLinkIDMap.keySet()) {
            final LinkTextHolder linkTextHolder = mLinkIDMap.get(id);
            mSpannableString.setSpan(new TouchableSpan(linkTextHolder) {
                @Override
                public void onClick(View view) {
                    if (linkTextHolder.mOnClickInLinkText != null) {
                        linkTextHolder.mOnClickInLinkText.onLinkTextClick(linkTextHolder.mText,
                                linkTextHolder.mLinkID, linkTextHolder.mAttachment);
                    }
                }
            }, linkTextHolder.mBeginIndex, linkTextHolder.mEndIndex, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
        }
        updateLinks();
    }

    /**
     * Remove all clickable links.
     */
    public void removeAllLink() {
        mLinkIDMap.clear();
        mSpannableString = new SpannableString(mOriginText);
        updateLinks();
    }

    /**
     * Set new config for specific link.
     *
     * @param linkID Clickable link id.
     * @param config Config.
     */
    public void setNewConfig(int linkID, LinkTextConfig config) {
        if (!mLinkIDMap.containsKey(linkID)) {
            //TODO: Log...
            return;
        }

        LinkTextHolder linkTextHolder = mLinkIDMap.get(linkID);

        if (linkTextHolder == null) {
            //TODO: Log...
            return;
        }

        linkTextHolder.mLinkTextConfig = config;
        invalidate();
    }

    /**
     * Get specific link config by linkID.
     *
     * @param linkID Clickable link id.
     * @return Config.
     */
    public LinkTextConfig getConfig(int linkID) {
        if (!mLinkIDMap.containsKey(linkID)) {
            return null;
        }
        return mLinkIDMap.get(linkID).mLinkTextConfig;
    }

    /**
     * Set specific link text normal color.
     *
     * @param linkID Clickable link id.
     * @param color Text normal color
     */
    public void setTextNormalColor(int linkID, int color) {
        if (!mLinkIDMap.containsKey(linkID)) {
            return;
        }
        LinkTextConfig config = getConfig(linkID);
        config.mTextNormalColor = color;
        invalidate();
    }

    /**
     * Set specific link text pressed color
     *
     * @param linkID Clickable link id.
     * @param color Text pressed color
     */
    public void setTextPressedColor(int linkID, int color) {
        if (!mLinkIDMap.containsKey(linkID)) {
            return;
        }
        LinkTextConfig config = getConfig(linkID);
        config.mTextPressedColor = color;
        invalidate();
    }

    /**
     * Set specific link background normal color
     *
     * @param linkID Clickable link id.
     * @param color Background normal color
     */
    public void setBackgroundNormalColor(int linkID, int color) {
        if (!mLinkIDMap.containsKey(linkID)) {
            return;
        }
        LinkTextConfig config = getConfig(linkID);
        config.mBackgroundNormalColor = color;
        invalidate();
    }

    /**
     * Set specific link background pressed color.
     *
     * @param linkID Clickable link id.
     * @param color Background pressed color
     */
    public void setBackgroundPressedColor(int linkID, int color) {
        if (!mLinkIDMap.containsKey(linkID)) {
            return;
        }
        LinkTextConfig config = getConfig(linkID);
        config.mBackgroundPressedColor = color;
        invalidate();
    }

    /**
     * Get IDs for a specific link text.
     *
     * @param linkText Link text.
     * @return IDs
     */
    public List<Integer> getSpecificLinkIDsByText(String linkText) {
        ArrayList<Integer> ids = new ArrayList<Integer>();

        for (Integer id : mLinkIDMap.keySet()) {
            final LinkTextHolder linkTextHolder = mLinkIDMap.get(id);

            if (linkTextHolder.mText.equals(linkText)) {
                ids.add(linkTextHolder.mLinkID);
            }
        }

        return ids;
    }

    //Update
    private void updateLinks() {
        //Refresh view
        if (mHasShown) {
            this.setText(mSpannableString);
            this.setMovementMethod(LinkTouchMovementMethod.getInstance());
            invalidate();
        }
    }

    @Override
    protected void onAttachedToWindow() {
        super.onAttachedToWindow();

        //Set all clickable spans
        if (!mHasShown) {
            mHasShown = true;
            this.setText(mSpannableString);
            this.setMovementMethod(LinkTouchMovementMethod.getInstance());
        }
    }

    //Inner class
    private static abstract class TouchableSpan extends ClickableSpan {
        private boolean mIsPressed;
        private LinkTextHolder linkTextHolder;

        public TouchableSpan(LinkTextHolder linkTextHolder) {
            this.linkTextHolder = linkTextHolder;
        }

        //For LinkTouchMovementMethod call
        public void setPressed(boolean isSelected) {
            mIsPressed = isSelected;
        }

        @Override
        public void updateDrawState(TextPaint textPaint) {
            super.updateDrawState(textPaint);

            textPaint.setColor(mIsPressed ? linkTextHolder.mLinkTextConfig.mTextPressedColor :
                    linkTextHolder.mLinkTextConfig.mTextNormalColor);
            textPaint.bgColor = mIsPressed ? linkTextHolder.mLinkTextConfig.mBackgroundPressedColor :
                    linkTextHolder.mLinkTextConfig.mBackgroundNormalColor;
            textPaint.setUnderlineText(linkTextHolder.mLinkTextConfig.mIsLinkUnderLine);
        }
    }

    private static class LinkTouchMovementMethod extends LinkMovementMethod {
        private TouchableSpan mPressedSpan;
        private static LinkTouchMovementMethod mInstance;

        //Override static method
        static public LinkTouchMovementMethod getInstance() {
            if (mInstance == null) {
                mInstance = new LinkTouchMovementMethod();
            }
            return mInstance;
        }

        @Override
        public boolean onTouchEvent(TextView textView, Spannable spannable, MotionEvent event) {
            switch (event.getAction()) {
                case MotionEvent.ACTION_DOWN:
                    mPressedSpan = getPressedSpan(textView, spannable, event);
                    if (mPressedSpan != null) {
                        mPressedSpan.setPressed(true);
                        Selection.setSelection(spannable, spannable.getSpanStart(mPressedSpan),
                                spannable.getSpanEnd(mPressedSpan));
                    }
                    break;

                case MotionEvent.ACTION_MOVE:
                    TouchableSpan touchedSpan = getPressedSpan(textView, spannable, event);
                    if (mPressedSpan != null && touchedSpan != mPressedSpan) {
                        mPressedSpan.setPressed(false);
                        mPressedSpan = null;
                        Selection.removeSelection(spannable);
                    }
                    break;

                default:
                    if (mPressedSpan != null) {
                        mPressedSpan.setPressed(false);
                        super.onTouchEvent(textView, spannable, event);
                    }
                    mPressedSpan = null;
                    Selection.removeSelection(spannable);
                    break;
            }

            return true;
        }

        private TouchableSpan getPressedSpan(TextView textView, Spannable spannable, MotionEvent event) {

            int x = (int) event.getX();
            int y = (int) event.getY();

            x -= textView.getTotalPaddingLeft();
            y -= textView.getTotalPaddingTop();

            x += textView.getScrollX();
            y += textView.getScrollY();

            Layout layout = textView.getLayout();
            int line = layout.getLineForVertical(y);
            int off = layout.getOffsetForHorizontal(line, x);

            TouchableSpan[] link = spannable.getSpans(off, off, TouchableSpan.class);
            TouchableSpan touchedSpan = null;
            if (link.length > 0) {
                touchedSpan = link[0];
            }
            return touchedSpan;
        }

    }
}


text:
jQuery UI Dialog : close when clicking outside
=============================

This plugin enables to close a jQuery UI dialog when clicking outside anywhere outside the dialog or the element that opened it.
A simple demo is available as well.

## Demo
A demo is available here : http://www.coheractio.com/blog/jquery-ui-dialog-close-when-clicking-outside-demo

## How to install
In order to use it, simply add "jquery.ui.dialog-clickoutside.js" located in the "ui-clickoutside" folder to your page after any javascript required by the jQuery UI dialog.

Works with jQuery 1.9.1 and jQuery UI 1.10.3 (untested with other versions).
## How to use
Define the dialog configuration options as indicated below. And enjoy.
```javascript
$( "#dialog1" ).dialog({
  autoOpen: false,
  // Regular jQuery dialog options
  show: {
  effect: "fade",
  duration: 1000
  },
  hide: {
  effect: "fade",
  duration: 1000
  },
  // Add the 2 options below to use click outside feature
  clickOutside: true, // clicking outside the dialog will close it
  clickOutsideTrigger: "#opener1"  // Element (id or class) that triggers the dialog opening
});
```
Any click outside the dialog or the element that triggers the dialog opening will close it.

[Coheractio - Agence Web Paris](http://www.coheractio.com)


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;

public partial class SiteMember_viewproalbum : System.Web.UI.Page
{
    dataservices ds = new dataservices();
    SqlConnection cn = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\data.mdf;Integrated Security=True;User Instance=True");
    SqlCommand cmd = new SqlCommand();
    SqlDataReader reader;

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {

            cn.Open();
            cmd.Connection = cn;
            cmd.CommandText = "select first_name, last_name  from login_detail where username=@username";
            cmd.Parameters.AddWithValue("@username", Session["username"].ToString());
            Session["firstName"] = "";
            reader = cmd.ExecuteReader();
            if (reader.Read())
            {
                Session["firstName"] = reader["first_name"].ToString();
            }
            Label1.Text = Session["firstName"].ToString();
            Label2.Text = reader["last_name"].ToString();
            reader.Close();
            cmd.Parameters.Clear();
            cmd.CommandText = "select photo from profile_picture where username=@username";
            cmd.Parameters.AddWithValue("@username", Session["username"].ToString());

            try
            {
                string filepath = cmd.ExecuteScalar().ToString();
                ImageButton1.ImageUrl = filepath;
            }
            catch (Exception ex)
            {

                ImageButton1.ImageUrl = "~/profilepic/avatar.jpg";

            }
            cn.Close();
            cmd.Parameters.Clear();

        }
    }
    protected void button_command(object sender, CommandEventArgs e)
    {
        Response.Redirect("viewprophoto.aspx?albumid=" + e.CommandName + "");
    }
    protected void sqldatasource_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
    {

    }
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {

    }
}


text:
# declaration-block-semicolon-newline-after

Require a newline or disallow whitespace after the semicolons of declaration blocks.

<!-- prettier-ignore -->
```css
a {
  color: pink;
  top: 0;    ↑
}            ↑
/**          ↑
 * The newline after this semicolon */
```

This rule ignores:

- semicolons that are preceded by Less mixins
- the last semicolon of declaration blocks

Use the `block-closing-brace-*-before` rules to control the whitespace between the last semicolon and the closing brace instead.

This rule allows an end-of-line comment followed by a newline. For example,

<!-- prettier-ignore -->
```css
a {
  color: pink; /* end-of-line comment */
  top: 0;
}
```

The [`fix` option](../../../docs/user-guide/usage/options.md#fix) can automatically fix all of the problems reported by this rule.

## Options

`string`: `"always"|"always-multi-line"|"never-multi-line"`

### `"always"`

There _must always_ be a newline after the semicolon.

The following patterns are considered problems:

<!-- prettier-ignore -->
```css
a { color: pink; top: 0; }
```

<!-- prettier-ignore -->
```css
a {
  color: pink; /* end-of-line comment
    containing a newline */
  top: 0;
}
```

The following patterns are _not_ considered problems:

<!-- prettier-ignore -->
```css
a {
  color: pink;
  top: 0;
}
```

<!-- prettier-ignore -->
```css
a {
  color: pink; /* end-of-line comment */
  top: 0;
}
```

### `"always-multi-line"`

There _must always_ be a newline after the semicolon in multi-line rules.

The following patterns are considered problems:

<!-- prettier-ignore -->
```css
a {
  color: pink; top: 0;
}
```

The following patterns are _not_ considered problems:

<!-- prettier-ignore -->
```css
a { color: pink; }
```

<!-- prettier-ignore -->
```css
a { color: pink; top: 0; }
```

<!-- prettier-ignore -->
```css
a {
  color: pink;
  top: 0;
}
```

### `"never-multi-line"`

There _must never_ be whitespace after the semicolon in multi-line rules.

The following patterns are considered problems:

<!-- prettier-ignore -->
```css
a {
  color: pink;
  top: 0;
}
```

The following patterns are _not_ considered problems:

<!-- prettier-ignore -->
```css
a { color: pink; }
```

<!-- prettier-ignore -->
```css
a { color: pink; top: 0; }
```

<!-- prettier-ignore -->
```css
a {
  color: pink
  ; top: 0;
}
```


text:
#ifndef _HASH_H_
#define _HASH_H_

typedef struct hash hash_t;
typedef unsigned int (*hashfunc_t)(unsigned int, void*);

hash_t* hash_alloc(unsigned int buckets, hashfunc_t hash_func);
void* hash_lookup_entry(hash_t *hash, void* key, unsigned int key_size);
void hash_add_entry(hash_t *hash, void *key, unsigned int key_size,
	void *value, unsigned int value_size);
void hash_free_entry(hash_t *hash, void *key, unsigned int key_size);

#endif /* _HASH_H_ */


text:
using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using System.Threading.Tasks;
using System.Threading;
using System.Net.Http.Headers;

namespace System.Net.Http
{
    internal static class HttpUtilities
    {
        internal static Version DefaultRequestVersion =>
#if uap
            HttpVersionInternal.Version20;
#else
            HttpVersionInternal.Version11;
#endif
        internal static Version DefaultResponseVersion => HttpVersionInternal.Version11;

        internal static bool IsHttpUri(Uri uri)
        {
            Debug.Assert(uri != null);

            string scheme = uri.Scheme;
            return string.Equals("http", scheme, StringComparison.OrdinalIgnoreCase) ||
                string.Equals("https", scheme, StringComparison.OrdinalIgnoreCase);
        }

        // Returns true if the task was faulted or canceled and sets tcs accordingly.
        internal static bool HandleFaultsAndCancelation<T>(Task task, TaskCompletionSource<T> tcs)
        {
            Debug.Assert(task.IsCompleted); // Success, faulted, or cancelled
            if (task.IsFaulted)
            {
                tcs.TrySetException(task.Exception.GetBaseException());
                return true;
            }
            else if (task.IsCanceled)
            {
                tcs.TrySetCanceled();
                return true;
            }
            return false;
        }

        // Always specify TaskScheduler.Default to prevent us from using a user defined TaskScheduler.Current.
        //
        // Since we're not doing any CPU and/or I/O intensive operations, continue on the same thread.
        // This results in better performance since the continuation task doesn't get scheduled by the
        // scheduler and there are no context switches required.
        internal static Task ContinueWithStandard(this Task task, Action<Task> continuation)
        {
            return task.ContinueWith(continuation, CancellationToken.None,
                TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default);
        }

        internal static Task ContinueWithStandard(this Task task, object state, Action<Task, object> continuation)
        {
            return task.ContinueWith(continuation, state, CancellationToken.None,
                TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default);
        }

        internal static Task ContinueWithStandard<T>(this Task<T> task, Action<Task<T>> continuation)
        {
            return task.ContinueWith(continuation, CancellationToken.None,
                TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default);
        }

        internal static Task ContinueWithStandard<T>(this Task<T> task, object state, Action<Task<T>, object> continuation)
        {
            return task.ContinueWith(continuation, state, CancellationToken.None,
                TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default);
        }
    }
}


text:
namespace rx
{

namespace vk
{

PersistentCommandPool::PersistentCommandPool() {}

PersistentCommandPool::~PersistentCommandPool()
{
    ASSERT(!mCommandPool.valid() && mFreeBuffers.empty());
}

angle::Result PersistentCommandPool::init(vk::Context *context, uint32_t queueFamilyIndex)
{
    ASSERT(!mCommandPool.valid());

    // Initialize the command pool now that we know the queue family index.
    VkCommandPoolCreateInfo commandPoolInfo = {};
    commandPoolInfo.sType                   = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO;
    // TODO (https://issuetracker.google.com/issues/166793850) We currently reset individual
    //  command buffers from this pool. Alternatively we could reset the entire command pool.
    commandPoolInfo.flags =
        VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT | VK_COMMAND_POOL_CREATE_TRANSIENT_BIT;
    commandPoolInfo.queueFamilyIndex = queueFamilyIndex;

    ANGLE_VK_TRY(context, mCommandPool.init(context->getDevice(), commandPoolInfo));

    for (uint32_t i = 0; i < kInitBufferNum; i++)
    {
        ANGLE_TRY(allocateCommandBuffer(context));
    }

    return angle::Result::Continue;
}

void PersistentCommandPool::destroy(VkDevice device)
{
    if (!valid())
        return;

    ASSERT(mCommandPool.valid());

    for (vk::PrimaryCommandBuffer &cmdBuf : mFreeBuffers)
    {
        cmdBuf.destroy(device, mCommandPool);
    }
    mFreeBuffers.clear();

    mCommandPool.destroy(device);
}

angle::Result PersistentCommandPool::allocate(vk::Context *context,
                                              vk::PrimaryCommandBuffer *commandBufferOut)
{
    if (mFreeBuffers.empty())
    {
        ANGLE_TRY(allocateCommandBuffer(context));
        ASSERT(!mFreeBuffers.empty());
    }

    *commandBufferOut = std::move(mFreeBuffers.back());
    mFreeBuffers.pop_back();

    return angle::Result::Continue;
}

angle::Result PersistentCommandPool::collect(vk::Context *context,
                                             vk::PrimaryCommandBuffer &&buffer)
{
    // VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT NOT set, The CommandBuffer
    // can still hold the memory resource
    ANGLE_VK_TRY(context, vkResetCommandBuffer(buffer.getHandle(), 0));

    mFreeBuffers.emplace_back(std::move(buffer));
    return angle::Result::Continue;
}

angle::Result PersistentCommandPool::allocateCommandBuffer(vk::Context *context)
{
    vk::PrimaryCommandBuffer commandBuffer;
    {
        // Only used for primary CommandBuffer allocation
        VkCommandBufferAllocateInfo commandBufferInfo = {};
        commandBufferInfo.sType              = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO;
        commandBufferInfo.commandPool        = mCommandPool.getHandle();
        commandBufferInfo.level              = VK_COMMAND_BUFFER_LEVEL_PRIMARY;
        commandBufferInfo.commandBufferCount = 1;

        ANGLE_VK_TRY(context, commandBuffer.init(context->getDevice(), commandBufferInfo));
    }

    mFreeBuffers.emplace_back(std::move(commandBuffer));

    return angle::Result::Continue;
}

}  // namespace vk

}  // namespace rx


text:
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

(function() {
  /* global React, Redux, ReactRedux */
  const { connect } = ReactRedux;
  const { bindActionCreators } = Redux;

  const WhatToPrint = ({ state, actions }) => {
    const { printEvents, printTasks, toDate, fromDate, view } = state;
    const { toggleEventsShow, toggleTasksShow, changeView, changeFromDate, changeToDate } = actions;
    return React.createElement(
      Fieldset,
      { title: "What to Print", id: "what-to-print-group" },
      React.createElement(
        "div",
        { className: "fieldset-content-wrapper" },
        React.createElement(
          "div",
          { className: "row row-align-content" },
          React.createElement("input", {
            className: "row-input checkbox",
            type: "checkbox",
            id: "events",
            checked: printEvents,
            onChange: toggleEventsShow
          }),
          React.createElement(
            "label",
            { htmlFor: "events", className: "row-label mar-right-15" },
            "Events"
          ),
          React.createElement("input", {
            className: "row-input checkbox",
            type: "checkbox",
            id: "tasks",
            checked: printTasks,
            onChange: toggleTasksShow
          }),
          React.createElement("label", { htmlFor: "tasks", className: "row-label" }, "Tasks")
        ),
        React.createElement(
          "div",
          { className: "row row-label-expanded" },
          React.createElement("input", {
            className: "row-input checkbox",
            name: "to-print",
            type: "radio",
            id: "printCurrentView",
            value: "currentView",
            checked: view === "currentView",
            onChange: changeView
          }),
          React.createElement(
            "label",
            { htmlFor: "printCurrentView", className: "row-label" },
            "Current view"
          )
        ),
        React.createElement(
          "div",
          { className: "row row-label-expanded" },
          React.createElement("input", {
            className: "row-input checkbox",
            type: "radio",
            name: "to-print",
            id: "selected",
            value: "selected",
            checked: view === "selected",
            onChange: changeView
          }),
          React.createElement(
            "label",
            { htmlFor: "selected", className: "row-label" },
            "Selected events/tasks"
          )
        ),
        React.createElement(
          "div",
          { className: "row row-label-expanded" },
          React.createElement("input", {
            className: "row-input checkbox",
            type: "radio",
            name: "to-print",
            id: "custom-range",
            value: "custom",
            checked: view === "custom",
            onChange: changeView
          }),
          React.createElement(
            "label",
            { htmlFor: "custom-range", className: "row-label" },
            "Custom date range"
          )
        ),
        React.createElement(
          "div",
          { className: "row" },
          React.createElement(
            "label",
            { htmlFor: "start-date-picker", className: "row-label" },
            "From:"
          ),
          React.createElement("input", {
            type: "date",
            id: "start-date-picker",
            className: "row-input",
            value: fromDate,
            onChange: changeFromDate
          })
        ),
        React.createElement(
          "div",
          { className: "row" },
          React.createElement(
            "label",
            { htmlFor: "end-date-picker", className: "row-label" },
            "To:"
          ),
          React.createElement("input", {
            type: "date",
            id: "end-date-picker",
            className: "row-input",
            value: toDate,
            onChange: changeToDate
          })
        )
      )
    );
  };

  WhatToPrint.propTypes = {
    state: PropTypes.object.isRequired,
    actions: PropTypes.object.isRequired
  };

  const mapStateToProps = ({ whatToPrint }) => ({ state: whatToPrint });

  const mapDispatchToProps = dispatch => ({
    actions: bindActionCreators(window.__what_to_print_actions__, dispatch)
  });

  window.WhatToPrint = connect(mapStateToProps, mapDispatchToProps)(WhatToPrint);
})();


text:
package isa.gui;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.scenes.scene2d.ui.Skin;

public class Assets {
    public static TextureAtlas roughTextures;
    public static TextureAtlas smoothTextures;
    public static Skin skin;
    public static BitmapFont font;

    public static void init() {
        roughTextures = new TextureAtlas(Gdx.files.internal("isa/gui/resources/roughTextures.txt"));
        smoothTextures = new TextureAtlas(Gdx.files.internal("isa/gui/resources/smoothTextures.txt"));
        roughTextures.findRegion("white").getTexture().setFilter(Texture.TextureFilter.Nearest, Texture.TextureFilter.Nearest);

        skin = new Skin(Gdx.files.internal("isa/gui/resources/skin/uiskin.json"));

        font = new BitmapFont(Gdx.files.internal("isa/gui/resources/skin/droid_sans_mono.fnt"));

    }
}


text:
/*
 * built by slashhuang
 * cookie parser
 * created on 17/3/3
 */
import { U_decipher,U_cipher }  from './util';

module.exports =(option)=>{
    let {cookieNameList} = option;
    return (ctx, next)=>{
        ctx.cookie_decoder={
            cookieList:cookieNameList,
            //加密后的数据
            cipherValues:{},
            //解密后的数据
            rawValues:{},
            //是否验证通过
            certificate:false,
            //批量解密验证
            batchDecipher:function() {
                return new Promise((resolve,reject)=>{
                    let index=0;
                    let hasError = null
                    while(index<cookieNameList.length){
                        let cookieName = cookieNameList[index];
                        let cipherName = ctx.cookies.get(cookieName);
                        let tmp = U_decipher(cipherName);
                        if(tmp){
                            this.rawValues[cookieName] = tmp;
                            index++
                        }else{
                            // break loop
                            index = cookieNameList.length;
                            hasError = true;
                        }
                    }
                    if(!hasError){
                        resolve()
                    }else{
                       reject()
                    }
                });
            },
            cookieTemp(key,value){
                return `${key}=${value}; Path=/; HttpOnly; Max-Age=${60*60*24}`
            },
            //批量加密数据
            batchCipher:function(sourceData,callback){
                let cookieArr = [];
                Object.keys(sourceData).forEach((key,index,arr)=>{
                    //在cookie列表中,则加密
                    if(cookieNameList.indexOf(key)>-1){
                        let cipherValue= U_cipher(sourceData[key]);
                        this.cipherValues[key] =cipherValue
                        cookieArr.push(this.cookieTemp(key,cipherValue))
                    }
                })
                callback(cookieArr)
            }
        };
        //如果有加密数据
        return Promise.resolve(ctx.cookie_decoder.batchDecipher())
                .then(data=>{
                    ctx.cookie_decoder.certificate = true;
                    let {cookieList} = ctx.cookie_decoder;
                    let cookieArr = cookieList.map((cookie,index)=>{
                        return ctx.cookie_decoder.cookieTemp(cookie,ctx.cookies.get(cookie))
                    })

                    ctx.set('Set-Cookie',cookieArr);
                })
                .catch(()=>ctx.cookie_decoder.certificate = false)
                .then(()=>next())
    }
};


text:
FrameBuffer::FrameBuffer()
	: semaphore( nullptr )
	, imageView( GraphicsContext::LogicalDevice, vkDestroyImageView, GraphicsContext::LocalAllocator )
	, framebuffer( GraphicsContext::LogicalDevice, vkDestroyFramebuffer, GraphicsContext::LocalAllocator )
{
}

FrameBuffer::~FrameBuffer()
{
	Destroy();
}

void FrameBuffer::Destroy()
{
	framebuffer = nullptr;
	imageView = nullptr;

	semaphore = nullptr;
}

void FrameBuffer::InitializeImageView( VkFormat imageFormat, VkImage image )
{
	format = imageFormat;
	ASSERT( format != VK_FORMAT_UNDEFINED );

	VkImageViewCreateInfo viewInfo = {};
	viewInfo.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO;
	viewInfo.image = image;
	viewInfo.viewType = VK_IMAGE_VIEW_TYPE_2D;
	viewInfo.format = format;

	viewInfo.components.r = VK_COMPONENT_SWIZZLE_IDENTITY;
	viewInfo.components.g = VK_COMPONENT_SWIZZLE_IDENTITY;
	viewInfo.components.b = VK_COMPONENT_SWIZZLE_IDENTITY;
	viewInfo.components.a = VK_COMPONENT_SWIZZLE_IDENTITY;

	viewInfo.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
	viewInfo.subresourceRange.baseMipLevel = 0;
	viewInfo.subresourceRange.levelCount = 1;
	viewInfo.subresourceRange.baseArrayLayer = 0;
	viewInfo.subresourceRange.layerCount = 1;

	if ( vkCreateImageView( GraphicsContext::LogicalDevice, &viewInfo, imageView.AllocationCallbacks(), imageView.Replace() ) != VK_SUCCESS )
	{
		ASSERT_FAIL( "failed to create texture image view!" );
	}
}

void FrameBuffer::InitializeFrameBuffer( uint32_t width, uint32_t height, DepthBuffer& depthBuffer )
{
	this->width = width;
	this->height = height;

	semaphore = std::make_shared<VulkanSemaphore>();

	std::array<VkImageView, 2> attachments = { GetImageView(), depthBuffer.GetImageView() };

	VkFramebufferCreateInfo framebufferInfo = {};
	framebufferInfo.sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO;
	framebufferInfo.renderPass = GraphicsContext::RenderPass->GetNative();
	framebufferInfo.attachmentCount = static_cast<uint32_t>( attachments.size() );
	framebufferInfo.pAttachments = attachments.data();
	framebufferInfo.width = width;
	framebufferInfo.height = height;
	framebufferInfo.layers = 1;

	if ( vkCreateFramebuffer( GraphicsContext::LogicalDevice, &framebufferInfo, framebuffer.AllocationCallbacks(), framebuffer.Replace() ) != VK_SUCCESS )
	{
		ASSERT_FAIL( "failed to create framebuffer!" );
	}
}


text:
package com.ghstudios.android.data.cursors;

import android.database.Cursor;
import android.database.CursorWrapper;

import com.ghstudios.android.data.classes.SkillTree;
import com.ghstudios.android.data.database.S;

/**
 * A convenience class to wrap a cursor that returns rows from the "skill_trees"
 * table. The {@link getSkillTree()} method will give you a SkillTree instance
 * representing the current row.
 */
public class SkillTreeCursor extends CursorWrapper {

	public SkillTreeCursor(Cursor c) {
		super(c);
	}

	/**
	 * Returns a SkillTree object configured for the current row, or null if the
	 * current row is invalid.
	 */
	public SkillTree getSkillTree() {
		if (isBeforeFirst() || isAfterLast())
			return null;

		SkillTree skillTree = new SkillTree();

		long skillTreeId = getLong(getColumnIndex(S.COLUMN_SKILL_TREES_ID));
		String name = getString(getColumnIndex(S.COLUMN_SKILL_TREES_NAME));
		//String jpnName = getString(getColumnIndex(S.COLUMN_SKILL_TREES_JPN_NAME));

		skillTree.setId(skillTreeId);
		skillTree.setName(name);
		//skillTree.setJpnName(jpnName);

		return skillTree;
	}
}


text:
<?php
include __DIR__.'/../src/MicrosoftTranslator.php';

/*
 * Configure the translator
 */
$config = [
    'log_level'      => \MicrosoftTranslator\Logger::LEVEL_DEBUG,
    'api_client_key' => '',
];

/*
 * I set api token from my computer. No key on github please!
 */
if (empty($config["api_client_key"])) {
    $config["api_client_key"] = getenv('MICROSOFT_TRANSLATOR_CLIENT_KEY');
}

/*
 * Load the translator
 */
$msTranslator = new \MicrosoftTranslator\Client($config);

echo "\n" . $msTranslator->translate('hello', 'fr')->getBody() . "\n\n";

/*
 * Get a second loader to verify that the access token is correctly saved
 */
$msTranslator2 = new \MicrosoftTranslator\Client($config);

echo "\n" . $msTranslator2->translate('hello', 'de')->getBody() . "\n\n";


text:
package com.frameworkset.orm.cache;

import java.util.Properties;

/**
 *
 *
 *
Title: CacheControl.java

 *
 *
Description: 缓冲刷新控制机制

 *
 *
Copyright: Copyright (c) 2007

 *

 * @Date Oct 22, 2008 10:09:58 AM
 * @author biaoping.yin
 * @version 1.0
 */
public interface CacheControl {
	/**
	   * Flush a cache model
	   *
	   * @param cacheModel - the model to flush
	   */
	  public void flush(CacheModel cacheModel);

	  /**
	   * Get an object from a cache model
	   *
	   * @param cacheModel - the model
	   * @param key        - the key to the object
	   * @return the object if in the cache, or null(?)
	   */
	  public Object getObject(CacheModel cacheModel, Object key);

	  /**
	   * Remove an object from a cache model
	   *
	   * @param cacheModel - the model to remove the object from
	   * @param key        - the key to the object
	   * @return the removed object(?)
	   */
	  public Object removeObject(CacheModel cacheModel, Object key);

	  /**
	   * Put an object into a cache model
	   *
	   * @param cacheModel - the model to add the object to
	   * @param key        - the key to the object
	   * @param object     - the object to add
	   */
	  public void putObject(CacheModel cacheModel, Object key, Object object);

	  /**
	   * Configure a cache controller
	   *
	   * @param props - the properties object continaing configuration information
	   */
	  public void setProperties(Properties props);

}


text:
#pragma once

#include "il2cpp-config.h"

#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif

#include <stdint.h>
#include <assert.h>
#include <exception>

// UILocalize
struct UILocalize_t3641481405;
// System.String
struct String_t;

#include "codegen/il2cpp-codegen.h"
#include "mscorlib_System_String968488902.h"

// System.Void UILocalize::.ctor()
extern "C"  void UILocalize__ctor_m631407742 (UILocalize_t3641481405 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Void UILocalize::set_value(System.String)
extern "C"  void UILocalize_set_value_m122057330 (UILocalize_t3641481405 * __this, String_t* ___value, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Void UILocalize::OnEnable()
extern "C"  void UILocalize_OnEnable_m382863944 (UILocalize_t3641481405 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Void UILocalize::Start()
extern "C"  void UILocalize_Start_m3873512830 (UILocalize_t3641481405 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR;
// System.Void UILocalize::OnLocalize()
extern "C"  void UILocalize_OnLocalize_m2281293902 (UILocalize_t3641481405 * __this, const MethodInfo* method) IL2CPP_METHOD_ATTR;


text:
//%LICENSE////////////////////////////////////////////////////////////////
//
// Licensed to The Open Group (TOG) under one or more contributor license
// agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
// this work for additional information regarding copyright ownership.
// Each contributor licenses this file to you under the OpenPegasus Open
// Source License; you may not use this file except in compliance with the
// License.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//////////////////////////////////////////////////////////////////////////
//
//%/////////////////////////////////////////////////////////////////////////

#ifndef __UNIX_POLICYACTIONINPOLICYACTION_H
#define __UNIX_POLICYACTIONINPOLICYACTION_H

#include "CIM_PolicyActionStructure.h"
#include <CompoundPolicyAction/UNIX_CompoundPolicyAction.h>
#include <RejectConnectionAction/UNIX_RejectConnectionAction.h>
#include <VendorPolicyAction/UNIX_VendorPolicyAction.h>
#include <NetworkPacketAction/UNIX_NetworkPacketAction.h>
#include <MethodAction/UNIX_MethodAction.h>
#include <CompoundPolicyAction/UNIX_CompoundPolicyAction.h>
#include <IKEAction/UNIX_IKEAction.h>
#include <IPsecTunnelAction/UNIX_IPsecTunnelAction.h>
#include <IPsecTransportAction/UNIX_IPsecTransportAction.h>
#include <PreconfiguredTunnelAction/UNIX_PreconfiguredTunnelAction.h>
#include <PreconfiguredTransportAction/UNIX_PreconfiguredTransportAction.h>

#include "UNIX_PolicyActionInPolicyActionDeps.h"

class UNIX_PolicyActionInPolicyAction :
	public CIM_PolicyActionStructure
{
public:

	UNIX_PolicyActionInPolicyAction();
	~UNIX_PolicyActionInPolicyAction();

	virtual Boolean initialize();
	virtual Boolean load(int&);
	virtual Boolean finalize();
	virtual Boolean find(Array<CIMKeyBinding>&);
	virtual Boolean validateKey(CIMKeyBinding&) const;
	virtual void setScope(CIMName);

	virtual Boolean getGroupComponent(CIMProperty&) const;
	virtual CIMInstance getGroupComponent() const;
	virtual Boolean getPartComponent(CIMProperty&) const;
	virtual CIMInstance getPartComponent() const;
	virtual Boolean getActionOrder(CIMProperty&) const;
	virtual Uint16 getActionOrder() const;

private:
	CIMName currentScope;

#	include "UNIX_PolicyActionInPolicyActionPrivate.h"

	int groupIndex;
	int partIndex;
	UNIX_CompoundPolicyAction group_UNIX_CompoundPolicyAction_Component;
	int group_UNIX_CompoundPolicyAction_Index;
	bool endOf_UNIX_CompoundPolicyAction_Group;
	UNIX_RejectConnectionAction part_UNIX_RejectConnectionAction_Component;
	int part_UNIX_RejectConnectionAction_Index;
	bool endOf_UNIX_RejectConnectionAction_Part;
	UNIX_VendorPolicyAction part_UNIX_VendorPolicyAction_Component;
	int part_UNIX_VendorPolicyAction_Index;
	bool endOf_UNIX_VendorPolicyAction_Part;
	UNIX_NetworkPacketAction part_UNIX_NetworkPacketAction_Component;
	int part_UNIX_NetworkPacketAction_Index;
	bool endOf_UNIX_NetworkPacketAction_Part;
	UNIX_MethodAction part_UNIX_MethodAction_Component;
	int part_UNIX_MethodAction_Index;
	bool endOf_UNIX_MethodAction_Part;
	UNIX_CompoundPolicyAction part_UNIX_CompoundPolicyAction_Component;
	int part_UNIX_CompoundPolicyAction_Index;
	bool endOf_UNIX_CompoundPolicyAction_Part;
	UNIX_IKEAction part_UNIX_IKEAction_Component;
	int part_UNIX_IKEAction_Index;
	bool endOf_UNIX_IKEAction_Part;
	UNIX_IPsecTunnelAction part_UNIX_IPsecTunnelAction_Component;
	int part_UNIX_IPsecTunnelAction_Index;
	bool endOf_UNIX_IPsecTunnelAction_Part;
	UNIX_IPsecTransportAction part_UNIX_IPsecTransportAction_Component;
	int part_UNIX_IPsecTransportAction_Index;
	bool endOf_UNIX_IPsecTransportAction_Part;
	UNIX_PreconfiguredTunnelAction part_UNIX_PreconfiguredTunnelAction_Component;
	int part_UNIX_PreconfiguredTunnelAction_Index;
	bool endOf_UNIX_PreconfiguredTunnelAction_Part;
	UNIX_PreconfiguredTransportAction part_UNIX_PreconfiguredTransportAction_Component;
	int part_UNIX_PreconfiguredTransportAction_Index;
	bool endOf_UNIX_PreconfiguredTransportAction_Part;

};

#endif /* UNIX_POLICYACTIONINPOLICYACTION */