text:
package com.xinyiglass.xygdev.service;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import xygdev.commons.page.PagePub;
import xygdev.commons.sqlStmt.SqlStmtPub;

//正常应该是写在dao层的。Lov特殊处理,因为只有一个SQL就可以得到要的内容,所以先写在Service层。
//而且Lov的数据访问的重用性不是很高,以查询和验证数据为主,所以确实可以不用封装dao。
//关于分页处理的必须要封装。基本的逻辑是:给一个SQL,还有相关的条件,返回页的json数据结果-->2016.8.9已经完成
@Service
//不需要事务管理的(只查询的)方法,可以提高效率。
@Transactional(propagation=Propagation.NOT_SUPPORTED,readOnly=true)
public class LovService {

	@Autowired
	PagePub pagePub;

	/***用户LOV***/
	public String findUserForPage(Map<String,Object> conditionMap,Long loginId) throws Exception{
		StringBuffer sqlBuf=new StringBuffer();
		Map<String,Object> paramMap=new HashMap<String,Object>();
		sqlBuf.append("SELECT USER_ID,USER_NAME,DESCRIPTION FROM XYG_ALD_USER");
		sqlBuf.append(" WHERE (END_DATE IS NULL OR END_DATE > SYSDATE)");
		sqlBuf.append(SqlStmtPub.getAndStmt("USER_NAME", conditionMap.get("userName"),paramMap));
		sqlBuf.append(SqlStmtPub.getAndStmt("DESCRIPTION", conditionMap.get("userDesc"),paramMap));
		sqlBuf.append(" ORDER BY USER_ID ");
		return pagePub.qPageForJson(sqlBuf.toString(), paramMap, (Integer)conditionMap.get("pageSize"), (Integer)conditionMap.get("pageNo"),(boolean)conditionMap.get("goLastPage"));
	}

	/***用户(客户)LOV***/
	public String findCustUserForPage(Map<String,Object> conditionMap,Long loginId) throws Exception{
		StringBuffer sqlBuf=new StringBuffer();
		Map<String,Object> paramMap=new HashMap<String,Object>();
		sqlBuf.append("SELECT USER_ID,USER_NAME,DESCRIPTION FROM XYG_ALD_USER");
		sqlBuf.append(" WHERE (END_DATE IS NULL OR END_DATE > SYSDATE)");
		sqlBuf.append("   AND USER_TYPE = 'CUSTOMER'");
		sqlBuf.append(SqlStmtPub.getAndStmt("USER_NAME", conditionMap.get("userName"),paramMap));
		sqlBuf.append(SqlStmtPub.getAndStmt("DESCRIPTION", conditionMap.get("userDesc"),paramMap));
		sqlBuf.append(" ORDER BY USER_ID ");
		return pagePub.qPageForJson(sqlBuf.toString(), paramMap, (Integer)conditionMap.get("pageSize"), (Integer)conditionMap.get("pageNo"),(boolean)conditionMap.get("goLastPage"));
	}

	/***职责LOV***/
	public String findRespForPage(Map<String,Object> conditionMap,Long loginId) throws Exception{
		StringBuffer sqlBuf=new StringBuffer();
		Map<String,Object> paramMap=new HashMap<String,Object>();
		sqlBuf.append("SELECT RESP_ID,RESP_CODE,RESP_NAME,DESCRIPTION FROM XYG_ALD_RESP_VL");
		sqlBuf.append(" WHERE (END_DATE IS NULL OR END_DATE > SYSDATE)");
		sqlBuf.append(" AND APPL_ID = XYG_ALD_GLOBAL_PKG.appl_id");
		sqlBuf.append(SqlStmtPub.getAndStmt("RESP_CODE", conditionMap.get("respCode"),paramMap));
		sqlBuf.append(SqlStmtPub.getAndStmt("RESP_NAME", conditionMap.get("respName"),paramMap));
		sqlBuf.append(" ORDER BY RESP_ID ");
		return pagePub.qPageForJson(sqlBuf.toString(), paramMap,  (Integer)conditionMap.get("pageSize"), (Integer)conditionMap.get("pageNo"),(boolean)conditionMap.get("goLastPage"));
	}

	/***职责(客户)LOV***/
	public String findCustRespForPage(Map<String,Object> conditionMap,Long loginId) throws Exception{
		StringBuffer sqlBuf=new StringBuffer();
		Map<String,Object> paramMap=new HashMap<String,Object>();
		sqlBuf.append("SELECT RESP_ID,RESP_CODE,RESP_NAME,DESCRIPTION FROM XYG_ALD_RESP_VL");
		sqlBuf.append(" WHERE (END_DATE IS NULL OR END_DATE > SYSDATE)");
		sqlBuf.append(" AND APPL_ID = XYG_ALD_GLOBAL_PKG.appl_id");
		sqlBuf.append(" AND RESP_TYPE = 'CUSTOMER'");
		sqlBuf.append(SqlStmtPub.getAndStmt("RESP_CODE", conditionMap.get("respCode"),paramMap));
		sqlBuf.append(SqlStmtPub.getAndStmt("RESP_NAME", conditionMap.get("respName"),paramMap));
		sqlBuf.append(" ORDER BY RESP_ID ");
		return pagePub.qPageForJson(sqlBuf.toString(), paramMap,  (Integer)conditionMap.get("pageSize"), (Integer)conditionMap.get("pageNo"),(boolean)conditionMap.get("goLastPage"));
	}

	/***员工LOV***/
	public String findEmpForPage(Map<String,Object> conditionMap,Long loginId) throws Exception{
		StringBuffer sqlBuf=new StringBuffer();
		Map<String,Object> paramMap=new HashMap<String,Object>();
		sqlBuf.append("SELECT PERSON_ID EMP_ID,FULL_NAME ENAME,EMPLOYEE_NUMBER EMPNO FROM XYG_ALH_PER_PEOPLE");
		sqlBuf.append(" WHERE 1 = 1");
		sqlBuf.append(SqlStmtPub.getAndStmt("FULL_NAME",conditionMap.get("ename"),paramMap));
		sqlBuf.append(SqlStmtPub.getAndStmt("EMPLOYEE_NUMBER", conditionMap.get("eno"),paramMap));
		sqlBuf.append(" ORDER BY EMP_ID");
		return pagePub.qPageForJson(sqlBuf.toString(), paramMap,  (Integer)conditionMap.get("pageSize"), (Integer)conditionMap.get("pageNo"),(boolean)conditionMap.get("goLastPage"));
	}

	/***工作组LOV***/
	public String findGroupForPage(Map<String,Object> conditionMap,Long loginId) throws Exception{
		StringBuffer sqlBuf=new StringBuffer();
		Map<String,Object> paramMap=new HashMap<String,Object>();
		sqlBuf.append("SELECT GROUP_ID,GROUP_CODE,GROUP_NAME,DESCRIPTION FROM XYG_ALD_GROUP_HEADERS");
		sqlBuf.append(" WHERE 1 = 1");
		sqlBuf.append(" AND APPL_ID = XYG_ALD_GLOBAL_PKG.appl_id");
		sqlBuf.append(SqlStmtPub.getAndStmt("GROUP_CODE",conditionMap.get("groupCode"),paramMap));
		sqlBuf.append(SqlStmtPub.getAndStmt("GROUP_NAME", conditionMap.get("groupName"),paramMap));
		sqlBuf.append(" ORDER BY GROUP_ID");
		return pagePub.qPageForJson(sqlBuf.toString(), paramMap, (Integer)conditionMap.get("pageSize"), (Integer)conditionMap.get("pageNo"),(boolean)conditionMap.get("goLastPage"));
	}

	/***菜单LOV***/
	public String findMenuForPage(Map<String,Object> conditionMap,Long loginId) throws Exception{
		StringBuffer sqlBuf=new StringBuffer();
		Map<String,Object> paramMap=new HashMap<String,Object>();
		sqlBuf.append("SELECT MENU_ID,MENU_CODE,MENU_NAME,DESCRIPTION FROM XYG_ALD_MENU_HEADERS_VL");
		sqlBuf.append(" WHERE 1 = 1");
		sqlBuf.append(" AND APPL_ID = XYG_ALD_GLOBAL_PKG.appl_id");
		sqlBuf.append(SqlStmtPub.getAndStmt("MENU_CODE", conditionMap.get("menuCode"),paramMap));
		sqlBuf.append(SqlStmtPub.getAndStmt("MENU_NAME", conditionMap.get("menuName"),paramMap));
		sqlBuf.append(" ORDER BY MENU_ID");
		return pagePub.qPageForJson(sqlBuf.toString(), paramMap, (Integer)conditionMap.get("pageSize"), (Integer)conditionMap.get("pageNo"),(boolean)conditionMap.get("goLastPage"));
	}

