text:
using NetTopologySuite.Geometries;

namespace DotSpatial.NTSExtension
{
    /// <summary>
    /// This contains methods for creating Coordinates of different types from the same input.
    /// </summary>
    public static class CoordinateExt
    {
        /// <summary>
        /// Creates an empty Coordinate. Based on the given values for withZ/withM this will create a Coordinate/CoordinateZ/CoordinateM or CoordinateZM.
        /// </summary>
        /// <param name="withZ">Indicates whether the coordinate should contain Z.</param>
        /// <param name="withM">Indicates whether the coordinate should contain M.</param>
        /// <returns>Based on the given values for withZ/withM this will create a Coordinate/CoordinateZ/CoordinateM or CoordinateZM.</returns>
        public static Coordinate CreateEmptyCoordinate(bool withZ, bool withM)
        {
            if (withZ && withM)
            {
                return new CoordinateZM();
            }
            else if (withM)
            {
                return new CoordinateM();
            }
            else if (withZ)
            {
                return new CoordinateZ();
            }
            else
            {
                return new Coordinate();
            }
        }

        /// <summary>
        /// Creates a Coordinate. Based on the given values for withZ/withM this will create a Coordinate/CoordinateZ/CoordinateM or CoordinateZM.
        /// </summary>
        /// <param name="x">The x value to use.</param>
        /// <param name="y">The y value to use.</param>
        /// <param name="withZ">Indicates whether the coordinate should contain Z.</param>
        /// <param name="z">The z value to use. This will be ignored if withZ is false.</param>
        /// <param name="withM">Indicates whether the coordinate should contain M.</param>
        /// <param name="m">The m value to use. This will be ignored if withM is false.</param>
        /// <returns>Based on the given values for withZ/withM this will create a Coordinate/CoordinateZ/CoordinateM or CoordinateZM.</returns>
        public static Coordinate CreateCoordinate(double x, double y, bool withZ, double z, bool withM, double m)
        {
            if (withZ && withM)
            {
                return new CoordinateZM(x, y, z, m);
            }
            else if (withM)
            {
                return new CoordinateM(x, y, m);
            }
            else if (withZ)
            {
                return new CoordinateZ(x, y, z);
            }
            else
            {
                return new Coordinate(x, y);
            }
        }

        /// <summary>
        /// Creates an empty point with the coordinate type resulting from the given input. Based on the given values for withZ/withM this will create a Coordinate/CoordinateZ/CoordinateM or CoordinateZM for the point.
        /// </summary>
        /// <param name="withZ">Indicates whether the coordinate should contain Z.</param>
        /// <param name="withM">Indicates whether the coordinate should contain M.</param>
        /// <returns>Based on the given values for withZ/withM this will create a Coordinate/CoordinateZ/CoordinateM or CoordinateZM for the point.</returns>
        public static Point CreateEmptyPoint(bool withZ, bool withM)
        {
            return new Point(CreateEmptyCoordinate(withZ, withM));
        }

        /// <summary>
        /// Creates a Point with the coordinate type resulting from the given input. Based on the given values for withZ/withM this will create a Coordinate/CoordinateZ/CoordinateM or CoordinateZM for the point.
        /// </summary>
        /// <param name="x">The x value to use.</param>
        /// <param name="y">The y value to use.</param>
        /// <param name="withZ">Indicates whether the coordinate should contain Z.</param>
        /// <param name="z">The z value to use. This will be ignored if withZ is false.</param>
        /// <param name="withM">Indicates whether the coordinate should contain M.</param>
        /// <param name="m">The m value to use. This will be ignored if withM is false.</param>
        /// <returns>Based on the given values for withZ/withM this will create a Coordinate/CoordinateZ/CoordinateM or CoordinateZM for the point.</returns>
        public static Point CreatePoint(double x, double y, bool withZ, double z, bool withM, double m)
        {
            return new Point(CreateCoordinate(x, y, withZ, z, withM, m));
        }
    }
}


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

class Cod extends MX_Controller
{
	function __construct()
	{
		parent::__construct();
		$this->load->model('cod_model');
		$this->load->helper('date');
		$this->load->library('auth/ion_auth');
		if(!$this->ion_auth->logged_in())
			redirect('/auth/login/','refresh');
	}

	function index()
	{
		$data=NULL;
		$this->_render_page('info',$data);
	}

	function lan()
	{
		$data['data']=$this->cod_model->lan();
		$this->_render_page('view_details',$data);
	}

	function mess()
	{
		$data['data']=$this->cod_model->mess();
		$this->_render_page('view_details',$data);
	}

	function grab()
{
	$data['grab']=$this->cod_model->grab();
	redirect('/cod','refresh');
}
function _render_page($view, $data=null)
{
	$data['user']=$this->cod_model->get_user_info();
	$this->load->view('cod_dash', $data);
	$this->load->view($view, $data);
	$this->load->view('footer', $data);
}
function upload_csv($data=NULL)
{
    $data1['name']=$data;
    $data1['special']=$this->cod_model->get_all_specializations();
    $data2=get_userdata();
    $this->load->view('cod_dash', $data2);
    $this->load->view('upload_base', $data1);
    $this->load->view('footer', $data2);

}
function csv_to_array($id){
	echo "please wait";
	$string_csv = "assets/uploads/".$id.".csv";

	$this->load->library('excel');
	   // $this->load->library('PHPexcel/IOFactory.php');
	$reader = PHPExcel_IOFactory::createReader('CSV')
	->setDelimiter(',')
	->setEnclosure('"')
	->setSheetIndex(0)
	->load($string_csv);

	$objWorksheet = $reader->setActiveSheetIndex(0);
	$highestRow = $objWorksheet->getHighestRow();
	$highestColumn = $objWorksheet->getHighestColumn();
	$highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn);

	//read from file
	for ($row = 0; $row <= $highestRow; ++$row)
	{
	   $file_data = array();
	   for ($col = 0; $col <= $highestColumnIndex; ++$col)
	   {
		  $value=$objWorksheet->getCellByColumnAndRow($col, $row)->getValue();
		  $file_data[$col]=trim($value);
	  }
	  $result[] = $file_data;
  }

  //print_r($result);

 $excluded_result =$this->cod_model->add_csvdata($result);
 $this->send_emails();

