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

class medical_pedia_m extends CI_Model{
    // list all medical
    public function list_pedia_m(){
        $query = $this->db->get('medical_pedia');

        if($query->num_rows()> 0){
            return $query->result();
        }else{
            return false;
        }
    }
    // list all medical END

    // get case of resident ID
    public function get_res_pedia_case($rid){

        $this->db->where('res_id', $rid);
        $query = $this->db->get('medical_pedia');

        if($query->num_rows()> 0){
            return $query->result();
        }else{
            return false;
        }
    }
    // get case of resident ID END

    // add new medical pedia
    public function add_pedia_m(){

        $immunsFull = implode(', ', $this->input->post('Immunization[]'));

        $form_fields = array(
            'pf_idnumber' =>trim(stripslashes($this->input->post('CaseIDNum'))),
            'res_id' =>trim(stripslashes($this->input->post('ResID'))),
            'pf_date' =>trim(stripslashes($this->input->post('ConsultationDate'))),
            'pf_time' =>trim(stripslashes($this->input->post('ConsultationTime'))),
            'pf_nutritional_status' =>trim(stripslashes($this->input->post('NutritionalStatus'))),
            'pf_birth_history' =>trim(stripslashes($this->input->post('BirthHistory'))),
            'pf_feeding_history' =>trim(stripslashes($this->input->post('FeedingHistory'))),
            'pf_immunization' =>trim(stripslashes($immunsFull)),
            'pf_cardiac_rate' =>trim(stripslashes($this->input->post('CardiacRate'))),
            'pf_respiratory_rate' =>trim(stripslashes($this->input->post('RespiratoryRate'))),
            'pf_temperature' =>trim(stripslashes($this->input->post('Temperature'))),
            'pf_heredofamilial_desease' =>trim(stripslashes($this->input->post('HeredofamilialDesease'))),
            'pf_allergies' =>trim(stripslashes($this->input->post('Allergies'))),
            'pf_complaints' =>trim(stripslashes($this->input->post('Complaints'))),
            'pf_physical_examinations' =>trim(stripslashes($this->input->post('PhysicalExaminations'))),
            'pf_diagnosis_treatment' =>trim(stripslashes($this->input->post('DiagnosisTreatment'))),
            'pf_healthcare_provider' =>ucwords(strtolower(trim(stripslashes($this->input->post('HealthCareProvider'))))),
            'pf_created' =>globTimeNow
        );
        $this->db->insert('medical_pedia', $form_fields);
    }
    // add new medical pedia END

    // get pedia case
    public function get_pedia_case($cid){

        $this->db->where('pf_id', $cid);
        $query = $this->db->get('medical_pedia');

        if($query->num_rows()> 0){
            return $query->result();
        }else{
            return false;
        }
    }
    // get pedia case END

    // edit medical
    public function edit_pedia_m(){
        $pediaid = $this->input->post('pediaID');
        $immunsFull = implode(', ', $this->input->post('Immunization[]'));

        $form_fields = array(
            'pf_date' =>trim(stripslashes($this->input->post('ConsultationDate'))),
            'pf_time' =>trim(stripslashes($this->input->post('ConsultationTime'))),
            'pf_nutritional_status' =>trim(stripslashes($this->input->post('NutritionalStatus'))),
            'pf_birth_history' =>trim(stripslashes($this->input->post('BirthHistory'))),
            'pf_feeding_history' =>trim(stripslashes($this->input->post('FeedingHistory'))),
            'pf_immunization' =>trim(stripslashes($immunsFull)),
            'pf_cardiac_rate' =>trim(stripslashes($this->input->post('CardiacRate'))),
            'pf_respiratory_rate' =>trim(stripslashes($this->input->post('RespiratoryRate'))),
            'pf_temperature' =>trim(stripslashes($this->input->post('Temperature'))),
            'pf_heredofamilial_desease' =>trim(stripslashes($this->input->post('HeredofamilialDesease'))),
            'pf_allergies' =>trim(stripslashes($this->input->post('Allergies'))),
            'pf_complaints' =>trim(stripslashes($this->input->post('Complaints'))),
            'pf_physical_examinations' =>trim(stripslashes($this->input->post('PhysicalExaminations'))),
            'pf_diagnosis_treatment' =>trim(stripslashes($this->input->post('DiagnosisTreatment'))),
            'pf_healthcare_provider' =>ucwords(strtolower(trim(stripslashes($this->input->post('HealthCareProvider')))))
        );

        $this->db->where('pf_id', $pediaid);
        $query = $this->db->update('medical_pedia', $form_fields);

        if($query){
            return true;
        }else{
            return false;
        }
    }
    // edit medical ID
    // delete medical
    public function delete_pedia_m($cid){
        $this->db->where('pf_id', $cid);
        $this->db->delete('medical_pedia');
        if($this->db->affected_rows() > 0){
            return true;
        }else{
            return false;
        }
    }
    // delete medical END

}


text:
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { ListWorkflowsComponent } from '../../workflows/list/list.component';
import { PublishedWorkflowsDataSource } from '../../workflows/list/published-workflows.datasource';
import { EntryModule } from '../entry/entry.module';
import { PipeModule } from '../pipe/pipe.module';
import { HeaderModule } from './header.module';
import { CustomMaterialModule } from './material.module';

@NgModule({
  declarations: [ListWorkflowsComponent],
  imports: [CommonModule, RouterModule, HeaderModule, CustomMaterialModule, EntryModule, PipeModule],
  providers: [PublishedWorkflowsDataSource],
  exports: [ListWorkflowsComponent],
})
export class ListWorkflowsModule {}

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="cda.xsl"?>

<ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:voc="urn:hl7-org:v3/voc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">

	<realmCode code="US"/>
	<typeId root="2.16.840.1.113883.1.3" extension="POCD_HD000040"/>

	<templateId root="2.16.840.1.113883.10.20.14"/>

	<id root="88414c01-715a-45bb-83bb-db7ac860fe9d"/>

	<title>What is the percentage of all patients aged 18 and older with a diagnosis of heart failure and paroxysmal or chronic atrial fibrillation who were prescribed warfarin therapy?</title>

	<effectiveTime value="20120301"/>
	<confidentialityCode codeSystem="2.16.840.1.113883.5.25" code="N"/>
	<languageCode code="en-US"/>

	<recordTarget>
		<patientRole>
			<id nullFlavor="NA"/>
		</patientRole>
	</recordTarget>

	<author>
		<time value="20120301"/>
		<assignedAuthor>
			<id nullFlavor="NA"/>
			<representedOrganization>
				<id root="2.16.840.1.113883.19.598"/>
				<name>Query Health Information Source</name>
			</representedOrganization>
		</assignedAuthor>
	</author>

	<informant>
		<assignedEntity>
			<id nullFlavor="NA"/>
			<representedOrganization>
				<id root="2.16.840.1.113883.19.5"/>
				<name>Query Health Information Source</name>
			</representedOrganization>
		</assignedEntity>
	</informant>

	<custodian>
		<assignedCustodian>
			<representedCustodianOrganization>
				<id root="2.16.840.1.113883.19.5"/>
				<name>Query Health Information Source</name>
			</representedCustodianOrganization>
		</assignedCustodian>
	</custodian>

	<legalAuthenticator>
		<time value="20120301"/>
		<signatureCode code="S"/>
		<assignedEntity>
			<id nullFlavor="NA"/>
			<representedOrganization>
				<id root="2.16.840.1.113883.19.5"/>
				<name>Query Health Information Source</name>
			</representedOrganization>
		</assignedEntity>
	</legalAuthenticator>

	<component>
		<structuredBody>

<component>

	<title>Parameters for NQF84 Measure</title>
	<text>
		<list>
			<item>Reporting period: 01 Jan 2012 - 31 Dec 2012</item>
		</list>
	</text>
	<entry>
		<act classCode="ACT" moodCode="EVN">
			<id root="55a43e20-6463-46eb-81c3-9a3a1ad41225"/>

			<effectiveTime>
				<low value="20110101"/>
				<high value="20111231"/>
			</effectiveTime>

			</act>
	</entry>

</component>

<component>

	<templateId root="QRDA-MEASURE-Warfarin-control-OID"/>

	<title>Measure Section: Warfarin Therapy(NQF 0084)</title>
	<text>
		<paragraph>
			<content styleCode="Bold">Description: </content>

		</paragraph>

Provider	Location	Initial Patient Population	Denominator	Denominator Exclusions	Numerator

Jones	Information Source	64	33	3	28

Smith	Information Source	52	28	0	24

	</text>
	<entry typeCode="DRIV">
		<act classCode="ACT" moodCode="EVN">

			<text>What is the percentage of all patients aged 18 and older with a diagnosis of heart failure and paroxysmal or chronic atrial fibrillation who were prescribed warfarin therapy?</text>
			<statusCode code="completed"/>
			<performer>
				<assignedEntity>
					<id extension="00017" root="2.16.840.1.113883.19.5"/>
					<assignedPerson>
						<name>
							<given>Robert</given>
							<family>Jones</family>
							<suffix>MD</suffix>
						</name>
					</assignedPerson>
				</assignedEntity>
			</performer>
			<participant typeCode="LOC">
				<templateId root="2.16.840.1.113883.5.90"/>
				<participantRole classCode="SDLOC">
					<playingEntity classCode="PLC">
						<name>Information Source</name>
					</playingEntity>
				</participantRole>
			</participant>
			<entryRelationship typeCode="REFR">
				<act classCode="ACT" moodCode="EVN">
					<id root="55a43e20-6463-46eb-81c3-9a3a1ad41225"/>

				</act>
			</entryRelationship>
			<entryRelationship typeCode="COMP">
				<observation classCode="OBS" moodCode="EVN">
					<id root="82a2d9e8-37f1-4ace-95ea-860c8501c761"/>

					<statusCode code="completed"/>
					<value xsi:type="INT" value="141"/>
				</observation>
			</entryRelationship>
			<entryRelationship typeCode="COMP">
				<observation classCode="OBS" moodCode="EVN">
					<id root="8ff2afce-b92f-4171-970f-abb11f937b25"/>

					<statusCode code="completed"/>
					<value xsi:type="INT" value="67"/>
				</observation>
			</entryRelationship>
			<entryRelationship typeCode="COMP">
				<observation classCode="OBS" moodCode="EVN">
					<id root="0ccddc70-3da3-4565-a4e9-4fc5af3c301b"/>

					<statusCode code="completed"/>
					<value xsi:type="INT" value="3"/>
				</observation>
			</entryRelationship>
			<entryRelationship typeCode="COMP">
				<observation classCode="OBS" moodCode="EVN">
					<id root="82a2d9e8-37f1-4ace-95ea-860c2601c761"/>

					<statusCode code="completed"/>
					<value xsi:type="INT" value="28"/>
				</observation>
			</entryRelationship>
		</act>
	</entry>
	<entry typeCode="DRIV">
		<act classCode="ACT" moodCode="EVN">
			<templateId root="QRDA-MEASURE-DATA-ACT"/>

			<text>What is the percentage of all patients aged 18 and older with a diagnosis of heart failure and paroxysmal or chronic atrial fibrillation who were prescribed warfarin therapy?</text>
			<statusCode code="completed"/>
			<performer>
				<assignedEntity>
					<id extension="00018" root="2.16.840.1.113883.19.5"/>
					<assignedPerson>
						<name>
							<given>Robert</given>
							<family>Smith</family>
							<suffix>MD</suffix>
						</name>
					</assignedPerson>
				</assignedEntity>
			</performer>
			<participant typeCode="LOC">
				<templateId root="2.16.840.1.113883.5.90"/>
				<participantRole classCode="SDLOC">
					<playingEntity classCode="PLC">
						<name>Good Health Clinic</name>
					</playingEntity>
				</participantRole>
			</participant>
			<entryRelationship typeCode="REFR">
				<act classCode="ACT" moodCode="EVN">
					<id root="55a43e20-6463-46eb-81c3-9a3a1ad41225"/>

				</act>
			</entryRelationship>
			<entryRelationship typeCode="COMP">
				<observation classCode="OBS" moodCode="EVN">
					<id root="82a2d9e8-37f1-4ace-95ea-860c2301c761"/>

					<statusCode code="completed"/>
					<value xsi:type="INT" value="52"/>
				</observation>
			</entryRelationship>
			<entryRelationship typeCode="COMP">
				<observation classCode="OBS" moodCode="EVN">
					<id root="28b49b7f-5764-4a6f-b32f-0d8112d61867"/>

					<statusCode code="completed"/>
					<value xsi:type="INT" value="28"/>
				</observation>
			</entryRelationship>
			<entryRelationship typeCode="COMP">
				<observation classCode="OBS" moodCode="EVN">
					<id root="1c8efc6e-af2f-4c4f-be04-84fe1417eea7"/>

					<statusCode code="completed"/>
					<value xsi:type="INT" value="0"/>
				</observation>
			</entryRelationship>
			<entryRelationship typeCode="COMP">
				<observation classCode="OBS" moodCode="EVN">
					<id root="96a38d04-2afa-490b-b233-97d566e35d7c"/>

					<statusCode code="completed"/>
					<value xsi:type="INT" value="24"/>
				</observation>
			</entryRelationship>
		</act>
	</entry>