	/***图标LOV***/
	public String findIconForPage(Map<String,Object> conditionMap,Long loginId) throws Exception{
		StringBuffer sqlBuf=new StringBuffer();
		Map<String,Object> paramMap=new HashMap<String,Object>();
		sqlBuf.append("SELECT ICON_ID,ICON_CODE,DESCRIPTION,ICON_SOURCE FROM XYG_ALD_ICONS");
		sqlBuf.append(" WHERE 1 = 1");
		sqlBuf.append(SqlStmtPub.getAndStmt("ICON_CODE",conditionMap.get("iconCode"),paramMap));
		sqlBuf.append(SqlStmtPub.getAndStmt("DESCRIPTION", conditionMap.get("iconDesc"),paramMap));
		sqlBuf.append(" ORDER BY ICON_ID");
		return pagePub.qPageForJson(sqlBuf.toString(), paramMap, (Integer)conditionMap.get("pageSize"), (Integer)conditionMap.get("pageNo"),(boolean)conditionMap.get("goLastPage"));
	}

	/***库存组织LOV***/
	public String findOrganizationForPage(Map<String,Object> conditionMap,Long loginId) throws Exception{
		StringBuffer sqlBuf=new StringBuffer();
		Map<String,Object> paramMap=new HashMap<String,Object>();
		sqlBuf.append("SELECT ORGANIZATION_ID,ORGANIZATION_CODE,ORGANIZATION_NAME FROM XYG_ALI_ORGANIZATION_VL");
		sqlBuf.append(" WHERE 1 = 1");
		sqlBuf.append("   AND GLASS_INDUSTRY = 'QB'");
		sqlBuf.append("   AND DISABLE_DATE IS NULL");
		sqlBuf.append(SqlStmtPub.getAndStmt("ORGANIZATION_CODE",conditionMap.get("oCode"),paramMap));
		sqlBuf.append(SqlStmtPub.getAndStmt("ORGANIZATION_NAME", conditionMap.get("oName"),paramMap));
		sqlBuf.append(" ORDER BY ORGANIZATION_ID");
		return pagePub.qPageForJson(sqlBuf.toString(), paramMap, (Integer)conditionMap.get("pageSize"), (Integer)conditionMap.get("pageNo"),(boolean)conditionMap.get("goLastPage"));
	}

	/***用户库存权限LOV 库存查询,技术资料用***/
	public String findUserOrganizationForInv(Map<String,Object> conditionMap,Long loginId) throws Exception{
		StringBuffer sqlBuf=new StringBuffer();
		Map<String,Object> paramMap=new HashMap<String,Object>();
		paramMap.put("1",conditionMap.get("userId"));
		sqlBuf.append("SELECT ORGANIZATION_ID,ORGANIZATION_CODE,ORGANIZATION_NAME FROM XYG_QBORD_INV_PERMISSION_V");
		sqlBuf.append(" WHERE 1 = 1");
		sqlBuf.append("   AND USER_ID = :1");
		sqlBuf.append(SqlStmtPub.getAndStmt("ORGANIZATION_CODE",conditionMap.get("oCode"),paramMap));
		sqlBuf.append(SqlStmtPub.getAndStmt("ORGANIZATION_NAME", conditionMap.get("oName"),paramMap));
		sqlBuf.append(" ORDER BY ORGANIZATION_ID");
		return pagePub.qPageForJson(sqlBuf.toString(), paramMap, (Integer)conditionMap.get("pageSize"), (Integer)conditionMap.get("pageNo"),(boolean)conditionMap.get("goLastPage"));
	}

	/***用户库存权限LOV 订单明细用***/
	public String findUserOrganizationForContr(Map<String,Object> conditionMap,Long loginId) throws Exception{
		StringBuffer sqlBuf=new StringBuffer();
		Map<String,Object> paramMap=new HashMap<String,Object>();
		paramMap.put("1",conditionMap.get("userId"));
		sqlBuf.append("SELECT ORGANIZATION_ID,ORGANIZATION_CODE,ORGANIZATION_NAME FROM XYG_QBORD_INV_PERMISSION_V");
		sqlBuf.append(" WHERE 1 = 1");
		sqlBuf.append("   AND USER_ID = :1");
		sqlBuf.append("   AND SYSDATE BETWEEN START_DATE_ACTIVE AND NVL(END_DATE_ACTIVE,SYSDATE+1)");
		sqlBuf.append(SqlStmtPub.getAndStmt("ORGANIZATION_CODE",conditionMap.get("oCode"),paramMap));
		sqlBuf.append(SqlStmtPub.getAndStmt("ORGANIZATION_NAME", conditionMap.get("oName"),paramMap));
		sqlBuf.append(" ORDER BY ORGANIZATION_ID");
		return pagePub.qPageForJson(sqlBuf.toString(), paramMap, (Integer)conditionMap.get("pageSize"), (Integer)conditionMap.get("pageNo"),(boolean)conditionMap.get("goLastPage"));
	}

	/***功能LOV***/
	public String findFuncForPage(Map<String,Object> conditionMap,Long loginId) throws Exception{
		StringBuffer sqlBuf=new StringBuffer();
		Map<String,Object> paramMap=new HashMap<String,Object>();
		sqlBuf.append("SELECT FUNCTION_ID,FUNCTION_CODE,FUNCTION_NAME,DESCRIPTION FROM XYG_ALD_FUNCTIONS_VL");
		sqlBuf.append(" WHERE 1 = 1");
		sqlBuf.append("   AND APPL_ID = XYG_ALD_GLOBAL_PKG.appl_id");
		sqlBuf.append(SqlStmtPub.getAndStmt("FUNCTION_CODE",conditionMap.get("funcCode"),paramMap));
		sqlBuf.append(SqlStmtPub.getAndStmt("FUNCTION_NAME", conditionMap.get("funcName"),paramMap));
		sqlBuf.append(" ORDER BY FUNCTION_ID");
		return pagePub.qPageForJson(sqlBuf.toString(), paramMap, (Integer)conditionMap.get("pageSize"), (Integer)conditionMap.get("pageNo"),(boolean)conditionMap.get("goLastPage"));
	}

	/***客户(后台分配界面)LOV***/
	public String findCustAllForPage(Map<String,Object> conditionMap,Long loginId) throws Exception{
		StringBuffer sqlBuf=new StringBuffer();
		Map<String,Object> paramMap=new HashMap<String,Object>();
		sqlBuf.append("SELECT XACA.*");
		sqlBuf.append("  FROM (SELECT OPERATING_UNIT");
		sqlBuf.append("          FROM XYG_ALI_ORGANIZATION_VL");
		sqlBuf.append("         WHERE GLASS_INDUSTRY = 'QB'");
		sqlBuf.append("         GROUP BY OPERATING_UNIT) XAO");
		sqlBuf.append("      ,XYG_ALFR_CUST_ACCOUNT_V XACA");
		sqlBuf.append(" WHERE 1 = 1");
		sqlBuf.append("   AND STATUS='A'");
		sqlBuf.append("   AND XACA.ORG_ID=XAO.OPERATING_UNIT");
		//sqlBuf.append("   AND XACA.PRODUCT_LIST_HEADER_ID IS NOT NULL");  去掉价目表非空条件筛选    2017.10.30 MODIFY BY BIRD
		sqlBuf.append(SqlStmtPub.getAndStmt("PARTY_NAME", conditionMap.get("partyName"),paramMap));
		sqlBuf.append(SqlStmtPub.getAndStmt("ACCOUNT_NUMBER", conditionMap.get("accountNumber"),paramMap));
		sqlBuf.append(" ORDER BY XACA.ORG_ID,XACA.CUST_ACCOUNT_ID");
		return pagePub.qPageForJson(sqlBuf.toString(), paramMap, (Integer)conditionMap.get("pageSize"), (Integer)conditionMap.get("pageNo"),(boolean)conditionMap.get("goLastPage"));
	}