 $this->upload_csv($excluded_result);

}

   function cod_help()
{
    $data2=get_userdata();
    $this->load->view('cod_dash', $data2);
	$this->load->view('cod_help',$data2);
	$this->load->view('footer',$data2);
}

	function add_news()
	{

		$this->cod_model->add_news();
	}

	function show_news_feed_form()
	{
		$data=get_userdata();
		$this->_render_page('cod_news_form',$data);
	}

	function return_events()
	{
		echo json_encode($this->cod_model->get_events());
	}

	function show_calender()
	{

		$data['object']=$this->cod_model->get_events();
		$this->_render_page('customized_calender',$data);

	}

	function report()
	{
		$data=get_userdata();
		$this->_render_page('report_view',$data);
	}

	function reportgen()
	{
		$data=array();
		$index=2;
		$rep='CONCAT(users_data.first_name , '.'  '.',users_data.last_name),registration_number,company.name,eligibility.cgpa as ecg';
		$label=array('Full Name','Reg No','Company','Cutoff');
		foreach ($_POST as $key => $value) {
			$data[$key]=$value;
			if($value==1)
			{
				switch ($key) {
					case 'dname':
					$label[].='Branch';
					$rep.=",".'department.name';
					break;
					case 'cgpa':
					$label[].='CGPA';
					$rep.=",".'gpa.cgpa';
					break;
					default:
					$rep.=",".$key;
					$label[].=$key;
					break;
				}
				$index++;
			}
		}
		$data=$this->cod_model->report($rep);
		$data['label']=$label;
		$this->_render_page('report_gen',$data);
	}
	function add_news_feed()
	{
		$this->cod_model->add_news();
		$this->show_all_news();
	}

	function all_companies()
	{
		$data=get_userdata();
		$data['companies'] = $this->cod_model->get_all_companies();
		if(null !== $this->session->flashdata('action'))
		{
			$data['action'] = $this->session->flashdata('action');
		}
		else
		{
			$data['action'] = 'none';
		}
		$this->_render_page('all_companies',$data);
	}

	function add_company()
	{

		if($this->input->post('company_name') && $this->input->post('company_website') && $this->input->post('info') && isset($_FILES['logo']))
		{
			$add['name']=$this->input->post('company_name');
			$add['website']=$this->input->post('company_website');
			$add['cod_id'] = $this->ion_auth->user()->row()->id;
			$add['info'] = $this->input->post('info');
			$this->session->set_flashdata('company_added', $this->cod_model->add_company($add));
			redirect('cod/add_company');
		}
		if(null !== $this->session->flashdata('company_added'))
		{
			$data['company_added'] = $this->session->flashdata('company_added');
		}
		$data['j']="lol";
		$this->_render_page('add_company',$data);

	}

	function modify_company()
	{
		if($this->input->post('new_name') && $this->input->post('new_website') && $this->input->post('company') && $this->input->post('info'))
		{
			$company_id = $this->input->post('company');
			$modify['name']=$this->input->post('new_name');
			$modify['website']=$this->input->post('new_website');
			$modify['cod_id'] = $this->ion_auth->user()->row()->id;
			$modify['info'] = $this->input->post('info');
			if($this->cod_model->modify_company($company_id, $modify))
			{
				$this->session->set_flashdata('action','modified');
			}
			else
			{
				$this->session->set_flashdata('action','not modified');
			}
			redirect('cod/all_companies');
		}
		if(!$this->input->post('modifycomp'))
		{
			redirect('cod/all_companies');
			return;
		}
		$user=get_userdata();
		$data['company'] = $this->cod_model->get_company($this->input->post('modifycomp'));
		$this->load->view('cod_dash',$user);
		$this->load->view('modify_company',$data);
		$this->load->view('footer');
	}

	function delete_company()
	{
		if($this->input->post('company'))
		{
			$company_id = $this->input->post('company');
			$cod_id = $this->ion_auth->user()->row()->id;
			$this->cod_model->delete_company($company_id,$cod_id);
			$this->session->set_flashdata('action', 'deleted');
			redirect('cod/all_companies');
		}
		if(!$this->input->post('deletecomp'))
		{
			redirect('cod/all_companies');
			return;
		}
		$user=get_userdata();
		$data['company'] = $this->cod_model->get_company($this->input->post('deletecomp'));
		$this->load->view('cod_dash',$user);
		$this->load->view('delete_company',$data);
		$this->load->view('footer');
	}

	function check_visit_post_data()
	{
		if(!$this->input->post('title')){return false;}
		if(!$this->input->post('company_id')){return false;}
		if(!$this->input->post('session_id')){return false;}
		if(!$this->input->post('designation')){return false;}
		if(!$this->input->post('selection_dt')){return false;}
		if(!$this->input->post('app_deadline')){return false;}
		if(!$this->input->post('jobtype')){return false;}
		if(!$this->input->post('jobcatg')){return false;}
		if(!$this->input->post('stud_view')){return false;}
		if(!$this->input->post('app_format')){return false;}
		else
		{	//Comapny application form check
			if($this->input->post('app_format') == 2 && !$this->input->post('app_link')){return false;}
		}
		if(!$this->input->post('salary')){return false;}
		if(!$this->input->post('stp_amt')){return false;}
		if(!$this->input->post('bond')){return false;}
		if($this->input->post('spclid'))
		{
			$spclids = $this->input->post('spclid');
			foreach($spclids as $spclid)
			{
				if(!$this->input->post('category'.$spclid)){return false;}
				if(!$this->input->post('cgpa'.$spclid)){return false;}
				else
				{
					$cgpa = $this->input->post('cgpa'.$spclid);
					if(!($cgpa>=5 && $cgpa<=10)){return false;}
				}
				if(!$this->input->post('ssc'.$spclid)){return false;}
				else
				{
					$ssc = $this->input->post('ssc'.$spclid);
					if(!($ssc>=30 && $ssc<=100)){return false;}
				}
				if(!$this->input->post('hsc'.$spclid)){return false;}
				else
				{
					$hsc = $this->input->post('hsc'.$spclid);
					if(!($hsc>=30 && $hsc<=100)){return false;}
				}
				$d = $this->cod_model->get_specialization($spclid);
				$course = $d['course'];
				if($course!=1)	//Post-grad course
				{
					if(!$this->input->post('gradcgpa'.$spclid)){return false;}
					else
					{
						$gradcgpa = $this->input->post('gradcgpa'.$spclid);
						if(!($gradcgpa>=5 && $gradcgpa<=10)){return false;}
					}
				}
			}
		}
		else
		{
			return false;
		}
		return true;
	}

	function add_visit()
	{

		if($this->check_visit_post_data())
		{
			$this->session->set_flashdata('visit_added', $this->cod_model->add_visit());
			redirect('cod/add_visit');
		}
		if(null !== $this->session->flashdata('visit_added'))
		{
			$data['visit_added'] = $this->session->flashdata('visit_added');
		}
		$data['companies'] = $this->cod_model->get_all_companies();
		$data['sessions'] = $this->cod_model->get_all_sessions();
		$data['jobtypes'] = $this->cod_model->get_all_jobtypes();
		$data['jobcatgs'] = $this->cod_model->get_all_jobcategories();
		$data['spcls'] = $this->cod_model->get_all_specializations();
		$data['catgs'] = $this->cod_model->get_all_categories();
		$this->_render_page('add_visit',$data);
	}

	function modify_visit()
	{
		if(!$this->input->post('modify_id'))
		{
			redirect('cod/all_visits');
		}
		$data = get_userdata();
		$this->load->view('cod_dash',$data);
		if($this->input->post('modify_id') && $this->check_visit_post_data())
		{
			$this->session->set_flashdata('visit_modified', $this->cod_model->modify_visit());
			redirect('cod/all_visits');
		}
		$data['visit'] = $this->cod_model->get_visit($this->input->post('modify_id'));
		$data['companies'] = $this->cod_model->get_all_companies();
		$data['sessions'] = $this->cod_model->get_all_sessions();
		$data['jobtypes'] = $this->cod_model->get_all_jobtypes();
		$data['jobcatgs'] = $this->cod_model->get_all_jobcategories();
		$data['spcls'] = $this->cod_model->get_all_specializations();
		$data['catgs'] = $this->cod_model->get_all_categories();
		$data['eligs'] = $this->cod_model->get_eligibility($this->input->post('modify_id'));
		$this->load->view('modify_visit',$data);
		$this->load->view('footer');
	}

	function delete_visit()
	{
		if(!$this->input->post('delete_id'))
		{
			redirect('cod/all_visits');
		}
		$id = $this->input->post('delete_id');
		$this->cod_model->delete_visit($id);
	}

	function all_visits()
	{
		$data = get_userdata();
		$this->load->view('cod_dash',$data);
		if(null !== $this->session->flashdata('visit_modified'))
		{
			$data['visit_modified'] = $this->session->flashdata('visit_modified');
		}
		$data['visits'] = $this->cod_model->get_all_company_visits();
		$this->load->view('all_visits',$data);
		$this->load->view('footer');
	}

	function send_emails()
	{

	   // print_r($data);
		$email = 'anmoluday@gmail.com';
		$password = 'samsunggalaxyminigingerbread2.3.4';

		$config['protocol']    = 'smtp';
		$config['smtp_host']    = 'ssl://smtp.gmail.com';
		$config['smtp_port']    = '465';

		$config['smtp_user']    = $email;
		$config['smtp_pass']    = $password;
		$config['charset']    = 'utf-8';
		$config['newline']    = "\r\n";
		$config['mailtype'] = 'html'; // or html
		$config['validation'] = TRUE; // bool whether to validate email or not

		$data1 = $this->cod_model->read_student_emails_1();
		$data4 = $this->cod_model->no_of_rows();
		print_r($data4);
		for($i=1;$i<$data4;$i++)
		{

			$this->email->initialize($config);
			$this->email->from($email, 'TAPS Coordinator');
			$key = $data1[$i]['username'];
		//print_r($key);
			$this->email->to($data1[$i]['email']);
			$email_body = "
 Hello . Welcome to Training and Placement portal NITW

 Username :".$data1[$i]['username']."

Please follow this link to login and ciick on forgotten password. Login Cheers
 ";
			$this->email->subject('TAPS Activation');
			$this->email->message($email_body);
			$this->email->send();
	   // print_r($data1[$i]['email']);

			$this->email->clear();

			$this->email->print_debugger();
		}
	}

	function round()
	{

		$data=$this->cod_model->get_company_data();
		$this->_render_page('round',$data);
	}

	function apply_students()
	{
		$data=get_userdata();
		$this->load->view('cod_dash',$data);
		$data=$this->cod_model->get_company_data();
		$this->load->view('app_std',$data);
		$this->load->view('footer',$data);
	}

	function appl_res()
	{
		$comp=$this->input->post('company');
		if($comp!='none')
		{
			$data=$this->cod_model->get_users($comp);
			if($data==-1)
				echo "Rounds not created for this company";
			else{
				$data['comp']=$comp;
				$this->load->view('round_view',$data);
			}
		}
	}
	function round_res()
	{
		$comp=$this->input->post('company');
		if($comp!='none')
		{
			$data=$this->cod_model->get_application_data($comp,0);
			if($data==-1)
				echo "Rounds not created for this company";
			elseif($data==-2)
				echo "Rounds created but no one applied";
			else{
				$data['comp']=$comp;
				$this->load->view('round_view',$data);
			}
		}
	}

	function round_eligible()
	{
		$result=array();
		foreach ($_POST as $key => $value) {
			if($value=='eligible')
			{
				$result[]=$key;
			}
		}
		$this->cod_model->enter_application($result);
		$data=$this->input->post('company');
		$data=$this->cod_model->get_application_data($data,1);
		$this->_render_page('round_res',$data);
	}
	function show_all_news()
	{

		$data['results']=$this->cod_model->show_all_news();
		$this->_render_page('show_all_news',$data);

	}
	function modify_news()
	{
		$data['message']="none";
		$this->_render_page('modify_news',$data);

	}
	function modified_news()
	{
		$id=$this->input->post("post_id");
		$data['title']=$this->input->post('title');
		$data['content']=$this->input->post('content');
		$data['cod_id']=111;
		$this->cod_model->modify_news($id,$data);
		$this->show_all_news();

	}
	function delete_news()
	{
		$id = $this->input->post("post_id");
		$data=get_userdata();
		$this->cod_model->delete_news($id);
		$this->show_all_news();
	}
	function download_sample()
	{
		$this->load->helper('download');
		$data=base_url('/assets/uploads/sample.csv');
		force_download('sample.csv', $data);

	}

	function sms()
	{
		if($this->input->post('usermode'))
		{
			$usermode = $this->input->post('usermode');
			if($usermode == 1)
			{

			}
			else if($usermode == 2)
			{
				if(null !== $this->input->post('no_students'))
				{
					$number = $this->input->post('no_students');
					for($i=1;$i<=$number;$i++)
					{
						if(null !== $this->input->post('number'.$i))
						{
							echo $this->input->post('number'.$i).'
';
						}
						else
						{
							echo 'Error : student not found';
							break;
						}
					}
				}
				else
				{
					echo 'Error : no students';
				}
			}
			else if($usermode == 3)
			{
				if($this->ion_auth->in_group('admin'))
				{
					if(null !== $this->input->post('branchselect'))
					{
						echo $this->input->post('branchselect');
					}
					else
					{
						echo 'Error : branchselect not present';
					}
				}
				else
				{
					echo 'Error : Not an admin';
				}
			}
			else if($usermode == 4)
			{
				if($this->ion_auth->in_group('admin'))
				{
					//echo 'All';
					$this->send_sms('all');
				}
				else
				{
					echo 'Error : Not an admin';
				}
			}
		}
		$user = get_userdata();
		$this->load->view('cod_dash',$user);
		$data['branch'] = $this->cod_model->get_dept_name($this->cod_model->get_user_dept($this->ion_auth->user()->row()->id));
		$data['departments'] = $this->cod_model->get_all_departments();
		$this->load->view('sms',$data);
		$this->load->view('footer');
	}

	function send_sms($mode, $regnumbers = '')
	{

	}

	function show_modify_round_visits()
	{

		$result=$this->cod_model->get_company_rounds();
		$data=array('result'=>$result,'rowcount'=>count($result));
		$this->_render_page('show_rounds',$data);
	}

	function round_edit()
	{
		$visit=$this->input->post('action');
		$result=$this->cod_model->round_view($visit);
		$rowcount=count($result);
		$data = array('rowcount' =>$rowcount ,'result'=>$result );
		$this->_render_page('show_rounds_comp',$data);
	}
	function upgrade_round()
	{
		$appid=$this->input->post('id');
		$data=$this->cod_model->upgrade_round($appid);
		if($data==-1)
		{
			echo json_encode(array('m1' =>1,));
		}
		else
		{
			$round_no=$data['round_no'];
			$round_name=$data['round_name'];
			echo json_encode(array("m2"=>"Round $round_no","m1"=>"<input value='$round_no' name='hid' hidden>","m3"=>"<input type='text' name='inp1' value='$round_name'>"));
		}
	}
	function get_round()
	{
		echo $this->cod_model->get_round();
	}
	function dismiss_round()
	{
		$appid=$this->input->post('id');
		$data=$this->cod_model->dismiss_round($appid);
		if($data==-1)
		{
			echo json_encode(array("m2"=>-1));

		}
		else if($data==-2)
		{
			echo json_encode(array("m1"=>-1));
		}
		else
		{
			$round_no=$data['round_no'];
			$round_name=$data['round_name'];
			echo json_encode(array("m2"=>"Round $round_no","m1"=>"<input value='$round_no' name='hid' hidden>","m3"=>"<input type='text' name='inp1' value='$round_name'>"));

		}
	}

	function final_round()
	{
		$appid=$this->input->post('id');
		$r=$this->cod_model->final_round($appid);
		echo "Round ".$r;
	}
	function finalize_round()
	{
		$appid=$this->input->post('inp1');
		$round=$this->input->post('hid');
		$this->cod_model->finalize_round($appid,$round);
		redirect('cod/show_modify_round_visits');
	}

	function history_round()
	{
		$visit=$this->input->post('id');
		$data=$this->cod_model->history_round($visit);
		for ($i=count($data)-1; $i>=0; $i--) {
			$name=$data[$i]["round_name"];
			echo'

Round '.$data[$i]['round_no'].'

			<input id="icon_prefix" type="text" value="'.$name.'" class="validate"';
			if($i!=0) echo "disabled";
			else echo "readonly";
			echo ">

";
		}
	}

	function profilelock()
	{
		$data=$this->cod_model->prolock();
		$this->_render_page('profile_lock',$data);

	}

	function send_msg()
	{
		print_r($_POST);
	}
	function upload_students()
	{
		$this->_render_page('upload_stud_file');
	}

}

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Cubiche\Domain\Identity;