</component>
</structuredBody>
</component>
</ClinicalDocument>


text:
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved.                             */
/* Open Source Software - may be modified and shared by FRC teams. The code   */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project.                                                               */
/*----------------------------------------------------------------------------*/

package org.carobotics.main;

import edu.wpi.first.wpilibj.IterativeRobot;
import org.carobotics.hardware.Joystick;
import org.carobotics.logic.TankDriveMappingThread;
import org.carobotics.logic.ThreadManager;
import org.carobotics.subsystems.DriverStation;
import org.carobotics.subsystems.TankDriveBase;

/**
 * The VM is configured to automatically run this class, and to call the
 * functions corresponding to each mode, as described in the IterativeRobot
 * documentation. If you change the name of this class or the package after
 * creating this project, you must also update the manifest file in the resource
 * directory.
 */
public class Robot2013DriveOnly extends IterativeRobot {
     // Robot Systems (stuff from org.carobotics.subsystems)
    TankDriveBase driveBase;
    DriverStation driverStation;

    // Thread Manager
    ThreadManager threadManager = new ThreadManager();
    // Logic Threads (stuff from org.carobotics.logic)
    TankDriveMappingThread driveThread;

    /**
     * This function is run when the robot is first started up and should be
     * used for any initialization code.
     */
    public void robotInit() {

        System.out.println("\n");
        System.out.println("//////////////////////////////////////////////////////");
        System.out.println("// Cavalier Robotics                     TEAM 619   //");
        System.out.println("// 2013 Drive Only                                  //");
        System.out.println("//////////////////////////////////////////////////////\n");

        // Create all robot subsystems (i.e. stuff from org.carobotics.subsystems)
        // If you are creating something not from org.carobotics.subsystems, YER DOING IT WRONG
        driveBase = new TankDriveBase(6, 7);
        driverStation = new DriverStation(1, 2);

        driverStation.getRightJoystick().setReversed(Joystick.Axis.AXIS_Y, true);
    }

    public void autonomousInit() {
        threadManager.killAllThreads(); // DO NOT REMOVE!!!
    }

    /**
     * This function is called periodically during autonomous
     */
    public void autonomousPeriodic() {
    }

    public void teleopInit() {
        threadManager.killAllThreads(); // DO NOT REMOVE!!!

        driveThread = new TankDriveMappingThread(driveBase, driverStation, 10, threadManager);
        driveThread.start();

    }

    public void teleopPeriodic(){
    }

    public void teleopContinuous() {
    }

    public void disabledInit() {
        threadManager.killAllThreads(); // DO NOT REMOVE!!!
    }

    public void disabledPeriodic(){
    }

    public void disabledContinuous(){
    }
}


text:
package org.apache.solr.explorer.client.util;

import com.google.gwt.i18n.client.DateTimeFormat;

import java.util.*;

/**
 * @author Uri Boness
 */
public class SolrDateUtils {

    private final static DateTimeFormat[] DATE_FORMATS = new DateTimeFormat[]{
            DateTimeFormat.getFormat("yyyy-MM-dd'T'HH:mm:ss.sss'Z'"),
            DateTimeFormat.getFormat("yyyy-MM-dd'T'HH:mm:ss'Z'")
    };

    public static Date parse(String solrDateString) {
        for (DateTimeFormat format : DATE_FORMATS) {
            try {
                return format.parse(solrDateString);
            } catch (IllegalArgumentException iae) {
                // do nothing
            }
        }
        throw new IllegalArgumentException("Could not parse '" + solrDateString + "' as date");
    }

    public static String format(Date date) {
        return DATE_FORMATS[0].format(date);
    }

}


text:
package Model;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;

import net.sf.json.JSONObject;

import org.json.JSONException;

import Jiemian.IDseacher;
import Jiemian.IDsearch;
import Jiemian.denlu;

public class Send implements Runnable{
	String PAMValue;
	String TargetGenomeValue;
	String IDValue;
	String PositionValue;
	String Value1;
	double r1;
	int postStatus=3,ntlength;//0_signup,1_login,2_history
	String lines,rfcStr,regionStr;
	String name,pswd,email;
	public String key="361610445ee59220d3463620ee42fa1a";
	static StringBuffer ID;
	StringBuffer value=new StringBuffer();
	StringBuffer value_MoreInfo=new StringBuffer();
	String blast="CCACATGCCAT";
	static File file;
	static String note,IDStr;
	static String filename;
	static JSONObject fliesImport;
	public String result_URL="http://i.uestc.edu.cn/iGEM2014/getResult.php";
	public String GET_URL="http://i.uestc.edu.cn/iGEM2014/getMain.php?";
	public String signup_URL=" http://i.uestc.edu.cn/iGEM2014/login/signup.php";
	public String login_url="http://i.uestc.edu.cn/iGEM2014/login/";
	public String getHistory_url="http://i.uestc.edu.cn/iGEM2014/getHistory.php";
	public String upload_url="http://i.uestc.edu.cn/iGEM2014/upload/";
	public String checkfile_URL="http://i.uestc.edu.cn/iGEM2014/upload/import.php";
	public String importfile_URL="http://i.uestc.edu.cn/iGEM2014/upload/import.php";
	public String Viewmyfiles_URL="http://i.uestc.edu.cn/iGEM2014/upload/viewmyfiles.php";
	public String Viewmysp_URL="http://i.uestc.edu.cn/iGEM2014/upload/viewmyspecies.php";
	public String MoreInfo_URL="http://i.uestc.edu.cn/iGEM2014/getMoreInfo.php?";
	public String MoreInfoimg_URL="http://i.uestc.edu.cn/iGEM2014/RNAFold/";

    	public Send(String TargetGenomeValue,String PAMValue,String IDValue,String PositionValue, String rfcStr,String regeion,int ntlength,double r1ralue) {
		    this.TargetGenomeValue = TargetGenomeValue;
		    this.PAMValue=PAMValue;
		    this.IDValue=IDValue;
		    this.PositionValue=PositionValue;
		    this.rfcStr=rfcStr;
		    this.regionStr=regeion;
		    this.ntlength=ntlength;
		    this.r1=r1ralue;
    	}
    	public Send() {

		}
    	public String Send(String name,String pswd){
    		this.name=name;
    		this.pswd=pswd;
    		postStatus=1;
    		SendPost(login_url,name,pswd,"");
    		key=value.toString();
    		System.out.println(key);
			return value.toString();
    	}
    	public Send(String ID){
    		this.IDValue=ID;
    	}
    	public int uploadFile(File file,String note,String filename){
    		this.file=file;
    		String ll=this.file.getName();
    		this.filename=filename;
    		this.note=note;
//    		new Send(4);
			return 1;
    	}
    	public void IDseacher(String IDStr){
    		this.IDStr=IDStr;
    	}
    	public int importFile(JSONObject fliesImport){
    		this.fliesImport=fliesImport;
    		System.out.print(fliesImport.toString());
			return 1;
    	}
    	public  Send(int postStatus) throws JSONException{
    		this.postStatus=postStatus;
    		if(postStatus==0){
		    	SendPost(signup_URL,name,pswd,email);
		    }else if(postStatus==1){
		    }else if(postStatus==2){
		    	StringBuffer history=SendPost(getHistory_url,key,"","");
		    	new AnalyzeHistory().historyAnalyze(history.toString());
		    }else if(postStatus==3){
		    	StringBuffer kk=SendPost(result_URL,"", "", "");;
		    	new Analyze(kk);
		    }else if(postStatus==4){
		    	SendPost(upload_url,name,pswd,email);
		    	if(value.equals("N2")){
		    		javax.swing.JOptionPane.showMessageDialog(null,filename+"Upload failed");
		    	}else{
		    		javax.swing.JOptionPane.showMessageDialog(null,filename+"Uploaded successfully");
		    	}
		    }else if(postStatus==5){
		    	SendPost(importfile_URL,fliesImport.toString(),"","");
		    }else if(postStatus==6){
		    	StringBuffer files=SendPost(Viewmyfiles_URL,name,"","");
		    	new AnalyzeUserFiles().Analyze(files.toString());
		    }else if(postStatus==7){
		    	StringBuffer sp=SendPost(Viewmysp_URL,name,"","");
		    	new AnalyzeUserspce().Analyze(sp.toString());
		    }
    	}
		public  void SendGet() throws IOException{
    		String getURL = GET_URL + "type=1"+"&pam="+PAMValue+"&specie=" + TargetGenomeValue+"&location="+IDValue+"&gene="+PositionValue+"&rfc="+rfcStr+"&region="+regionStr+"&length="+ntlength+"&r1="+r1+"&token="+key;
    		URL getUrl = new URL(getURL);
    		System.out.print(getURL);
    		 HttpURLConnection connection = (HttpURLConnection) getUrl.openConnection();
    		 connection.connect();
    		 connection.setConnectTimeout(100000);
    		 InputStreamReader reade=new InputStreamReader(connection.getInputStream(),"utf-8");
    		 ID=new StringBuffer();
    		 for(int i=0;i<20;i++){
    		 int kk=reade.read();
    		 if((char)kk=='Q'){
//    			 char line=(char)kk;
//    			 value.append(line);
    			break;
    		 }
    		 char line=(char)kk;
			 ID.append(line);
    		 }
    		 IDStr=ID.toString();
//    		 System.out.println(value);
    		 new IDsearch(IDStr);
    		 new IDsearch();
//    		 SendPost(result_URL,ID.toString(), "", "");
    		 BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream(),"utf-8"));