	/***用户客户LOV***/
	public String findUserCustForPage(Map<String,Object> conditionMap,Long loginId) throws Exception{
		StringBuffer sqlBuf=new StringBuffer();
		Map<String,Object> paramMap=new HashMap<String,Object>();
		sqlBuf.append("SELECT XACA.* ");
		sqlBuf.append("  FROM XYG_ALFR_CUST_ACCOUNT_V XACA");
		sqlBuf.append("      ,XYG_ALD_USER XAU");
		sqlBuf.append("  	 ,XYG_ALD_USER_GROUP_V XAUG");
		sqlBuf.append(" WHERE 1=1");
		sqlBuf.append(SqlStmtPub.getAndStmt("XACA.PARTY_NAME", conditionMap.get("partyName"),paramMap));
		sqlBuf.append(SqlStmtPub.getAndStmt("XACA.ACCOUNT_NUMBER", conditionMap.get("accountNumber"),paramMap));
		sqlBuf.append("   AND XAU.USER_ID= :1");
		sqlBuf.append("   AND XAUG.USER_ID(+)=XAU.USER_ID");
		sqlBuf.append("   AND XAUG.GROUP_APPL_ID(+) = XYG_ALD_GLOBAL_PKG.APPL_ID");
	    sqlBuf.append("   AND (XAU.USER_TYPE='CUSTOMER'");
	    sqlBuf.append("       AND EXISTS(SELECT 1");
	    sqlBuf.append("                    FROM XYG_ALD_USER_CUST_V XAUC");
	    sqlBuf.append("		              WHERE XAUC.USER_ID = :1");
	    sqlBuf.append("		                AND XAUC.ACT_ID = XACA.ACT_ID)");
	    sqlBuf.append("		   OR XAU.USER_TYPE='EMP'");
	    sqlBuf.append("		      AND XACA.ACT_ID IN (SELECT H.CUST_ID");
	    sqlBuf.append("                                 FROM XYG_ALD_GROUP_LINES H");
	    sqlBuf.append("		                           WHERE H.GROUP_ID IN (SELECT S.SUB_GROUP_ID");
	    sqlBuf.append("		                                                  FROM XYG_ALD_GROUP_LINES S");
	    sqlBuf.append("		                                                 WHERE 1=1");
	    sqlBuf.append("		                                                   AND S.SUB_GROUP_ID IS NOT NULL");
	    sqlBuf.append("                                                 CONNECT BY NOCYCLE PRIOR S.SUB_GROUP_ID = S.GROUP_ID");
	    sqlBuf.append("                                                 START WITH S.GROUP_ID = XAUG.GROUP_ID");
	    sqlBuf.append("                                                  UNION ALL");
	    sqlBuf.append("		                                                SELECT XAUG.GROUP_ID FROM DUAL)))");
		/*
		sqlBuf.append("   AND (XACA.ACT_ID IN (SELECT CUST_ID");
		sqlBuf.append("					   FROM XYG_ALD_GROUP_LINES");
		sqlBuf.append("					  WHERE GROUP_ID IN(SELECT SUB_GROUP_ID");
		sqlBuf.append("										  FROM XYG_ALD_GROUP_LINES");
		sqlBuf.append("										 WHERE 1=1");
		sqlBuf.append("										   AND SUB_GROUP_ID IS NOT NULL");
		sqlBuf.append("									CONNECT BY NOCYCLE PRIOR SUB_GROUP_ID = GROUP_ID");
		sqlBuf.append("									START WITH GROUP_ID = (SELECT GROUP_ID");
		sqlBuf.append("										  					 FROM XYG_ALD_USER_GROUP_V");
		sqlBuf.append("										 					WHERE USER_ID = :1");
		sqlBuf.append("															  AND USER_TYPE = 'EMP'");
		sqlBuf.append("															  AND GROUP_APPL_ID = XYG_ALD_GLOBAL_PKG.APPL_ID))");
		sqlBuf.append("					     OR GROUP_ID = (SELECT GROUP_ID");
		sqlBuf.append("							              FROM XYG_ALD_USER_GROUP_V");
		sqlBuf.append("										 WHERE USER_ID = :1");
		sqlBuf.append("										   AND USER_TYPE = 'EMP'");
		sqlBuf.append("										   AND GROUP_APPL_ID = XYG_ALD_GLOBAL_PKG.APPL_ID))");
		sqlBuf.append("    OR XACA.ACT_ID IN (SELECT XACA1.ACT_ID");
		sqlBuf.append("					   FROM XYG_ALD_USER_CUST_V XACA1");
		sqlBuf.append("					  WHERE XACA1.USER_ID = :1");
		sqlBuf.append("					    AND XACA1.USER_TYPE = 'CUSTOMER'");
		sqlBuf.append("                     AND SYSDATE BETWEEN  XACA1.START_DATE AND NVL( XACA1.END_DATE,SYSDATE+1)");
		sqlBuf.append("					    AND XACA1.APPL_ID = XYG_ALD_GLOBAL_PKG.APPL_ID))");
		*/
		sqlBuf.append(" ORDER BY XACA.ORG_ID,XACA.CUST_ACCOUNT_ID");
		paramMap.put("1", conditionMap.get("userId"));
		return pagePub.qPageForJson(sqlBuf.toString(), paramMap, (Integer)conditionMap.get("pageSize"), (Integer)conditionMap.get("pageNo"),(boolean)conditionMap.get("goLastPage"));
	}

	/***物料LOV***/
	public String findItemForPage(Map<String,Object> conditionMap,Long loginId) throws Exception{
		StringBuffer sqlBuf=new StringBuffer();
		Map<String,Object> paramMap=new HashMap<String,Object>();
		sqlBuf.append("SELECT * ");
		sqlBuf.append("	 FROM(SELECT XQIT1.INVENTORY_ITEM_ID,XQIT1.ITEM_NUMBER,XQIT1.DESCRIPTION,XQIT1.CARNAME,XQPH.NOT_CONTROL");
		sqlBuf.append("  		FROM XYG_QBO_PRODUCT_LINE_LIST XQPL");
		sqlBuf.append("      		,XYG_QBO_PRODUCT_HEADER_LIST XQPH");
		sqlBuf.append("      		,XYG_QBI_ITEM_TP_B XQIT1");
		sqlBuf.append(" 		WHERE EXISTS (SELECT 1");
		sqlBuf.append("                 		FROM XYG_ALFR_CUST_ACCOUNT XACA1");
		sqlBuf.append("                 		WHERE XQPL.LIST_HEADER_ID = XACA1.PRODUCT_LIST_HEADER_ID ");
		sqlBuf.append("                   		AND XACA1.CUST_ACCOUNT_ID = :1");
		sqlBuf.append("                   		AND XACA1.ORG_ID = :2)");
		sqlBuf.append("   		  AND EXISTS (SELECT 1");
		sqlBuf.append("                			FROM XYG_QBI_ITEM_TP_B XQIT2");
		sqlBuf.append("               		   WHERE XQIT2.INVENTORY_ITEM_ID = XQPL.ITEM_ID ");
		sqlBuf.append("                 		 AND XQIT2.ORGANIZATION_ID = :3");
		sqlBuf.append("                 		 AND XQIT2.CHECKFLAG <> 'N'");
		sqlBuf.append("                 		 AND XQIT2.ENABLED_FLAG <> 'N')");
		sqlBuf.append("   		  AND XQIT1.INVENTORY_ITEM_ID = XQPL.ITEM_ID");
		sqlBuf.append("   		  AND XQIT1.ORGANIZATION_ID = :3");
		sqlBuf.append("   	      AND XQPL.LIST_HEADER_ID = XQPH.LIST_HEADER_ID");
		sqlBuf.append("   	      AND XQPH.NOT_CONTROL = 'Y')");
		sqlBuf.append(" WHERE 1 = 1 ");
		//sqlBuf.append(SqlStmtPub.getAndStmt("ORGANIZATION_ID",conditionMap.get("organizationId"),paramMap,true));
		sqlBuf.append(SqlStmtPub.getAndStmt("DESCRIPTION",conditionMap.get("description"),paramMap));
		sqlBuf.append(SqlStmtPub.getAndStmt("CARNAME",conditionMap.get("carName"),paramMap));
		sqlBuf.append(" ORDER BY INVENTORY_ITEM_ID");
		paramMap.put("1", conditionMap.get("customerId"));
		paramMap.put("2", conditionMap.get("salesOrgId"));
		paramMap.put("3", conditionMap.get("organizationId"));
		return pagePub.qPageForJson(sqlBuf.toString(), paramMap, (Integer)conditionMap.get("pageSize"), (Integer)conditionMap.get("pageNo"),(boolean)conditionMap.get("goLastPage"));
	}

	/***产品种类 LOV***/
	public String findProductForPage(Map<String,Object> conditionMap,Long loginId,String lang) throws Exception{
		StringBuffer sqlBuf=new StringBuffer();
		Map<String,Object> paramMap=new HashMap<String,Object>();
		sqlBuf.append("SELECT LOOKUP_CODE,DESCRIPTION FROM XYG_ALD_LOOKUP_VALUES");
		sqlBuf.append(" WHERE 1 = 1");
		sqlBuf.append("   AND LANGUAGE = :1 ");
		sqlBuf.append("   AND LOOKUP_TYPE='XYG_TP_PRODUCTTYPE_SET'");
		sqlBuf.append("   AND ENABLED_FLAG='Y'");
		sqlBuf.append("   AND SYSDATE BETWEEN START_DATE_ACTIVE AND NVL(END_DATE_ACTIVE,SYSDATE+1)");
		sqlBuf.append(SqlStmtPub.getAndStmt("DESCRIPTION",conditionMap.get("description"),paramMap));
		sqlBuf.append(" ORDER BY LOOKUP_CODE");
		paramMap.put("1", lang);
		return pagePub.qPageForJson(sqlBuf.toString(), paramMap, (Integer)conditionMap.get("pageSize"), (Integer)conditionMap.get("pageNo"),(boolean)conditionMap.get("goLastPage"));
	}

	/***加工类型LOV***/
	public String findProcessForPage(Map<String,Object> conditionMap,Long loginId,String lang) throws Exception{
		StringBuffer sqlBuf=new StringBuffer();
		Map<String,Object> paramMap=new HashMap<String,Object>();
		sqlBuf.append("SELECT LOOKUP_CODE,DESCRIPTION FROM XYG_ALD_LOOKUP_VALUES");
		sqlBuf.append(" WHERE 1 = 1");
		sqlBuf.append("   AND LANGUAGE = :1 ");
		sqlBuf.append("   AND LOOKUP_TYPE='XYG_TP_PROCESSTYPE_SET'");
		sqlBuf.append("   AND ENABLED_FLAG='Y'");
		sqlBuf.append("   AND SYSDATE BETWEEN START_DATE_ACTIVE AND NVL(END_DATE_ACTIVE,SYSDATE+1)");
		sqlBuf.append(SqlStmtPub.getAndStmt("DESCRIPTION",conditionMap.get("description"),paramMap));
		sqlBuf.append(" ORDER BY LOOKUP_CODE");
		paramMap.put("1", lang);
		return pagePub.qPageForJson(sqlBuf.toString(), paramMap, (Integer)conditionMap.get("pageSize"), (Integer)conditionMap.get("pageNo"),(boolean)conditionMap.get("goLastPage"));
	}

