text:
<?php

/*
 *  Created on :Sep 10, 2015, 8:53:45 AM
 *  Author     :Varun Garg <varun.10@live.com>

	This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
defined('BASEPATH') OR exit('No direct script access allowed');

class Clubs extends CI_Controller {

    function index() {
        redirect(base_url() . 'Clubs/view_all');
    }

    function secure_hard() {
        if ($this->permissions->get_level() == 0) {
            echo $this->load->view('common/header', '', TRUE);
            $message['errors'] = "Insufficient Privelleges. Please Contact Our Content Head";
            echo $this->load->view('Error_message', $message, TRUE);
            echo $this->load->view('common/footer', '', TRUE);
            die();
        }
        return 1;
    }

    function CreateOrUpdate() {
        $this->secure_hard();

        $this->load->helper(array('form', 'url'));
        $this->form_validation->set_rules('c_name', 'Club\'s name', 'required');
        $this->form_validation->set_rules('c_full_name', 'Club\'s full name', 'required');

        $this->load->view('common/header');
        $this->load->library('form_validation');
        if ($this->form_validation->run() == FALSE) {
            if ($this->input->get("club_id") != NULL) {

                $query = $this->db->get_where('clubs', array('id' => $this->input->get('club_id')));
                if ($query->num_rows() == 0) {
                    echo "

No such Club exists";
                    die();
                }
                $form_data = $query->row();
                $this->load->view('Club_form', $form_data);
            } else
                $this->load->view('Club_form');
        } else {
            $this->load->helper('htmlpurifier');
            $form_data = array(
                'c_name' => html_purify($this->input->post('c_name')),
                'c_full_name' => html_purify($this->input->post('c_full_name')),
                'about_us' => html_purify($this->input->post('about_us')),
                'faculty' => html_purify($this->input->post('faculty')),
                'students' => html_purify($this->input->post('students')),
                'tagline' => html_purify($this->input->post('tagline')),
            );
            if ($this->input->get('club_id') != "") { // update
                $this->db->update('clubs', $form_data, " id = '" . $this->input->get('club_id') . "'");
                $this->logger->insert('Updated club ' . html_purify($this->input->post('c_name')) . ' (' . $this->input->get('club_id') . ')');
            } else {
                $this->db->insert('clubs', $form_data);
                $this->logger->insert('Created club ' . html_purify($this->input->post('c_name')));
            }
            redirect(base_url() . 'Clubs/view_all');
        }

        $this->load->view('common/footer');
    }

    function view_all() {

        $this->load->view('common/header');
        $this->load->view('View_allclubs');
        $this->load->view('common/footer');
    }

    function delete() {
        $title_q = $this->db->query("select c_name from clubs where id = '" . $this->input->get('club_id') . "' ");
        $title_r = $title_q->row();
        $title = $title_r->c_name;

        $this->db->query("delete from clubs where id = '" . $this->input->get('club_id') . "'");

        $this->logger->insert('Deleted club ' . $title . ' (' . $this->input->get('club_id') . ')', TRUE);

        redirect(base_url() . 'Clubs/view_all');
    }

}


text:
Puppet r10k Windows environments
--------------------------------
- All enviroments via this git repository are prefixed by Windows.

- Branches correspond to each environment

- Example:
	- windows_exam

redpajama_set_name: RedPajamaGithub


text:
package org.hawkular.alerts.api.model.condition;

import java.io.Serializable;
import java.util.Map;

import org.hawkular.alerts.api.doc.DocModel;
import org.hawkular.alerts.api.doc.DocModelProperty;
import org.hawkular.alerts.api.json.JacksonDeserializer;
import org.hawkular.alerts.api.model.condition.Condition.Type;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;

/**
 * An evaluation state of a specific condition.
 *
 * @author Jay Shaughnessy
 * @author Lucas Ponce
 */
@DocModel(description = "A base class to represent an evaluation state of a specific condition.", subTypes = {
        AvailabilityConditionEval.class, CompareConditionEval.class, EventConditionEval.class,
        ExternalConditionEval.class, MissingConditionEval.class, RateConditionEval.class, StringConditionEval.class,
        ThresholdConditionEval.class, ThresholdRangeConditionEval.class })
@JsonDeserialize(using = JacksonDeserializer.ConditionEvalDeserializer.class)
public abstract class ConditionEval implements Serializable {

    private static final long serialVersionUID = 1L;

    // result of the condition evaluation
    @DocModelProperty(description = "Result of the condition evaluation.", position = 0)
    @JsonIgnore
    protected boolean match;

    // time of condition evaluation (i.e. creation time)
    @DocModelProperty(description = "Time of condition evaluation.", position = 1)
    @JsonInclude
    protected long evalTimestamp;

    // time stamped on the data used in the eval
    @DocModelProperty(description = "Time stamped on the data used in the evaluation.", position = 2)
    @JsonInclude
    protected long dataTimestamp;

    @DocModelProperty(description = "The type of the condition eval defined. Each type has its specific properties defined "
            +
            "on its subtype of condition eval.", position = 3)
    @JsonInclude
    protected Condition.Type type;

    @DocModelProperty(description = "Properties defined by the user at Data level on the dataId used for this evaluation.", position = 4)
    @JsonInclude(Include.NON_EMPTY)
    protected Map<String, String> context;

    @DocModelProperty(description = "A canonical display string of the evaluation (the result of a call to #getLog()).", position = 5)
    @JsonInclude(Include.NON_EMPTY)
    protected String displayString;

    public ConditionEval() {
        // for json assembly
    }

    public ConditionEval(Type type, boolean match, long dataTimestamp, Map<String, String> context) {
        this.type = type;
        this.match = match;
        this.dataTimestamp = dataTimestamp;
        this.evalTimestamp = System.currentTimeMillis();
        this.context = context;
        this.displayString = null; // for construction speed, lazily update when requested or when serialized
    }

    public boolean isMatch() {
        return match;
    }

    public void setMatch(boolean match) {
        this.match = match;
    }

    public long getEvalTimestamp() {
        return evalTimestamp;
    }

    public void setEvalTimestamp(long evalTimestamp) {
        this.evalTimestamp = evalTimestamp;
    }

    public long getDataTimestamp() {
        return dataTimestamp;
    }

    public void setDataTimestamp(long dataTimestamp) {
        this.dataTimestamp = dataTimestamp;
    }

    public Condition.Type getType() {
        return type;
    }

    public void setType(Condition.Type type) {
        this.type = type;
    }

    public Map<String, String> getContext() {
        return context;
    }

    public void setContext(Map<String, String> context) {
        this.context = context;
    }

    public String getDisplayString() {
        if (null == this.displayString) {
            updateDisplayString();
        }
        return this.displayString;
    }

    public void setDisplayString(String displayString) {
        this.displayString = displayString;
    }

    @JsonIgnore
    public abstract String getTenantId();

    @JsonIgnore
    public abstract String getTriggerId();

    @JsonIgnore
    public abstract int getConditionSetSize();

    @JsonIgnore
    public abstract int getConditionSetIndex();

    /**
     * @return The condition expression with the values used to determine the match. Note that this
     * String does not include whether the match is true or false.  That can be determined via {@link #isMatch()}.
     */
    @JsonIgnore
    public abstract void updateDisplayString();

    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;

        ConditionEval that = (ConditionEval) o;

        if (evalTimestamp != that.evalTimestamp)
            return false;
        if (dataTimestamp != that.dataTimestamp)
            return false;
        if (type != that.type)
            return false;
        return !(context != null ? !context.equals(that.context) : that.context != null);

    }

    @Override
    public int hashCode() {
        int result = (int) (evalTimestamp ^ (evalTimestamp >>> 32));
        result = 31 * result + (int) (dataTimestamp ^ (dataTimestamp >>> 32));
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (context != null ? context.hashCode() : 0);
        return result;
    }
}


text:
  Arboras est
       un village
       géographiquement positionné dans le département de Hérault en Languedoc-Roussillon. Elle totalisait 84 habitants en 2008.

À coté de Arboras sont situées les villes de
Jonquières localisée à 3 km, 368 habitants,
Lagamas localisée à 5 km, 121 habitants,
Saint-Guiraud à 4 km, 223 habitants,
Fos située à 5 km, 88 habitants,
Saint-Guilhem-le-Désert située à 5 km, 243 habitants,
Montpeyroux à 2 km, 1 170 habitants,
 entre autres. De plus, Arboras est située à seulement 28 km de Pézenas.

Le nombre d'habitations, à Arboras, se décomposait en 2011 en neuf appartements et 78 maisons soit
 un marché plutôt équilibré.

Si vous envisagez de demenager à Arboras, vous pourrez aisément trouver une maison à acheter.


text:
package commands

import (
	"fmt"

	"github.com/github/git-lfs/lfs"
	"github.com/github/git-lfs/vendor/_nuts/github.com/spf13/cobra"
)

var (
	extCmd = &cobra.Command{
		Use: "ext",
		Run: extCommand,
	}

	extListCmd = &cobra.Command{
		Use:   "list",
		Short: "View details for specified extensions",
		Run:   extListCommand,
	}
)

func extCommand(cmd *cobra.Command, args []string) {
	printAllExts()
}

func extListCommand(cmd *cobra.Command, args []string) {
	n := len(args)
	if n == 0 {
		printAllExts()
		return
	}

	config := lfs.Config
	for _, key := range args {
		ext := config.Extensions()[key]
		printExt(ext)
	}
}

func printAllExts() {
	config := lfs.Config

	extensions, err := lfs.SortExtensions(config.Extensions())
	if err != nil {
		fmt.Println(err)
		return
	}
	for _, ext := range extensions {
		printExt(ext)
	}
}

func printExt(ext lfs.Extension) {
	Print("Extension: %s", ext.Name)
	Print("    clean = %s", ext.Clean)
	Print("    smudge = %s", ext.Smudge)
	Print("    priority = %d", ext.Priority)
}

func init() {
	extCmd.AddCommand(extListCmd)
	RootCmd.AddCommand(extCmd)
}


text:
package com.cg.hashcode;
//step 1: package declaration
//step 2: import if required
//step 3: public class
//step 4: private instance/member variable
//step 5: static variables if required
//step 6: static init block for initializing static var
//step 7: init block for initializing var with default value
//step 8: No-Arg constructor
//step 9: Overlaoded Constructor
//step 10: Business Methods
//step 11: Override toString() method
//step 12: Getters and setters
public class BankAccount {
	private int accId;
	protected String accHolderName;
	private double curBal;
	private static String bankName;
	private static int numId;
	static{
		bankName="CG Bank India Pvt. Ltd";
		numId=1000;
		System.out.println("static-init block invoked");
	}
	//init block
	{
		//auto generation of accId
		accId=(int) (numId++ +(Math.random()*111.11));
		accHolderName="unknown";
		curBal=0.0;
		System.out.println("init block invoked");
	}
	public BankAccount() {
		System.out.println("No-arg BankAccount constructor");
	}
	public BankAccount(String accHolderName,double curBal){
		this.accHolderName=accHolderName;
		this.curBal=curBal;
		System.out.println("Overloaded BankAccount constructor");
	}