//    		    while ((lines = reader.readLine()) !=null){
//    	        	lines = new String(lines.getBytes(), "utf-8");
//    	        	value.append(lines);
//    	            System.out.println(lines);
//    	            System.out.println(value);
//    	        }
//    	        reader.close();
    	        connection.disconnect();
    	}
		public String sendgetM(String sequenceStr) throws IOException{
			String sequence= MoreInfo_URL +"sequence="+sequenceStr;
			System.out.println(sequence);
			URL getUrl = new URL(sequence);
			HttpURLConnection connection = (HttpURLConnection) getUrl.openConnection();
   		 	connection.connect();
   		 	connection.setConnectTimeout(100000);
   		 	BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream(),"utf-8"));
		    while ((lines = reader.readLine()) !=null){
		    	lines = new String(lines.getBytes(), "utf-8");
		    	value_MoreInfo.append(lines);
		    	System.out.println(value_MoreInfo);
		    }
		    reader.close();
		    connection.disconnect();
			return value_MoreInfo.toString();

		}
		public  StringBuffer SendPost(String sUrl,String name,String pswd,String email){

			try{
				if(sUrl==null||sUrl.trim().equals("")){
					System.out.print("URLµØÖ·ÎÞЧ");
				}
				URL url=new URL(sUrl);
				HttpURLConnection link=(HttpURLConnection) url.openConnection();
				link.setRequestMethod("POST");
				link.setDoOutput(true);
				link.setDoInput(true);
				link.setConnectTimeout(100000);
				OutputStream Data=link.getOutputStream();
				OutputStreamWriter inputData=new OutputStreamWriter(Data,"utf-8");
				if(postStatus==0){
					inputData.write("myhistory=TTEE&pswd=12345&email=23111");
				}else if(postStatus==1){
					inputData.write("myhistory="+name+"&pswd="+pswd);
				}else if(postStatus==2){
					inputData.write("token="+name);
				}else if (postStatus==3){
					inputData.write("id="+IDStr);
//					System.out.println(ID);
				}else if (postStatus==4){
					StringBuffer flieStr = new StringBuffer();
					FileInputStream geneFile=new FileInputStream(file);
					int aa;
					aa=geneFile.read();
					while(aa!=-1){
						aa=geneFile.read();
						flieStr.append((char)aa);
					}
					inputData.write("token="+key+"&file="+flieStr.toString()+"&note="+note+"&filename="+filename);

				}else if(postStatus==5){
					inputData.write("token="+key+"&command="+name);
				}else if(postStatus==6){
					inputData.write("token="+key);
				}else if(postStatus==7){
					inputData.write("token="+key);
				}
//				System.out.println(inputData.toString());
				inputData.flush();
				inputData.close();
				Data.close();
				InputStream in=link.getInputStream();
				BufferedReader reader = new BufferedReader(new InputStreamReader(link.getInputStream(),"utf-8"));
    		    while ((lines = reader.readLine()) != null){
    	        	lines = new String(lines.getBytes(), "utf-8");
    	        	value.append(lines);
//    	            System.out.println(lines);

    	            System.out.println(value);
    	        }
				in.close();
				link.disconnect();
				if(postStatus==1){
					if(value.toString().equals("-")){
						key="0";
					}else{
						key=value.toString();
					}
				}
			}catch(Exception e){
				e.printStackTrace();
			}
			return value;
		}
		@Override
		public void run() {
			try {
				SendGet();
			} catch (IOException e) {
				e.printStackTrace();
			}

		}

}


text:
title: "'Avengers: Infinity War' Trailer"
date: 2017-11-29 13:27:00 -06:00
tags:
- movies
- Marvel
custom_type: post
---

*Infinity War* is by far the darkest trailer I've seen Marvel put out. You can tell the Avengers get their butts kicked big time by Thanos. He looks huge, powerful, and Josh Brolin's modified voice is perfectly intimidating.

*Avengers: Infinity War* debuts on May 4th, 2018.


text:
'use strict';

var should = require('chai').should(); // eslint-disable-line
var moment = require('moment');

var PERMALINK = ':year/:month/:day/:title/';

describe('post_permalink', function() {
  var Hexo = require('../../../lib/hexo');
  var hexo = new Hexo();
  var postPermalink = require('../../../lib/plugins/filter/post_permalink').bind(hexo);
  var Post = hexo.model('Post');
  var post;

  hexo.config.permalink = PERMALINK;

  before(function() {
    var id;

    return hexo.init().then(function() {
      return Post.insert({
        source: 'foo.md',
        slug: 'foo',
        date: moment('2014-01-02')
      });
    }).then(function(post) {
      id = post._id;
      return post.setCategories(['foo', 'bar']);
    }).then(function() {
      post = Post.findById(id);
    });
  });

  it('default', function() {
    postPermalink(post).should.eql('2014/01/02/foo/');
  });

  it('categories', function() {
    hexo.config.permalink = ':category/:title/';
    postPermalink(post).should.eql('foo/bar/foo/');
    hexo.config.permalink = PERMALINK;
  });

  it('uncategorized', function() {
    hexo.config.permalink = ':category/:title/';

    return Post.insert({
      source: 'bar.md',
      slug: 'bar'
    }).then(function(post) {
      postPermalink(post).should.eql(hexo.config.default_category + '/bar/');
      hexo.config.permalink = PERMALINK;
      return Post.removeById(post._id);
    });
  });

  it('extra data', function() {
    hexo.config.permalink = ':layout/:title/';
    postPermalink(post).should.eql(post.layout + '/foo/');
    hexo.config.permalink = PERMALINK;
  });

  it('id', function() {
    hexo.config.permalink = ':id';

    postPermalink(post).should.eql(post._id);

    post.id = 1;
    postPermalink(post).should.eql('1');

    hexo.config.permalink = PERMALINK;
  });

  it('name', function() {
    hexo.config.permalink = ':title/:name';

    return Post.insert({
      source: 'sub/bar.md',
      slug: 'sub/bar'
    }).then(function(post) {
      postPermalink(post).should.eql('sub/bar/bar');
      hexo.config.permalink = PERMALINK;
      return Post.removeById(post._id);
    });
  });

  it('post_title', function() {
    hexo.config.permalink = ':year/:month/:day/:post_title/';

    return Post.insert({
      source: 'sub/2015-05-06-my-new-post.md',
      slug: '2015-05-06-my-new-post',
      title: 'My New Post',
      date: moment('2015-05-06')
    }).then(function(post) {
      postPermalink(post).should.eql('2015/05/06/my-new-post/');
      hexo.config.permalink = PERMALINK;
      return Post.removeById(post._id);
    });
  });
});


text:
/* global assert, process, setup, suite, test, Event */
var entityFactory = require('../helpers').entityFactory;

suite('oculus-touch-controls', function () {
  var el;
  var component;

  setup(function (done) {
    el = this.el = entityFactory();
    el.setAttribute('oculus-touch-controls', '');
    el.addEventListener('loaded', function () {
      component = el.components['oculus-touch-controls'];
      component.controllersWhenPresent = [
        {id: 'Oculus Touch', index: 0, hand: 'left', pose: {}}
      ];
      done();
    });
  });

  suite('checkIfControllerPresent', function () {
    test('removes event listeners if controllers not present', function () {
      var addEventListenersSpy = this.sinon.spy(component, 'addEventListeners');
      var injectTrackedControlsSpy = this.sinon.spy(component, 'injectTrackedControls');
      var removeEventListenersSpy = this.sinon.spy(component, 'removeEventListeners');

      // Mock has not been checked previously.
      delete component.controllerPresent;

      component.checkIfControllerPresent();

      assert.notOk(injectTrackedControlsSpy.called);
      assert.notOk(addEventListenersSpy.called);
      assert.ok(removeEventListenersSpy.called);
      assert.strictEqual(component.controllerPresent, false);
    });

    test('does not call removeEventListeners multiple times', function () {
      var addEventListenersSpy = this.sinon.spy(component, 'addEventListeners');
      var injectTrackedControlsSpy = this.sinon.spy(component, 'injectTrackedControls');
      var removeEventListenersSpy = this.sinon.spy(component, 'removeEventListeners');

      // Mock that it's been checked previously.
      component.controllerPresent = false;

      component.checkIfControllerPresent();

      assert.notOk(injectTrackedControlsSpy.called);
      assert.notOk(addEventListenersSpy.called);
      assert.notOk(removeEventListenersSpy.called);
      assert.strictEqual(component.controllerPresent, false);
    });

    test('attach events if controller is newly present', function () {
      var addEventListenersSpy = this.sinon.spy(component, 'addEventListeners');
      var injectTrackedControlsSpy = this.sinon.spy(component, 'injectTrackedControls');
      var removeEventListenersSpy = this.sinon.spy(component, 'removeEventListeners');

      // Mock isControllerPresent to return true.
      el.sceneEl.systems['tracked-controls'].controllers = component.controllersWhenPresent;

      // Mock that it's never been checked previously.
      delete component.controllerPresent;

      component.checkIfControllerPresent();

      assert.ok(injectTrackedControlsSpy.called, 'Inject');
      assert.ok(addEventListenersSpy.called, 'Add');
      assert.notOk(removeEventListenersSpy.called, 'Remove');
      assert.ok(component.controllerPresent);
    });

    test('does not add/remove event listeners if presence does not change', function () {
      var addEventListenersSpy = this.sinon.spy(component, 'addEventListeners');
      var injectTrackedControlsSpy = this.sinon.spy(component, 'injectTrackedControls');
      var removeEventListenersSpy = this.sinon.spy(component, 'removeEventListeners');

      // Mock isControllerPresent to return true.
      el.sceneEl.systems['tracked-controls'].controllers = component.controllersWhenPresent;

      // Mock that it's was currently present.
      component.controllerEventsActive = true;
      component.controllerPresent = true;

      component.checkIfControllerPresent();

      assert.notOk(injectTrackedControlsSpy.called);
      assert.notOk(addEventListenersSpy.called);
      assert.notOk(removeEventListenersSpy.called);
      assert.ok(component.controllerPresent);
    });

    test('removes event listeners if controller disappears', function () {
      var addEventListenersSpy = this.sinon.spy(component, 'addEventListeners');
      var injectTrackedControlsSpy = this.sinon.spy(component, 'injectTrackedControls');

      // Mock that it's was currently present.
      component.controllerEventsActive = true;
      component.controllerPresent = true;

      component.checkIfControllerPresent();

      assert.notOk(injectTrackedControlsSpy.called);
      assert.notOk(addEventListenersSpy.called);
      assert.notOk(component.controllerPresent);
    });
  });

  suite('axismove', function () {
    test('emits thumbstick moved', function (done) {
      el.sceneEl.systems['tracked-controls'].controllers = component.controllersWhenPresent;
      // Do the check.
      component.checkIfControllerPresent();
      // Install event handler listening for thumbstickmoved.
      this.el.addEventListener('thumbstickmoved', function (evt) {
        assert.equal(evt.detail.x, 0.1);
        assert.equal(evt.detail.y, 0.2);
        assert.ok(evt.detail);
        done();
      });
      // Emit axismove.
      this.el.emit('axismove', {axis: [0.1, 0.2], changed: [true, false]});
    });

    test('does not emit thumbstickmoved if axismove has no changes', function (done) {
      el.sceneEl.systems['tracked-controls'].controllers = component.controllersWhenPresent;
      // Do the check.
      component.checkIfControllerPresent();
      // Fail purposely.
      this.el.addEventListener('thumbstickmoved', function (evt) {
        assert.notOk(evt.detail);
      });
      // Emit axismove with no changes.
      this.el.emit('axismove', {axis: [0.1, 0.2], changed: [false, false]});
      setTimeout(() => { done(); });
    });
  });

  suite('buttonchanged', function () {
    test('can emit triggerchanged', function (done) {
      el.sceneEl.systems['tracked-controls'].controllers = component.controllersWhenPresent;
      // Do the check.
      component.checkIfControllerPresent();
      // Install event handler listening for triggerchanged.
      el.addEventListener('triggerchanged', function (evt) {
        assert.ok(evt.detail);
        done();
      });
      // Emit buttonchanged.
      el.emit('buttonchanged', {id: 1, state: {value: 0.5, pressed: true, touched: true}});
    });
  });

  suite('gamepaddisconnected', function () {
    /**
     * In FF Nightly, only one gamepadconnected/disconnected event is fired,
     * which makes it difficult to handle in individual controller entities.
     * We no longer remove the controllersupdate listener as a result.
     */
    test('checks if present on gamepaddisconnected event', function () {
      var checkIfControllerPresentSpy = this.sinon.spy(component, 'checkIfControllerPresent');
      // Because checkIfControllerPresent may be used in bound form, bind and reinstall.
      component.checkIfControllerPresent = component.checkIfControllerPresent.bind(component);
      component.pause();
      component.play();
      // Mock isControllerPresent to return false.
      // Reset everGotGamepadEvent so we don't think we've looked before.
      delete component.everGotGamepadEvent;
      // Fire emulated gamepaddisconnected event.
      window.dispatchEvent(new Event('gamepaddisconnected'));

      assert.ok(checkIfControllerPresentSpy.called);
    });
  });
});