use Cubiche\Domain\System\StringLiteral;

/**
 * Hash Id Class.
 *
 * @author Ivannis Suárez Jerez <ivannis.suarez@gmail.com>
 */
class HashId extends Id
{
    /**
     * @param string $value
     *
     * @return HashId
     */
    public static function fromNative($value)
    {
        return new self(StringLiteral::fromNative($value));
    }
}


text:
using System;
using System.IO;
using Encog.ML.Data;
using Encog.ML.Data.Market;
using Encog.ML.Data.Market.Loader;
using Encog.Neural.Networks;
using Encog.Persist;
using Encog.Util;
using Encog.Util.File;

namespace Encog.Examples.CSVMarketExample
{
    public class MarketEvaluate
    {
        #region Direction enum

        public enum Direction
        {
            Up,
            Down
        } ;

        #endregion

        public static Direction DetermineDirection(double d)
        {
            return d < 0 ? Direction.Down : Direction.Up;
        }

        public static MarketMLDataSet GrabData(string newfileLoad)
        {
            IMarketLoader loader = new CSVLoader();
            loader.GetFile(newfileLoad);

            var result = new MarketMLDataSet(loader,
                                             Config.INPUT_WINDOW, Config.PREDICT_WINDOW);
          //  var desc = new MarketDataDescription(Config.TICKER,
                                              //   MarketDataType.Close, true, true);

            var desc = new MarketDataDescription(Config.TICKER,
                                     MarketDataType.Trade, true, true);
            result.AddDescription(desc);

            var end = DateTime.Now; // end today
            var begin = new DateTime(end.Ticks); // begin 30 days ago
            begin = begin.AddDays(-150);

            result.Load(begin, end);
            result.Generate();

            return result;
        }

        public static void Evaluate(FileInfo dataDir,string filename)
        {
            FileInfo file = FileUtil.CombinePath(dataDir, Config.NETWORK_FILE);

            if (!file.Exists)
            {
                Console.WriteLine(@"Can't read file: " + file);
                return;
            }

            var network = (BasicNetwork) EncogDirectoryPersistence.LoadObject(file);

            MarketMLDataSet data = GrabData(filename);

            int count = 0;
            int correct = 0;
            foreach (IMLDataPair pair in data)
            {
                IMLData input = pair.Input;
                IMLData actualData = pair.Ideal;
                IMLData predictData = network.Compute(input);

                double actual = actualData[0];
                double predict = predictData[0];
                double diff = Math.Abs(predict - actual);

                Direction actualDirection = DetermineDirection(actual);
                Direction predictDirection = DetermineDirection(predict);

                if (actualDirection == predictDirection)
                    correct++;

                count++;

                Console.WriteLine(@"Day " + count + @":actual="
                                  + Format.FormatDouble(actual, 4) + @"(" + actualDirection + @")"
                                  + @",predict=" + Format.FormatDouble(predict, 4) + @"("
                                  + predictDirection + @")" + @",diff=" + diff);
            }
            double percent = correct/(double) count;
            Console.WriteLine(@"Direction correct:" + correct + @"/" + count);
            Console.WriteLine(@"Directional Accuracy:"
                              + Format.FormatPercent(percent));
        }
    }
}


text:
package d.money.mapper.base;

import d.money.pojo.base.User;
import d.money.pojo.base.UserExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface UserMapper {
    int countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);
}


text:
{% if DISQUS_SITENAME %}

{% endif %}
{% if ISSO_ENABLED %}

    Comments
{% endif %}
{% if PELICAN_COMMENT_SYSTEM %}
    Leave a comment. {% if article.comments_count > 0 %}({{ article.comments_count }}){% endif %}
{% endif %}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Discord;
using Discord.Addons.SimplePermissions;
using Discord.Commands;

namespace MechHisui.SymphoXDULib
{
    public partial class XduModule
    {
        [Group("song"), Alias("songs"), Permission(MinimumPermission.Everyone)]
        public class XduSongs : ModuleBase<SocketCommandContext>
        {
            private readonly XduStatService _stats;

            public XduSongs(XduStatService stats)
            {
                _stats = stats;
            }

            [Command]
            public Task GetSong(int id)
            {
                var song = _stats.Config.GetSongs().SingleOrDefault(s => s.Id == id);
                return (song != null)
                    ? ReplyAsync("", embed: FormatSong(song))
                    : ReplyAsync("Unknown/Not a Song ID");
            }

            [Command("search"), Alias("for", "by")]
            public Task Find(string singer)
            {
                var songs = _stats.Config.GetSongs()
                    .Where(s => s.EquipsOn.Contains(singer, StringComparer.OrdinalIgnoreCase))
                    .OrderBy(s => s.Id)
                    .Select(s => FormatSong(s)).ToList();
                return SendResults(songs, _stats, Context, listenForSelect: false);
            }

            //private async Task SendResults(List<Embed> pages)
            //{
            //    if (pages.Count == 0)
            //    {
            //        await ReplyAsync("No results found");
            //        return;
            //    }

            //    var pmsg = new PaginatedMessage(pages,
            //        //embedColor: new Color(),
            //        user: Context.User,
            //        options: _options);

            //    await _stats.AddNewPagedAsync(await pmsg.SendMessage(Context.Channel));
            //}

            internal static Embed FormatSong(Song song)
            {
                return new EmbedBuilder
                {
                    Author      = new EmbedAuthorBuilder { Name = $"Song #{song.Id}: {song.Title}" },
                    Title       = "Effect:",
                    Description = song.Effect,
                    Fields      =
                    {
                        new EmbedFieldBuilder
                        {
                            IsInline = false,
                            Name     = "Usable by:",
                            Value    = String.Join(", ", song.EquipsOn)
                        }
                    },
                    ImageUrl    = song.Image ?? "http://i.imgur.com/hPNxdda.png"
                }.Build();
            }
        }
    }
}


text:
To give you a better understanding of how mitmproxy works, mitmproxy's high-level architecture is detailed
in the following graphic:

(architecture.pdf)

Please don't refrain from asking any further
questions on the mailing list, the IRC channel or the GitHub issue tracker.


text:
#ifndef LinkLoaderClient_h
#define LinkLoaderClient_h

namespace blink {

class LinkLoaderClient {
public:
    virtual ~LinkLoaderClient() { }

    virtual bool shouldLoadLink() = 0;

    virtual void linkLoaded() = 0;
    virtual void linkLoadingErrored() = 0;
    // There is no notification for cancellation.

    virtual void didStartLinkPrerender() = 0;
    virtual void didStopLinkPrerender() = 0;
    virtual void didSendLoadForLinkPrerender() = 0;
    virtual void didSendDOMContentLoadedForLinkPrerender() = 0;
};

}

#endif


text:
#include "chipmunk/chipmunk_private.h"

// TODO: Comment me!

void cpConstraintDestroy(cpConstraint *constraint){}

void
cpConstraintFree(cpConstraint *constraint)
{
	if(constraint){
		cpConstraintDestroy(constraint);
		cpfree(constraint);
	}
}

void
cpConstraintInit(cpConstraint *constraint, const cpConstraintClass *klass, cpBody *a, cpBody *b)
{
	constraint->klass = klass;

	constraint->a = a;
	constraint->b = b;
	constraint->space = NULL;

	constraint->next_a = NULL;
	constraint->next_b = NULL;

	constraint->maxForce = (cpFloat)INFINITY;
	constraint->errorBias = cpfpow(1.0f - 0.1f, 60.0f);
	constraint->maxBias = (cpFloat)INFINITY;

	constraint->collideBodies = cpTrue;

	constraint->preSolve = NULL;
	constraint->postSolve = NULL;
}

cpSpace *
cpConstraintGetSpace(const cpConstraint *constraint)
{
	return constraint->space;
}

cpBody *
cpConstraintGetBodyA(const cpConstraint *constraint)
{
	return constraint->a;
}

cpBody *
cpConstraintGetBodyB(const cpConstraint *constraint)
{
	return constraint->b;
}

cpFloat
cpConstraintGetMaxForce(const cpConstraint *constraint)
{
	return constraint->maxForce;
}