	//business methods
	public void deposit(double amount){
		curBal+=amount;//curBal=curBal+amount
		System.out.println("Amount Deposit successfully "
				+ ", your Cuurent Balance is :"+curBal);
	}//end of deposit
	public void withdraw(double amount){
		if(checkBalance(amount)){
			curBal-=amount;//curBal=curBal+amount
			System.out.println(amount+"Amount Withdrawn successfully "
					+ ", your Cuurent Balance is :"+curBal);
		}
	}//end of withdraw
	private boolean checkBalance(double amount) {
		if(curBal>amount){
			System.out.println("Current Balance is :"+curBal);
			return true;
		}else{
			System.out.println("In-sufficientBalance,"
					+ " Your Current Balance is :"+curBal);
			return false;
		}
	}//end of check balance
	//Static Binding\Early Binding\Method Overloading
	public void print(int NoOfPrint){}
	public void print(){
		System.out.println(
				"|===================You Bank Account Details================|"
				+ "\nBank Account Id	    	:    	"+accId
				+ "\nAccount Holder Name	:	 "+accHolderName
				+ "\nCurrent Balance 	:        "+curBal
				+ "\nBank Name 		:        "+bankName
				+"\n|===========================================================|");

	}//endof print
//override toString
	@Override
	public String toString() {
		return "BankAccount [accId=" + accId + ", accHolderName="
				+ accHolderName + ", curBal=" + curBal
				+"Bank Name 		: "+bankName+"]";
	}
//generate getter and setters
	public int getAccId() {
		return accId;
	}
	public void setAccId(int accId) {
		this.accId = accId;
	}
	public String getAccHolderName() {
		return accHolderName;
	}
	public void setAccHolderName(String accHolderName) {
		this.accHolderName = accHolderName;
	}
	public double getCurBal() {
		return curBal;
	}
	public void setCurBal(double curBal) {
		this.curBal = curBal;
	}
	public static String getBankName() {
		return bankName;
	}
	public static void setBankName(String bankName) {
		BankAccount.bankName = bankName;
	}
/*	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((accHolderName == null) ? 0 : accHolderName.hashCode());
		result = prime * result + accId;
		long temp;
		temp = Double.doubleToLongBits(curBal);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		BankAccount other = (BankAccount) obj;
		if (accHolderName == null) {
			if (other.accHolderName != null)
				return false;
		} else if (!accHolderName.equals(other.accHolderName))
			return false;
		if (accId != other.accId)
			return false;
		if (Double.doubleToLongBits(curBal) != Double
				.doubleToLongBits(other.curBal))
			return false;
		return true;
	}*/

	@Override
	public int hashCode() {
		return this.accId;
	}
	@Override
	public boolean equals(Object obj) {
		// TODO Auto-generated method stub
		return this.hashCode()==obj.hashCode();
	}

	/*public boolean equals(BankAccount obj) {
		return this.accId==obj.accId;
	}*/
	//equals()

	/*public boolean equals(Object obj) {
		//check the obj type
		if(obj instanceof BankAccount){
			//type cast
			BankAccount ba =(BankAccount)obj;
			if((this.accId==ba.accId)&&
				(this.accHolderName.equals(ba.accHolderName))&&
				(this.curBal==ba.curBal))
			{
				return true;
			}
		}
		return false;
	}	*/
}


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="200dp"
    android:orientation="vertical">

    <ImageView
        android:layout_width="match_parent"
        android:layout_height="200dp"
        android:background="@drawable/header" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentStart="true"
        android:layout_marginBottom="21dp"
        android:layout_marginRight="20dp"
        android:gravity="right"
        android:orientation="vertical">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:text="Integration"
            android:textColor="@android:color/white"
            android:textSize="30sp" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_marginTop="10dp"
            android:text="An app for study MVP and MD"
            android:textColor="@android:color/white"
            android:textSize="18sp" />
    </LinearLayout>
</RelativeLayout>


text:
<?php

require_once DWOO_DIRECTORY . 'Dwoo/Compiler.php';

class BlockTests extends PHPUnit_Framework_TestCase
{
	protected $compiler;
	protected $dwoo;

	public function __construct()
	{
		// extend this class and override this in your constructor to test a modded compiler
		$this->compiler = new Dwoo_Compiler();
		$this->dwoo = new Dwoo(DWOO_COMPILE_DIR, DWOO_CACHE_DIR);
	}