text:
module LD
  class Form
    class RDFTranslator
      module Vocabulary
        require "rdf"
        class TextArea < Item
          @@type = RDF::Resource.new(BASE + "text_area")
          @@min = @@type + "#min_length"
          @@max = @@type + "#max_length"

          class <<  self

            def min_length
              return @@min
            end

            def max_length
              return @@max
            end

          end

        end
      end
    end
  end
end


text:
package org.apache.harmony.unpack200.bytecode;

import java.io.DataOutputStream;
import java.io.IOException;

/**
 * Deprecated class file attribute.
 */
public class DeprecatedAttribute extends Attribute {

    private static CPUTF8 attributeName;

    public static void setAttributeName(CPUTF8 cpUTF8Value) {
        attributeName = cpUTF8Value;
    }

    public DeprecatedAttribute() {
        super(attributeName);
    }

    /*
     * (non-Javadoc)
     *
     * @see org.apache.harmony.unpack200.bytecode.Attribute#getLength()
     */
    protected int getLength() {
        return 0;
    }

    /*
     * (non-Javadoc)
     *
     * @see org.apache.harmony.unpack200.bytecode.Attribute#writeBody(java.io.DataOutputStream)
     */
    protected void writeBody(DataOutputStream dos) throws IOException {
        // No body
    }

    /*
     * (non-Javadoc)
     *
     * @see org.apache.harmony.unpack200.bytecode.ClassFileEntry#toString()
     */
    public String toString() {
        return "Deprecated Attribute";
    }

}


text:
namespace Algolia.Search.Models.Common
{
    /// <summary>
    /// All write operations in Algolia are asynchronous by design.
    /// https://www.algolia.com/doc/api-reference/api-methods/wait-task/
    /// </summary>
    public interface IAlgoliaWaitableResponse
    {
        /// <summary>
        /// Wait for a task to complete before executing the next line of code, to synchronize index updates.
        /// </summary>
        void Wait();
    }
}


text:
package pro.redsoft.iframework.client.application;

import javax.inject.Inject;

import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.IsWidget;
import com.gwtplatform.mvp.client.ViewImpl;

/**
 * ApplicationView.
 *
 * @author Alex N. Oreshkevich
 */
public class ApplicationView extends ViewImpl implements ApplicationPresenter.MyView {

  FlowPanel main = new FlowPanel();

  @Inject
  public ApplicationView() {
    initWidget(main);
  }

  @Override
  public void setInSlot(Object slot, IsWidget content) {
    main.add(content);
  }
}


text:
<!DOCTYPE html>

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

  <link rel="stylesheet" type="text/css" href="../jquery.jqplot.min.css" />
  <link rel="stylesheet" type="text/css" href="examples.css" />

    <?php include "topbanner.inc"; ?>

    <?php include "nav.inc"; ?>

Below is an example block plot.  This plot also uses the Enhanced Legend Renderer plugin.  Clicking on an item in the legend will toggle display of the appropriate series.

Blocks can be moved by selecting the series, the point, and an optional duration parameter.  If specified, duration will animate the movement.  Duration is either a number in milliseconds, or the keywords 'fast' or 'slow'.  Higher numbers will cause a slower animation.

    Series: <select id="seriesId">
        <option value="0" selected>First</option>
        <option value="1">Second</option>
        <option value="2">Third</option>
    </select>
    Point: <select id="pointId">
        <option value="0" selected>first</option>
        <option value="1">second</option>
        <option value="2">third</option>
        <option value="3">fourth</option>
        <option value="4">fifth</option>
        <option value="5">six</option>
    </select>
    Duration: <select id="duration">
        <option value="" selected>None</option>
        <option value="150">100</option>
        <option value="fast">fast</option>
        <option value="300">300</option>
        <option value="300">400</option>
        <option value="300">500</option>
        <option value="slow">slow</option>
        <option value="900">700</option>
        <option value="900">800</option>
        <option value="900">900</option>
    </select>
    X: <button id="mxval" type="button" value="-0.5" onclick="move('x', -1);">-1</button> <button id="pxval" type="button" value="-0.5" onclick="move('x', 0.5);">0.5</button>
    Y: <button id="myval" type="button" name="myval" value="-10" onclick="move('y', -30);">-30</button> <button id="pyval" type="button" name="pyval" value="10" onclick="move('y', 15);">15</button>

This second chart is like the first except the "varyBlockColors" renderer option is set to true.  This will vary the color of each block in a series separately.  This allows displaying a third dimension to the data such as grouping beverage products by producer and by category such as "cola", "tea", "energy drink", etc.

Also, the legend has it's "showSwathces" option set to false, since the blocks of each series will be of varying color and won't correspond to one swatch color.  This still enables the user to show and hide the series by clicking on a label in the legend.


text:
/*
 * ALMA - Atacama Large Millimiter Array
 * (c) European Southern Observatory, 2009
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 */

package alma.acs.nc;

import static alma.acs.nc.sm.generated.EventSubscriberAction.createConnection;
import static alma.acs.nc.sm.generated.EventSubscriberAction.createEnvironment;
import static alma.acs.nc.sm.generated.EventSubscriberAction.destroyConnection;
import static alma.acs.nc.sm.generated.EventSubscriberAction.destroyEnvironment;
import static alma.acs.nc.sm.generated.EventSubscriberAction.resumeConnection;
import static alma.acs.nc.sm.generated.EventSubscriberAction.suspendConnection;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
import java.util.logging.Logger;

import org.apache.commons.scxml.ErrorReporter;
import org.apache.commons.scxml.EventDispatcher;
import org.apache.commons.scxml.SCInstance;
import org.apache.commons.scxml.TriggerEvent;

import alma.ACSErrTypeCommon.wrappers.AcsJBadParameterEx;
import alma.ACSErrTypeCommon.wrappers.AcsJCORBAProblemEx;
import alma.ACSErrTypeCommon.wrappers.AcsJCouldntPerformActionEx;
import alma.ACSErrTypeCommon.wrappers.AcsJIllegalStateEventEx;
import alma.ACSErrTypeCommon.wrappers.AcsJStateMachineActionEx;
import alma.acs.container.ContainerServicesBase;
import alma.acs.exceptions.AcsJException;
import alma.acs.logging.MultipleRepeatGuard;
import alma.acs.logging.RepeatGuard;
import alma.acs.logging.RepeatGuard.Logic;
import alma.acs.nc.sm.generated.EventSubscriberAction;
import alma.acs.nc.sm.generated.EventSubscriberSignal;
import alma.acs.nc.sm.generated.EventSubscriberSignalDispatcher;
import alma.acs.nc.sm.generic.AcsScxmlActionDispatcher;
import alma.acs.nc.sm.generic.AcsScxmlActionExecutor;
import alma.acs.nc.sm.generic.AcsScxmlEngine;
import alma.acs.util.StopWatch;
import alma.acsErrTypeLifeCycle.wrappers.AcsJEventSubscriptionEx;
import alma.acsnc.EventDescription;

/**
 * Base class for an event subscriber, that can be used for both Corba NC and for in-memory test NC.
 *

 * We will have to see if it can also be used for DDS-based events, or if the required modifications will be too heavy.
 *
 * @param <T> The event (base) type. If all events are of the same type then that type should be used;
 *            otherwise a common base type for all events that may be sent on the given "channel" should be used,
 *            such as Object or IDLEntity.
 */