	/***装车位置LOV***/
	public String findLoadForPage(Map<String,Object> conditionMap,Long loginId,String lang) throws Exception{
		StringBuffer sqlBuf=new StringBuffer();
		Map<String,Object> paramMap=new HashMap<String,Object>();
		sqlBuf.append("SELECT LOOKUP_CODE,DESCRIPTION FROM XYG_ALD_LOOKUP_VALUES");
		sqlBuf.append(" WHERE 1 = 1");
		sqlBuf.append("   AND LANGUAGE = :1 ");
		sqlBuf.append("   AND LOOKUP_TYPE='XYG_TP_LOCATION_SET'");
		sqlBuf.append("   AND ENABLED_FLAG='Y'");
		sqlBuf.append("   AND SYSDATE BETWEEN START_DATE_ACTIVE AND NVL(END_DATE_ACTIVE,SYSDATE+1)");
		sqlBuf.append(SqlStmtPub.getAndStmt("DESCRIPTION",conditionMap.get("description"),paramMap));
		sqlBuf.append(" ORDER BY LOOKUP_CODE");
		paramMap.put("1", lang);
		return pagePub.qPageForJson(sqlBuf.toString(), paramMap, (Integer)conditionMap.get("pageSize"), (Integer)conditionMap.get("pageNo"),(boolean)conditionMap.get("goLastPage"));
	}

}


text:
package com.programmingspring.koans.service.explicit.spring;

import com.programmingspring.koans.repository.MyRepository;
import com.programmingspring.koans.service.MyService;
import org.springframework.beans.factory.annotation.Autowired;

public class ServiceWithTwoNamedConstructorDependencies implements MyService {

    private final MyRepository firstRepository;
    private final MyRepository secondRepository;

    @Autowired
    public ServiceWithTwoNamedConstructorDependencies(MyRepository repoOne, MyRepository repoTwo) {
        this.firstRepository = repoOne;
        this.secondRepository = repoTwo;
    }

    public MyRepository getRepository() {
        return firstRepository;
    }

    public MyRepository getSecondRepository() {
        return secondRepository;
    }
}

redpajama_set_name: RedPajamaGithub


text: Not yet functional. Work in progress..


text:
<?php

namespace litepubl\widget;

use litepubl\tag\Tags as Owner;
use litepubl\view\Lang;

class Tags extends CommonTags
{

    protected function create()
    {
        parent::create();
        $this->basename = 'widget.tags';
        $this->template = 'tags';
        $this->sortname = 'title';
        $this->showcount = false;
    }

    public function getDeftitle(): string
    {
        return Lang::get('default', 'tags');
    }

    public function getOwner()
    {
        return Owner::i();
    }
}


text:
package com.bbn.xdata.twitter;

//
// these lines intentionally left blank.
//
//
//
//
// end lines left blank
//
public enum TwitterDataColumn {
	id,
	text,
	created_at,
	rt_count,
	point_geom,
	hashtag,
	mentions,
	in_reply_to_id,
	in_reply_user_id,
	in_reply_user_screen_name,
	link,
	place_country,
	place_country_code,
	place_full_name,
	place_id,
	place_name,
	place_street_address,
	place_type,
	place_url,
	user_description,
	user_id,
	user_location,
	user_name,
	user_screen_name,
	translated,
	source,
	text_translated,
	text_translit,
	hashtag_translit,
	mentions_translit,
	in_reply_to_user_screen_name_translit,
	user_description_translit,
	user_location_translit,
	user_name_translit,
	user_screen_name_translit,
	lang_primary,
	lang_secondary,
	date_translated,
	geo_country,
	geo_cocom,
	sentiment,
	longitude,
	latitude,
	;

	public static String toCSVString() {
		return toDelimitedString( "," );
	}

	public static String toTSVString() {
		return toDelimitedString( "\t" );
	}

	public static String toDelimitedString(String delim) {
		StringBuffer sb = new StringBuffer();
		boolean first = true;
		for( TwitterDataColumn s : TwitterDataColumn.values() ) {
			if( first ) {
				sb.append( s.toString() );
				first = false;
			}
			else {
				sb.append( delim );
				sb.append( s.toString() );
			}
		}
		return sb.toString();
	}

	public int toIndex( ) {
		return this.ordinal();
	}

	public static TwitterDataColumn fromIndex( int index ) {
		return TwitterDataColumn.values()[index];
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		System.out.println( toCSVString() );
		int index = 0;
		for( TwitterDataColumn s : TwitterDataColumn.values() ) {
			System.out.println( s.toIndex() + "," + s.toString() + "," + TwitterDataColumn.fromIndex(index++) );
		}

	}

}


text:
package org.kuali.kra.subaward.bo;

import org.kuali.kra.award.home.Award;
import org.kuali.kra.award.home.AwardAmountInfo;
import org.kuali.coeus.sys.api.model.ScaleTwoDecimal;

import java.sql.Date;

public class SubAwardFundingSource extends SubAwardAssociate {

    private static final long serialVersionUID = 1L;

    private Integer subAwardFundingSourceId;
    private Long subAwardId;
    private String subAwardCode;
    private Long awardId;

    private String accountNumber;

    private Integer statusCode;

    private String sponsorCode;

    private String sponsorName;

    private Award award;

    private ScaleTwoDecimal amountObligatedToDate;

    private Date obligationExpirationDate;

    private String awardNumber;

    private AwardAmountInfo awardAmountInfo;

    public SubAwardFundingSource() {

    }

    /**
     *
     * Constructs a SubAwardFundingSource.java.
     * @param award
     */
    public SubAwardFundingSource(Award award) {
        this();
        this.award = award;
        this.award.setAwardNumber("");
    }

    /**.
	 * This is the Getter Method
	 * for subAwardFundingSourceId
	 * @return Returns the subAwardFundingSourceId.
	 */
	public Integer getSubAwardFundingSourceId() {
		return subAwardFundingSourceId;
	}

	/**.
	 * This is the Setter Method for subAwardFundingSourceId
	 * @param subAwardFundingSourceId The subAwardFundingSourceId to set.
	 */
	public void setSubAwardFundingSourceId(Integer subAwardFundingSourceId) {
		this.subAwardFundingSourceId = subAwardFundingSourceId;
	}

	/**.
	 * This is the Getter Method for subAwardId
	 * @return Returns the subAwardId.
	 */
	public Long getSubAwardId() {
		return subAwardId;
	}

	/**.
	 * This is the Setter Method for subAwardId
	 * @param subAwardId The subAwardId to set.
	 */
	public void setSubAwardId(Long subAwardId) {
		this.subAwardId = subAwardId;
	}

	/**.
	 * This is the Getter Method for subAwardCode
	 * @return Returns the subAwardCode.
	 */
	public String getSubAwardCode() {
		return subAwardCode;
	}

	/**.
	 * This is the Setter Method for subAwardCode
	 * @param subAwardCode The subAwardCode to set.
	 */
	public void setSubAwardCode(String subAwardCode) {
		this.subAwardCode = subAwardCode;
	}

	/**.
	 * This is the Getter Method for awardId
	 * @return Returns the awardId.
	 */
	public Long getAwardId() {
		return awardId;
	}

	/**.
	 * This is the Setter Method for awardId
	 * @param awardId The awardId to set.
	 */
	public void setAwardId(Long awardId) {
		this.awardId = awardId;
	}

	/**.
	 * This is the Getter Method for accountNumber
	 * @return Returns the accountNumber.
	 */
	public String getAccountNumber() {
		return accountNumber;
	}

	/**.
	 * This is the Setter Method for accountNumber
	 * @param accountNumber The accountNumber to set.
	 */
	public void setAccountNumber(String accountNumber) {
		this.accountNumber = accountNumber;
	}

	/**.
	 * This is the Getter Method for statusCode
	 * @return Returns the statusCode.
	 */
	public Integer getStatusCode() {
		return statusCode;
	}

	/**.
	 * This is the Setter Method for statusCode
	 * @param statusCode The statusCode to set.
	 */
	public void setStatusCode(Integer statusCode) {
		this.statusCode = statusCode;
	}

	/**.
	 * This is the Getter Method for sponsorCode
	 * @return Returns the sponsorCode.
	 */
	public String getSponsorCode() {
		return sponsorCode;
	}

	/**.
	 * This is the Setter Method for sponsorCode
	 * @param sponsorCode The sponsorCode to set.
	 */
	public void setSponsorCode(String sponsorCode) {
		this.sponsorCode = sponsorCode;
	}

	/**.
	 * This is the Getter Method for sponsorName
	 * @return Returns the sponsorName.
	 */
	public String getSponsorName() {
		return sponsorName;
	}