void
cpConstraintSetMaxForce(cpConstraint *constraint, cpFloat maxForce)
{
	cpAssertHard(maxForce >= 0.0f, "maxForce must be positive.");
	cpConstraintActivateBodies(constraint);
	constraint->maxForce = maxForce;
}

cpFloat
cpConstraintGetErrorBias(const cpConstraint *constraint)
{
	return constraint->errorBias;
}

void
cpConstraintSetErrorBias(cpConstraint *constraint, cpFloat errorBias)
{
	cpAssertHard(errorBias >= 0.0f, "errorBias must be positive.");
	cpConstraintActivateBodies(constraint);
	constraint->errorBias = errorBias;
}

cpFloat
cpConstraintGetMaxBias(const cpConstraint *constraint)
{
	return constraint->maxBias;
}

void
cpConstraintSetMaxBias(cpConstraint *constraint, cpFloat maxBias)
{
	cpAssertHard(maxBias >= 0.0f, "maxBias must be positive.");
	cpConstraintActivateBodies(constraint);
	constraint->maxBias = maxBias;
}

cpBool
cpConstraintGetCollideBodies(const cpConstraint *constraint)
{
	return constraint->collideBodies;
}

void
cpConstraintSetCollideBodies(cpConstraint *constraint, cpBool collideBodies)
{
	cpConstraintActivateBodies(constraint);
	constraint->collideBodies = collideBodies;
}

cpConstraintPreSolveFunc
cpConstraintGetPreSolveFunc(const cpConstraint *constraint)
{
	return constraint->preSolve;
}

void
cpConstraintSetPreSolveFunc(cpConstraint *constraint, cpConstraintPreSolveFunc preSolveFunc)
{
	constraint->preSolve = preSolveFunc;
}

cpConstraintPostSolveFunc
cpConstraintGetPostSolveFunc(const cpConstraint *constraint)
{
	return constraint->postSolve;
}

void
cpConstraintSetPostSolveFunc(cpConstraint *constraint, cpConstraintPostSolveFunc postSolveFunc)
{
	constraint->postSolve = postSolveFunc;
}

cpDataPointer
cpConstraintGetUserData(const cpConstraint *constraint)
{
	return constraint->userData;
}

void
cpConstraintSetUserData(cpConstraint *constraint, cpDataPointer userData)
{
	constraint->userData = userData;
}

cpFloat
cpConstraintGetImpulse(cpConstraint *constraint)
{
	return constraint->klass->getImpulse(constraint);
}


text:
set_unless[:app_php][:db_schema_name] = ""
# List of additional php modules
set_unless[:app_php][:modules_list] = []
# Be default php will use MySQL as primary database adapter
set_unless[:app_php][:db_adapter] = "mysql"

# Calculated attributes
# Defining apache user, module dependencies and database adapter parameters depending on platform.
case platform
when "ubuntu", "debian"
  set[:app_php][:module_dependencies] = [ "proxy_http", "php5"]
  set_unless[:app_php][:app_user] = "www-data"
  if app_php[:db_adapter] == "mysql"
    set[:db_mysql][:socket] = "/var/run/mysqld/mysqld.sock"
  elsif app_php[:db_adapter] == "postgresql"
    set[:db_postgres][:socket] = "/var/run/postgresql"
  else
    raise "Unrecognized database adapter #{node[:app][:db_adapter]}, exiting "
  end
when "centos","fedora","suse","redhat"
  set[:app_php][:module_dependencies] = [ "proxy", "proxy_http" ]
  set_unless[:app_php][:app_user] = "apache"
  if app_php[:db_adapter] == "mysql"
    set[:db_mysql][:socket] = "/var/lib/mysql/mysql.sock"
  elsif app_php[:db_adapter] == "postgresql"
    set[:db_postgres][:socket] = "/var/run/postgresql"
  else
    raise "Unrecognized database adapter #{node[:app_php][:db_adapter]}, exiting "
  end
end


text:
var gulp = require('gulp');
var format = require('util').format;
var config = require('../config');
var scenarioServer = require('../../test/e2e/scenario-server');

gulp.task('scenarios', function() {
	scenarioServer(3000);
});


text:
using UnityEngine;
using System.Collections;
public class StateGameOver : GameState
{
	private float countDown = 5f;
	public StateGameOver(GameManager manager):base(manager) { }

	public override void OnStateEntered()
	{
		Application.LoadLevel("GameOver");
		countDown = 5f;
	}
	public override void OnStateExit(){
		GameManager.Instance.score = 0;
		GameManager.Instance.currentLevelNumber = 1;
		GameManager.Instance.chainPoints = 0;
	}
	public override void StateUpdate()
	{

	}
	public override void StateGUI()
	{

	}
}


text:
<?php

namespace MediaMonks\SonataMediaBundle\Tests\Unit\Provider;

use MediaMonks\SonataMediaBundle\Client\HttpClientInterface;
use MediaMonks\SonataMediaBundle\Exception\InvalidProviderUrlException;
use MediaMonks\SonataMediaBundle\Provider\AbstractProvider;
use MediaMonks\SonataMediaBundle\Provider\YouTubeProvider;
use Mockery as m;
use PHPUnit\Framework\TestCase;
use Sonata\AdminBundle\Form\FormMapper;

class YoutubeProviderTest extends TestCase
{
    public function testParseProviderReference()
    {
        $youtube = new YouTubeProvider();
        $this->assertEquals('uN2nqdRLhQ8', $youtube->parseProviderReference('https://www.youtube.com/watch?v=uN2nqdRLhQ8'));
        $this->assertEquals('uN2nqdRLhQ8', $youtube->parseProviderReference('https://www.youtube.com/watch?v=uN2nqdRLhQ8&foo=bar'));
        $this->assertEquals('uN2nqdRLhQ8', $youtube->parseProviderReference('https://youtu.be/uN2nqdRLhQ8'));
        $this->assertEquals('uN2nqdRLhQ8', $youtube->parseProviderReference('https://youtu.be/uN2nqdRLhQ8?foo=bar'));
        $this->assertEquals('uN2nqdRLhQ8', $youtube->parseProviderReference('uN2nqdRLhQ8'));
    }

    public function testParseInvalidProviderReference()
    {
        $this->expectException(InvalidProviderUrlException::class);
        $youtube = new YouTubeProvider();
        $youtube->parseProviderReference('https://www.youtube.com/watch?foo=bar');
    }

    public function testParseInvalidProviderReference2()
    {
        $this->expectException(InvalidProviderUrlException::class);
        $youtube = new YouTubeProvider();
        $youtube->parseProviderReference('https://www.youtube.com');
    }

    public function testParseInvalidProviderReferenceShort()
    {
        $this->expectException(InvalidProviderUrlException::class);
        $youtube = new YouTubeProvider();
        $youtube->parseProviderReference('https://youtu.be');
    }

    public function testGetImageUrlMaxRes()
    {
        $httpClient = m::mock(HttpClientInterface::class);
        $httpClient->shouldReceive('exists')->andReturn(true);

        $provider = new YouTubeProvider();
        $provider->setHttpClient($httpClient);
        $this->assertEquals('https://i.ytimg.com/vi/id/maxresdefault.jpg', $provider->getImageUrl('id'));
    }

    public function testGetImageUrlLowRes()
    {
        $httpClient = m::mock(HttpClientInterface::class);
        $httpClient->shouldReceive('exists')->andReturn(false);

        $provider = new YouTubeProvider();
        $provider->setHttpClient($httpClient);
        $this->assertEquals('https://i.ytimg.com/vi/id/hqdefault.jpg', $provider->getImageUrl('id'));
    }
}


text:
<?php

namespace BackBee\WebBundle\Renderer;

use BackBee\CoreDomain\Renderer\RenderableInterface;
use BackBee\CoreDomain\Site\Layout;

/**
 * Interface for the templates renderers.
 *
 * @category    BackBee
 *
 * @copyright   Lp digital system
 * @author      c.rouillon <charles.rouillon@lp-digital.fr>
 */
interface RendererInterface
{
    public function assign($var, $value = null);

    public function getAssignedVars();

    public function render(RenderableInterface $content = null, $mode = null, $params = null, $template = null);

    public function partial($template = null, $params = null);

    public function error($error_code, $title = null, $message = null, $trace = null);

    public function updateLayout(Layout $layout);

    public function removeLayout(Layout $layout);
}


text:
<!--
 Licensed to the Apache Software Foundation (ASF) under one or more
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
 The ASF licenses this file to You under the Apache License, Version 2.0
 (the "License"); you may not use this file except in compliance with
 the License.  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->
<assembly>
  <id>bin</id>
  <formats>
    <format>tar.gz</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>
  <baseDirectory>extensions</baseDirectory>
  <includeSiteDirectory>false</includeSiteDirectory>
  <fileSets>
    <fileSet>
      <directory>${basedir}</directory>
      <outputDirectory>.</outputDirectory>
      <includes>
        <include>LICENSE.txt</include>
        <include>CHANGES.txt</include>
      </includes>
      <fileMode>775</fileMode>
    </fileSet>
    <fileSet>
      <directory>${basedir}/src/main/resources/extractor/bin</directory>
      <outputDirectory>extensions/extractor/bin</outputDirectory>
      <includes/>
      <fileMode>775</fileMode>
    </fileSet>
    <fileSet>
      <directory>${basedir}/src/main/resources/logs</directory>
      <outputDirectory>extensions/logs</outputDirectory>
      <includes>
        <include>REMOVE.log</include>
      </includes>
      <fileMode>775</fileMode>
    </fileSet>
    <fileSet>
      <directory>${basedir}/src/main/resources/extractor/etc</directory>
      <outputDirectory>extensions/extractor/etc</outputDirectory>
      <includes/>
      <fileMode>664</fileMode>
      <directoryMode>775</directoryMode>
    </fileSet>
    <fileSet>
      <directory>target/site/apidocs</directory>
      <filtered>false</filtered>
      <outputDirectory>doc</outputDirectory>
      <excludes/>
    </fileSet>
  </fileSets>
  <dependencySets>
    <dependencySet>
      <outputDirectory>extensions/lib</outputDirectory>
      <unpack>false</unpack>
      <useProjectArtifact>true</useProjectArtifact>
      <useTransitiveDependencies>true</useTransitiveDependencies>
      <unpackOptions/>
    </dependencySet>
  </dependencySets>
</assembly>


text:
package knot.core.stream.sinks