public abstract class AcsEventSubscriberImplBase<T>
		implements AcsEventSubscriber<T>, AcsScxmlActionExecutor<EventSubscriberAction> {

	/**
	 * A name that identifies the client of this NCSubscriber, to be used
	 * both for logging and also (if applicable) as the supplier proxy name so that
	 * looking at the proxy objects of the NC we can figure out who the clients are.
	 */
	protected final String clientName;

	protected final ContainerServicesBase services;

	/**
	 * Provides access to the ACS logging system.
	 */
	protected final Logger logger;

	/**
	 * State machine for the subscriber lifecycle.
	 * It is not used for data handling itself, even though the measured overhead
	 * of less than 0.2 ms per signal might allow this.
	 */
	protected final AcsScxmlEngine<EventSubscriberSignal, EventSubscriberAction> stateMachine;

	private static final String scxmlFileName = "/alma/acs/nc/sm/generated/EventSubscriberSCXML.xml";

	protected final EventSubscriberSignalDispatcher stateMachineSignalDispatcher;

	/**
	 * Event queue should hold at least two events to avoid unnecessary scary logs about slow receivers,
	 * but must be short enough to get receivers to actually implement their own queue and discard mechanism
	 * instead of relying on this ACS queue which may buffer events for a limited time and thus obscure the problem.
	 * @see #eventHandlingExecutor
	 */
	public static final int EVENT_QUEUE_CAPACITY = 50;

	/**
	 * Single-thread executor with a small queue (size given in {@link #EVENT_QUEUE_CAPACITY},
	 * used to stay responsive toward the NC even if receivers are slow.
	 * The purpose is only to track down receivers that don't keep up with the event rate, and not to provide reliable event buffering,
	 * see http://jira.alma.cl/browse/COMP-5767.
	 *

	 * Errors are logged, using also fields {@link #numEventsDiscarded} and {@link #receiverTooSlowLogRepeatGuard}.
	 *

	 * The difference of this mechanism compared to the logs controlled by {@link #processTimeLogRepeatGuard} is that
	 * here we take into account the actual event rate and check whether the receiver can handle it,
	 * whereas {@link #processTimeLogRepeatGuard} only compares the actual process times against pre-configured values.
	 */
	private ThreadPoolExecutor eventHandlingExecutor;

	/**
	 * @see #eventHandlingExecutor
	 */
	private final AtomicLong numEventsDiscarded = new AtomicLong(0);

	/**
	 * Throttles logs from {@link #logEventProcessingTooSlowForEventRate(long, String, long)}.
	 */
	private final RepeatGuard receiverTooSlowLogRepeatGuard;

	/**
	 * Contains a generic receiver to be used by the
	 * {@link #addGenericSubscription()} method.
	 */
	protected AcsEventSubscriber.GenericCallback genericReceiver;

	/**
	 * Contains a list of receiver functions to be invoked when an event
	 * of a particular type is received.
	 *

	 * key = the event type (Java class derived from IDL struct).

	 * value = the matching event handler.
	 */
	protected final Map<Class<? extends T>, Callback<? extends T>> receivers =
							new HashMap<Class<? extends T>, Callback<? extends T>>();

	/**
	 * Contains a list of repeat guards for each different type of event.
	 */
	protected final MultipleRepeatGuard processTimeLogRepeatGuard;

	/**
	 * Runtime access to the type parameter <T>.
	 */
	protected final Class<T> eventType;

	/**
	 * @return true if events should be logged when they are received.
	 */
	protected abstract boolean isTraceEventsEnabled();

	/**
	 * Base class constructor, to be called from subclass ctor.
	 * IMPORTANT: Subclasses MUST call "stateMachine.setUpEnvironment()" at the end of their constructors.
	 * This is because Java does not support template method design for constructors
	 * (see for example http://stackoverflow.com/questions/2906958/running-a-method-after-the-constructor-of-any-derived-class).
	 * Since the subclasses are all meant to be produced within ACS I did not want to go for dirty tricks to work around this.
	 * We also don't want to call a public init() method after constructing the subscriber.
	 *

	 * Normally an ACS class such as container services will act as the factory for event subscriber objects,
	 * but for exceptional cases it is also possible to create one stand-alone,
	 * as long as the required parameters can be provided.
	 *
	 * @param services
	 *            To get ACS logger, access to the CDB, etc.
	 * @param clientName
	 *            A name that identifies the client of this NCSubscriber.
	 *            TODO: Check if we still need this name to be specified separately from {@link services#getName()}.
	 * @throws AcsJException
	 *             Thrown on any really bad error conditions encountered.
	 */
	public AcsEventSubscriberImplBase(ContainerServicesBase services, String clientName, Class<T> eventType) throws AcsJException {

		if (services == null) {
			AcsJBadParameterEx ex = new AcsJBadParameterEx();
			ex.setParameter("services");
			ex.setParameterValue("null");
			throw ex;
		}
		this.services = services;

		if (clientName == null) {
			AcsJBadParameterEx ex = new AcsJBadParameterEx();
			ex.setParameter("clientName");
			ex.setParameterValue("null");
			throw ex;
		}
		this.clientName = clientName;

		this.eventType = eventType;
		logger = services.getLogger();

		// @TODO Set more realistic guarding parameters, e.g. max 1 identical log in 10 seconds
		processTimeLogRepeatGuard = new MultipleRepeatGuard(0, TimeUnit.SECONDS, 1, Logic.COUNTER, 100);

		// log slow receiver error only every 30 seconds or every 100 times, whatever comes first
		receiverTooSlowLogRepeatGuard = new RepeatGuard(30, TimeUnit.SECONDS, 100, Logic.OR);

		// set up the state machine

		AcsScxmlActionDispatcher<EventSubscriberAction> actionDispatcher =
				new AcsScxmlActionDispatcher<EventSubscriberAction>(logger, EventSubscriberAction.class);

		// As a design choice, we implement all SM actions directly here in this class and its subclasses.
		// The state machine framework expects an object per action, so that we must register ourselves for every action type.
		// We could do this as a for loop over EventSubscriberAction.values(), but better hardcode the registration
		// for every action type so that SM changes will be noticed more easily.
		actionDispatcher.registerActionHandler(createEnvironment, this);
		actionDispatcher.registerActionHandler(destroyEnvironment, this);
		actionDispatcher.registerActionHandler(createConnection, this);
		actionDispatcher.registerActionHandler(destroyConnection, this);
		actionDispatcher.registerActionHandler(suspendConnection, this);
		actionDispatcher.registerActionHandler(resumeConnection, this);

		// Here the AcsScxmlEngine constructor will load the scxml file and start the state machine
		stateMachine = new AcsScxmlEngine<EventSubscriberSignal, EventSubscriberAction>(
				scxmlFileName, logger, actionDispatcher, EventSubscriberSignal.class);

		// Convenience method to send events to the SM.
		// Usually meant to be used as a base class, but here we don't want to expose the SM to the user.
		stateMachineSignalDispatcher = new EventSubscriberSignalDispatcher() {
			@Override
			protected AcsScxmlEngine<EventSubscriberSignal, EventSubscriberAction> getScxmlEngine() {
				return stateMachine;
			}
		};

		// Later at the end of the subclass ctor there should be the call to
		// stateMachine.setUpEnvironment(), leaving our state machine in state EnvironmentCreated
	}

	////////////////////////////////////////////////////////////////////////////////////////
	/////////////////////// State machine //////////////////////////////////////////////////
	////////////////////////////////////////////////////////////////////////////////////////

	/**
	 * Dispatches the action enum to one of the action handler methods.
	 *

	 * The overhead of implementing this method is the price we pay for avoiding reflection
	 * and allowing flexible action implementation in the SM design.
	 * @see alma.acs.nc.sm.generic.AcsScxmlActionExecutor#execute(java.lang.Enum, org.apache.commons.scxml.EventDispatcher, org.apache.commons.scxml.ErrorReporter, org.apache.commons.scxml.SCInstance, java.util.Collection)
	 */
	@Override
	public boolean execute(EventSubscriberAction action, EventDispatcher evtDispatcher, ErrorReporter errRep,
			SCInstance scInstance, Collection<TriggerEvent> derivedEvents)
					throws AcsJStateMachineActionEx {

//		logger.fine("Will handle action " + action.name());
		boolean ret = true;

		switch (action) {

		case createEnvironment:
			createEnvironmentAction(evtDispatcher, errRep, scInstance, derivedEvents);
			break;

		case destroyEnvironment:
			destroyEnvironmentAction(evtDispatcher, errRep, scInstance, derivedEvents);
			break;

		case createConnection:
			createConnectionAction(evtDispatcher, errRep, scInstance, derivedEvents);
			break;

		case destroyConnection:
			destroyConnectionAction(evtDispatcher, errRep, scInstance, derivedEvents);
			break;

		case suspendConnection:
			suspendAction(evtDispatcher, errRep, scInstance, derivedEvents);
			break;

		case resumeConnection:
			resumeAction(evtDispatcher, errRep, scInstance, derivedEvents);
			break;

		default:
			ret = false;
		}

//		logger.fine("Done handling action " + action.name());
		return ret;
	}

	/**
	 * Subclass may override, but must call super.createEnvironmentAction().
	 */
	protected void createEnvironmentAction(EventDispatcher evtDispatcher, ErrorReporter errRep, SCInstance scInstance, Collection<TriggerEvent> derivedEvents)
			throws AcsJStateMachineActionEx {
		// nada
	}

	/**
	 * Subclass may override, but must call super.destroyEnvironmentAction().
	 */
	protected void destroyEnvironmentAction(EventDispatcher evtDispatcher, ErrorReporter errRep, SCInstance scInstance, Collection<TriggerEvent> derivedEvents)
			throws AcsJStateMachineActionEx {
	}

	/**
	 * Subclass may override, but must call super.createConnectionAction().
	 */
	protected void createConnectionAction(EventDispatcher evtDispatcher, ErrorReporter errRep, SCInstance scInstance, Collection<TriggerEvent> derivedEvents)
			throws AcsJStateMachineActionEx {
		eventHandlingExecutor = new ThreadPoolExecutor(0, 1, 1L, TimeUnit.MINUTES,
				new ArrayBlockingQueue<Runnable>(EVENT_QUEUE_CAPACITY), services.getThreadFactory(), new ThreadPoolExecutor.AbortPolicy() );
	}

	/**
	 * Handler for "destroyConnection" state machine action.
	 *

	 * Shuts down the event queue.
	 * Queued events may still be processed by the receivers afterwards,
	 * but here we wait for up to 500 ms to log it if it is the case.
	 *

	 * Further events delivered to {@link #processEventAsync(Object, EventDescription)}
	 * will cause an exception there.
	 *

	 * Subclass may override, but must call super.destroyConnectionAction().
	 */
	protected void destroyConnectionAction(EventDispatcher evtDispatcher, ErrorReporter errRep, SCInstance scInstance,
			Collection<TriggerEvent> derivedEvents) throws AcsJStateMachineActionEx {

		eventHandlingExecutor.shutdown();
		boolean queueOK = false; // just in case we want to report the success of this shutdown
		try {
			queueOK = eventHandlingExecutor.awaitTermination(500, TimeUnit.MILLISECONDS);
		} catch (InterruptedException ex) {
			// just leave queueOK == false
		}
		if (!queueOK) {
			// interrupted or timeout occurred, may still have events in the queue. Terminate with error message
			int remainingEvents = eventHandlingExecutor.getQueue().size();
			logQueueShutdownError(500, remainingEvents);
		}
	}

	/**
	 * Subclass may override, but must call super.suspendAction().
	 */
	protected void suspendAction(EventDispatcher evtDispatcher, ErrorReporter errRep, SCInstance scInstance, Collection<TriggerEvent> derivedEvents)
			throws AcsJStateMachineActionEx {
		// nada
	}

	/**
	 * Subclass may override, but must call super.resumeAction().
	 */
	protected void resumeAction(EventDispatcher evtDispatcher, ErrorReporter errRep, SCInstance scInstance, Collection<TriggerEvent> derivedEvents)
			throws AcsJStateMachineActionEx {
		// nada
	}

	/**
	 * Gets the configured (or default) max time that a receiver may take to process an event,
	 * regardless of the actual event rate.
	 */
	protected abstract double getMaxProcessTimeSeconds(String eventName);

	/**
	 * Logs an exception thrown by an event handler (user code).
	 */
	protected abstract void logEventReceiveHandlerException(String eventName, String receiverClassName, Throwable thr);

	/**
	 * Logs the error that event processing time was exceeded.
	 */
	protected abstract void logEventProcessingTimeExceeded(String eventName, long logOcurrencesNumber);

	/**
	 * Logs the error that the receiver cannot keep up with the actual event rate,
	 * in spite of the small event buffering done.
	 *
	 * @param numEventsDiscarded   The number of events that have actually been discarded since the last log.
	 *                             Will often be 0 when we just warn about the queue filling up.
	 * @param eventName
	 */
	protected abstract void logEventProcessingTooSlowForEventRate(long numEventsDiscarded, String eventName);

	/**
	 * Logs or ignores the fact that an event was received for which no receiver could be found.
	 *

	 * The subclass must know whether such a condition is expected or not,
	 * e.g. because event filtering is set up outside of the subscriber
	 * and only subscribed event types are expected to arrive.
	 */
	protected abstract void logNoEventReceiver(String eventName);

	/**
	 * Logs the error that the local event buffer could not be emptied before shutting down the subscriber.
	 */
	protected abstract void logQueueShutdownError(int timeoutMillis, int remainingEvents);

	/**
	 * Asynchronously calls {@link #processEvent(Object, EventDescription)},
	 * using {@link #eventHandlingExecutor}.
	 *

	 * This method should be called from the subclass-specific method that receives the event,
	 * for example push_structured_event in case of Corba NC.
	 *

	 * This method is thread-safe.
	 *
	 * @param eventData (defined as Object instead of T to include data for generic subscription).
	 * @param eventDesc event meta data
	 */
	protected void processEventAsync(final Object eventData, final EventDescription eventDesc) {

		// to avoid unnecessary scary logs, we tolerate previous events up to half the queue size
		boolean isReceiverBusyWithPreviousEvent = ( eventHandlingExecutor.getQueue().size() > EVENT_QUEUE_CAPACITY / 2 );

//			logger.info("Queue size: " + eventHandlingExecutor.getQueue().size());

		boolean thisEventDiscarded = false;
		try {
			eventHandlingExecutor.execute(
					new Runnable() {
						public void run() {
							// here we call processEvent from the worker thread
							processEvent(eventData, eventDesc);
						}
					});
		} catch (RejectedExecutionException ex) {
			// receivers have been too slow, queue is actually full, will drop data.
			thisEventDiscarded = true;
			numEventsDiscarded.incrementAndGet();
		}
		if (thisEventDiscarded || isReceiverBusyWithPreviousEvent) {
			// receiverTooSlowLogRepeatGuard currently not thread-safe, therefore synchronize
			synchronized (receiverTooSlowLogRepeatGuard) {
				if (receiverTooSlowLogRepeatGuard.checkAndIncrement()) {
					// About numEventsDiscarded and concurrency:
					// That counter may have been incremented by other threads between the above RejectedExecutionException
					// and here. These threads are blocked now, and have not yet incremented the repeat guard.
					// This can lead to some harmless irregularities in how often we actually log the message.
					// What matters is that we report correctly the number of discarded events.
					logEventProcessingTooSlowForEventRate(
							numEventsDiscarded.getAndSet(0),
							eventData.getClass().getName());
				}
			}
		}
	}

	/**
	 * This method should be called from the subclass-specific method that receives the event,
	 * for example push_structured_event in case of Corba NC,
	 * or preferably via {@link #processEventAsync(Object, EventDescription)}.
	 *

	 * No exception is allowed to be thrown by this method, even if the receiver implementation throws a RuntimeExecption
	 * @param eventData (defined as Object instead of T to include data for generic subscription).
	 * @param eventDesc
	 */
	protected void processEvent(Object eventData, EventDescription eventDesc) {

		Class<?> incomingEventType = eventData.getClass();
		String eventName = incomingEventType.getName();

		// figure out how much time this event has to be processed (according to configuration)
		double maxProcessTimeSeconds = getMaxProcessTimeSeconds(eventName);

		StopWatch profiler = new StopWatch();

		// we give preference to a receiver that has registered for this event type T or a subtype
		if (eventType.isAssignableFrom(incomingEventType) && receivers.containsKey(incomingEventType)) {

			@SuppressWarnings("unchecked")
			T typedEventData = (T) eventData;

			Callback<? extends T> receiver = receivers.get(incomingEventType);

			profiler.reset();
			try {
				_process(receiver, typedEventData, eventDesc);
			}
			catch (Throwable thr) {
				logEventReceiveHandlerException(eventName, receiver.getClass().getName(), thr);
			}
			double usedSecondsToProcess = (profiler.getLapTimeMillis() / 1000.0);

			// warn the end-user if the receiver is taking too long, using a repeat guard
			if (usedSecondsToProcess > maxProcessTimeSeconds && processTimeLogRepeatGuard.checkAndIncrement(eventName)) {
				logEventProcessingTimeExceeded(eventName, processTimeLogRepeatGuard.counterAtLastExecution(eventName));
			}
		}
		// fallback to generic receive method
		else if (genericReceiver != null) {

			profiler.reset();
			genericReceiver.receiveGeneric(eventData, eventDesc);
			double usedSecondsToProcess = (profiler.getLapTimeMillis() / 1000.0);

			// warn the end-user if the receiver is taking too long
			if (usedSecondsToProcess > maxProcessTimeSeconds && processTimeLogRepeatGuard.checkAndIncrement(eventName)) {
				logEventProcessingTimeExceeded(eventName, processTimeLogRepeatGuard.counterAtLastExecution(eventName));
			}
		}
		// No receiver found.
		// This may be OK or not, depending on whether the subclass sets up filtering in the underlying notification framework
		// that ensures that only subscribed event types reach the subscriber. Subclass should decide if and how to report this.
		else {
			logNoEventReceiver(eventName);
		}
	}

	/**
	 * "Generic helper method" to enforce type argument inference by the compiler,
	 * see http://www.angelikalanger.com/GenericsFAQ/FAQSections/ProgrammingIdioms.html#FAQ207
	 */
	private  void _process(Callback receiver, T eventData, EventDescription eventDescrip) {
		U castCorbaData = null;
		try {
			castCorbaData = receiver.getEventType().cast(eventData);
		}
		catch (ClassCastException ex) {
			// This should never happen and would be an ACS error
			logger.warning("Failed to deliver incompatible data '" + eventData.getClass().getName() +
					"' to subscriber '" + receiver.getEventType().getName() + "'. Fix data subscription handling in " + getClass().getName() + "!");
		}
		// user code errors (runtime ex etc) we let fly up
		receiver.receive(castCorbaData, eventDescrip);
	}

	@Override
	public String getLifecycleState() {
		return stateMachine.getCurrentState();
	}

	/**
	 * Use only for unit testing!
	 */
	public boolean hasGenericReceiver() {
		return ( genericReceiver != null );
	}

	/**
	 * Use only for unit testing!
	 */
	public int getNumberOfReceivers() {
		return receivers.size();
	}

	////////////////////////////////////////////////////////////////////////////////////////
	///////////////////////////// AcsEventSubscriber impl //////////////////////////////////
	////////////////////////////////////////////////////////////////////////////////////////

	/**
	 * Subscribes to all events. The latest generic receiver displaces the previous one.
	 *

	 * If in addition to this generic subscription we also have specific subscriptions via
	 * {@link #addSubscription(Class, Callback)},
	 * then those more specific subscriptions will take precedence in receiving an event.
	 *

	 * Notice though that any server-side filters previously created for the event type specific
	 * subscriptions get deleted when calling this method, so that even after removing a generic
	 * subscription the network performance gain of server-side filtering is lost.
	 * @TODO: Couldn't this be fixed by creating the server-side filters on demand (see also javadoc class comment about lifecycle)?
	 */
	@Override
	public final void addGenericSubscription(GenericCallback receiver) throws AcsJEventSubscriptionEx {

		// First time we create the filter and set the receiver
		if( genericReceiver == null ) {
			notifyFirstSubscription(null);
		}
		// After the filter is created, we just replace the receiver
		genericReceiver = receiver;
	}

	/**
	 * Removes the generic receiver handler.
	 *
	 * @throws AcsJCORBAProblemEx
	 */
	@Override
	public final void removeGenericSubscription() throws AcsJEventSubscriptionEx {

		if (genericReceiver == null ) {
			AcsJEventSubscriptionEx ex = new AcsJEventSubscriptionEx();
			ex.setContext("Failed to remove generic subscription when not actually subscribed.");
			ex.setEventType("generic");
			throw ex;
		}

		notifySubscriptionRemoved(null);
		genericReceiver = null;
	}

	@Override
	public final  void addSubscription(Callback receiver)
			throws AcsJEventSubscriptionEx {

		Class subscribedEventType = receiver.getEventType();

		if (subscribedEventType == null || !(eventType.isAssignableFrom(subscribedEventType)) ) {
			AcsJEventSubscriptionEx ex = new AcsJEventSubscriptionEx();
			ex.setContext("Receiver is returning a null or invalid event type. " +
					"Check the getEventType() method implementation and try again.");
			ex.setEventType(subscribedEventType == null ? "null" : subscribedEventType.getName());
			throw ex;
		}

		// First time we create the filter and set the receiver
		if (!receivers.containsKey(subscribedEventType)) {
			notifyFirstSubscription(subscribedEventType);
		}
		// After the filter is created, we just replace the corresponding receivers
		receivers.put(subscribedEventType, receiver);
	}

	@Override
	public final  void removeSubscription(Class structClass) throws AcsJEventSubscriptionEx {

		// Removing subscription from receivers list
		if (structClass != null) {

			if (receivers.containsKey(structClass)) {
				receivers.remove(structClass);
				notifySubscriptionRemoved(structClass);
			}
			else {
				AcsJEventSubscriptionEx ex = new AcsJEventSubscriptionEx();
				ex.setContext("Trying to unsubscribe from an event type not being subscribed to.");
				ex.setEventType(structClass.getName());
				throw ex;
			}
		}
		else {
			// Removing every type of event
			receivers.clear();
			notifyNoSubscription();
		}
	}

	@Override
	public final void startReceivingEvents() throws AcsJIllegalStateEventEx, AcsJCouldntPerformActionEx {
		try {
			stateMachineSignalDispatcher.startReceivingEvents();
		} catch (AcsJStateMachineActionEx ex) {
			throw new AcsJCouldntPerformActionEx(ex);
		}
	}

	/**
	 * @see alma.acs.nc.AcsEventSubscriber#disconnect()
	 */
	@Override
	public final void disconnect() throws AcsJIllegalStateEventEx, AcsJCouldntPerformActionEx {
		try {
			stateMachineSignalDispatcher.stopReceivingEvents();
		}
		catch (AcsJIllegalStateEventEx ex) {
			// ignore. If the state is totally wrong then the subsequent cleanUpEnvironment
			// will also throw AcsJIllegalStateEventEx
		}
		catch (AcsJStateMachineActionEx ex) {
			throw new AcsJCouldntPerformActionEx(ex);
		}
		finally {
			// even after AcsJIllegalStateEventEx in stopReceivingEvents we want to do the second clean-up step
			try {
				stateMachineSignalDispatcher.cleanUpEnvironment();
			} catch (AcsJStateMachineActionEx ex) {
				throw new AcsJCouldntPerformActionEx(ex);
			}
		}
	}

	@Override
	public final void suspend() throws AcsJIllegalStateEventEx, AcsJCouldntPerformActionEx {
		try {
			stateMachineSignalDispatcher.suspend();
		} catch (AcsJStateMachineActionEx ex) {
			throw new AcsJCouldntPerformActionEx(ex);
		}
	}

	@Override
	public final void resume() throws AcsJIllegalStateEventEx, AcsJCouldntPerformActionEx {
		try {
			stateMachineSignalDispatcher.resume();
		} catch (AcsJStateMachineActionEx ex) {
			throw new AcsJCouldntPerformActionEx(ex);
		}
	}

	////////////////////////////////////////////////////////////////////////////////////////
	///////////////////////// Subscription helper methods //////////////////////////////////
	////////////////////////////////////////////////////////////////////////////////////////

	/**
	 * @param structClass Can be null in case of generic subscription.
	 */
	protected abstract void notifyFirstSubscription(Class<?> structClass) throws AcsJEventSubscriptionEx;

	/**
	 * @param structClass
	 * @throws AcsJEventSubscriptionEx
	 */
	protected abstract void notifySubscriptionRemoved(Class<?> structClass) throws AcsJEventSubscriptionEx;

	/**
	 *
	 */
	protected abstract void notifyNoSubscription();

	@Override
	public boolean isSuspended() {
		return stateMachine.isStateActive("EnvironmentCreated::Connected::Suspended");
	}

	public final boolean isDisconnected() {
		return (
				stateMachine.isStateActive("EnvironmentCreated::Disconnected") ||
				stateMachine.isStateActive("EnvironmentUnknown")
			);
	}

}