	/**.
	 * This is the Setter Method for sponsorName
	 * @param sponsorName The sponsorName to set.
	 */
	public void setSponsorName(String sponsorName) {
		this.sponsorName = sponsorName;
	}

	/**.
	 * This is the Getter Method for award
	 * @return Returns the award.
	 */
	public Award getAward() {
		return award;
	}

	/**.
	 * This is the Setter Method for award
	 * @param award The award to set.
	 */
	public void setAward(Award award) {
		this.award = award;
	}

	/**.
	 * This is the Getter Method for amountObligatedToDate
	 * @return Returns the amountObligatedToDate.
	 */
	public ScaleTwoDecimal getAmountObligatedToDate() {
		return amountObligatedToDate;
	}

	/**.
	 * This is the Setter Method for amountObligatedToDate
	 * @param amountObligatedToDate The amountObligatedToDate to set.
	 */
	public void setAmountObligatedToDate(ScaleTwoDecimal amountObligatedToDate) {
		this.amountObligatedToDate = amountObligatedToDate;
	}

	/**.
	 * This is the Getter Method for obligationExpirationDate
	 * @return Returns the obligationExpirationDate.
	 */
	public Date getObligationExpirationDate() {
		return obligationExpirationDate;
	}

	/**.
	 * This is the Setter Method for obligationExpirationDate
	 * @param obligationExpirationDate The obligationExpirationDate to set.
	 */
	public void setObligationExpirationDate(Date obligationExpirationDate) {
		this.obligationExpirationDate = obligationExpirationDate;
	}

	/**.
	 * This is the Getter Method for awardNumber
	 * @return Returns the awardNumber.
	 */
	public String getAwardNumber() {
		return awardNumber;
	}

	/**.
	 * This is the Setter Method for awardNumber
	 * @param awardNumber The awardNumber to set.
	 */
	public void setAwardNumber(String awardNumber) {
		this.awardNumber = awardNumber;
	}

	/**.
	 * This is the Getter Method for awardAmountInfo
	 * @return Returns the awardAmountInfo.
	 */
	public AwardAmountInfo getAwardAmountInfo() {
		return awardAmountInfo;
	}

	/**.
	 * This is the Setter Method for awardAmountInfo
	 * @param awardAmountInfo The awardAmountInfo to set.
	 */
	public void setAwardAmountInfo(AwardAmountInfo awardAmountInfo) {
		this.awardAmountInfo = awardAmountInfo;
	}

	@Override
    public void resetPersistenceState() {

        this.subAwardFundingSourceId = null;
    }
}


text:
module Data.BinaryTreeHouse
(
    BinaryTreeHouse(..),

    growTree
) where

import Data.Bifunctor
import Data.TextBlock

data BinaryTreeHouse a b = Nil
                         | Leaf a
                         | Branch b (BinaryTreeHouse a b) (BinaryTreeHouse a b)
instance (Show a, Show b) => Show (BinaryTreeHouse a b) where
    show t = show $ showBinaryTreeHouse t

showBinaryTreeHouse :: (Show a, Show b) => BinaryTreeHouse a b -> TextBlock
showBinaryTreeHouse Nil = makeTextBlock [""]
showBinaryTreeHouse (Leaf x) = showBox ('+', '-', '|') 0 x
showBinaryTreeHouse (Branch h x y) = addToTheRight 0 (addToTheRight 0 left house) right
  where house = showBox ('+', '-', '|') 0 h
        left = padTop (height house) (showBinaryTreeHouse x)
        right = padTop (height house) (showBinaryTreeHouse y)
instance Bifunctor BinaryTreeHouse where

  first _ Nil = Nil
  first f (Leaf a) = Leaf (f a)
  first f (Branch house left right) = Branch house (first f left) (first f right)

  second _ Nil = Nil
  second _ (Leaf a) = Leaf a
  second f (Branch house left right) = Branch (f house) (second f left) (second f right)
growTree :: b -> BinaryTreeHouse a b -> BinaryTreeHouse a b -> BinaryTreeHouse a b
growTree _ Nil Nil = Nil
growTree house left right = Branch house left right


text:
body {
  padding-top: 70px;
}

h1, h2, h3 {
  font-family: 'Open Sans', sans-serif;
}

.font-robot {
  font-family: 'Roboto 300', sans-serif;
}

input:invalid {
  color: red;
  font-weight: 600;
}

ul.ips { list-style-type: none; margin: 0; padding: 0; overflow-x: hidden; }
ul.ips li { margin: 0; padding: 0; }
ul.ips label { margin: 0; padding: 0; }

.panel-heading.collapsible {
  cursor: pointer;
}

.timeline {
  cursor: pointer;
}

.panel-heading .collapsible:after {
  color: grey;
  content: "\e113";
  float: right;
  font-family: 'Glyphicons Halflings';
  transition: all 0.5s;
}

.panel-heading.collapsed .collapsible:after {
  transform: rotate(-180deg);
}

:not(form):invalid,select.owner:disabled {
  border: 1px solid red;
  box-shadow: 0 0 10px red;
}

.page-header {
  margin-top: 0px;
}

.page-header h1 {
  margin-top: 0px;
}

label {
  font-weight: normal;
  margin-top: 0;
}

.sk-spinner-pulse {
  background-color: darkblue;
}

td {
  vertical-align: middle !important;
}


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

<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
liquibase.util.xml (Liquibase Core 3.5.3 API)
</TITLE>

<META NAME="date" CONTENT="2016-10-13">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

liquibase.util.xml

Interfaces

XmlWriter

Classes

DefaultXmlWriter


text:
package ru.phi.modules.repository;

import org.junit.After;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.MethodSorters;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.jdbc.Sql;
import org.springframework.test.context.jdbc.SqlConfig;
import org.springframework.test.context.jdbc.SqlGroup;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import ru.phi.modules.JpaConfiguration;
import ru.phi.modules.entity.Accessibility;
import ru.phi.modules.entity.News;
import ru.phi.modules.entity.Profile;
import ru.phi.modules.entity.User;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = {JpaConfiguration.class})
@TestPropertySource({"classpath:application.properties"})
@SqlGroup({
        @Sql(
                scripts = {"/sql/data/drop.data.sql"},
                executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD,
                config = @SqlConfig(
                        encoding = "UTF-8",
                        errorMode = SqlConfig.ErrorMode.CONTINUE_ON_ERROR
                )
        ),
        @Sql(
                scripts = {"/sql/data/drop.data.sql"},
                executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD,
                config = @SqlConfig(
                        encoding = "UTF-8",
                        errorMode = SqlConfig.ErrorMode.CONTINUE_ON_ERROR
                )
        )
})
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public final class NewsRepositoryTest {
    @Autowired
    private NewsRepository newsRepository;

    @Autowired
    private UserRepository userRepository;

    @Autowired
    private ProfileRepository profileRepository;

    @After
    public void tearDown() throws Exception {
        newsRepository.deleteAll();
        userRepository.deleteAll();
        profileRepository.deleteAll();
    }

    @Test
    public void createNews() throws Exception {
        User user = new User();
        user.setUsername("username");
        user.setPassword("password");
        user = userRepository.save(user);
        Profile profile = new Profile();
        profile.setUser(user);
        profile.setLastName("Last");
        profile.setFirstName("First");
        profile.setAccessibility(Accessibility.eyeless);
        profile.setEmail("m@me.com");
        profile = profileRepository.save(profile);
        final News news = new News();
        news.setTitle("Title");
        news.setBref("Bref");
        news.setProfile(profile);
        newsRepository.save(news);
    }
}