import knot.core.stream.Sink
import knot.core.stream.ops.SinkOps
import knot.core.stream.ops.StreamOps.{Completed, ErrorEmitted}
import knot.core.stream.plugs.Input

case class LastSink[T]() extends Sink[T, T] {

  override def newOps: SinkOps[T, T] = new SinkOps[T, T] {
    private[this] var prev: T = null.asInstanceOf[T]

    override protected def onUpstreamFinish: LifecycleBehavior = {
      case Completed =>
        val result = prev
        prev = null.asInstanceOf[T]
        complete(result)
      case ErrorEmitted(cause, _) =>
        prev = null.asInstanceOf[T]
        error(cause)
    }

    override protected def onNext(in: Input[T], element: T): Unit = {
      prev = element
      requestIfNeeded(in)
    }

    override def toDebugString = "LastSink"
  }
}


text:
//Create stylesheets for each script in the same folder with the same naming (if necessary) and import it.
import "./index.css";

/**
 * chayns ready promise
 */
chayns.ready.then(function resolved() {
    init();
}).catch(function rejected() {
    console.error("no chayns environment found. you need to implement this website in your chayns-website");
}).then(function always() {
    //Will always be executed
});

/**
 * Will be executed when the chayns-API is loaded
 */
const init = () => {

    "use strict";

    /**
     * You can get the basic information about the logged in user by using the chayns variables "chayns.env.user"
     * @type {string}
     */
    document.querySelector('#headline').innerHTML = `Hello ${chayns.env.user.name}!`; //If no user is logged in an empty string will be returned by the user object

    if(chayns.env.user.isAuthenticated){ //checks if a valid user is logged in

    }

    /**
     * The webpack files use the webpack-replace loader for replacing the "server_url"
     * @type {string}
     */
    console.log('########################################################');
    console.log(`You are running the ##server_url##-Version of your Tapp`);
    console.log('########################################################');
};


text:
<?php
defined('TYPO3_MODE') or die();

call_user_func(function () {
    // Add the FlexForm
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
        'azuresearch_searchform',
        'FILE:EXT:azuresearch/Configuration/FlexForms/azuresearch.xml'
    );
});


text:
import json
import sets
import urllib2

import scrapy
from scrapy import Request
from scrapy.selector import Selector
from scrapy.log import INFO, DEBUG, ERROR, WARNING
from jutaobao.items import JutaobaoProductItem
from jutaobao.misc import *
import jutaobao.settings as settings

import sys
reload(sys)
sys.setdefaultencoding('utf-8')

class JuhuasuanSpider(scrapy.Spider):
    name = "juhuasuan"
    allowed_domains = ["taobao.com"]
    start_urls = (
        'http://ju.taobao.com',
    )
    today_url_temp = "http://ju.taobao.com/tg/today_items.htm?page=%s&timeFilter=today"
    old_url_temp = "http://ju.taobao.com/tg/today_items.htm?page=%s&timeFilter=old"
    tuangou_home_page = "http://ju.taobao.com/tg/brand.htm"

    sold_count_ajax_url = "http://dskip.ju.taobao.com/detail/json/item_dynamic.htm?item_id=%s&id=%s"

    timeline_category_url = "http://act.ju.taobao.com/go/rgn/juhuasuan/point-timeline-hover.php"

    def __init__(self):
        scrapy.log.start()
        # this dict is used to cached the scrapped item whose sold count is still not set yet
        self._item_cache = {}
        self._tg_req_counter = 0
        self._normal_req_counter = 0
        self._timeline_req_counter = 0
        # there are many duplicated items in the pages during crawling
        # eg. taobao uses the hot sales items to full-fill the blank blocks
        self._item_urls_set = sets.Set()
        # a dict store item_url => category
        # for timeline/tuangou item, we scrap the category in the
        # promotion page
        self._item_category = {}
        # timeline category dict
        self._timeline_category = {}
        self._init_timeline_category()
        # tuangou item category
        # item url => item category
        self._tg_category = {}
        # tg promotion => category
        self._tg_promotion_category = {}

    def _init_timeline_category(self):
      response = urllib2.urlopen(self.timeline_category_url)
      payload = response.read()
      data = json.loads(payload)
      # when walking through the json, exception may be thrown
      # but it is OK to fail the process as early as possible
      cata_map = data['td']
      for i in range(0, 25):
        if str(i) in cata_map:
          self._timeline_category[i] = cata_map[str(i)]['text'].encode("utf8")

    def parse(self, response):
      self.log("init timeline category map as %s" % self._timeline_category, INFO)
      if settings.crawl_normal:
        # today new items
        today_link = self.today_url_temp % 1
        self.log("start crawl today's new item page: %s" % today_link, INFO)
        yield Request(today_link, self.parse_today_item_first_page)

        # old items
        old_link = self.old_url_temp % 1
        self.log("start to crawl old item page:%s" % old_link, INFO)
        yield Request(old_link, self.parse_old_item_first_page)

      if settings.crawl_timeline:
      # point timeline items
        point_pages = response.xpath('//a[contains(@class, "afterPoint point-tge") or contains(@class, "nowPoint")]/@href').extract()
        self.log("get %s point timeline pages." % len(point_pages), DEBUG)
        for l in point_pages:
          yield Request(l, self.scrap_point_timeline_page)

      if settings.crawl_tuangou:
        # tg page
        yield Request(self.tuangou_home_page, self.parse_tg_home_page)

    '''
      methods for scrapping the tuangou items
    '''
    def parse_tg_home_page(self, response):
      promotion_blocks = response.xpath('//div[@class="l-floor J_Floor"]')
      for promotion in promotion_blocks:
        cata = promotion.xpath('./div[@class="l-f-title"]//text()').extract()
        if len(cata) == 0:
          self.log("can not get tuangou promotion category for block %s" % promotion.extract(), INFO)
          continue
        p_cata = cata[0].encode("utf8").strip()
        tg_promotions = promotion.xpath('.//li[@class="brand-mid-v1"]//a/@href').extract()
        self.log("get %s tuangou promotions. category: %s" % (len(tg_promotions), p_cata), INFO)
        for link in tg_promotions:
          r = Request(link, self.parse_tg_promotion)
          self.log("url: %s, category: %s" % (r.url, p_cata), DEBUG)
          # Request.url is url encoded, it is the same as Response.url
          self._tg_promotion_category[r.url] = p_cata
          yield r

    def parse_tg_promotion(self, response):
      category = None
      if response.url in self._tg_promotion_category:
        category = self._tg_promotion_category[response.url]
        del self._tg_promotion_category[response.url]
        self.log("get promotion category %s for page %s" % (category, response.url), INFO)
      else:
        self.log("unknown promotion category for page %s" % response.url, ERROR)
      # parse big item icons in floor1
      org_item_links = response.xpath('//div[contains(@class, "item-status")]//a/@href').extract()
      # dedup the list
      item_links = []
      for link in org_item_links:
        if link not in item_links:
          item_links.append(link)
      self.log("get %s floor1 items in tuangou page %s" % (len(item_links), response.url), INFO)
      for l in item_links:
        if l not in self._item_urls_set:
          r = Request(l, self.scrap_tg_item)
          self._tg_req_counter = self._tg_req_counter + 1
          self._item_urls_set.add(r.url)
          if category != None:
            self._tg_category[r.url] = category
          yield r
      # parse small item icons
      data_urls = response.xpath('//div[contains(@class, "J_ItemList")]/@data-url').extract()
      if len(data_urls) == 0:
        data_urls = response.xpath('//div[contains(@data-ajaxurl, "http")]/@data-ajaxurl').extract()
      self.log("get %s data urls in page %s" % (len(data_urls), response.url), DEBUG)
      for l in data_urls:
        r = Request(l, self.parse_tg_data_page)
        if category != None:
          self._tg_promotion_category[r.url] = category
        yield r

    '''
      tg data page is a response of ajax
    '''
    def parse_tg_data_page(self, response):
      # get the category
      category = None
      if response.url in self._tg_promotion_category:
        category = self._tg_promotion_category[response.url]
        del self._tg_promotion_category[response.url]
        self.log("category: %s for page: %s" % (category, response.url), INFO)
      else:
        self.log("unknown category for page %s" % response.url, ERROR)
      # cut the header and tail of the respone
      # get the pure html part in the response
      b = response.body_as_unicode()
      start = b.find("<li")
      end = b.rfind("li>") + 3
      body = b[start : end]
      page_sel = Selector(text = body)
      org_item_links = page_sel.xpath('//div[contains(@class, "item-status")]//a/@href').extract()
      item_links = []
      for l in org_item_links:
        if l not in item_links:
          item_links.append(l)
      self.log("get %s items in tuangou data page %s" % (len(item_links), response.url), INFO)
      for l in item_links:
        if l not in self._item_urls_set:
          r = Request(l, self.scrap_tg_item)
          self._tg_req_counter = self._tg_req_counter + 1
          self._item_urls_set.add(l)
          if category != None:
            self._tg_category[r.url] = category
          yield r

    '''
      parse today new item page.
    '''
    def parse_today_item_first_page(self, response):
      reqs = self._scrap_item_requests(response)
      for r in reqs:
        l = r.url
        if l not in self._item_urls_set:
          self._normal_req_counter = self._normal_req_counter + 1
          self._item_urls_set.add(l)
          yield r
      max_page = self._scrap_max_page_id(response)
      p = 2 # start from page 2, because page 1 is scraped
      for p in range(2, max_page + 1):
        self.log("start to crawl today's page %s" % p, DEBUG)
        # just scrap the links from the page is OK
        yield Request(self.today_url_temp % p, self.scrap_item_links_in_page)

    '''
      This method scrap all the item links from the pages
      The page format is like home page, the pages including today new
      item page, old item pages. But for tuangou and point timeline
      page, should not use this method.
    '''
    def scrap_item_links_in_page(self, response):
      reqs = self._scrap_item_requests(response)
      for r in reqs:
        l = r.url
        if l not in self._item_urls_set:
          self._normal_req_counter = self._normal_req_counter + 1
          self._item_urls_set.add(l)
          yield r

    def _scrap_item_requests(self, response):
      # generally speaking, there are 32 rows item in one page.
      # thus, 96 item links
      requests = []
      item_links = response.xpath("//ul[@class='clearfix']/li[@class='item-small-v2']//a/@href").extract()
      self.log("get %s item links in page %s" % (len(item_links), response.url), INFO)
      for l in item_links:
        requests.append(Request(l, self.scrap_item_page))
      return requests

    def _scrap_max_page_id(self, response):
      max_id = -1
      page_index_blocks = response.xpath('//div[@class="pageli"]')
      if len(page_index_blocks) > 0:
        tmp_spans = page_index_blocks[0].xpath('.//span/text()').extract()
        if len(tmp_spans) > 0:
          l = len(tmp_spans)
          try:
            max_id = int(tmp_spans[l - 1])
          except ValueError as e:
            self.log("parse max page id fails. %s" % e.message, ERROR)
      else:
        self.log("Can not get any divs for page index in %s!" % response.url, ERROR)
      return max_id

    def parse_old_item_first_page(self, response):
      reqs = self._scrap_item_requests(response)
      for r in reqs:
        l = r.url
        if l not in self._item_urls_set:
          self._normal_req_counter = self._normal_req_counter + 1
          self._item_urls_set.add(l)
          yield r
      max_page = self._scrap_max_page_id(response)
      p = 2 # starting from page 2, page 1 is scrapped
      for p in range(2, max_page + 1):
        self.log("start to crawl old page %s" % p, DEBUG)
        # just scrap the links from the page is OK
        yield Request(self.old_url_temp % p, self.scrap_item_links_in_page)

    def scrap_point_timeline_page(self, response):
      # scrap the category of this page
      h = get_timeline_hour_from_url(response.url)
      cata = None
      if h in self._timeline_category:
        cata = self._timeline_category[h]
        self.log("category is %s, page is %s" % (cata, response.url), INFO)
      else:
        self.log("parse timeline page category fails. url:%s" % response.url, ERROR)

      item_links = response.xpath("//ul[@class='clearfix']/li[@class='item-small-v2']//a/@href").extract()
      self.log("get %s item links in timeline page %s" % (len(item_links), response.url), INFO)
      for l in item_links:
        if l not in self._item_urls_set:
          r = Request(l, self.scrap_point_timeline_item)
          self.log("start crawl timeline item %s" % l, DEBUG)
          self._timeline_req_counter = self._timeline_req_counter + 1
          self._item_urls_set.add(r.url)
          if cata != None:
            self._item_category[r.url] = cata
          yield r

    def scrap_point_timeline_item(self, response):
      item = self._scrap_item(response)
      item["is_zhengdian"] = True
      ret = self.get_sold_count(item)
      yield ret

    def scrap_item_page(self, response):
      item = self._scrap_item(response)
      ret = self.get_sold_count(item)
      yield ret

    def scrap_tg_item(self, response):
      item = self._scrap_item(response)
      item["is_pinpaituan"] = True
      if response.url in self._tg_category:
        item["category"] = self._tg_category[response.url]
        del self._tg_category[response.url]
      ret = self.get_sold_count(item)
      yield ret

    '''
      core logic for extract the information for one item
    '''
    def _scrap_item(self, response):
      item = JutaobaoProductItem()
      (pid, itemid) = get_id_and_itemid(response)
      if pid != None:
        item["id"] = pid
      if itemid != None:
        item["itemid"] = itemid
      name, brand = get_name_and_brand(response)
      item['name'] = name
      item['brand'] = brand
      item['original_price'] = get_original_price(response)
      item['discount_price'] = get_discount_price(response)
      discount = get_discount(response)
      # when the item is sold out, we could not scrap the discount
      # so, let's compute discount.
      if discount == 0 and item['original_price'] > 0:
        discount = item['discount_price'] / item['original_price']
      item['discount'] = discount
      category = get_category(response)
      # tuangou and point timeline item may have title information as category
      if category == "unknown":
        if response.url in self._item_category:
          category = self._item_category[response.url]
          del self._item_category[response.url]
        else:
          category = get_item_title(response)
      item['category'] = category
      self.log("new scrap item:%s" % item.to_str(), DEBUG)
      return item

    # parse sold count from ajax response
    def get_sold_count(self, item):
      if ("id" in item) and ("itemid" in item):
        # put the item into the cache
        self._item_cache[item["itemid"]] = item
        return Request(self.sold_count_ajax_url % (item["itemid"], item["id"]), self.parse_sold_count)
      else:
        self.log("id or itemid is not set yet. can not get sold count. item is %s" % item.to_str(), ERROR)
        # yield the item so that pipeline can handle it
        return item

    def parse_sold_count(self, response):
      (pid, itemid) = get_id_and_itemid(response)
      if itemid == None:
        self.log("itemid is None in parse_sold_count. check the response url: %s" % response.url, ERROR)
        return
      # sanity check
      if itemid not in self._item_cache:
        self.log("%s item is not in the cache. Please check the get_sold_count." % pid, ERROR)
        return
      # itemid is the cache key
      item = self._item_cache[itemid]
      del self._item_cache[itemid] # remove the item from the cache
      self.log("parse sold count for item %s" % item.to_str(), DEBUG)
      item["sales"] = get_sales(response)
      yield item