text:
var InvoiceShowRoute = Ember.Route.extend({
    model: function (params) {
        return this.modelFor("invoice");
    },
    activate: function () {
        var invoice = this.modelFor("invoice");

        document.title = [invoice.get("number"), invoice.get("buyerFirstLine"), "- Fakturama"].compact().join(" ");
    },
    deactivate: function () {
        document.title = "Fakturama";
    }
});

export default InvoiceShowRoute;


text:
TEST ?= phantom

all: build

components: component.json
	component install --dev

build: components index.js
	component build --dev

test: build
	component test $(TEST)

.PHONY: all test


text:
cask 'netbeans-java-se' do
  version '8.2'
  sha256 '91652f03d8abba0ae9d76a612ed909c9f82e4f138cbd510f5d3679280323011b'

  url "https://download.netbeans.org/netbeans/#{version}/final/bundles/netbeans-#{version}-javase-macosx.dmg"
  name 'NetBeans IDE for Java SE'
  homepage 'https://netbeans.org/'

  pkg "NetBeans #{version}.pkg"

  uninstall pkgutil: 'org.netbeans.ide.*',
            delete:  '/Applications/NetBeans'
end


text:
                    Images
                    Images related operations and information

                    This section provides the means to interact with the available (pulled) Docker images, and
                        to resent all needed information on each and every image available.
                        Once an image has been started, further interactions can be made on the Containers
                        section.

 Available Images


text:
description("Test that XHR.responseType = 'blob' gives you back a Blob.");

if (window.testRunner)
    testRunner.waitUntilDone();