text:
[![Chat](https://badges.gitter.im/chat.svg)](//gitter.im/lighterio/public)
[![Version](https://img.shields.io/npm/v/lighter-colors.svg)](//www.npmjs.com/package/lighter-colors)
[![Downloads](https://img.shields.io/npm/dm/lighter-colors.svg)](//www.npmjs.com/package/lighter-colors)
[![Build](https://img.shields.io/travis/lighterio/lighter-colors.svg)](//travis-ci.org/lighterio/lighter-colors)
[![Coverage](https://img.shields.io/codecov/c/github/lighterio/lighter-colors/master.svg)](//codecov.io/gh/lighterio/lighter-colors)
[![Style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](//www.npmjs.com/package/standard)

The `lighter-colors` module is a lightweight terminal color utility.

## Installation

From your project directory, install and save as a dependency:
```bash
npm install --save lighter-colors
```

## Usage

Upon requiring `lighter-colors`, the String prototype is modified so that all
strings have access to color properties which output color versions of
themselves:

```js
require('lighter-colors')

console.log('Error'.red)
console.log('Warning'.yellow)
console.log('Confirmation'.green)
```

If you would like to disable color, you can use a `--no-color` argument, use
the disable method:

```js
var colors = require('lighter-colors')

colors.disable()
console.log('This will be colorless.'.magenta)

colors.enable()
console.log('This will become magenta.'.magenta)
```

Here's the full list of exported colors:

```js
{
  reset: '\u001b[0m',
  base: '\u001b[39m',
  bgBase: '\u001b[49m',
  bold: '\u001b[1m',
  normal: '\u001b[2m',
  italic: '\u001b[3m',
  underline: '\u001b[4m',
  inverse: '\u001b[7m',
  hidden: '\u001b[8m',
  strike: '\u001b[9m',
  black: '\u001b[30m',
  red: '\u001b[31m',
  green: '\u001b[32m',
  yellow: '\u001b[33m',
  blue: '\u001b[34m',
  magenta: '\u001b[35m',
  cyan: '\u001b[36m',
  white: '\u001b[37m',
  gray: '\u001b[90m',
  bgBlack: '\u001b[40m',
  bgRed: '\u001b[41m',
  bgGreen: '\u001b[42m',
  bgYellow: '\u001b[43m',
  bgBlue: '\u001b[44m',
  bgMagenta: '\u001b[45m',
  bgCyan: '\u001b[46m',
  bgWhite: '\u001b[47m'
}
```

In addition to the getter properties for the colors in the list above, there's
also a `plain` getter property which removes colors from a colorful string:

```js
require('lighter-colors')

var colorful = 'Blue'.blue
var colorless = colorful.plain
```

And if you would like to use the color sequences without invoking getter
properties, `lighter-colors` exports them for you:

```js
var colors = require('lighter-colors')
var red = colors.red
var white = colors.white
var blue = colors.blue
var base = colors.base
console.log(red + 'Red' + white + 'White' + blue + 'Blue' + base)
```

## More on lighter-colors...
* [Contributing](//github.com/lighterio/lighter-colors/blob/master/CONTRIBUTING.md)
* [License (ISC)](//github.com/lighterio/lighter-colors/blob/master/LICENSE.md)
* [Change Log](//github.com/lighterio/lighter-colors/blob/master/CHANGELOG.md)
* [Roadmap](//github.com/lighterio/lighter-colors/blob/master/ROADMAP.md)


text:
function Start-PASCredVerify {
    <#
.SYNOPSIS
Marks account for immediate verification by the CPM to a new random password.

.DESCRIPTION
Flags a managed account credentials for an immediate CPM password verification.
The "Initiate CPM password management operations" permission is required.

.PARAMETER AccountID
The unique ID  of the account to delete.
This is retrieved by the Get-PASAccount function.

.PARAMETER sessionToken
Hashtable containing the session token returned from New-PASSession

.PARAMETER WebSession
WebRequestSession object returned from New-PASSession

.PARAMETER BaseURI
PVWA Web Address
Do not include "/PasswordVault/"

.PARAMETER PVWAAppName
The name of the CyberArk PVWA Virtual Directory.
Defaults to PasswordVault

.EXAMPLE
$token | Start-PASCredVerify -AccountID 19_1

Will mark account with AccountID of 19_1 for Immediate CPM Verification

.INPUTS
SessionToken, AccountID, WebSession & BaseURI can be piped by  property name

.OUTPUTS
None

.NOTES

.LINK

#>
    [CmdletBinding()]
    param(
        [parameter(
            Mandatory = $true,
            ValueFromPipelinebyPropertyName = $true
        )]
        [ValidateNotNullOrEmpty()]
        [string]$AccountID,

        [parameter(
            Mandatory = $true,
            ValueFromPipelinebyPropertyName = $true
        )]
        [ValidateNotNullOrEmpty()]
        [hashtable]$SessionToken,

        [parameter(
            ValueFromPipelinebyPropertyName = $true
        )]
        [Microsoft.PowerShell.Commands.WebRequestSession]$WebSession,

        [parameter(
            Mandatory = $true,
            ValueFromPipelinebyPropertyName = $true
        )]
        [string]$BaseURI,

        [parameter(
            Mandatory = $false,
            ValueFromPipelinebyPropertyName = $true
        )]
        [string]$PVWAAppName = "PasswordVault"
    )

    BEGIN {}#begin

    PROCESS {

        #Create URL for request
        $URI = "$baseURI/$PVWAAppName/WebServices/PIMServices.svc/Accounts/$AccountID/VerifyCredentials"

        $body = @{} | ConvertTo-Json

        #send request to web service
        Invoke-PASRestMethod -Uri $URI -Method PUT -Body $body -Headers $SessionToken -WebSession $WebSession

    }#process

    END {}#end

}


text:
package org.elasticsearch.search.aggregations.bucket.significant;

import org.elasticsearch.common.ParseField;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.xcontent.LoggingDeprecationHandler;
import org.elasticsearch.common.xcontent.ObjectParser;
import org.elasticsearch.common.xcontent.ParseFieldRegistry;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.index.query.AbstractQueryBuilder;
import org.elasticsearch.index.query.QueryBuilder;
import org.elasticsearch.search.aggregations.AbstractAggregationBuilder;
import org.elasticsearch.search.aggregations.AggregationBuilder;
import org.elasticsearch.search.aggregations.AggregationInitializationException;
import org.elasticsearch.search.aggregations.Aggregator;
import org.elasticsearch.search.aggregations.AggregatorFactories;
import org.elasticsearch.search.aggregations.AggregatorFactories.Builder;
import org.elasticsearch.search.aggregations.AggregatorFactory;
import org.elasticsearch.search.aggregations.bucket.significant.heuristics.SignificanceHeuristic;
import org.elasticsearch.search.aggregations.bucket.significant.heuristics.SignificanceHeuristicParser;
import org.elasticsearch.search.aggregations.bucket.terms.IncludeExclude;
import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder;
import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregator;
import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregator.BucketCountThresholds;
import org.elasticsearch.search.internal.SearchContext;

import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Objects;

public class SignificantTextAggregationBuilder extends AbstractAggregationBuilder<SignificantTextAggregationBuilder> {
    public static final String NAME = "significant_text";

    static final ParseField FIELD_NAME = new ParseField("field");
    static final ParseField SOURCE_FIELDS_NAME = new ParseField("source_fields");
    static final ParseField FILTER_DUPLICATE_TEXT_FIELD_NAME = new ParseField(
            "filter_duplicate_text");

    static final TermsAggregator.BucketCountThresholds DEFAULT_BUCKET_COUNT_THRESHOLDS =
            SignificantTermsAggregationBuilder.DEFAULT_BUCKET_COUNT_THRESHOLDS;
    static final SignificanceHeuristic DEFAULT_SIGNIFICANCE_HEURISTIC = SignificantTermsAggregationBuilder.DEFAULT_SIGNIFICANCE_HEURISTIC;

    private String fieldName = null;
    private String [] sourceFieldNames = null;
    private boolean filterDuplicateText = false;
    private IncludeExclude includeExclude = null;
    private QueryBuilder filterBuilder = null;
    private TermsAggregator.BucketCountThresholds bucketCountThresholds = new BucketCountThresholds(
            DEFAULT_BUCKET_COUNT_THRESHOLDS);
    private SignificanceHeuristic significanceHeuristic = DEFAULT_SIGNIFICANCE_HEURISTIC;

    public static Aggregator.Parser getParser(
            ParseFieldRegistry<SignificanceHeuristicParser> significanceHeuristicParserRegistry) {
        ObjectParser<SignificantTextAggregationBuilder, Void> PARSER = new ObjectParser<>(
                SignificantTextAggregationBuilder.NAME);

        PARSER.declareInt(SignificantTextAggregationBuilder::shardSize,
                TermsAggregationBuilder.SHARD_SIZE_FIELD_NAME);

        PARSER.declareLong(SignificantTextAggregationBuilder::minDocCount,
                TermsAggregationBuilder.MIN_DOC_COUNT_FIELD_NAME);

        PARSER.declareLong(SignificantTextAggregationBuilder::shardMinDocCount,
                TermsAggregationBuilder.SHARD_MIN_DOC_COUNT_FIELD_NAME);

        PARSER.declareInt(SignificantTextAggregationBuilder::size,
                TermsAggregationBuilder.REQUIRED_SIZE_FIELD_NAME);

        PARSER.declareString(SignificantTextAggregationBuilder::fieldName, FIELD_NAME);

        PARSER.declareStringArray(SignificantTextAggregationBuilder::sourceFieldNames, SOURCE_FIELDS_NAME);

        PARSER.declareBoolean(SignificantTextAggregationBuilder::filterDuplicateText,
                FILTER_DUPLICATE_TEXT_FIELD_NAME);

        PARSER.declareObject(SignificantTextAggregationBuilder::backgroundFilter,
                (p, context) -> AbstractQueryBuilder.parseInnerQueryBuilder(p),
                SignificantTermsAggregationBuilder.BACKGROUND_FILTER);

        PARSER.declareField((b, v) -> b.includeExclude(IncludeExclude.merge(v, b.includeExclude())),
                IncludeExclude::parseInclude, IncludeExclude.INCLUDE_FIELD,
                ObjectParser.ValueType.OBJECT_ARRAY_OR_STRING);

        PARSER.declareField((b, v) -> b.includeExclude(IncludeExclude.merge(b.includeExclude(), v)),
                IncludeExclude::parseExclude, IncludeExclude.EXCLUDE_FIELD,
                ObjectParser.ValueType.STRING_ARRAY);

        for (String name : significanceHeuristicParserRegistry.getNames()) {
            PARSER.declareObject(SignificantTextAggregationBuilder::significanceHeuristic,
                    (p, context) -> {
                        SignificanceHeuristicParser significanceHeuristicParser = significanceHeuristicParserRegistry
                                .lookupReturningNullIfNotFound(name, p.getDeprecationHandler());
                        return significanceHeuristicParser.parse(p);
                    }, new ParseField(name));
        }
        return new Aggregator.Parser() {
            @Override
            public AggregationBuilder parse(String aggregationName, XContentParser parser)
                    throws IOException {
                return PARSER.parse(parser,
                        new SignificantTextAggregationBuilder(aggregationName, null), null);
            }
        };
    }

    protected SignificantTextAggregationBuilder(SignificantTextAggregationBuilder clone,
                                                Builder factoriesBuilder, Map<String, Object> metaData) {
        super(clone, factoriesBuilder, metaData);
        this.bucketCountThresholds = new BucketCountThresholds(clone.bucketCountThresholds);
        this.fieldName = clone.fieldName;
        this.filterBuilder = clone.filterBuilder;
        this.filterDuplicateText = clone.filterDuplicateText;
        this.includeExclude = clone.includeExclude;
        this.significanceHeuristic = clone.significanceHeuristic;
        this.sourceFieldNames = clone.sourceFieldNames;
    }

    @Override
    protected AggregationBuilder shallowCopy(Builder factoriesBuilder, Map<String, Object> metaData) {
        return new SignificantTextAggregationBuilder(this, factoriesBuilder, metaData);
    }

    protected TermsAggregator.BucketCountThresholds getBucketCountThresholds() {
        return new TermsAggregator.BucketCountThresholds(bucketCountThresholds);
    }

    public TermsAggregator.BucketCountThresholds bucketCountThresholds() {
        return bucketCountThresholds;
    }

    @Override
    public SignificantTextAggregationBuilder subAggregations(Builder subFactories) {
        throw new AggregationInitializationException("Aggregator [" + name + "] of type ["
                + getType() + "] cannot accept sub-aggregations");
    }

    @Override
    public SignificantTextAggregationBuilder subAggregation(AggregationBuilder aggregation) {
        throw new AggregationInitializationException("Aggregator [" + name + "] of type ["
                + getType() + "] cannot accept sub-aggregations");
    }

    public SignificantTextAggregationBuilder bucketCountThresholds(
            TermsAggregator.BucketCountThresholds bucketCountThresholds) {
        if (bucketCountThresholds == null) {
            throw new IllegalArgumentException(
                    "[bucketCountThresholds] must not be null: [" + name + "]");
        }
        this.bucketCountThresholds = bucketCountThresholds;
        return this;
    }

    /**
     * Sets the size - indicating how many term buckets should be returned
     * (defaults to 10)
     */
    public SignificantTextAggregationBuilder size(int size) {
        if (size <= 0) {
            throw new IllegalArgumentException(
                    "[size] must be greater than 0. Found [" + size + "] in [" + name + "]");
        }
        bucketCountThresholds.setRequiredSize(size);
        return this;
    }

    /**
     * Sets the shard_size - indicating the number of term buckets each shard
     * will return to the coordinating node (the node that coordinates the
     * search execution). The higher the shard size is, the more accurate the
     * results are.
     */
    public SignificantTextAggregationBuilder shardSize(int shardSize) {
        if (shardSize <= 0) {
            throw new IllegalArgumentException("[shardSize] must be greater than  0. Found ["
                    + shardSize + "] in [" + name + "]");
        }
        bucketCountThresholds.setShardSize(shardSize);
        return this;
    }

    /**
     * Sets the name of the text field that will be the subject of this
     * aggregation.
     */
    public SignificantTextAggregationBuilder fieldName(String fieldName) {
        this.fieldName = fieldName;
        return this;
    }

    /**
     * Selects the fields to load from _source JSON and analyze.
     * If none are specified, the indexed "fieldName" value is assumed
     * to also be the name of the JSON field holding the value
     */
    public SignificantTextAggregationBuilder sourceFieldNames(List<String> names) {
        this.sourceFieldNames = names.toArray(new String [names.size()]);
        return this;
    }

    /**
     * Control if duplicate paragraphs of text should try be filtered from the
     * statistical text analysis. Can improve results but slows down analysis.
     * Default is false.
     */
    public SignificantTextAggregationBuilder filterDuplicateText(boolean filterDuplicateText) {
        this.filterDuplicateText = filterDuplicateText;
        return this;
    }

    /**
     * Set the minimum document count terms should have in order to appear in
     * the response.
     */
    public SignificantTextAggregationBuilder minDocCount(long minDocCount) {
        if (minDocCount < 0) {
            throw new IllegalArgumentException(
                    "[minDocCount] must be greater than or equal to 0. Found [" + minDocCount
                            + "] in [" + name + "]");
        }
        bucketCountThresholds.setMinDocCount(minDocCount);
        return this;
    }

    /**
     * Set the minimum document count terms should have on the shard in order to
     * appear in the response.
     */
    public SignificantTextAggregationBuilder shardMinDocCount(long shardMinDocCount) {
        if (shardMinDocCount < 0) {
            throw new IllegalArgumentException(
                    "[shardMinDocCount] must be greater than or equal to 0. Found ["
                            + shardMinDocCount + "] in [" + name + "]");
        }
        bucketCountThresholds.setShardMinDocCount(shardMinDocCount);
        return this;
    }

    public SignificantTextAggregationBuilder backgroundFilter(QueryBuilder backgroundFilter) {
        if (backgroundFilter == null) {
            throw new IllegalArgumentException(
                    "[backgroundFilter] must not be null: [" + name + "]");
        }
        this.filterBuilder = backgroundFilter;
        return this;
    }

    public QueryBuilder backgroundFilter() {
        return filterBuilder;
    }

    /**
     * Set terms to include and exclude from the aggregation results
     */
    public SignificantTextAggregationBuilder includeExclude(IncludeExclude includeExclude) {
        this.includeExclude = includeExclude;
        return this;
    }

    /**
     * Get terms to include and exclude from the aggregation results
     */
    public IncludeExclude includeExclude() {
        return includeExclude;
    }

    public SignificantTextAggregationBuilder significanceHeuristic(
            SignificanceHeuristic significanceHeuristic) {
        if (significanceHeuristic == null) {
            throw new IllegalArgumentException(
                    "[significanceHeuristic] must not be null: [" + name + "]");
        }
        this.significanceHeuristic = significanceHeuristic;
        return this;
    }

    public SignificanceHeuristic significanceHeuristic() {
        return significanceHeuristic;
    }

    /**
     * @param name
     *            the name of this aggregation
     * @param fieldName
     *            the name of the text field that will be the subject of this
     *            aggregation
     *
     */
    public SignificantTextAggregationBuilder(String name, String fieldName) {
        super(name);
        this.fieldName = fieldName;
    }

    /**
     * Read from a stream.
     */
    public SignificantTextAggregationBuilder(StreamInput in) throws IOException {
        super(in);
        fieldName = in.readString();
        filterDuplicateText = in.readBoolean();
        bucketCountThresholds = new BucketCountThresholds(in);
        filterBuilder = in.readOptionalNamedWriteable(QueryBuilder.class);
        includeExclude = in.readOptionalWriteable(IncludeExclude::new);
        significanceHeuristic = in.readNamedWriteable(SignificanceHeuristic.class);
        sourceFieldNames = in.readOptionalStringArray();
    }

    @Override
    protected void doWriteTo(StreamOutput out) throws IOException {
        out.writeString(fieldName);
        out.writeBoolean(filterDuplicateText);
        bucketCountThresholds.writeTo(out);
        out.writeOptionalNamedWriteable(filterBuilder);
        out.writeOptionalWriteable(includeExclude);
        out.writeNamedWriteable(significanceHeuristic);
        out.writeOptionalStringArray(sourceFieldNames);
    }

    @Override
    protected AggregatorFactory<?> doBuild(SearchContext context, AggregatorFactory<?> parent,
            Builder subFactoriesBuilder) throws IOException {
        SignificanceHeuristic executionHeuristic = this.significanceHeuristic.rewrite(context);
        String[] execFieldNames = sourceFieldNames;
        if (execFieldNames == null) {
            execFieldNames = new String[] { fieldName };
        }
        return new SignificantTextAggregatorFactory(name, includeExclude, filterBuilder,
                bucketCountThresholds, executionHeuristic, context, parent, subFactoriesBuilder,
                fieldName, execFieldNames, filterDuplicateText, metaData);
    }

    @Override
    protected XContentBuilder internalXContent(XContentBuilder builder, Params params)
            throws IOException {
        builder.startObject();
        bucketCountThresholds.toXContent(builder, params);
        if (fieldName != null) {
            builder.field(FIELD_NAME.getPreferredName(), fieldName);
        }
        if (sourceFieldNames != null) {
            builder.array(SOURCE_FIELDS_NAME.getPreferredName(), sourceFieldNames);
        }

        if (filterDuplicateText) {
            builder.field(FILTER_DUPLICATE_TEXT_FIELD_NAME.getPreferredName(), filterDuplicateText);
        }
        if (filterBuilder != null) {
            builder.field(SignificantTermsAggregationBuilder.BACKGROUND_FILTER.getPreferredName(),
                    filterBuilder);
        }
        if (includeExclude != null) {
            includeExclude.toXContent(builder, params);
        }
        significanceHeuristic.toXContent(builder, params);

        builder.endObject();
        return builder;
    }

    @Override
    protected int doHashCode() {
        return Objects.hash(bucketCountThresholds, fieldName, filterDuplicateText, filterBuilder,
                includeExclude, significanceHeuristic, Arrays.hashCode(sourceFieldNames));
    }

    @Override
    protected boolean doEquals(Object obj) {
        SignificantTextAggregationBuilder other = (SignificantTextAggregationBuilder) obj;
        return Objects.equals(bucketCountThresholds, other.bucketCountThresholds)
                && Objects.equals(fieldName, other.fieldName)
                && Arrays.equals(sourceFieldNames, other.sourceFieldNames)
                && filterDuplicateText == other.filterDuplicateText
                && Objects.equals(filterBuilder, other.filterBuilder)
                && Objects.equals(includeExclude, other.includeExclude)
                && Objects.equals(significanceHeuristic, other.significanceHeuristic);
    }

    @Override
    public String getType() {
        return NAME;
    }
}


text:
namespace autoboost { namespace mpl {

template<
      typename AUTOBOOST_MPL_AUX_NA_PARAM(Sequence)
    , typename AUTOBOOST_MPL_AUX_NA_PARAM(T)
    >
struct contains
    : contains_impl< typename sequence_tag<Sequence>::type >
        ::template apply< Sequence,T >
{
    AUTOBOOST_MPL_AUX_LAMBDA_SUPPORT(2,contains,(Sequence,T))
};

AUTOBOOST_MPL_AUX_NA_SPEC(2, contains)

}}

#endif // AUTOBOOST_MPL_CONTAINS_HPP_INCLUDED


text:
using namespace std;

Pet& cuterPet(Pet& first, Pet& second)
{
	if (first.getCuteness() >= second.getCuteness())
		return first;
	return second;
}

int main()
{
	Cate garfield("Garfield", 14, "I don't know his name", 20, 6);
	Doge fenton("Fenton", 7, "Rupert", 65, "Black labrador");

	//Проверка на конструктора за копиране
	Cate g = garfield;
	g.setName("Gar");
	cout << g.getName() << endl << garfield.getName() << endl << endl;

	Doge f = fenton;
	f.setName("Fenny");
	cout << f.getName() << endl << fenton.getName() << endl << endl;

	//Проверка на оператор =
	g = garfield;
	g.setName("Garry");
	cout << g.getName() << endl << garfield.getName() << endl << endl;

	f = fenton;
	f.setName("Fenster");
	cout << f.getName() << endl << fenton.getName() << endl << endl;
	Pet& winner = cuterPet(garfield, fenton);

	cout << "By far, the cuter pet is " << winner.getName();
}


text:
#include "viocrypt-prov.h"

BOOL WINAPI Register()
{
    return FALSE;
}

void WINAPI Unregister()
{

}


text:
'use strict';

module.exports = ['--- toml\ntitle = "autodetect-TOML"\n\n[props]\nuser = "jonschlinkert"\n---\nContent\n'];


text:
<?xml version="1.0" encoding="UTF-8"?>
<ldswebml type="image" uri="/media-library/images/temples/columbus-ohio#columbus-temple-lds-406110" xml:lang="eng" locale="eng" status="publish" xmlns:its="http://www.w3.org/2005/11/its">
  <search-meta>
      <uri-title its:translate="no">columbus-temple-lds-406110</uri-title>
      <source>columbus-temple-lds-406110</source>
      <publication-type its:translate="no">image</publication-type>
      <media-type its:translate="no">image</media-type>
      <publication value="ldsorg">LDS.org</publication>
      <publication-date value="2012-12-14">2012-12-14</publication-date>
      <title/>
      <description/>
      <collections>
          <collection its:translate="no">global-search</collection>
          <collection its:translate="no">media</collection>
          <collection its:translate="no">images</collection>
      </collections>
      <subjects>
          <subject>French</subject>
          <subject>William</subject>
          <subject>Columbus Ohio Temple</subject>
          <subject>Exterior</subject>
          <subject>Temples</subject>
          <subject>Autumn</subject>
          <subject>Trees</subject>
      </subjects>
  </search-meta>
  <no-search>
      <path>http://media.ldscdn.org/images/media-library/temples/columbus-ohio/columbus-temple-lds-406110-gallery.jpg</path>
      <images>
          http://media.ldscdn.org/images/media-library/temples/columbus-ohio/columbus-temple-lds-406110-thumbnail.jpg
      </images>
          <download-urls>
              <download-url>
                  Mobile
                  <size>308 KB</size>
                  <path>http://media.ldscdn.org/images/media-library/temples/columbus-ohio/columbus-temple-lds-406110-mobile.jpg</path>
              </download-url>
              <download-url>
                  Tablet
                  <size>350 KB</size>
                  <path>http://media.ldscdn.org/images/media-library/temples/columbus-ohio/columbus-temple-lds-406110-tablet.jpg</path>
              </download-url>
              <download-url>
                  Print
                  <size>783 KB</size>
                  <path>http://media.ldscdn.org/images/media-library/temples/columbus-ohio/columbus-temple-lds-406110-print.jpg</path>
              </download-url>
              <download-url>
                  Wallpaper
                  <size>1.5 MB</size>
                  <path>http://media.ldscdn.org/images/media-library/temples/columbus-ohio/columbus-temple-lds-406110-wallpaper.jpg</path>
              </download-url>
          </download-urls>
  </no-search>
</ldswebml>


text:
import kivy
# kivy.require('1.9.1')

from kivy.app import App
from kivy.uix.gridlayout import GridLayout
from kivy.uix.label import Label
from kivy.uix.button import Button
from kivy.uix.textinput import TextInput

from kivy.config import Config
Config.set('graphics', 'width',  300)
Config.set('graphics', 'height', 100)
Config.set('graphics', 'resizable', 0)

class PasswordScreen(GridLayout):

    def __init__(self, **kwargs):
        super(PasswordScreen, self).__init__(**kwargs)
        self.cols = 1
        self.add_widget(Label(text='password'))
        self.password = TextInput(text='password',password=True, multiline=False)
        self.add_widget(self.password)
        self.add_widget(Button(text='decrypt'))

class MyApp(App):

    def build(self):
        return PasswordScreen()

if __name__ == '__main__':
    MyApp().run()


text:
wetherspoon / GAME

Favourite Pubs

  Share
  Find more

Share favorites list

      <form onsubmit="return false" method="post">

Enter email

        <input type="email" name="favoritesEmail" placeholder="Enter email" required="">
        Cancel
        <button type="submit" href="#" class="ui-btn ui-corner-all ui-shadow ui-btn-inline primary-button" data-rel="back" data-transition="flow">Send</button>
    </form>


text:
package org.jenkinsci.plugins.p4.filters;

import hudson.Extension;

import java.io.Serializable;

import org.kohsuke.stapler.DataBoundConstructor;

public class FilterPerChangeImpl extends Filter implements Serializable {

	private static final long serialVersionUID = 1L;

	private final boolean perChange;
	private int nextChange;

	@DataBoundConstructor
	public FilterPerChangeImpl(boolean perChange) {
		this.perChange = perChange;
	}

	public boolean isPerChange() {
		return perChange;
	}

	public int getNextChange() {
		return nextChange;
	}

	public void setNextChange(int nextChange) {
		this.nextChange = nextChange;
	}

	@Extension
	public static final class DescriptorImpl extends FilterDescriptor {

		@Override
		public String getDisplayName() {
			return "Polling per Change";
		}
	}
}


text:
export DataWatcher from './data-watcher';
export DataFetcher from './data-fetcher';
export DataSender from './data-sender';
export DataInit from './data-init';
export State from './state';


text:
(function() {
  var AndroidBundleInfo, AppBundleInfo, iOSBundleInfo;

  module.exports = AppBundleInfo = require('./lib/iOSAppBundleInfo');

  module.exports.iOS = module.exports.ios = iOSBundleInfo = require('./lib/iOSAppBundleInfo');

  module.exports.Android = module.exports.android = AndroidBundleInfo = require('./lib/AndroidAppBundleInfo');

  module.exports.autodetect = function(fileOrStream, callback) {
    var abi;
    abi = new AppBundleInfo(fileOrStream);
    return abi.findFileStream(AndroidBundleInfo.prototype.manifestPath, function(err, manifest) {
      var bi;
      if (manifest) {
        bi = new AndroidBundleInfo(null);
        bi.extracted = true;
        bi.extractPath = abi.extractPath;
        return callback(null, bi);
      }
      return abi.findFileStream(iOSBundleInfo.prototype.plistPath, function(err, plist) {
        if (plist) {
          bi = new iOSBundleInfo(null);
          bi.extracted = true;
          bi.extractPath = abi.extractPath;
          return callback(null, bi);
        }
        return callback(new Error('could not recognize bundle'));
      });
    });
  };

}).call(this);