text:
package joshie.harvest.buildings.render;

import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import joshie.harvest.api.buildings.Building;
import joshie.harvest.buildings.BuildingHelper;
import joshie.harvest.buildings.HFBuildings;
import joshie.harvest.core.helpers.MCClientHelper;
import joshie.harvest.core.util.annotations.HFEvents;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.world.World;
import net.minecraftforge.client.event.RenderWorldLastEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.relauncher.Side;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;

@HFEvents(Side.CLIENT)
public class PreviewEvent {
    //Cache Values
    public static final Cache<BuildingKey, BuildingRenderer> CACHE = CacheBuilder.newBuilder().expireAfterWrite(5L, TimeUnit.MINUTES).maximumSize(64).build();
    private final BuildingVertexUploader vertexUploader = new BuildingVertexUploader();
    private static final float offset = 0.00390625F;
    private ItemStack held; //Cache the held itemstack
    private Building building; //Cache the building value

    private BuildingRenderer getRenderer(World world, EntityPlayerSP player) throws ExecutionException {
        if (player == null) return null;
        ItemStack stack = player.getHeldItemMainhand();
        if (isInvalidStack(stack)) {
            stack = player.getHeldItemOffhand();
        }

        if (isInvalidStack(stack)) return null;
        else {
            if (stack != held) {
                if (stack.getItem() == HFBuildings.BLUEPRINTS) building = HFBuildings.BLUEPRINTS.getObjectFromStack(stack);
                else building = HFBuildings.STRUCTURES.getObjectFromStack(stack);
                held = stack; //Cache the held item
            }

            //Attempt the raytrace
            RayTraceResult raytrace = BuildingHelper.rayTrace(player, 128, 0F);
            if (raytrace == null || raytrace.getBlockPos() == null) return null;
            else {
                BuildingKey key = BuildingHelper.getPositioning(stack, world, raytrace, building, player, false);
                if (key != null) {
                    return CACHE.get(key, () -> new BuildingRenderer(new BuildingAccess(building, key.getRotation()), key)).setPosition(key.getPos());
                }
            }
        }

        //All else fails return null
        return null;
    }

    private boolean isBuildingItem(ItemStack stack) {
        return stack.getItem() == HFBuildings.BLUEPRINTS || stack.getItem() == HFBuildings.STRUCTURES;
    }

    private boolean isInvalidStack(ItemStack stack) {
        return stack == null || stack.getItem() == null || !isBuildingItem(stack);
    }

    private void renderRenderer(EntityPlayerSP player, BuildingRenderer renderer, float partialTick) {
        BlockPos pos = renderer.getPos();
        GlStateManager.pushMatrix();
        double posX = player.prevPosX + (player.posX - player.prevPosX) * partialTick;
        double posY = player.prevPosY + (player.posY - player.prevPosY) * partialTick;
        double posZ = player.prevPosZ + (player.posZ - player.prevPosZ) * partialTick;
        GlStateManager.translate(-posX + offset, -posY + offset, -posZ + offset);
        GlStateManager.translate(pos.getX(), pos.getY(), pos.getZ());
        renderer.draw(vertexUploader);
        GlStateManager.translate(-pos.getX(), -pos.getY(), -pos.getZ());
        GlStateManager.translate(posX, posY, posZ);
        GlStateManager.popMatrix();
    }

    /** Borrowed from SettlerCraft by @InfinityRaider **/
    @SubscribeEvent
    public void renderBuildingPreview(RenderWorldLastEvent event) throws ExecutionException {
        EntityPlayerSP player = MCClientHelper.getPlayer();
        BuildingRenderer renderer = getRenderer(player.world, player);
        if (renderer != null) {
            renderRenderer(player, renderer, event.getPartialTicks());
        }
    }
}


text:
package org.cstamas.vertx.orientdb;

import io.vertx.core.AsyncResult;
import io.vertx.core.Closeable;
import io.vertx.core.Handler;

/**
 * Database.
 */
public interface Database<T, OT>
    extends Closeable
{
  /**
   * Returns the instance name.
   */
  String getName();

  /**
   * Executes handler with pooled connection.
   */
  T exec(Handler<AsyncResult<OT>> handler);
}


text:
<?php
namespace backend\widgets;

use yii\base\Widget;
use yii\helpers\Html;
use yii\helpers\ArrayHelper;
use yii\helpers\Url;
use yii\widgets\Menu;

class TreeMenuWidget extends Menu {

    public function init(){
        parent::init();
       // next init

    }

    /**
     * Recursively renders the menu items (without the container tag).
     * @param array $items the menu items to be rendered recursively
     * @return string the rendering result
     */
    protected function renderItems($items)
    {
        $n = count($items);
        $lines = [];
        foreach ($items as $i => $item) {
            $options = array_merge($this->itemOptions, ArrayHelper::getValue($item, 'options', []));
            $tag = ArrayHelper::remove($options, 'tag', 'li');
            $class = [];
            if ($item['active']) {
                $class[] = $this->activeCssClass;
            }
            if ($i === 0 && $this->firstItemCssClass !== null) {
                $class[] = $this->firstItemCssClass;
            }
            if ($i === $n - 1 && $this->lastItemCssClass !== null) {
                $class[] = $this->lastItemCssClass;
            }
            if (!empty($class)) {
                if (empty($options['class'])) {
                    $options['class'] = implode(' ', $class);
                } else {
                    $options['class'] .= ' ' . implode(' ', $class);
                }
            }

            $menu = $this->renderItem($item);
            if (!empty($item['items'])) {
                $submenuTemplate = ArrayHelper::getValue($item, 'submenuTemplate', $this->submenuTemplate);
                $menu .= strtr($submenuTemplate, [
                    '{items}' => $this->renderItems($item['items']),
                    '{level}' => (isset($item['level']))?$item['level']:'',
                ]);
            }
            if ($tag === false) {
                $lines[] = $menu;
            } else {
                $lines[] = Html::tag($tag, $menu, $options);
            }
        }

        return implode("\n", $lines);
    }