	public function testA()
	{
		$tpl = new Dwoo_Template_String('{a "http://foo/" test="foo" bar="bar"; "Foo!" /}');
		$tpl->forceCompilation();
		$this->assertEquals('Foo!', $this->dwoo->get($tpl, array(), $this->compiler));

		$tpl = new Dwoo_Template_String('{a "http://foo/" /}');
		$tpl->forceCompilation();
		$this->assertEquals('http://foo/', $this->dwoo->get($tpl, array(), $this->compiler));

		$tpl = new Dwoo_Template_String('{a "http://foo/"; $link /}');
		$tpl->forceCompilation();
		$this->assertEquals('moo', $this->dwoo->get($tpl, array('link'=>'moo'), $this->compiler));

		$tpl = new Dwoo_Template_String('{a $url test="foo" bar="bar"}');
		$tpl->forceCompilation();
		$this->assertEquals('http://foo/', $this->dwoo->get($tpl, array('url'=>'http://foo/'), $this->compiler));

		$tpl = new Dwoo_Template_String('{a $url foo="bar"; "text" /}
{a $url; "" /}
{a $url; /}
{a $url}{/}');
		$tpl->forceCompilation();
		$this->assertEquals('text

http://foo/
http://foo/', $this->dwoo->get($tpl, array('url'=>'http://foo/'), $this->compiler));

		// fixes the init call not being called (which is normal)
		$fixCall = new Dwoo_Plugin_a($this->dwoo);
		$fixCall->init('');
	}

	public function testAutoEscape()
	{
		$cmp = new Dwoo_Compiler();
		$cmp->setAutoEscape(true);

		$tpl = new Dwoo_Template_String('{$foo}{auto_escape off}{$foo}{/}');
		$tpl->forceCompilation();

		$this->assertEquals("a<b>cac", $this->dwoo->get($tpl, array('foo'=>'ac'), $cmp));

		$cmp->setAutoEscape(false);
		$tpl = new Dwoo_Template_String('{$foo}{auto_escape true}{$foo}{/}');
		$tpl->forceCompilation();

		$this->assertEquals("aca<b>c", $this->dwoo->get($tpl, array('foo'=>'ac')));

		// fixes the init call not being called (which is normal)
		$fixCall = new Dwoo_Plugin_auto_escape($this->dwoo);
		$fixCall->init('');
	}

	/**
	 * @expectedException Dwoo_Compilation_Exception
	 */
	public function testAutoEscapeWrongParam()
	{
		$tpl = new Dwoo_Template_String('{$foo}{auto_escape slkfjsl}{$foo}{/}');
		$tpl->forceCompilation();

		$this->dwoo->get($tpl, array('foo'=>'ac'));
	}

	public function testCapture()
	{
		$tpl = new Dwoo_Template_String('{capture name="foo" assign="foo"}BAR{/capture}{$dwoo.capture.foo}-{$foo}');
		$tpl->forceCompilation();
		$this->assertEquals('BAR-BAR', $this->dwoo->get($tpl, array(), $this->compiler));

		$tpl = new Dwoo_Template_String('{capture "foo" "foo"}BAR{/capture}{capture "foo" "foo" true}BAR{/capture}{$foo}');
		$tpl->forceCompilation();
		$this->assertEquals('BARBAR', $this->dwoo->get($tpl, array(), $this->compiler));

		$tpl = new Dwoo_Template_String('{capture "foo" "foo" false true}

BAZZ       {/capture}{$foo}');
		$tpl->forceCompilation();
		$this->assertEquals('BAZZ', $this->dwoo->get($tpl, array(), $this->compiler));

		// fixes the init call not being called (which is normal)
		$fixCall = new Dwoo_Plugin_capture($this->dwoo);
		$fixCall->init('');
	}

	public function testDynamic()
	{
		$preTime = time();
		$tpl = new Dwoo_Template_String('{$pre}{dynamic}{$pre}{/}', 10, 'testDynamic');
		$tpl->forceCompilation();

		$this->assertEquals($preTime . $preTime, $this->dwoo->get($tpl, array('pre'=>$preTime), $this->compiler));

		sleep(1);
		$postTime = time();
		$this->assertEquals($preTime . $postTime, $this->dwoo->get($tpl, array('pre'=>$postTime), $this->compiler));

		// fixes the init call not being called (which is normal)
		$fixCall = new Dwoo_Plugin_dynamic($this->dwoo);
		$fixCall->init('');
	}

	public function testExtends()
	{
		$tpl = new Dwoo_Template_File(dirname(__FILE__).DIRECTORY_SEPARATOR.'resources'.DIRECTORY_SEPARATOR.'extend1.html');
		$tpl->forceCompilation();

		$this->assertThat($this->dwoo->get($tpl, array(), $this->compiler), new DwooConstraintStringEquals("foo
child1
toplevelContent1
bar
toplevelContent2
baz"));
	}

	public function testNonExtendedBlocksFromParent()
	{
		$tpl = new Dwoo_Template_File(dirname(__FILE__).DIRECTORY_SEPARATOR.'resources'.DIRECTORY_SEPARATOR.'toplevel.html');
		$tpl->forceCompilation();

		$this->assertThat($this->dwoo->get($tpl, array(), $this->compiler), new DwooConstraintStringEquals("foo

toplevelContent1

bar

toplevelContent2

baz"));
		// fixes the init call not being called (which is normal)
		$fixCall = new Dwoo_Plugin_block($this->dwoo);
		$fixCall->init('');
	}

	public function testExtendsMultiple()
	{
		$tpl = new Dwoo_Template_File(dirname(__FILE__).DIRECTORY_SEPARATOR.'resources'.DIRECTORY_SEPARATOR.'extend2.html');
		$tpl->forceCompilation();

		$this->assertThat($this->dwoo->get($tpl, array('foo'=>'bar'), $this->compiler), new DwooConstraintStringEquals("foo
child1
toplevelContent1child2
bar
FOObartoplevelContent2
baz"));
	}

	public function testIf ()
	{
		$tpl = new Dwoo_Template_String('{if "BAR"==reverse($foo|reverse|upper)}true{/if}');
		$tpl->forceCompilation();

		$this->assertEquals('true', $this->dwoo->get($tpl, array('foo'=>'bar'), $this->compiler));

		// fixes the init call not being called (which is normal)
		$fixCall = new Dwoo_Plugin_if ($this->dwoo);
		$fixCall->init(array());
	}

	public function testIfVariation2 ()
	{
		$tpl = new Dwoo_Template_String('{if 4/2==2 && 2!=1 && 3>0 && 4<5 && 5<=5 && 6>=3 && 3===3 && "3"!==3}true{/if}');
		$tpl->forceCompilation();

		$this->assertEquals('true', $this->dwoo->get($tpl, array(), $this->compiler));
	}

	public function testIfVariation3 ()
	{
		$tpl = new Dwoo_Template_String('{if 5%2==1 && !isset($foo)}true{/if}');
		$tpl->forceCompilation();

		$this->assertEquals('true', $this->dwoo->get($tpl, array(), $this->compiler));
	}

	public function testIfVariation4 ()
	{
		$tpl = new Dwoo_Template_String('{if 5 is not div by 2 && 4 is div by 2 && 6 is even && 6 is not even by 5 && (3 is odd && 9 is odd by 3)}true{/if}');
		$tpl->forceCompilation();

		$this->assertEquals('true', $this->dwoo->get($tpl, array(), $this->compiler));
	}

	public function testIfVariation5 ()
	{
		$tpl = new Dwoo_Template_String('{if (3==4 && 5==5) || 3==3}true{/if}');
		$tpl->forceCompilation();

		$this->assertEquals('true', $this->dwoo->get($tpl, array(), $this->compiler));
	}

	public function testIfElseif ()
	{
		$tpl = new Dwoo_Template_String('{if "BAR" == "bar"}true{elseif "BAR"=="BAR"}false{/if}');
		$tpl->forceCompilation();

		$this->assertEquals('false', $this->dwoo->get($tpl, array(), $this->compiler));

		// fixes the init call not being called (which is normal)
		$fixCall = new Dwoo_Plugin_elseif ($this->dwoo);
		$fixCall->init(array());
	}

	public function testIfElse()
	{
		$tpl = new Dwoo_Template_String('{if "BAR" == "bar"}true{else}false{/if}');
		$tpl->forceCompilation();

		$this->assertEquals('false', $this->dwoo->get($tpl, array(), $this->compiler));

		// fixes the init call not being called (which is normal)
		$fixCall = new Dwoo_Plugin_else($this->dwoo);
		$fixCall->init();
	}

	public function testIfElseifElse()
	{
		$tpl = new Dwoo_Template_String('{if "BAR" == "bar"}true{elseif 3==5}true{else}false{/if}');
		$tpl->forceCompilation();

		$this->assertEquals('false', $this->dwoo->get($tpl, array(), $this->compiler));
	}

	public function testIfElseifElseifElse()
	{
		$tpl = new Dwoo_Template_String('{if "BAR" == "bar"}true{elseif 3==5}true{elseif 5==3}true{else}false{/if}');
		$tpl->forceCompilation();

		$this->assertEquals('false', $this->dwoo->get($tpl, array(), $this->compiler));
	}

	public function testIfElseifElseif()
	{
		$tpl = new Dwoo_Template_String('{if "BAR" == "bar"}true{elseif 3==5}true{elseif 5==5}moo{/if}');
		$tpl->forceCompilation();

		$this->assertEquals('moo', $this->dwoo->get($tpl, array(), $this->compiler));
	}

	public function testIfElseifElseifVariation2()
	{
		$tpl = new Dwoo_Template_String('{if "BAR" == "bar"}true{elseif 5==5}moo{elseif 3==5}true{/if}');
		$tpl->forceCompilation();

		$this->assertEquals('moo', $this->dwoo->get($tpl, array(), $this->compiler));
	}

	public function testIfElseImplicitUnset()
	{
		$tpl = new Dwoo_Template_String('{if $moo}true{else}false{/if}');
		$tpl->forceCompilation();

		$this->assertEquals('false', $this->dwoo->get($tpl, array(), $this->compiler));
	}

	public function testIfElseImplicitTrue()
	{
		$tpl = new Dwoo_Template_String('{if $moo}true{else}false{/if}');
		$tpl->forceCompilation();

		$this->assertEquals('true', $this->dwoo->get($tpl, array('moo'=>'i'), $this->compiler));
	}

	public function testFor()
	{
		$tpl = new Dwoo_Template_String('{for name=i from=$sub}{$i}.{$sub[$i]}{/for}');
		$tpl->forceCompilation();

		$this->assertEquals('0.foo1.bar2.baz3.qux', $this->dwoo->get($tpl, array('sub'=>array('foo','bar','baz','qux')), $this->compiler));

		$tpl = new Dwoo_Template_String('{for name=i from=$sub to=2}{$i}.{$sub[$i]}{/for}');
		$tpl->forceCompilation();

		$this->assertEquals('0.foo1.bar', $this->dwoo->get($tpl, array('sub'=>array('foo','bar','baz','qux')), $this->compiler));

		// fixes the init call not being called (which is normal)
		$fixCall = new Dwoo_Plugin_for ($this->dwoo);
		$fixCall->init(null,null);
	}

	public function testForVars()
	{
		$tpl = new Dwoo_Template_String('{for name=i from=3 to=6}{$.for.i.index}|{$.for.i.iteration}|{$.for.i.first}|{$.for.i.last}|{$.for.i.show}|{$.for.i.total}||{/for}');
		$tpl->forceCompilation();
		$this->assertEquals('3|1|1||1|4||'.'4|2|||1|4||'.'5|3|||1|4||'.'6|4||1|1|4||', $this->dwoo->get($tpl, array(), $this->compiler));
	}

	public function testForVariations()
	{
		$tpl = new Dwoo_Template_String('{for i 1 1}-{$i}{/for}|{for i 1 2}-{$i}{/for}|{for i 1 3}-{$i}{/for}');
		$tpl->forceCompilation();

		$this->assertEquals('-1|-1-2|-1-2-3', $this->dwoo->get($tpl, array('sub'=>array('foo','bar','baz','qux')), $this->compiler));

		$tpl = new Dwoo_Template_String('{for i 10 7}-{$i}{/for}');
		$tpl->forceCompilation();

		$this->assertEquals('-10-9-8-7', $this->dwoo->get($tpl, array('sub'=>array('foo','bar','baz','qux')), $this->compiler));
	}

	public function testForElse()
	{
		$tpl = new Dwoo_Template_String('{for name=i from=array()}{$i}{else}Narp!{/for}');
		$tpl->forceCompilation();

		$this->assertEquals('Narp!', $this->dwoo->get($tpl, array(), $this->compiler));

		$tpl = new Dwoo_Template_String('{for name=i from=0 to=0}{$i}{forelse}Narp!{/for}');
		$tpl->forceCompilation();

		$this->assertEquals('0', $this->dwoo->get($tpl, array(), $this->compiler));

		$tpl = new Dwoo_Template_String('{for name=i from=0 to=10 step=3}{$i}{else}Narp!{/for}');
		$tpl->forceCompilation();

		$this->assertEquals('0369', $this->dwoo->get($tpl, array(), $this->compiler));

		// fixes the init call not being called (which is normal)
		$fixCall = new Dwoo_Plugin_forelse($this->dwoo);
		$fixCall->init(null,null);
	}

	public function testForeachSmarty()
	{
		$tpl = new Dwoo_Template_String('{foreach from=$sub key=key item=item}{$key}.{$item}{/foreach}');
		$tpl->forceCompilation();

		$this->assertEquals('0.foo1.bar', $this->dwoo->get($tpl, array('sub'=>array('foo','bar')), $this->compiler));

		// fixes the init call not being called (which is normal)
		$fixCall = new Dwoo_Plugin_foreach ($this->dwoo);
		$fixCall->init('');
	}

	public function testForeachSmartyAlt()
	{
		$tpl = new Dwoo_Template_String('{foreach from=$sub key=key item=item}{$key}.{$item}{/foreach}');
		$tpl->forceCompilation();

		$this->assertEquals('0.foo1.bar', $this->dwoo->get($tpl, array('sub'=>array('foo','bar')), $this->compiler));
	}

	public function testForeachDwoo()
	{
		// Item only, key arg is mapped to it just as foreach ($foo as $item)
		$tpl = new Dwoo_Template_String('{foreach $sub item}{$item}{/foreach}');
		$tpl->forceCompilation();

		$this->assertEquals('foobar', $this->dwoo->get($tpl, array('sub'=>array('foo','bar')), $this->compiler));

		// Item and key used, key is second just as foreach ($foo as $key=>$item)
		$tpl = new Dwoo_Template_String('{foreach $sub key item}{$key}.{$item}{/foreach}');
		$tpl->forceCompilation();

		$this->assertEquals('0.foo1.bar', $this->dwoo->get($tpl, array('sub'=>array('foo','bar')), $this->compiler));
	}

	public function testForeachImplode()
	{
		$tpl = new Dwoo_Template_String('{foreach $sub item implode=", "}{$item}{/foreach}');
		$tpl->forceCompilation();
		$this->assertEquals('foo, bar', $this->dwoo->get($tpl, array('sub'=>array('foo','bar')), $this->compiler));
	}

	public function testForeachWithGlobalVars()
	{
		$tpl = new Dwoo_Template_String('{foreach $sub key item foo}{if $dwoo.foreach.foo.first}F{elseif $dwoo.foreach.foo.last}L{/if}{/foreach}');
		$tpl->forceCompilation();

		$this->assertEquals('FL', $this->dwoo->get($tpl, array('sub'=>array('foo','bar')), $this->compiler));
	}

	public function testForeachWithGlobalVarsPreceding()
	{
		$tpl = new Dwoo_Template_String('{if isset($dwoo.foreach.foo.total)}fail{/if}{foreach $sub key item foo}{/foreach}');
		$tpl->forceCompilation();

		$this->assertEquals('', $this->dwoo->get($tpl, array('sub'=>array('foo','bar')), $this->compiler));
	}

	public function testForeachWithGlobalVarsFollowing()
	{
		$tpl = new Dwoo_Template_String('{foreach $sub key item foo}{/foreach}{$dwoo.foreach.foo.total}');
		$tpl->forceCompilation();

		$this->assertEquals('2', $this->dwoo->get($tpl, array('sub'=>array('foo','bar')), $this->compiler));
	}

	public function testForeachDwoo_Alt()
	{
		$tpl = new Dwoo_Template_String('{foreach $sub key item}{$key}.{$item}{/foreach}');
		$tpl->forceCompilation();

		$this->assertEquals('0.foo1.bar', $this->dwoo->get($tpl, array('sub'=>array('foo','bar')), $this->compiler));
	}

	public function testForeachElseEmpty()
	{
		$tpl = new Dwoo_Template_String('{foreach from=$sub key=key item=item}{$key}.{$item}{foreachelse}bar{/foreach}');
		$tpl->forceCompilation();

		$this->assertEquals('bar', $this->dwoo->get($tpl, array('sub'=>array()), $this->compiler));

		// fixes the init call not being called (which is normal)
		$fixCall = new Dwoo_Plugin_foreachelse($this->dwoo);
		$fixCall->init('');
	}

	public function testForeachElseUnset()
	{
		$tpl = new Dwoo_Template_String('{foreach from=$sub key=key item=item}{$key}.{$item}{foreachelse}bar{/foreach}');
		$tpl->forceCompilation();

		$this->assertEquals('bar', $this->dwoo->get($tpl, array(), $this->compiler));
	}

	public function testLoop()
	{
		$tpl = new Dwoo_Template_String('{loop $foo}{$.loop.default.index}>{$0}/{$1}{/loop}');
		$tpl->forceCompilation();

		$this->assertEquals('0>a/b1>c/d', $this->dwoo->get($tpl, array('foo'=>array(array('a','b'), array('c','d'))) , $this->compiler));

		// fixes the init call not being called (which is normal)
		$fixCall = new Dwoo_Plugin_loop($this->dwoo);
		$fixCall->init('');
	}

	public function testLoopElse()
	{
		$tpl = new Dwoo_Template_String('{loop $foo}{$.loop.default.index}>{$0}/{$1}{else}MOO{/loop}');
		$tpl->forceCompilation();

		$this->assertEquals('MOO', $this->dwoo->get($tpl, array() , $this->compiler));

		// fixes the init call not being called (which is normal)
		$fixCall = new Dwoo_Plugin_loop($this->dwoo);
		$fixCall->init('');
	}

	public function testLoopVars()
	{
		$tpl = new Dwoo_Template_String('{loop $foo name=i}{$.loop.i.index}|{$.loop.i.iteration}|{$.loop.i.first}|{$.loop.i.last}|{$.loop.i.show}|{$.loop.i.total}||{/}');
		$tpl->forceCompilation();
		$this->assertEquals('0|1|1||1|4||'.'1|2|||1|4||'.'2|3|||1|4||'.'3|4||1|1|4||', $this->dwoo->get($tpl, array('foo'=>array('a','b','c','d')), $this->compiler));
	}

	public function testStrip()
	{
		$tpl = new Dwoo_Template_String("{strip}a\nb\nc{/strip}a\nb\nc");
		$tpl->forceCompilation();
		$this->assertEquals("abca\nb\nc", $this->dwoo->get($tpl, array(), $this->compiler));

		// fixes the init call not being called (which is normal)
		$fixCall = new Dwoo_Plugin_strip($this->dwoo);
		$fixCall->init('');
	}

	public function testStripJavascript()
	{
		$tpl = new Dwoo_Template_String("{strip js}function() { // does bleh
bleh();
/* block comment

*/
}
{/strip}");
		$tpl->forceCompilation();
		$this->assertEquals("function() {bleh();}", $this->dwoo->get($tpl, array(), $this->compiler));
	}

	public function testStripWithPhp()
	{
		$tpl = new Dwoo_Template_String("{strip}a\nb{\$foo=\"\\n\"}{if \$foo}>{\$foo}<{/if}\nc{/strip}a\nb\nc");
		$tpl->forceCompilation();
		$this->assertEquals("ab>\n<ca\nb\nc", $this->dwoo->get($tpl, array(), $this->compiler));
	}

	public function testSubTemplates()
	{
		$tpl = new Dwoo_Template_String('{load_templates "file:'.TEST_DIRECTORY.'/resources/templates.html"}{menu $menu}{noparam}{load_templates ""}');
		$tpl->forceCompilation();
		$this->assertEquals('

foo

bar

baz

qux

boo

far

faz

mux

duck

noparamoutput'."\n",
			$this->dwoo->get($tpl, array('menu'=>array('foo', 'bar'=>array('baz','qux'), 'boo'=>array('far'=>array('faz','mux')), 'duck')), $this->compiler));

		// fixes the init call not being called (which is normal)
		$fixCall = new Dwoo_Plugin_template($this->dwoo);
		$fixCall->init('');
	}

	public function testSubTemplatesWithAutoEscape()
	{
		$tpl = new Dwoo_Template_String('{load_templates "file:'.TEST_DIRECTORY.'/resources/templates.html"}{menu $menu}{noparam}{load_templates ""}');
		$tpl->forceCompilation();
		$this->compiler->setAutoEscape(true);
		$this->assertEquals('

foo

bar

baz

qux

boo

far

faz

mux

duck

noparamoutput'."\n",
			$this->dwoo->get($tpl, array('menu'=>array('foo', 'bar'=>array('baz','qux'), 'boo'=>array('far'=>array('faz','mux')), 'duck')), $this->compiler));
		$this->compiler->setAutoEscape(false);

		// fixes the init call not being called (which is normal)
		$fixCall = new Dwoo_Plugin_template($this->dwoo);
		$fixCall->init('');
	}

	public function testSubTemplatesMultiInc()
	{
		$tpl = new Dwoo_Template_File(TEST_DIRECTORY.'/resources/templateUsage.html');
		$tpl->forceCompilation();
		$this->assertEquals("\n".'noparamoutput'."\n", $this->dwoo->get($tpl, array(), $this->compiler));
		$this->assertEquals("\n".'noparamoutput'."\n", $this->dwoo->get($tpl, array(), $this->compiler));
	}

	public function testTextFormat()
	{
		$tpl = new Dwoo_Template_String('aa{textformat wrap=10 wrap_char="\n"}hello world is so unoriginal but hey.. {textformat wrap=4 wrap_char="\n"}a a a a a a{/textformat}it works.{/textformat}bb');
		$tpl->forceCompilation();

		$this->assertEquals('aahello
world is
so
unoriginal
but hey..
a a

a a

a ait
works.bb', $this->dwoo->get($tpl, array(), $this->compiler));

		$tpl = new Dwoo_Template_String('{textformat style=email indent=50 wrap_char="\n"}hello world is so unoriginal but hey.. it works.{/textformat}');
		$tpl->forceCompilation();

		$this->assertEquals('                                                  hello world is so
                                                  unoriginal but hey..
                                                  it works.', $this->dwoo->get($tpl, array(), $this->compiler));

		$tpl = new Dwoo_Template_String('{textformat style=email indent=50 assign=foo wrap_char="\n"}hello world is so unoriginal but hey.. it works.{/textformat}-{$foo}');
		$tpl->forceCompilation();

		$this->assertEquals('-                                                  hello world is so
                                                  unoriginal but hey..
                                                  it works.', $this->dwoo->get($tpl, array(), $this->compiler));

		$tpl = new Dwoo_Template_String('{textformat style=html wrap=10 wrap_char="\n"}hello world{/textformat}');
		$tpl->forceCompilation();

		$this->assertEquals('hello
world', $this->dwoo->get($tpl, array(), $this->compiler));
	}

	public function testWith()
	{
		$tpl = new Dwoo_Template_String('{with $foo}{$a}{/with}-{if $a}FAIL{/if}-{with $foo.b}mlsk{/with}');
		$tpl->forceCompilation();

		$this->assertEquals('bar--', $this->dwoo->get($tpl, array('foo'=>array('a'=>'bar')), $this->compiler));

		$tpl = new Dwoo_Template_String('{with $foo}{$a.0}{with $a}{$0}{/with}{with $b}B{else}NOB{/with}{/with}-{if $a}FAIL{/if}-{with $foo.b}mlsk{/with}{with $fooo}a{withelse}b{/with}');
		$tpl->forceCompilation();

		$this->assertEquals('barbarNOB--b', $this->dwoo->get($tpl, array('foo'=>array('a'=>array('bar'))), $this->compiler));

		// fixes the init call not being called (which is normal)
		$fixCall = new Dwoo_Plugin_with($this->dwoo);
		$fixCall->init('');
		$fixCall = new Dwoo_Plugin_withelse($this->dwoo);
		$fixCall->init('');
	}
}


text:
package design.patterns.visitor;

public class SimplePrintingVisitor implements Visitor {
	@Override
	public void visitCar(final Car car) {
		System.out.format("Car [%s]%n", car.getName());
	}

	@Override
	public void visitTruck(final Truck truck) {
		System.out.format("Truck [%s, load: %d Tons]%n", truck.getName(), truck.getLoad());
	}
}


text:
package pt.up.fe.sdis.proj1.fileInfo;

import pt.up.fe.sdis.proj1.utils.FileID;

import com.almworks.sqlite4java.SQLiteConnection;
import com.almworks.sqlite4java.SQLiteException;
import com.almworks.sqlite4java.SQLiteJob;
import com.almworks.sqlite4java.SQLiteStatement;

public class RemovedFileAdder extends SQLiteJob<Object> {
    public RemovedFileAdder(FileID file) {
        _fileId = file;
    }

    @Override
    protected Object job(SQLiteConnection connection) throws Throwable {
        exec(connection, _fileId);
        return null;
    }

    public static void exec(SQLiteConnection connection, FileID fileId) throws SQLiteException {
        String fileID = fileId.toString();

        SQLiteStatement st = connection.prepare("INSERT INTO RemovedFile (fileID) values(?)");
        try {
            st.bind(1, fileID);
            st.stepThrough();
        } finally {
            st.dispose();
        }
    }

    private FileID _fileId;
}


text:
table td{
	vertical-align: middle !important;
}

.artist_img {
  max-width: 300px;
  height: 250px;
  //width: 250px;

}

#banner {
  margin-bottom: 15 px;
}

.headphones_artist .banner{
  position: relative;
  border-radius: 6px 0px 0px 6px;
  background:  center left no-repeat ;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  margin-bottom: 15px;
}

.headphones_artist .banner .artist_details {
    background: none repeat scroll 0 0 rgba(0, 0, 0, 0.5);
    color: White;
    overflow:hidden;
}
.headphones_artist .banner .artist_details #artist_details_top{
  background: Red;
  display: block;
  height: 15px;
  min-height: 10px;
  position: absolute;
  top: -15px;
  background: none repeat scroll 0 0 rgba(0, 0, 0, 0.5);
  border-radius: 6px 6px 0px 0px;
}

.headphones_artist .banner .artist_details #artist_details_bottom{
  display: block;
  height: 15px;
  min-height: 10px;
  position: absolute;
  margin-left: 0px;
  background: none repeat scroll 0 0 rgba(0, 0, 0, 0.5);
  border-radius: 0px 0px 6px 6px;
}

.headphones_artist .banner .artist_details td{
  padding: 2px 5px;
}

.headphones_artist .banner .artist_details table,
.headphones_artist .banner .artist_details strong {
  margin:10px;
}

@media all and  (max-width: 767px) {
  /*
   * On small screens, remove top and bottom round bars on artist-detail block
   */
  .headphones_artist .banner .artist_details #artist_details_bottom,
  .headphones_artist .banner .artist_details #artist_details_top{
    display: none;
  }
  .artist_img {
    display: none;
  }
  /*
   * On small screens, Add rounded corners on all sides on banner and detail-box
   */
  .headphones_artist .banner .artist_details,
  .headphones_artist .banner{
    border-radius: 6px;
  }
}

.episodeinfo tr {
	border-bottom: 1px solid #CCCCCC;
}

.episodeinfo  td {
	width: auto;
	padding-right: 20px;
}


text:
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeFamilies, QuasiQuotes, MultiParamTypeClasses,TemplateHaskell, OverloadedStrings #-}
module Handler.Caption (postCaptionR) where
import Foundation
import Forms.Caption
import Helpers.Document
import qualified Data.Text as T
postCaptionR :: ImagesId ->Handler RepHtml
postCaptionR id = do
    ((result, widget), enctype) <- runFormPost captionForm
    case result of
        FormSuccess cap -> do
                        runDB (update id [ImagesCaption =. T.unpack cap])
                        redirect RedirectTemporary (ImageR id)
        _ ->  redirect RedirectTemporary $ ImageR id


text:
"use strict";

var ExecutionEnvironment = require('ExecutionEnvironment');

/**
 * Set the innerHTML property of a node, ensuring that whitespace is preserved
 * even in IE8.
 *
 * @param {DOMElement} node
 * @param {string} html
 * @internal
 */
var setInnerHTML = function(node, html) {
  node.innerHTML = html;
};

if (ExecutionEnvironment.canUseDOM) {
  // IE8: When updating a just created node with innerHTML only leading
  // whitespace is removed. When updating an existing node with innerHTML
  // whitespace in root TextNodes is also collapsed.
  // @see quirksmode.org/bugreports/archives/2004/11/innerhtml_and_t.html

  // Feature detection; only IE8 is known to behave improperly like this.
  var testElement = document.createElement('div');
  testElement.innerHTML = ' ';
  if (testElement.innerHTML === '') {
    setInnerHTML = function(node, html) {
      // Magic theory: IE8 supposedly differentiates between added and updated
      // nodes when processing innerHTML, innerHTML on updated nodes suffers
      // from worse whitespace behavior. Re-adding a node like this triggers
      // the initial and more favorable whitespace behavior.
      // TODO: What to do on a detached node?
      if (node.parentNode) {
        node.parentNode.replaceChild(node, node);
      }

      // We also implement a workaround for non-visible tags disappearing into
      // thin air on IE8, this only happens if there is no visible text
      // in-front of the non-visible tags. Piggyback on the whitespace fix
      // and simply check if any non-visible tags appear in the source.
      if (html.match(/^[ \r\n\t\f]/) ||
          html[0] === '<' && (
            html.indexOf('<noscript') !== -1 ||
            html.indexOf('<script') !== -1 ||
            html.indexOf('<style') !== -1 ||
            html.indexOf('<meta') !== -1 ||
            html.indexOf('<link') !== -1)) {
        // Recover leading whitespace by temporarily prepending any character.
        // \uFEFF has the potential advantage of being zero-width/invisible.
        node.innerHTML = '\uFEFF' + html;
        node.firstChild.deleteData(0, 1);
      } else {
        node.innerHTML = html;
      }
    };
  }
}

module.exports = setInnerHTML;


text:
require 'spec_helper'

describe 'gws_memo_messages', type: :feature, dbscope: :example, js: true do
  let(:site) { gws_site }
  let(:user1) { gws_user }
  let!(:user2) { create(:gws_user, cur_site: site, group_ids: gws_user.group_ids, gws_role_ids: gws_user.gws_role_ids) }
  let!(:memo) { create(:gws_memo_message, user: user2, site: site, request_mdn_ids: [user1.id]) }
  let!(:draft_memo) { create(:gws_memo_message, :with_draft, site: site, in_to_members: [user2.id.to_s]) }
  let!(:sent_memo) { create(:gws_memo_message, site: site, in_to_members: [user2.id.to_s]) }
  let!(:trash_memo) { create(:gws_memo_message, user: user2, site: site, in_path: { user1.id.to_s => 'INBOX.Trash' }) }
  let!(:folder) { create(:gws_memo_folder, user: user1, site: site) }
  let(:subject) { unique_id }
  let(:text) { Array.new(rand(2..3)) { unique_id }.join("\n") }

  context 'with auth' do
    before { login_gws_user }

    it '#index' do
      visit gws_memo_messages_path(site)
      wait_for_ajax

      within '.gws-memo-folder' do
        expect(page).to have_css('.title', text: I18n.t("gws/memo/folder.inbox"))
      end

      # popup
      within ".gws-memo-message" do
        expect(page).to have_css(".unseen", text: '2')
        first(".toggle-popup-notice").click

        within ".popup-notice" do
          expect(page).to have_content(memo.subject)
          click_on memo.subject
        end
      end
      within '.gws-memo .addon-head' do
        expect(page).to have_css('.subject', text: memo.subject)
      end
    end

    it '#show' do
      visit gws_memo_messages_path(site)
      within '.list-items' do
        expect(page).to have_no_css(".list-item.seen")
        expect(page).to have_css(".list-item.unseen")
        click_link memo.name
      end
      within '.gws-memo .addon-head' do
        expect(page).to have_content(memo.subject)
        expect(page).to have_no_content(draft_memo.subject)
      end
      click_link I18n.t('ss.links.back_to_index')
      within '.list-items' do
        expect(page).to have_css(".list-item.seen")
        expect(page).to have_no_css(".list-item.unseen")
      end
    end

    it '#new' do
      visit gws_memo_messages_path(site)
      click_on I18n.t('ss.links.new')

      within 'form#item-form' do
        click_on I18n.t("webmail.links.show_cc_bcc")
        within 'dl.see.to' do
          click_on I18n.t('gws.organization_addresses')
        end
      end
      wait_for_cbox do
        expect(page).to have_content(user2.name)
        click_on user2.name
      end
      within 'form#item-form' do
        click_on I18n.t('ss.buttons.draft_save')
      end
      message = I18n.t('errors.messages.blank')
      message = I18n.t("errors.format", attribute: Gws::Memo::Message.t(:subject), message: message)
      wait_for_error message

      within 'form#item-form' do
        fill_in 'item[subject]', with: subject
        fill_in 'item[text]', with: text
        accept_confirm do
          click_on I18n.t('gws/memo/message.commit_params_check')
        end
      end
      expect(page).to have_css('#notice', text: I18n.t("ss.notice.sent"))
    end

    it '#edit' do
      visit edit_gws_memo_message_path(site: site, folder: 'INBOX.Draft', id: draft_memo.id)
      within 'form#item-form' do
        fill_in 'item[subject]', with: ''
        click_on I18n.t('ss.buttons.draft_save')
      end
      message = I18n.t('errors.messages.blank')
      message = I18n.t("errors.format", attribute: Gws::Memo::Message.t(:subject), message: message)
      wait_for_error message

      within 'form#item-form' do
        fill_in 'item[subject]', with: subject

        accept_confirm do
          click_on I18n.t('gws/memo/message.commit_params_check')
        end
      end
      expect(page).to have_css('#notice', text: I18n.t("ss.notice.sent"))
    end

    it '#reply' do
      visit reply_gws_memo_message_path(site: site, folder: 'INBOX', id: memo.id)
      within 'form#item-form' do
        fill_in 'item[text]', with: text

        accept_confirm do
          click_on I18n.t('gws/memo/message.commit_params_check')
        end
      end
      expect(page).to have_css('#notice', text: I18n.t("ss.notice.sent"))
    end

    it '#reply_all' do
      visit reply_all_gws_memo_message_path(site: site, folder: 'INBOX', id: memo.id)
      within 'form#item-form' do
        fill_in 'item[text]', with: text

        accept_confirm do
          click_on I18n.t('gws/memo/message.commit_params_check')
        end
      end
      expect(page).to have_css('#notice', text: I18n.t("ss.notice.sent"))
    end

    it '#forward' do
      visit forward_gws_memo_message_path(site: site, folder: 'INBOX', id: memo.id)
      within 'form#item-form' do
        click_on I18n.t("webmail.links.show_cc_bcc")

        within 'dl.see.to' do
          wait_cbox_open do
            click_on I18n.t('gws.organization_addresses')
          end
        end
      end

      wait_for_cbox do
        expect(page).to have_content(user2.name)
        wait_cbox_close do
          click_on user2.name
        end
      end

      within 'form#item-form' do
        accept_confirm do
          click_on I18n.t('gws/memo/message.commit_params_check')
        end
      end
      expect(page).to have_css('#notice', text: I18n.t("ss.notice.sent"))
    end

    it '#ref' do
      visit ref_gws_memo_message_path(site: site, folder: 'INBOX', id: memo.id)
      within 'form#item-form' do
        click_on I18n.t("webmail.links.show_cc_bcc")

        within 'dl.see.to' do
          wait_cbox_open do
            click_on I18n.t('gws.organization_addresses')
          end
        end
      end

      wait_for_cbox do
        expect(page).to have_content(user2.name)
        wait_cbox_close do
          click_on user2.name
        end
      end

      within 'form#item-form' do
        fill_in 'item[text]', with: text

        accept_confirm do
          click_on I18n.t('gws/memo/message.commit_params_check')
        end
      end
      expect(page).to have_css('#notice', text: I18n.t("ss.notice.sent"))
    end

    it '#send_mdn' do
      visit gws_memo_messages_path(site)
      click_link memo.name
      click_button I18n.t('webmail.buttons.send_mdn')
      expect(page).to have_css('#notice', text: I18n.t("gws/memo/message.notice.send_mdn"))
    end

    it '#ignore_mdn' do
      visit gws_memo_messages_path(site)
      click_link memo.name
      click_button I18n.t('webmail.buttons.ignore_mdn')
      expect(page).to have_css('#notice', text: I18n.t("gws/memo/message.notice.ignore_mdn"))
    end

    it '#print' do
      visit print_gws_memo_message_path(site: site, folder: 'INBOX', id: memo.id)
      expect(page).to have_content(memo.subject)
    end

    it '#trash' do
      visit trash_gws_memo_message_path(site: site, folder: 'INBOX', id: memo.id)
      expect(page).to have_content(I18n.t("gws/memo/folder.inbox_trash"))
    end

    it '#trash_all' do
      visit gws_memo_messages_path(site)
      expect(page).to have_selector('li.list-item')

      find('.list-head label.check input').set(true)
      page.accept_confirm do
        find('.trash-all').click
      end
      wait_for_ajax
      expect(page).to have_no_selector('li.list-item')

      click_link I18n.t('gws/memo/folder.inbox_trash')
      expect(page).to have_selector('li.list-item')

      find('.list-head label.check input').set(true)
      page.accept_confirm do
        find('.destroy-all').click
      end
      wait_for_ajax
      expect(page).to have_no_selector('li.list-item')
    end

    it '#delete' do
      visit delete_gws_memo_message_path(site: site, folder: 'INBOX.Trash', id: trash_memo.id)
      within 'form' do
        click_button I18n.t('ss.buttons.delete')
      end
      expect(current_path).to eq gws_memo_messages_path(site, folder: 'INBOX.Trash')
    end

    it '#set_seen_all and #unset_seen_all' do
      visit gws_memo_messages_path(site)
      find('.list-head label.check input').set(true)
      page.accept_confirm do
        click_button I18n.t("gws/memo/message.links.etc")
        find('.set-seen-all').click
      end
      wait_for_ajax
      expect(page).to have_css(".list-item.seen")
      expect(page).to have_no_css(".list-item.unseen")

      find('.list-head label.check input').set(true)
      page.accept_confirm do
        click_button I18n.t("gws/memo/message.links.etc")
        find('.unset-seen-all').click
      end
      wait_for_ajax
      expect(page).to have_css(".list-item.unseen")
      expect(page).to have_no_css(".list-item.seen")
    end

    it '#set_star_all and #unset_star_all' do
      visit gws_memo_messages_path(site)
      find('.list-head label.check input').set(true)
      click_button I18n.t("gws/memo/message.links.etc")
      wait_for_ajax
      page.accept_confirm do
        click_link I18n.t("gws/memo/message.links.set_star")
      end
      wait_for_ajax
      expect(page).to have_css(".icon.icon-star.on")
      expect(page).to have_no_css(".icon.icon-star.off")

      find('.list-head label.check input').set(true)
      click_button I18n.t("gws/memo/message.links.etc")
      wait_for_ajax
      page.accept_confirm do
        click_link I18n.t("gws/memo/message.links.unset_star")
      end
      wait_for_ajax
      expect(page).to have_css(".icon.icon-star.off")
      expect(page).to have_no_css(".icon.icon-star.on")
    end

    it '#move_all' do
      visit gws_memo_messages_path(site)
      wait_for_ajax
      expect(page).to have_content(I18n.t("gws/memo/folder.inbox"))
      expect(page).to have_content(I18n.t("gws/memo/folder.inbox_trash"))
      find('.list-head label.check input').set(true)
      page.accept_confirm do
        within ".move-menu" do
          click_button I18n.t("ss.links.move")
          click_link folder.name
        end
      end
      wait_for_ajax
      expect(page).to have_content(I18n.t("gws/memo/folder.inbox"))
      expect(page).to have_content(I18n.t("gws/memo/folder.inbox_trash"))
    end

    it '#latest' do
      visit latest_gws_memo_messages_path(site, format: 'json')
      expect(page).to have_content(memo.subject)
    end
  end
end


text:
const PRECISION = 100; // The precision we're going to use
//const EPSILON = 0.01;  // The smallest number we're going to support

function floor(value) {
  return Math.floor(value * PRECISION) / PRECISION;
}

class Money {
  constructor(value) {
    if (typeof(value) === 'string') {
      this.value = floor(parseFloat(value));
    } else {
      this.value = floor(value);
    }
  }

  valueOf() {
    return this.value;
  }

  sum(other) {
    return new Money(this + other);
  }

  toString() {
    return this.valueOf().toFixed(2);
  }
}

export default function money(value) {
  return new Money(value);
}

export function serialize(money) {
  return money.toString();
}

export function deserialize(value) {
  return money(value);
}


text:
package com.lothrazar.cyclic.block.battery;

import java.util.ArrayList;
import java.util.List;
import com.lothrazar.cyclic.block.BlockCyclic;
import com.lothrazar.cyclic.capabilities.CustomEnergyStorage;
import com.lothrazar.cyclic.registry.ContainerScreenRegistry;
import com.lothrazar.cyclic.registry.TileRegistry;
import net.minecraft.client.gui.screens.MenuScreens;
import net.minecraft.core.BlockPos;
import net.minecraft.world.Containers;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.item.ItemEntity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.BlockEntityTicker;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.StateDefinition;
import net.minecraft.world.level.block.state.properties.EnumProperty;
import net.minecraftforge.energy.CapabilityEnergy;
import net.minecraftforge.energy.IEnergyStorage;

public class BlockBattery extends BlockCyclic {

  public static final EnumProperty<EnumBatteryPercent> PERCENT = EnumProperty.create("percent", EnumBatteryPercent.class);

  public BlockBattery(Properties properties) {
    super(properties.strength(1.8F));
    this.setHasGui();
    this.registerDefaultState(defaultBlockState().setValue(PERCENT, EnumBatteryPercent.ZERO));
  }

  @Override
  public void registerClient() {
    MenuScreens.register(ContainerScreenRegistry.BATTERY, ScreenBattery::new);
  }

  @Override
  protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
    builder.add(LIT).add(PERCENT);
  }

  @Override
  public List<ItemStack> getDrops(BlockState state, net.minecraft.world.level.storage.loot.LootContext.Builder builder) {
    //because harvestBlock manually forces a drop
    return new ArrayList<>();
  }

  @Override
  public void playerDestroy(Level world, Player player, BlockPos pos, BlockState state, BlockEntity ent, ItemStack stack) {
    super.playerDestroy(world, player, pos, state, ent, stack);
    ItemStack newStackBattery = new ItemStack(this);
    if (ent instanceof TileBattery battery) {
      IEnergyStorage newStackCap = newStackBattery.getCapability(CapabilityEnergy.ENERGY, null).orElse(null);
      if (newStackCap instanceof CustomEnergyStorage) {
        ((CustomEnergyStorage) newStackCap).setEnergy(battery.energy.getEnergyStored());
      }
      else {
        newStackCap.receiveEnergy(battery.energy.getEnergyStored(), false);
      }
      if (battery.energy.getEnergyStored() > 0) {
        newStackBattery.getOrCreateTag().putInt(ItemBlockBattery.ENERGYTT, battery.energy.getEnergyStored());
        newStackBattery.getOrCreateTag().putInt(ItemBlockBattery.ENERGYTTMAX, battery.energy.getMaxEnergyStored());
      }
    }
    //even if energy fails
    if (world.isClientSide == false) {
      world.addFreshEntity(new ItemEntity(world, pos.getX() + 0.5F, pos.getY() + 0.5F, pos.getZ() + 0.5F, newStackBattery));
    }
  }

  @Override
  public BlockEntity newBlockEntity(BlockPos pos, BlockState state) {
    return new TileBattery(pos, state);
  }

  @Override
  public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level world, BlockState state, BlockEntityType<T> type) {
    return createTickerHelper(type, TileRegistry.BATTERY.get(), world.isClientSide ? TileBattery::clientTick : TileBattery::serverTick);
  }

  @Override
  public void setPlacedBy(Level world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack stack) {
    int current = 0;
    IEnergyStorage storage = stack.getCapability(CapabilityEnergy.ENERGY, null).orElse(null);
    if (stack.hasTag() && stack.getTag().contains(CustomEnergyStorage.NBTENERGY)) {
      current = stack.getTag().getInt(CustomEnergyStorage.NBTENERGY);
    }
    else if (storage != null) {
      current = storage.getEnergyStored();
    }
    TileBattery container = (TileBattery) world.getBlockEntity(pos);
    CustomEnergyStorage storageTile = (CustomEnergyStorage) container.getCapability(CapabilityEnergy.ENERGY, null).orElse(null);
    if (storageTile != null) {
      storageTile.setEnergy(current);
    }
    super.setPlacedBy(world, pos, state, placer, stack);
  }

  @Override
  public void onRemove(BlockState state, Level worldIn, BlockPos pos, BlockState newState, boolean isMoving) {
    if (state.getBlock() != newState.getBlock()) {
      TileBattery tileentity = (TileBattery) worldIn.getBlockEntity(pos);
      if (tileentity != null && tileentity.batterySlots != null) {
        Containers.dropItemStack(worldIn, pos.getX(), pos.getY(), pos.getZ(), tileentity.batterySlots.getStackInSlot(0));
      }
      worldIn.updateNeighbourForOutputSignal(pos, this);
    }
    super.onRemove(state, worldIn, pos, newState, isMoving);
  }
}


text:
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    TestView *testView = [[TestView alloc] init];
    testView.frame = self.view.frame;
    self.view = testView;
    [self prototypeDemo];

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)copyTest{
    NSString *str = @"Test";
    NSString *strCopy = [str copy];
    NSString *strMutableCopy = [str mutableCopy];
    NSLog(@"str对象:%@,地址:%p",str,str);
    NSLog(@"strCopy对象:%@,地址:%p",strCopy,strCopy);
    NSLog(@"strMutable对象:%@,地址:%p",strMutableCopy,strMutableCopy);
}

- (void)prototypeDemo{
    PrototypeDemo *obj = [[PrototypeDemo alloc] init];
    PrototypeDemo *objDeepCopy = [obj copy];
    PrototypeDemo *objShallowCopy = obj;
    NSLog(@"obj:%@, str:%@", obj, obj.str);
    NSLog(@"objDeepCopy:%@, str:%@", objDeepCopy, objDeepCopy.str);
    NSLog(@"objShallowCopy:%@, str:%@", objShallowCopy, objShallowCopy.str);
}

@end


text:
package me.rbrickis.mojo.parametric;

import me.rbrickis.mojo.annotations.As;
import me.rbrickis.mojo.annotations.Default;
import me.rbrickis.mojo.annotations.Text;

import java.lang.annotation.Annotation;
import java.util.Arrays;
import java.util.List;

public class Parameter {

    private Class<?> type;

    private ParametricRegistry registry;

    private List<Annotation> annotations;

    private int index;

    private String name;

    public Parameter(Class<?> type, Annotation[] annotations, ParametricRegistry registry,
        int index) {
        this.type = type;
        this.annotations = Arrays.asList(annotations);
        this.registry = registry;
        this.index = index;

        if (isAnnotationPresent(As.class)) {
            As as = (As) getAnnotation(As.class);
            setName(as.value());
        } else {
            setName("arg" + getArgumentIndex());
        }
    }

    public Class<?> getType() {
        return type;
    }

    public boolean isAnnotationPresent(Class<? extends Annotation> annotation) {
        boolean found = false;
        for (Annotation anno : annotations) {
            if (anno.annotationType() == annotation) {
                found = true;
            }
        }
        return found;
    }

    public Annotation getAnnotation(final Class<? extends Annotation> annotation) {
        return annotations.stream().filter((a) -> a.annotationType() == annotation).findFirst()
            .orElse(null);
    }

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

    public int getIndex() {
        return index;
    }

    public int getArgumentIndex() {
        return index - 1;
    }

    public boolean hasText() {
        return isAnnotationPresent(Text.class);
    }

    public boolean hasDefault() {
        return isAnnotationPresent(Default.class);
    }

    public String getDefault() {
        if (hasDefault()) {
            Default defaultV = (Default) getAnnotation(Default.class);
            return defaultV.value();
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public Object parse(String argument) {
        return registry.get(type).resolve(argument);
    }
}


text:
import plumber from 'gulp-plumber';
import less from 'gulp-less';
import postcss from 'gulp-postcss';
import autoprefixer from 'autoprefixer';
import flexbugsFixes from 'postcss-flexbugs-fixes';
import yuGothic from 'postcss-yu-gothic';
import fontMagician from 'postcss-font-magician';
import willChange from 'postcss-will-change';
import focus from 'postcss-focus';
import easings from 'postcss-easings';
import assets from 'postcss-assets';
import resembleImage from 'postcss-resemble-image';
import sprites from 'postcss-sprites';
import svg from 'postcss-svg';
import colorblind from 'postcss-colorblind';
import mqpacker from 'css-mqpacker';
import cssnano from 'cssnano';
import gulpif from 'gulp-if';
import rename from 'gulp-rename';
import {isProduction, isDebug} from './helpers';

const plugins = [
  assets({loadPaths: ['images/']}),
  resembleImage(),
  null,
  null,
  fontMagician({
    formats: 'woff2 woff',
    variants: {
      'Source Sans Pro': {
        300: [],
        400: []
      }
    }
  }),
  flexbugsFixes,
  yuGothic,
  easings,
  willChange,
  focus,
  autoprefixer({browsers: ['last 2 versions', '> 3%']}),
];

if (isDebug()) {
  plugins.concat([
    colorblind({method: 'achromatopsia'})
  ]);
} else if (isProduction()) {
  plugins.concat([
    mqpacker,
    cssnano
  ]);
}

export default {
  name: 'style',
  stream(gulp, config) {
    plugins.splice(2, 1, sprites({
      stylesheetPath: './' + config[this.name][1],
      spritePath: './' + config[this.name] + '/images'
    }));
    plugins.splice(3, 1, svg({
      paths: ['./' + config[this.name][1]],
    }));

    gulp.src(config[this.name][0])
    .pipe(plumber())
    .pipe(less())
    .pipe(postcss(plugins))
    .pipe(rename({basename: 'minimalist'}))
    .pipe(gulp.dest(config[this.name][1]));
  }
}


text:
package com.klisly.bookbox.ui.fragment.site;

import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.view.GravityCompat;
import android.support.v4.view.ViewPager;
import android.support.v7.widget.PopupMenu;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;

import com.klisly.bookbox.BookBoxApplication;
import com.klisly.bookbox.BusProvider;
import com.klisly.bookbox.Constants;
import com.klisly.bookbox.R;
import com.klisly.bookbox.adapter.PagerFragmentAdapter;
import com.klisly.bookbox.listener.OnDataChangeListener;
import com.klisly.bookbox.logic.AccountLogic;
import com.klisly.bookbox.logic.SiteLogic;
import com.klisly.bookbox.model.Site;
import com.klisly.bookbox.ottoevent.ToLoginEvent;
import com.klisly.bookbox.ui.base.BaseMainFragment;
import com.klisly.bookbox.ui.fragment.PagerChildFragment;
import com.klisly.bookbox.utils.ToastHelper;

import butterknife.Bind;
import butterknife.ButterKnife;
import timber.log.Timber;

public class SiteFragment extends BaseMainFragment implements Toolbar.OnMenuItemClickListener {
    @Bind(R.id.tab_layout)
    TabLayout mTabLayout;
    @Bind(R.id.viewPager)
    ViewPager mViewPager;
    @Bind(R.id.toolbar)
    Toolbar mToolbar;

    public static SiteFragment newInstance() {
        return new SiteFragment();
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_content, container, false);
        ButterKnife.bind(this, view);
        initView();
        return view;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        SiteLogic.getInstance().unRegisterListener(this);
        ButterKnife.unbind(this);
    }

    private void initView() {
        mToolbar.setTitle(R.string.site);
        initToolbarNav(mToolbar);
        mToolbar.setOnMenuItemClickListener(this);
        updateItems();
        PagerFragmentAdapter adapter = new PagerFragmentAdapter(getChildFragmentManager(),
                SiteLogic.getInstance().getOpenFocuses());
        mViewPager.setAdapter(adapter);
        SiteLogic.getInstance().registerListener(this, new OnDataChangeListener() {
            @Override
            public void onDataChange() {
                if (getActivity() == null || getActivity().isFinishing()) {
                    return;
                }
                getActivity().runOnUiThread(new Runnable() {
                    @Override
                    public void run() {
                        updateItems();
                        adapter.notifyDataSetChanged();
                    }
                });
            }
        });
        mViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
            @Override
            public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {

            }

            @Override
            public void onPageSelected(int position) {
                // Position 回调,Fragment的Size可能能会发生变化
                try {
                    if(getChildFragmentManager().getFragments().size() <= position ){
                        return;
                    }
                    PagerChildFragment<Site> fragment = (PagerChildFragment) getChildFragmentManager().getFragments().get(position);
                    Site site = fragment.getmData();
                    if (!site.getId().equals(SiteLogic.getInstance().getOpenFocuses().get(position).getId())) {
                        Timber.i("new topic in position:" + position + " new:"
                                + SiteLogic.getInstance().getOpenFocuses().get(position).getName()
                                + " old:" + site.getName());
                        fragment.setmData(SiteLogic.getInstance().getOpenFocuses().get(position));
                    }
                } catch (Exception e) {
                    e.printStackTrace();
                }

            }

            @Override
            public void onPageScrollStateChanged(int state) {

            }
        });
        mTabLayout.setupWithViewPager(mViewPager);
    }

    private void updateItems() {
        if(SiteLogic.getInstance().getOpenFocuses() != null){
            mTabLayout.removeAllTabs();
            for(Site site : SiteLogic.getInstance().getOpenFocuses()){
                if(mTabLayout != null) {
                    mTabLayout.addTab(mTabLayout.newTab().setText(site.getName()));
                }
            }
        }
    }

    /**
     * 类似于 Activity的 onNewIntent()
     */
    @Override
    public void onNewBundle(Bundle args) {
        super.onNewBundle(args);
    }

    @Override
    public boolean onMenuItemClick(MenuItem item) {
        switch (item.getItemId()) {
            case R.id.action_more:
                final PopupMenu popupMenu = new PopupMenu(_mActivity, mToolbar, GravityCompat.END);
                popupMenu.inflate(R.menu.menu_site_pop);
                popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
                    @Override
                    public boolean onMenuItemClick(MenuItem item) {
                        switch (item.getItemId()) {
//                            case R.id.action_find_site:
//                                ToastHelper.showShortTip(R.string.find_site);
//                                break;
                            case R.id.action_manage_site:
                                if(!AccountLogic.getInstance().isLogin()){
                                    BusProvider.getInstance().post(new ToLoginEvent());
                                } else {
                                    start(ChooseSiteFragment.newInstance(ChooseSiteFragment.ACTION_MANAGE));
                                }
                                break;
                            case R.id.action_as_home:
                                BookBoxApplication.getInstance().getPreferenceUtils().setValue(Constants.HOME_FRAG, Constants.FRAG_SITE);
                                ToastHelper.showShortTip(R.string.success_as_home);
                                break;
                            case R.id.action_sort_method:
                                ToastHelper.showShortTip(R.string.sort_method);
                                break;

                            case R.id.action_notify_setting:
                                ToastHelper.showShortTip(R.string.notify_setting);
                                break;
                            default:
                                break;
                        }
                        popupMenu.dismiss();
                        return true;
                    }
                });
                popupMenu.show();
                break;
            default:
                break;
        }
        return true;
    }
}


text:
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <artifactId>common</artifactId>
    <groupId>org.sakaiproject.common</groupId>
    <version>10.1</version><!-- ProjectVersion -->
    <relativePath>../../pom.xml</relativePath>
  </parent>
  <name>archive-impl</name>
  <groupId>org.sakaiproject.common</groupId>
  <artifactId>archive-impl</artifactId>
  <organization>
    <name>Sakai Foundations</name>
    <url>http://sakaiproject.org/</url>
  </organization>
  <inceptionYear>2003</inceptionYear>
  <packaging>jar</packaging>
  <properties>
    <deploy.target />
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.sakaiproject.kernel</groupId>
      <artifactId>sakai-kernel-util</artifactId>
    </dependency>
    <dependency>
      <groupId>org.sakaiproject.kernel</groupId>
      <artifactId>sakai-kernel-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.sakaiproject.kernel</groupId>
      <artifactId>sakai-component-manager</artifactId>
    </dependency>
    <dependency>
      <groupId>org.sakaiproject.common</groupId>
      <artifactId>archive-api</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-codec</groupId>
      <artifactId>commons-codec</artifactId>
    </dependency>
  </dependencies>
  <build>
    <resources />
  </build>
</project>


text:
using System;
using System.Xml.Serialization;

namespace Aop.Api.Domain
{
    /// <summary>
    /// AlipayCommerceCityfacilitatorVoucherUploadModel Data Structure.
    /// </summary>
    [Serializable]
    public class AlipayCommerceCityfacilitatorVoucherUploadModel : AopObject
    {
        /// <summary>
        /// 渠道商提供的其它信息
        /// </summary>
        [XmlElement("biz_info_ext")]
        public string BizInfoExt { get; set; }

        /// <summary>
        /// 城市标准码
        /// </summary>
        [XmlElement("city_code")]
        public string CityCode { get; set; }

        /// <summary>
        /// JSON字符串,包含出票的序列号,票号,出票时间,出票流水号
        /// </summary>
        [XmlElement("exchange_ids")]
        public string ExchangeIds { get; set; }

        /// <summary>
        /// 操作时间
        /// </summary>
        [XmlElement("operate_time")]
        public string OperateTime { get; set; }

        /// <summary>
        /// 核销码
        /// </summary>
        [XmlElement("ticket_no")]
        public string TicketNo { get; set; }

        /// <summary>
        /// 支付宝交易号
        /// </summary>
        [XmlElement("trade_no")]
        public string TradeNo { get; set; }
    }
}


text:
using System;

namespace NetTypeS.WebApi.Models
{
    public class EndpointInfo
    {
        public string ActionName { get; set; }
        public string GeneratedName { get; set; }
        public string ControllerName { get; set; }
        public string HttpMethodName { get; set; }
        public string RelativePath { get; set; }
        public ParameterInfo[] Parameters { get; set; }
        public Type ResponseType { get; set; }
    }
}


text:
from django.template import Library
from django.utils.safestring import mark_safe

register = Library()

@register.filter
def highlight(text, word):
    if str(text).startswith(word):
        return mark_safe("<b>%s</b>" % word + str(text)[len(word):])
    return text


text:
package org.apache.tomcat.vault.security.vault;

import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.res.StringManager;

/**
 * A factory to instantiate a {@link SecurityVault}
 *
 * @author Anil.Saldhana@redhat.com
 * @since Aug 12, 2011
 */
public class SecurityVaultFactory {
    private static final StringManager sm = StringManager.getManager(SecurityVaultFactory.class.getPackage().getName());
    private static final Log log = LogFactory.getLog(SecurityVaultFactory.class);
    private static final StringManager msm = StringManager.getManager("org.apache.tomcat.vault.security.resources");

    private static String defaultVault = "org.apache.tomcat.vault.security.vault.PicketBoxSecurityVault";
    private static SecurityVault vault = null;

    /**
     * Get an instance of {@link SecurityVault}
     * Remember to initialize the vault by checking {@link SecurityVault#isInitialized()}
     *
     * @return an instance of {@link SecurityVault}
     * @throws SecurityVaultException
     */
    public static SecurityVault get() throws SecurityVaultException {
        return get(defaultVault);
    }

    /**
     * Get an instance of {@link SecurityVault}
     * Remember to initialize the vault by checking {@link SecurityVault#isInitialized()}
     *
     * @param fqn fully qualified name of the vault implementation
     * @return an instance of {@link SecurityVault}
     * @throws SecurityVaultException
     */
    public static SecurityVault get(String fqn) throws SecurityVaultException {
        SecurityManager sm = System.getSecurityManager();
        if (sm != null) {
            sm.checkPermission(new RuntimePermission(SecurityVaultFactory.class.getName() + ".get"));
        }
        if (fqn == null)
            return get();

        if (vault == null) {
            Class<?> vaultClass = SecurityActions.loadClass(SecurityVaultFactory.class, fqn);
            if (vaultClass == null)
                throw new SecurityVaultException(msm.getString("unableToLoadVaultMessage"));
            try {
                vault = (SecurityVault) vaultClass.newInstance();
            } catch (Exception e) {
                throw new SecurityVaultException(msm.getString("unableToCreateVaultMessage"), e);
            }
        } else {
            secondVaultInfo(null, fqn);
        }
        return vault;
    }

    /**
     * Get an instance of {@link SecurityVault}
     * Remember to initialize the vault by checking {@link SecurityVault#isInitialized()}
     *
     * @param classLoader the class loader to use loading the vault
     * @param fqn         fully qualified name of the vault implementation
     * @return an instance of {@link SecurityVault}
     * @throws SecurityVaultException
     */
    public static SecurityVault get(ClassLoader classLoader, String fqn) throws SecurityVaultException {
        if (classLoader == null) {
            throw new IllegalArgumentException(msm.getString("invalidNullArgument", "classLoader"));
        }
        if (fqn == null) {
            throw new IllegalArgumentException(msm.getString("invalidNullArgument", "fqn"));
        }
        SecurityManager sm = System.getSecurityManager();
        if (sm != null) {
            sm.checkPermission(new RuntimePermission(SecurityVaultFactory.class.getName() + ".get"));
        }
        if (vault == null) {
            Class<?> vaultClass = SecurityActions.loadClass(classLoader, fqn);
            if (vaultClass == null)
                throw new SecurityVaultException(msm.getString("unableToLoadVaultMessage"));
            try {
                vault = (SecurityVault) vaultClass.newInstance();
            } catch (Exception e) {
                throw new SecurityVaultException(msm.getString("unableToCreateVaultMessage"), e);
            }
        } else {
            secondVaultInfo(classLoader.toString(), fqn);
        }
        return vault;
    }

    private static void secondVaultInfo(String module, String className) {
        log.warn(sm.getString("securityVaultFactory.attemptToCreateSecondVault", module != null ? className + " @ " + module : className));
    }
}


text:
package com.czbix.smbsteamer.helper;

import android.net.Uri;
import android.util.Log;

import com.czbix.smbsteamer.BuildConfig;
import com.czbix.smbsteamer.util.IoUtils;
import com.czbix.smbsteamer.util.SmbUtils;
import com.google.common.collect.Lists;
import com.google.common.io.ByteStreams;

import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import jcifs.smb.NtlmPasswordAuthentication;
import jcifs.smb.SmbException;
import jcifs.smb.SmbFile;

public final class HttpServer extends NanoHTTPD {
    private static final String TAG = HttpServer.class.getSimpleName();

    public static final int PORT = 23333;
    public static final String URI_PREFIX = "/stream/";

    public HttpServer() {
        super(BuildConfig.DEBUG ? null : "127.0.0.1", PORT);
        setAsyncRunner(new ThreadPoolRunner());
    }

    @Override
    public Response serve(IHTTPSession session) {
        //noinspection LoopStatementThatDoesntLoop
        while (true) {
            final Method method = session.getMethod();
            String uri = session.getUri();
            Log.v(TAG, String.format("serve request: %s %s", method, uri));

            if (method != Method.GET) {
                break;
            }

            if (!uri.startsWith(URI_PREFIX)) {
                break;
            }

            uri = uri.substring(URI_PREFIX.length());
            return handleStream(uri, session);
        }

        return getForbiddenResponse();
    }

    private Response handleStream(String uri, IHTTPSession session) {
        SmbFile smbFile;
        try {
            smbFile = new SmbFile("smb://" + uri, NtlmPasswordAuthentication.ANONYMOUS);
        } catch (MalformedURLException e) {
            throw new RuntimeException(e);
        }

        Response response = null;
        try {
            if (smbFile.isFile()) {
                String mimeType = smbFile.getContentType();
                if (mimeType == null) {
                    mimeType = SmbUtils.getMineType(uri);
                }
                response = serveFile(session.getHeaders(), smbFile, mimeType);
            } else if (smbFile.getType() == SmbFile.TYPE_FILESYSTEM && smbFile.isDirectory()) {
                response = serveDir(smbFile);
            }
        } catch (IOException e) {
            Log.w(TAG, e);
        }
        return response;
    }

    private Response serveFile(Map<String, String> header, SmbFile file, String mime) {
        Response res;
        boolean success = false;
        InputStream fis = null;
        try {
            // Calculate etag
            String etag = Integer.toHexString((file.getCanonicalPath() + file.lastModified() + "" + file.length()).hashCode());

            // Support (simple) skipping:
            long startFrom = 0;
            long endAt = -1;
            String range = header.get("range");
            if (range != null) {
                if (range.startsWith("bytes=")) {
                    range = range.substring("bytes=".length());
                    int minus = range.indexOf('-');
                    try {
                        if (minus > 0) {
                            startFrom = Long.parseLong(range.substring(0, minus));
                            endAt = Long.parseLong(range.substring(minus + 1));
                        }
                    } catch (NumberFormatException ignored) {
                    }
                }
            }

            // get if-range header. If present, it must match etag or else we
            // should ignore the range request
            String ifRange = header.get("if-range");
            boolean headerIfRangeMissingOrMatching = (ifRange == null || etag.equals(ifRange));

            String ifNoneMatch = header.get("if-none-match");
            boolean headerIfNoneMatchPresentAndMatching = ifNoneMatch != null && (ifNoneMatch.equals("*") || ifNoneMatch.equals(etag));

            // Change return code and add Content-Range header when skipping is
            // requested
            long fileLen = file.length();

            fis = file.getInputStream();
            if (headerIfRangeMissingOrMatching && range != null && startFrom >= 0 && startFrom < fileLen) {
                // range request that matches current etag
                // and the startFrom of the range is satisfiable
                if (headerIfNoneMatchPresentAndMatching) {
                    // range request that matches current etag
                    // and the startFrom of the range is satisfiable
                    // would return range from file
                    // respond with not-modified
                    res = newFixedLengthResponse(Response.Status.NOT_MODIFIED, mime, "");
                    res.addHeader("ETag", etag);
                } else {
                    if (endAt < 0) {
                        endAt = fileLen - 1;
                    }
                    long newLen = endAt - startFrom + 1;
                    if (newLen < 0) {
                        newLen = 0;
                    }

                    ByteStreams.skipFully(fis, startFrom);

                    res = newFixedLengthResponse(Response.Status.PARTIAL_CONTENT, mime, fis, newLen);
                    res.addHeader("Accept-Ranges", "bytes");
                    res.addHeader("Content-Length", "" + newLen);
                    res.addHeader("Content-Range", "bytes " + startFrom + "-" + endAt + "/" + fileLen);
                    res.addHeader("ETag", etag);
                }
            } else {

                if (headerIfRangeMissingOrMatching && range != null && startFrom >= fileLen) {
                    // return the size of the file
                    // 4xx responses are not trumped by if-none-match
                    res = newFixedLengthResponse(Response.Status.RANGE_NOT_SATISFIABLE, NanoHTTPD.MIME_PLAINTEXT, "");
                    res.addHeader("Content-Range", "bytes */" + fileLen);
                    res.addHeader("ETag", etag);
                } else if (range == null && headerIfNoneMatchPresentAndMatching) {
                    // full-file-fetch request
                    // would return entire file
                    // respond with not-modified
                    res = newFixedLengthResponse(Response.Status.NOT_MODIFIED, mime, "");
                    res.addHeader("ETag", etag);
                } else if (!headerIfRangeMissingOrMatching && headerIfNoneMatchPresentAndMatching) {
                    // range request that doesn't match current etag
                    // would return entire (different) file
                    // respond with not-modified

                    res = newFixedLengthResponse(Response.Status.NOT_MODIFIED, mime, "");
                    res.addHeader("ETag", etag);
                } else {
                    // supply the file
                    res = newFixedLengthResponse(Response.Status.OK, mime, fis, fileLen);
                    res.addHeader("Content-Length", Long.toString(fileLen));
                    res.addHeader("ETag", etag);
                }
            }
            success = true;
        } catch (IOException ioe) {
            res = getForbiddenResponse();
        } finally {
            if (!success && fis != null) {
                IoUtils.closeQuietly(fis);
            }
        }

        return res;
    }

    private Response serveDir(SmbFile file) throws SmbException, UnknownHostException {
        final String canonicalPath = file.getCanonicalPath();
        if (!canonicalPath.endsWith("/")) {
            // MX Player can't handle redirect
            try {
                file = new SmbFile(file, canonicalPath + "/");
            } catch (MalformedURLException e) {
                throw new RuntimeException(e);
            }
        }

        final SmbFile[] list = file.listFiles();
        StringBuilder sb = new StringBuilder();
        for (SmbFile f : list) {
            final String name = f.getName();
            sb.append(String.format("%s
", Uri.encode(name), name));
        }

        return newFixedLengthResponse(Response.Status.OK, MIME_HTML + "; charset=UTF-8",
                sb.toString());
    }

    protected Response getForbiddenResponse() {
        return newFixedLengthResponse(Response.Status.FORBIDDEN, MIME_PLAINTEXT, "Forbidden");
    }

    public static class ThreadPoolRunner implements AsyncRunner {
        private final ExecutorService mExecutor = Executors.newCachedThreadPool();
        private final List<ClientHandler> running = Collections.synchronizedList(new ArrayList<ClientHandler>());

        @Override
        public void closeAll() {
            // copy of the list for concurrency
            mExecutor.shutdown();
            for (ClientHandler clientHandler : Lists.newArrayList(running)) {
                clientHandler.close();
            }
        }

        @Override
        public void closed(ClientHandler clientHandler) {
            running.remove(clientHandler);
        }

        @Override
        public void exec(ClientHandler clientHandler) {
            running.add(clientHandler);
            mExecutor.submit(clientHandler);
        }
    }
}


text:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />

    <title>Inquiring Javaist</title>
    <meta name="description" content="Nothing is better than looking under the hood to understand how things are working." />

    <meta name="HandheldFriendly" content="True" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <link rel="shortcut icon" href="//Ardemius.github.io/themes/ichi/favicon.ico">

    <link rel="stylesheet" type="text/css" href="//Ardemius.github.io/themes/ichi/assets/css/normalize.css?v=1.0.0" />
    <link rel="stylesheet" type="text/css" href="//Ardemius.github.io/themes/ichi/assets/css/foundation.min.css?v=1.0.0" />

    <link rel="stylesheet" type="text/css" href="//Ardemius.github.io/themes/ichi/assets/fonts/foundation-icons/foundation-icons.css?v=1.0.0" />
    <link rel="stylesheet" type="text/css" href="//Ardemius.github.io/themes/ichi/assets/css/styles.css?v=1.0.0" />
    <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Open+Sans:300,700,400|Source+Sans+Pro:300,400,600,700,900,300italic,400italic,600italic,700italic,900italic" />

	<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" />
	<link rel="stylesheet" type="text/css" href="//Ardemius.github.io/themes/ichi/assets/css/asciidoctor.css?v=1.0.0" />

    <link rel="canonical" href="https://Ardemius.github.io" />
    <meta name="generator" content="Ghost ?" />
    <link rel="alternate" type="application/rss+xml" title="Inquiring Javaist" href="https://Ardemius.github.io/rss" />
    <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/default.min.css">

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

    <button type="button" class="overlay-close">Close</button>

Home

Inquiring Javaist

Nothing is better than looking under the hood to understand how things are working.

Devoxx

            <time datetime="2017-11-29">29 Nov 2017</time>

Pour tous ceux préparent un sujet pour le CFP de Devoxx

En passant sur les tweets des Duchess, je suis tombé sur cet excellent article de Katia ARESTI, "J'ai testé pour vous : être dans le comité du CFP de Devoxx France", qui a fait partie du jury de Devoxx France 2016. Elle y donne plusieurs conseils pour augmenter ses chances de voir son sujet retenu :wink: Importance de soumettre tôt son sujet (ne pas attendre la veille de la fermeture du CFP&#8230…

        Read more
        Posted on Devoxx,  CFP,  speaker

    Page 1 of 1


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

<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>freeseawind.lf.basic.tree (LittleLuck 2.0.0 API)</title>
<meta name="date" content="2016-10-02">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

您的浏览器已禁用 JavaScript。

概览

程序包

类

使用

树

已过时

索引

帮助

上一个程序包

下一个程序包

框架

无框架

所有类

程序包 freeseawind.lf.basic.tree

类概要

类
说明

LuckTreeCellRenderer

Tree单元处理渲染器,去除焦点边框处理。

LuckTreeUI

 TreeUI实现类,在BasicTreeUI基础上做了如下改变:
 设置组件为不完全透明
 使用LuckTreeCellRenderer替换原有TreeCellRenderer实现
 ------------------------------------------------------------------------------------------
 Tree View UI implementation class, based on BasicTreeUI made the following changes:
 Set components are not fully transparent
 Replace the original TreeCellRenderer implementation with LuckTreeCellRenderer

LuckTreeUIBundle

TreeUI 资源绑定类。

概览

程序包

类

使用

树

已过时

索引

帮助

上一个程序包

下一个程序包

框架

无框架

所有类

Copyright © 2016. All Rights Reserved.


text:
<!-- github.com - Email registration check

Note: due to the way github works, invlaid email addresses may
appear as false positives.
-->
<module>
    <site>
        <name>Github.com (Email)</name>
        <url><![CDATA[https://github.com/signup_check/email]]></url>
        <method>POST</method>
        <postParameters><![CDATA[value=<ACCOUNT>]]></postParameters>
        <headers><![CDATA[X-CSRF-Token: <CSRFTOKEN>, Accept-Language: en-us, Content-Type: application/x-www-form-urlencoded; charset=UTF-8]]></headers>
        <requestCookie>true</requestCookie>
        <requestCSRF>
            <csrf_url><![CDATA[https://github.com/signup/free]]></csrf_url>
            <csrf_regex><![CDATA[<meta content="(.*)" name="csrf-token"]]></csrf_regex>
        </requestCSRF>
        <successmatch>Email is invalid or already taken</successmatch>
        <negativematch></negativematch>
        <message>Due to the way github works, invlaid email addresses may appear as false positives</message>
        <date>16/09/2012</date>
        <version>2</version>
        <author>CJR</author>
        <category>development</category>
    </site>
</module>


text:
using System;
using System.Linq.Expressions;
using System.Reflection;
using Fidely.Framework.Compilation.Operators;

namespace Fidely.Framework.Compilation.Objects.Operators
{
    /// <summary>
    /// Represents the equal operator.
    /// </summary>
    /// <typeparam name="T">The type of an elements in a collection that is filtered by a generated expression.</typeparam>
    public class Equal<T> : BaseBuiltInComparativeOperator<T>
    {
        private readonly bool _ignoreCase;

        /// <summary>
        /// Initializes a new instance of this class.
        /// </summary>
        /// <param name="symbol">The symbol of this operator.</param>
        public Equal(string symbol) : this(symbol, false)
        {
        }

        /// <summary>
        /// Initializes a new instance of this class.
        /// </summary>
        /// <param name="symbol">The symbol of this operator.</param>
        /// <param name="ignoreCase">Whether or not this operator should ignore case.</param>
        public Equal(string symbol, bool ignoreCase) : this(symbol, ignoreCase, OperatorIndependency.Strong, null)
        {
        }

        /// <summary>
        /// Initializes a new instance of this class.
        /// </summary>
        /// <param name="symbol">The symbol of this operator.</param>
        /// <param name="ignoreCase">Whether or not this operator should ignore case.</param>
        /// <param name="independency">The independency of this operator.</param>
        /// <param name="description">The description of this operator.</param>
        public Equal(string symbol, bool ignoreCase, OperatorIndependency independency, string description) : base(symbol, independency, description)
        {
            _ignoreCase = ignoreCase;
        }

        /// <summary>
        /// Creates the clone instance.
        /// </summary>
        /// <returns>The cloned instance.</returns>
        public override FidelyOperator Clone()
        {
            return new Equal<T>(Symbol, _ignoreCase, Independency, Description);
        }

        /// <summary>
        /// Builds up an expression to compare the specified operators.
        /// </summary>
        /// <param name="left">The left operand.</param>
        /// <param name="right">The right operand.</param>
        /// <returns>The operand that wraps the built expression.</returns>
        protected internal override Expression Compare(Operand left, Operand right)
        {
            Logger.Info("Comparing operands (left = '{0}', right = '{1}').", left.OperandType.FullName, right.OperandType.FullName);

            Expression result = null;

            var operands = new OperandPair(left, right);
            if (operands.Are(typeof(decimal)) || operands.Are(typeof(Guid)) || operands.Are(typeof(DateTime)) || operands.Are(typeof(DateTimeOffset)) || operands.Are(typeof(TimeSpan)))
            {
                result = Expression.Equal(left.Expression, right.Expression);
            }
            else
            {
                var l = Expression.Call(null, typeof(Convert).GetMethod("ToString", new Type[] { typeof(object) }), Expression.Convert(left.Expression, typeof(object)));
                var r = Expression.Call(null, typeof(Convert).GetMethod("ToString", new Type[] { typeof(object) }), Expression.Convert(right.Expression, typeof(object)));

                if (_ignoreCase)
                {
                    var toLower = typeof(string).GetMethod("ToLower", BindingFlags.Instance | BindingFlags.Public, null, new Type[] { }, null);
                    return Expression.Equal(Expression.Call(l, toLower), Expression.Call(r, toLower));
                }
                else
                {
                    result = Expression.Equal(l, r);
                }
            }

            return result;
        }
    }
}