function testBlob(blobURL, blobType, doneFunction) {
    window.xhr = new XMLHttpRequest();
    xhr.open("GET", blobURL);
    xhr.responseType = "blob";
    shouldBeEqualToString("xhr.responseType", "blob");
    xhr.send();
    xhr.onreadystatechange = function() {
        if (xhr.readyState != 4) {
            shouldBeNull("xhr.response");
            return;
        }
        shouldBeTrue("xhr.response instanceof Blob");
        shouldBeEqualToString("xhr.response.type", blobType);
        doneFunction();
    }
}

testBlob("resources/UTF8.txt", "text/plain", function() {
    testBlob("resources/does_not_exist.txt", "", function() {
        testBlob("resources/empty-file", "", function() {
            if (window.testRunner)
                testRunner.notifyDone();
        })
    })
});


text:
using _System = global::System;
using _Microsoft = global::Microsoft;

#pragma warning disable 1591

namespace IceCompactId
{
}

namespace Example
{
    [_System.Runtime.InteropServices.ComVisible(false)]
    [_System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704")]
    [_System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707")]
    [_System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709")]
    [_System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710")]
    [_System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1711")]
    [_System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1715")]
    [_System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1716")]
    [_System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1720")]
    [_System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1722")]
    [_System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1724")]
    public partial interface Converter : Ice.Object, ConverterOperations_, ConverterOperationsNC_
    {
    }
}

namespace Example
{
    [_System.CodeDom.Compiler.GeneratedCodeAttribute("slice2cs", "3.5.1")]
    public delegate void Callback_Converter_toUpper(string ret__);
}

namespace Example
{
    [_System.CodeDom.Compiler.GeneratedCodeAttribute("slice2cs", "3.5.1")]
    public interface ConverterPrx : Ice.ObjectPrx
    {
        string toUpper(string s);
        string toUpper(string s, _System.Collections.Generic.Dictionary<string, string> context__);

        Ice.AsyncResult<Example.Callback_Converter_toUpper> begin_toUpper(string s);
        Ice.AsyncResult<Example.Callback_Converter_toUpper> begin_toUpper(string s, _System.Collections.Generic.Dictionary<string, string> ctx__);

        Ice.AsyncResult begin_toUpper(string s, Ice.AsyncCallback cb__, object cookie__);
        Ice.AsyncResult begin_toUpper(string s, _System.Collections.Generic.Dictionary<string, string> ctx__, Ice.AsyncCallback cb__, object cookie__);

        string end_toUpper(Ice.AsyncResult r__);
    }
}

namespace Example
{
    [_System.CodeDom.Compiler.GeneratedCodeAttribute("slice2cs", "3.5.1")]
    public interface ConverterOperations_
    {
        string toUpper(string s, Ice.Current current__);
    }

    [_System.CodeDom.Compiler.GeneratedCodeAttribute("slice2cs", "3.5.1")]
    public interface ConverterOperationsNC_
    {
        string toUpper(string s);
    }
}

namespace Example
{
    [_System.Runtime.InteropServices.ComVisible(false)]
    [_System.CodeDom.Compiler.GeneratedCodeAttribute("slice2cs", "3.5.1")]
    public sealed class ConverterPrxHelper : Ice.ObjectPrxHelperBase, ConverterPrx
    {
        #region Synchronous operations

        public string toUpper(string s)
        {
            return toUpper(s, null, false);
        }

        public string toUpper(string s, _System.Collections.Generic.Dictionary<string, string> context__)
        {
            return toUpper(s, context__, true);
        }

        private string toUpper(string s, _System.Collections.Generic.Dictionary<string, string> context__, bool explicitContext__)
        {
            if(explicitContext__ && context__ == null)
            {
                context__ = emptyContext_;
            }
            Ice.Instrumentation.InvocationObserver observer__ = IceInternal.ObserverHelper.get(this, __toUpper_name, context__);
            int cnt__ = 0;
            try
            {
                while(true)
                {
                    Ice.ObjectDel_ delBase__ = null;
                    try
                    {
                        checkTwowayOnly__(__toUpper_name);
                        delBase__ = getDelegate__(false);
                        ConverterDel_ del__ = (ConverterDel_)delBase__;
                        return del__.toUpper(s, context__, observer__);
                    }
                    catch(IceInternal.LocalExceptionWrapper ex__)
                    {
                        handleExceptionWrapper__(delBase__, ex__, observer__);
                    }
                    catch(Ice.LocalException ex__)
                    {
                        handleException__(delBase__, ex__, true, ref cnt__, observer__);
                    }
                }
            }
            finally
            {
                if(observer__ != null)
                {
                    observer__.detach();
                }
            }
        }

        #endregion

        #region Asynchronous operations

        public Ice.AsyncResult<Example.Callback_Converter_toUpper> begin_toUpper(string s)
        {
            return begin_toUpper(s, null, false, null, null);
        }

        public Ice.AsyncResult<Example.Callback_Converter_toUpper> begin_toUpper(string s, _System.Collections.Generic.Dictionary<string, string> ctx__)
        {
            return begin_toUpper(s, ctx__, true, null, null);
        }

        public Ice.AsyncResult begin_toUpper(string s, Ice.AsyncCallback cb__, object cookie__)
        {
            return begin_toUpper(s, null, false, cb__, cookie__);
        }

        public Ice.AsyncResult begin_toUpper(string s, _System.Collections.Generic.Dictionary<string, string> ctx__, Ice.AsyncCallback cb__, object cookie__)
        {
            return begin_toUpper(s, ctx__, true, cb__, cookie__);
        }

        private const string __toUpper_name = "toUpper";

        public string end_toUpper(Ice.AsyncResult r__)
        {
            IceInternal.OutgoingAsync outAsync__ = (IceInternal.OutgoingAsync)r__;
            IceInternal.OutgoingAsync.check__(outAsync__, this, __toUpper_name);
            bool ok__ = outAsync__.wait__();
            try
            {
                if(!ok__)
                {
                    try
                    {
                        outAsync__.throwUserException__();
                    }
                    catch(Ice.UserException ex__)
                    {
                        throw new Ice.UnknownUserException(ex__.ice_name(), ex__);
                    }
                }
                string ret__;
                IceInternal.BasicStream is__ = outAsync__.startReadParams__();
                ret__ = is__.readString();
                outAsync__.endReadParams__();
                return ret__;
            }
            catch(Ice.LocalException ex)
            {
                Ice.Instrumentation.InvocationObserver obsv__ = outAsync__.getObserver__();
                if(obsv__ != null)
                {
                    obsv__.failed(ex.ice_name());
                }
                throw ex;
            }
        }

        private Ice.AsyncResult<Example.Callback_Converter_toUpper> begin_toUpper(string s, _System.Collections.Generic.Dictionary<string, string> ctx__, bool explicitContext__, Ice.AsyncCallback cb__, object cookie__)
        {
            checkAsyncTwowayOnly__(__toUpper_name);
            IceInternal.TwowayOutgoingAsync<Example.Callback_Converter_toUpper> result__ =  new IceInternal.TwowayOutgoingAsync<Example.Callback_Converter_toUpper>(this, __toUpper_name, toUpper_completed__, cookie__);
            if(cb__ != null)
            {
                result__.whenCompletedWithAsyncCallback(cb__);
            }
            try
            {
                result__.prepare__(__toUpper_name, Ice.OperationMode.Normal, ctx__, explicitContext__);
                IceInternal.BasicStream os__ = result__.startWriteParams__(Ice.FormatType.DefaultFormat);
                os__.writeString(s);
                result__.endWriteParams__();
                result__.send__(true);
            }
            catch(Ice.LocalException ex__)
            {
                result__.exceptionAsync__(ex__);
            }
            return result__;
        }

        private void toUpper_completed__(Ice.AsyncResult r__, Example.Callback_Converter_toUpper cb__, Ice.ExceptionCallback excb__)
        {
            string ret__;
            try
            {
                ret__ = end_toUpper(r__);
            }
            catch(Ice.Exception ex__)
            {
                if(excb__ != null)
                {
                    excb__(ex__);
                }
                return;
            }
            if(cb__ != null)
            {
                cb__(ret__);
            }
        }

        #endregion

        #region Checked and unchecked cast operations

        public static ConverterPrx checkedCast(Ice.ObjectPrx b)
        {
            if(b == null)
            {
                return null;
            }
            ConverterPrx r = b as ConverterPrx;
            if((r == null) && b.ice_isA(ice_staticId()))
            {
                ConverterPrxHelper h = new ConverterPrxHelper();
                h.copyFrom__(b);
                r = h;
            }
            return r;
        }

        public static ConverterPrx checkedCast(Ice.ObjectPrx b, _System.Collections.Generic.Dictionary<string, string> ctx)
        {
            if(b == null)
            {
                return null;
            }
            ConverterPrx r = b as ConverterPrx;
            if((r == null) && b.ice_isA(ice_staticId(), ctx))
            {
                ConverterPrxHelper h = new ConverterPrxHelper();
                h.copyFrom__(b);
                r = h;
            }
            return r;
        }

        public static ConverterPrx checkedCast(Ice.ObjectPrx b, string f)
        {
            if(b == null)
            {
                return null;
            }
            Ice.ObjectPrx bb = b.ice_facet(f);
            try
            {
                if(bb.ice_isA(ice_staticId()))
                {
                    ConverterPrxHelper h = new ConverterPrxHelper();
                    h.copyFrom__(bb);
                    return h;
                }
            }
            catch(Ice.FacetNotExistException)
            {
            }
            return null;
        }

        public static ConverterPrx checkedCast(Ice.ObjectPrx b, string f, _System.Collections.Generic.Dictionary<string, string> ctx)
        {
            if(b == null)
            {
                return null;
            }
            Ice.ObjectPrx bb = b.ice_facet(f);
            try
            {
                if(bb.ice_isA(ice_staticId(), ctx))
                {
                    ConverterPrxHelper h = new ConverterPrxHelper();
                    h.copyFrom__(bb);
                    return h;
                }
            }
            catch(Ice.FacetNotExistException)
            {
            }
            return null;
        }

        public static ConverterPrx uncheckedCast(Ice.ObjectPrx b)
        {
            if(b == null)
            {
                return null;
            }
            ConverterPrx r = b as ConverterPrx;
            if(r == null)
            {
                ConverterPrxHelper h = new ConverterPrxHelper();
                h.copyFrom__(b);
                r = h;
            }
            return r;
        }

        public static ConverterPrx uncheckedCast(Ice.ObjectPrx b, string f)
        {
            if(b == null)
            {
                return null;
            }
            Ice.ObjectPrx bb = b.ice_facet(f);
            ConverterPrxHelper h = new ConverterPrxHelper();
            h.copyFrom__(bb);
            return h;
        }

        public static readonly string[] ids__ =
        {
            "::Example::Converter",
            "::Ice::Object"
        };

        public static string ice_staticId()
        {
            return ids__[0];
        }

        #endregion

        #region Marshaling support

        protected override Ice.ObjectDelM_ createDelegateM__()
        {
            return new ConverterDelM_();
        }

        protected override Ice.ObjectDelD_ createDelegateD__()
        {
            return new ConverterDelD_();
        }

        public static void write__(IceInternal.BasicStream os__, ConverterPrx v__)
        {
            os__.writeProxy(v__);
        }

        public static ConverterPrx read__(IceInternal.BasicStream is__)
        {
            Ice.ObjectPrx proxy = is__.readProxy();
            if(proxy != null)
            {
                ConverterPrxHelper result = new ConverterPrxHelper();
                result.copyFrom__(proxy);
                return result;
            }
            return null;
        }

        #endregion
    }
}

namespace Example
{
    [_System.CodeDom.Compiler.GeneratedCodeAttribute("slice2cs", "3.5.1")]
    public interface ConverterDel_ : Ice.ObjectDel_
    {
        string toUpper(string s, _System.Collections.Generic.Dictionary<string, string> context__, Ice.Instrumentation.InvocationObserver observer__);
    }
}

namespace Example
{
    [_System.Runtime.InteropServices.ComVisible(false)]
    [_System.CodeDom.Compiler.GeneratedCodeAttribute("slice2cs", "3.5.1")]
    public sealed class ConverterDelM_ : Ice.ObjectDelM_, ConverterDel_
    {
        public string toUpper(string s, _System.Collections.Generic.Dictionary<string, string> context__, Ice.Instrumentation.InvocationObserver observer__)
        {
            IceInternal.Outgoing og__ = handler__.getOutgoing("toUpper", Ice.OperationMode.Normal, context__, observer__);
            try
            {
                try
                {
                    IceInternal.BasicStream os__ = og__.startWriteParams(Ice.FormatType.DefaultFormat);
                    os__.writeString(s);
                    og__.endWriteParams();
                }
                catch(Ice.LocalException ex__)
                {
                    og__.abort(ex__);
                }
                bool ok__ = og__.invoke();
                try
                {
                    if(!ok__)
                    {
                        try
                        {
                            og__.throwUserException();
                        }
                        catch(Ice.UserException ex__)
                        {
                            throw new Ice.UnknownUserException(ex__.ice_name(), ex__);
                        }
                    }
                    IceInternal.BasicStream is__ = og__.startReadParams();
                    string ret__;
                    ret__ = is__.readString();
                    og__.endReadParams();
                    return ret__;
                }
                catch(Ice.LocalException ex__)
                {
                    throw new IceInternal.LocalExceptionWrapper(ex__, false);
                }
            }
            finally
            {
                handler__.reclaimOutgoing(og__);
            }
        }
    }
}

namespace Example
{
    [_System.Runtime.InteropServices.ComVisible(false)]
    [_System.CodeDom.Compiler.GeneratedCodeAttribute("slice2cs", "3.5.1")]
    public sealed class ConverterDelD_ : Ice.ObjectDelD_, ConverterDel_
    {
        [_System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031")]
        public string toUpper(string s, _System.Collections.Generic.Dictionary<string, string> context__, Ice.Instrumentation.InvocationObserver observer__)
        {
            Ice.Current current__ = new Ice.Current();
            initCurrent__(ref current__, "toUpper", Ice.OperationMode.Normal, context__);
            string result__ = null;
            IceInternal.Direct.RunDelegate run__ = delegate(Ice.Object obj__)
            {
                Converter servant__ = null;
                try
                {
                    servant__ = (Converter)obj__;
                }
                catch(_System.InvalidCastException)
                {
                    throw new Ice.OperationNotExistException(current__.id, current__.facet, current__.operation);
                }
                result__ = servant__.toUpper(s, current__);
                return Ice.DispatchStatus.DispatchOK;
            };
            IceInternal.Direct direct__ = null;
            try
            {
                direct__ = new IceInternal.Direct(current__, run__);
                try
                {
                    Ice.DispatchStatus status__ = direct__.getServant().collocDispatch__(direct__);
                    _System.Diagnostics.Debug.Assert(status__ == Ice.DispatchStatus.DispatchOK);
                }
                finally
                {
                    direct__.destroy();
                }
            }
            catch(Ice.SystemException)
            {
                throw;
            }
            catch(_System.Exception ex__)
            {
                IceInternal.LocalExceptionWrapper.throwWrapper(ex__);
            }
            return result__;
        }
    }
}

namespace Example
{
    [_System.Runtime.InteropServices.ComVisible(false)]
    [_System.CodeDom.Compiler.GeneratedCodeAttribute("slice2cs", "3.5.1")]
    public abstract class ConverterDisp_ : Ice.ObjectImpl, Converter
    {
        #region Slice operations

        public string toUpper(string s)
        {
            return toUpper(s, Ice.ObjectImpl.defaultCurrent);
        }

        public abstract string toUpper(string s, Ice.Current current__);

        #endregion

        #region Slice type-related members

        public static new readonly string[] ids__ =
        {
            "::Example::Converter",
            "::Ice::Object"
        };

        public override bool ice_isA(string s)
        {
            return _System.Array.BinarySearch(ids__, s, IceUtilInternal.StringUtil.OrdinalStringComparer) >= 0;
        }

        public override bool ice_isA(string s, Ice.Current current__)
        {
            return _System.Array.BinarySearch(ids__, s, IceUtilInternal.StringUtil.OrdinalStringComparer) >= 0;
        }

        public override string[] ice_ids()
        {
            return ids__;
        }

        public override string[] ice_ids(Ice.Current current__)
        {
            return ids__;
        }

        public override string ice_id()
        {
            return ids__[0];
        }

        public override string ice_id(Ice.Current current__)
        {
            return ids__[0];
        }

        public static new string ice_staticId()
        {
            return ids__[0];
        }

        #endregion

        #region Operation dispatch

        [_System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
        public static Ice.DispatchStatus toUpper___(Converter obj__, IceInternal.Incoming inS__, Ice.Current current__)
        {
            checkMode__(Ice.OperationMode.Normal, current__.mode);
            IceInternal.BasicStream is__ = inS__.startReadParams();
            string s;
            s = is__.readString();
            inS__.endReadParams();
            string ret__ = obj__.toUpper(s, current__);
            IceInternal.BasicStream os__ = inS__.startWriteParams__(Ice.FormatType.DefaultFormat);
            os__.writeString(ret__);
            inS__.endWriteParams__(true);
            return Ice.DispatchStatus.DispatchOK;
        }

        private static string[] all__ =
        {
            "ice_id",
            "ice_ids",
            "ice_isA",
            "ice_ping",
            "toUpper"
        };

        public override Ice.DispatchStatus dispatch__(IceInternal.Incoming inS__, Ice.Current current__)
        {
            int pos = _System.Array.BinarySearch(all__, current__.operation, IceUtilInternal.StringUtil.OrdinalStringComparer);
            if(pos < 0)
            {
                throw new Ice.OperationNotExistException(current__.id, current__.facet, current__.operation);
            }

            switch(pos)
            {
                case 0:
                {
                    return ice_id___(this, inS__, current__);
                }
                case 1:
                {
                    return ice_ids___(this, inS__, current__);
                }
                case 2:
                {
                    return ice_isA___(this, inS__, current__);
                }
                case 3:
                {
                    return ice_ping___(this, inS__, current__);
                }
                case 4:
                {
                    return toUpper___(this, inS__, current__);
                }
            }

            _System.Diagnostics.Debug.Assert(false);
            throw new Ice.OperationNotExistException(current__.id, current__.facet, current__.operation);
        }

        #endregion

        #region Marshaling support

        protected override void writeImpl__(IceInternal.BasicStream os__)
        {
            os__.startWriteSlice(ice_staticId(), -1, true);
            os__.endWriteSlice();
        }

        protected override void readImpl__(IceInternal.BasicStream is__)
        {
            is__.startReadSlice();
            is__.endReadSlice();
        }

        #endregion
    }
}


text:
from functools import reduce
# url: http://oj.leetcode.com/problems/reverse-words-in-a-string/

class Solution:
    # @param s, a string
    # @return a string

    def reverseWords(self, s):
        words = s.split(' ')
        words = filter(lambda x: x is not '', words)
        if not words:
            return ""
        words.reverse()
        raw_result = reduce(lambda w1, w2: w1 + " " + w2, words)
        return raw_result.strip()


text:
#ifndef SaturatedArithmetic_h
#define SaturatedArithmetic_h

#include "base/numerics/saturated_arithmetic.h"

namespace WTF {
using base::SaturatedAddition;
using base::SaturatedSubtraction;
using base::SaturatedNegative;
using base::SaturatedSet;
}  // namespace WTF

using WTF::SaturatedAddition;
using WTF::SaturatedSubtraction;
using WTF::SaturatedNegative;
using WTF::SaturatedSet;

#endif  // SaturatedArithmetic_h


text:
'use strict';

var Model = require('../models').API.Category;

module.exports = {
  up: function (queryInterface) {
    return queryInterface.createTable(Model.tableName,
      Model.attributes).then(function() {
        for (var i = 0; i < Model.options.indexes.length; i++) {
          queryInterface.addIndex(Model.tableName, Model.options.indexes[i]);
        }
      }
    );
  },
  down: function (queryInterface) {
    return queryInterface.dropTable(Model.tableName);
  }
};


text:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!--
  //////////////////////////////////////////////////////////////////
  // Copyright (c) 2008-2013 Esri. All Rights Reserved.
  //
  // Licensed 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.
  ////////////////////////////////////////////////////////////////
-->
<application xmlns="http://ns.adobe.com/air/application/3.5">
    <id>@APPID@</id>
    <filename>@PROGRAMNAME@</filename>
    <versionNumber>@APPVER@</versionNumber>
    <versionLabel>@APPVER@ @APPVERSIONLABEL@</versionLabel>
    <description>
        <!-- first text used if no match found -->
        <text xml:lang="en">@APPDESC_en_US@</text>
        <text xml:lang="ar">@APPDESC_ar@</text>
        <text xml:lang="da">@APPDESC_da_DK@</text>
        <text xml:lang="de">@APPDESC_de_DE@</text>
        <text xml:lang="es">@APPDESC_es_ES@</text>
        <text xml:lang="et">@APPDESC_et_EE@</text>
        <text xml:lang="fi">@APPDESC_fi_FI@</text>
        <text xml:lang="fr">@APPDESC_fr_FR@</text>
        <text xml:lang="he">@APPDESC_he_IL@</text>
        <text xml:lang="it">@APPDESC_it_IT@</text>
        <text xml:lang="ja">@APPDESC_ja_JP@</text>
        <text xml:lang="ko">@APPDESC_ko_KR@</text>
        <text xml:lang="lt">@APPDESC_lt_LT@</text>
        <text xml:lang="lv">@APPDESC_lv_LV@</text>
        <text xml:lang="nb">@APPDESC_nb_NO@</text>
        <text xml:lang="nl">@APPDESC_nl_NL@</text>
        <text xml:lang="pl">@APPDESC_pl_PL@</text>
        <text xml:lang="pt">@APPDESC_pt_BR@</text>
        <text xml:lang="ro">@APPDESC_ro_RO@</text>
        <text xml:lang="ru">@APPDESC_ru_RU@</text>
        <text xml:lang="sv">@APPDESC_sv_SE@</text>
        <text xml:lang="zh">@APPDESC_zh_CN@</text>
    </description>
    <copyright>Copyright (c) 2014 Esri</copyright>
    <initialWindow>
        <content>@APPNAME@.swf</content>
        <width>1024</width>
        <height>730</height>
        <minSize>800 400</minSize>
    </initialWindow>
    <supportedProfiles>desktop</supportedProfiles>
    <icon>
        <image16x16>assets/images/Builder16.png</image16x16>
        <image32x32>assets/images/Builder32.png</image32x32>
        <image48x48>assets/images/Builder48.png</image48x48>
        <image128x128>assets/images/Builder128.png</image128x128>
    </icon>
    <allowBrowserInvocation>true</allowBrowserInvocation>
</application>


text:
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Multiply-included message file, so no include guard.

#include "base/files/file_path.h"
#include "content/public/common/common_param_traits.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_param_traits.h"

#define IPC_MESSAGE_START MimeRegistryMsgStart

// Mime registry messages sent from the renderer to the browser.

// Sent to query MIME information.
IPC_SYNC_MESSAGE_CONTROL1_1(MimeRegistryMsg_GetMimeTypeFromExtension,
                            base::FilePath::StringType /* extension */,
                            std::string /* mime_type */)