    protected function renderItem($item){
        if (isset($item['url'])) {
            $template = ArrayHelper::getValue($item, 'template', $this->linkTemplate);

            return strtr($template, [
                '{url}' => Html::encode(Url::to($item['url'])),
                '{label}' => $item['label'],
                '{label_prefix}' => $item['label_prefix'],
                '{label_postfix}' => $item['label_postfix'],
            ]);
        } else {
            $template = ArrayHelper::getValue($item, 'template', $this->labelTemplate);

            return strtr($template, [
                '{label}' => $item['label'],
                '{label_prefix}' => $item['label_prefix'],
                '{label_postfix}' => $item['label_postfix'],
            ]);
        }

    }
}
?>


text:
<!DOCTYPE html>

    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title></title>
    <link rel="Stylesheet" href="../css/analysis.css" />

Objecten koppelen

De taak Objecten samenvoegen werkt met twee lagen. Objecten samenvoegen voegt attributen samen op basis van ruimtelijke, tijdelijke en attribuutrelaties of een combinatie van de drie. De tool bepaalt alle invoerobjecten die voldoen aan alle gestelde samenvoegvoorwaarden en voegt de tweede invoerlaag samen met de eerste. U kunt eventueel alle objecten samenvoegen met de overeenkomende objecten of de overeenkomende objecten samenvatten.

Objecten samenvoegen kan worden toegepast op punten, lijnen, vlakken en tabellen. Een tijdelijke samevoeging vereist dat uw inputdata tijdingeschakeld is en een ruimtelijke samenvoeging vereist dat uw gegevens een geometrie hebben.

Doellaag kiezen

De laag waarvan de  attributen van de samenvoegingslaag aan de tabel ervan zullen worden toegevoegd.

Analyse d.m.v. de  In de buurt ruimtelijke relatie vereist een geprojecteerd coördinaatsysteem. U kunt het Processing coördinaatsysteem instellen bij Analysis Environments. Als uw processing coördinaatsysteem niet op een geprojecteerd coördinaatsysteem is ingesteld, zal u gevraagd worden het in te stellen wanneer u Analyse uitvoeren kiest.

Naast het kiezen van een laag van uw kaart, kunt u kiezen voor  Blader door lagen aan de onderkant van de drop-downlijst om in uw content te zoeken naar een groot gedeeld databestand of objectlaag.

Kies laag om  te koppelen aan de doellaag

De koppelingslaag met de attributen die zullen worden toegevoegd aan de doellaag.

Naast het kiezen van een laag van uw kaart, kunt u kiezen voor  Blader door lagen aan de onderkant van de drop-downlijst om in uw content te zoeken naar een groot gedeeld databestand of objectlaag.

Kies koppelingbewerking

Bepaalt hoe koppelingen tussen de doel- en koppelings-lagen worden behandeld in de uitvoer als meerdere gekoppelde objecten dezelfde relatie hebben als de laag die gekoppeld wordt. Er zijn twee samenvoegbewerkingen om uit te kiezen:

 Eén-aan-één koppelen—Deze optie vat alle overeenkomende objecten samen aan elk object dat wordt gekoppeld.

 Eén-aan-meerdere koppelen—Deze optie voegt alle overeenkomende objecten toe aan de koppelingslaag.

Stel bijvoorbeeld dat we supermarkten willen zoeken binnen 2 kilometer van een boerenmarkt. In dit geval heeft de laag om aan samen te voegen een enkel object, namelijk de boerenmarkt, en de samenvoegende objecten zijn plaatselijke supermarkten met attributen, zoals de totale jaarlijkse omzet. Met behulp van de tool  Objecten samenvoegen vinden we vijf supermarkten die aan de criteria voldoen. Als we een koppelingsbewerking kiezen voor Eén-aan-meerdere koppelen krijgen we vijf objecten in ons resultaat, elke rij vertegenwoordigt de boerenmarkt en een supermarkt. Als we een relatie Eén-aan-één kiezen, krijgen we één object dat de boerenmarkt vertegenwoordigt en de samengevatte informatie van de supermarkten, zoals het aantal (2), en andere statistieken, zoals de som van de jaarlijkse verkoop.

Selecteer een of meer koppelingen

U kunt één, twee of drie samenvoegtypes toepassen. De typen samenvoegingen omvatten het volgende:

 Ruimtelijk—Gebruikt een gespecificeerde ruimtelijke relatie om objecten te koppelen. Dit vereist dat beide lagen een geometrie hebben.

 Tijdelijk—Gebruikt een tijdelijke relatie om objecten samen te voegen. Hiervoor moet tijd zijn ingeschakeld op beide lagen.

 Attribuut—Voegt objecten samen op basis van gelijke velden.

Een ruimtelijke relatie kiezen

 De ruimtelijke relatie die bepaalt of objecten aan elkaar worden samengevoegd. De beschikbare relaties hangen af van het type geometrie (punt, polylijn, polygonen) die worden gebruikt als de invoerobjecten. De beschikbare relaties omvatten het volgende:

 Snijdt—Het object wordt gekoppeld als ze elkaar snijden.

 Gelijk aan—De objecten worden gekoppeld als ze dezelfde geometrie hebben.

 Near—De objecten worden gekoppeld als ze zich binnen een bepaalde afstand tot elkaar bevinden. De kaartlaag moet in een geprojecteerd coördinaatsysteem of de processing ruimtelijke referentie moet worden ingesteld op een geprojecteerd coördinaatsysteem met behulp van de Analysis Environments als een ruimtelijke Near relatie wordt gebruikt.

 Bevat—Deze objecten worden gekoppeld als de laag waaraan wordt samengevoegd is opgenomen in de samengevoegde objecten.

 Binnen—Deze objecten worden gekoppeld als de laag waaraan wordt samengevoegd binnen de samengevoegde objecten is.

 Raakt—De objecten worden gekoppeld als ze een grens hebben die het object raakt waaraan wordt samengevoegd.

 Kruist—De objecten worden gekoppeld als ze een kruisende omtrek hebben.

 Overlapt—De objecten worden gekoppeld als ze elkaar overlappen.

Deze afstand bepaalt de radius toegepast op een ruimtelijk nauwe relatie.

Stel dat u een dataset hebt die een kerncentrale vertegenwoordigt en een dataset die woningen vertegenwoordigt. U kunt een afstand in de buurt van 1 kilometer instellen om huizen te vinden binnen 1 kilometer van de kerncentrale.

Een tijdelijke relatie kiezen

De tijdelijke relatie die bepaalt of objecten aan elkaar worden samengevoegd. Deze optie is alleen beschikbaar als tijd is ingeschakeld op beide lagen en de beschikbare relaties zijn afhankelijk van het type tijd (direct of interval) dat wordt gebruikt voor de invoerobjecten. De beschikbare relaties omvatten het volgende:

 Tegenkomt—Het object wordt gekoppeld als het eerste object het tweede object tegenkomt.

 Tegengekomen door—Het object wordt gekoppeld als het eerste object het tweede object is tegengekomen.

 Overlapt—Het object wordt gekoppeld als het eerste object het tweede object overlapt.

 Overlapt door—Het object wordt gekoppeld als het eerste object wordt overlapt door tweede object.

 Tijdens—Het object wordt gekoppeld als het eerste object tijdens het tweede object is.

 Bevat—Het object wordt gekoppeld als het eerste object het tweede object bevat.

 Gelijk aan—Het object wordt gekoppeld als het eerste object gelijk is aan het tweede object.

 Eindigt—Het object wordt gekoppeld als het eerste object het tweede object eindigt.

 Beëindigd door—Het object wordt gekoppeld als het eerste object worden beëindigd door het tweede object.

 Start—Het object wordt gekoppeld als het eerste object het tweede object start.

 Gestart door—Het object wordt gekoppeld als het eerste object worden gestart door het tweede object.

 Snijdt—De objecten worden in kaart gebracht als de tijden elkaar snijden.

 In de buurt van—De objecten worden gekoppeld als ze in de buurt van elkaar zijn, bepaald door een gespecificeerde tijd.

Deze tijdelijke afstand bepaalt de tijdelijke radius toegepast op een tijdelijke nauwe relatie.

Stel u hebt een laag van bootongevallen en een laag van GPS-tracks voor een orkaan. Dan kunt u kijken naar bootongevallen binnen een bepaalde afstand van de orkaantracks in zowel de ruimte (1 kilometer) als de tijd (5 uur). Dit zou resulteren in bootongevallen gekoppeld aan orkanen die in ruimte en tijd dicht bij elkaar hebben plaatsgevonden.

De overeen te stemmen velden kiezen

Deze relatie koppelt waarden in een gebied van de ene laag met waarden in een veld in een andere laag.

Stel bijvoorbeeld dat we een gemeentebrede geografische laag hebben met woonadressen (met inbegrip van een veld  ZIP) en tabulaire dataset voor de gezondheidsdemografie op postcode (een veld met de naam HEALTHZIP). We kunnen de gezondheidsdataset dan koppelen aan de residentiële gegevens door het veld ZIP te koppelen aan HEALTHZIP, wat zal resulteren in een laag van woningen met de bijbehorende gezondheidsgegevens.

Statistieken toevoegen (optioneel)

Indien de koppeling bestaat uit   Eén aan één koppelen, kunt u de statistieken van uw gekoppelde objecten berekenen. Standaard worden alle statistieken berekend.

U kunt statistieken berekenen over objecten die zijn samengevat. Op numerieke velden kunt u het volgende berekenen:

Count—Berekent het aantal non-nulwaarden. Kan gebruikt worden op numerieke velden of strings. De telling van [nul, 0, 2] is 2.

Som—De som van numerieke waarden in een veld. De som van [nul, nul, 3] is 3.

Gemiddelde—Het gemiddelde van numerieke waarden. Het gemiddelde van [0, 2, nul] is 1.

Min—De minimumwaarde van een numeriek veld. Het minimum van [0, 2, nul] is 0.

Max—De maximumwaarde van een numeriek veld. De maximumwaarde van [0, 2, nul] is 2.

Bereik—Het bereik van een numeriek veld. Dit wordt berekend als de minimumwaarden afgetrokken van de maximumwaarde. Het bereik van [0, nul, 1] is 1. Het bereik van [nul, 4] is 0.

Variantie—De variantie van een numeriek veld in een track. De variantie van [1] is nul. De variantie van [null, 1,1,1] is 1.

Standaarddeviatie—De standaarddeviatie van een numeriek veld. De standaarddeviatie van [1] is nul. De standaarddeviatie van [null, 1,1,1] is 1.

Op stringvelden kunt u het volgende berekenen:

Telling—Het aantal non-nul strings.

Elke—Deze statistiek is een willekeurig voorbeeld van een stringwaarde in het gespecificeerde veld.

                Alle statistieken worden berekend op nonnull waarden. De resultaatlaag zal een nieuw veld bevatten voor elke statistiek die wordt berekend. Andere statistieken kunnen worden toegevoegd door een attribuut en statistiek te kiezen.

Alle statistieken worden berekend op nonnull waarden. De resultaatlaag zal een nieuw veld bevatten voor elke statistiek die wordt berekend. Andere statistieken kunnen worden toegevoegd door een attribuut en statistiek te kiezen.

Maak een expressie om objecten aan toe te voegen (optioneel)

Past een voorwaarde toe op bepaalde velden. Alleen objecten met velden die aan deze voorwaarden voldoen worden samengevoegd.

Stel bijvoorbeeld dat we een samenvoeging willen toepassen op een dataset voor alleen de objecten waarin  health_spending groter is dan 20 procent van het inkomen. Om dit te doen, past u een samenvoegvoorwaarde van target.health_spending> (join.income * .20) toe met behulp van het veld health_spending uit de eerste dataset (de dataset waaraan de objecten worden samengevoegd) en het veld inkomsten uit de tweede dataset (de dataset die wordt samengevoegd ).

Samenvoegvoorwaarden kunnen worden toegepast met behulp van de expressiecalculator.

Datastore kiezen

GeoAnalytische resultaten worden opgeslagen in een ArcGIS Data Store en weergegeven als een objectlaag in  Portal for ArcGIS. In de meeste gevallen moeten de resultaten worden opgeslagen in de spatiotemporele data-opslag en dit is de standaardinstelling. In sommige gevallen is het opslaan van de resultaten in de relationele data-opslag een goede optie. Hier volgen redenen waarom u resultaten zou willen opslaan in een relationele data-opslag:

Om uw resultaten te gebruiken voor portaalsamenwerking.

Om synchronisatiemogelijkheden met uw resultaten mogelijk te maken.

U moet geen gebruik maken van een relationele data-opslag als u verwacht dat uw GeoAnalytics-resultaten toenemen en u wilt profiteren van de mogelijkheden van de spatiotemporele big data-opslag om grote hoeveelheden gegevens te verwerken.

Resultaat laagnaam

 Dit is de naam van de kaartlaag die in Mijn Content wordt gemaakt en aan de kaart wordt toegevoegd.  De standaardnaam is gebaseerd op de toolnaam en de naam van de invoerlaag. Als de laag al bestaat, zal de tool falen.

Als u in de vervolgkeuzelijst  Resultaat opslaan gebruikt, kunt u de naam opgeven van een map in Mijn Content waarin het resultaat wordt opgeslagen.


text:
function sortTable(key) {
    //alert(key.value);
  var table, rows, switching, i, x, y, shouldSwitch;
  table = document.getElementById("tableProjekty");
  switching = true;
  /*Make a loop that will continue until
  no switching has been done:*/
  while (switching) {
    //start by saying: no switching is done:
    switching = false;
    rows = table.getElementsByTagName("TR");
    /*Loop through all table rows (except the
    first, which contains table headers):*/
    for (i = 1; i < (rows.length - 1); i++) {
      //start by saying there should be no switching:
      shouldSwitch = false;
      /*Get the two elements you want to compare,
      one from current row and one from the next:*/
      x = rows[i].getElementsByTagName("TD")[key.value];
      y = rows[i + 1].getElementsByTagName("TD")[key.value];
      //check if the two rows should switch place:
      if($.isNumeric(x.innerHTML) && $.isNumeric(y.innerHTML)){
        if (parseInt(x.innerHTML) > parseInt(y.innerHTML)) {
            //if so, mark as a switch and break the loop:
            shouldSwitch= true;
            break;
        }
      }
      else{
          //if (x.innerHTML.toLowerCase() > y.innerHTML.toLowerCase()) {// y.innerHTML.toLowerCase().localeCompare(x.innerHTML.toLowerCase(),'sk', { sensitivity: 'base' })<0
            //if so, mark as a switch and break the loop:
          if(new Intl.Collator("sk").compare(y.innerHTML.toLowerCase(),x.innerHTML.toLowerCase())<0){
            shouldSwitch= true;
            break;
          }
        }
    }
    if (shouldSwitch) {
      /*If a switch has been marked, make the switch
      and mark that a switch has been done:*/
      rows[i].parentNode.insertBefore(rows[i + 1], rows[i]);
      switching = true;
    }
  }
}
filterMeno='';
filterStud='';
function filtrTableStud(key) {
  var table, tr, td, i;
  //window.alert(key.value.toUpperCase());
  filterStud = key.value.toUpperCase();
  if(new String(filterStud).valueOf()==new String("SET").valueOf())
      filterStud="";
  if(new String(filterStud).valueOf()==new String("NASTAVIŤ").valueOf())
      filterStud="";
  table = document.getElementById("tableProjekty");
  tr = table.getElementsByTagName("tr");
  for (i = 0; i < tr.length; i++) {
    tdStud = tr[i].getElementsByTagName("td")[3];
    tdMeno = tr[i].getElementsByTagName("td")[2];
    if (tdStud && tdMeno) {
      if (tdStud.innerHTML.toUpperCase().indexOf(filterStud) > -1 && tdMeno.innerHTML.toUpperCase().indexOf(filterMeno) > -1) {
        tr[i].style.display = "";
      } else {
        tr[i].style.display = "none";
      }
    }
  }
}

function filtrTableMeno(key) {
    //window.alert(key.value.toUpperCase());
  var table, tr, td, i;
  filterMeno = key.value.toUpperCase();
  if(new String(filterMeno).valueOf()==new String("SET").valueOf())
      filterMeno="";
  if(new String(filterMeno).valueOf()==new String("NASTAVIŤ").valueOf())
      filterMeno="";
  table = document.getElementById("tableProjekty");
  tr = table.getElementsByTagName("tr");
  for (i = 0; i < tr.length; i++) {
    tdStud = tr[i].getElementsByTagName("td")[3];
    tdMeno = tr[i].getElementsByTagName("td")[2];
    if (tdStud && tdMeno) {
      if (tdStud.innerHTML.toUpperCase().indexOf(filterStud) > -1 && tdMeno.innerHTML.toUpperCase().indexOf(filterMeno) > -1) {
        tr[i].style.display = "";
      } else {
        tr[i].style.display = "none";
      }
    }
  }

}

$( "#studProg" ).replaceWith( $( "#filtrStud" ) );
$( "#menSkol" ).replaceWith( $( "#filtrSkol" ) );


text:
namespace lslboost { namespace mpl {

#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)

template< typename Node >
struct l_iter
{
    typedef aux::l_iter_tag tag;
    typedef forward_iterator_tag category;
};

template< typename Node >
struct deref< l_iter<Node> >
{
    typedef typename Node::item type;
};

template< typename Node >
struct next< l_iter<Node> >
{
    typedef l_iter< typename Node::next > type;
};

#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION

template< typename Node >
struct l_iter
{
    typedef aux::l_iter_tag tag;
    typedef forward_iterator_tag category;
    typedef typename Node::item type;
    typedef l_iter< typename mpl::next<Node>::type > next;
};

#endif

template<> struct l_iter<l_end>
{
    typedef aux::l_iter_tag tag;
    typedef forward_iterator_tag category;
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
    typedef na type;
    typedef l_iter next;
#endif
};

BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, l_iter)

}}

#endif // BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="search.css"/>

Loading...

  OutputStream

  OutputStream

  OutputStream

  OutputStream

  OutputStream

  OutputStream

  OutputStream

  OutputStream

  OutputStream

  OutputStream

  OutputStream

Searching...

No Matches


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

namespace WarHub.ArmouryModel.Source
{
    [WhamNodeCore]
    [XmlType("profile")]
    public sealed partial record ProfileCore : EntryBaseCore
    {
        [XmlAttribute("typeId")]
        public string? TypeId { get; init; }

        [XmlAttribute("typeName")]
        public string? TypeName { get; init; }

        [XmlArray("characteristics")]
        public ImmutableArray<CharacteristicCore> Characteristics { get; init; } = ImmutableArray<CharacteristicCore>.Empty;
    }
}


text:
package com.yeleman.culture_droid;

import android.nfc.Tag;
import android.util.Log;

import com.orm.SugarRecord;
import com.orm.dsl.Ignore;
import com.orm.query.Condition;
import com.orm.query.Select;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.StringTokenizer;

public class TagData extends SugarRecord {

    @Ignore
    private static final String TAG = Constants.getLogTag("TagData");

    private String name;

    public TagData() {
    }

    public TagData(String name) {
        this.name = name;
    }

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

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

    public void saveWithId() {
        this.setId(this.save());
    }

    public static TagData getByName(String tagName) {
        try {
            return Select.from(TagData.class).where(Condition.prop("name").eq(tagName)).first();
        } catch (Exception e) {
            return null;
        }
    }

    public static TagData createWith(String name) {
        TagData tag = new TagData();
        tag.setName(name);
        tag.saveWithId();
        return tag;
    }

    public static TagData getOrCreate(String tagName) {
        TagData tag;

        tag = TagData.getByName(tagName);
        if (tag == null) {
            tag = TagData.createWith(tagName);
        }
        return tag;
    }

    public static ArrayList<String> getListTags() {

        List<TagData> tagsList = Select.from(TagData.class).list();
        ArrayList<String> tagsListString = new ArrayList<String>();
        tagsListString.add("À propos");
        tagsListString.add("Tous les articles");

        for (TagData tag: tagsList){
            tagsListString.add(tag.getName());
        };
        return tagsListString;
    }

    public static Select<TagData> select() {
        return Select.from(TagData.class);
    }
}