text
stringlengths 2
1.04M
| meta
dict |
---|---|
require "thread"
##
# Standard Ruby's +Thread+ class.
#
class Thread
##
# Represents Python-style class interfacing thread.
#
module Object
##
# Holds Ruby native thread instance.
# @return [Thread] Ruby native thread object
#
attr_accessor :native_thread
@native_thread
##
# Runs the thread code.
# @abstract
#
def run
raise Exception::new("Method #run must be overriden. It should contain body of the thread.")
end
##
# Starts the thread by calling the +#run+ method as in Python.
# It's non-blocking, of sure.
#
# Uncacthed rxceptions raised by thread are written out to
# +STDERR+ by default. This feature can be turned of by the
# +silent+ argument.
#
# @param [nil, :silent] silent indicates, it shouln't write
# exceptions out
# @return [Thread] native Ruby thread
# @see #run
#
def start!(silent = nil)
@native_thread = Thread::new do
begin
self.run()
rescue ::Exception => e
if silent != :silent
self.log "THREAD EXCEPTION! " << e.class.to_s << ": " << e.message
e.backtrace.each { |i| self.log i }
end
end
end
return @native_thread
end
##
# Shutdowns the thread.
#
def shutdown!
@native_thread.terminate()
end
##
# Indicates thread is alive.
# @param [Boolean] +true+ if it is, +false+ in otherwise
#
def alive?
@native_thread.alive?
end
##
# Logs an message.
# By overriding this, you can change the format.
#
# @param [String] message message for writing out
#
def log(message)
STDERR.write "[" << Time.now.strftime("%Y-%m-%d %H:%M:%S") << "] " << self.class.name << ": " << message.to_s << "\n"
end
end
end
| {
"content_hash": "afa72c55e8c93756b068be8a9a31de25",
"timestamp": "",
"source": "github",
"line_count": 90,
"max_line_length": 129,
"avg_line_length": 24.88888888888889,
"alnum_prop": 0.46875,
"repo_name": "martinkozak/object-threads",
"id": "e0d2569f620f4e6a19005578dc59f1f0877fc5f9",
"size": "2319",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/thread/object.rb",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "Ruby",
"bytes": "2311"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/purple_dark" >
</LinearLayout> | {
"content_hash": "fcd87aeabe8631cb4811f08c74df484b",
"timestamp": "",
"source": "github",
"line_count": 8,
"max_line_length": 72,
"avg_line_length": 35.75,
"alnum_prop": 0.7377622377622378,
"repo_name": "adkarta/android-sliding-menu",
"id": "2c9791a04d8411337e1ad14a001f1301e4ed95f8",
"size": "286",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "res/layout/sliding_menu.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "2082"
}
],
"symlink_target": ""
} |
CMS.Use(['Asset/CMS.AssetList'], function (CMS) {
CMS.AssetLibrary = Class.extend({
domElement: null,
form: null,
assetList: null,
assetListElement: null,
onInsert: $.noop,
init: function (data) {
$.extend(this, data);
if (null != this.assetListElement) {
this.assetList = new CMS.AssetList({
domElement: this.assetListElement,
paginate: true,
onInsert: this.onInsert
});
}
this._setupForm();
},
_setupForm: function () {
var self = this;
this.form = $('form', this.domElement);
this.form.submit(function () {
self.assetList.paginator.setPage(1);
self.load();
return false;
});
},
load: function () {
var data = {};
$.each($(this.form).serializeArray(), function (index, value) {
data[value.name] = value.value;
});
this.assetList.paginator.loadCurrentPage(data);
},
setInsertFunction: function (func) {
this.onInsert = func;
this.assetList.setInsertFunction(func);
$.each(this.assetList.assets, function (index, value){
value.setInsertFunction(func);
});
}
});
}); | {
"content_hash": "c8ac66adca8c65d51929cc4ca6d7da0d",
"timestamp": "",
"source": "github",
"line_count": 52,
"max_line_length": 75,
"avg_line_length": 27.884615384615383,
"alnum_prop": 0.47172413793103446,
"repo_name": "modo/cms",
"id": "140cf6d0668ffa2d24e0201e85a0758f1eded3ce",
"size": "1450",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "upload/CMS/Asset/Resource/js/AssetLibrary.js",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "ASP",
"bytes": "47707"
},
{
"name": "JavaScript",
"bytes": "3535327"
},
{
"name": "PHP",
"bytes": "17479231"
},
{
"name": "Shell",
"bytes": "1668"
}
],
"symlink_target": ""
} |
package proj.me.imagewindow.images.dimentions;
/**
* Created by root on 27/3/16.
*/
public class BeanShade3 extends BeanShade2{
private int width3;
private int height3;
public int getWidth3() {
return width3;
}
public void setWidth3(int width3) {
this.width3 = width3;
}
public int getHeight3() {
return height3;
}
public void setHeight3(int height3) {
this.height3 = height3;
}
}
| {
"content_hash": "082a6995f0ab5b45c334a1d45bbf7ab5",
"timestamp": "",
"source": "github",
"line_count": 25,
"max_line_length": 46,
"avg_line_length": 18.4,
"alnum_prop": 0.6195652173913043,
"repo_name": "deepaktwr/ImageWindow",
"id": "fcface00004d8937b5f93cfd67260028824a8aeb",
"size": "460",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/src/main/java/proj/me/imagewindow/images/dimentions/BeanShade3.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "343385"
}
],
"symlink_target": ""
} |
package org.kuali.kfs.module.bc.batch.dataaccess.impl;
import java.sql.Date;
import java.sql.Types;
import java.util.Calendar;
import java.util.GregorianCalendar;
import org.kuali.kfs.module.bc.BCConstants;
import org.kuali.kfs.module.bc.batch.dataaccess.BudgetConstructionHumanResourcesPayrollInterfaceDao;
import org.kuali.kfs.module.bc.document.dataaccess.impl.BudgetConstructionDaoJdbcBase;
public class BudgetConstructionHumanResourcesPayrollInterfaceDaoJdbc extends BudgetConstructionDaoJdbcBase implements BudgetConstructionHumanResourcesPayrollInterfaceDao {
/**
*
* @see org.kuali.kfs.module.bc.batch.dataaccess.BudgetConstructionHumanResourcesPayrollInterfaceDao#buildBudgetConstructionAdministrativePosts(java.lang.Integer)
*/
public void buildBudgetConstructionAdministrativePosts() {
/**
* this unrealistic implementation will simply clean out what is already there
*/
String sqlString = "DELETE FROM LD_BCN_ADM_POST_T\n";
getSimpleJdbcTemplate().update(sqlString);
}
/**
*
* @see org.kuali.kfs.module.bc.batch.dataaccess.BudgetConstructionHumanResourcesPayrollInterfaceDao#buildBudgetConstructionAppointmentFundingReasons(java.lang.Integer)
*/
public void buildBudgetConstructionAppointmentFundingReasons(Integer requestFiscalYear) {
/**
* this unrealistic implementation will simply clean out what is already there
*/
String sqlString = "DELETE FROM LD_BCN_AF_REASON_T WHERE (UNIV_FISCAL_YR = ?)\n";
getSimpleJdbcTemplate().update(sqlString,requestFiscalYear);
}
/**
*
* @see org.kuali.kfs.module.bc.batch.dataaccess.BudgetConstructionHumanResourcesPayrollInterfaceDao#buildBudgetConstructionIntendedIncumbent(java.lang.Integer)
*/
public void buildBudgetConstructionIntendedIncumbent(Integer requestFiscalYear) {
/**
* this unrealistic implementation will refresh all incumbents who presently exist in the CSF tracker, but
* leave any who no longer do in place.
*/
Integer baseFiscalYear = requestFiscalYear - 1;
StringBuilder sqlBuilder = new StringBuilder(1500);
sqlBuilder.append("DELETE FROM LD_BCN_INTINCBNT_T\n");
sqlBuilder.append("WHERE (EXISTS (SELECT 1\n");
sqlBuilder.append(" FROM LD_CSF_TRACKER_T\n");
sqlBuilder.append(" WHERE (LD_CSF_TRACKER_T.UNIV_FISCAL_YR = ?)\n");
sqlBuilder.append(" AND (LD_CSF_TRACKER_T.EMPLID = LD_BCN_INTINCBNT_T.EMPLID)\n");
sqlBuilder.append(" AND (LD_CSF_TRACKER_T.POS_CSF_DELETE_CD = ?)))\n");
String sqlString = sqlBuilder.toString();
getSimpleJdbcTemplate().update(sqlString,baseFiscalYear,BCConstants.ACTIVE_CSF_DELETE_CODE);
sqlBuilder.delete(0, sqlBuilder.length());
/**
* constants for intended incumbent
* the "classification ID" is an IU-specific field that refers to faculty titles. we default it below.
* positions allowed in budget construction are those that are active in the current fiscal year, those that start
* July 1 of the coming fiscal year, or, if the person is a 10-month appointee, those that start on August 1 of the
* coming fiscal year.
*/
String defaultClassificationId = "TL";
GregorianCalendar calendarJuly1 = new GregorianCalendar(baseFiscalYear, Calendar.JULY, 1);
GregorianCalendar calendarAugust1 = new GregorianCalendar(baseFiscalYear, Calendar.AUGUST, 1);
Date julyFirst = new Date(calendarJuly1.getTimeInMillis());
Date augustFirst = new Date(calendarAugust1.getTimeInMillis());
/**
* this SQL is unrealistic, but tries to provide decent test data that will cover most cases.
* the "in-line view" is required because of the OBJ_ID, which frustrates using a DISTINCT directly.
* intended incumbent has only one row per person in real life. the position is the "principal job" in
* PeopleSoft, where people can have secondary appointments in other positions. the fields to implement
* this are not included in Kuali--hence our need to arbitrarily choose the highest position in sort order.
* the DISTINCT is necessary, because CSF can have more than one accounting line per person with the same
* position. that, unlike secondary jobs, is a common occurrence.
* in addition, the check for an "August 1" fiscal year is only done at IU for academic-year (10-pay) appointments
* the alias "makeUnique" for the in-line view is required by MySQL (but not by Oracle).
*/
sqlBuilder.append("INSERT INTO LD_BCN_INTINCBNT_T\n");
sqlBuilder.append("(EMPLID, PERSON_NM, SETID_SALARY, SAL_ADMIN_PLAN, GRADE, IU_CLASSIF_LEVEL, ACTV_IND)\n");
sqlBuilder.append("(SELECT EMPLID, PERSON_NM, BUSINESS_UNIT, POS_SAL_PLAN_DFLT, POS_GRADE_DFLT, ?, 'Y'\n");
sqlBuilder.append("FROM\n");
sqlBuilder.append("(SELECT DISTINCT csf.EMPLID,\n");
sqlBuilder.append(" CONCAT(CONCAT(csf.EMPLID,' LastNm HR'),CONCAT(', ',CONCAT(csf.EMPLID,' 1stNm HR'))) AS PERSON_NM,\n");
sqlBuilder.append(" pos.BUSINESS_UNIT,\n");
sqlBuilder.append(" pos.POS_SAL_PLAN_DFLT,\n");
sqlBuilder.append(" pos.POS_GRADE_DFLT\n");
sqlBuilder.append(" FROM LD_CSF_TRACKER_T csf,\n");
sqlBuilder.append(" PS_POSITION_DATA pos\n");
sqlBuilder.append(" WHERE (csf.UNIV_FISCAL_YR = ?)\n");
sqlBuilder.append(" AND (csf.POS_CSF_DELETE_CD = ?)\n");
sqlBuilder.append(" AND (csf.POSITION_NBR = pos.POSITION_NBR)\n");
sqlBuilder.append(" AND ((pos.EFFDT <= ?) OR (pos.EFFDT = ?))\n");
sqlBuilder.append(" AND (NOT EXISTS (SELECT 1\n");
sqlBuilder.append(" FROM PS_POSITION_DATA pox\n");
sqlBuilder.append(" WHERE (pos.POSITION_NBR = pox.POSITION_NBR)\n");
sqlBuilder.append(" AND (pos.EFFDT < pox.EFFDT)\n");
sqlBuilder.append(" AND ((pox.EFFDT <= ?) OR (pox.EFFDT = ?))))\n");
sqlBuilder.append(" AND (NOT EXISTS (SELECT 1\n");
sqlBuilder.append(" FROM LD_CSF_TRACKER_T cfx\n");
sqlBuilder.append(" WHERE (csf.UNIV_FISCAL_YR = cfx.UNIV_FISCAL_YR)\n");
sqlBuilder.append(" AND (csf.EMPLID = cfx.EMPLID)\n");
sqlBuilder.append(" AND (cfx.POS_CSF_DELETE_CD = ?)\n");
sqlBuilder.append(" AND (csf.POSITION_NBR < cfx.POSITION_NBR)))) makeUnique)\n");
sqlString = sqlBuilder.toString();
Object[] sqlArgumentList = {defaultClassificationId,baseFiscalYear,BCConstants.ACTIVE_CSF_DELETE_CODE,julyFirst,augustFirst,julyFirst,augustFirst,BCConstants.ACTIVE_CSF_DELETE_CODE};
int[] sqlArgumentTypes = {Types.VARCHAR,Types.INTEGER,Types.VARCHAR,Types.DATE,Types.DATE,Types.DATE,Types.DATE,Types.VARCHAR};
getSimpleJdbcTemplate().update(sqlString,sqlArgumentList);
// getSimpleJdbcTemplate().getJdbcOperations().update(sqlString,sqlArgumentList,sqlArgumentTypes);
}
/**
*
* @see org.kuali.kfs.module.bc.batch.dataaccess.BudgetConstructionHumanResourcesPayrollInterfaceDao#buildBudgetConstructionIntendedIncumbentWithFacultyAttributes(java.lang.Integer)
*/
public void buildBudgetConstructionIntendedIncumbentWithFacultyAttributes (Integer requestFiscalYear)
{
// this method is the same as buildBudgetConstructionIntendedIncumbent in the default interface.
// to update faculty ranks, one would modify buildBudgetConstructionIntendedIncumbent so the defaultClassifictaionId for faculty incumbents corresponded to the appropriate faculty level.
this.buildBudgetConstructionIntendedIncumbent(requestFiscalYear);
}
/**
*
* @see org.kuali.kfs.module.bc.batch.dataaccess.BudgetConstructionHumanResourcesPayrollInterfaceDao#buildBudgetConstructionPositionBaseYear(java.lang.Integer)
*/
public void buildBudgetConstructionPositionBaseYear(Integer baseFiscalYear) {
StringBuilder sqlBuilder = new StringBuilder(2000);
String defaultRCCd = "--";
/**
* we have to do this because imbedding a constant string in SQL assumes a string delimiter--that can vary with the DBMS
*/
String orgSeparator = "-";
GregorianCalendar calendarJuly1 = new GregorianCalendar(baseFiscalYear, Calendar.JULY, 1);
Date julyFirst = new Date(calendarJuly1.getTimeInMillis());
/**
* first, delete everything for the base year--we will refresh it in case the position has changed
*/
sqlBuilder.append("DELETE FROM LD_BCN_POS_T\n");
sqlBuilder.append("WHERE (UNIV_FISCAL_YR = ?)\n");
sqlBuilder.append(" AND (EXISTS (SELECT 1\n");
sqlBuilder.append(" FROM LD_CSF_TRACKER_T\n");
sqlBuilder.append(" WHERE (LD_CSF_TRACKER_T.UNIV_FISCAL_YR = ?)\n");
sqlBuilder.append(" AND (LD_CSF_TRACKER_T.POSITION_NBR = LD_BCN_POS_T.POSITION_NBR)\n");
sqlBuilder.append(" AND (LD_CSF_TRACKER_T.POS_CSF_DELETE_CD = ?)))\n");
String sqlString = sqlBuilder.toString();
getSimpleJdbcTemplate().update(sqlString,baseFiscalYear,baseFiscalYear,BCConstants.ACTIVE_CSF_DELETE_CODE);
sqlBuilder.delete(0, sqlBuilder.length());
/**
* re-create the base year position data
* we take the latest position that is active BEFORE the coming fiscal year
*/
sqlBuilder.append("INSERT INTO LD_BCN_POS_T\n");
sqlBuilder.append("(POSITION_NBR, UNIV_FISCAL_YR, POS_EFFDT, POS_EFF_STATUS, POSN_STATUS,\n");
sqlBuilder.append(" BUDGETED_POSN, CONFIDENTIAL_POSN, POS_STD_HRS_DFLT, POS_REG_TEMP, POS_FTE, POS_DESCR, SETID_DEPT, POS_DEPTID,\n");
sqlBuilder.append(" RC_CD, POS_SAL_PLAN_DFLT, POS_GRADE_DFLT, SETID_JOBCODE, JOBCODE, SETID_SALARY,\n");
sqlBuilder.append(" POS_LOCK_USR_ID)\n");
sqlBuilder.append("(SELECT px.POSITION_NBR,\n");
sqlBuilder.append(" ?, px.EFFDT, px.POS_EFF_STATUS,\n");
sqlBuilder.append(" px.POSN_STATUS, px.BUDGETED_POSN, 'N',\n");
sqlBuilder.append(" px.STD_HRS_DEFAULT, px.POS_REG_TEMP, px.POS_FTE, px.DESCR, px.BUSINESS_UNIT,\n");
sqlBuilder.append(" px.DEPTID, COALESCE(org.RC_CD,?),\n");
sqlBuilder.append(" px.POS_SAL_PLAN_DFLT, px.POS_GRADE_DFLT, px.BUSINESS_UNIT, px.JOBCODE,\n");
sqlBuilder.append(" px.BUSINESS_UNIT, ?\n");
sqlBuilder.append(" FROM PS_POSITION_DATA px LEFT OUTER JOIN LD_BCN_ORG_RPTS_T org\n");
sqlBuilder.append(" ON (CONCAT(CONCAT(org.FIN_COA_CD,?),org.ORG_CD) = px.DEPTID)\n");
sqlBuilder.append(" WHERE (px.EFFDT < ?)\n");
sqlBuilder.append(" AND (NOT EXISTS (SELECT 1\n");
sqlBuilder.append(" FROM LD_BCN_POS_T\n");
sqlBuilder.append(" WHERE (LD_BCN_POS_T.UNIV_FISCAL_YR = ?)\n");
sqlBuilder.append(" AND (px.POSITION_NBR = LD_BCN_POS_T.POSITION_NBR)))\n");
sqlBuilder.append(" AND (NOT EXISTS (SELECT 1\n");
sqlBuilder.append(" FROM PS_POSITION_DATA py\n");
sqlBuilder.append(" WHERE (px.POSITION_NBR = py.POSITION_NBR)\n");
sqlBuilder.append(" AND (py.EFFDT < ?)\n");
sqlBuilder.append(" AND (px.EFFDT < py.EFFDT)))\n");
sqlBuilder.append(" AND (EXISTS (SELECT 1\n");
sqlBuilder.append(" FROM LD_CSF_TRACKER_T csf\n");
sqlBuilder.append(" WHERE (csf.UNIV_FISCAL_YR = ?)\n");
sqlBuilder.append(" AND (csf.POS_CSF_DELETE_CD = ?)\n");
sqlBuilder.append(" AND (csf.POSITION_NBR = px.POSITION_NBR))))\n");
sqlString = sqlBuilder.toString();
getSimpleJdbcTemplate().update(sqlString,baseFiscalYear,defaultRCCd,BCConstants.DEFAULT_BUDGET_HEADER_LOCK_IDS,orgSeparator,julyFirst,baseFiscalYear,julyFirst,baseFiscalYear,BCConstants.ACTIVE_CSF_DELETE_CODE);
// set the things that we'll need for testing but which we don't have enough information to set from the Kuali DB
// this code is obviously somewhat arbitrary--it should be replaced with institution-specific algorithms
setAcademicDefaultObjectClass(baseFiscalYear);
setMonthlyStaffOvertimeEligibleDefaultObjectClass(baseFiscalYear);
setMonthlyStaffOvertimeExemptDefaultObjectClass(baseFiscalYear);
setBiweeklyStaffDefaultObjectClass(baseFiscalYear);
}
/**
*
* @see org.kuali.kfs.module.bc.batch.dataaccess.BudgetConstructionHumanResourcesPayrollInterfaceDao#buildBudgetConstructionPositonRequestYear(java.lang.Integer)
*/
public void buildBudgetConstructionPositonRequestYear(Integer requestFiscalYear) {
StringBuilder sqlBuilder = new StringBuilder(2500);
// we build constants for DB independence. we let the library decide how they should be represented in what is passed to the DB server
String defaultRCCd = "--";
String orgSeparator = "-";
Integer baseFiscalYear = requestFiscalYear-1;
GregorianCalendar calendarJuly1 = new GregorianCalendar(baseFiscalYear, Calendar.JULY, 1);
GregorianCalendar calendarAugust1 = new GregorianCalendar(baseFiscalYear, Calendar.AUGUST, 1);
Date julyFirst = new Date(calendarJuly1.getTimeInMillis());
Date augustFirst = new Date(calendarAugust1.getTimeInMillis());
String academicPositionType = "AC";
String academicTenureTrackSalaryPlan = "AC1";
sqlBuilder.append("INSERT INTO LD_BCN_POS_T\n");
sqlBuilder.append("(POSITION_NBR, UNIV_FISCAL_YR, POS_EFFDT, POS_EFF_STATUS, POSN_STATUS,\n");
sqlBuilder.append(" BUDGETED_POSN, CONFIDENTIAL_POSN, POS_STD_HRS_DFLT, POS_REG_TEMP, POS_FTE, POS_DESCR, SETID_DEPT, POS_DEPTID,\n");
sqlBuilder.append(" RC_CD, POS_SAL_PLAN_DFLT, POS_GRADE_DFLT, SETID_JOBCODE, JOBCODE, SETID_SALARY,\n");
sqlBuilder.append(" POS_LOCK_USR_ID)\n");
sqlBuilder.append("(SELECT px.POSITION_NBR,\n");
sqlBuilder.append(" ?, px.EFFDT, px.POS_EFF_STATUS,\n");
sqlBuilder.append(" px.POSN_STATUS, px.BUDGETED_POSN, 'N',\n");
sqlBuilder.append(" px.STD_HRS_DEFAULT, px.POS_REG_TEMP, px.POS_FTE, px.DESCR, px.BUSINESS_UNIT,\n");
sqlBuilder.append(" px.DEPTID, COALESCE(org.RC_CD,?),\n");
sqlBuilder.append(" px.POS_SAL_PLAN_DFLT, px.POS_GRADE_DFLT, px.BUSINESS_UNIT, px.JOBCODE,\n");
sqlBuilder.append(" px.BUSINESS_UNIT, ?\n");
sqlBuilder.append(" FROM PS_POSITION_DATA px LEFT OUTER JOIN LD_BCN_ORG_RPTS_T org\n");
sqlBuilder.append(" ON (CONCAT(CONCAT(org.FIN_COA_CD,?),org.ORG_CD) = px.DEPTID)\n");
sqlBuilder.append(" WHERE ((px.EFFDT <= ?) OR ((px.EFFDT = ?) AND (px.POS_SAL_PLAN_DFLT = ?)))\n");
sqlBuilder.append(" AND (NOT EXISTS (SELECT 1\n");
sqlBuilder.append(" FROM LD_BCN_POS_T\n");
sqlBuilder.append(" WHERE (LD_BCN_POS_T.UNIV_FISCAL_YR = ?)\n");
sqlBuilder.append(" AND (px.POSITION_NBR = LD_BCN_POS_T.POSITION_NBR)))\n");
sqlBuilder.append(" AND (NOT EXISTS (SELECT 1\n");
sqlBuilder.append(" FROM PS_POSITION_DATA py\n");
sqlBuilder.append(" WHERE (px.POSITION_NBR = py.POSITION_NBR)\n");
sqlBuilder.append(" AND ((py.EFFDT <= ?) OR ((py.EFFDT = ?) AND (px.POS_SAL_PLAN_DFLT = ?)))\n");
sqlBuilder.append(" AND (px.EFFDT < py.EFFDT)))\n");
sqlBuilder.append(" AND (EXISTS (SELECT 1\n");
sqlBuilder.append(" FROM LD_CSF_TRACKER_T csf\n");
sqlBuilder.append(" WHERE (csf.UNIV_FISCAL_YR = ?)\n");
sqlBuilder.append(" AND (csf.POS_CSF_DELETE_CD = ?)\n");
sqlBuilder.append(" AND (csf.POSITION_NBR = px.POSITION_NBR))))\n");
String sqlString = sqlBuilder.toString();
getSimpleJdbcTemplate().update(sqlString,requestFiscalYear,defaultRCCd,BCConstants.DEFAULT_BUDGET_HEADER_LOCK_IDS,orgSeparator,julyFirst,augustFirst,academicTenureTrackSalaryPlan,requestFiscalYear,julyFirst,augustFirst,academicTenureTrackSalaryPlan,baseFiscalYear,BCConstants.ACTIVE_CSF_DELETE_CODE);
// set the things that we'll need for testing but which we don't have enough information to set from the Kuali DB
// this code is obviously somewhat arbitrary--it should be replaced with institution-specific algorithms
setAcademicDefaultObjectClass(requestFiscalYear);
setMonthlyStaffOvertimeEligibleDefaultObjectClass(requestFiscalYear);
setMonthlyStaffOvertimeExemptDefaultObjectClass(requestFiscalYear);
setBiweeklyStaffDefaultObjectClass(requestFiscalYear);
}
/**
* At IU, there is a concept of normal work months and pay months. For example, one can theoretically be in a 12-month position
* but only work during a 10-month academic year for some reason. This situation would make the "full time equivalent" for that
* person (assuming she works a 40-hour week during the 10 months) 10/12 or .893333....
* Each position is supposed to have an object class. No one should be able to budget a given position in a different object
* class, because that would break the "object level" reporting in accounting that gives totals for "academic salaries", etc.
* In this placeholder code, we set these based on the salary plan and the position type. At IU, there is a table containing salary plan and
* grade that is shared by payroll and the budget to mandate the object class used for salary funding.
*/
protected void setAcademicDefaultObjectClass(Integer fiscalYear)
{
// build constants for DB independence
Integer monthConstant = new Integer(10);
String positionType = "AC";
String defaultObject = "2000";
String salaryPlan = "AC1";
StringBuilder sqlBuilder = new StringBuilder(500);
sqlBuilder.append("UPDATE LD_BCN_POS_T\n");
sqlBuilder.append("SET IU_NORM_WORK_MONTHS = ?,\n");
sqlBuilder.append(" IU_PAY_MONTHS = ?,\n");
sqlBuilder.append(" IU_POSITION_TYPE = ?,\n");
sqlBuilder.append(" IU_DFLT_OBJ_CD = ?\n");
sqlBuilder.append("WHERE (UNIV_FISCAL_YR = ?)\n");
sqlBuilder.append(" AND (POS_SAL_PLAN_DFLT = ?)");
String sqlString = sqlBuilder.toString();
getSimpleJdbcTemplate().update(sqlString,monthConstant,monthConstant,positionType,defaultObject,fiscalYear,salaryPlan);
}
protected void setMonthlyStaffOvertimeEligibleDefaultObjectClass(Integer fiscalYear)
{
// build constants for DB independence
Integer monthConstant = new Integer(12);
String positionType = "SM";
String defaultObject = "2480";
String[] salaryPlan = {"PAO", "PAU"};
StringBuilder sqlBuilder = new StringBuilder(500);
sqlBuilder.append("UPDATE LD_BCN_POS_T\n");
sqlBuilder.append("SET IU_NORM_WORK_MONTHS = ?,\n");
sqlBuilder.append(" IU_PAY_MONTHS = ?,\n");
sqlBuilder.append(" IU_POSITION_TYPE = ?,\n");
sqlBuilder.append(" IU_DFLT_OBJ_CD = ?\n");
sqlBuilder.append("WHERE (UNIV_FISCAL_YR = ?)\n");
sqlBuilder.append(" AND (POS_SAL_PLAN_DFLT IN (?,?))\n");
String sqlString = sqlBuilder.toString();
getSimpleJdbcTemplate().update(sqlString,monthConstant,monthConstant,positionType,defaultObject,fiscalYear,salaryPlan[0],salaryPlan[1]);
}
protected void setMonthlyStaffOvertimeExemptDefaultObjectClass(Integer fiscalYear)
{
// build constants for DB independence
// (note that this uses a pattern, and therefore assumes that any specific position types beginning with 'P' that go to
// a different default object class have already been assigned)
Integer monthConstant = new Integer(12);
String positionType = "SM";
String defaultObject = "2400";
String salaryPlan = "P%";
StringBuilder sqlBuilder = new StringBuilder(500);
sqlBuilder.append("UPDATE LD_BCN_POS_T\n");
sqlBuilder.append("SET IU_NORM_WORK_MONTHS = ?,\n");
sqlBuilder.append(" IU_PAY_MONTHS = ?,\n");
sqlBuilder.append(" IU_POSITION_TYPE = ?,\n");
sqlBuilder.append(" IU_DFLT_OBJ_CD = ?\n");
sqlBuilder.append("WHERE (UNIV_FISCAL_YR = ?)\n");
sqlBuilder.append(" AND (POS_SAL_PLAN_DFLT LIKE ?)\n");
sqlBuilder.append(" AND (IU_DFLT_OBJ_CD IS NULL)\n");
String sqlString = sqlBuilder.toString();
getSimpleJdbcTemplate().update(sqlString,monthConstant,monthConstant,positionType,defaultObject,fiscalYear,salaryPlan);
}
protected void setBiweeklyStaffDefaultObjectClass(Integer fiscalYear)
{
// build constants for DB independence
// (note that we are only assigning default object codes to positions not yet assigned a default. so, this method must
// be called last. In particular, there is no check on salary plan.)
Integer monthConstant = new Integer(12);
String positionType = "SB";
String defaultObject = "2500";
String defaultUnionCode = "B1";
StringBuilder sqlBuilder = new StringBuilder(500);
sqlBuilder.append("UPDATE LD_BCN_POS_T\n");
sqlBuilder.append("SET IU_NORM_WORK_MONTHS = ?,\n");
sqlBuilder.append(" IU_PAY_MONTHS = ?,\n");
sqlBuilder.append(" IU_POSITION_TYPE = ?,\n");
sqlBuilder.append(" POS_UNION_CD = ?,\n");
sqlBuilder.append(" IU_DFLT_OBJ_CD = ?\n");
sqlBuilder.append("WHERE (UNIV_FISCAL_YR = ?)\n");
sqlBuilder.append(" AND (IU_DFLT_OBJ_CD IS NULL)\n");
String sqlString = sqlBuilder.toString();
getSimpleJdbcTemplate().update(sqlString,monthConstant,monthConstant,positionType,defaultUnionCode,defaultObject,fiscalYear);
}
/**
*
* @see org.kuali.kfs.module.bc.batch.dataaccess.BudgetConstructionHumanResourcesPayrollInterfaceDao#updateNamesInBudgetConstructionIntendedIncumbent()
*/
public void updateNamesInBudgetConstructionIntendedIncumbent()
{
// do nothing in the default: the names are added in the build routines
}
}
| {
"content_hash": "46a296c430d658fcffb83fc4900eb130",
"timestamp": "",
"source": "github",
"line_count": 351,
"max_line_length": 308,
"avg_line_length": 65.67806267806267,
"alnum_prop": 0.6536242571465752,
"repo_name": "Ariah-Group/Finance",
"id": "8be9d7935d6aa4431643675cfb7ee9796370dad2",
"size": "23676",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "af_webapp/src/main/java/org/kuali/kfs/module/bc/batch/dataaccess/impl/BudgetConstructionHumanResourcesPayrollInterfaceDaoJdbc.java",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
package opensource.component.photoview;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Matrix;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.util.AttributeSet;
import android.widget.ImageView;
import opensource.component.photoview.PhotoViewAttacher.OnMatrixChangedListener;
import opensource.component.photoview.PhotoViewAttacher.OnPhotoTapListener;
import opensource.component.photoview.PhotoViewAttacher.OnViewTapListener;
public class PhotoView extends ImageView implements IPhotoView {
private final PhotoViewAttacher mAttacher;
private ScaleType mPendingScaleType;
public PhotoView(Context context) {
this(context, null);
}
public PhotoView(Context context, AttributeSet attr) {
this(context, attr, 0);
}
public PhotoView(Context context, AttributeSet attr, int defStyle) {
super(context, attr, defStyle);
super.setScaleType(ScaleType.MATRIX);
mAttacher = new PhotoViewAttacher(this);
if (null != mPendingScaleType) {
setScaleType(mPendingScaleType);
mPendingScaleType = null;
}
}
@Override
public void setPhotoViewRotation(float rotationDegree) {
mAttacher.setPhotoViewRotation(rotationDegree);
}
@Override
public boolean canZoom() {
return mAttacher.canZoom();
}
@Override
public RectF getDisplayRect() {
return mAttacher.getDisplayRect();
}
@Override
public Matrix getDisplayMatrix() {
return mAttacher.getDrawMatrix();
}
@Override
public boolean setDisplayMatrix(Matrix finalRectangle) {
return mAttacher.setDisplayMatrix(finalRectangle);
}
@Override
@Deprecated
public float getMinScale() {
return getMinimumScale();
}
@Override
public float getMinimumScale() {
return mAttacher.getMinimumScale();
}
@Override
@Deprecated
public float getMidScale() {
return getMediumScale();
}
@Override
public float getMediumScale() {
return mAttacher.getMediumScale();
}
@Override
@Deprecated
public float getMaxScale() {
return getMaximumScale();
}
@Override
public float getMaximumScale() {
return mAttacher.getMaximumScale();
}
@Override
public float getScale() {
return mAttacher.getScale();
}
@Override
public ScaleType getScaleType() {
return mAttacher.getScaleType();
}
@Override
public void setAllowParentInterceptOnEdge(boolean allow) {
mAttacher.setAllowParentInterceptOnEdge(allow);
}
@Override
@Deprecated
public void setMinScale(float minScale) {
setMinimumScale(minScale);
}
@Override
public void setMinimumScale(float minimumScale) {
mAttacher.setMinimumScale(minimumScale);
}
@Override
@Deprecated
public void setMidScale(float midScale) {
setMediumScale(midScale);
}
@Override
public void setMediumScale(float mediumScale) {
mAttacher.setMediumScale(mediumScale);
}
@Override
@Deprecated
public void setMaxScale(float maxScale) {
setMaximumScale(maxScale);
}
@Override
public void setMaximumScale(float maximumScale) {
mAttacher.setMaximumScale(maximumScale);
}
@Override
// setImageBitmap calls through to this method
public void setImageDrawable(Drawable drawable) {
super.setImageDrawable(drawable);
if (null != mAttacher) {
mAttacher.update();
}
}
@Override
public void setImageResource(int resId) {
super.setImageResource(resId);
if (null != mAttacher) {
mAttacher.update();
}
}
@Override
public void setImageURI(Uri uri) {
super.setImageURI(uri);
if (null != mAttacher) {
mAttacher.update();
}
}
@Override
public void setOnMatrixChangeListener(OnMatrixChangedListener listener) {
mAttacher.setOnMatrixChangeListener(listener);
}
@Override
public void setOnLongClickListener(OnLongClickListener l) {
mAttacher.setOnLongClickListener(l);
}
@Override
public void setOnPhotoTapListener(OnPhotoTapListener listener) {
mAttacher.setOnPhotoTapListener(listener);
}
@Override
public OnPhotoTapListener getOnPhotoTapListener() {
return mAttacher.getOnPhotoTapListener();
}
@Override
public void setOnViewTapListener(OnViewTapListener listener) {
mAttacher.setOnViewTapListener(listener);
}
@Override
public OnViewTapListener getOnViewTapListener() {
return mAttacher.getOnViewTapListener();
}
@Override
public void setScale(float scale) {
mAttacher.setScale(scale);
}
@Override
public void setScale(float scale, boolean animate) {
mAttacher.setScale(scale, animate);
}
@Override
public void setScale(float scale, float focalX, float focalY, boolean animate) {
mAttacher.setScale(scale, focalX, focalY, animate);
}
@Override
public void setScaleType(ScaleType scaleType) {
if (null != mAttacher) {
mAttacher.setScaleType(scaleType);
} else {
mPendingScaleType = scaleType;
}
}
@Override
public void setZoomable(boolean zoomable) {
mAttacher.setZoomable(zoomable);
}
@Override
public Bitmap getVisibleRectangleBitmap() {
return mAttacher.getVisibleRectangleBitmap();
}
@Override
protected void onDetachedFromWindow() {
mAttacher.cleanup();
super.onDetachedFromWindow();
}
} | {
"content_hash": "cef13ab32b162716bd88852a1fea042b",
"timestamp": "",
"source": "github",
"line_count": 243,
"max_line_length": 84,
"avg_line_length": 23.983539094650205,
"alnum_prop": 0.6666094715168154,
"repo_name": "benniaobuguai/android-project-wo2b",
"id": "58fda3d20b541d60ccbff4ca1db247a2471dc79e",
"size": "6581",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "wo2b-common-api/src/opensource/component/photoview/PhotoView.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "HTML",
"bytes": "8505"
},
{
"name": "Java",
"bytes": "2842359"
},
{
"name": "Makefile",
"bytes": "1916"
}
],
"symlink_target": ""
} |
import requests
import sys
import config
import os.path
print 'ADYEN skin upload v. 0.1'
merch_env_codes = config.merch_env_codes
moto_env_codes = config.moto_env_codes
ssl_verify=True
def upload_skin(skin_file, account_data, env_code) :
url_0 = "https://ca-test.adyen.com/ca/ca/login.shtml"
url = "https://ca-test.adyen.com/ca/ca/config/j_security_check"
headers={"Host":"ca-test.adyen.com","Referer": "https://ca-test.adyen.com/ca/ca/skin/uploadskin.shtml?skinCode="+env_code,"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0",
"Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8","Accept-Language": "en-US,en;q=0.5","Accept-Encoding":"gzip, deflate"}
result = False
print "login"
s = requests.session()
r= s.get(url_0,verify=ssl_verify, headers=headers) #####################################
print "INFO: login to admin console"
pos=r.text.find("j_formHash")
formhash= r.text[pos+19:pos+19+31]
data["j_formHash"]=formhash
#print "DEBUG:formhash:" +formhash
#print "DEBUG: cookies:" + str(s.cookies)
r = s.post(url, data, headers=headers) ##########################################
#print r.text
print "INF:open skin menu"
r=s.get("https://ca-test.adyen.com/ca/ca/skin/skins.shtml", headers=headers, verify=ssl_verify)
print "INFO: open skin " + env_code
r = s.get ("https://ca-test.adyen.com/ca/ca/skin/uploadskin.shtml?skinCode="+env_code, verify=ssl_verify, headers=headers) ################################
#print r.text
pos=r.text.find("formHash")
pos=r.text.find("formHash", pos+1)
pos=r.text.find("formHash", pos+1)
formhash= r.text[pos+17:pos+17+31]
#print "DEBUG: form hash:" + formhash
print "INFO: upload skin " + env_code
files = {'uploadFile': (skin_file.name,skin_file,'application/x-zip-compressed',{'Expires': '0'})}
#files = dict(foo='bar')
#"activeAccount":"MerchantAccount.DeTuinenATG"
#data1={"uploadFile":env_code+".zip"}
data1={"skinCode":env_code,"formHash":formhash}
upload_url="https://ca-test.adyen.com/ca/ca/skin/processkin.shtml"
r=s.post(upload_url,files=files, headers=headers,verify=ssl_verify, data=data1)
#print r.text
#if (r.text.find("Your Skin file has been uploaded")!=-1):
if (r.text.find("No files were accepted")!=-1):
print "UPLOAD ERROR"
exit(1)
else :
print "UPLOADED OK"
#print r.headers
print "INFO: confirm skin " + env_code
pos=r.text.find("formHash")
pos=r.text.find("formHash", pos+1)
pos=r.text.find("formHash", pos+1)
formhash= r.text[pos+17:pos+17+31]
print formhash
data2={"skinCode":env_code, "submit":"Confirm" ,"formHash":formhash,"activate":"true" }
r=s.post(upload_url, headers=headers,verify=ssl_verify, data=data2)
#print r.text
if (r.text.find("Skin processed and submitted to the test system")!=-1):
print "ACTIVATED OK"
else :
exit (1)
return result
#print len(sys.argv)
if ((len(sys.argv)!=4)):
print "USAGE: " + sys.argv[0] + " [env code e.g. DEV2] [file name e.g. ./moto-skin.zip] [account type moto or merch]"
exit(1)
env_name= sys.argv[1]
skin_file_name = sys.argv[2]
account_mode = sys.argv[3]
#file
if (not os.path.isfile(skin_file_name)):
print "ERROR: file does not exit:" + skin_file_name
exit(1)
file1=open(skin_file_name, 'rb')
print file1.name
if (not (env_name in moto_env_codes.keys())):
print "Bad env name"
exit (1)
if (account_mode=="merch") :
data=config.merch_data
env_code=merch_env_codes[env_name]
if (account_mode=="moto") :
data=config.moto_data
env_code=moto_env_codes[env_name]
upload_skin (file1, data, env_code=env_code)
| {
"content_hash": "030edeee19a5fedab13aa31ccb49c85c",
"timestamp": "",
"source": "github",
"line_count": 125,
"max_line_length": 215,
"avg_line_length": 30.432,
"alnum_prop": 0.6303890641430073,
"repo_name": "shaiban/adyen_skin_upload",
"id": "dd92b5948772b38a715fa2f0d70df9a299456133",
"size": "3804",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "adyen_skin_upload.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Python",
"bytes": "4146"
}
],
"symlink_target": ""
} |
gulp-here
=========
[](https://badge.fury.io/js/gulp-here)
Transform and inject resources into HTML template.
## Install
```bash
npm install gulp-here --save-dev
```
## Usage
* **In gulp stream:**
```js
var here = require('gulp-here')
gulp.src('asserts/*.html')
.pipe(
here(gulp.src(['asserts/*.css', 'asserts/*.js']), {
/**
* Namespace match
* @optional
* @type {String}
*/
name: 'asserts',
/**
* Sort method of the injecting order of resources
* @optional
* @param {Array} resources resources list, each item is a vinyl stream
* @param {Stream} target target html template for injecting
* @param {Object} options options given by `Here`'s tag of html template
* @return {Array} New resources list
*/
sort: function (resources, target, options) {
// resource => ['dist/a.js', 'dist/b.js', 'dist/a.css']
},
/**
* Change resource's path manually
* @optional
* @param {Stream} file file is a resource that will be injected to template file. It's a vinyl stream.
* @param {Stream} target target html template for injecting
* @param {Object} options options given by here's tag of template html
* @return {String} full path of the resource
*/
prefix: function (file, target, options) {
// set relative to false will not change path to relative path of "cwd"
option.relative = false
return '/path/to/cdn/' + file.relative
},
// or
// prefix: 'http://path/to/resource/',
/**
* Transform method that for injecting custom resource url/content
* @optional
* @param {Stream} file file is a resource that will be injected to template file. It's a vinyl stream.
* @param {Stream} target target html template for injecting
* @param {Object} options options given by here's tag of template html
* @return {String|Boolean}
*/
transform: function (file, target, options) {
if (cnd1) return false // will skip inject step
else if (cnd2) return '<script src="$"></script>'.replace(PREFIX, file.path) // transform to custom centent
else return true // continue inject step
}
)
)
```
> Notice: File object is a [vinly](https://github.com/gulpjs/vinyl) stream.
* **Template syntax:**
Inject tag syntax in the format of:
```html
<!--here[:namespace]:regex_match[??query]--><!--here-->
```
Support queries:
- **inline**
Inline file contents to HTML, default `false`
- **wrap**
HTML tag wrapper HTML tag for resource contontent, default `true`.Using with inline only.
For example:
```html
<!-- here:asserts_here:\.html$??inline&wrap=false --><!-- /here -->
```
Inline resources:
> Notice: query will be passed to **sort** and **transform** method as options.
```html
<!-- here:\.css$??inline --><!-- /here -->
```
Namespace match(`matching with "options.name" if given`):
```html
<!-- here:namespace:\.css$ --><!-- /here -->
```
More complex matching regexp:
```html
<!-- here:\.(css|js|jsx)$ --><!-- /here -->
```
* **Extname mapping:**
Using `here.mapping(from, to)` to map extension of resource for reusing default wrapper when injecting:
```js
here.mapping('ejs', 'html')
.mapping('less', 'css')
```
| {
"content_hash": "4b63060025102578296780e83527b42d",
"timestamp": "",
"source": "github",
"line_count": 119,
"max_line_length": 123,
"avg_line_length": 31.45378151260504,
"alnum_prop": 0.5543681538872562,
"repo_name": "switer/gulp-here",
"id": "989d3d7b2840cc8a55bad73dedfd07376dd9147b",
"size": "3743",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "README.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "39"
},
{
"name": "HTML",
"bytes": "560"
},
{
"name": "JavaScript",
"bytes": "13019"
}
],
"symlink_target": ""
} |
import {
APP_ROUTES,
appRouting
} from './app.routing';
import { DashboardComponent } from './dashboard/dashboard.component';
import { BuildsComponent } from './builds/builds.component';
describe('AppRoutes', () => {
it('should redirect to dashboard', () => {
expect(APP_ROUTES[0].path).toBe('**');
expect(APP_ROUTES[0].redirectTo).toBe('dashboard');
})
it('should have app routing module', () => {
expect(appRouting.ngModule.name).toBe('RouterModule');
})
}) | {
"content_hash": "6aba2f85d73a27ed3cfa265a51ea433c",
"timestamp": "",
"source": "github",
"line_count": 18,
"max_line_length": 69,
"avg_line_length": 28.444444444444443,
"alnum_prop": 0.623046875,
"repo_name": "klinker-consulting/jenkins-dashboard",
"id": "372fc91317d5da44bc66a92e389002f6f078cea7",
"size": "512",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/app/app.routing.spec.ts",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "269"
},
{
"name": "HTML",
"bytes": "1118"
},
{
"name": "JavaScript",
"bytes": "3350"
},
{
"name": "TypeScript",
"bytes": "18614"
}
],
"symlink_target": ""
} |
#include "mitkFileReaderWriterBase.h"
#include "mitkCoreServices.h"
#include "mitkIMimeTypeProvider.h"
#include "mitkIOMimeTypes.h"
#include "mitkLogMacros.h"
#include <usGetModuleContext.h>
#include <usLDAPProp.h>
namespace mitk
{
FileReaderWriterBase::FileReaderWriterBase() : m_Ranking(0), m_MimeTypePrefix(IOMimeTypes::DEFAULT_BASE_NAME() + ".")
{
}
FileReaderWriterBase::~FileReaderWriterBase() { this->UnregisterMimeType(); }
FileReaderWriterBase::FileReaderWriterBase(const FileReaderWriterBase &other)
: m_Description(other.m_Description),
m_Ranking(other.m_Ranking),
m_MimeTypePrefix(other.m_MimeTypePrefix),
m_Options(other.m_Options),
m_DefaultOptions(other.m_DefaultOptions),
m_CustomMimeType(other.m_CustomMimeType->Clone())
{
}
FileReaderWriterBase::Options FileReaderWriterBase::GetOptions() const
{
Options options = m_Options;
options.insert(m_DefaultOptions.begin(), m_DefaultOptions.end());
return options;
}
us::Any FileReaderWriterBase::GetOption(const std::string &name) const
{
auto iter = m_Options.find(name);
if (iter != m_Options.end())
{
return iter->second;
}
iter = m_DefaultOptions.find(name);
if (iter != m_DefaultOptions.end())
{
return iter->second;
}
return us::Any();
}
void FileReaderWriterBase::SetOptions(const FileReaderWriterBase::Options &options)
{
for (const auto &option : options)
{
this->SetOption(option.first, option.second);
}
}
void FileReaderWriterBase::SetOption(const std::string &name, const us::Any &value)
{
if (m_DefaultOptions.find(name) == m_DefaultOptions.end())
{
MITK_WARN << "Ignoring unknown IFileReader option '" << name << "'";
}
else
{
if (value.Empty())
{
// an empty Any signals 'reset to default value'
m_Options.erase(name);
}
else
{
m_Options[name] = value;
}
}
}
void FileReaderWriterBase::SetDefaultOptions(const FileReaderWriterBase::Options &defaultOptions)
{
m_DefaultOptions = defaultOptions;
}
FileReaderWriterBase::Options FileReaderWriterBase::GetDefaultOptions() const { return m_DefaultOptions; }
void FileReaderWriterBase::SetRanking(int ranking) { m_Ranking = ranking; }
int FileReaderWriterBase::GetRanking() const { return m_Ranking; }
void FileReaderWriterBase::SetMimeType(const CustomMimeType &mimeType) { m_CustomMimeType.reset(mimeType.Clone()); }
const CustomMimeType *FileReaderWriterBase::GetMimeType() const { return m_CustomMimeType.get(); }
CustomMimeType *FileReaderWriterBase::GetMimeType() { return m_CustomMimeType.get(); }
MimeType FileReaderWriterBase::GetRegisteredMimeType() const
{
MimeType result;
if (!m_MimeTypeReg)
{
if (!m_CustomMimeType->GetName().empty())
{
CoreServicePointer<IMimeTypeProvider> mimeTypeProvider(
CoreServices::GetMimeTypeProvider(us::GetModuleContext()));
return mimeTypeProvider->GetMimeTypeForName(m_CustomMimeType->GetName());
}
return result;
}
us::ServiceReferenceU reference = m_MimeTypeReg.GetReference();
try
{
int rank = 0;
us::Any rankProp = reference.GetProperty(us::ServiceConstants::SERVICE_RANKING());
if (!rankProp.Empty())
{
rank = us::any_cast<int>(rankProp);
}
auto id = us::any_cast<long>(reference.GetProperty(us::ServiceConstants::SERVICE_ID()));
result = MimeType(*m_CustomMimeType, rank, id);
}
catch (const us::BadAnyCastException &e)
{
MITK_WARN << "Unexpected exception: " << e.what();
}
return result;
}
void FileReaderWriterBase::SetMimeTypePrefix(const std::string &prefix) { m_MimeTypePrefix = prefix; }
std::string FileReaderWriterBase::GetMimeTypePrefix() const { return m_MimeTypePrefix; }
void FileReaderWriterBase::SetDescription(const std::string &description) { m_Description = description; }
std::string FileReaderWriterBase::GetDescription() const { return m_Description; }
void FileReaderWriterBase::AddProgressCallback(const FileReaderWriterBase::ProgressCallback &callback)
{
m_ProgressMessage += callback;
}
void FileReaderWriterBase::RemoveProgressCallback(const FileReaderWriterBase::ProgressCallback &callback)
{
m_ProgressMessage -= callback;
}
us::ServiceRegistration<CustomMimeType> FileReaderWriterBase::RegisterMimeType(us::ModuleContext *context)
{
if (context == nullptr)
throw std::invalid_argument("The context argument must not be nullptr.");
CoreServicePointer<IMimeTypeProvider> mimeTypeProvider(CoreServices::GetMimeTypeProvider(context));
const std::vector<std::string> extensions = m_CustomMimeType->GetExtensions();
// If the mime type name is set and the list of extensions is empty,
// look up the mime type in the registry and print a warning if
// there is none
if (!m_CustomMimeType->GetName().empty() && extensions.empty())
{
if (!mimeTypeProvider->GetMimeTypeForName(m_CustomMimeType->GetName()).IsValid())
{
MITK_WARN << "Registering a MITK reader or writer with an unknown MIME type " << m_CustomMimeType->GetName();
}
return m_MimeTypeReg;
}
// If the mime type name and extensions list is empty, print a warning
if (m_CustomMimeType->GetName().empty() && extensions.empty())
{
MITK_WARN << "Trying to register a MITK reader or writer with an empty mime type name and empty extension list.";
return m_MimeTypeReg;
}
// extensions is not empty
if (m_CustomMimeType->GetName().empty())
{
// Create a synthetic mime type name from the
// first extension in the list
m_CustomMimeType->SetName(m_MimeTypePrefix + extensions.front());
}
// Register a new mime type
// us::ServiceProperties props;
// props["name"] = m_CustomMimeType.GetName();
// props["extensions"] = m_CustomMimeType.GetExtensions();
m_MimeTypeReg = context->RegisterService<CustomMimeType>(m_CustomMimeType.get());
return m_MimeTypeReg;
}
void FileReaderWriterBase::UnregisterMimeType()
{
if (m_MimeTypeReg)
{
try
{
m_MimeTypeReg.Unregister();
}
catch (const std::logic_error &)
{
// service already unregistered
}
}
}
}
| {
"content_hash": "34a4bc8b27ef63bcd8460fadda2ce3b8",
"timestamp": "",
"source": "github",
"line_count": 198,
"max_line_length": 119,
"avg_line_length": 32.32828282828283,
"alnum_prop": 0.6817684736759881,
"repo_name": "MITK/MITK",
"id": "dc26e2f832c64b2766164473a1630533ba324789",
"size": "6782",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "Modules/Core/src/IO/mitkFileReaderWriterBase.cpp",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Batchfile",
"bytes": "60"
},
{
"name": "C",
"bytes": "160965"
},
{
"name": "C++",
"bytes": "29329826"
},
{
"name": "CMake",
"bytes": "997356"
},
{
"name": "CSS",
"bytes": "5894"
},
{
"name": "HTML",
"bytes": "78294"
},
{
"name": "JavaScript",
"bytes": "1044"
},
{
"name": "Makefile",
"bytes": "788"
},
{
"name": "Objective-C",
"bytes": "8783"
},
{
"name": "Python",
"bytes": "545"
},
{
"name": "SWIG",
"bytes": "28530"
},
{
"name": "Shell",
"bytes": "56972"
}
],
"symlink_target": ""
} |
class cmbNucAssembly;
class cmbAssyParametersWidget : public QWidget
{
Q_OBJECT
public:
cmbAssyParametersWidget(QWidget* p);
virtual ~cmbAssyParametersWidget();
// Description:
// set/get the assembly that this widget with be interact with
void setAssembly(cmbNucAssembly*);
cmbNucAssembly* getAssembly(){return this->Assembly;}
signals:
void valuesChanged();
public slots:
// Invoked when Reset button clicked
void onReset();
public slots: // reset property panel with given object
void resetAssembly(cmbNucAssembly* assy);
// apply property panel to given object
void applyToAssembly(cmbNucAssembly* assy);
private:
class cmbAssyParametersWidgetInternal;
cmbAssyParametersWidgetInternal* Internal;
void initUI();
cmbNucAssembly *Assembly;
};
#endif
| {
"content_hash": "a16c34849c225851771f699f41a5c40f",
"timestamp": "",
"source": "github",
"line_count": 36,
"max_line_length": 64,
"avg_line_length": 22.083333333333332,
"alnum_prop": 0.7635220125786164,
"repo_name": "Sprunth/RGG",
"id": "c2ae25e2d9c03be1f517752198bd64621c4ebc51",
"size": "945",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Application/cmbAssyParametersWidget.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C",
"bytes": "227858"
},
{
"name": "C++",
"bytes": "936467"
},
{
"name": "CMake",
"bytes": "376912"
},
{
"name": "Python",
"bytes": "42804"
},
{
"name": "QMake",
"bytes": "7957"
},
{
"name": "Shell",
"bytes": "362737"
}
],
"symlink_target": ""
} |
import gulp from 'gulp';
import { logger } from 'utility-node-log';
import minStyle from 'gulp-clean-css';
import minScript from 'gulp-uglify';
import minHtml from 'gulp-htmlmin';
import concat from 'gulp-concat';
import rename from 'gulp-rename';
import inline from 'gulp-inline';
logger.logLevel = 'DEBUG';
let appIndex = [ 'main.html' ];
let appOutput = 'index.html';
gulp.task( 'default', ( ) => {
return gulp.src( appIndex )
.pipe( inline( {
base: './',
js: minScript,
css: minStyle,
disabledTypes: [ 'svg', 'img' ], // Only inline css and js files
ignore: [ ]
} ) )
.pipe( minHtml( {
collapseWhitespace: true,
collapseInlineTagWhitespace: true,
conservativeCollapse: true,
minifyCSS: true,
minifyJS: true
}) )
.pipe( rename( appOutput ) )
.pipe( gulp.dest( './' ) );
} );
| {
"content_hash": "b4f0afb8f0525d95adc07a8953f1e1ec",
"timestamp": "",
"source": "github",
"line_count": 34,
"max_line_length": 71,
"avg_line_length": 25.558823529411764,
"alnum_prop": 0.616800920598389,
"repo_name": "unknownmoon/tool-detect-features",
"id": "f980870d5a679e98800354ceba91531c7f90c20a",
"size": "869",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "gulpfile.babel.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "3857"
},
{
"name": "HTML",
"bytes": "1450"
},
{
"name": "JavaScript",
"bytes": "312179"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_144) on Sat Sep 30 14:23:25 JST 2017 -->
<title>Constant Field Values (core API)</title>
<meta name="date" content="2017-09-30">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Constant Field Values (core API)";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="overview-summary.html">Overview</a></li>
<li>Package</li>
<li>Class</li>
<li><a href="overview-tree.html">Tree</a></li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li><a href="index-all.html">Index</a></li>
<li><a href="help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="index.html?constant-values.html" target="_top">Frames</a></li>
<li><a href="constant-values.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 title="Constant Field Values" class="title">Constant Field Values</h1>
<h2 title="Contents">Contents</h2>
<ul>
<li><a href="#adf">adf.*</a></li>
</ul>
</div>
<div class="constantValuesContainer"><a name="adf">
<!-- -->
</a>
<h2 title="adf">adf.*</h2>
<ul class="blockList">
<li class="blockList">
<table class="constantsSummary" border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values">
<caption><span>adf.<a href="adf/Main.html" title="class in adf">Main</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th scope="col">Constant Field</th>
<th class="colLast" scope="col">Value</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a name="adf.Main.VERSION_CODE">
<!-- -->
</a><code>public static final java.lang.String</code></td>
<td><code><a href="adf/Main.html#VERSION_CODE">VERSION_CODE</a></code></td>
<td class="colLast"><code>"2.2.0"</code></td>
</tr>
</tbody>
</table>
</li>
</ul>
<a name="adf.agent">
<!-- -->
</a>
<h2 title="adf.agent">adf.agent.*</h2>
<ul class="blockList">
<li class="blockList">
<table class="constantsSummary" border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values">
<caption><span>adf.agent.<a href="adf/agent/Agent.html" title="class in adf.agent">Agent</a><<a href="adf/agent/Agent.html" title="type parameter in Agent">E</a> extends rescuecore2.standard.entities.StandardEntity></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th scope="col">Constant Field</th>
<th class="colLast" scope="col">Value</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a name="adf.agent.Agent.DATASTORAGE_FILE_NAME_AMBULANCE">
<!-- -->
</a><code>protected static final java.lang.String</code></td>
<td><code><a href="adf/agent/Agent.html#DATASTORAGE_FILE_NAME_AMBULANCE">DATASTORAGE_FILE_NAME_AMBULANCE</a></code></td>
<td class="colLast"><code>"ambulance.bin"</code></td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a name="adf.agent.Agent.DATASTORAGE_FILE_NAME_FIRE">
<!-- -->
</a><code>protected static final java.lang.String</code></td>
<td><code><a href="adf/agent/Agent.html#DATASTORAGE_FILE_NAME_FIRE">DATASTORAGE_FILE_NAME_FIRE</a></code></td>
<td class="colLast"><code>"fire.bin"</code></td>
</tr>
<tr class="altColor">
<td class="colFirst"><a name="adf.agent.Agent.DATASTORAGE_FILE_NAME_POLICE">
<!-- -->
</a><code>protected static final java.lang.String</code></td>
<td><code><a href="adf/agent/Agent.html#DATASTORAGE_FILE_NAME_POLICE">DATASTORAGE_FILE_NAME_POLICE</a></code></td>
<td class="colLast"><code>"police.bin"</code></td>
</tr>
</tbody>
</table>
</li>
</ul>
<ul class="blockList">
<li class="blockList">
<table class="constantsSummary" border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values">
<caption><span>adf.agent.communication.standard.bundle.centralized.<a href="adf/agent/communication/standard/bundle/centralized/CommandAmbulance.html" title="class in adf.agent.communication.standard.bundle.centralized">CommandAmbulance</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th scope="col">Constant Field</th>
<th class="colLast" scope="col">Value</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a name="adf.agent.communication.standard.bundle.centralized.CommandAmbulance.ACTION_AUTONOMY">
<!-- -->
</a><code>public static final int</code></td>
<td><code><a href="adf/agent/communication/standard/bundle/centralized/CommandAmbulance.html#ACTION_AUTONOMY">ACTION_AUTONOMY</a></code></td>
<td class="colLast"><code>5</code></td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a name="adf.agent.communication.standard.bundle.centralized.CommandAmbulance.ACTION_LOAD">
<!-- -->
</a><code>public static final int</code></td>
<td><code><a href="adf/agent/communication/standard/bundle/centralized/CommandAmbulance.html#ACTION_LOAD">ACTION_LOAD</a></code></td>
<td class="colLast"><code>3</code></td>
</tr>
<tr class="altColor">
<td class="colFirst"><a name="adf.agent.communication.standard.bundle.centralized.CommandAmbulance.ACTION_MOVE">
<!-- -->
</a><code>public static final int</code></td>
<td><code><a href="adf/agent/communication/standard/bundle/centralized/CommandAmbulance.html#ACTION_MOVE">ACTION_MOVE</a></code></td>
<td class="colLast"><code>1</code></td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a name="adf.agent.communication.standard.bundle.centralized.CommandAmbulance.ACTION_RESCUE">
<!-- -->
</a><code>public static final int</code></td>
<td><code><a href="adf/agent/communication/standard/bundle/centralized/CommandAmbulance.html#ACTION_RESCUE">ACTION_RESCUE</a></code></td>
<td class="colLast"><code>2</code></td>
</tr>
<tr class="altColor">
<td class="colFirst"><a name="adf.agent.communication.standard.bundle.centralized.CommandAmbulance.ACTION_REST">
<!-- -->
</a><code>public static final int</code></td>
<td><code><a href="adf/agent/communication/standard/bundle/centralized/CommandAmbulance.html#ACTION_REST">ACTION_REST</a></code></td>
<td class="colLast"><code>0</code></td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a name="adf.agent.communication.standard.bundle.centralized.CommandAmbulance.ACTION_UNLOAD">
<!-- -->
</a><code>public static final int</code></td>
<td><code><a href="adf/agent/communication/standard/bundle/centralized/CommandAmbulance.html#ACTION_UNLOAD">ACTION_UNLOAD</a></code></td>
<td class="colLast"><code>4</code></td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<table class="constantsSummary" border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values">
<caption><span>adf.agent.communication.standard.bundle.centralized.<a href="adf/agent/communication/standard/bundle/centralized/CommandFire.html" title="class in adf.agent.communication.standard.bundle.centralized">CommandFire</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th scope="col">Constant Field</th>
<th class="colLast" scope="col">Value</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a name="adf.agent.communication.standard.bundle.centralized.CommandFire.ACTION_AUTONOMY">
<!-- -->
</a><code>public static final int</code></td>
<td><code><a href="adf/agent/communication/standard/bundle/centralized/CommandFire.html#ACTION_AUTONOMY">ACTION_AUTONOMY</a></code></td>
<td class="colLast"><code>4</code></td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a name="adf.agent.communication.standard.bundle.centralized.CommandFire.ACTION_EXTINGUISH">
<!-- -->
</a><code>public static final int</code></td>
<td><code><a href="adf/agent/communication/standard/bundle/centralized/CommandFire.html#ACTION_EXTINGUISH">ACTION_EXTINGUISH</a></code></td>
<td class="colLast"><code>2</code></td>
</tr>
<tr class="altColor">
<td class="colFirst"><a name="adf.agent.communication.standard.bundle.centralized.CommandFire.ACTION_MOVE">
<!-- -->
</a><code>public static final int</code></td>
<td><code><a href="adf/agent/communication/standard/bundle/centralized/CommandFire.html#ACTION_MOVE">ACTION_MOVE</a></code></td>
<td class="colLast"><code>1</code></td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a name="adf.agent.communication.standard.bundle.centralized.CommandFire.ACTION_REFILL">
<!-- -->
</a><code>public static final int</code></td>
<td><code><a href="adf/agent/communication/standard/bundle/centralized/CommandFire.html#ACTION_REFILL">ACTION_REFILL</a></code></td>
<td class="colLast"><code>3</code></td>
</tr>
<tr class="altColor">
<td class="colFirst"><a name="adf.agent.communication.standard.bundle.centralized.CommandFire.ACTION_REST">
<!-- -->
</a><code>public static final int</code></td>
<td><code><a href="adf/agent/communication/standard/bundle/centralized/CommandFire.html#ACTION_REST">ACTION_REST</a></code></td>
<td class="colLast"><code>0</code></td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<table class="constantsSummary" border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values">
<caption><span>adf.agent.communication.standard.bundle.centralized.<a href="adf/agent/communication/standard/bundle/centralized/CommandPolice.html" title="class in adf.agent.communication.standard.bundle.centralized">CommandPolice</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th scope="col">Constant Field</th>
<th class="colLast" scope="col">Value</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a name="adf.agent.communication.standard.bundle.centralized.CommandPolice.ACTION_AUTONOMY">
<!-- -->
</a><code>public static final int</code></td>
<td><code><a href="adf/agent/communication/standard/bundle/centralized/CommandPolice.html#ACTION_AUTONOMY">ACTION_AUTONOMY</a></code></td>
<td class="colLast"><code>3</code></td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a name="adf.agent.communication.standard.bundle.centralized.CommandPolice.ACTION_CLEAR">
<!-- -->
</a><code>public static final int</code></td>
<td><code><a href="adf/agent/communication/standard/bundle/centralized/CommandPolice.html#ACTION_CLEAR">ACTION_CLEAR</a></code></td>
<td class="colLast"><code>2</code></td>
</tr>
<tr class="altColor">
<td class="colFirst"><a name="adf.agent.communication.standard.bundle.centralized.CommandPolice.ACTION_MOVE">
<!-- -->
</a><code>public static final int</code></td>
<td><code><a href="adf/agent/communication/standard/bundle/centralized/CommandPolice.html#ACTION_MOVE">ACTION_MOVE</a></code></td>
<td class="colLast"><code>1</code></td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a name="adf.agent.communication.standard.bundle.centralized.CommandPolice.ACTION_REST">
<!-- -->
</a><code>public static final int</code></td>
<td><code><a href="adf/agent/communication/standard/bundle/centralized/CommandPolice.html#ACTION_REST">ACTION_REST</a></code></td>
<td class="colLast"><code>0</code></td>
</tr>
</tbody>
</table>
</li>
</ul>
<ul class="blockList">
<li class="blockList">
<table class="constantsSummary" border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values">
<caption><span>adf.agent.communication.standard.bundle.information.<a href="adf/agent/communication/standard/bundle/information/MessageAmbulanceTeam.html" title="class in adf.agent.communication.standard.bundle.information">MessageAmbulanceTeam</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th scope="col">Constant Field</th>
<th class="colLast" scope="col">Value</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a name="adf.agent.communication.standard.bundle.information.MessageAmbulanceTeam.ACTION_LOAD">
<!-- -->
</a><code>public static final int</code></td>
<td><code><a href="adf/agent/communication/standard/bundle/information/MessageAmbulanceTeam.html#ACTION_LOAD">ACTION_LOAD</a></code></td>
<td class="colLast"><code>3</code></td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a name="adf.agent.communication.standard.bundle.information.MessageAmbulanceTeam.ACTION_MOVE">
<!-- -->
</a><code>public static final int</code></td>
<td><code><a href="adf/agent/communication/standard/bundle/information/MessageAmbulanceTeam.html#ACTION_MOVE">ACTION_MOVE</a></code></td>
<td class="colLast"><code>1</code></td>
</tr>
<tr class="altColor">
<td class="colFirst"><a name="adf.agent.communication.standard.bundle.information.MessageAmbulanceTeam.ACTION_RESCUE">
<!-- -->
</a><code>public static final int</code></td>
<td><code><a href="adf/agent/communication/standard/bundle/information/MessageAmbulanceTeam.html#ACTION_RESCUE">ACTION_RESCUE</a></code></td>
<td class="colLast"><code>2</code></td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a name="adf.agent.communication.standard.bundle.information.MessageAmbulanceTeam.ACTION_REST">
<!-- -->
</a><code>public static final int</code></td>
<td><code><a href="adf/agent/communication/standard/bundle/information/MessageAmbulanceTeam.html#ACTION_REST">ACTION_REST</a></code></td>
<td class="colLast"><code>0</code></td>
</tr>
<tr class="altColor">
<td class="colFirst"><a name="adf.agent.communication.standard.bundle.information.MessageAmbulanceTeam.ACTION_UNLOAD">
<!-- -->
</a><code>public static final int</code></td>
<td><code><a href="adf/agent/communication/standard/bundle/information/MessageAmbulanceTeam.html#ACTION_UNLOAD">ACTION_UNLOAD</a></code></td>
<td class="colLast"><code>4</code></td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<table class="constantsSummary" border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values">
<caption><span>adf.agent.communication.standard.bundle.information.<a href="adf/agent/communication/standard/bundle/information/MessageFireBrigade.html" title="class in adf.agent.communication.standard.bundle.information">MessageFireBrigade</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th scope="col">Constant Field</th>
<th class="colLast" scope="col">Value</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a name="adf.agent.communication.standard.bundle.information.MessageFireBrigade.ACTION_EXTINGUISH">
<!-- -->
</a><code>public static final int</code></td>
<td><code><a href="adf/agent/communication/standard/bundle/information/MessageFireBrigade.html#ACTION_EXTINGUISH">ACTION_EXTINGUISH</a></code></td>
<td class="colLast"><code>2</code></td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a name="adf.agent.communication.standard.bundle.information.MessageFireBrigade.ACTION_MOVE">
<!-- -->
</a><code>public static final int</code></td>
<td><code><a href="adf/agent/communication/standard/bundle/information/MessageFireBrigade.html#ACTION_MOVE">ACTION_MOVE</a></code></td>
<td class="colLast"><code>1</code></td>
</tr>
<tr class="altColor">
<td class="colFirst"><a name="adf.agent.communication.standard.bundle.information.MessageFireBrigade.ACTION_REFILL">
<!-- -->
</a><code>public static final int</code></td>
<td><code><a href="adf/agent/communication/standard/bundle/information/MessageFireBrigade.html#ACTION_REFILL">ACTION_REFILL</a></code></td>
<td class="colLast"><code>3</code></td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a name="adf.agent.communication.standard.bundle.information.MessageFireBrigade.ACTION_REST">
<!-- -->
</a><code>public static final int</code></td>
<td><code><a href="adf/agent/communication/standard/bundle/information/MessageFireBrigade.html#ACTION_REST">ACTION_REST</a></code></td>
<td class="colLast"><code>0</code></td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<table class="constantsSummary" border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values">
<caption><span>adf.agent.communication.standard.bundle.information.<a href="adf/agent/communication/standard/bundle/information/MessagePoliceForce.html" title="class in adf.agent.communication.standard.bundle.information">MessagePoliceForce</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th scope="col">Constant Field</th>
<th class="colLast" scope="col">Value</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a name="adf.agent.communication.standard.bundle.information.MessagePoliceForce.ACTION_CLEAR">
<!-- -->
</a><code>public static final int</code></td>
<td><code><a href="adf/agent/communication/standard/bundle/information/MessagePoliceForce.html#ACTION_CLEAR">ACTION_CLEAR</a></code></td>
<td class="colLast"><code>2</code></td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a name="adf.agent.communication.standard.bundle.information.MessagePoliceForce.ACTION_MOVE">
<!-- -->
</a><code>public static final int</code></td>
<td><code><a href="adf/agent/communication/standard/bundle/information/MessagePoliceForce.html#ACTION_MOVE">ACTION_MOVE</a></code></td>
<td class="colLast"><code>1</code></td>
</tr>
<tr class="altColor">
<td class="colFirst"><a name="adf.agent.communication.standard.bundle.information.MessagePoliceForce.ACTION_REST">
<!-- -->
</a><code>public static final int</code></td>
<td><code><a href="adf/agent/communication/standard/bundle/information/MessagePoliceForce.html#ACTION_REST">ACTION_REST</a></code></td>
<td class="colLast"><code>0</code></td>
</tr>
</tbody>
</table>
</li>
</ul>
<ul class="blockList">
<li class="blockList">
<table class="constantsSummary" border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values">
<caption><span>adf.agent.precompute.<a href="adf/agent/precompute/PrecomputeData.html" title="class in adf.agent.precompute">PrecomputeData</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th scope="col">Constant Field</th>
<th class="colLast" scope="col">Value</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a name="adf.agent.precompute.PrecomputeData.DEFAULT_FILE_NAME">
<!-- -->
</a><code>public static final java.lang.String</code></td>
<td><code><a href="adf/agent/precompute/PrecomputeData.html#DEFAULT_FILE_NAME">DEFAULT_FILE_NAME</a></code></td>
<td class="colLast"><code>"data.bin"</code></td>
</tr>
</tbody>
</table>
</li>
</ul>
<a name="adf.launcher">
<!-- -->
</a>
<h2 title="adf.launcher">adf.launcher.*</h2>
<ul class="blockList">
<li class="blockList">
<table class="constantsSummary" border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values">
<caption><span>adf.launcher.<a href="adf/launcher/ConfigKey.html" title="class in adf.launcher">ConfigKey</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th scope="col">Constant Field</th>
<th class="colLast" scope="col">Value</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a name="adf.launcher.ConfigKey.KEY_AMBULANCE_CENTRE_COUNT">
<!-- -->
</a><code>public static final java.lang.String</code></td>
<td><code><a href="adf/launcher/ConfigKey.html#KEY_AMBULANCE_CENTRE_COUNT">KEY_AMBULANCE_CENTRE_COUNT</a></code></td>
<td class="colLast"><code>"adf.team.office.ambulance.count"</code></td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a name="adf.launcher.ConfigKey.KEY_AMBULANCE_TEAM_COUNT">
<!-- -->
</a><code>public static final java.lang.String</code></td>
<td><code><a href="adf/launcher/ConfigKey.html#KEY_AMBULANCE_TEAM_COUNT">KEY_AMBULANCE_TEAM_COUNT</a></code></td>
<td class="colLast"><code>"adf.team.platoon.ambulance.count"</code></td>
</tr>
<tr class="altColor">
<td class="colFirst"><a name="adf.launcher.ConfigKey.KEY_DEBUG_FLAG">
<!-- -->
</a><code>public static final java.lang.String</code></td>
<td><code><a href="adf/launcher/ConfigKey.html#KEY_DEBUG_FLAG">KEY_DEBUG_FLAG</a></code></td>
<td class="colLast"><code>"adf.debug.flag"</code></td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a name="adf.launcher.ConfigKey.KEY_DEVELOP_DATA">
<!-- -->
</a><code>public static final java.lang.String</code></td>
<td><code><a href="adf/launcher/ConfigKey.html#KEY_DEVELOP_DATA">KEY_DEVELOP_DATA</a></code></td>
<td class="colLast"><code>"adf.develop.data"</code></td>
</tr>
<tr class="altColor">
<td class="colFirst"><a name="adf.launcher.ConfigKey.KEY_DEVELOP_DATA_FILE_NAME">
<!-- -->
</a><code>public static final java.lang.String</code></td>
<td><code><a href="adf/launcher/ConfigKey.html#KEY_DEVELOP_DATA_FILE_NAME">KEY_DEVELOP_DATA_FILE_NAME</a></code></td>
<td class="colLast"><code>"adf.develop.filename"</code></td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a name="adf.launcher.ConfigKey.KEY_DEVELOP_FLAG">
<!-- -->
</a><code>public static final java.lang.String</code></td>
<td><code><a href="adf/launcher/ConfigKey.html#KEY_DEVELOP_FLAG">KEY_DEVELOP_FLAG</a></code></td>
<td class="colLast"><code>"adf.develop.flag"</code></td>
</tr>
<tr class="altColor">
<td class="colFirst"><a name="adf.launcher.ConfigKey.KEY_FIRE_BRIGADE_COUNT">
<!-- -->
</a><code>public static final java.lang.String</code></td>
<td><code><a href="adf/launcher/ConfigKey.html#KEY_FIRE_BRIGADE_COUNT">KEY_FIRE_BRIGADE_COUNT</a></code></td>
<td class="colLast"><code>"adf.team.platoon.fire.count"</code></td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a name="adf.launcher.ConfigKey.KEY_FIRE_STATION_COUNT">
<!-- -->
</a><code>public static final java.lang.String</code></td>
<td><code><a href="adf/launcher/ConfigKey.html#KEY_FIRE_STATION_COUNT">KEY_FIRE_STATION_COUNT</a></code></td>
<td class="colLast"><code>"adf.team.office.fire.count"</code></td>
</tr>
<tr class="altColor">
<td class="colFirst"><a name="adf.launcher.ConfigKey.KEY_LOADER_CLASS">
<!-- -->
</a><code>public static final java.lang.String</code></td>
<td><code><a href="adf/launcher/ConfigKey.html#KEY_LOADER_CLASS">KEY_LOADER_CLASS</a></code></td>
<td class="colLast"><code>"adf.launcher.loader"</code></td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a name="adf.launcher.ConfigKey.KEY_MODULE_CONFIG_FILE_NAME">
<!-- -->
</a><code>public static final java.lang.String</code></td>
<td><code><a href="adf/launcher/ConfigKey.html#KEY_MODULE_CONFIG_FILE_NAME">KEY_MODULE_CONFIG_FILE_NAME</a></code></td>
<td class="colLast"><code>"adf.agent.moduleconfig.file"</code></td>
</tr>
<tr class="altColor">
<td class="colFirst"><a name="adf.launcher.ConfigKey.KEY_MODULE_DATA">
<!-- -->
</a><code>public static final java.lang.String</code></td>
<td><code><a href="adf/launcher/ConfigKey.html#KEY_MODULE_DATA">KEY_MODULE_DATA</a></code></td>
<td class="colLast"><code>"adf.agent.moduleconfig.data"</code></td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a name="adf.launcher.ConfigKey.KEY_POLICE_FORCE_COUNT">
<!-- -->
</a><code>public static final java.lang.String</code></td>
<td><code><a href="adf/launcher/ConfigKey.html#KEY_POLICE_FORCE_COUNT">KEY_POLICE_FORCE_COUNT</a></code></td>
<td class="colLast"><code>"adf.team.platoon.police.count"</code></td>
</tr>
<tr class="altColor">
<td class="colFirst"><a name="adf.launcher.ConfigKey.KEY_POLICE_OFFICE_COUNT">
<!-- -->
</a><code>public static final java.lang.String</code></td>
<td><code><a href="adf/launcher/ConfigKey.html#KEY_POLICE_OFFICE_COUNT">KEY_POLICE_OFFICE_COUNT</a></code></td>
<td class="colLast"><code>"adf.team.office.police.count"</code></td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a name="adf.launcher.ConfigKey.KEY_PRECOMPUTE">
<!-- -->
</a><code>public static final java.lang.String</code></td>
<td><code><a href="adf/launcher/ConfigKey.html#KEY_PRECOMPUTE">KEY_PRECOMPUTE</a></code></td>
<td class="colLast"><code>"adf.launcher.precompute"</code></td>
</tr>
</tbody>
</table>
</li>
</ul>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="overview-summary.html">Overview</a></li>
<li>Package</li>
<li>Class</li>
<li><a href="overview-tree.html">Tree</a></li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li><a href="index-all.html">Index</a></li>
<li><a href="help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="index.html?constant-values.html" target="_top">Frames</a></li>
<li><a href="constant-values.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
| {
"content_hash": "fd469adcdbae68727832c8d487465393",
"timestamp": "",
"source": "github",
"line_count": 592,
"max_line_length": 299,
"avg_line_length": 46.30067567567568,
"alnum_prop": 0.706566946369938,
"repo_name": "RCRS-ADF/core",
"id": "65b9df88e7bc41de564bb2fe7247e5b2a1a84902",
"size": "27410",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "build/docs/javadoc/constant-values.html",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "Java",
"bytes": "318682"
},
{
"name": "Shell",
"bytes": "27"
}
],
"symlink_target": ""
} |
package org.commcare.resources.model;
/**
* Represents an install issue caused by resource having invalid content (like mismatched xml tag)
*
* @author Phillip Mates ([email protected])
*/
public class InvalidResourceException extends RuntimeException {
public final String resourceName;
public InvalidResourceException(String resourceName, String msg) {
super(msg);
this.resourceName = resourceName;
}
}
| {
"content_hash": "81509dfdf95f0be099d5e60bb125a666",
"timestamp": "",
"source": "github",
"line_count": 16,
"max_line_length": 98,
"avg_line_length": 27.5,
"alnum_prop": 0.7386363636363636,
"repo_name": "dimagi/commcare-core",
"id": "80adf5f946771cd3e1677bd1451313fe74e89cd0",
"size": "440",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/main/java/org/commcare/resources/model/InvalidResourceException.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Clojure",
"bytes": "36966"
},
{
"name": "HTML",
"bytes": "9302"
},
{
"name": "Java",
"bytes": "3465695"
},
{
"name": "Lex",
"bytes": "4309"
},
{
"name": "Python",
"bytes": "36926"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>bytecompressor-parent</name>
<groupId>com.avast</groupId>
<artifactId>bytecompressor-parent</artifactId>
<version>1.2-SNAPSHOT</version>
<packaging>pom</packaging>
<parent>
<groupId>com.avast</groupId>
<artifactId>avast-oss-parent</artifactId>
<version>1.0.6</version>
</parent>
<url>https://github.com/avast-open/bytecompressor</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://opensource.org/licenses/Apache-2.0</url>
</license>
</licenses>
<organization>
<name>AVAST Software</name>
<url>http://www.avast.com</url>
</organization>
<developers>
<developer>
<id>karas</id>
<name>Lukas Karas</name>
<email>[email protected]</email>
<organization>AVAST Software</organization>
<organizationUrl>http://www.avast.com</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:[email protected]:avast-open/bytecompressor.git</connection>
<developerConnection>scm:git:[email protected]:avast-open/bytecompressor.git</developerConnection>
<url>[email protected]:avast-open/bytecompressor.git</url>
<tag>HEAD</tag>
</scm>
<properties>
<timestamp>${maven.build.timestamp}</timestamp>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<gpg.keyname>A03063C5</gpg.keyname>
<gpg.defaultKeyring>false</gpg.defaultKeyring>
</properties>
<modules>
<module>bytecompressor</module>
<module>bytecompressor-huffman</module>
<module>bytecompressor-jsnappy</module>
<module>bytecompressor-zlib</module>
</modules>
<build>
<plugins>
</plugins>
</build>
</project>
| {
"content_hash": "6c83c3558c0817dda374689d7d1def03",
"timestamp": "",
"source": "github",
"line_count": 69,
"max_line_length": 204,
"avg_line_length": 31.130434782608695,
"alnum_prop": 0.6294227188081937,
"repo_name": "avast/bytecompressor",
"id": "a31ecc28e5fa46386927a677b31732071becdf97",
"size": "2148",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "pom.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "137785"
},
{
"name": "Scala",
"bytes": "19091"
},
{
"name": "Shell",
"bytes": "1075"
}
],
"symlink_target": ""
} |
import deprecate from 'util-deprecate';
import '@storybook/addon-actions/register';
import '@storybook/addon-links/register';
deprecate(
() => {},
'@storybook/react-native/addons is deprecated. See https://storybooks.js.org/docs/react-storybook/addons/using-addons/',
)();
| {
"content_hash": "ae9181965c01199ef31ba6101f367b88",
"timestamp": "",
"source": "github",
"line_count": 8,
"max_line_length": 122,
"avg_line_length": 34.75,
"alnum_prop": 0.737410071942446,
"repo_name": "bigassdragon/storybook",
"id": "443c8cfc4e78657919579d813f7700a861628849",
"size": "278",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "app/react-native/src/server/addons.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "426"
},
{
"name": "HTML",
"bytes": "1640"
},
{
"name": "JavaScript",
"bytes": "324708"
},
{
"name": "Shell",
"bytes": "1349"
},
{
"name": "TypeScript",
"bytes": "2929"
}
],
"symlink_target": ""
} |
<html>
<head>
<title>Docs For Class PHPPowerPoint_IOFactory</title>
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>
<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
<tr>
<td class="header_top">PHPPowerPoint</td>
</tr>
<tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
<tr>
<td class="header_menu">
[ <a href="../classtrees_PHPPowerPoint.html" class="menu">class tree: PHPPowerPoint</a> ]
[ <a href="../elementindex_PHPPowerPoint.html" class="menu">index: PHPPowerPoint</a> ]
[ <a href="../elementindex.html" class="menu">all elements</a> ]
</td>
</tr>
<tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt="" /></td></tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="200" class="menu">
<b>Packages:</b><br />
<a href="../li_PHPPowerPoint.html">PHPPowerPoint</a><br />
<a href="../li_PHPPowerPoint_Reader.html">PHPPowerPoint_Reader</a><br />
<a href="../li_PHPPowerPoint_RichText.html">PHPPowerPoint_RichText</a><br />
<a href="../li_PHPPowerPoint_Shape.html">PHPPowerPoint_Shape</a><br />
<a href="../li_PHPPowerPoint_Shared.html">PHPPowerPoint_Shared</a><br />
<a href="../li_PHPPowerPoint_Slide.html">PHPPowerPoint_Slide</a><br />
<a href="../li_PHPPowerPoint_Style.html">PHPPowerPoint_Style</a><br />
<a href="../li_PHPPowerPoint_Writer.html">PHPPowerPoint_Writer</a><br />
<a href="../li_PHPPowerPoint_Writer_PowerPoint2007.html">PHPPowerPoint_Writer_PowerPoint2007</a><br />
<br /><br />
<b>Files:</b><br />
<div class="package">
<a href="../PHPPowerPoint/_PHPPowerpoint---DocumentProperties.php.html"> DocumentProperties.php
</a><br>
<a href="../PHPPowerPoint/_PHPPowerpoint---HashTable.php.html"> HashTable.php
</a><br>
<a href="../PHPPowerPoint/_PHPPowerpoint---IComparable.php.html"> IComparable.php
</a><br>
<a href="../PHPPowerPoint/_PHPPowerpoint---IOFactory.php.html"> IOFactory.php
</a><br>
<a href="../PHPPowerPoint/_PHPPowerpoint.php.html"> PHPPowerpoint.php
</a><br>
<a href="../PHPPowerPoint/_PHPPowerpoint---SlideIterator.php.html"> SlideIterator.php
</a><br>
</div><br />
<b>Interfaces:</b><br />
<div class="package">
<a href="../PHPPowerPoint/PHPPowerPoint_IComparable.html">PHPPowerPoint_IComparable</a><br />
</div>
<b>Classes:</b><br />
<div class="package">
<a href="../PHPPowerPoint/PHPPowerPoint.html">PHPPowerPoint</a><br />
<a href="../PHPPowerPoint/PHPPowerPoint_DocumentProperties.html">PHPPowerPoint_DocumentProperties</a><br />
<a href="../PHPPowerPoint/PHPPowerPoint_HashTable.html">PHPPowerPoint_HashTable</a><br />
<a href="../PHPPowerPoint/PHPPowerPoint_IOFactory.html">PHPPowerPoint_IOFactory</a><br />
<a href="../PHPPowerPoint/PHPPowerPoint_SlideIterator.html">PHPPowerPoint_SlideIterator</a><br />
</div>
</td>
<td>
<table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">
<h1>Class: PHPPowerPoint_IOFactory</h1>
Source Location: /PHPPowerpoint/IOFactory.php<br /><br />
<table width="100%" border="0">
<tr><td valign="top">
<h3><a href="#class_details">Class Overview</a></h3>
<pre></pre><br />
<div class="description">PHPPowerPoint_IOFactory</div><br /><br />
<h4>Author(s):</h4>
<ul>
</ul>
<h4>Copyright:</h4>
<ul>
<li>Copyright (c) 2009 - 2010 PHPPowerPoint (http://www.codeplex.com/PHPPowerPoint)</li>
</ul>
</td>
<td valign="top">
<h3><a href="#class_vars">Variables</a></h3>
<ul>
<li><a href="../PHPPowerPoint/PHPPowerPoint_IOFactory.html#var$_autoResolveClasses">$_autoResolveClasses</a></li>
<li><a href="../PHPPowerPoint/PHPPowerPoint_IOFactory.html#var$_searchLocations">$_searchLocations</a></li>
</ul>
</td>
<td valign="top">
<h3><a href="#class_methods">Methods</a></h3>
<ul>
<li><a href="../PHPPowerPoint/PHPPowerPoint_IOFactory.html#method__construct">__construct</a></li>
<li><a href="../PHPPowerPoint/PHPPowerPoint_IOFactory.html#methodaddSearchLocation">addSearchLocation</a></li>
<li><a href="../PHPPowerPoint/PHPPowerPoint_IOFactory.html#methodcreateReader">createReader</a></li>
<li><a href="../PHPPowerPoint/PHPPowerPoint_IOFactory.html#methodcreateWriter">createWriter</a></li>
<li><a href="../PHPPowerPoint/PHPPowerPoint_IOFactory.html#methodgetSearchLocations">getSearchLocations</a></li>
<li><a href="../PHPPowerPoint/PHPPowerPoint_IOFactory.html#methodload">load</a></li>
<li><a href="../PHPPowerPoint/PHPPowerPoint_IOFactory.html#methodsetSearchLocations">setSearchLocations</a></li>
</ul>
</td>
</tr></table>
<hr />
<table width="100%" border="0"><tr>
</tr></table>
<hr />
<a name="class_details"></a>
<h3>Class Details</h3>
<div class="tags">
[line <a href="../__filesource/fsource_PHPPowerPoint__PHPPowerpointIOFactory.php.html#a46">46</a>]<br />
PHPPowerPoint_IOFactory<br /><br /><p>PHPPowerPoint_IOFactory</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>copyright:</b> </td><td>Copyright (c) 2009 - 2010 PHPPowerPoint (http://www.codeplex.com/PHPPowerPoint)</td>
</tr>
</table>
</div>
</div><br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div><br />
<hr />
<a name="class_vars"></a>
<h3>Class Variables</h3>
<div class="tags">
<a name="var$_autoResolveClasses"></a>
<p></p>
<h4>static $_autoResolveClasses = <span class="value">array(<br>
'Serialized'<br>
)</span></h4>
<p>[line <a href="../__filesource/fsource_PHPPowerPoint__PHPPowerpointIOFactory.php.html#a63">63</a>]</p>
Autoresolve classes<br /><br /><p>Autoresolve classes</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>access:</b> </td><td>private</td>
</tr>
</table>
</div>
<br />
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>Type:</b> </td>
<td>array</td>
</tr>
</table>
</div><br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div><br />
<a name="var$_searchLocations"></a>
<p></p>
<h4>static $_searchLocations = <span class="value">array(<br>
array( 'type' => 'IWriter', 'path' => 'PHPPowerPoint/Writer/{0}.php', 'class' => 'PHPPowerPoint_Writer_{0}' ),array('type'=>'IReader','path'=>'PHPPowerPoint/Reader/{0}.php','class'=>'PHPPowerPoint_Reader_{0}'))</span></h4>
<p>[line <a href="../__filesource/fsource_PHPPowerPoint__PHPPowerpointIOFactory.php.html#a53">53</a>]</p>
Search locations<br /><br /><p>Search locations</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>access:</b> </td><td>private</td>
</tr>
</table>
</div>
<br />
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>Type:</b> </td>
<td>array</td>
</tr>
</table>
</div><br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div><br />
</div><br />
<hr />
<a name="class_methods"></a>
<h3>Class Methods</h3>
<div class="tags">
<hr />
<a name="methodaddSearchLocation"></a>
<h3>static method addSearchLocation <span class="smalllinenumber">[line <a href="../__filesource/fsource_PHPPowerPoint__PHPPowerpointIOFactory.php.html#a102">102</a>]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>static void addSearchLocation(
[string
$type = ''], [string
$location = ''], [string
$classname = ''])</code>
</td></tr></table>
</td></tr></table><br />
Add search location<br /><br /><p>Add search location</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>access:</b> </td><td>public</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string </td>
<td><b>$type</b> </td>
<td>Example: IWriter</td>
</tr>
<tr>
<td class="type">string </td>
<td><b>$location</b> </td>
<td>Example: PHPPowerPoint/Writer/{0}.php</td>
</tr>
<tr>
<td class="type">string </td>
<td><b>$classname</b> </td>
<td>Example: PHPPowerPoint_Writer_{0}</td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodcreateReader"></a>
<h3>static method createReader <span class="smalllinenumber">[line <a href="../__filesource/fsource_PHPPowerPoint__PHPPowerpointIOFactory.php.html#a144">144</a>]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>static <a href="../PHPPowerPoint_Reader/PHPPowerPoint_Reader_IReader.html">PHPPowerPoint_Reader_IReader</a> createReader(
[string
$readerType = ''])</code>
</td></tr></table>
</td></tr></table><br />
Create PHPPowerPoint_Reader_IReader<br /><br /><p>Create PHPPowerPoint_Reader_IReader</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>access:</b> </td><td>public</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string </td>
<td><b>$readerType</b> </td>
<td>Example: PowerPoint2007</td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodcreateWriter"></a>
<h3>static method createWriter <span class="smalllinenumber">[line <a href="../__filesource/fsource_PHPPowerPoint__PHPPowerpointIOFactory.php.html#a113">113</a>]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>static <a href="../PHPPowerPoint_Writer/PHPPowerPoint_Writer_IWriter.html">PHPPowerPoint_Writer_IWriter</a> createWriter(
<a href="../PHPPowerPoint/PHPPowerPoint.html">PHPPowerPoint</a>
$PHPPowerPoint, [string
$writerType = ''])</code>
</td></tr></table>
</td></tr></table><br />
Create PHPPowerPoint_Writer_IWriter<br /><br /><p>Create PHPPowerPoint_Writer_IWriter</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>access:</b> </td><td>public</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type"><a href="../PHPPowerPoint/PHPPowerPoint.html">PHPPowerPoint</a> </td>
<td><b>$PHPPowerPoint</b> </td>
<td></td>
</tr>
<tr>
<td class="type">string </td>
<td><b>$writerType</b> </td>
<td>Example: PowerPoint2007</td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodgetSearchLocations"></a>
<h3>static method getSearchLocations <span class="smalllinenumber">[line <a href="../__filesource/fsource_PHPPowerPoint__PHPPowerpointIOFactory.php.html#a77">77</a>]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>static array getSearchLocations(
)</code>
</td></tr></table>
</td></tr></table><br />
Get search locations<br /><br /><p>Get search locations</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>access:</b> </td><td>public</td>
</tr>
</table>
</div>
<br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodload"></a>
<h3>static method load <span class="smalllinenumber">[line <a href="../__filesource/fsource_PHPPowerPoint__PHPPowerpointIOFactory.php.html#a176">176</a>]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>static <a href="../PHPPowerPoint/PHPPowerPoint.html">PHPPowerPoint</a> load(
$pFilename, string
$pFileName)</code>
</td></tr></table>
</td></tr></table><br />
Loads PHPPowerPoint from file using automatic PHPPowerPoint_Reader_IReader resolution<br /><br /><p>Loads PHPPowerPoint from file using automatic PHPPowerPoint_Reader_IReader resolution</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>throws:</b> </td><td>Exception</td>
</tr>
<tr>
<td><b>access:</b> </td><td>public</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">string </td>
<td><b>$pFileName</b> </td>
<td></td>
</tr>
<tr>
<td class="type"> </td>
<td><b>$pFilename</b> </td>
<td></td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="methodsetSearchLocations"></a>
<h3>static method setSearchLocations <span class="smalllinenumber">[line <a href="../__filesource/fsource_PHPPowerPoint__PHPPowerpointIOFactory.php.html#a87">87</a>]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>static void setSearchLocations(
array
$value)</code>
</td></tr></table>
</td></tr></table><br />
Set search locations<br /><br /><p>Set search locations</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>throws:</b> </td><td>Exception</td>
</tr>
<tr>
<td><b>access:</b> </td><td>public</td>
</tr>
</table>
</div>
<br /><br />
<h4>Parameters:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="type">array </td>
<td><b>$value</b> </td>
<td></td>
</tr>
</table>
</div><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<hr />
<a name="method__construct"></a>
<h3>constructor __construct <span class="smalllinenumber">[line <a href="../__filesource/fsource_PHPPowerPoint__PHPPowerpointIOFactory.php.html#a70">70</a>]</span></h3>
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>PHPPowerPoint_IOFactory __construct(
)</code>
</td></tr></table>
</td></tr></table><br />
Private constructor for PHPPowerPoint_IOFactory<br /><br /><p>Private constructor for PHPPowerPoint_IOFactory</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b>access:</b> </td><td>private</td>
</tr>
</table>
</div>
<br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
</div><br />
<div class="credit">
<hr />
Documentation generated on Sat, 25 Apr 2009 11:37:24 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
</div>
</td></tr></table>
</td>
</tr>
</table>
</body>
</html> | {
"content_hash": "b71bba30e32df26643c08a84993f28ba",
"timestamp": "",
"source": "github",
"line_count": 485,
"max_line_length": 326,
"avg_line_length": 35.575257731958764,
"alnum_prop": 0.5970209806421699,
"repo_name": "jLKisni/PitchItUp",
"id": "7339c76942e30fb1c84bce4de8aed3b9523b4747",
"size": "17254",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "powerpoint/Documentation/API/PHPPowerPoint/PHPPowerPoint_IOFactory.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "495"
},
{
"name": "CSS",
"bytes": "152412"
},
{
"name": "HTML",
"bytes": "8402422"
},
{
"name": "JavaScript",
"bytes": "549401"
},
{
"name": "PHP",
"bytes": "2799860"
}
],
"symlink_target": ""
} |
package org.danekja.edu.pia.manager;
import javax.transaction.Transactional;
import org.danekja.edu.pia.dao.UserDao;
import org.danekja.edu.pia.domain.User;
import org.danekja.edu.pia.domain.UserValidationException;
import org.danekja.edu.pia.utils.Encoder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* Date: 26.11.15
*
* @author Jakub Danek
*/
@Service
@Transactional
public class DefaultUserManager implements UserManager {
private UserDao userDao;
private Encoder encoder;
@Autowired
public DefaultUserManager(UserDao userDao, Encoder encoder) {
this.userDao = userDao;
this.encoder = encoder;
}
@Override
public boolean authenticate(String username, String password) throws Exception {
//no hashing, demonstration of SQL injection
return userDao.authenticate(username, password);
}
@Override
public void register(User newUser) throws UserValidationException {
if(!newUser.isNew()) {
throw new RuntimeException("User already exists, use save method for updates!");
}
newUser.validate();
User existinCheck = userDao.findByUsername(newUser.getUsername());
if(existinCheck != null) {
throw new UserValidationException("Username already taken!");
}
newUser.setPassword(encoder.encode(newUser.getPassword()));
userDao.save(newUser);
}
}
| {
"content_hash": "395703fbf623ec8ee3a7796641b6551f",
"timestamp": "",
"source": "github",
"line_count": 53,
"max_line_length": 92,
"avg_line_length": 28.0188679245283,
"alnum_prop": 0.7057239057239058,
"repo_name": "danekja/spring-lab",
"id": "2f33e5afc7b71b158e4b4e97d19a77438f1c693a",
"size": "1485",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "labs/cv08_security/src/main/java/org/danekja/edu/pia/manager/DefaultUserManager.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "API Blueprint",
"bytes": "1612"
},
{
"name": "CSS",
"bytes": "1489"
},
{
"name": "HTML",
"bytes": "15310"
},
{
"name": "Java",
"bytes": "161977"
}
],
"symlink_target": ""
} |
#include <stdio.h>
#include <stdlib.h>
typedef struct BinSearchTree
{
int key;
struct BinSearchTree *left;
struct BinSearchTree *right;
} NodeT;
NodeT *root ;
NodeT * Insert(NodeT* root ,int key)
{
if(root==NULL)
{
NodeT *temp;
temp = (NodeT *)malloc(sizeof(NodeT));
temp -> key = key;
temp -> left = temp -> right = NULL;
return temp;
}
if(key >(root->key))
{
root->right = Insert(root->right,key);
}
else if(key < (root->key))
{
root->left = Insert(root->left,key);
}
return root;
}
NodeT* FindMin(NodeT *node)
{
if(node==NULL)
{
return NULL;
}
if(node->left) /* Go to the left sub tree to find the min element */
return FindMin(node->left);
else
return node;
}
NodeT* FindMax(NodeT *node)
{
if(node==NULL)
{
return NULL;
}
if(node->right)
FindMax(node->right);
else
return node;
}
NodeT * Delete(NodeT *node, int key)
{
NodeT *temp;
if(node==NULL)
{
printf("Element Not Found\n");
}
else if(key < node->key)
{
node->left = Delete(node->left, key);
}
else if(key > node->key)
{
node->right = Delete(node->right, key);
}
else
{
/* delete this node and replace with either minimum element
in the right sub tree or maximum element in the left subtree */
if(node->right && node->left)
{
/* replace with minimum element in the right sub tree */
temp = FindMin(node->right);
node -> key = temp->key;
/* As we replaced it with some other node, we have to delete that node */
node -> right = Delete(node->right,temp->key);
}
else
{
temp = node;
if(node->left == NULL)
node = node->right;
else if(node->right == NULL)
node = node->left;
free(temp);
}
}
return node;
}
NodeT * Find(NodeT *node, int key)
{
if(node==NULL)
{
return NULL;
}
if(key > node->key)
{
/* Search in the right sub tree. */
return Find(node->right,key);
}
else if(key < node->key)
{
/* Search in the left sub tree. */
return Find(node->left,key);
}
else
{
return node;
}
}
/*void ShowInorder( NodeT *node )
{
if ( node!= NULL )
{
ShowInorder( node−>left );
printf("%d ", node->key);
ShowInorder( node−>right);
}
}*/
void ShowPreorder(NodeT *node)
{
if(node!=NULL)
{
printf("%d ",node->key);
ShowPreorder(node->left);
ShowPreorder(node->right);
}
}
void ShowPostorder(NodeT *node)
{
if(node!=NULL)
{
ShowPostorder(node->left);
ShowPostorder(node->right);
printf("%d ",node->key);
}
}
int main()
{
NodeT *root = NULL;
root = Insert(root, 20);
root = Insert(root, 10);
root = Insert(root, 11);
root = Insert(root, 1);
root = Insert(root, 23);
root = Insert(root, 26);
printf("\n");
ShowPreorder(root);
printf("\n");
root = Delete(root,12);
printf("\n");
ShowPreorder(root);
root = Delete(root,20);
printf("\n");
ShowPreorder(root);
root=Delete(root,10);
printf("\n");
ShowPreorder(root);
NodeT * temp;
temp = Find(root,11);
if(temp==NULL)
{
printf("Element 11 not found\n");
}
else
{
printf("Element 11 Found\n");
}
return 0;
}
| {
"content_hash": "45afb062c750acf2c06904be4c8d4642",
"timestamp": "",
"source": "github",
"line_count": 191,
"max_line_length": 85,
"avg_line_length": 18.979057591623036,
"alnum_prop": 0.5078620689655172,
"repo_name": "aut-eng-2014/aut-eng-2014",
"id": "828b7f5a582ebb724afdf902e50cfee459000e49",
"size": "3629",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Pop G. Irina/BST/main.c",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C",
"bytes": "674988"
},
{
"name": "C++",
"bytes": "7699"
},
{
"name": "Objective-C",
"bytes": "1839"
}
],
"symlink_target": ""
} |
#include "gigaset.h"
#include <linux/isdnif.h>
#include <linux/export.h>
#define SBUFSIZE 4096 /* sk_buff payload size */
#define TRANSBUFSIZE 768 /* bytes per skb for transparent receive */
#define HW_HDR_LEN 2 /* Header size used to store ack info */
#define MAX_BUF_SIZE (SBUFSIZE - HW_HDR_LEN) /* max data packet from LL */
/* == Handling of I4L IO =====================================================*/
/* writebuf_from_LL
* called by LL to transmit data on an open channel
* inserts the buffer data into the send queue and starts the transmission
* Note that this operation must not sleep!
* When the buffer is processed completely, gigaset_skb_sent() should be called.
* parameters:
* driverID driver ID as assigned by LL
* channel channel number
* ack if != 0 LL wants to be notified on completion via
* statcallb(ISDN_STAT_BSENT)
* skb skb containing data to send
* return value:
* number of accepted bytes
* 0 if temporarily unable to accept data (out of buffer space)
* <0 on error (eg. -EINVAL)
*/
static int writebuf_from_LL(int driverID, int channel, int ack,
struct sk_buff *skb)
{
struct cardstate *cs = gigaset_get_cs_by_id(driverID);
struct bc_state *bcs;
unsigned char *ack_header;
unsigned len;
if (!cs) {
pr_err("%s: invalid driver ID (%d)\n", __func__, driverID);
return -ENODEV;
}
if (channel < 0 || channel >= cs->channels) {
dev_err(cs->dev, "%s: invalid channel ID (%d)\n",
__func__, channel);
return -ENODEV;
}
bcs = &cs->bcs[channel];
/* can only handle linear sk_buffs */
if (skb_linearize(skb) < 0) {
dev_err(cs->dev, "%s: skb_linearize failed\n", __func__);
return -ENOMEM;
}
len = skb->len;
gig_dbg(DEBUG_LLDATA,
"Receiving data from LL (id: %d, ch: %d, ack: %d, sz: %d)",
driverID, channel, ack, len);
if (!len) {
if (ack)
dev_notice(cs->dev, "%s: not ACKing empty packet\n",
__func__);
return 0;
}
if (len > MAX_BUF_SIZE) {
dev_err(cs->dev, "%s: packet too large (%d bytes)\n",
__func__, len);
return -EINVAL;
}
/* set up acknowledgement header */
if (skb_headroom(skb) < HW_HDR_LEN) {
/* should never happen */
dev_err(cs->dev, "%s: insufficient skb headroom\n", __func__);
return -ENOMEM;
}
skb_set_mac_header(skb, -HW_HDR_LEN);
skb->mac_len = HW_HDR_LEN;
ack_header = skb_mac_header(skb);
if (ack) {
ack_header[0] = len & 0xff;
ack_header[1] = len >> 8;
} else {
ack_header[0] = ack_header[1] = 0;
}
gig_dbg(DEBUG_MCMD, "skb: len=%u, ack=%d: %02x %02x",
len, ack, ack_header[0], ack_header[1]);
/* pass to device-specific module */
return cs->ops->send_skb(bcs, skb);
}
/**
* gigaset_skb_sent() - acknowledge sending an skb
* @bcs: B channel descriptor structure.
* @skb: sent data.
*
* Called by hardware module {bas,ser,usb}_gigaset when the data in a
* skb has been successfully sent, for signalling completion to the LL.
*/
void gigaset_skb_sent(struct bc_state *bcs, struct sk_buff *skb)
{
isdn_if *iif = bcs->cs->iif;
unsigned char *ack_header = skb_mac_header(skb);
unsigned len;
isdn_ctrl response;
++bcs->trans_up;
if (skb->len)
dev_warn(bcs->cs->dev, "%s: skb->len==%d\n",
__func__, skb->len);
len = ack_header[0] + ((unsigned) ack_header[1] << 8);
if (len) {
gig_dbg(DEBUG_MCMD, "ACKing to LL (id: %d, ch: %d, sz: %u)",
bcs->cs->myid, bcs->channel, len);
response.driver = bcs->cs->myid;
response.command = ISDN_STAT_BSENT;
response.arg = bcs->channel;
response.parm.length = len;
iif->statcallb(&response);
}
}
EXPORT_SYMBOL_GPL(gigaset_skb_sent);
/**
* gigaset_skb_rcvd() - pass received skb to LL
* @bcs: B channel descriptor structure.
* @skb: received data.
*
* Called by hardware module {bas,ser,usb}_gigaset when user data has
* been successfully received, for passing to the LL.
* Warning: skb must not be accessed anymore!
*/
void gigaset_skb_rcvd(struct bc_state *bcs, struct sk_buff *skb)
{
isdn_if *iif = bcs->cs->iif;
iif->rcvcallb_skb(bcs->cs->myid, bcs->channel, skb);
bcs->trans_down++;
}
EXPORT_SYMBOL_GPL(gigaset_skb_rcvd);
/**
* gigaset_isdn_rcv_err() - signal receive error
* @bcs: B channel descriptor structure.
*
* Called by hardware module {bas,ser,usb}_gigaset when a receive error
* has occurred, for signalling to the LL.
*/
void gigaset_isdn_rcv_err(struct bc_state *bcs)
{
isdn_if *iif = bcs->cs->iif;
isdn_ctrl response;
/* if currently ignoring packets, just count down */
if (bcs->ignore) {
bcs->ignore--;
return;
}
/* update statistics */
bcs->corrupted++;
/* error -> LL */
gig_dbg(DEBUG_CMD, "sending L1ERR");
response.driver = bcs->cs->myid;
response.command = ISDN_STAT_L1ERR;
response.arg = bcs->channel;
response.parm.errcode = ISDN_STAT_L1ERR_RECV;
iif->statcallb(&response);
}
EXPORT_SYMBOL_GPL(gigaset_isdn_rcv_err);
/* This function will be called by LL to send commands
* NOTE: LL ignores the returned value, for commands other than ISDN_CMD_IOCTL,
* so don't put too much effort into it.
*/
static int command_from_LL(isdn_ctrl *cntrl)
{
struct cardstate *cs;
struct bc_state *bcs;
int retval = 0;
char **commands;
int ch;
int i;
size_t l;
gig_dbg(DEBUG_CMD, "driver: %d, command: %d, arg: 0x%lx",
cntrl->driver, cntrl->command, cntrl->arg);
cs = gigaset_get_cs_by_id(cntrl->driver);
if (cs == NULL) {
pr_err("%s: invalid driver ID (%d)\n", __func__, cntrl->driver);
return -ENODEV;
}
ch = cntrl->arg & 0xff;
switch (cntrl->command) {
case ISDN_CMD_IOCTL:
dev_warn(cs->dev, "ISDN_CMD_IOCTL not supported\n");
return -EINVAL;
case ISDN_CMD_DIAL:
gig_dbg(DEBUG_CMD,
"ISDN_CMD_DIAL (phone: %s, msn: %s, si1: %d, si2: %d)",
cntrl->parm.setup.phone, cntrl->parm.setup.eazmsn,
cntrl->parm.setup.si1, cntrl->parm.setup.si2);
if (ch >= cs->channels) {
dev_err(cs->dev,
"ISDN_CMD_DIAL: invalid channel (%d)\n", ch);
return -EINVAL;
}
bcs = cs->bcs + ch;
if (!gigaset_get_channel(bcs)) {
dev_err(cs->dev, "ISDN_CMD_DIAL: channel not free\n");
return -EBUSY;
}
switch (bcs->proto2) {
case L2_HDLC:
bcs->rx_bufsize = SBUFSIZE;
break;
default: /* assume transparent */
bcs->rx_bufsize = TRANSBUFSIZE;
}
dev_kfree_skb(bcs->rx_skb);
gigaset_new_rx_skb(bcs);
commands = kzalloc(AT_NUM * (sizeof *commands), GFP_ATOMIC);
if (!commands) {
gigaset_free_channel(bcs);
dev_err(cs->dev, "ISDN_CMD_DIAL: out of memory\n");
return -ENOMEM;
}
l = 3 + strlen(cntrl->parm.setup.phone);
commands[AT_DIAL] = kmalloc(l, GFP_ATOMIC);
if (!commands[AT_DIAL])
goto oom;
if (cntrl->parm.setup.phone[0] == '*' &&
cntrl->parm.setup.phone[1] == '*') {
/* internal call: translate ** prefix to CTP value */
commands[AT_TYPE] = kstrdup("^SCTP=0\r", GFP_ATOMIC);
if (!commands[AT_TYPE])
goto oom;
snprintf(commands[AT_DIAL], l,
"D%s\r", cntrl->parm.setup.phone + 2);
} else {
commands[AT_TYPE] = kstrdup("^SCTP=1\r", GFP_ATOMIC);
if (!commands[AT_TYPE])
goto oom;
snprintf(commands[AT_DIAL], l,
"D%s\r", cntrl->parm.setup.phone);
}
l = strlen(cntrl->parm.setup.eazmsn);
if (l) {
l += 8;
commands[AT_MSN] = kmalloc(l, GFP_ATOMIC);
if (!commands[AT_MSN])
goto oom;
snprintf(commands[AT_MSN], l, "^SMSN=%s\r",
cntrl->parm.setup.eazmsn);
}
switch (cntrl->parm.setup.si1) {
case 1: /* audio */
/* BC = 9090A3: 3.1 kHz audio, A-law */
commands[AT_BC] = kstrdup("^SBC=9090A3\r", GFP_ATOMIC);
if (!commands[AT_BC])
goto oom;
break;
case 7: /* data */
default: /* hope the app knows what it is doing */
/* BC = 8890: unrestricted digital information */
commands[AT_BC] = kstrdup("^SBC=8890\r", GFP_ATOMIC);
if (!commands[AT_BC])
goto oom;
}
/* ToDo: other si1 values, inspect si2, set HLC/LLC */
commands[AT_PROTO] = kmalloc(9, GFP_ATOMIC);
if (!commands[AT_PROTO])
goto oom;
snprintf(commands[AT_PROTO], 9, "^SBPR=%u\r", bcs->proto2);
commands[AT_ISO] = kmalloc(9, GFP_ATOMIC);
if (!commands[AT_ISO])
goto oom;
snprintf(commands[AT_ISO], 9, "^SISO=%u\r",
(unsigned) bcs->channel + 1);
if (!gigaset_add_event(cs, &bcs->at_state, EV_DIAL, commands,
bcs->at_state.seq_index, NULL)) {
for (i = 0; i < AT_NUM; ++i)
kfree(commands[i]);
kfree(commands);
gigaset_free_channel(bcs);
return -ENOMEM;
}
gigaset_schedule_event(cs);
break;
case ISDN_CMD_ACCEPTD:
gig_dbg(DEBUG_CMD, "ISDN_CMD_ACCEPTD");
if (ch >= cs->channels) {
dev_err(cs->dev,
"ISDN_CMD_ACCEPTD: invalid channel (%d)\n", ch);
return -EINVAL;
}
bcs = cs->bcs + ch;
switch (bcs->proto2) {
case L2_HDLC:
bcs->rx_bufsize = SBUFSIZE;
break;
default: /* assume transparent */
bcs->rx_bufsize = TRANSBUFSIZE;
}
dev_kfree_skb(bcs->rx_skb);
gigaset_new_rx_skb(bcs);
if (!gigaset_add_event(cs, &bcs->at_state,
EV_ACCEPT, NULL, 0, NULL))
return -ENOMEM;
gigaset_schedule_event(cs);
break;
case ISDN_CMD_HANGUP:
gig_dbg(DEBUG_CMD, "ISDN_CMD_HANGUP");
if (ch >= cs->channels) {
dev_err(cs->dev,
"ISDN_CMD_HANGUP: invalid channel (%d)\n", ch);
return -EINVAL;
}
bcs = cs->bcs + ch;
if (!gigaset_add_event(cs, &bcs->at_state,
EV_HUP, NULL, 0, NULL))
return -ENOMEM;
gigaset_schedule_event(cs);
break;
case ISDN_CMD_CLREAZ: /* Do not signal incoming signals */
dev_info(cs->dev, "ignoring ISDN_CMD_CLREAZ\n");
break;
case ISDN_CMD_SETEAZ: /* Signal incoming calls for given MSN */
dev_info(cs->dev, "ignoring ISDN_CMD_SETEAZ (%s)\n",
cntrl->parm.num);
break;
case ISDN_CMD_SETL2: /* Set L2 to given protocol */
if (ch >= cs->channels) {
dev_err(cs->dev,
"ISDN_CMD_SETL2: invalid channel (%d)\n", ch);
return -EINVAL;
}
bcs = cs->bcs + ch;
if (bcs->chstate & CHS_D_UP) {
dev_err(cs->dev,
"ISDN_CMD_SETL2: channel active (%d)\n", ch);
return -EINVAL;
}
switch (cntrl->arg >> 8) {
case ISDN_PROTO_L2_HDLC:
gig_dbg(DEBUG_CMD, "ISDN_CMD_SETL2: setting L2_HDLC");
bcs->proto2 = L2_HDLC;
break;
case ISDN_PROTO_L2_TRANS:
gig_dbg(DEBUG_CMD, "ISDN_CMD_SETL2: setting L2_VOICE");
bcs->proto2 = L2_VOICE;
break;
default:
dev_err(cs->dev,
"ISDN_CMD_SETL2: unsupported protocol (%lu)\n",
cntrl->arg >> 8);
return -EINVAL;
}
break;
case ISDN_CMD_SETL3: /* Set L3 to given protocol */
gig_dbg(DEBUG_CMD, "ISDN_CMD_SETL3");
if (ch >= cs->channels) {
dev_err(cs->dev,
"ISDN_CMD_SETL3: invalid channel (%d)\n", ch);
return -EINVAL;
}
if (cntrl->arg >> 8 != ISDN_PROTO_L3_TRANS) {
dev_err(cs->dev,
"ISDN_CMD_SETL3: unsupported protocol (%lu)\n",
cntrl->arg >> 8);
return -EINVAL;
}
break;
default:
gig_dbg(DEBUG_CMD, "unknown command %d from LL",
cntrl->command);
return -EINVAL;
}
return retval;
oom:
dev_err(bcs->cs->dev, "out of memory\n");
for (i = 0; i < AT_NUM; ++i)
kfree(commands[i]);
kfree(commands);
gigaset_free_channel(bcs);
return -ENOMEM;
}
static void gigaset_i4l_cmd(struct cardstate *cs, int cmd)
{
isdn_if *iif = cs->iif;
isdn_ctrl command;
command.driver = cs->myid;
command.command = cmd;
command.arg = 0;
iif->statcallb(&command);
}
static void gigaset_i4l_channel_cmd(struct bc_state *bcs, int cmd)
{
isdn_if *iif = bcs->cs->iif;
isdn_ctrl command;
command.driver = bcs->cs->myid;
command.command = cmd;
command.arg = bcs->channel;
iif->statcallb(&command);
}
/**
* gigaset_isdn_icall() - signal incoming call
* @at_state: connection state structure.
*
* Called by main module to notify the LL that an incoming call has been
* received. @at_state contains the parameters of the call.
*
* Return value: call disposition (ICALL_*)
*/
int gigaset_isdn_icall(struct at_state_t *at_state)
{
struct cardstate *cs = at_state->cs;
struct bc_state *bcs = at_state->bcs;
isdn_if *iif = cs->iif;
isdn_ctrl response;
int retval;
/* fill ICALL structure */
response.parm.setup.si1 = 0; /* default: unknown */
response.parm.setup.si2 = 0;
response.parm.setup.screen = 0;
response.parm.setup.plan = 0;
if (!at_state->str_var[STR_ZBC]) {
/* no BC (internal call): assume speech, A-law */
response.parm.setup.si1 = 1;
} else if (!strcmp(at_state->str_var[STR_ZBC], "8890")) {
/* unrestricted digital information */
response.parm.setup.si1 = 7;
} else if (!strcmp(at_state->str_var[STR_ZBC], "8090A3")) {
/* speech, A-law */
response.parm.setup.si1 = 1;
} else if (!strcmp(at_state->str_var[STR_ZBC], "9090A3")) {
/* 3,1 kHz audio, A-law */
response.parm.setup.si1 = 1;
response.parm.setup.si2 = 2;
} else {
dev_warn(cs->dev, "RING ignored - unsupported BC %s\n",
at_state->str_var[STR_ZBC]);
return ICALL_IGNORE;
}
if (at_state->str_var[STR_NMBR]) {
strlcpy(response.parm.setup.phone, at_state->str_var[STR_NMBR],
sizeof response.parm.setup.phone);
} else
response.parm.setup.phone[0] = 0;
if (at_state->str_var[STR_ZCPN]) {
strlcpy(response.parm.setup.eazmsn, at_state->str_var[STR_ZCPN],
sizeof response.parm.setup.eazmsn);
} else
response.parm.setup.eazmsn[0] = 0;
if (!bcs) {
dev_notice(cs->dev, "no channel for incoming call\n");
response.command = ISDN_STAT_ICALLW;
response.arg = 0;
} else {
gig_dbg(DEBUG_CMD, "Sending ICALL");
response.command = ISDN_STAT_ICALL;
response.arg = bcs->channel;
}
response.driver = cs->myid;
retval = iif->statcallb(&response);
gig_dbg(DEBUG_CMD, "Response: %d", retval);
switch (retval) {
case 0: /* no takers */
return ICALL_IGNORE;
case 1: /* alerting */
bcs->chstate |= CHS_NOTIFY_LL;
return ICALL_ACCEPT;
case 2: /* reject */
return ICALL_REJECT;
case 3: /* incomplete */
dev_warn(cs->dev,
"LL requested unsupported feature: Incomplete Number\n");
return ICALL_IGNORE;
case 4: /* proceeding */
/* Gigaset will send ALERTING anyway.
* There doesn't seem to be a way to avoid this.
*/
return ICALL_ACCEPT;
case 5: /* deflect */
dev_warn(cs->dev,
"LL requested unsupported feature: Call Deflection\n");
return ICALL_IGNORE;
default:
dev_err(cs->dev, "LL error %d on ICALL\n", retval);
return ICALL_IGNORE;
}
}
/**
* gigaset_isdn_connD() - signal D channel connect
* @bcs: B channel descriptor structure.
*
* Called by main module to notify the LL that the D channel connection has
* been established.
*/
void gigaset_isdn_connD(struct bc_state *bcs)
{
gig_dbg(DEBUG_CMD, "sending DCONN");
gigaset_i4l_channel_cmd(bcs, ISDN_STAT_DCONN);
}
/**
* gigaset_isdn_hupD() - signal D channel hangup
* @bcs: B channel descriptor structure.
*
* Called by main module to notify the LL that the D channel connection has
* been shut down.
*/
void gigaset_isdn_hupD(struct bc_state *bcs)
{
gig_dbg(DEBUG_CMD, "sending DHUP");
gigaset_i4l_channel_cmd(bcs, ISDN_STAT_DHUP);
}
/**
* gigaset_isdn_connB() - signal B channel connect
* @bcs: B channel descriptor structure.
*
* Called by main module to notify the LL that the B channel connection has
* been established.
*/
void gigaset_isdn_connB(struct bc_state *bcs)
{
gig_dbg(DEBUG_CMD, "sending BCONN");
gigaset_i4l_channel_cmd(bcs, ISDN_STAT_BCONN);
}
/**
* gigaset_isdn_hupB() - signal B channel hangup
* @bcs: B channel descriptor structure.
*
* Called by main module to notify the LL that the B channel connection has
* been shut down.
*/
void gigaset_isdn_hupB(struct bc_state *bcs)
{
gig_dbg(DEBUG_CMD, "sending BHUP");
gigaset_i4l_channel_cmd(bcs, ISDN_STAT_BHUP);
}
/**
* gigaset_isdn_start() - signal device availability
* @cs: device descriptor structure.
*
* Called by main module to notify the LL that the device is available for
* use.
*/
void gigaset_isdn_start(struct cardstate *cs)
{
gig_dbg(DEBUG_CMD, "sending RUN");
gigaset_i4l_cmd(cs, ISDN_STAT_RUN);
}
/**
* gigaset_isdn_stop() - signal device unavailability
* @cs: device descriptor structure.
*
* Called by main module to notify the LL that the device is no longer
* available for use.
*/
void gigaset_isdn_stop(struct cardstate *cs)
{
gig_dbg(DEBUG_CMD, "sending STOP");
gigaset_i4l_cmd(cs, ISDN_STAT_STOP);
}
/**
* gigaset_isdn_regdev() - register to LL
* @cs: device descriptor structure.
* @isdnid: device name.
*
* Return value: 1 for success, 0 for failure
*/
int gigaset_isdn_regdev(struct cardstate *cs, const char *isdnid)
{
isdn_if *iif;
iif = kmalloc(sizeof *iif, GFP_KERNEL);
if (!iif) {
pr_err("out of memory\n");
return 0;
}
if (snprintf(iif->id, sizeof iif->id, "%s_%u", isdnid, cs->minor_index)
>= sizeof iif->id) {
pr_err("ID too long: %s\n", isdnid);
kfree(iif);
return 0;
}
iif->owner = THIS_MODULE;
iif->channels = cs->channels;
iif->maxbufsize = MAX_BUF_SIZE;
iif->features = ISDN_FEATURE_L2_TRANS |
ISDN_FEATURE_L2_HDLC |
ISDN_FEATURE_L2_X75I |
ISDN_FEATURE_L3_TRANS |
ISDN_FEATURE_P_EURO;
iif->hl_hdrlen = HW_HDR_LEN; /* Area for storing ack */
iif->command = command_from_LL;
iif->writebuf_skb = writebuf_from_LL;
iif->writecmd = NULL; /* Don't support isdnctrl */
iif->readstat = NULL; /* Don't support isdnctrl */
iif->rcvcallb_skb = NULL; /* Will be set by LL */
iif->statcallb = NULL; /* Will be set by LL */
if (!register_isdn(iif)) {
pr_err("register_isdn failed\n");
kfree(iif);
return 0;
}
cs->iif = iif;
cs->myid = iif->channels; /* Set my device id */
cs->hw_hdr_len = HW_HDR_LEN;
return 1;
}
/**
* gigaset_isdn_unregdev() - unregister device from LL
* @cs: device descriptor structure.
*/
void gigaset_isdn_unregdev(struct cardstate *cs)
{
gig_dbg(DEBUG_CMD, "sending UNLOAD");
gigaset_i4l_cmd(cs, ISDN_STAT_UNLOAD);
kfree(cs->iif);
cs->iif = NULL;
}
/**
* gigaset_isdn_regdrv() - register driver to LL
*/
void gigaset_isdn_regdrv(void)
{
pr_info("ISDN4Linux interface\n");
/* nothing to do */
}
/**
* gigaset_isdn_unregdrv() - unregister driver from LL
*/
void gigaset_isdn_unregdrv(void)
{
/* nothing to do */
}
| {
"content_hash": "c6241a63025ebb5d168cc0c20089316f",
"timestamp": "",
"source": "github",
"line_count": 682,
"max_line_length": 80,
"avg_line_length": 26.287390029325515,
"alnum_prop": 0.641343150379295,
"repo_name": "MihawkHu/Android_scheduler",
"id": "0f13eb1de6570709d12b3b2354118ed778fb1947",
"size": "18537",
"binary": false,
"copies": "4809",
"ref": "refs/heads/master",
"path": "kernel/goldfish/drivers/isdn/gigaset/i4l.c",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ASP",
"bytes": "4528"
},
{
"name": "Assembly",
"bytes": "14673906"
},
{
"name": "Awk",
"bytes": "18610"
},
{
"name": "Batchfile",
"bytes": "29530782"
},
{
"name": "C",
"bytes": "398209687"
},
{
"name": "C++",
"bytes": "3135899"
},
{
"name": "Groff",
"bytes": "51590"
},
{
"name": "Lex",
"bytes": "43953"
},
{
"name": "M4",
"bytes": "3024"
},
{
"name": "Makefile",
"bytes": "1222510"
},
{
"name": "Objective-C",
"bytes": "655713"
},
{
"name": "Perl",
"bytes": "513716"
},
{
"name": "Perl6",
"bytes": "3727"
},
{
"name": "Python",
"bytes": "72029"
},
{
"name": "Scilab",
"bytes": "21433"
},
{
"name": "Shell",
"bytes": "145654"
},
{
"name": "SourcePawn",
"bytes": "4856"
},
{
"name": "UnrealScript",
"bytes": "20838"
},
{
"name": "XS",
"bytes": "1240"
},
{
"name": "Yacc",
"bytes": "84367"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>standard.db.sql.ODBCCommit</title>
<link href="css/style.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
</head>
<body bgcolor="#ffffff">
<table border="0" width="100%" bgcolor="#F0F0FF">
<tr>
<td>Concept Framework 2.2 documentation</td>
<td align="right"><a href="index.html">Contents</a> | <a href="index_fun.html">Index</a></td>
</tr>
</table>
<h2><a href="standard.db.sql.html">standard.db.sql</a>.ODBCCommit</h2>
<table border="0" cellspacing="0" cellpadding="0" width="500" style="border-style:solid;border-width:1px;border-color:#D0D0D0;">
<tr bgcolor="#f0f0f0">
<td><i>Name</i></td>
<td><i>Version</i></td>
<td><i>Deprecated</i></td>
</tr>
<tr bgcolor="#fafafa">
<td><b>ODBCCommit</b></td>
<td>version 1.0</td>
<td>no</td>
</tr>
</table>
<br />
<b>Prototype:</b><br />
<table bgcolor="#F0F0F0" width="100%" style="border-style:solid;border-width:1px;border-color:#D0D0D0;"><tr><td><b>number ODBCCommit([number connectionID])</b></td></tr></table>
<br />
<b>Parameters:</b><br />
<table bgcolor="#FFFFFF" style="border-style:solid;border-width:1px;border-color:#D0D0D0;">
<tr>
<td>
<i>connectionID</i>
</td>
<td>
the ID identifying the connection as returned by <a href="standard.db.sql.ODBCDriverConnect.html">ODBCDriverConnect</a> or <a href="standard.db.sql.ODBCConnect.html">ODBCConnect</a>. If this parameter is missing, this will affect the first connection created.
</td>
</tr>
</table>
<br />
<b>Description:</b><br />
<table width="100%" bgcolor="#FAFAFF" style="border-style:solid;border-width:1px;border-color:#D0D0D0;">
<tr><td>
Commit the data.
<br/>
<br/>Note: This function can be called only if the auto commit flag is set to false by calling <a href="standard.db.sql.ODBCAutoCommit.html">ODBCAutoCommit</a>.
<br/>
</td></tr>
</table>
<br />
<b>Returns:</b><br />
Return -1 if failed (call <a href="standard.db.sql.ODBCError.html">ODBCError</a> to retrieve the error) or 0 if succeeded.
<br />
<br />
<!--
<p>
<a href="http://validator.w3.org/check?uri=referer"><img
src="http://www.w3.org/Icons/valid-html40"
alt="Valid HTML 4.0 Transitional" height="31" width="88" border="0"></a>
<a href="http://jigsaw.w3.org/css-validator/">
<img style="border:0;width:88px;height:31px"
src="http://jigsaw.w3.org/css-validator/images/vcss"
alt="Valid CSS!" border="0"/>
</a>
</p>
-->
<table bgcolor="#F0F0F0" width="100%"><tr><td>Documented by Eduard Suica, generation time: Sun Jan 27 18:15:19 2013
GMT</td><td align="right">(c)2013 <a href="http://www.devronium.com">Devronium Applications</a></td></tr></table>
</body>
</html> | {
"content_hash": "baaab2b975627a5bd2e41da12362fc80",
"timestamp": "",
"source": "github",
"line_count": 78,
"max_line_length": 269,
"avg_line_length": 37.717948717948715,
"alnum_prop": 0.6312032630863358,
"repo_name": "Devronium/ConceptApplicationServer",
"id": "52de242b4557e2c9b0fd954404fe52a159d86f21",
"size": "2942",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "core/server/Samples/CIDE/Help/standard.db.sql.ODBCCommit.html",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "Assembly",
"bytes": "156546"
},
{
"name": "Batchfile",
"bytes": "5629"
},
{
"name": "C",
"bytes": "23814868"
},
{
"name": "C++",
"bytes": "9045245"
},
{
"name": "CSS",
"bytes": "689616"
},
{
"name": "HTML",
"bytes": "27027035"
},
{
"name": "JavaScript",
"bytes": "3907862"
},
{
"name": "M4",
"bytes": "126426"
},
{
"name": "Makefile",
"bytes": "6102928"
},
{
"name": "PHP",
"bytes": "11766"
},
{
"name": "Roff",
"bytes": "10803"
},
{
"name": "SCSS",
"bytes": "2187"
},
{
"name": "Shell",
"bytes": "7230107"
},
{
"name": "Smarty",
"bytes": "83738"
},
{
"name": "XSLT",
"bytes": "16139"
}
],
"symlink_target": ""
} |
package io.github.repir.apps.Feature;
import io.github.htools.hadoop.io.archivereader.ReaderInputFormat;
import io.github.htools.hadoop.io.archivereader.RecordKey;
import io.github.htools.hadoop.io.archivereader.RecordValue;
import io.github.repir.Repository.Repository;
import io.github.repir.Repository.StoredFeature;
import io.github.repir.MapReduceTools.RRConfiguration;
import static io.github.htools.lib.ClassTools.*;
import io.github.htools.lib.Log;
import io.github.htools.hadoop.Job;
import java.lang.reflect.Constructor;
import org.apache.hadoop.io.NullWritable;
/**
* Extracts the configured {@link StoredFeature}s from the collection source
* archives and stores these in the {@link Repository}. Using this tool requires
* a Repository to be created and the required {@link DictionaryFeature}s to be created (see {@link io.github.repir.apps.Vovcabulary.Create}).
* <p/>
* The following configuration settings are used:
* <ul>
* <li>repository.prefix: the name of the repository, which is also used as a prefix for all file names.
* <li>repository.partitions: splits the data over # partitions, allowing retrieval
* to split tasks over several mappers.
* <li>repository.defaultentityreader: class name of the EntityReader used to read the archives
* <li>repository.assignentityreader: list of "<fileextension> <class extends EntityReader>", that
* assign a different EntityReader to be used on files with this extension.
* <li>repository.inputdir: list of files and/or directories containing the collection
* archive files. The directories will be searched recursively. See {@link EntityReader}
* about settings to specify valid/invalid archive files.
* <li>repository.feature: list of features, with optional parameters appended to
* their classname, e.g. TermInverted:all to indicate the "all" section of processed
* entities is used to construct the feature and stored as the "all" channel. The
* app will only construct {@link StoredFeature}s that implement {@link ReducibleFeature}.
* </ul>
* @author jer
*/
public class Create {
public static Log log = new Log(Create.class);
public static void main(String[] args) throws Exception {
Repository repository = new Repository(args, "{feature}");
RRConfiguration conf = repository.getConf();
conf.setStrings("repository.constructfeatures", conf.getStrings("feature"));
Job job = new Job(conf, conf.get("repository.prefix"));
int partitions = conf.getInt("repository.partitions", -1);
job.setNumReduceTasks(partitions);
job.setPartitionerClass(RecordKey.partitioner.class);
job.setGroupingComparatorClass(RecordKey.FirstGroupingComparator.class);
job.setSortComparatorClass(RecordKey.SecondarySort.class);
job.setMapOutputKeyClass(RecordKey.class);
job.setMapOutputValueClass(RecordValue.class);
job.setOutputKeyClass(NullWritable.class);
job.setOutputValueClass(NullWritable.class);
job.setMapperClass(RMap.class);
job.setReducerClass(Reduce.class);
Class clazz = toClass(conf.get("repository.inputformat", ReaderInputFormat.class.getSimpleName()), ReaderInputFormat.class.getPackage().getName());
Constructor c = getAssignableConstructor(clazz, ReaderInputFormat.class, Job.class);
construct(c, job);
job.waitForCompletion(true);
log.info("BuildRepository completed");
}
}
| {
"content_hash": "c778a2c6df8829b65e788ce6e3e3bddc",
"timestamp": "",
"source": "github",
"line_count": 67,
"max_line_length": 153,
"avg_line_length": 50.71641791044776,
"alnum_prop": 0.7628016480282519,
"repo_name": "RepIR/RepIRApps",
"id": "eabc60903e3bed79baad6a887579f4c6742e3d53",
"size": "3398",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/main/java/io/github/repir/apps/Feature/Create.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "430511"
}
],
"symlink_target": ""
} |
export function last (arr) {
return arr[arr.length - 1];
}
| {
"content_hash": "1fe015acbd629f5402eb7efac2fc6382",
"timestamp": "",
"source": "github",
"line_count": 3,
"max_line_length": 29,
"avg_line_length": 20.333333333333332,
"alnum_prop": 0.6557377049180327,
"repo_name": "mike-engel/hyperterm",
"id": "2387fbbeaae4082da670a9f7c52da86075ddcb8f",
"size": "61",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "lib/utils/array.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "728"
},
{
"name": "JavaScript",
"bytes": "109900"
}
],
"symlink_target": ""
} |
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.6">
<compounddef id="difference_8hpp" kind="file">
<compoundname>difference.hpp</compoundname>
<includes local="no">algorithm</includes>
<includes refid="intersection__insert_8hpp" local="no">boost/geometry/algorithms/detail/overlay/intersection_insert.hpp</includes>
<includes local="no">boost/geometry/policies/robustness/get_rescale_policy.hpp</includes>
<incdepgraph>
<node id="38283">
<label>boost/geometry/strategies/intersection_result.hpp</label>
<link refid="intersection__result_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
</node>
<node id="38431">
<label>boost/mpl/size.hpp</label>
</node>
<node id="38397">
<label>boost/geometry/strategies/concepts/within_concept.hpp</label>
<link refid="within__concept_8hpp"/>
<childnode refid="38145" relation="include">
</childnode>
<childnode refid="38398" relation="include">
</childnode>
<childnode refid="38399" relation="include">
</childnode>
</node>
<node id="38342">
<label>boost/geometry/iterators/detail/segment_iterator/iterator_type.hpp</label>
</node>
<node id="38239">
<label>boost/geometry/util/math.hpp</label>
<link refid="math_8hpp"/>
<childnode refid="38240" relation="include">
</childnode>
<childnode refid="38241" relation="include">
</childnode>
<childnode refid="38150" relation="include">
</childnode>
<childnode refid="38242" relation="include">
</childnode>
<childnode refid="38243" relation="include">
</childnode>
<childnode refid="38176" relation="include">
</childnode>
<childnode refid="38187" relation="include">
</childnode>
<childnode refid="38155" relation="include">
</childnode>
<childnode refid="38232" relation="include">
</childnode>
<childnode refid="38185" relation="include">
</childnode>
</node>
<node id="38344">
<label>boost/geometry/algorithms/detail/envelope/range.hpp</label>
<link refid="algorithms_2detail_2envelope_2range_8hpp"/>
<childnode refid="38192" relation="include">
</childnode>
<childnode refid="38296" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38156" relation="include">
</childnode>
<childnode refid="38191" relation="include">
</childnode>
<childnode refid="38337" relation="include">
</childnode>
<childnode refid="38345" relation="include">
</childnode>
<childnode refid="38310" relation="include">
</childnode>
<childnode refid="38318" relation="include">
</childnode>
<childnode refid="38302" relation="include">
</childnode>
<childnode refid="38307" relation="include">
</childnode>
<childnode refid="38309" relation="include">
</childnode>
</node>
<node id="38170">
<label>boost/geometry/core/interior_type.hpp</label>
<link refid="interior__type_8hpp"/>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38126" relation="include">
</childnode>
<childnode refid="38140" relation="include">
</childnode>
<childnode refid="38134" relation="include">
</childnode>
<childnode refid="38136" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
</node>
<node id="38422">
<label>boost/geometry/algorithms/detail/turns/filter_continue_turns.hpp</label>
<link refid="filter__continue__turns_8hpp"/>
<childnode refid="38123" relation="include">
</childnode>
<childnode refid="38320" relation="include">
</childnode>
</node>
<node id="38419">
<label>boost/geometry/algorithms/detail/relate/turns.hpp</label>
<link refid="turns_8hpp"/>
<childnode refid="38420" relation="include">
</childnode>
<childnode refid="38358" relation="include">
</childnode>
<childnode refid="38261" relation="include">
</childnode>
<childnode refid="38319" relation="include">
</childnode>
<childnode refid="38369" relation="include">
</childnode>
<childnode refid="38327" relation="include">
</childnode>
<childnode refid="38212" relation="include">
</childnode>
</node>
<node id="38319">
<label>boost/geometry/algorithms/detail/overlay/get_turn_info.hpp</label>
<link refid="get__turn__info_8hpp"/>
<childnode refid="38150" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38204" relation="include">
</childnode>
<childnode refid="38270" relation="include">
</childnode>
<childnode refid="38175" relation="include">
</childnode>
<childnode refid="38320" relation="include">
</childnode>
<childnode refid="38287" relation="include">
</childnode>
<childnode refid="38216" relation="include">
</childnode>
<childnode refid="38325" relation="include">
</childnode>
<childnode refid="38326" relation="include">
</childnode>
</node>
<node id="38134">
<label>boost/type_traits/remove_const.hpp</label>
</node>
<node id="38148">
<label>boost/geometry/geometries/concepts/box_concept.hpp</label>
<link refid="box__concept_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38145" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38156" relation="include">
</childnode>
<childnode refid="38153" relation="include">
</childnode>
</node>
<node id="38436">
<label>boost/mpl/vector.hpp</label>
</node>
<node id="38182">
<label>functional</label>
</node>
<node id="38324">
<label>boost/geometry/algorithms/detail/overlay/overlay_type.hpp</label>
<link refid="overlay__type_8hpp"/>
</node>
<node id="38312">
<label>queue</label>
</node>
<node id="38230">
<label>boost/version.hpp</label>
</node>
<node id="38367">
<label>boost/geometry/algorithms/detail/overlay/self_turn_points.hpp</label>
<link refid="self__turn__points_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38264" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38156" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
<childnode refid="38294" relation="include">
</childnode>
<childnode refid="38295" relation="include">
</childnode>
<childnode refid="38261" relation="include">
</childnode>
<childnode refid="38297" relation="include">
</childnode>
<childnode refid="38249" relation="include">
</childnode>
<childnode refid="38330" relation="include">
</childnode>
</node>
<node id="38485">
<label>boost/geometry/algorithms/detail/disjoint/point_geometry.hpp</label>
<link refid="disjoint_2point__geometry_8hpp"/>
<childnode refid="38412" relation="include">
</childnode>
<childnode refid="38478" relation="include">
</childnode>
<childnode refid="38257" relation="include">
</childnode>
</node>
<node id="38363">
<label>boost/geometry/algorithms/detail/overlay/enrichment_info.hpp</label>
<link refid="enrichment__info_8hpp"/>
<childnode refid="38322" relation="include">
</childnode>
</node>
<node id="38316">
<label>boost/geometry/algorithms/detail/envelope/segment.hpp</label>
<link refid="algorithms_2detail_2envelope_2segment_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38274" relation="include">
</childnode>
<childnode refid="38176" relation="include">
</childnode>
<childnode refid="38204" relation="include">
</childnode>
<childnode refid="38162" relation="include">
</childnode>
<childnode refid="38152" relation="include">
</childnode>
<childnode refid="38232" relation="include">
</childnode>
<childnode refid="38153" relation="include">
</childnode>
<childnode refid="38238" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38239" relation="include">
</childnode>
<childnode refid="38248" relation="include">
</childnode>
<childnode refid="38303" relation="include">
</childnode>
<childnode refid="38221" relation="include">
</childnode>
<childnode refid="38253" relation="include">
</childnode>
<childnode refid="38317" relation="include">
</childnode>
<childnode refid="38305" relation="include">
</childnode>
<childnode refid="38302" relation="include">
</childnode>
<childnode refid="38309" relation="include">
</childnode>
</node>
<node id="38241">
<label>limits</label>
</node>
<node id="38158">
<label>boost/geometry/geometries/concepts/linestring_concept.hpp</label>
<link refid="linestring__concept_8hpp"/>
<childnode refid="38145" relation="include">
</childnode>
<childnode refid="38159" relation="include">
</childnode>
<childnode refid="38134" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38160" relation="include">
</childnode>
<childnode refid="38153" relation="include">
</childnode>
<childnode refid="38161" relation="include">
</childnode>
</node>
<node id="38411">
<label>boost/geometry/algorithms/detail/overlay/follow.hpp</label>
<link refid="follow_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38233" relation="include">
</childnode>
<childnode refid="38259" relation="include">
</childnode>
<childnode refid="38371" relation="include">
</childnode>
<childnode refid="38320" relation="include">
</childnode>
<childnode refid="38412" relation="include">
</childnode>
<childnode refid="38210" relation="include">
</childnode>
</node>
<node id="38197">
<label>boost/range/empty.hpp</label>
</node>
<node id="38453">
<label>boost/geometry/algorithms/detail/relate/implementation.hpp</label>
<link refid="relate_2implementation_8hpp"/>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38440" relation="include">
</childnode>
<childnode refid="38454" relation="include">
</childnode>
<childnode refid="38455" relation="include">
</childnode>
<childnode refid="38458" relation="include">
</childnode>
<childnode refid="38463" relation="include">
</childnode>
<childnode refid="38464" relation="include">
</childnode>
</node>
<node id="38242">
<label>boost/math/constants/constants.hpp</label>
</node>
<node id="38430">
<label>boost/mpl/set.hpp</label>
</node>
<node id="38427">
<label>boost/mpl/fold.hpp</label>
</node>
<node id="38280">
<label>boost/tuple/tuple.hpp</label>
</node>
<node id="38192">
<label>iterator</label>
</node>
<node id="38425">
<label>boost/geometry/algorithms/detail/not.hpp</label>
<link refid="not_8hpp"/>
</node>
<node id="38128">
<label>boost/range/metafunctions.hpp</label>
</node>
<node id="38375">
<label>boost/geometry/algorithms/num_points.hpp</label>
<link refid="num__points_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38215" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38179" relation="include">
</childnode>
<childnode refid="38180" relation="include">
</childnode>
<childnode refid="38147" relation="include">
</childnode>
<childnode refid="38214" relation="include">
</childnode>
<childnode refid="38156" relation="include">
</childnode>
<childnode refid="38211" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38173" relation="include">
</childnode>
<childnode refid="38190" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
</node>
<node id="38398">
<label>boost/function_types/result_type.hpp</label>
</node>
<node id="38394">
<label>boost/geometry/algorithms/detail/overlay/assign_parents.hpp</label>
<link refid="assign__parents_8hpp"/>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38382" relation="include">
</childnode>
<childnode refid="38334" relation="include">
</childnode>
<childnode refid="38298" relation="include">
</childnode>
<childnode refid="38295" relation="include">
</childnode>
<childnode refid="38393" relation="include">
</childnode>
<childnode refid="38395" relation="include">
</childnode>
<childnode refid="38249" relation="include">
</childnode>
</node>
<node id="38323">
<label>boost/type_traits/make_signed.hpp</label>
</node>
<node id="38291">
<label>boost/geometry/policies/robustness/segment_ratio.hpp</label>
</node>
<node id="38196">
<label>boost/range/end.hpp</label>
</node>
<node id="38461">
<label>boost/geometry/algorithms/detail/relate/boundary_checker.hpp</label>
<link refid="boundary__checker_8hpp"/>
<childnode refid="38191" relation="include">
</childnode>
<childnode refid="38375" relation="include">
</childnode>
<childnode refid="38459" relation="include">
</childnode>
<childnode refid="38235" relation="include">
</childnode>
<childnode refid="38457" relation="include">
</childnode>
</node>
<node id="38320">
<label>boost/geometry/algorithms/detail/overlay/turn_info.hpp</label>
<link refid="turn__info_8hpp"/>
<childnode refid="38263" relation="include">
</childnode>
<childnode refid="38152" relation="include">
</childnode>
<childnode refid="38321" relation="include">
</childnode>
<childnode refid="38324" relation="include">
</childnode>
</node>
<node id="38254">
<label>boost/geometry/util/normalize_spheroidal_coordinates.hpp</label>
<link refid="normalize__spheroidal__coordinates_8hpp"/>
<childnode refid="38204" relation="include">
</childnode>
<childnode refid="38232" relation="include">
</childnode>
<childnode refid="38239" relation="include">
</childnode>
</node>
<node id="38351">
<label>boost/geometry/algorithms/detail/overlay/overlay.hpp</label>
<link refid="overlay_8hpp"/>
<childnode refid="38352" relation="include">
</childnode>
<childnode refid="38262" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38353" relation="include">
</childnode>
<childnode refid="38355" relation="include">
</childnode>
<childnode refid="38363" relation="include">
</childnode>
<childnode refid="38261" relation="include">
</childnode>
<childnode refid="38324" relation="include">
</childnode>
<childnode refid="38364" relation="include">
</childnode>
<childnode refid="38377" relation="include">
</childnode>
<childnode refid="38320" relation="include">
</childnode>
<childnode refid="38287" relation="include">
</childnode>
<childnode refid="38337" relation="include">
</childnode>
<childnode refid="38379" relation="include">
</childnode>
<childnode refid="38381" relation="include">
</childnode>
<childnode refid="38394" relation="include">
</childnode>
<childnode refid="38409" relation="include">
</childnode>
<childnode refid="38410" relation="include">
</childnode>
<childnode refid="38358" relation="include">
</childnode>
<childnode refid="38293" relation="include">
</childnode>
</node>
<node id="38444">
<label>boost/mpl/push_back.hpp</label>
</node>
<node id="38275">
<label>boost/geometry/policies/relate/direction.hpp</label>
<link refid="direction_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38272" relation="include">
</childnode>
<childnode refid="38145" relation="include">
</childnode>
<childnode refid="38276" relation="include">
</childnode>
<childnode refid="38273" relation="include">
</childnode>
<childnode refid="38239" relation="include">
</childnode>
<childnode refid="38277" relation="include">
</childnode>
<childnode refid="38185" relation="include">
</childnode>
</node>
<node id="38333">
<label>boost/geometry/algorithms/detail/sections/sectionalize.hpp</label>
<link refid="sectionalize_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38296" relation="include">
</childnode>
<childnode refid="38146" relation="include">
</childnode>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38264" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38157" relation="include">
</childnode>
<childnode refid="38234" relation="include">
</childnode>
<childnode refid="38334" relation="include">
</childnode>
<childnode refid="38298" relation="include">
</childnode>
<childnode refid="38206" relation="include">
</childnode>
<childnode refid="38287" relation="include">
</childnode>
<childnode refid="38348" relation="include">
</childnode>
<childnode refid="38322" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38214" relation="include">
</childnode>
<childnode refid="38167" relation="include">
</childnode>
<childnode refid="38137" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
<childnode refid="38239" relation="include">
</childnode>
<childnode refid="38327" relation="include">
</childnode>
<childnode refid="38325" relation="include">
</childnode>
<childnode refid="38223" relation="include">
</childnode>
<childnode refid="38229" relation="include">
</childnode>
<childnode refid="38216" relation="include">
</childnode>
<childnode refid="38349" relation="include">
</childnode>
</node>
<node id="38302">
<label>boost/geometry/algorithms/detail/expand/point.hpp</label>
<link refid="algorithms_2detail_2expand_2point_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38123" relation="include">
</childnode>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38237" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38156" relation="include">
</childnode>
<childnode refid="38162" relation="include">
</childnode>
<childnode refid="38152" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38239" relation="include">
</childnode>
<childnode refid="38247" relation="include">
</childnode>
<childnode refid="38303" relation="include">
</childnode>
<childnode refid="38304" relation="include">
</childnode>
<childnode refid="38253" relation="include">
</childnode>
<childnode refid="38305" relation="include">
</childnode>
<childnode refid="38300" relation="include">
</childnode>
</node>
<node id="38332">
<label>boost/geometry/algorithms/detail/sections/range_by_section.hpp</label>
<link refid="range__by__section_8hpp"/>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38204" relation="include">
</childnode>
<childnode refid="38214" relation="include">
</childnode>
<childnode refid="38167" relation="include">
</childnode>
<childnode refid="38169" relation="include">
</childnode>
<childnode refid="38139" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
<childnode refid="38191" relation="include">
</childnode>
</node>
<node id="38226">
<label>boost/iterator/iterator_facade.hpp</label>
</node>
<node id="38145">
<label>boost/concept_check.hpp</label>
</node>
<node id="38178">
<label>boost/type_traits/is_array.hpp</label>
</node>
<node id="38199">
<label>boost/range/iterator.hpp</label>
</node>
<node id="38276">
<label>boost/geometry/arithmetic/determinant.hpp</label>
<link refid="determinant_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38161" relation="include">
</childnode>
<childnode refid="38247" relation="include">
</childnode>
<childnode refid="38176" relation="include">
</childnode>
</node>
<node id="38470">
<label>boost/geometry/algorithms/detail/overlay/pointlike_pointlike.hpp</label>
<link refid="pointlike__pointlike_8hpp"/>
<childnode refid="38123" relation="include">
</childnode>
<childnode refid="38296" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38204" relation="include">
</childnode>
<childnode refid="38153" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38175" relation="include">
</childnode>
<childnode refid="38173" relation="include">
</childnode>
<childnode refid="38285" relation="include">
</childnode>
<childnode refid="38235" relation="include">
</childnode>
<childnode refid="38324" relation="include">
</childnode>
</node>
<node id="38257">
<label>boost/geometry/algorithms/dispatch/disjoint.hpp</label>
</node>
<node id="38348">
<label>boost/geometry/algorithms/detail/ring_identifier.hpp</label>
<link refid="ring__identifier_8hpp"/>
<childnode refid="38322" relation="include">
</childnode>
</node>
<node id="38455">
<label>boost/geometry/algorithms/detail/relate/point_geometry.hpp</label>
<link refid="relate_2point__geometry_8hpp"/>
<childnode refid="38406" relation="include">
</childnode>
<childnode refid="38445" relation="include">
</childnode>
<childnode refid="38456" relation="include">
</childnode>
<childnode refid="38330" relation="include">
</childnode>
</node>
<node id="38424">
<label>boost/geometry/algorithms/equals.hpp</label>
<link refid="equals_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38296" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38179" relation="include">
</childnode>
<childnode refid="38180" relation="include">
</childnode>
<childnode refid="38147" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38156" relation="include">
</childnode>
<childnode refid="38142" relation="include">
</childnode>
<childnode refid="38141" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
<childnode refid="38235" relation="include">
</childnode>
<childnode refid="38425" relation="include">
</childnode>
<childnode refid="38173" relation="include">
</childnode>
<childnode refid="38382" relation="include">
</childnode>
<childnode refid="38426" relation="include">
</childnode>
<childnode refid="38239" relation="include">
</childnode>
<childnode refid="38247" relation="include">
</childnode>
<childnode refid="38185" relation="include">
</childnode>
<childnode refid="38438" relation="include">
</childnode>
<childnode refid="38439" relation="include">
</childnode>
<childnode refid="38465" relation="include">
</childnode>
<childnode refid="38256" relation="include">
</childnode>
</node>
<node id="38298">
<label>boost/geometry/algorithms/expand.hpp</label>
<link refid="expand_8hpp"/>
<childnode refid="38299" relation="include">
</childnode>
<childnode refid="38301" relation="include">
</childnode>
</node>
<node id="38418">
<label>boost/geometry/algorithms/detail/overlay/linear_linear.hpp</label>
<link refid="overlay_2linear__linear_8hpp"/>
<childnode refid="38123" relation="include">
</childnode>
<childnode refid="38296" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38419" relation="include">
</childnode>
<childnode refid="38421" relation="include">
</childnode>
<childnode refid="38422" relation="include">
</childnode>
<childnode refid="38423" relation="include">
</childnode>
<childnode refid="38324" relation="include">
</childnode>
<childnode refid="38467" relation="include">
</childnode>
<childnode refid="38175" relation="include">
</childnode>
</node>
<node id="38368">
<label>boost/geometry/policies/disjoint_interrupt_policy.hpp</label>
<link refid="disjoint__interrupt__policy_8hpp"/>
<childnode refid="38177" relation="include">
</childnode>
</node>
<node id="38140">
<label>boost/type_traits/is_const.hpp</label>
</node>
<node id="38214">
<label>boost/geometry/core/closure.hpp</label>
<link refid="closure_8hpp"/>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38215" relation="include">
</childnode>
<childnode refid="38138" relation="include">
</childnode>
<childnode refid="38139" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38133" relation="include">
</childnode>
</node>
<node id="38369">
<label>boost/geometry/policies/robustness/get_rescale_policy.hpp</label>
</node>
<node id="38371">
<label>boost/geometry/algorithms/detail/overlay/copy_segments.hpp</label>
<link refid="copy__segments_8hpp"/>
<childnode refid="38296" relation="include">
</childnode>
<childnode refid="38263" relation="include">
</childnode>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38130" relation="include">
</childnode>
<childnode refid="38204" relation="include">
</childnode>
<childnode refid="38167" relation="include">
</childnode>
<childnode refid="38169" relation="include">
</childnode>
<childnode refid="38139" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38173" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
<childnode refid="38266" relation="include">
</childnode>
<childnode refid="38223" relation="include">
</childnode>
<childnode refid="38229" relation="include">
</childnode>
<childnode refid="38259" relation="include">
</childnode>
<childnode refid="38372" relation="include">
</childnode>
<childnode refid="38191" relation="include">
</childnode>
</node>
<node id="38292">
<label>boost/geometry/strategies/spherical/ssf.hpp</label>
<link refid="ssf_8hpp"/>
<childnode refid="38232" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38238" relation="include">
</childnode>
<childnode refid="38239" relation="include">
</childnode>
<childnode refid="38154" relation="include">
</childnode>
<childnode refid="38277" relation="include">
</childnode>
<childnode refid="38282" relation="include">
</childnode>
</node>
<node id="38454">
<label>boost/geometry/algorithms/detail/relate/point_point.hpp</label>
<link refid="relate_2point__point_8hpp"/>
<childnode refid="38123" relation="include">
</childnode>
<childnode refid="38296" relation="include">
</childnode>
<childnode refid="38197" relation="include">
</childnode>
<childnode refid="38235" relation="include">
</childnode>
<childnode refid="38406" relation="include">
</childnode>
<childnode refid="38285" relation="include">
</childnode>
<childnode refid="38445" relation="include">
</childnode>
</node>
<node id="38268">
<label>boost/geometry/iterators/base.hpp</label>
<link refid="base_8hpp"/>
<childnode refid="38225" relation="include">
</childnode>
<childnode refid="38267" relation="include">
</childnode>
<childnode refid="38227" relation="include">
</childnode>
<childnode refid="38126" relation="include">
</childnode>
</node>
<node id="38233">
<label>boost/geometry/algorithms/detail/point_on_border.hpp</label>
<link refid="point__on__border_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38153" relation="include">
</childnode>
<childnode refid="38139" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
<childnode refid="38234" relation="include">
</childnode>
<childnode refid="38207" relation="include">
</childnode>
<childnode refid="38235" relation="include">
</childnode>
</node>
<node id="38476">
<label>boost/geometry/algorithms/detail/for_each_range.hpp</label>
<link refid="for__each__range_8hpp"/>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38146" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38140" relation="include">
</childnode>
<childnode refid="38134" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
<childnode refid="38211" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38168" relation="include">
</childnode>
<childnode refid="38477" relation="include">
</childnode>
</node>
<node id="38269">
<label>boost/geometry/strategies/cartesian/cart_intersect.hpp</label>
</node>
<node id="38224">
<label>boost/geometry/iterators/closing_iterator.hpp</label>
<link refid="closing__iterator_8hpp"/>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38225" relation="include">
</childnode>
<childnode refid="38226" relation="include">
</childnode>
<childnode refid="38227" relation="include">
</childnode>
</node>
<node id="38326">
<label>boost/geometry/algorithms/detail/overlay/get_turn_info_helpers.hpp</label>
<link refid="get__turn__info__helpers_8hpp"/>
<childnode refid="38327" relation="include">
</childnode>
</node>
<node id="38273">
<label>boost/geometry/strategies/side_info.hpp</label>
<link refid="side__info_8hpp"/>
<childnode refid="38240" relation="include">
</childnode>
<childnode refid="38274" relation="include">
</childnode>
</node>
<node id="38396">
<label>boost/geometry/algorithms/make.hpp</label>
<link refid="make_8hpp"/>
<childnode refid="38234" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
</node>
<node id="38149">
<label>boost/geometry/core/access.hpp</label>
<link refid="access_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38150" relation="include">
</childnode>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38151" relation="include">
</childnode>
<childnode refid="38135" relation="include">
</childnode>
<childnode refid="38152" relation="include">
</childnode>
<childnode refid="38153" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
<childnode refid="38133" relation="include">
</childnode>
</node>
<node id="38392">
<label>boost/range/algorithm/reverse.hpp</label>
</node>
<node id="38282">
<label>boost/geometry/strategies/side.hpp</label>
<link refid="side_8hpp"/>
<childnode refid="38246" relation="include">
</childnode>
</node>
<node id="38204">
<label>boost/geometry/core/assert.hpp</label>
<link refid="assert_8hpp"/>
<childnode refid="38205" relation="include">
</childnode>
</node>
<node id="38486">
<label>boost/geometry/algorithms/detail/disjoint/multipoint_geometry.hpp</label>
<link refid="multipoint__geometry_8hpp"/>
<childnode refid="38123" relation="include">
</childnode>
<childnode refid="38296" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38204" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38249" relation="include">
</childnode>
<childnode refid="38340" relation="include">
</childnode>
<childnode refid="38334" relation="include">
</childnode>
<childnode refid="38298" relation="include">
</childnode>
<childnode refid="38338" relation="include">
</childnode>
<childnode refid="38295" relation="include">
</childnode>
<childnode refid="38480" relation="include">
</childnode>
<childnode refid="38236" relation="include">
</childnode>
<childnode refid="38485" relation="include">
</childnode>
<childnode refid="38285" relation="include">
</childnode>
<childnode refid="38257" relation="include">
</childnode>
</node>
<node id="38370">
<label>boost/geometry/algorithms/detail/overlay/traversal_ring_creator.hpp</label>
<link refid="traversal__ring__creator_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38371" relation="include">
</childnode>
<childnode refid="38320" relation="include">
</childnode>
<childnode refid="38374" relation="include">
</childnode>
<childnode refid="38375" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38204" relation="include">
</childnode>
<childnode refid="38214" relation="include">
</childnode>
</node>
<node id="38384">
<label>boost/geometry/algorithms/detail/calculate_null.hpp</label>
<link refid="calculate__null_8hpp"/>
</node>
<node id="38462">
<label>boost/geometry/algorithms/detail/relate/follow_helpers.hpp</label>
<link refid="follow__helpers_8hpp"/>
<childnode refid="38204" relation="include">
</childnode>
<childnode refid="38330" relation="include">
</childnode>
<childnode refid="38191" relation="include">
</childnode>
</node>
<node id="38270">
<label>boost/geometry/strategies/intersection_strategies.hpp</label>
<link refid="intersection__strategies_8hpp"/>
<childnode refid="38153" relation="include">
</childnode>
<childnode refid="38216" relation="include">
</childnode>
<childnode refid="38271" relation="include">
</childnode>
<childnode refid="38275" relation="include">
</childnode>
<childnode refid="38279" relation="include">
</childnode>
<childnode refid="38281" relation="include">
</childnode>
<childnode refid="38282" relation="include">
</childnode>
<childnode refid="38283" relation="include">
</childnode>
<childnode refid="38269" relation="include">
</childnode>
<childnode refid="38284" relation="include">
</childnode>
<childnode refid="38286" relation="include">
</childnode>
<childnode refid="38292" relation="include">
</childnode>
<childnode refid="38293" relation="include">
</childnode>
</node>
<node id="38421">
<label>boost/geometry/algorithms/detail/turns/compare_turns.hpp</label>
<link refid="compare__turns_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38182" relation="include">
</childnode>
<childnode refid="38239" relation="include">
</childnode>
<childnode refid="38320" relation="include">
</childnode>
</node>
<node id="38175">
<label>boost/geometry/algorithms/convert.hpp</label>
<link refid="convert_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38176" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38178" relation="include">
</childnode>
<childnode refid="38136" relation="include">
</childnode>
<childnode refid="38179" relation="include">
</childnode>
<childnode refid="38180" relation="include">
</childnode>
<childnode refid="38147" relation="include">
</childnode>
<childnode refid="38181" relation="include">
</childnode>
<childnode refid="38173" relation="include">
</childnode>
<childnode refid="38188" relation="include">
</childnode>
<childnode refid="38210" relation="include">
</childnode>
<childnode refid="38213" relation="include">
</childnode>
<childnode refid="38218" relation="include">
</childnode>
<childnode refid="38220" relation="include">
</childnode>
<childnode refid="38221" relation="include">
</childnode>
<childnode refid="38207" relation="include">
</childnode>
<childnode refid="38222" relation="include">
</childnode>
<childnode refid="38206" relation="include">
</childnode>
<childnode refid="38223" relation="include">
</childnode>
<childnode refid="38229" relation="include">
</childnode>
<childnode refid="38191" relation="include">
</childnode>
<childnode refid="38232" relation="include">
</childnode>
<childnode refid="38214" relation="include">
</childnode>
<childnode refid="38137" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
</node>
<node id="38189">
<label>boost/geometry/algorithms/num_interior_rings.hpp</label>
<link refid="num__interior__rings_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38179" relation="include">
</childnode>
<childnode refid="38180" relation="include">
</childnode>
<childnode refid="38147" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38169" relation="include">
</childnode>
<childnode refid="38190" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
</node>
<node id="38357">
<label>boost/geometry/algorithms/detail/overlay/handle_colocations.hpp</label>
<link refid="handle__colocations_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38123" relation="include">
</childnode>
<childnode refid="38262" relation="include">
</childnode>
<childnode refid="38296" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38137" relation="include">
</childnode>
<childnode refid="38353" relation="include">
</childnode>
<childnode refid="38358" relation="include">
</childnode>
<childnode refid="38324" relation="include">
</childnode>
<childnode refid="38359" relation="include">
</childnode>
<childnode refid="38320" relation="include">
</childnode>
<childnode refid="38348" relation="include">
</childnode>
<childnode refid="38321" relation="include">
</childnode>
</node>
<node id="38147">
<label>boost/variant/variant_fwd.hpp</label>
</node>
<node id="38373">
<label>boost/geometry/algorithms/detail/point_is_spike_or_equal.hpp</label>
<link refid="point__is__spike__or__equal_8hpp"/>
<childnode refid="38360" relation="include">
</childnode>
<childnode refid="38287" relation="include">
</childnode>
<childnode refid="38325" relation="include">
</childnode>
<childnode refid="38282" relation="include">
</childnode>
<childnode refid="38330" relation="include">
</childnode>
<childnode refid="38239" relation="include">
</childnode>
</node>
<node id="38438">
<label>boost/geometry/algorithms/detail/equals/collect_vectors.hpp</label>
<link refid="collect__vectors_8hpp"/>
<childnode refid="38176" relation="include">
</childnode>
<childnode refid="38206" relation="include">
</childnode>
<childnode refid="38253" relation="include">
</childnode>
<childnode refid="38232" relation="include">
</childnode>
<childnode refid="38169" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38290" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
<childnode refid="38239" relation="include">
</childnode>
<childnode refid="38191" relation="include">
</childnode>
</node>
<node id="38240">
<label>cmath</label>
</node>
<node id="38195">
<label>boost/range/begin.hpp</label>
</node>
<node id="38126">
<label>boost/mpl/if.hpp</label>
</node>
<node id="38129">
<label>boost/geometry/core/is_areal.hpp</label>
<link refid="is__areal_8hpp"/>
<childnode refid="38130" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
</node>
<node id="38286">
<label>boost/geometry/strategies/spherical/intersection.hpp</label>
<link refid="strategies_2spherical_2intersection_8hpp"/>
<childnode refid="38123" relation="include">
</childnode>
<childnode refid="38232" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38238" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38218" relation="include">
</childnode>
<childnode refid="38221" relation="include">
</childnode>
<childnode refid="38235" relation="include">
</childnode>
<childnode refid="38287" relation="include">
</childnode>
<childnode refid="38181" relation="include">
</childnode>
<childnode refid="38288" relation="include">
</childnode>
<childnode refid="38289" relation="include">
</childnode>
<childnode refid="38290" relation="include">
</childnode>
<childnode refid="38161" relation="include">
</childnode>
<childnode refid="38172" relation="include">
</childnode>
<childnode refid="38291" relation="include">
</childnode>
<childnode refid="38273" relation="include">
</childnode>
<childnode refid="38281" relation="include">
</childnode>
<childnode refid="38283" relation="include">
</childnode>
<childnode refid="38239" relation="include">
</childnode>
<childnode refid="38277" relation="include">
</childnode>
</node>
<node id="38198">
<label>boost/range/difference_type.hpp</label>
</node>
<node id="38157">
<label>boost/static_assert.hpp</label>
</node>
<node id="38250">
<label>boost/geometry/geometries/point.hpp</label>
<link refid="geometries_2point_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38193" relation="include">
</childnode>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38143" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38204" relation="include">
</childnode>
<childnode refid="38152" relation="include">
</childnode>
<childnode refid="38162" relation="include">
</childnode>
<childnode refid="38156" relation="include">
</childnode>
</node>
<node id="38191">
<label>boost/geometry/util/range.hpp</label>
<link refid="util_2range_8hpp"/>
<childnode refid="38123" relation="include">
</childnode>
<childnode refid="38192" relation="include">
</childnode>
<childnode refid="38145" relation="include">
</childnode>
<childnode refid="38193" relation="include">
</childnode>
<childnode refid="38194" relation="include">
</childnode>
<childnode refid="38159" relation="include">
</childnode>
<childnode refid="38195" relation="include">
</childnode>
<childnode refid="38196" relation="include">
</childnode>
<childnode refid="38197" relation="include">
</childnode>
<childnode refid="38198" relation="include">
</childnode>
<childnode refid="38199" relation="include">
</childnode>
<childnode refid="38200" relation="include">
</childnode>
<childnode refid="38201" relation="include">
</childnode>
<childnode refid="38202" relation="include">
</childnode>
<childnode refid="38138" relation="include">
</childnode>
<childnode refid="38203" relation="include">
</childnode>
<childnode refid="38204" relation="include">
</childnode>
<childnode refid="38160" relation="include">
</childnode>
</node>
<node id="38423">
<label>boost/geometry/algorithms/detail/turns/remove_duplicate_turns.hpp</label>
<link refid="remove__duplicate__turns_8hpp"/>
<childnode refid="38123" relation="include">
</childnode>
<childnode refid="38424" relation="include">
</childnode>
</node>
<node id="38151">
<label>boost/type_traits/is_pointer.hpp</label>
</node>
<node id="38376">
<label>boost/geometry/algorithms/detail/overlay/traversal_switch_detector.hpp</label>
<link refid="traversal__switch__detector_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38348" relation="include">
</childnode>
<childnode refid="38371" relation="include">
</childnode>
<childnode refid="38353" relation="include">
</childnode>
<childnode refid="38320" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38204" relation="include">
</childnode>
</node>
<node id="38220">
<label>boost/geometry/algorithms/detail/assign_box_corners.hpp</label>
<link refid="assign__box__corners_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
<childnode refid="38218" relation="include">
</childnode>
<childnode refid="38191" relation="include">
</childnode>
</node>
<node id="38341">
<label>boost/geometry/iterators/detail/point_iterator/inner_range_type.hpp</label>
</node>
<node id="38267">
<label>boost/iterator/iterator_adaptor.hpp</label>
</node>
<node id="38414">
<label>boost/geometry/strategies/cartesian/box_in_box.hpp</label>
<link refid="box__in__box_8hpp"/>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38156" relation="include">
</childnode>
<childnode refid="38407" relation="include">
</childnode>
<childnode refid="38405" relation="include">
</childnode>
<childnode refid="38254" relation="include">
</childnode>
</node>
<node id="38306">
<label>boost/geometry/views/detail/two_dimensional_view.hpp</label>
</node>
<node id="38272">
<label>string</label>
</node>
<node id="38403">
<label>boost/mpl/at.hpp</label>
</node>
<node id="38334">
<label>boost/geometry/algorithms/envelope.hpp</label>
<link refid="envelope_8hpp"/>
<childnode refid="38335" relation="include">
</childnode>
<childnode refid="38336" relation="include">
</childnode>
</node>
<node id="38243">
<label>boost/math/special_functions/fpclassify.hpp</label>
</node>
<node id="38152">
<label>boost/geometry/core/coordinate_type.hpp</label>
<link refid="coordinate__type_8hpp"/>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38153" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
<childnode refid="38133" relation="include">
</childnode>
<childnode refid="38154" relation="include">
</childnode>
</node>
<node id="38127">
<label>boost/mpl/assert.hpp</label>
</node>
<node id="38258">
<label>boost/geometry/algorithms/detail/overlay/clip_linestring.hpp</label>
<link refid="clip__linestring_8hpp"/>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38210" relation="include">
</childnode>
<childnode refid="38175" relation="include">
</childnode>
<childnode refid="38259" relation="include">
</childnode>
<childnode refid="38247" relation="include">
</childnode>
<childnode refid="38216" relation="include">
</childnode>
</node>
<node id="38432">
<label>boost/mpl/transform.hpp</label>
</node>
<node id="38445">
<label>boost/geometry/algorithms/detail/relate/result.hpp</label>
<link refid="result_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38403" relation="include">
</childnode>
<childnode refid="38446" relation="include">
</childnode>
<childnode refid="38447" relation="include">
</childnode>
<childnode refid="38448" relation="include">
</childnode>
<childnode refid="38443" relation="include">
</childnode>
<childnode refid="38449" relation="include">
</childnode>
<childnode refid="38157" relation="include">
</childnode>
<childnode refid="38280" relation="include">
</childnode>
<childnode refid="38130" relation="include">
</childnode>
<childnode refid="38204" relation="include">
</childnode>
<childnode refid="38156" relation="include">
</childnode>
<childnode refid="38450" relation="include">
</childnode>
<childnode refid="38330" relation="include">
</childnode>
</node>
<node id="38190">
<label>boost/geometry/algorithms/detail/counting.hpp</label>
<link refid="counting_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38167" relation="include">
</childnode>
<childnode refid="38169" relation="include">
</childnode>
<childnode refid="38191" relation="include">
</childnode>
<childnode refid="38206" relation="include">
</childnode>
</node>
<node id="38163">
<label>boost/geometry/geometries/concepts/multi_point_concept.hpp</label>
<link refid="multi__point__concept_8hpp"/>
<childnode refid="38145" relation="include">
</childnode>
<childnode refid="38159" relation="include">
</childnode>
<childnode refid="38128" relation="include">
</childnode>
<childnode refid="38161" relation="include">
</childnode>
</node>
<node id="38262">
<label>map</label>
</node>
<node id="38360">
<label>boost/geometry/algorithms/detail/direction_code.hpp</label>
<link refid="direction__code_8hpp"/>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38239" relation="include">
</childnode>
</node>
<node id="38216">
<label>boost/geometry/geometries/segment.hpp</label>
<link refid="geometries_2segment_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38217" relation="include">
</childnode>
<childnode refid="38126" relation="include">
</childnode>
<childnode refid="38140" relation="include">
</childnode>
<childnode refid="38161" relation="include">
</childnode>
</node>
<node id="38413">
<label>boost/geometry/strategies/cartesian/point_in_box.hpp</label>
<link refid="point__in__box_8hpp"/>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38156" relation="include">
</childnode>
<childnode refid="38407" relation="include">
</childnode>
<childnode refid="38405" relation="include">
</childnode>
<childnode refid="38254" relation="include">
</childnode>
</node>
<node id="38328">
<label>boost/geometry/algorithms/detail/overlay/get_turn_info_ll.hpp</label>
<link refid="get__turn__info__ll_8hpp"/>
<childnode refid="38204" relation="include">
</childnode>
<childnode refid="38319" relation="include">
</childnode>
<childnode refid="38329" relation="include">
</childnode>
<childnode refid="38330" relation="include">
</childnode>
</node>
<node id="38365">
<label>boost/geometry/algorithms/detail/overlay/backtrack_check_si.hpp</label>
<link refid="backtrack__check__si_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38272" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38320" relation="include">
</childnode>
<childnode refid="38366" relation="include">
</childnode>
</node>
<node id="38303">
<label>boost/geometry/strategies/compare.hpp</label>
<link refid="strategies_2compare_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38182" relation="include">
</childnode>
<childnode refid="38126" relation="include">
</childnode>
<childnode refid="38232" relation="include">
</childnode>
<childnode refid="38152" relation="include">
</childnode>
<childnode refid="38246" relation="include">
</childnode>
</node>
<node id="38136">
<label>boost/type_traits/remove_reference.hpp</label>
</node>
<node id="38449">
<label>boost/mpl/next.hpp</label>
</node>
<node id="38260">
<label>boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp</label>
<link refid="get__intersection__points_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38126" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38175" relation="include">
</childnode>
<childnode refid="38261" relation="include">
</childnode>
<childnode refid="38216" relation="include">
</childnode>
<childnode refid="38325" relation="include">
</childnode>
</node>
<node id="38236">
<label>boost/geometry/algorithms/detail/disjoint/point_point.hpp</label>
<link refid="disjoint_2point__point_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38237" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38238" relation="include">
</childnode>
<childnode refid="38156" relation="include">
</childnode>
<childnode refid="38162" relation="include">
</childnode>
<childnode refid="38152" relation="include">
</childnode>
<childnode refid="38232" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38239" relation="include">
</childnode>
<childnode refid="38185" relation="include">
</childnode>
<childnode refid="38244" relation="include">
</childnode>
<childnode refid="38248" relation="include">
</childnode>
<childnode refid="38251" relation="include">
</childnode>
<childnode refid="38253" relation="include">
</childnode>
<childnode refid="38257" relation="include">
</childnode>
</node>
<node id="38162">
<label>boost/geometry/core/coordinate_system.hpp</label>
<link refid="coordinate__system_8hpp"/>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38153" relation="include">
</childnode>
<childnode refid="38133" relation="include">
</childnode>
</node>
<node id="38451">
<label>exception</label>
</node>
<node id="38150">
<label>boost/core/ignore_unused.hpp</label>
</node>
<node id="38154">
<label>boost/geometry/util/promote_floating_point.hpp</label>
<link refid="promote__floating__point_8hpp"/>
<childnode refid="38126" relation="include">
</childnode>
<childnode refid="38155" relation="include">
</childnode>
</node>
<node id="38304">
<label>boost/geometry/policies/compare.hpp</label>
<link refid="policies_2compare_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38303" relation="include">
</childnode>
<childnode refid="38239" relation="include">
</childnode>
</node>
<node id="38132">
<label>boost/geometry/core/tags.hpp</label>
<link refid="core_2tags_8hpp"/>
</node>
<node id="38399">
<label>boost/geometry/util/parameter_type_of.hpp</label>
<link refid="parameter__type__of_8hpp"/>
<childnode refid="38400" relation="include">
</childnode>
<childnode refid="38401" relation="include">
</childnode>
<childnode refid="38402" relation="include">
</childnode>
<childnode refid="38403" relation="include">
</childnode>
<childnode refid="38143" relation="include">
</childnode>
<childnode refid="38404" relation="include">
</childnode>
<childnode refid="38136" relation="include">
</childnode>
</node>
<node id="38314">
<label>boost/geometry/algorithms/detail/sweep.hpp</label>
<link refid="sweep_8hpp"/>
<childnode refid="38150" relation="include">
</childnode>
</node>
<node id="38364">
<label>boost/geometry/algorithms/detail/overlay/traverse.hpp</label>
<link refid="traverse_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38365" relation="include">
</childnode>
<childnode refid="38370" relation="include">
</childnode>
<childnode refid="38376" relation="include">
</childnode>
</node>
<node id="38124">
<label>boost/geometry/algorithms/detail/overlay/intersection_insert.hpp</label>
<link refid="intersection__insert_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38126" relation="include">
</childnode>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38128" relation="include">
</childnode>
<childnode refid="38129" relation="include">
</childnode>
<childnode refid="38137" relation="include">
</childnode>
<childnode refid="38141" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
<childnode refid="38175" relation="include">
</childnode>
<childnode refid="38233" relation="include">
</childnode>
<childnode refid="38258" relation="include">
</childnode>
<childnode refid="38260" relation="include">
</childnode>
<childnode refid="38351" relation="include">
</childnode>
<childnode refid="38324" relation="include">
</childnode>
<childnode refid="38411" relation="include">
</childnode>
<childnode refid="38325" relation="include">
</childnode>
<childnode refid="38293" relation="include">
</childnode>
<childnode refid="38369" relation="include">
</childnode>
<childnode refid="38415" relation="include">
</childnode>
<childnode refid="38417" relation="include">
</childnode>
<childnode refid="38338" relation="include">
</childnode>
<childnode refid="38418" relation="include">
</childnode>
<childnode refid="38470" relation="include">
</childnode>
<childnode refid="38471" relation="include">
</childnode>
</node>
<node id="38378">
<label>boost/geometry/algorithms/detail/overlay/visit_info.hpp</label>
<link refid="visit__info_8hpp"/>
</node>
<node id="38265">
<label>boost/geometry/views/detail/range_type.hpp</label>
</node>
<node id="38244">
<label>boost/geometry/strategies/strategy_transform.hpp</label>
<link refid="strategy__transform_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38240" relation="include">
</childnode>
<childnode refid="38182" relation="include">
</childnode>
<childnode refid="38176" relation="include">
</childnode>
<childnode refid="38175" relation="include">
</childnode>
<childnode refid="38181" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38238" relation="include">
</childnode>
<childnode refid="38156" relation="include">
</childnode>
<childnode refid="38245" relation="include">
</childnode>
<childnode refid="38239" relation="include">
</childnode>
<childnode refid="38154" relation="include">
</childnode>
<childnode refid="38247" relation="include">
</childnode>
</node>
<node id="38389">
<label>boost/geometry/strategies/concepts/area_concept.hpp</label>
<link refid="area__concept_8hpp"/>
<childnode refid="38145" relation="include">
</childnode>
</node>
<node id="38248">
<label>boost/geometry/geometries/helper_geometry.hpp</label>
<link refid="helper__geometry_8hpp"/>
<childnode refid="38232" relation="include">
</childnode>
<childnode refid="38156" relation="include">
</childnode>
<childnode refid="38152" relation="include">
</childnode>
<childnode refid="38153" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38249" relation="include">
</childnode>
<childnode refid="38250" relation="include">
</childnode>
<childnode refid="38173" relation="include">
</childnode>
</node>
<node id="38130">
<label>boost/type_traits/integral_constant.hpp</label>
</node>
<node id="38261">
<label>boost/geometry/algorithms/detail/overlay/get_turns.hpp</label>
<link refid="get__turns_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38262" relation="include">
</childnode>
<childnode refid="38263" relation="include">
</childnode>
<childnode refid="38145" relation="include">
</childnode>
<childnode refid="38126" relation="include">
</childnode>
<childnode refid="38264" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38156" relation="include">
</childnode>
<childnode refid="38167" relation="include">
</childnode>
<childnode refid="38169" relation="include">
</childnode>
<childnode refid="38141" relation="include">
</childnode>
<childnode refid="38139" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
<childnode refid="38239" relation="include">
</childnode>
<childnode refid="38223" relation="include">
</childnode>
<childnode refid="38229" relation="include">
</childnode>
<childnode refid="38265" relation="include">
</childnode>
<childnode refid="38249" relation="include">
</childnode>
<childnode refid="38216" relation="include">
</childnode>
<childnode refid="38266" relation="include">
</childnode>
<childnode refid="38269" relation="include">
</childnode>
<childnode refid="38270" relation="include">
</childnode>
<childnode refid="38283" relation="include">
</childnode>
<childnode refid="38294" relation="include">
</childnode>
<childnode refid="38236" relation="include">
</childnode>
<childnode refid="38206" relation="include">
</childnode>
<childnode refid="38295" relation="include">
</childnode>
<childnode refid="38287" relation="include">
</childnode>
<childnode refid="38297" relation="include">
</childnode>
<childnode refid="38319" relation="include">
</childnode>
<childnode refid="38328" relation="include">
</childnode>
<childnode refid="38331" relation="include">
</childnode>
<childnode refid="38321" relation="include">
</childnode>
<childnode refid="38332" relation="include">
</childnode>
<childnode refid="38333" relation="include">
</childnode>
<childnode refid="38350" relation="include">
</childnode>
</node>
<node id="38215">
<label>boost/mpl/size_t.hpp</label>
</node>
<node id="38442">
<label>boost/geometry/algorithms/detail/relate/de9im.hpp</label>
<link refid="de9im_8hpp"/>
<childnode refid="38443" relation="include">
</childnode>
<childnode refid="38444" relation="include">
</childnode>
<childnode refid="38436" relation="include">
</childnode>
<childnode refid="38264" relation="include">
</childnode>
<childnode refid="38157" relation="include">
</childnode>
<childnode refid="38280" relation="include">
</childnode>
<childnode refid="38445" relation="include">
</childnode>
<childnode refid="38173" relation="include">
</childnode>
<childnode refid="38441" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
<childnode refid="38452" relation="include">
</childnode>
</node>
<node id="38391">
<label>boost/geometry/algorithms/detail/overlay/convert_ring.hpp</label>
<link refid="convert__ring_8hpp"/>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38392" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38167" relation="include">
</childnode>
<childnode refid="38169" relation="include">
</childnode>
<childnode refid="38348" relation="include">
</childnode>
<childnode refid="38175" relation="include">
</childnode>
</node>
<node id="38293">
<label>boost/geometry/policies/robustness/segment_ratio_type.hpp</label>
</node>
<node id="38308">
<label>boost/geometry/algorithms/detail/envelope/box.hpp</label>
<link refid="algorithms_2detail_2envelope_2box_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38232" relation="include">
</childnode>
<childnode refid="38156" relation="include">
</childnode>
<childnode refid="38162" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38256" relation="include">
</childnode>
<childnode refid="38207" relation="include">
</childnode>
<childnode refid="38253" relation="include">
</childnode>
<childnode refid="38305" relation="include">
</childnode>
<childnode refid="38309" relation="include">
</childnode>
</node>
<node id="38205">
<label>boost/assert.hpp</label>
</node>
<node id="38452">
<label>boost/geometry/index/detail/tuples.hpp</label>
</node>
<node id="38321">
<label>boost/geometry/algorithms/detail/overlay/segment_identifier.hpp</label>
<link refid="segment__identifier_8hpp"/>
<childnode refid="38322" relation="include">
</childnode>
</node>
<node id="38159">
<label>boost/range/concepts.hpp</label>
</node>
<node id="38434">
<label>boost/geometry/util/compress_variant.hpp</label>
<link refid="compress__variant_8hpp"/>
<childnode refid="38435" relation="include">
</childnode>
<childnode refid="38427" relation="include">
</childnode>
<childnode refid="38209" relation="include">
</childnode>
<childnode refid="38126" relation="include">
</childnode>
<childnode refid="38429" relation="include">
</childnode>
<childnode refid="38143" relation="include">
</childnode>
<childnode refid="38430" relation="include">
</childnode>
<childnode refid="38431" relation="include">
</childnode>
<childnode refid="38436" relation="include">
</childnode>
<childnode refid="38147" relation="include">
</childnode>
</node>
<node id="38311">
<label>boost/geometry/algorithms/detail/max_interval_gap.hpp</label>
<link refid="max__interval__gap_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38312" relation="include">
</childnode>
<childnode refid="38274" relation="include">
</childnode>
<childnode refid="38296" relation="include">
</childnode>
<childnode refid="38313" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38134" relation="include">
</childnode>
<childnode refid="38136" relation="include">
</childnode>
<childnode refid="38204" relation="include">
</childnode>
<childnode refid="38239" relation="include">
</childnode>
<childnode refid="38314" relation="include">
</childnode>
</node>
<node id="38300">
<label>boost/geometry/algorithms/dispatch/expand.hpp</label>
</node>
<node id="38409">
<label>boost/geometry/algorithms/detail/overlay/ring_properties.hpp</label>
<link refid="ring__properties_8hpp"/>
<childnode refid="38382" relation="include">
</childnode>
<childnode refid="38395" relation="include">
</childnode>
<childnode refid="38233" relation="include">
</childnode>
</node>
<node id="38327">
<label>boost/geometry/policies/robustness/no_rescale_policy.hpp</label>
</node>
<node id="38201">
<label>boost/range/reference.hpp</label>
</node>
<node id="38297">
<label>boost/geometry/algorithms/detail/sections/section_box_policies.hpp</label>
<link refid="section__box__policies_8hpp"/>
<childnode refid="38294" relation="include">
</childnode>
<childnode refid="38298" relation="include">
</childnode>
</node>
<node id="38380">
<label>boost/geometry/algorithms/detail/multi_modify.hpp</label>
<link refid="multi__modify_8hpp"/>
<childnode refid="38177" relation="include">
</childnode>
</node>
<node id="38168">
<label>boost/geometry/util/add_const_if_c.hpp</label>
<link refid="add__const__if__c_8hpp"/>
<childnode refid="38126" relation="include">
</childnode>
</node>
<node id="38464">
<label>boost/geometry/algorithms/detail/relate/areal_areal.hpp</label>
<link refid="relate_2areal__areal_8hpp"/>
<childnode refid="38441" relation="include">
</childnode>
<childnode refid="38330" relation="include">
</childnode>
<childnode refid="38191" relation="include">
</childnode>
<childnode refid="38189" relation="include">
</childnode>
<childnode refid="38233" relation="include">
</childnode>
<childnode refid="38459" relation="include">
</childnode>
<childnode refid="38460" relation="include">
</childnode>
<childnode refid="38455" relation="include">
</childnode>
<childnode refid="38419" relation="include">
</childnode>
<childnode refid="38461" relation="include">
</childnode>
<childnode refid="38462" relation="include">
</childnode>
</node>
<node id="38256">
<label>boost/geometry/views/detail/indexed_point_view.hpp</label>
</node>
<node id="38179">
<label>boost/variant/apply_visitor.hpp</label>
</node>
<node id="38441">
<label>boost/geometry/core/topological_dimension.hpp</label>
<link refid="topological__dimension_8hpp"/>
<childnode refid="38143" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
</node>
<node id="38372">
<label>boost/geometry/algorithms/detail/overlay/append_no_dups_or_spikes.hpp</label>
<link refid="append__no__dups__or__spikes_8hpp"/>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38188" relation="include">
</childnode>
<childnode refid="38373" relation="include">
</childnode>
<childnode refid="38235" relation="include">
</childnode>
<childnode refid="38330" relation="include">
</childnode>
<childnode refid="38191" relation="include">
</childnode>
</node>
<node id="38278">
<label>boost/type_traits/is_void.hpp</label>
</node>
<node id="38479">
<label>boost/geometry/algorithms/detail/disjoint/linear_areal.hpp</label>
<link refid="disjoint_2linear__areal_8hpp"/>
<childnode refid="38192" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38214" relation="include">
</childnode>
<childnode refid="38153" relation="include">
</childnode>
<childnode refid="38139" relation="include">
</childnode>
<childnode refid="38167" relation="include">
</childnode>
<childnode refid="38169" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
<childnode refid="38211" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38412" relation="include">
</childnode>
<childnode refid="38173" relation="include">
</childnode>
<childnode refid="38221" relation="include">
</childnode>
<childnode refid="38338" relation="include">
</childnode>
<childnode refid="38233" relation="include">
</childnode>
<childnode refid="38480" relation="include">
</childnode>
<childnode refid="38481" relation="include">
</childnode>
<childnode refid="38482" relation="include">
</childnode>
<childnode refid="38483" relation="include">
</childnode>
<childnode refid="38257" relation="include">
</childnode>
</node>
<node id="38347">
<label>boost/algorithm/minmax_element.hpp</label>
</node>
<node id="38322">
<label>boost/geometry/algorithms/detail/signed_size_type.hpp</label>
<link refid="signed__size__type_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38323" relation="include">
</childnode>
</node>
<node id="38385">
<label>boost/geometry/algorithms/detail/calculate_sum.hpp</label>
<link refid="calculate__sum_8hpp"/>
<childnode refid="38177" relation="include">
</childnode>
</node>
<node id="38259">
<label>boost/geometry/algorithms/detail/overlay/append_no_duplicates.hpp</label>
<link refid="append__no__duplicates_8hpp"/>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38188" relation="include">
</childnode>
<childnode refid="38235" relation="include">
</childnode>
</node>
<node id="38471">
<label>boost/geometry/algorithms/detail/overlay/pointlike_linear.hpp</label>
<link refid="pointlike__linear_8hpp"/>
<childnode refid="38192" relation="include">
</childnode>
<childnode refid="38296" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38249" relation="include">
</childnode>
<childnode refid="38340" relation="include">
</childnode>
<childnode refid="38472" relation="include">
</childnode>
<childnode refid="38334" relation="include">
</childnode>
<childnode refid="38298" relation="include">
</childnode>
<childnode refid="38173" relation="include">
</childnode>
<childnode refid="38425" relation="include">
</childnode>
<childnode refid="38295" relation="include">
</childnode>
<childnode refid="38285" relation="include">
</childnode>
<childnode refid="38485" relation="include">
</childnode>
<childnode refid="38235" relation="include">
</childnode>
<childnode refid="38324" relation="include">
</childnode>
<childnode refid="38470" relation="include">
</childnode>
</node>
<node id="38177">
<label>boost/range.hpp</label>
</node>
<node id="38350">
<label>boost/geometry/algorithms/detail/sections/section_functions.hpp</label>
<link refid="section__functions_8hpp"/>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38287" relation="include">
</childnode>
<childnode refid="38325" relation="include">
</childnode>
</node>
<node id="38404">
<label>boost/mpl/plus.hpp</label>
</node>
<node id="38382">
<label>boost/geometry/algorithms/area.hpp</label>
<link refid="algorithms_2area_8hpp"/>
<childnode refid="38145" relation="include">
</childnode>
<childnode refid="38126" relation="include">
</childnode>
<childnode refid="38383" relation="include">
</childnode>
<childnode refid="38128" relation="include">
</childnode>
<childnode refid="38179" relation="include">
</childnode>
<childnode refid="38180" relation="include">
</childnode>
<childnode refid="38147" relation="include">
</childnode>
<childnode refid="38214" relation="include">
</childnode>
<childnode refid="38167" relation="include">
</childnode>
<childnode refid="38169" relation="include">
</childnode>
<childnode refid="38137" relation="include">
</childnode>
<childnode refid="38153" relation="include">
</childnode>
<childnode refid="38139" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
<childnode refid="38384" relation="include">
</childnode>
<childnode refid="38385" relation="include">
</childnode>
<childnode refid="38386" relation="include">
</childnode>
<childnode refid="38387" relation="include">
</childnode>
<childnode refid="38388" relation="include">
</childnode>
<childnode refid="38389" relation="include">
</childnode>
<childnode refid="38239" relation="include">
</childnode>
<childnode refid="38390" relation="include">
</childnode>
<childnode refid="38223" relation="include">
</childnode>
<childnode refid="38229" relation="include">
</childnode>
</node>
<node id="38146">
<label>boost/concept/requires.hpp</label>
</node>
<node id="38469">
<label>boost/geometry/algorithms/detail/turns/debug_turn.hpp</label>
<link refid="debug__turn_8hpp"/>
</node>
<node id="38209">
<label>boost/mpl/front.hpp</label>
</node>
<node id="38122">
<label>/home/travis/build/boostorg/boost/boost/geometry/algorithms/difference.hpp</label>
<link refid="difference.hpp"/>
<childnode refid="38123" relation="include">
</childnode>
<childnode refid="38124" relation="include">
</childnode>
<childnode refid="38369" relation="include">
</childnode>
</node>
<node id="38379">
<label>boost/geometry/algorithms/reverse.hpp</label>
<link refid="reverse_8hpp"/>
<childnode refid="38123" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38136" relation="include">
</childnode>
<childnode refid="38179" relation="include">
</childnode>
<childnode refid="38180" relation="include">
</childnode>
<childnode refid="38147" relation="include">
</childnode>
<childnode refid="38206" relation="include">
</childnode>
<childnode refid="38380" relation="include">
</childnode>
<childnode refid="38169" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
</node>
<node id="38271">
<label>boost/geometry/policies/relate/intersection_points.hpp</label>
<link refid="intersection__points_8hpp"/>
<childnode refid="38123" relation="include">
</childnode>
<childnode refid="38272" relation="include">
</childnode>
<childnode refid="38221" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38204" relation="include">
</childnode>
<childnode refid="38273" relation="include">
</childnode>
</node>
<node id="38222">
<label>boost/geometry/algorithms/detail/convert_indexed_to_indexed.hpp</label>
<link refid="convert__indexed__to__indexed_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38176" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38156" relation="include">
</childnode>
<childnode refid="38152" relation="include">
</childnode>
</node>
<node id="38194">
<label>boost/core/addressof.hpp</label>
</node>
<node id="38206">
<label>boost/geometry/algorithms/detail/interior_iterator.hpp</label>
<link refid="interior__iterator_8hpp"/>
<childnode refid="38199" relation="include">
</childnode>
<childnode refid="38138" relation="include">
</childnode>
<childnode refid="38170" relation="include">
</childnode>
</node>
<node id="38387">
<label>boost/geometry/strategies/area.hpp</label>
<link refid="strategies_2area_8hpp"/>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38246" relation="include">
</childnode>
</node>
<node id="38338">
<label>boost/geometry/algorithms/detail/check_iterator_range.hpp</label>
<link refid="check__iterator__range_8hpp"/>
<childnode refid="38150" relation="include">
</childnode>
</node>
<node id="38187">
<label>boost/type_traits/is_fundamental.hpp</label>
</node>
<node id="38284">
<label>boost/geometry/strategies/cartesian/side_by_triangle.hpp</label>
<link refid="side__by__triangle_8hpp"/>
<childnode refid="38126" relation="include">
</childnode>
<childnode refid="38155" relation="include">
</childnode>
<childnode refid="38278" relation="include">
</childnode>
<childnode refid="38276" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38247" relation="include">
</childnode>
<childnode refid="38282" relation="include">
</childnode>
<childnode refid="38285" relation="include">
</childnode>
<childnode refid="38235" relation="include">
</childnode>
</node>
<node id="38458">
<label>boost/geometry/algorithms/detail/relate/linear_linear.hpp</label>
<link refid="relate_2linear__linear_8hpp"/>
<childnode refid="38123" relation="include">
</childnode>
<childnode refid="38150" relation="include">
</childnode>
<childnode refid="38202" relation="include">
</childnode>
<childnode refid="38204" relation="include">
</childnode>
<childnode refid="38330" relation="include">
</childnode>
<childnode refid="38191" relation="include">
</childnode>
<childnode refid="38459" relation="include">
</childnode>
<childnode refid="38460" relation="include">
</childnode>
<childnode refid="38455" relation="include">
</childnode>
<childnode refid="38445" relation="include">
</childnode>
<childnode refid="38419" relation="include">
</childnode>
<childnode refid="38461" relation="include">
</childnode>
<childnode refid="38462" relation="include">
</childnode>
</node>
<node id="38164">
<label>boost/geometry/geometries/concepts/multi_linestring_concept.hpp</label>
<link refid="multi__linestring__concept_8hpp"/>
<childnode refid="38145" relation="include">
</childnode>
<childnode refid="38159" relation="include">
</childnode>
<childnode refid="38128" relation="include">
</childnode>
<childnode refid="38158" relation="include">
</childnode>
</node>
<node id="38482">
<label>boost/geometry/algorithms/detail/disjoint/point_box.hpp</label>
<link refid="point__box_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38156" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38257" relation="include">
</childnode>
<childnode refid="38413" relation="include">
</childnode>
</node>
<node id="38383">
<label>boost/range/functions.hpp</label>
</node>
<node id="38456">
<label>boost/geometry/algorithms/detail/relate/topology_check.hpp</label>
<link refid="topology__check_8hpp"/>
<childnode refid="38191" relation="include">
</childnode>
<childnode refid="38235" relation="include">
</childnode>
<childnode refid="38304" relation="include">
</childnode>
<childnode refid="38457" relation="include">
</childnode>
</node>
<node id="38229">
<label>boost/geometry/views/reversible_view.hpp</label>
<link refid="reversible__view_8hpp"/>
<childnode refid="38230" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38231" relation="include">
</childnode>
<childnode refid="38139" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38228" relation="include">
</childnode>
</node>
<node id="38255">
<label>boost/geometry/util/normalize_spheroidal_box_coordinates.hpp</label>
<link refid="normalize__spheroidal__box__coordinates_8hpp"/>
<childnode refid="38204" relation="include">
</childnode>
<childnode refid="38239" relation="include">
</childnode>
<childnode refid="38254" relation="include">
</childnode>
</node>
<node id="38211">
<label>boost/geometry/core/tag_cast.hpp</label>
<link refid="tag__cast_8hpp"/>
<childnode refid="38126" relation="include">
</childnode>
<childnode refid="38212" relation="include">
</childnode>
</node>
<node id="38343">
<label>boost/geometry/iterators/dispatch/segment_iterator.hpp</label>
</node>
<node id="38301">
<label>boost/geometry/algorithms/detail/expand/implementation.hpp</label>
<link refid="expand_2implementation_8hpp"/>
<childnode refid="38302" relation="include">
</childnode>
<childnode refid="38307" relation="include">
</childnode>
<childnode refid="38318" relation="include">
</childnode>
</node>
<node id="38331">
<label>boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp</label>
<link refid="get__turn__info__la_8hpp"/>
<childnode refid="38204" relation="include">
</childnode>
<childnode refid="38330" relation="include">
</childnode>
<childnode refid="38319" relation="include">
</childnode>
<childnode refid="38329" relation="include">
</childnode>
</node>
<node id="38305">
<label>boost/geometry/algorithms/detail/envelope/transform_units.hpp</label>
<link refid="transform__units_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38244" relation="include">
</childnode>
<childnode refid="38256" relation="include">
</childnode>
<childnode refid="38306" relation="include">
</childnode>
<childnode refid="38173" relation="include">
</childnode>
<childnode refid="38251" relation="include">
</childnode>
</node>
<node id="38416">
<label>boost/geometry/views/detail/points_view.hpp</label>
</node>
<node id="38166">
<label>boost/geometry/geometries/concepts/polygon_concept.hpp</label>
<link refid="polygon__concept_8hpp"/>
<childnode refid="38145" relation="include">
</childnode>
<childnode refid="38159" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38167" relation="include">
</childnode>
<childnode refid="38169" relation="include">
</childnode>
<childnode refid="38153" relation="include">
</childnode>
<childnode refid="38139" relation="include">
</childnode>
<childnode refid="38161" relation="include">
</childnode>
<childnode refid="38171" relation="include">
</childnode>
</node>
<node id="38447">
<label>boost/mpl/deref.hpp</label>
</node>
<node id="38296">
<label>vector</label>
</node>
<node id="38417">
<label>boost/geometry/views/detail/boundary_view.hpp</label>
</node>
<node id="38247">
<label>boost/geometry/util/select_coordinate_type.hpp</label>
<link refid="select__coordinate__type_8hpp"/>
<childnode refid="38152" relation="include">
</childnode>
<childnode refid="38185" relation="include">
</childnode>
</node>
<node id="38234">
<label>boost/geometry/algorithms/assign.hpp</label>
<link refid="assign_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38146" relation="include">
</childnode>
<childnode refid="38145" relation="include">
</childnode>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38126" relation="include">
</childnode>
<childnode refid="38219" relation="include">
</childnode>
<childnode refid="38176" relation="include">
</childnode>
<childnode refid="38179" relation="include">
</childnode>
<childnode refid="38180" relation="include">
</childnode>
<childnode refid="38147" relation="include">
</childnode>
<childnode refid="38220" relation="include">
</childnode>
<childnode refid="38221" relation="include">
</childnode>
<childnode refid="38218" relation="include">
</childnode>
<childnode refid="38175" relation="include">
</childnode>
<childnode refid="38188" relation="include">
</childnode>
<childnode refid="38210" relation="include">
</childnode>
<childnode refid="38181" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38167" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
<childnode refid="38184" relation="include">
</childnode>
</node>
<node id="38184">
<label>boost/geometry/util/for_each_coordinate.hpp</label>
<link refid="for__each__coordinate_8hpp"/>
<childnode refid="38146" relation="include">
</childnode>
<childnode refid="38161" relation="include">
</childnode>
<childnode refid="38168" relation="include">
</childnode>
</node>
<node id="38329">
<label>boost/geometry/algorithms/detail/overlay/get_turn_info_for_endpoint.hpp</label>
<link refid="get__turn__info__for__endpoint_8hpp"/>
<childnode refid="38204" relation="include">
</childnode>
<childnode refid="38319" relation="include">
</childnode>
<childnode refid="38327" relation="include">
</childnode>
</node>
<node id="38330">
<label>boost/geometry/util/condition.hpp</label>
<link refid="condition_8hpp"/>
<childnode refid="38193" relation="include">
</childnode>
</node>
<node id="38460">
<label>boost/geometry/algorithms/detail/single_geometry.hpp</label>
<link refid="single__geometry_8hpp"/>
<childnode refid="38126" relation="include">
</childnode>
<childnode refid="38212" relation="include">
</childnode>
<childnode refid="38204" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
<childnode refid="38191" relation="include">
</childnode>
</node>
<node id="38402">
<label>boost/function_types/parameter_types.hpp</label>
</node>
<node id="38400">
<label>boost/function_types/function_arity.hpp</label>
</node>
<node id="38142">
<label>boost/geometry/core/geometry_id.hpp</label>
<link refid="geometry__id_8hpp"/>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38143" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
</node>
<node id="38143">
<label>boost/mpl/int.hpp</label>
</node>
<node id="38475">
<label>boost/geometry/algorithms/detail/disjoint/areal_areal.hpp</label>
<link refid="disjoint_2areal__areal_8hpp"/>
<childnode refid="38153" relation="include">
</childnode>
<childnode refid="38412" relation="include">
</childnode>
<childnode refid="38476" relation="include">
</childnode>
<childnode refid="38233" relation="include">
</childnode>
<childnode refid="38478" relation="include">
</childnode>
</node>
<node id="38153">
<label>boost/geometry/core/point_type.hpp</label>
<link refid="point__type_8hpp"/>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38138" relation="include">
</childnode>
<childnode refid="38134" relation="include">
</childnode>
<childnode refid="38139" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38133" relation="include">
</childnode>
</node>
<node id="38203">
<label>boost/type_traits/is_convertible.hpp</label>
</node>
<node id="38274">
<label>utility</label>
</node>
<node id="38440">
<label>boost/geometry/algorithms/detail/relate/interface.hpp</label>
<link refid="relate_2interface_8hpp"/>
<childnode refid="38237" relation="include">
</childnode>
<childnode refid="38179" relation="include">
</childnode>
<childnode refid="38180" relation="include">
</childnode>
<childnode refid="38147" relation="include">
</childnode>
<childnode refid="38156" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38441" relation="include">
</childnode>
<childnode refid="38442" relation="include">
</childnode>
<childnode refid="38173" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
<childnode refid="38252" relation="include">
</childnode>
</node>
<node id="38340">
<label>boost/geometry/iterators/segment_iterator.hpp</label>
<link refid="segment__iterator_8hpp"/>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38203" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38167" relation="include">
</childnode>
<childnode refid="38169" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38341" relation="include">
</childnode>
<childnode refid="38342" relation="include">
</childnode>
<childnode refid="38343" relation="include">
</childnode>
</node>
<node id="38180">
<label>boost/variant/static_visitor.hpp</label>
</node>
<node id="38165">
<label>boost/geometry/geometries/concepts/multi_polygon_concept.hpp</label>
<link refid="multi__polygon__concept_8hpp"/>
<childnode refid="38145" relation="include">
</childnode>
<childnode refid="38159" relation="include">
</childnode>
<childnode refid="38128" relation="include">
</childnode>
<childnode refid="38166" relation="include">
</childnode>
</node>
<node id="38481">
<label>boost/geometry/algorithms/detail/disjoint/linear_segment_or_box.hpp</label>
<link refid="linear__segment__or__box_8hpp"/>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38191" relation="include">
</childnode>
<childnode refid="38214" relation="include">
</childnode>
<childnode refid="38216" relation="include">
</childnode>
<childnode refid="38173" relation="include">
</childnode>
<childnode refid="38223" relation="include">
</childnode>
<childnode refid="38480" relation="include">
</childnode>
<childnode refid="38257" relation="include">
</childnode>
</node>
<node id="38393">
<label>boost/geometry/algorithms/detail/overlay/get_ring.hpp</label>
<link refid="get__ring_8hpp"/>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38204" relation="include">
</childnode>
<childnode refid="38167" relation="include">
</childnode>
<childnode refid="38169" relation="include">
</childnode>
<childnode refid="38139" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38348" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
<childnode refid="38191" relation="include">
</childnode>
</node>
<node id="38249">
<label>boost/geometry/geometries/box.hpp</label>
<link refid="geometries_2box_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38217" relation="include">
</childnode>
<childnode refid="38193" relation="include">
</childnode>
<childnode refid="38175" relation="include">
</childnode>
<childnode refid="38161" relation="include">
</childnode>
</node>
<node id="38174">
<label>boost/mpl/identity.hpp</label>
</node>
<node id="38388">
<label>boost/geometry/strategies/default_area_result.hpp</label>
<link refid="default__area__result_8hpp"/>
<childnode refid="38232" relation="include">
</childnode>
<childnode refid="38152" relation="include">
</childnode>
<childnode refid="38387" relation="include">
</childnode>
<childnode refid="38185" relation="include">
</childnode>
</node>
<node id="38183">
<label>boost/call_traits.hpp</label>
</node>
<node id="38138">
<label>boost/range/value_type.hpp</label>
</node>
<node id="38156">
<label>boost/geometry/core/coordinate_dimension.hpp</label>
<link refid="coordinate__dimension_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38157" relation="include">
</childnode>
<childnode refid="38153" relation="include">
</childnode>
<childnode refid="38133" relation="include">
</childnode>
</node>
<node id="38172">
<label>boost/geometry/geometries/concepts/segment_concept.hpp</label>
<link refid="segment__concept_8hpp"/>
<childnode refid="38145" relation="include">
</childnode>
<childnode refid="38161" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38153" relation="include">
</childnode>
</node>
<node id="38227">
<label>boost/iterator/iterator_categories.hpp</label>
</node>
<node id="38478">
<label>boost/geometry/algorithms/detail/disjoint/linear_linear.hpp</label>
<link refid="disjoint_2linear__linear_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38352" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38191" relation="include">
</childnode>
<childnode refid="38153" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38320" relation="include">
</childnode>
<childnode refid="38261" relation="include">
</childnode>
<childnode refid="38358" relation="include">
</childnode>
<childnode refid="38368" relation="include">
</childnode>
<childnode refid="38327" relation="include">
</childnode>
<childnode refid="38293" relation="include">
</childnode>
<childnode refid="38257" relation="include">
</childnode>
</node>
<node id="38401">
<label>boost/function_types/is_member_function_pointer.hpp</label>
</node>
<node id="38225">
<label>boost/iterator.hpp</label>
</node>
<node id="38325">
<label>boost/geometry/policies/robustness/robust_point_type.hpp</label>
</node>
<node id="38279">
<label>boost/geometry/policies/relate/tupled.hpp</label>
<link refid="tupled_8hpp"/>
<childnode refid="38272" relation="include">
</childnode>
<childnode refid="38280" relation="include">
</childnode>
<childnode refid="38273" relation="include">
</childnode>
</node>
<node id="38448">
<label>boost/mpl/end.hpp</label>
</node>
<node id="38428">
<label>boost/mpl/greater.hpp</label>
</node>
<node id="38412">
<label>boost/geometry/algorithms/covered_by.hpp</label>
<link refid="algorithms_2covered__by_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38179" relation="include">
</childnode>
<childnode refid="38180" relation="include">
</childnode>
<childnode refid="38147" relation="include">
</childnode>
<childnode refid="38173" relation="include">
</childnode>
<childnode refid="38395" relation="include">
</childnode>
<childnode refid="38413" relation="include">
</childnode>
<childnode refid="38414" relation="include">
</childnode>
<childnode refid="38252" relation="include">
</childnode>
</node>
<node id="38141">
<label>boost/geometry/core/reverse_dispatch.hpp</label>
<link refid="reverse__dispatch_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38126" relation="include">
</childnode>
<childnode refid="38130" relation="include">
</childnode>
<childnode refid="38142" relation="include">
</childnode>
</node>
<node id="38188">
<label>boost/geometry/algorithms/append.hpp</label>
<link refid="append_8hpp"/>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38179" relation="include">
</childnode>
<childnode refid="38180" relation="include">
</childnode>
<childnode refid="38147" relation="include">
</childnode>
<childnode refid="38189" relation="include">
</childnode>
<childnode refid="38207" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38160" relation="include">
</childnode>
<childnode refid="38153" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
<childnode refid="38208" relation="include">
</childnode>
<childnode refid="38191" relation="include">
</childnode>
</node>
<node id="38251">
<label>boost/geometry/algorithms/transform.hpp</label>
<link refid="algorithms_2transform_8hpp"/>
<childnode refid="38240" relation="include">
</childnode>
<childnode refid="38192" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38136" relation="include">
</childnode>
<childnode refid="38179" relation="include">
</childnode>
<childnode refid="38180" relation="include">
</childnode>
<childnode refid="38147" relation="include">
</childnode>
<childnode refid="38234" relation="include">
</childnode>
<childnode refid="38210" relation="include">
</childnode>
<childnode refid="38206" relation="include">
</childnode>
<childnode refid="38189" relation="include">
</childnode>
<childnode refid="38232" relation="include">
</childnode>
<childnode refid="38167" relation="include">
</childnode>
<childnode refid="38169" relation="include">
</childnode>
<childnode refid="38160" relation="include">
</childnode>
<childnode refid="38139" relation="include">
</childnode>
<childnode refid="38211" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
<childnode refid="38252" relation="include">
</childnode>
<childnode refid="38245" relation="include">
</childnode>
</node>
<node id="38210">
<label>boost/geometry/algorithms/clear.hpp</label>
<link refid="clear_8hpp"/>
<childnode refid="38134" relation="include">
</childnode>
<childnode refid="38179" relation="include">
</childnode>
<childnode refid="38180" relation="include">
</childnode>
<childnode refid="38147" relation="include">
</childnode>
<childnode refid="38173" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38167" relation="include">
</childnode>
<childnode refid="38169" relation="include">
</childnode>
<childnode refid="38160" relation="include">
</childnode>
<childnode refid="38211" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
</node>
<node id="38429">
<label>boost/mpl/insert.hpp</label>
</node>
<node id="38390">
<label>boost/geometry/util/order_as_direction.hpp</label>
<link refid="order__as__direction_8hpp"/>
<childnode refid="38137" relation="include">
</childnode>
<childnode refid="38229" relation="include">
</childnode>
</node>
<node id="38472">
<label>boost/geometry/algorithms/disjoint.hpp</label>
<link refid="disjoint_8hpp"/>
<childnode refid="38473" relation="include">
</childnode>
<childnode refid="38474" relation="include">
</childnode>
</node>
<node id="38405">
<label>boost/geometry/strategies/within.hpp</label>
<link refid="strategies_2within_8hpp"/>
<childnode refid="38127" relation="include">
</childnode>
</node>
<node id="38207">
<label>boost/geometry/algorithms/detail/convert_point_to_point.hpp</label>
<link refid="convert__point__to__point_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38176" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38156" relation="include">
</childnode>
<childnode refid="38152" relation="include">
</childnode>
</node>
<node id="38361">
<label>boost/geometry/algorithms/detail/overlay/less_by_segment_ratio.hpp</label>
<link refid="less__by__segment__ratio_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38123" relation="include">
</childnode>
<childnode refid="38262" relation="include">
</childnode>
<childnode refid="38354" relation="include">
</childnode>
<childnode refid="38296" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38356" relation="include">
</childnode>
<childnode refid="38359" relation="include">
</childnode>
<childnode refid="38282" relation="include">
</childnode>
</node>
<node id="38466">
<label>boost/mpl/or.hpp</label>
</node>
<node id="38264">
<label>boost/mpl/vector_c.hpp</label>
</node>
<node id="38253">
<label>boost/geometry/algorithms/detail/normalize.hpp</label>
<link refid="normalize_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38176" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38162" relation="include">
</childnode>
<childnode refid="38152" relation="include">
</childnode>
<childnode refid="38232" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38254" relation="include">
</childnode>
<childnode refid="38255" relation="include">
</childnode>
<childnode refid="38256" relation="include">
</childnode>
</node>
<node id="38252">
<label>boost/geometry/strategies/default_strategy.hpp</label>
<link refid="default__strategy_8hpp"/>
</node>
<node id="38171">
<label>boost/geometry/geometries/concepts/ring_concept.hpp</label>
<link refid="ring__concept_8hpp"/>
<childnode refid="38145" relation="include">
</childnode>
<childnode refid="38159" relation="include">
</childnode>
<childnode refid="38134" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38160" relation="include">
</childnode>
<childnode refid="38153" relation="include">
</childnode>
<childnode refid="38161" relation="include">
</childnode>
</node>
<node id="38377">
<label>boost/geometry/algorithms/detail/overlay/traversal_info.hpp</label>
<link refid="traversal__info_8hpp"/>
<childnode refid="38320" relation="include">
</childnode>
<childnode refid="38363" relation="include">
</childnode>
<childnode refid="38378" relation="include">
</childnode>
<childnode refid="38321" relation="include">
</childnode>
</node>
<node id="38474">
<label>boost/geometry/algorithms/detail/disjoint/implementation.hpp</label>
<link refid="disjoint_2implementation_8hpp"/>
<childnode refid="38475" relation="include">
</childnode>
<childnode refid="38479" relation="include">
</childnode>
<childnode refid="38478" relation="include">
</childnode>
<childnode refid="38485" relation="include">
</childnode>
<childnode refid="38486" relation="include">
</childnode>
<childnode refid="38236" relation="include">
</childnode>
<childnode refid="38482" relation="include">
</childnode>
<childnode refid="38294" relation="include">
</childnode>
<childnode refid="38483" relation="include">
</childnode>
<childnode refid="38481" relation="include">
</childnode>
</node>
<node id="38366">
<label>boost/geometry/algorithms/detail/has_self_intersections.hpp</label>
<link refid="has__self__intersections_8hpp"/>
<childnode refid="38352" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38153" relation="include">
</childnode>
<childnode refid="38320" relation="include">
</childnode>
<childnode refid="38261" relation="include">
</childnode>
<childnode refid="38367" relation="include">
</childnode>
<childnode refid="38368" relation="include">
</childnode>
<childnode refid="38325" relation="include">
</childnode>
<childnode refid="38293" relation="include">
</childnode>
<childnode refid="38369" relation="include">
</childnode>
</node>
<node id="38181">
<label>boost/geometry/arithmetic/arithmetic.hpp</label>
<link refid="arithmetic_8hpp"/>
<childnode refid="38182" relation="include">
</childnode>
<childnode refid="38183" relation="include">
</childnode>
<childnode refid="38146" relation="include">
</childnode>
<childnode refid="38152" relation="include">
</childnode>
<childnode refid="38161" relation="include">
</childnode>
<childnode refid="38184" relation="include">
</childnode>
<childnode refid="38185" relation="include">
</childnode>
</node>
<node id="38335">
<label>boost/geometry/algorithms/detail/envelope/interface.hpp</label>
<link refid="envelope_2interface_8hpp"/>
<childnode refid="38179" relation="include">
</childnode>
<childnode refid="38180" relation="include">
</childnode>
<childnode refid="38147" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
<childnode refid="38309" relation="include">
</childnode>
</node>
<node id="38245">
<label>boost/geometry/strategies/transform.hpp</label>
<link refid="strategies_2transform_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38246" relation="include">
</childnode>
</node>
<node id="38356">
<label>boost/geometry/algorithms/detail/overlay/copy_segment_point.hpp</label>
<link refid="copy__segment__point_8hpp"/>
<childnode refid="38263" relation="include">
</childnode>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38204" relation="include">
</childnode>
<childnode refid="38139" relation="include">
</childnode>
<childnode refid="38167" relation="include">
</childnode>
<childnode refid="38169" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38175" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
<childnode refid="38191" relation="include">
</childnode>
<childnode refid="38266" relation="include">
</childnode>
<childnode refid="38223" relation="include">
</childnode>
<childnode refid="38229" relation="include">
</childnode>
</node>
<node id="38235">
<label>boost/geometry/algorithms/detail/equals/point_point.hpp</label>
<link refid="equals_2point__point_8hpp"/>
<childnode refid="38236" relation="include">
</childnode>
</node>
<node id="38169">
<label>boost/geometry/core/interior_rings.hpp</label>
<link refid="interior__rings_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38138" relation="include">
</childnode>
<childnode refid="38134" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38170" relation="include">
</childnode>
</node>
<node id="38480">
<label>boost/geometry/algorithms/detail/disjoint/multirange_geometry.hpp</label>
<link refid="multirange__geometry_8hpp"/>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38338" relation="include">
</childnode>
<childnode refid="38257" relation="include">
</childnode>
</node>
<node id="38318">
<label>boost/geometry/algorithms/detail/expand/box.hpp</label>
<link refid="algorithms_2detail_2expand_2box_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38123" relation="include">
</childnode>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38237" relation="include">
</childnode>
<childnode refid="38156" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38308" relation="include">
</childnode>
<childnode refid="38310" relation="include">
</childnode>
<childnode refid="38315" relation="include">
</childnode>
<childnode refid="38300" relation="include">
</childnode>
</node>
<node id="38125">
<label>cstddef</label>
</node>
<node id="38362">
<label>boost/geometry/policies/robustness/robust_type.hpp</label>
</node>
<node id="38459">
<label>boost/geometry/algorithms/detail/sub_range.hpp</label>
<link refid="sub__range_8hpp"/>
<childnode refid="38126" relation="include">
</childnode>
<childnode refid="38204" relation="include">
</childnode>
<childnode refid="38191" relation="include">
</childnode>
</node>
<node id="38139">
<label>boost/geometry/core/ring_type.hpp</label>
<link refid="ring__type_8hpp"/>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38126" relation="include">
</childnode>
<childnode refid="38138" relation="include">
</childnode>
<childnode refid="38140" relation="include">
</childnode>
<childnode refid="38134" relation="include">
</childnode>
<childnode refid="38136" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
</node>
<node id="38155">
<label>boost/type_traits/is_integral.hpp</label>
</node>
<node id="38352">
<label>deque</label>
</node>
<node id="38167">
<label>boost/geometry/core/exterior_ring.hpp</label>
<link refid="exterior__ring_8hpp"/>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38140" relation="include">
</childnode>
<childnode refid="38134" relation="include">
</childnode>
<childnode refid="38139" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38168" relation="include">
</childnode>
</node>
<node id="38277">
<label>boost/geometry/util/select_calculation_type.hpp</label>
<link refid="select__calculation__type_8hpp"/>
<childnode refid="38126" relation="include">
</childnode>
<childnode refid="38278" relation="include">
</childnode>
<childnode refid="38247" relation="include">
</childnode>
</node>
<node id="38309">
<label>boost/geometry/algorithms/dispatch/envelope.hpp</label>
</node>
<node id="38186">
<label>boost/type_traits/is_floating_point.hpp</label>
</node>
<node id="38219">
<label>boost/numeric/conversion/bounds.hpp</label>
</node>
<node id="38310">
<label>boost/geometry/algorithms/detail/envelope/range_of_boxes.hpp</label>
<link refid="range__of__boxes_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38123" relation="include">
</childnode>
<childnode refid="38296" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38204" relation="include">
</childnode>
<childnode refid="38162" relation="include">
</childnode>
<childnode refid="38152" relation="include">
</childnode>
<childnode refid="38239" relation="include">
</childnode>
<childnode refid="38191" relation="include">
</childnode>
<childnode refid="38207" relation="include">
</childnode>
<childnode refid="38311" relation="include">
</childnode>
<childnode refid="38315" relation="include">
</childnode>
</node>
<node id="38294">
<label>boost/geometry/algorithms/detail/disjoint/box_box.hpp</label>
<link refid="disjoint_2box__box_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38257" relation="include">
</childnode>
<childnode refid="38254" relation="include">
</childnode>
<childnode refid="38185" relation="include">
</childnode>
</node>
<node id="38406">
<label>boost/geometry/algorithms/detail/within/point_in_geometry.hpp</label>
<link refid="point__in__geometry_8hpp"/>
<childnode refid="38150" relation="include">
</childnode>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38237" relation="include">
</childnode>
<childnode refid="38136" relation="include">
</childnode>
<childnode refid="38204" relation="include">
</childnode>
<childnode refid="38235" relation="include">
</childnode>
<childnode refid="38206" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
<childnode refid="38397" relation="include">
</childnode>
<childnode refid="38252" relation="include">
</childnode>
<childnode refid="38405" relation="include">
</childnode>
<childnode refid="38407" relation="include">
</childnode>
<childnode refid="38191" relation="include">
</childnode>
<childnode refid="38408" relation="include">
</childnode>
</node>
<node id="38468">
<label>boost/geometry/algorithms/detail/overlay/inconsistent_turns_exception.hpp</label>
<link refid="inconsistent__turns__exception_8hpp"/>
<childnode refid="38450" relation="include">
</childnode>
</node>
<node id="38228">
<label>boost/geometry/views/identity_view.hpp</label>
<link refid="identity__view_8hpp"/>
<childnode refid="38177" relation="include">
</childnode>
</node>
<node id="38345">
<label>boost/geometry/algorithms/detail/envelope/initialize.hpp</label>
<link refid="initialize_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38219" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38156" relation="include">
</childnode>
<childnode refid="38152" relation="include">
</childnode>
</node>
<node id="38359">
<label>boost/geometry/algorithms/detail/overlay/sort_by_side.hpp</label>
<link refid="sort__by__side_8hpp"/>
<childnode refid="38123" relation="include">
</childnode>
<childnode refid="38296" relation="include">
</childnode>
<childnode refid="38360" relation="include">
</childnode>
<childnode refid="38320" relation="include">
</childnode>
<childnode refid="38282" relation="include">
</childnode>
</node>
<node id="38217">
<label>boost/concept/assert.hpp</label>
</node>
<node id="38395">
<label>boost/geometry/algorithms/within.hpp</label>
<link refid="algorithms_2within_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38145" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38179" relation="include">
</childnode>
<childnode refid="38180" relation="include">
</childnode>
<childnode refid="38147" relation="include">
</childnode>
<childnode refid="38396" relation="include">
</childnode>
<childnode refid="38173" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38214" relation="include">
</childnode>
<childnode refid="38232" relation="include">
</childnode>
<childnode refid="38167" relation="include">
</childnode>
<childnode refid="38169" relation="include">
</childnode>
<childnode refid="38137" relation="include">
</childnode>
<childnode refid="38139" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
<childnode refid="38397" relation="include">
</childnode>
<childnode refid="38252" relation="include">
</childnode>
<childnode refid="38405" relation="include">
</childnode>
<childnode refid="38239" relation="include">
</childnode>
<childnode refid="38390" relation="include">
</childnode>
<childnode refid="38223" relation="include">
</childnode>
<childnode refid="38229" relation="include">
</childnode>
<childnode refid="38406" relation="include">
</childnode>
<childnode refid="38261" relation="include">
</childnode>
<childnode refid="38358" relation="include">
</childnode>
<childnode refid="38352" relation="include">
</childnode>
</node>
<node id="38386">
<label>boost/geometry/algorithms/detail/multi_sum.hpp</label>
<link refid="multi__sum_8hpp"/>
<childnode refid="38177" relation="include">
</childnode>
</node>
<node id="38315">
<label>boost/geometry/algorithms/detail/expand/indexed.hpp</label>
<link refid="indexed_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38247" relation="include">
</childnode>
<childnode refid="38303" relation="include">
</childnode>
<childnode refid="38304" relation="include">
</childnode>
<childnode refid="38300" relation="include">
</childnode>
</node>
<node id="38439">
<label>boost/geometry/algorithms/relate.hpp</label>
<link refid="algorithms_2relate_8hpp"/>
<childnode refid="38440" relation="include">
</childnode>
<childnode refid="38453" relation="include">
</childnode>
</node>
<node id="38218">
<label>boost/geometry/algorithms/detail/assign_values.hpp</label>
<link refid="assign__values_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38146" relation="include">
</childnode>
<childnode refid="38145" relation="include">
</childnode>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38126" relation="include">
</childnode>
<childnode refid="38219" relation="include">
</childnode>
<childnode refid="38176" relation="include">
</childnode>
<childnode refid="38181" relation="include">
</childnode>
<childnode refid="38188" relation="include">
</childnode>
<childnode refid="38210" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38167" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
<childnode refid="38184" relation="include">
</childnode>
</node>
<node id="38193">
<label>boost/config.hpp</label>
</node>
<node id="38477">
<label>boost/geometry/views/box_view.hpp</label>
<link refid="box__view_8hpp"/>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38153" relation="include">
</childnode>
<childnode refid="38416" relation="include">
</childnode>
<childnode refid="38234" relation="include">
</childnode>
</node>
<node id="38408">
<label>boost/geometry/views/detail/normalized_view.hpp</label>
</node>
<node id="38238">
<label>boost/geometry/core/radian_access.hpp</label>
<link refid="radian__access_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38176" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38232" relation="include">
</childnode>
<childnode refid="38152" relation="include">
</childnode>
<childnode refid="38239" relation="include">
</childnode>
</node>
<node id="38160">
<label>boost/geometry/core/mutable_range.hpp</label>
<link refid="mutable__range_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38138" relation="include">
</childnode>
<childnode refid="38136" relation="include">
</childnode>
</node>
<node id="38358">
<label>boost/geometry/algorithms/detail/overlay/do_reverse.hpp</label>
<link refid="do__reverse_8hpp"/>
<childnode refid="38137" relation="include">
</childnode>
</node>
<node id="38295">
<label>boost/geometry/algorithms/detail/partition.hpp</label>
<link refid="partition_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38296" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38152" relation="include">
</childnode>
<childnode refid="38234" relation="include">
</childnode>
</node>
<node id="38144">
<label>boost/geometry/geometries/concepts/check.hpp</label>
<link refid="check_8hpp"/>
<childnode refid="38145" relation="include">
</childnode>
<childnode refid="38146" relation="include">
</childnode>
<childnode refid="38140" relation="include">
</childnode>
<childnode refid="38147" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38148" relation="include">
</childnode>
<childnode refid="38158" relation="include">
</childnode>
<childnode refid="38163" relation="include">
</childnode>
<childnode refid="38164" relation="include">
</childnode>
<childnode refid="38165" relation="include">
</childnode>
<childnode refid="38161" relation="include">
</childnode>
<childnode refid="38166" relation="include">
</childnode>
<childnode refid="38171" relation="include">
</childnode>
<childnode refid="38172" relation="include">
</childnode>
<childnode refid="38173" relation="include">
</childnode>
</node>
<node id="38221">
<label>boost/geometry/algorithms/detail/assign_indexed_point.hpp</label>
<link refid="assign__indexed__point_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
<childnode refid="38218" relation="include">
</childnode>
</node>
<node id="38349">
<label>boost/geometry/algorithms/detail/expand_by_epsilon.hpp</label>
<link refid="expand__by__epsilon_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38123" relation="include">
</childnode>
<childnode refid="38186" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38156" relation="include">
</childnode>
<childnode refid="38152" relation="include">
</childnode>
<childnode refid="38239" relation="include">
</childnode>
<childnode refid="38256" relation="include">
</childnode>
</node>
<node id="38307">
<label>boost/geometry/algorithms/detail/expand/segment.hpp</label>
<link refid="algorithms_2detail_2expand_2segment_8hpp"/>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38237" relation="include">
</childnode>
<childnode refid="38156" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38308" relation="include">
</childnode>
<childnode refid="38310" relation="include">
</childnode>
<childnode refid="38316" relation="include">
</childnode>
<childnode refid="38315" relation="include">
</childnode>
<childnode refid="38300" relation="include">
</childnode>
</node>
<node id="38381">
<label>boost/geometry/algorithms/detail/overlay/add_rings.hpp</label>
<link refid="add__rings_8hpp"/>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38214" relation="include">
</childnode>
<childnode refid="38382" relation="include">
</childnode>
<childnode refid="38391" relation="include">
</childnode>
<childnode refid="38393" relation="include">
</childnode>
</node>
<node id="38263">
<label>boost/array.hpp</label>
</node>
<node id="38446">
<label>boost/mpl/begin.hpp</label>
</node>
<node id="38467">
<label>boost/geometry/algorithms/detail/overlay/follow_linear_linear.hpp</label>
<link refid="follow__linear__linear_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38123" relation="include">
</childnode>
<childnode refid="38192" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38204" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38371" relation="include">
</childnode>
<childnode refid="38411" relation="include">
</childnode>
<childnode refid="38468" relation="include">
</childnode>
<childnode refid="38324" relation="include">
</childnode>
<childnode refid="38321" relation="include">
</childnode>
<childnode refid="38320" relation="include">
</childnode>
<childnode refid="38469" relation="include">
</childnode>
<childnode refid="38175" relation="include">
</childnode>
<childnode refid="38173" relation="include">
</childnode>
</node>
<node id="38355">
<label>boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp</label>
<link refid="enrich__intersection__points_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38123" relation="include">
</childnode>
<childnode refid="38262" relation="include">
</childnode>
<childnode refid="38354" relation="include">
</childnode>
<childnode refid="38296" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38266" relation="include">
</childnode>
<childnode refid="38348" relation="include">
</childnode>
<childnode refid="38356" relation="include">
</childnode>
<childnode refid="38357" relation="include">
</childnode>
<childnode refid="38361" relation="include">
</childnode>
<childnode refid="38324" relation="include">
</childnode>
<childnode refid="38359" relation="include">
</childnode>
<childnode refid="38362" relation="include">
</childnode>
<childnode refid="38282" relation="include">
</childnode>
</node>
<node id="38289">
<label>boost/geometry/arithmetic/dot_product.hpp</label>
<link refid="dot__product_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38146" relation="include">
</childnode>
<childnode refid="38161" relation="include">
</childnode>
<childnode refid="38247" relation="include">
</childnode>
</node>
<node id="38353">
<label>boost/geometry/algorithms/detail/overlay/cluster_info.hpp</label>
<link refid="cluster__info_8hpp"/>
<childnode refid="38354" relation="include">
</childnode>
<childnode refid="38322" relation="include">
</childnode>
</node>
<node id="38337">
<label>boost/geometry/algorithms/is_empty.hpp</label>
<link refid="is__empty_8hpp"/>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38179" relation="include">
</childnode>
<childnode refid="38180" relation="include">
</childnode>
<childnode refid="38147" relation="include">
</childnode>
<childnode refid="38167" relation="include">
</childnode>
<childnode refid="38169" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38173" relation="include">
</childnode>
<childnode refid="38338" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
</node>
<node id="38437">
<label>boost/geometry/util/transform_variant.hpp</label>
<link refid="transform__variant_8hpp"/>
<childnode refid="38432" relation="include">
</childnode>
<childnode refid="38147" relation="include">
</childnode>
</node>
<node id="38212">
<label>boost/type_traits/is_base_of.hpp</label>
</node>
<node id="38415">
<label>boost/geometry/views/segment_view.hpp</label>
<link refid="segment__view_8hpp"/>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38153" relation="include">
</childnode>
<childnode refid="38416" relation="include">
</childnode>
<childnode refid="38234" relation="include">
</childnode>
</node>
<node id="38285">
<label>boost/geometry/algorithms/detail/relate/less.hpp</label>
<link refid="less_8hpp"/>
<childnode refid="38156" relation="include">
</childnode>
<childnode refid="38152" relation="include">
</childnode>
<childnode refid="38239" relation="include">
</childnode>
</node>
<node id="38231">
<label>boost/range/adaptor/reversed.hpp</label>
</node>
<node id="38131">
<label>boost/geometry/core/tag.hpp</label>
<link refid="tag_8hpp"/>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38133" relation="include">
</childnode>
</node>
<node id="38354">
<label>set</label>
</node>
<node id="38443">
<label>boost/mpl/is_sequence.hpp</label>
</node>
<node id="38484">
<label>boost/geometry/util/calculation_type.hpp</label>
<link refid="calculation__type_8hpp"/>
<childnode refid="38193" relation="include">
</childnode>
<childnode refid="38126" relation="include">
</childnode>
<childnode refid="38186" relation="include">
</childnode>
<childnode refid="38187" relation="include">
</childnode>
<childnode refid="38278" relation="include">
</childnode>
<childnode refid="38247" relation="include">
</childnode>
<childnode refid="38185" relation="include">
</childnode>
</node>
<node id="38473">
<label>boost/geometry/algorithms/detail/disjoint/interface.hpp</label>
<link refid="disjoint_2interface_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38179" relation="include">
</childnode>
<childnode refid="38180" relation="include">
</childnode>
<childnode refid="38147" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
<childnode refid="38257" relation="include">
</childnode>
</node>
<node id="38202">
<label>boost/range/size.hpp</label>
</node>
<node id="38232">
<label>boost/geometry/core/cs.hpp</label>
<link refid="cs_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38130" relation="include">
</childnode>
<childnode refid="38162" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
</node>
<node id="38223">
<label>boost/geometry/views/closeable_view.hpp</label>
<link refid="closeable__view_8hpp"/>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38214" relation="include">
</childnode>
<childnode refid="38139" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38224" relation="include">
</childnode>
<childnode refid="38228" relation="include">
</childnode>
</node>
<node id="38374">
<label>boost/geometry/algorithms/detail/overlay/traversal.hpp</label>
<link refid="traversal_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38359" relation="include">
</childnode>
<childnode refid="38320" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38204" relation="include">
</childnode>
</node>
<node id="38133">
<label>boost/geometry/util/bare_type.hpp</label>
<link refid="bare__type_8hpp"/>
<childnode refid="38134" relation="include">
</childnode>
<childnode refid="38135" relation="include">
</childnode>
<childnode refid="38136" relation="include">
</childnode>
</node>
<node id="38426">
<label>boost/geometry/algorithms/length.hpp</label>
<link refid="length_8hpp"/>
<childnode refid="38192" relation="include">
</childnode>
<childnode refid="38145" relation="include">
</childnode>
<childnode refid="38150" relation="include">
</childnode>
<childnode refid="38427" relation="include">
</childnode>
<childnode refid="38428" relation="include">
</childnode>
<childnode refid="38126" relation="include">
</childnode>
<childnode refid="38429" relation="include">
</childnode>
<childnode refid="38143" relation="include">
</childnode>
<childnode refid="38430" relation="include">
</childnode>
<childnode refid="38431" relation="include">
</childnode>
<childnode refid="38432" relation="include">
</childnode>
<childnode refid="38195" relation="include">
</childnode>
<childnode refid="38196" relation="include">
</childnode>
<childnode refid="38199" relation="include">
</childnode>
<childnode refid="38138" relation="include">
</childnode>
<childnode refid="38179" relation="include">
</childnode>
<childnode refid="38180" relation="include">
</childnode>
<childnode refid="38147" relation="include">
</childnode>
<childnode refid="38232" relation="include">
</childnode>
<childnode refid="38214" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
<childnode refid="38234" relation="include">
</childnode>
<childnode refid="38384" relation="include">
</childnode>
<childnode refid="38386" relation="include">
</childnode>
<childnode refid="38223" relation="include">
</childnode>
<childnode refid="38420" relation="include">
</childnode>
<childnode refid="38433" relation="include">
</childnode>
</node>
<node id="38339">
<label>boost/geometry/algorithms/detail/envelope/linear.hpp</label>
<link refid="envelope_2linear_8hpp"/>
<childnode refid="38232" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38340" relation="include">
</childnode>
<childnode refid="38344" relation="include">
</childnode>
<childnode refid="38309" relation="include">
</childnode>
</node>
<node id="38433">
<label>boost/geometry/strategies/default_length_result.hpp</label>
<link refid="default__length__result_8hpp"/>
<childnode refid="38147" relation="include">
</childnode>
<childnode refid="38152" relation="include">
</childnode>
<childnode refid="38434" relation="include">
</childnode>
<childnode refid="38185" relation="include">
</childnode>
<childnode refid="38437" relation="include">
</childnode>
</node>
<node id="38208">
<label>boost/geometry/geometries/variant.hpp</label>
<link refid="variant_8hpp"/>
<childnode refid="38147" relation="include">
</childnode>
<childnode refid="38209" relation="include">
</childnode>
</node>
<node id="38346">
<label>boost/geometry/algorithms/detail/envelope/multipoint.hpp</label>
<link refid="envelope_2multipoint_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38123" relation="include">
</childnode>
<childnode refid="38274" relation="include">
</childnode>
<childnode refid="38296" relation="include">
</childnode>
<childnode refid="38347" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38204" relation="include">
</childnode>
<childnode refid="38162" relation="include">
</childnode>
<childnode refid="38152" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38239" relation="include">
</childnode>
<childnode refid="38191" relation="include">
</childnode>
<childnode refid="38248" relation="include">
</childnode>
<childnode refid="38253" relation="include">
</childnode>
<childnode refid="38308" relation="include">
</childnode>
<childnode refid="38345" relation="include">
</childnode>
<childnode refid="38344" relation="include">
</childnode>
<childnode refid="38302" relation="include">
</childnode>
<childnode refid="38309" relation="include">
</childnode>
</node>
<node id="38123">
<label>algorithm</label>
</node>
<node id="38135">
<label>boost/type_traits/remove_pointer.hpp</label>
</node>
<node id="38463">
<label>boost/geometry/algorithms/detail/relate/linear_areal.hpp</label>
<link refid="relate_2linear__areal_8hpp"/>
<childnode refid="38150" relation="include">
</childnode>
<childnode refid="38202" relation="include">
</childnode>
<childnode refid="38204" relation="include">
</childnode>
<childnode refid="38441" relation="include">
</childnode>
<childnode refid="38330" relation="include">
</childnode>
<childnode refid="38191" relation="include">
</childnode>
<childnode refid="38189" relation="include">
</childnode>
<childnode refid="38233" relation="include">
</childnode>
<childnode refid="38459" relation="include">
</childnode>
<childnode refid="38460" relation="include">
</childnode>
<childnode refid="38455" relation="include">
</childnode>
<childnode refid="38419" relation="include">
</childnode>
<childnode refid="38461" relation="include">
</childnode>
<childnode refid="38462" relation="include">
</childnode>
<childnode refid="38408" relation="include">
</childnode>
</node>
<node id="38266">
<label>boost/geometry/iterators/ever_circling_iterator.hpp</label>
<link refid="ever__circling__iterator_8hpp"/>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38225" relation="include">
</childnode>
<childnode refid="38267" relation="include">
</childnode>
<childnode refid="38227" relation="include">
</childnode>
<childnode refid="38268" relation="include">
</childnode>
</node>
<node id="38465">
<label>boost/geometry/algorithms/detail/relate/relate_impl.hpp</label>
<link refid="relate__impl_8hpp"/>
<childnode refid="38126" relation="include">
</childnode>
<childnode refid="38466" relation="include">
</childnode>
<childnode refid="38212" relation="include">
</childnode>
<childnode refid="38440" relation="include">
</childnode>
<childnode refid="38173" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
</node>
<node id="38185">
<label>boost/geometry/util/select_most_precise.hpp</label>
<link refid="select__most__precise_8hpp"/>
<childnode refid="38126" relation="include">
</childnode>
<childnode refid="38186" relation="include">
</childnode>
<childnode refid="38187" relation="include">
</childnode>
</node>
<node id="38299">
<label>boost/geometry/algorithms/detail/expand/interface.hpp</label>
<link refid="expand_2interface_8hpp"/>
<childnode refid="38179" relation="include">
</childnode>
<childnode refid="38180" relation="include">
</childnode>
<childnode refid="38147" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
<childnode refid="38300" relation="include">
</childnode>
</node>
<node id="38173">
<label>boost/geometry/algorithms/not_implemented.hpp</label>
<link refid="not__implemented_8hpp"/>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38174" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
</node>
<node id="38281">
<label>boost/geometry/strategies/intersection.hpp</label>
<link refid="strategies_2intersection_8hpp"/>
<childnode refid="38246" relation="include">
</childnode>
<childnode refid="38127" relation="include">
</childnode>
</node>
<node id="38287">
<label>boost/geometry/algorithms/detail/recalculate.hpp</label>
<link refid="recalculate_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38146" relation="include">
</childnode>
<childnode refid="38145" relation="include">
</childnode>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38126" relation="include">
</childnode>
<childnode refid="38219" relation="include">
</childnode>
<childnode refid="38176" relation="include">
</childnode>
<childnode refid="38195" relation="include">
</childnode>
<childnode refid="38196" relation="include">
</childnode>
<childnode refid="38199" relation="include">
</childnode>
<childnode refid="38202" relation="include">
</childnode>
<childnode refid="38181" relation="include">
</childnode>
<childnode refid="38188" relation="include">
</childnode>
<childnode refid="38210" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38169" relation="include">
</childnode>
<childnode refid="38167" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
</node>
<node id="38457">
<label>boost/geometry/util/has_nan_coordinate.hpp</label>
<link refid="has__nan__coordinate_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38186" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38156" relation="include">
</childnode>
<childnode refid="38152" relation="include">
</childnode>
<childnode refid="38243" relation="include">
</childnode>
</node>
<node id="38200">
<label>boost/range/rbegin.hpp</label>
</node>
<node id="38420">
<label>boost/geometry/strategies/distance.hpp</label>
<link refid="strategies_2distance_8hpp"/>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38232" relation="include">
</childnode>
<childnode refid="38246" relation="include">
</childnode>
</node>
<node id="38246">
<label>boost/geometry/strategies/tags.hpp</label>
<link refid="strategies_2tags_8hpp"/>
</node>
<node id="38450">
<label>boost/geometry/core/exception.hpp</label>
<link refid="exception_8hpp"/>
<childnode refid="38451" relation="include">
</childnode>
</node>
<node id="38161">
<label>boost/geometry/geometries/concepts/point_concept.hpp</label>
<link refid="point__concept_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38145" relation="include">
</childnode>
<childnode refid="38150" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38156" relation="include">
</childnode>
<childnode refid="38162" relation="include">
</childnode>
</node>
<node id="38137">
<label>boost/geometry/core/point_order.hpp</label>
<link refid="point__order_8hpp"/>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38138" relation="include">
</childnode>
<childnode refid="38139" relation="include">
</childnode>
<childnode refid="38131" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38133" relation="include">
</childnode>
</node>
<node id="38410">
<label>boost/geometry/algorithms/detail/overlay/select_rings.hpp</label>
<link refid="select__rings_8hpp"/>
<childnode refid="38262" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38382" relation="include">
</childnode>
<childnode refid="38395" relation="include">
</childnode>
<childnode refid="38206" relation="include">
</childnode>
<childnode refid="38348" relation="include">
</childnode>
<childnode refid="38409" relation="include">
</childnode>
<childnode refid="38324" relation="include">
</childnode>
</node>
<node id="38483">
<label>boost/geometry/algorithms/detail/disjoint/segment_box.hpp</label>
<link refid="segment__box_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38274" relation="include">
</childnode>
<childnode refid="38176" relation="include">
</childnode>
<childnode refid="38239" relation="include">
</childnode>
<childnode refid="38484" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38156" relation="include">
</childnode>
<childnode refid="38153" relation="include">
</childnode>
<childnode refid="38221" relation="include">
</childnode>
<childnode refid="38257" relation="include">
</childnode>
</node>
<node id="38288">
<label>boost/geometry/arithmetic/cross_product.hpp</label>
<link refid="cross__product_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38127" relation="include">
</childnode>
<childnode refid="38215" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38156" relation="include">
</childnode>
<childnode refid="38161" relation="include">
</childnode>
</node>
<node id="38213">
<label>boost/geometry/algorithms/for_each.hpp</label>
<link refid="for__each_8hpp"/>
<childnode refid="38123" relation="include">
</childnode>
<childnode refid="38177" relation="include">
</childnode>
<childnode refid="38140" relation="include">
</childnode>
<childnode refid="38136" relation="include">
</childnode>
<childnode refid="38206" relation="include">
</childnode>
<childnode refid="38173" relation="include">
</childnode>
<childnode refid="38214" relation="include">
</childnode>
<childnode refid="38167" relation="include">
</childnode>
<childnode refid="38169" relation="include">
</childnode>
<childnode refid="38153" relation="include">
</childnode>
<childnode refid="38211" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38144" relation="include">
</childnode>
<childnode refid="38216" relation="include">
</childnode>
<childnode refid="38168" relation="include">
</childnode>
<childnode refid="38191" relation="include">
</childnode>
</node>
<node id="38336">
<label>boost/geometry/algorithms/detail/envelope/implementation.hpp</label>
<link refid="envelope_2implementation_8hpp"/>
<childnode refid="38167" relation="include">
</childnode>
<childnode refid="38169" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38337" relation="include">
</childnode>
<childnode refid="38308" relation="include">
</childnode>
<childnode refid="38339" relation="include">
</childnode>
<childnode refid="38346" relation="include">
</childnode>
<childnode refid="38317" relation="include">
</childnode>
<childnode refid="38344" relation="include">
</childnode>
<childnode refid="38316" relation="include">
</childnode>
<childnode refid="38309" relation="include">
</childnode>
</node>
<node id="38290">
<label>boost/geometry/formulas/spherical.hpp</label>
</node>
<node id="38317">
<label>boost/geometry/algorithms/detail/envelope/point.hpp</label>
<link refid="algorithms_2detail_2envelope_2point_8hpp"/>
<childnode refid="38125" relation="include">
</childnode>
<childnode refid="38149" relation="include">
</childnode>
<childnode refid="38232" relation="include">
</childnode>
<childnode refid="38156" relation="include">
</childnode>
<childnode refid="38162" relation="include">
</childnode>
<childnode refid="38132" relation="include">
</childnode>
<childnode refid="38256" relation="include">
</childnode>
<childnode refid="38207" relation="include">
</childnode>
<childnode refid="38253" relation="include">
</childnode>
<childnode refid="38305" relation="include">
</childnode>
<childnode refid="38309" relation="include">
</childnode>
</node>
<node id="38313">
<label>boost/core/ref.hpp</label>
</node>
<node id="38176">
<label>boost/numeric/conversion/cast.hpp</label>
</node>
<node id="38407">
<label>boost/geometry/strategies/covered_by.hpp</label>
<link refid="strategies_2covered__by_8hpp"/>
<childnode refid="38127" relation="include">
</childnode>
</node>
<node id="38237">
<label>boost/type_traits/is_same.hpp</label>
</node>
<node id="38435">
<label>boost/mpl/equal_to.hpp</label>
</node>
</incdepgraph>
<innernamespace refid="namespaceboost">boost</innernamespace>
<innernamespace refid="namespaceboost_1_1geometry">boost::geometry</innernamespace>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
<location file="/home/travis/build/boostorg/boost/boost/geometry/algorithms/difference.hpp"/>
</compounddef>
</doxygen>
| {
"content_hash": "e75483ce8b8b6f417de6fc8a42167793",
"timestamp": "",
"source": "github",
"line_count": 4920,
"max_line_length": 134,
"avg_line_length": 37.05325203252033,
"alnum_prop": 0.5853419051902886,
"repo_name": "baslr/ArangoDB",
"id": "03c641aec2bb1da965f4a3c6ea9a40e071a0a20e",
"size": "182302",
"binary": false,
"copies": "2",
"ref": "refs/heads/3.1-silent",
"path": "3rdParty/boost/1.62.0/libs/geometry/doc/doxy/doxygen_output/xml/difference_8hpp.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Ada",
"bytes": "89080"
},
{
"name": "Assembly",
"bytes": "391227"
},
{
"name": "Awk",
"bytes": "4272"
},
{
"name": "Batchfile",
"bytes": "62892"
},
{
"name": "C",
"bytes": "7932707"
},
{
"name": "C#",
"bytes": "96430"
},
{
"name": "C++",
"bytes": "284363933"
},
{
"name": "CLIPS",
"bytes": "5291"
},
{
"name": "CMake",
"bytes": "681903"
},
{
"name": "CSS",
"bytes": "1036656"
},
{
"name": "CWeb",
"bytes": "174166"
},
{
"name": "Cuda",
"bytes": "52444"
},
{
"name": "DIGITAL Command Language",
"bytes": "259402"
},
{
"name": "Emacs Lisp",
"bytes": "14637"
},
{
"name": "Fortran",
"bytes": "1856"
},
{
"name": "Groovy",
"bytes": "131"
},
{
"name": "HTML",
"bytes": "2318016"
},
{
"name": "Java",
"bytes": "2325801"
},
{
"name": "JavaScript",
"bytes": "67878359"
},
{
"name": "LLVM",
"bytes": "24129"
},
{
"name": "Lex",
"bytes": "1231"
},
{
"name": "Lua",
"bytes": "16189"
},
{
"name": "M4",
"bytes": "600550"
},
{
"name": "Makefile",
"bytes": "509612"
},
{
"name": "Max",
"bytes": "36857"
},
{
"name": "Module Management System",
"bytes": "1545"
},
{
"name": "NSIS",
"bytes": "28404"
},
{
"name": "Objective-C",
"bytes": "19321"
},
{
"name": "Objective-C++",
"bytes": "2503"
},
{
"name": "PHP",
"bytes": "98503"
},
{
"name": "Pascal",
"bytes": "145688"
},
{
"name": "Perl",
"bytes": "720157"
},
{
"name": "Perl 6",
"bytes": "9918"
},
{
"name": "Python",
"bytes": "5859911"
},
{
"name": "QMake",
"bytes": "16692"
},
{
"name": "R",
"bytes": "5123"
},
{
"name": "Rebol",
"bytes": "354"
},
{
"name": "Roff",
"bytes": "1010686"
},
{
"name": "Ruby",
"bytes": "922159"
},
{
"name": "SAS",
"bytes": "1847"
},
{
"name": "Scheme",
"bytes": "10604"
},
{
"name": "Shell",
"bytes": "511077"
},
{
"name": "Swift",
"bytes": "116"
},
{
"name": "Tcl",
"bytes": "1172"
},
{
"name": "TeX",
"bytes": "32117"
},
{
"name": "Vim script",
"bytes": "4075"
},
{
"name": "Visual Basic",
"bytes": "11568"
},
{
"name": "XSLT",
"bytes": "551977"
},
{
"name": "Yacc",
"bytes": "53005"
}
],
"symlink_target": ""
} |
import sys, json, logging
from common_function import get_metrics_json
logging.basicConfig(level=logging.WARNING,format='%(asctime)s: %(levelname)s - %(module)s - %(message)s')
url = sys.argv[1] if len(sys.argv) > 1 else 'localhost'
topic = sys.argv[2] if len(sys.argv[2]) > 2 else ''
#metric should be like BytesInPerSec_m1, BytesInPerSec_m2, BytesInPerSec_m3
metric = sys.argv[3] if len(sys.argv) > 3 else '_'
cache_file = '/tmp/kafka_cache_%s.cache' % url.__hash__()
json_data = get_metrics_json(url, cache_file)
if topic == 'TopicsDiscovery':
topics = [item for item in json_data.keys() if item.startswith('kafka.server.BrokerTopics.topic.')]
discoveredData = []
for topic in topics:
discoveredData.append({'{#TOPIC}' : topic.replace('kafka.server.BrokerTopicMetrics.topic.', '')})
outcome = {'data' : discoveredData}
print json.dumps(outcome)
elif topic == 'TotalBrokerTopicMetrics':
metric_value = metric.split('_')[1]
metric = metric.split('_')[0]
bean = 'kafka.server.BrokerTopicMetrics'
result = json_data.get(bean, {}).get(metric, {}).get(metric_value, -1)
print result
elif topic == 'KafkaServerMetrics':
if metric in ['UnderReplicatedPartition', 'PartitionCount', 'LeaderCount']:
bean = 'kafka.server.ReplicationManager'
metric_value = 'value'
elif metric == 'ActiveControllerCount':
bean = 'kafka.controller.KafkaController'
metric_value = 'value'
elif metric == 'RequestHandlerAvgIdlePercent':
bean = 'kafka.server.KafkaRequestHandlerPool'
metric_value = 'count'
result = json_data.get(bean, {}).get(metric, {}).get(metric_value, -1)
print result
elif topic == 'KafkaNetworkRequest':
if metric in ['Metadata', 'FetchFollower', 'FetchConsumer', 'Produce']:
bean = 'kafka.network.RequestMetrics.request.%s' % metric
bean1 = 'TotalTimeMs'
metric_value = 'count'
result = json_data.get(bean, {}).get(bean1, {}).get(metric_value, -1)
print result
else:
metric_value = metric.split('_')[1]
metric = metric.split('_')[0]
bean = 'kafka.server.BrokerTopicMetrics.topic.%s' % topic
result = json_data.get(bean, {}).get(metric, {}).get(metric_value, -1)
print result | {
"content_hash": "45ad60a41d3f3a91c06278e07b708df3",
"timestamp": "",
"source": "github",
"line_count": 58,
"max_line_length": 105,
"avg_line_length": 39.06896551724138,
"alnum_prop": 0.6575463371579876,
"repo_name": "arshvin/scripts",
"id": "8ffea65edff5d9ce8f4abcb5fc7f64a1dc3f9b93",
"size": "2921",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "zabbix/T_kafka/kafka_check.py",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Groovy",
"bytes": "24100"
},
{
"name": "Java",
"bytes": "26396"
},
{
"name": "Perl",
"bytes": "3315"
},
{
"name": "Puppet",
"bytes": "5761"
},
{
"name": "Python",
"bytes": "85974"
},
{
"name": "Ruby",
"bytes": "4038"
},
{
"name": "Shell",
"bytes": "10607"
}
],
"symlink_target": ""
} |
// Copyright © 2014 onwards, Andrew Whewell
// All rights reserved.
//
// Redistribution and use of this software in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
// * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
// * Neither the name of the author nor the names of the program's contributors may be used to endorse or promote products derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OF THE SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using InterfaceFactory;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using Test.Framework;
using VirtualRadar.Interface;
using VirtualRadar.Interface.Database;
using VirtualRadar.Interface.StandingData;
using System.Threading;
namespace Test.VirtualRadar.Library
{
[TestClass]
public class AircraftDetailFetcherTests
{
#region Fields, TestInitialise, TestCleanup
public TestContext TestContext { get; set; }
private const int IntervalMilliseconds = 60000;
private const int AutoDeregisterInterval = 90000;
private IClassFactory _OriginalFactory;
private Mock<IRuntimeEnvironment> _RuntimeEnvironment;
private IAircraftDetailFetcher _Fetcher;
private EventRecorder<EventArgs<AircraftDetail>> _FetchedHandler;
private Mock<IAircraft> _Aircraft;
private Mock<IHeartbeatService> _Heartbeat;
private Mock<IAutoConfigBaseStationDatabase> _AutoConfigDatabase;
private Mock<IBaseStationDatabase> _Database;
private BaseStationAircraftAndFlightsCount _DatabaseAircraftAndFlights;
private BaseStationAircraft _DatabaseAircraft;
private List<string> _GetManyAircraftAndFlightsByCodes;
private List<string> _GetManyAircraftByCodes;
private Mock<IAutoConfigPictureFolderCache> _AutoConfigPictureFolderCache;
private Mock<IDirectoryCache> _PictureFolderCache;
private Mock<IAircraftPictureManager> _AircraftPictureManager;
private IDirectoryCache _PictureManagerCache;
private string _PictureManagerIcao24;
private string _PictureManagerReg;
private bool _PictureManagerThrowException;
private PictureDetail _PictureDetail;
private Mock<IStandingDataManager> _StandingDataManager;
private string _FindAircraftType;
private AircraftType _AircraftType;
private ClockMock _Clock;
private Mock<ILog> _Log;
[TestInitialize]
public void TestInitialise()
{
_OriginalFactory = Factory.TakeSnapshot();
_RuntimeEnvironment = TestUtilities.CreateMockSingleton<IRuntimeEnvironment>();
_RuntimeEnvironment.Setup(r => r.IsTest).Returns(true);
_Clock = new ClockMock();
Factory.Singleton.RegisterInstance<IClock>(_Clock.Object);
_Fetcher = Factory.Singleton.Resolve<IAircraftDetailFetcher>();
_FetchedHandler = new EventRecorder<EventArgs<AircraftDetail>>();
_Fetcher.Fetched += _FetchedHandler.Handler;
_Aircraft = TestUtilities.CreateMockInstance<IAircraft>();
_Aircraft.Setup(r => r.Icao24).Returns("ABC123");
// The fetcher uses a private heartbeat service to avoid slowing the GUI down. Unfortunately
// the TestUtilities don't support creating non-singleton instances of ISingletons, do we
// have to do it manually.
_Heartbeat = TestUtilities.CreateMockInstance<IHeartbeatService>();
Factory.Singleton.RegisterInstance<IHeartbeatService>(_Heartbeat.Object);
_AutoConfigDatabase = TestUtilities.CreateMockSingleton<IAutoConfigBaseStationDatabase>();
_Database = TestUtilities.CreateMockInstance<IBaseStationDatabase>();
_AutoConfigDatabase.Setup(r => r.Database).Returns(_Database.Object);
_DatabaseAircraftAndFlights = null;
_GetManyAircraftAndFlightsByCodes = new List<string>();
_GetManyAircraftByCodes = new List<string>();
_Database.Setup(r => r.GetManyAircraftByCode(It.IsAny<IEnumerable<string>>())).Returns((IEnumerable<string> icaos) => {
var result = new Dictionary<string, BaseStationAircraft>();
if(icaos != null && icaos.Count() == 1 && icaos.First() == "ABC123" && _DatabaseAircraft != null) result.Add("ABC123", _DatabaseAircraft);
if(icaos != null) _GetManyAircraftByCodes.AddRange(icaos);
return result;
});
_Database.Setup(r => r.GetManyAircraftAndFlightsCountByCode(It.IsAny<IEnumerable<string>>())).Returns((IEnumerable<string> icaos) => {
var result = new Dictionary<string, BaseStationAircraftAndFlightsCount>();
if(icaos != null && icaos.Count() == 1 && icaos.First() == "ABC123" && _DatabaseAircraftAndFlights != null) result.Add("ABC123", _DatabaseAircraftAndFlights);
if(icaos != null) _GetManyAircraftAndFlightsByCodes.AddRange(icaos);
return result;
});
_AutoConfigPictureFolderCache = TestUtilities.CreateMockSingleton<IAutoConfigPictureFolderCache>();
_PictureFolderCache = TestUtilities.CreateMockInstance<IDirectoryCache>();
_AutoConfigPictureFolderCache.Setup(r => r.DirectoryCache).Returns(() => _PictureFolderCache.Object);
_AircraftPictureManager = TestUtilities.CreateMockSingleton<IAircraftPictureManager>();
_PictureManagerCache = _PictureFolderCache.Object;
_PictureManagerIcao24 = "INVALID";
_PictureManagerReg = null;
_PictureManagerThrowException = false;
_PictureDetail = new PictureDetail();
_AircraftPictureManager.Setup(r => r.FindPicture(It.IsAny<IDirectoryCache>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<PictureDetail>())).Returns((IDirectoryCache cache, string icao24, string reg, PictureDetail existingPictureDetail) => {
if(_PictureManagerThrowException) throw new InvalidOperationException();
return cache == _PictureManagerCache && icao24 == _PictureManagerIcao24 && reg == _PictureManagerReg ? _PictureDetail : null;
});
_StandingDataManager = TestUtilities.CreateMockSingleton<IStandingDataManager>();
_AircraftType = new AircraftType();
_StandingDataManager.Setup(r => r.FindAircraftType(It.IsAny<string>())).Returns((string type) => {
return type == _FindAircraftType ? _AircraftType : null;
});
_Log = TestUtilities.CreateMockSingleton<ILog>();
_Log.Setup(r => r.WriteLine(It.IsAny<string>())).Callback((string x) => { throw new InvalidOperationException(x); });
_Log.Setup(r => r.WriteLine(It.IsAny<string>(), It.IsAny<object[]>())).Callback((string x, object[] args) => { throw new InvalidOperationException(String.Format(x, args)); });
}
[TestCleanup]
public void TestCleanup()
{
Factory.RestoreSnapshot(_OriginalFactory);
}
#endregion
#region Constructor and properties
[TestMethod]
public void AircraftDetailFetcher_Singleton_Returns_Same_Instance_For_All_References()
{
var instance1 = Factory.Singleton.Resolve<IAircraftDetailFetcher>();
var instance2 = Factory.Singleton.Resolve<IAircraftDetailFetcher>();
Assert.IsNotNull(instance1.Singleton);
Assert.AreNotSame(instance1, instance2);
Assert.AreSame(instance1.Singleton, instance2.Singleton);
}
#endregion
#region RegisterAircraft
[TestMethod]
[ExpectedException(typeof(ArgumentNullException))]
public void AircraftDetailFetcher_RegisterAircraft_Throws_If_Aircraft_Is_Null()
{
_Fetcher.RegisterAircraft(null);
}
[TestMethod]
public void AircraftDetailFetcher_RegisterAircraft_Ignores_Aircraft_With_Null_Icao24_Code()
{
_Aircraft.Setup(r => r.Icao24).Returns((string)null);
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_Database.Verify(r => r.GetManyAircraftAndFlightsCountByCode(It.IsAny<IEnumerable<string>>()), Times.Never());
}
[TestMethod]
public void AircraftDetailFetcher_RegisterAircraft_Ignores_Aircraft_With_Empty_Icao24_Code()
{
_Aircraft.Setup(r => r.Icao24).Returns("");
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_Database.Verify(r => r.GetManyAircraftAndFlightsCountByCode(It.IsAny<IEnumerable<string>>()), Times.Never());
}
[TestMethod]
public void AircraftDetailFetcher_RegisterAircraft_Does_Not_Immediately_Fetch_Aircraft_Record()
{
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Database.Verify(r => r.GetManyAircraftAndFlightsCountByCode(It.IsAny<IEnumerable<string>>()), Times.Never());
}
[TestMethod]
public void AircraftDetailFetcher_RegisterAircraft_Fetches_Aircraft_Record_On_Next_Fast_Tick()
{
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
Assert.AreEqual("ABC123", _GetManyAircraftAndFlightsByCodes.Single());
}
[TestMethod]
public void AircraftDetailFetcher_RegisterAircraft_Does_Not_Immediately_Fetch_Aircraft_Picture()
{
_Fetcher.RegisterAircraft(_Aircraft.Object);
_AircraftPictureManager.Verify(r => r.FindPicture(It.IsAny<IDirectoryCache>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<PictureDetail>()), Times.Never());
}
[TestMethod]
public void AircraftDetailFetcher_RegisterAircraft_Fetches_Aircraft_Picture_On_Next_Fast_Tick()
{
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_AircraftPictureManager.Verify(r => r.FindPicture(It.IsAny<IDirectoryCache>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<PictureDetail>()), Times.Once());
}
[TestMethod]
public void AircraftDetailFetcher_RegisterAircraft_Always_Returns_Null_On_First_Add()
{
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123" };
Assert.IsNull(_Fetcher.RegisterAircraft(_Aircraft.Object));
}
[TestMethod]
public void AircraftDetailFetcher_RegisterAircraft_Fetches_Aircraft_Record_Only_On_First_Fast_Tick()
{
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123" };
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
Assert.AreEqual("ABC123", _GetManyAircraftAndFlightsByCodes.Single());
}
[TestMethod]
public void AircraftDetailFetcher_RegisterAircraft_Fetches_Aircraft_Picture_Only_On_First_Fast_Tick()
{
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123" };
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_AircraftPictureManager.Verify(r => r.FindPicture(It.IsAny<IDirectoryCache>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<PictureDetail>()), Times.Once());
}
[TestMethod]
public void AircraftDetailFetcher_RegisterAircraft_Does_Not_Make_Individual_Requests_For_Flight_Counts()
{
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123" };
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_Database.Verify(r => r.GetCountOfFlightsForAircraft(It.IsAny<BaseStationAircraft>(), It.IsAny<SearchBaseStationCriteria>()), Times.Never());
}
[TestMethod]
public void AircraftDetailFetcher_RegisterAircraft_Searches_For_AircraftType_Using_Database_Detail()
{
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", ICAOTypeCode = "B747" };
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_StandingDataManager.Verify(r => r.FindAircraftType("B747"), Times.Once());
}
[TestMethod]
public void AircraftDetailFetcher_RegisterAircraft_Exposes_AircraftType_In_Results()
{
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", ICAOTypeCode = "B747" };
_FindAircraftType = "B747";
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
Assert.AreSame(_AircraftType, _FetchedHandler.Args.Value.AircraftType);
}
[TestMethod]
public void AircraftDetailFetcher_RegisterAircraft_Does_Not_Refetch_AircraftType_If_ModelIcao_Has_Not_Changed()
{
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", ICAOTypeCode = "B747" };
_FindAircraftType = "B747";
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_Clock.UtcNowValue = _Clock.UtcNowValue.AddMilliseconds(IntervalMilliseconds);
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", Registration = "ABC", ICAOTypeCode = "B747" };
_Heartbeat.Raise(r => r.SlowTick += null, EventArgs.Empty);
_StandingDataManager.Verify(r => r.FindAircraftType("B747"), Times.Once());
Assert.AreEqual(2, _FetchedHandler.CallCount);
Assert.AreSame(_AircraftType, _FetchedHandler.AllArgs[1].Value.AircraftType);
}
[TestMethod]
public void AircraftDetailFetcher_RegisterAircraft_Does_Refetch_AircraftType_If_ModelIcao_Has_Changed()
{
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", ICAOTypeCode = "B747" };
_FindAircraftType = "A380";
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_Clock.UtcNowValue = _Clock.UtcNowValue.AddMilliseconds(IntervalMilliseconds);
_DatabaseAircraft = new BaseStationAircraft() { ModeS = "ABC123", ICAOTypeCode = "A380" };
_Heartbeat.Raise(r => r.SlowTick += null, EventArgs.Empty);
_StandingDataManager.Verify(r => r.FindAircraftType("B747"), Times.Once());
_StandingDataManager.Verify(r => r.FindAircraftType("A380"), Times.Once());
Assert.AreEqual(2, _FetchedHandler.CallCount);
Assert.AreSame(_AircraftType, _FetchedHandler.AllArgs[1].Value.AircraftType);
}
[TestMethod]
public void AircraftDetailFetcher_RegisterAircraft_Returns_The_Correct_Details_If_The_Aircraft_Has_Already_Been_Registered()
{
var sameAircraftDifferentObject = TestUtilities.CreateMockInstance<IAircraft>();
sameAircraftDifferentObject.Setup(r => r.Icao24).Returns("ABC123");
sameAircraftDifferentObject.Setup(r => r.Registration).Returns("G-ABCD");
_PictureManagerReg = "G-ABCD";
_PictureManagerIcao24 = "ABC123";
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", Registration = "G-ABCD", FlightsCount = 88 };
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
var details = _Fetcher.RegisterAircraft(sameAircraftDifferentObject.Object);
Assert.AreSame(_DatabaseAircraftAndFlights, details.Aircraft);
Assert.AreEqual(88, details.FlightsCount);
Assert.AreSame(_PictureDetail, details.Picture);
}
[TestMethod]
public void AircraftDetailFetcher_RegisterAircraft_Does_Not_Raise_Multiple_Events_When_Same_Aircraft_Registered_Twice_Before_Initial_Lookup()
{
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123" };
var sameAircraftDifferentObject = TestUtilities.CreateMockInstance<IAircraft>();
sameAircraftDifferentObject.Setup(r => r.Icao24).Returns("ABC123");
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Fetcher.RegisterAircraft(sameAircraftDifferentObject.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
Assert.AreEqual(1, _FetchedHandler.CallCount);
}
#endregion
#region Automatic Deregistration
[TestMethod]
public void AircraftDetailFetcher_AutoDeregister_Stops_Database_Lookups_Once_Aircraft_Has_Not_Been_Registered_Within_Timeout()
{
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_Clock.UtcNowValue = _Clock.UtcNowValue.AddMilliseconds(AutoDeregisterInterval);
_Heartbeat.Raise(r => r.SlowTick += null, EventArgs.Empty);
Assert.AreEqual("ABC123", _GetManyAircraftAndFlightsByCodes.Single());
}
[TestMethod]
public void AircraftDetailFetcher_AutoDeregister_Interval_Refreshed_By_Registration()
{
var sameAircraftDifferentObject = TestUtilities.CreateMockInstance<IAircraft>();
sameAircraftDifferentObject.Setup(r => r.Icao24).Returns("ABC123");
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_Clock.UtcNowValue = _Clock.UtcNowValue.AddMilliseconds(AutoDeregisterInterval - 1);
_Fetcher.RegisterAircraft(sameAircraftDifferentObject.Object);
_Clock.UtcNowValue = _Clock.UtcNowValue.AddMilliseconds(2);
_Heartbeat.Raise(r => r.SlowTick += null, EventArgs.Empty);
Assert.AreEqual(2, _GetManyAircraftAndFlightsByCodes.Count);
Assert.AreEqual("ABC123", _GetManyAircraftAndFlightsByCodes[0]);
Assert.AreEqual("ABC123", _GetManyAircraftAndFlightsByCodes[1]);
}
#endregion
#region Fetched
#region Aircraft Database Record
[TestMethod]
public void AircraftDetailFetcher_Fetched_Raised_If_Aircraft_Has_Database_Record()
{
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", FlightsCount = 100 };
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
Assert.AreEqual(1, _FetchedHandler.CallCount);
Assert.AreSame(_DatabaseAircraftAndFlights, _FetchedHandler.Args.Value.Aircraft);
Assert.AreEqual(100, _FetchedHandler.Args.Value.FlightsCount);
Assert.AreEqual("ABC123", _FetchedHandler.Args.Value.Icao24);
Assert.AreSame(_Fetcher, _FetchedHandler.Sender);
}
[TestMethod]
public void AircraftDetailFetcher_Fetched_Raised_If_Aircraft_Record_Added_After_Interval_Has_Elapsed()
{
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123" };
_Clock.UtcNowValue = _Clock.UtcNowValue.AddMilliseconds(IntervalMilliseconds);
_Heartbeat.Raise(r => r.SlowTick += null, EventArgs.Empty);
Assert.AreEqual(2, _FetchedHandler.CallCount);
}
[TestMethod]
public void AircraftDetailFetcher_Fetched_Not_Raised_If_Aircraft_Record_Added_Before_Interval_Has_Elapsed()
{
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123" };
_Clock.UtcNowValue = _Clock.UtcNowValue.AddMilliseconds(IntervalMilliseconds - 1);
_Heartbeat.Raise(r => r.SlowTick += null, EventArgs.Empty);
Assert.AreEqual(1, _FetchedHandler.CallCount);
}
[TestMethod]
public void AircraftDetailFetcher_Fetched_Not_Raised_If_Aircraft_Record_Unchanged_After_Interval_Has_Elapsed()
{
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123" };
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_DatabaseAircraft = new BaseStationAircraft() { ModeS = "ABC123" };
_Clock.UtcNowValue = _Clock.UtcNowValue.AddMilliseconds(IntervalMilliseconds);
_Heartbeat.Raise(r => r.SlowTick += null, EventArgs.Empty);
Assert.AreEqual(1, _FetchedHandler.CallCount);
}
[TestMethod]
public void AircraftDetailFetcher_Fetched_Raised_If_Aircraft_Record_Changes()
{
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", FlightsCount = 52 };
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_DatabaseAircraft = new BaseStationAircraft() { ModeS = "ABC123", Registration = "New Registration" };
_Clock.UtcNowValue = _Clock.UtcNowValue.AddMilliseconds(IntervalMilliseconds);
_Heartbeat.Raise(r => r.SlowTick += null, EventArgs.Empty);
Assert.AreEqual(2, _FetchedHandler.CallCount);
Assert.AreEqual("New Registration", _FetchedHandler.Args.Value.Aircraft.Registration);
Assert.AreEqual(52, _FetchedHandler.Args.Value.FlightsCount);
}
[TestMethod]
public void AircraftDetailFetcher_Fetched_Not_Raised_If_Count_Of_Flights_Changes()
{
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", FlightsCount = 10 };
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_DatabaseAircraft = new BaseStationAircraft() { ModeS = "ABC123" };
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", FlightsCount = 42 };
_Clock.UtcNowValue = _Clock.UtcNowValue.AddMilliseconds(IntervalMilliseconds);
_Heartbeat.Raise(r => r.SlowTick += null, EventArgs.Empty);
Assert.AreEqual(1, _FetchedHandler.CallCount);
}
[TestMethod]
public void AircraftDetailFetcher_Fetched_Raised_If_Aircraft_Has_No_Record()
{
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
Assert.AreEqual(1, _FetchedHandler.CallCount);
Assert.IsNull(_FetchedHandler.Args.Value.Aircraft);
Assert.AreEqual("ABC123", _FetchedHandler.Args.Value.Icao24);
Assert.AreEqual(0, _FetchedHandler.Args.Value.FlightsCount);
Assert.AreSame(_Fetcher, _FetchedHandler.Sender);
}
[TestMethod]
public void AircraftDetailFetcher_Fetched_Does_Not_Fetch_Flight_Count_If_DatabaseRecord_Does_Not_Exist_And_Picture_Does()
{
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_Database.Verify(r => r.GetCountOfFlightsForAircraft(It.IsAny<BaseStationAircraft>(), It.IsAny<SearchBaseStationCriteria>()), Times.Never());
}
[TestMethod]
public void AircraftDetailFetcher_Fetched_Raised_With_Null_Aircraft_If_Aircraft_Record_Removed_After_Interval_Has_Elapsed()
{
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123" };
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_DatabaseAircraftAndFlights = null;
_Clock.UtcNowValue = _Clock.UtcNowValue.AddMilliseconds(IntervalMilliseconds);
_Heartbeat.Raise(r => r.SlowTick += null, EventArgs.Empty);
Assert.AreEqual(2, _FetchedHandler.CallCount);
Assert.IsNotNull(_FetchedHandler.AllArgs[0].Value.Aircraft);
Assert.IsNull(_FetchedHandler.AllArgs[1].Value.Aircraft);
}
[TestMethod]
public void AircraftDetailFetcher_Fetched_Not_Raised_If_Aircraft_Record_Remains_Missing_After_Interval_Elapses()
{
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_Clock.UtcNowValue = _Clock.UtcNowValue.AddMilliseconds(IntervalMilliseconds);
_Heartbeat.Raise(r => r.SlowTick += null, EventArgs.Empty);
Assert.AreEqual(1, _FetchedHandler.CallCount);
}
[TestMethod]
public void AircraftDetailFetcher_Fetched_Not_Raised_If_Aircraft_Record_Remains_Deleted_After_Interval_Elapses_Twice()
{
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123" };
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty); // First raise of Fetched
_DatabaseAircraftAndFlights = null;
_Clock.UtcNowValue = _Clock.UtcNowValue.AddMilliseconds(IntervalMilliseconds);
_Heartbeat.Raise(r => r.SlowTick += null, EventArgs.Empty); // Second raise of Fetched
_Clock.UtcNowValue = _Clock.UtcNowValue.AddMilliseconds(IntervalMilliseconds);
_Heartbeat.Raise(r => r.SlowTick += null, EventArgs.Empty); // Should not trigger a third
Assert.AreEqual(2, _FetchedHandler.CallCount);
}
[TestMethod]
public void AircraftDetailFetcher_Fetched_Not_Raised_If_AircraftType_Changes()
{
// Standing data manager will tell us if it's possible that the aircraft type has changed - we should
// only check it if the code changes and we already have a test for that.
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", ICAOTypeCode = "B747" };
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_FindAircraftType = "B747";
_Clock.UtcNowValue = _Clock.UtcNowValue.AddMilliseconds(IntervalMilliseconds);
Assert.AreEqual(1, _FetchedHandler.CallCount);
}
[TestMethod]
public void AircraftDetailFetcher_Fetched_Not_Raised_If_AircraftType_Does_Not_Change()
{
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", ICAOTypeCode = "B747" };
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_Clock.UtcNowValue = _Clock.UtcNowValue.AddMilliseconds(IntervalMilliseconds);
Assert.AreEqual(1, _FetchedHandler.CallCount);
}
#endregion
#region Picture
[TestMethod]
public void AircraftDetailFetcher_Fetched_Raised_If_Picture_Exists()
{
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", Registration = "ABC" };
_PictureManagerReg = "ABC";
_PictureManagerIcao24 = "ABC123";
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
Assert.AreSame(_PictureDetail, _FetchedHandler.Args.Value.Picture);
}
[TestMethod]
public void AircraftDetailFetcher_Fetched_Raised_If_Picture_Exists_And_Database_Record_Does_Not()
{
_PictureManagerIcao24 = "ABC123";
_PictureManagerReg = null;
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
Assert.AreSame(_PictureDetail, _FetchedHandler.Args.Value.Picture);
}
[TestMethod]
public void AircraftDetailFetcher_Fetched_Raised_If_Picture_Found_But_Database_Record_Unchanged()
{
_DatabaseAircraft = _DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", Registration = "ABC" };
_PictureManagerReg = null;
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_Clock.UtcNowValue = _Clock.UtcNowValue.AddMilliseconds(IntervalMilliseconds);
_PictureManagerReg = "ABC";
_PictureManagerIcao24 = "ABC123";
_Heartbeat.Raise(r => r.SlowTick += null, EventArgs.Empty);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
Assert.AreEqual(2, _FetchedHandler.CallCount);
Assert.AreSame(_PictureDetail, _FetchedHandler.Args.Value.Picture);
}
[TestMethod]
public void AircraftDetailFetcher_Fetched_Not_Raised_If_Picture_Details_Are_Unchanged()
{
_DatabaseAircraft = new BaseStationAircraft() { ModeS = "ABC123", Registration = "ABC" };
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", Registration = "ABC" };
_PictureManagerReg = "ABC";
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_Clock.UtcNowValue = _Clock.UtcNowValue.AddMilliseconds(IntervalMilliseconds);
_Heartbeat.Raise(r => r.SlowTick += null, EventArgs.Empty);
Assert.AreEqual(1, _FetchedHandler.CallCount);
}
#endregion
#endregion
#region BaseStationDatabase.AircraftUpdated
[TestMethod]
public void AircraftDetailFetcher_Fetched_Raised_If_BaseStationDatabase_AircraftUpdated_Raised_And_Details_Have_Changed()
{
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123" };
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", Registration = "New" };
_Database.Raise(r => r.AircraftUpdated += null, new EventArgs<BaseStationAircraft>(_DatabaseAircraftAndFlights));
Assert.AreEqual(2, _FetchedHandler.CallCount);
Assert.AreSame(_DatabaseAircraftAndFlights, _FetchedHandler.Args.Value.Aircraft);
}
[TestMethod]
public void AircraftDetailFetcher_Fetched_Does_Not_Fetch_Aircraft_Record_If_BaseStationDatabase_AircraftUpdated_Raised()
{
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123" };
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", Registration = "New" };
_Database.Raise(r => r.AircraftUpdated += null, new EventArgs<BaseStationAircraft>(_DatabaseAircraftAndFlights));
Assert.AreEqual("ABC123", _GetManyAircraftAndFlightsByCodes.Single());
}
[TestMethod]
public void AircraftDetailFetcher_Fetched_Does_Refetches_Aircraft_Picture_If_BaseStationDatabase_AircraftUpdated_Raised_With_New_Registration()
{
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", Registration = "ABC" };
_PictureManagerReg = "XYZ";
_PictureManagerIcao24 = "ABC123";
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", Registration = "XYZ" };
_Database.Raise(r => r.AircraftUpdated += null, new EventArgs<BaseStationAircraft>(_DatabaseAircraftAndFlights));
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_AircraftPictureManager.Verify(r => r.FindPicture(_PictureFolderCache.Object, "ABC123", "ABC", It.IsAny<PictureDetail>()), Times.Once());
_AircraftPictureManager.Verify(r => r.FindPicture(_PictureFolderCache.Object, "ABC123", "XYZ", It.IsAny<PictureDetail>()), Times.Once());
Assert.AreSame(_PictureDetail, _FetchedHandler.AllArgs[1].Value.Picture);
}
[TestMethod]
public void AircraftDetailFetcher_Fetched_Refetches_Aircraft_Picture_If_BaseStationDatabase_AircraftUpdated_Raised_With_Same_Registration()
{
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", Registration = "ABC" };
_PictureManagerReg = "XYZ";
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", Registration = "ABC" };
_Database.Raise(r => r.AircraftUpdated += null, new EventArgs<BaseStationAircraft>(_DatabaseAircraftAndFlights));
_AircraftPictureManager.Verify(r => r.FindPicture(_PictureFolderCache.Object, "ABC123", "ABC", It.IsAny<PictureDetail>()), Times.Exactly(2));
}
[TestMethod]
public void AircraftDetailFetcher_Fetched_Raised_If_BaseStationDatabase_AircraftUpdated_Raised_And_Details_Have_Not_Changed()
{
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123" };
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123" };
_Database.Raise(r => r.AircraftUpdated += null, new EventArgs<BaseStationAircraft>(_DatabaseAircraftAndFlights));
Assert.AreEqual(1, _FetchedHandler.CallCount);
}
[TestMethod]
public void AircraftDetailFetcher_Fetched_Not_Raised_If_BaseStationDatabase_AircraftUpdated_Raised_For_Unknown_Aircraft()
{
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", Registration = "New" };
_Database.Raise(r => r.AircraftUpdated += null, new EventArgs<BaseStationAircraft>(_DatabaseAircraftAndFlights));
Assert.AreEqual(0, _FetchedHandler.CallCount);
}
[TestMethod]
public void AircraftDetailFetcher_Fetched_Not_Raised_If_Aircraft_Unchanged_After_AircraftUpdated_Raised()
{
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123" };
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_DatabaseAircraft = new BaseStationAircraft() { ModeS = "ABC123", Registration = "New" };
_Database.Raise(r => r.AircraftUpdated += null, new EventArgs<BaseStationAircraft>(_DatabaseAircraftAndFlights));
_Clock.UtcNowValue = _Clock.UtcNowValue.AddMilliseconds(IntervalMilliseconds);
_Heartbeat.Raise(r => r.SlowTick += null, EventArgs.Empty);
Assert.AreEqual(2, _FetchedHandler.CallCount);
}
[TestMethod]
public void AircraftDetailFetcher_BaseStationDatabase_AircraftUpdated_Exceptions_Get_Logged_But_Do_Not_Bubble_Up()
{
var messageLogged = false;
_Log.Setup(r => r.WriteLine(It.IsAny<string>())).Callback((string x) => { messageLogged = true; });
_Log.Setup(r => r.WriteLine(It.IsAny<string>(), It.IsAny<object[]>())).Callback((string x, object[] args) => { messageLogged = true; });
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
// The database doesn't get interrogated when the AircraftUpdated event comes through, but it should try to
// fetch the picture so throw an exception there
_AircraftPictureManager.Setup(r => r.FindPicture(It.IsAny<IDirectoryCache>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<PictureDetail>()))
.Callback((IDirectoryCache a, string b, string c, PictureDetail d) => { throw new InvalidOperationException(); });
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", Registration = "G-ABCD" };
_Database.Raise(r => r.AircraftUpdated += null, new EventArgs<BaseStationAircraft>(_DatabaseAircraftAndFlights));
Assert.IsTrue(messageLogged);
}
#endregion
#region BaseStationDatabase.FileNameChanged
[TestMethod]
public void AircraftDetailFetcher_BaseStationDatabase_FileNameChanged_Forces_Refresh_Of_All_Database_Details_On_Next_Fast_Tick()
{
// If it performed the refetch immediately then it could cause the options screen to appear to hang as the event
// is probably being raised on the GUI thread. Pushing it to the next fast heartbeat stops that, it'll happen on
// our timer thread.
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", Registration = "OLD" };
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_DatabaseAircraft = new BaseStationAircraft() { ModeS = "ABC123", Registration = "NEW" };
_Database.Raise(r => r.FileNameChanged += null, EventArgs.Empty);
Assert.AreEqual(1, _FetchedHandler.CallCount);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
Assert.AreEqual(2, _FetchedHandler.CallCount);
var lastArgs = _FetchedHandler.AllArgs[1].Value;
Assert.AreSame(_DatabaseAircraft, lastArgs.Aircraft);
}
#endregion
#region AutoConfigPictureFolderCache_CacheConfigurationChanged
[TestMethod]
public void AircraftDetailFetcher_AutoConfigPictureFolderCache_CacheConfigurationChanged_Refetches_All_Details()
{
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", Registration = "ABC", FlightsCount = 42 };
_PictureManagerReg = null;
_PictureManagerIcao24 = "ABC123";
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_PictureManagerReg = "ABC";
_AutoConfigPictureFolderCache.Raise(r => r.CacheConfigurationChanged += null, EventArgs.Empty);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
Assert.AreEqual(2, _FetchedHandler.CallCount);
var lastEvent = _FetchedHandler.AllArgs[1];
Assert.AreSame(_DatabaseAircraftAndFlights, lastEvent.Value.Aircraft);
Assert.AreEqual("ABC123", lastEvent.Value.Icao24);
Assert.AreEqual(42, lastEvent.Value.FlightsCount);
Assert.AreSame(_PictureDetail, lastEvent.Value.Picture);
}
[TestMethod]
public void AircraftDetailFetcher_AutoConfigPictureFolderCache_CacheConfigurationChanged_Does_Not_Rerun_Database_Search()
{
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", Registration = "ABC" };
_PictureManagerReg = "ABC";
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_AutoConfigPictureFolderCache.Raise(r => r.CacheConfigurationChanged += null, EventArgs.Empty);
_AircraftPictureManager.Verify(r => r.FindPicture(_PictureFolderCache.Object, "ABC123", "ABC", It.IsAny<PictureDetail>()), Times.Exactly(2));
Assert.AreEqual("ABC123", _GetManyAircraftAndFlightsByCodes.Single());
}
[TestMethod]
public void AircraftDetailFetcher_StandingDataManager_AutoConfigPictureFolderCache_CacheConfigurationChanged_Exceptions_Get_Logged_But_Do_Not_Bubble_Up()
{
var messageLogged = false;
_PictureManagerIcao24 = "ABC123";
_Log.Setup(r => r.WriteLine(It.IsAny<string>())).Callback((string x) => { messageLogged = true; });
_Log.Setup(r => r.WriteLine(It.IsAny<string>(), It.IsAny<object[]>())).Callback((string x, object[] args) => { messageLogged = true; });
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", Registration = "ABC" };
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_PictureManagerThrowException = true;
_AutoConfigPictureFolderCache.Raise(r => r.CacheConfigurationChanged += null, EventArgs.Empty);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
Assert.IsTrue(messageLogged);
}
#endregion
#region StandingDataManager_LoadCompleted
[TestMethod]
public void StandingDataManager_LoadCompleted_Forces_Refetch_Of_All_AircraftTypes()
{
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", ICAOTypeCode = "B747", FlightsCount = 99 };
_PictureManagerIcao24 = "ABC123";
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
Assert.AreEqual(2, _FetchedHandler.CallCount);
_FindAircraftType = "B747";
_StandingDataManager.Raise(r => r.LoadCompleted += null, EventArgs.Empty);
Assert.AreEqual(3, _FetchedHandler.CallCount);
var lastEventArgs = _FetchedHandler.Args.Value;
Assert.AreSame(_DatabaseAircraftAndFlights, lastEventArgs.Aircraft);
Assert.AreEqual("ABC123", lastEventArgs.Icao24);
Assert.AreSame(_AircraftType, lastEventArgs.AircraftType);
Assert.AreEqual(99, lastEventArgs.FlightsCount);
Assert.AreSame(_PictureDetail, lastEventArgs.Picture);
}
[TestMethod]
public void StandingDataManager_LoadCompleted_Does_Not_Rerun_A_Database_Search()
{
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", ICAOTypeCode = "B747" };
_FindAircraftType = "B747";
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_StandingDataManager.Raise(r => r.LoadCompleted += null, EventArgs.Empty);
_StandingDataManager.Verify(r => r.FindAircraftType("B747"), Times.Exactly(2));
Assert.AreEqual("ABC123", _GetManyAircraftAndFlightsByCodes.Single());
}
[TestMethod]
public void StandingDataManager_LoadCompleted_Exceptions_Get_Logged_But_Do_Not_Bubble_Up()
{
var messageLogged = false;
_Log.Setup(r => r.WriteLine(It.IsAny<string>())).Callback((string x) => { messageLogged = true; });
_Log.Setup(r => r.WriteLine(It.IsAny<string>(), It.IsAny<object[]>())).Callback((string x, object[] args) => { messageLogged = true; });
_DatabaseAircraftAndFlights = new BaseStationAircraftAndFlightsCount() { ModeS = "ABC123", ICAOTypeCode = "B747" };
_Fetcher.RegisterAircraft(_Aircraft.Object);
_Heartbeat.Raise(r => r.FastTick += null, EventArgs.Empty);
_StandingDataManager.Setup(r => r.FindAircraftType(It.IsAny<string>()))
.Callback((string code) => { throw new InvalidOperationException(); });
_StandingDataManager.Raise(r => r.LoadCompleted += null, EventArgs.Empty);
Assert.IsTrue(messageLogged);
}
#endregion
}
}
| {
"content_hash": "eca2127d7ca3d2a2b1f33af2c6120e12",
"timestamp": "",
"source": "github",
"line_count": 892,
"max_line_length": 749,
"avg_line_length": 52,
"alnum_prop": 0.6625991721283201,
"repo_name": "VincentFortuneDeng/VirtualRadarSource2.0.2",
"id": "db01c61566f735bee529cec493d4b44b8e3880c5",
"size": "46387",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Test/Test.VirtualRadar.Library/AircraftDetailFetcherTests.cs",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C#",
"bytes": "6989162"
},
{
"name": "CSS",
"bytes": "100628"
},
{
"name": "JavaScript",
"bytes": "4674074"
},
{
"name": "Shell",
"bytes": "10553"
}
],
"symlink_target": ""
} |
Rails.application.routes.draw do
devise_for :admin_users, ActiveAdmin::Devise.config
ActiveAdmin.routes(self)
root "pages#home"
get '/about', to: 'pages#about', as: :about
resources :looking, only: [:index, :show]
resources :missing, only: [:index, :show]
end
| {
"content_hash": "5319335a7fa410102d5221f43fb1155b",
"timestamp": "",
"source": "github",
"line_count": 12,
"max_line_length": 53,
"avg_line_length": 23,
"alnum_prop": 0.6956521739130435,
"repo_name": "erdostom/migrationaid",
"id": "de85ecd6709707e78fdc500296276938b4aff079",
"size": "276",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "config/routes.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "1336"
},
{
"name": "CoffeeScript",
"bytes": "29"
},
{
"name": "HTML",
"bytes": "14029"
},
{
"name": "JavaScript",
"bytes": "638"
},
{
"name": "Ruby",
"bytes": "77608"
}
],
"symlink_target": ""
} |
GUI Editor
client
dx_editbox.lua
creates a dx editbox widget for use in the right click menus
--]]--------------------------------------------------
local gKeysPressed = {}
local gCapslock = false
DX_Editbox = {}
DX_Editbox.__index = DX_Editbox
DX_Editbox.instances = {}
DX_Editbox.inUse =
function()
for _,e in ipairs(DX_Editbox.instances) do
if e:visible() and e.edit then
return true
end
end
return false
end
function DX_Editbox:create(x, y, w, h, text)
local new = setmetatable(
{
x = x,
y = y,
width = w,
height = h,
text = text,
scale = 1,
font = "default",
alignment = {
horizontal = "left",
vertical = "top"
},
textColour = {255, 255, 255, 255},
backgroundEditColour = {255, 255, 255, 50},
highlightColour = {255, 255, 255, 50},
caratColour = {0, 0, 200, 255},
caratBlink = 0,
filter = gFilters.characters,
visible_ = false,
postGUI = true,
enabled_ = true,
selected = {},
},
DX_Editbox
)
DX_Editbox.instances[#DX_Editbox.instances + 1] = new
return new
end
function DX_Editbox:getEditableTextDimensions()
if self.replace then
local s,e = string.find(self.text, self.replace, 0, false)
if s and e then
local text = self.text
local height = dxGetFontHeight(self.scale, self.font)
local startY = self.y
local prefix = string.sub(text, 1, s - 1)
local suffix = string.sub(text, e + 1)
-- find all instances of \n before the %value match
local _, count = string.gsub(prefix, "\n", "")
if count and count > 0 then
startY = startY + (height * count)
local s2, e2 = string.find(string.reverse(prefix), "\n", 0, false)
outputDebug("find in (".. string.reverse(prefix) ..") "..tostring(s2), "MULTILINE_EDITBOX")
if s2 and e2 then
prefix = string.sub(prefix, -s2)
outputDebug("prefix: '"..tostring(prefix).."'", "MULTILINE_EDITBOX")
end
end
-- count all instances of \n after the %value match
_, count2 = string.gsub(suffix, "\n", "")
local startX = dxGetTextWidth(prefix, self.scale, self.font) + self.x
local width = dxGetTextWidth(self.edit and self.edit.text or self:getReplacement(), self.scale, self.font)
if self.alignment.vertical == "center" then
startY = (self.y + (self.height / 2)) - ((height * (count + 1 + count2)) / 2) + (height * count)
-- multi line won't work with this alignment - here's my number, fix later maybe
elseif self.alignment.vertical == "bottom" then
startY = self.y + self.height - height
end
width = math.min(width, self.width - (startX - self.x))
local buffer = 1
return startX - buffer, startY, width + (buffer * 2), height
else
--outputDebugString("DX_Editbox:getEditableTextDimensions: error looking for '"..tostring(self.replace).."' in '"..tostring(self.text).."'")
end
end
return self.x, self.y, self.width, self.height
end
function DX_Editbox:getEditCaratDrawPosition()
return self:getPositionFromCharacterIndex(self:carat(), true)
end
function DX_Editbox:getPositionFromCharacterIndex(index, useVisible)
if self.edit then
--local t = self:getVisibleEditText()
--local text = string.sub(self.edit.text, 0, index)
--local cut = self.edit.cutPosition and self.edit.cutPosition + 1 or 1
local startIndex = self.edit.visible.startIndex or 1
--local text = string.sub(self.edit.text, useVisible and cut or 1, index)
local text = string.sub(self.edit.text, useVisible and startIndex or 1, index)
local width = dxGetTextWidth(text, self.scale, self.font)
--if width > 0 then
--width = width + 2
--end
return width
end
end
function DX_Editbox:visible(v)
if v ~= nil then
self.visible_ = v
else
return self.visible_
end
end
function DX_Editbox:position(x, y)
if x then
self.x = x
self.y = y
else
return self.x, self.y
end
end
function DX_Editbox:size(width, height)
if width then
self.width = width
self.height = height
else
return self.width, self.height
end
end
function DX_Editbox:enabled(value)
if value ~= nil then
self.enabled_ = value
else
return self.enabled_
end
end
function DX_Editbox:setReplacement(replace, replaceWith, ...)
self.replace = replace
self.replaceWith = replaceWith
self.replaceWithArgs = {...}
end
function DX_Editbox:getReplacement()
if self.replaceWithArgs then
return self.replaceWith(unpack(self.replaceWithArgs))
else
return self.replaceWith()
end
return
end
function DX_Editbox:startEditing(x, y, w, h)
self.edit = {}
self.edit.x = x
self.edit.y = y
self.edit.w = w
self.edit.h = h
self.edit.editable = true
if self.replace then
self.edit.text = tostring(self:getReplacement())
else
self.edit.text = self.text
end
self.edit.visible = {
startIndex = 1
}
--self:carat(#self.edit.text)
self:carat(0)
--self.edit.visibleStartIndex = 1
if self.onEditStart then
self.onEditStart()
end
guiSetInputMode("no_binds")
end
function DX_Editbox:stopEditing()
if not self.edit then
return
end
if self.replace then
else
self.text = self.edit.text
end
if self.onEditStop then
self.onEditStop(self)
end
self.edit = nil
self.selected = {}
if not DX_Editbox.inUse() then
guiSetInputMode(gDefaultInputMode)
end
if self.onEditStopped then
self.onEditStopped(self)
end
end
function DX_Editbox:onEditedHandler(added)
if added and not filterInput(self.filter, self.edit.text) then
self.edit.text = string.sub(self.edit.text, 0, self:carat() - 1) .. string.sub(self.edit.text, self:carat() + 1)
self:carat(self:carat() - 1)
return
end
self.edit.x, self.edit.y, self.edit.w, self.edit.h = self:getEditableTextDimensions()
if self.onEdited then
self.onEdited(self)
end
end
function DX_Editbox:setCaratBlink(alpha)
self.caratBlink = getTickCount()
if alpha then
self.caratColour[4] = alpha
else
self.caratColour[4] = self.caratColour[4] > 0 and 0 or 255
end
end
function DX_Editbox:getVisibleEditText()
local text = ""
if self.edit then
self.edit.cutPosition = nil
end
if self.replace then
text = self.edit and tostring(self.edit.text) or tostring(self:getReplacement())
elseif self.edit then
text = tostring(self.edit.text)
end
if #text > 0 then
local rw = dxGetTextWidth(text, self.scale, self.font)
local cut
local size = #text
if rw > self.width then
--[[
-- from the end going backwards
for i = 1, size do
rw = dxGetTextWidth(text:sub(i, size), self.scale, self.font)
if rw <= self.width then
cut = i
break
end
end
]]
if self.edit.visible.startIndex then
for i = size, self.edit.visible.startIndex, -1 do
rw = dxGetTextWidth(text:sub(self.edit.visible.startIndex, i), self.scale, self.font)
if rw <= self.width then
--cut = i
self.edit.visible.endIndex = i
return text:sub(self.edit.visible.startIndex, self.edit.visible.endIndex)
--break
end
end
else
for i = 1, self.edit.visible.endIndex do
rw = dxGetTextWidth(text:sub(i, self.edit.visible.endIndex), self.scale, self.font)
if rw <= self.width then
--cut = i
self.edit.visible.startIndex = i
return text:sub(self.edit.visible.startIndex, self.edit.visible.endIndex)
--break
end
end
end
end
--[[
--if cut < size then
if cut then
--text = text:sub(cut, size)
text = text:sub(self.edit.visible.startIndex, cut)
if self.edit then
self.edit.cutPosition = cut - 1
--self.edit.visible.endIndex = cut
end
return text
end
]]
if self.edit then
self.edit.visible.startIndex = 1
self.edit.visible.endIndex = #text
end
return text
end
--[[
if self.replace then
local replacement = self.edit and self.edit.text or self:getReplacement()
replacement = tostring(replacement)
local rw = dxGetTextWidth(replacement, self.scale, self.font)
local cut = 1
local size = #replacement
if rw > self.width then
for i = 1, size do
rw = dxGetTextWidth(replacement:sub(i, size), self.scale, self.font)
if rw <= self.width then
cut = i
break
end
end
end
if cut < size then
t = replacement:sub(cut, size)
if self.edit then
self.edit.cutPosition = cut - 1
end
end
elseif self.edit then
t = self.edit.text
--else
--t = self.text
end
]]
return ""
end
function DX_Editbox:getVisibleText()
local t = ""
if self.replace then
t = self.text:gsub(self.replace, self:getVisibleEditText())
elseif self.edit then
t = self:getVisibleEditText()
else
t = self.text
end
return t
end
function DX_Editbox:carat(position)
if self.edit then
if position then
local oldPosition = self.edit.carat
self.edit.carat = position
if not oldPosition then
return
end
if position < oldPosition then
if position >= 0 then
if self.edit.visible.startIndex and position < (self.edit.visible.startIndex - 1) then
self.edit.visible.startIndex = position + 1
self.edit.visible.endIndex = nil
self:getVisibleEditText()
end
end
elseif position > oldPosition then
if position <= #self.edit.text then
if position > self.edit.visible.endIndex then
self.edit.visible.endIndex = position
self.edit.visible.startIndex = nil
self:getVisibleEditText()
end
end
end
else
return self.edit.carat
end
end
end
function DX_Editbox:draw()
if self:visible() then
local t = self:getVisibleText()
if self.edit then
dxDrawRectangle(self.edit.x, self.edit.y, self.edit.w, self.edit.h, tocolor(unpack(self.backgroundEditColour)), self.postGUI)
local w = self:getEditCaratDrawPosition()
if self.edit.x + w <= self.x + self.width then
dxDrawLine(0,0,0,0, tocolor(255, 255, 255, 255), 0)
dxDrawLine(self.edit.x + w, self.edit.y, self.edit.x + w, self.edit.y + self.edit.h, tocolor(unpack(self.caratColour)), 2, self.postGUI)
end
end
--[[
local t = ""
if self.replace then
local replacement = self.edit and self.edit.text or self:getReplacement()
replacement = tostring(replacement)
local rw = dxGetTextWidth(replacement, self.scale, self.font)
local cut = 0
local size = #replacement
if rw > self.width then
for i = 1, #replacement do
rw = dxGetTextWidth(replacement:sub(i, size), self.scale, self.font)
if rw <= self.width then
cut = i
break
end
end
end
if cut < size then
replacement = replacement:sub(cut, size)
if self.edit then
self.edit.cutPosition = cut
end
end
t = self.text:gsub(self.replace, replacement)
elseif self.edit then
t = self.edit.text
else
t = self.text
end
]]
dxDrawText(
t,
self.x,
self.y,
self.x + self.width,
self.y + self.height,
tocolor(unpack(self.textColour)),
self.scale,
self.font,
self.alignment.horizontal,
self.alignment.vertical,
true,
false,
self.postGUI
)
if self.edit then
if self.selected then
if self.selected.start and self.selected.finish then
local x = self:getPositionFromCharacterIndex(math.min(self.selected.start, self.selected.finish), true)
local w = self:getPositionFromCharacterIndex(math.max(self.selected.start, self.selected.finish), true) - x
dxDrawRectangle(self.edit.x + x, self.edit.y, w, self.edit.h, tocolor(unpack(self.highlightColour)), self.postGUI)
end
end
local w = self:getEditCaratDrawPosition()
if self.edit.x + w <= self.x + self.width then
-- fix for bizarre dx line bug
-- random (or not so random), completely unconnected lines elsewhere on the screen were taking on the
-- line width of whatever line was drawn here. So draw with a width of 1 and cross our fingers it happens on something with 1 width
dxDrawLine(0,0,0,0, tocolor(255, 255, 255, 255), 1, self.postGUI)
dxDrawLine(self.edit.x + w, self.edit.y, self.edit.x + w, self.edit.y + self.edit.h, tocolor(unpack(self.caratColour)), 2, self.postGUI)
end
end
end
end
addEventHandler("onClientDoubleClick", root,
function(button, absoluteX, absoluteY)
if not gEnabled then
return
end
if not isCursorShowing() then
return
end
if button == "left" then
for _,editbox in ipairs(DX_Editbox.instances) do
if editbox:visible() and editbox:enabled() then
local x, y, w, h = editbox:getEditableTextDimensions()
if absoluteX > x and absoluteX < (x + w) and
absoluteY > y and absoluteY < (y + h) then
if not editbox.edit then
editbox:startEditing(x, y, w, h)
break
end
else
if editbox.edit --[[and item.mouseState == Menu.mouseStates.on]] then
editbox:stopEditing()
break
end
end
end
end
end
end
)
function keyPressed(button, pressed)
if pressed then
for _,editbox in ipairs(DX_Editbox.instances) do
if editbox.edit and editbox:enabled() and (editbox.edit.editable == nil or editbox.edit.editable == true) then
local used
if button == "arrow_l" then
if editbox:carat() > 0 then
editbox:carat(editbox:carat() - 1)
--[[
if editbox.edit.visible.startIndex and editbox:carat() < (editbox.edit.visible.startIndex - 1) then
editbox.edit.visible.startIndex = editbox:carat() + 1
editbox.edit.visible.endIndex = nil
editbox:getVisibleEditText()
end
]]
used = true
end
elseif button == "arrow_r" then
if editbox:carat() < #editbox.edit.text then
editbox:carat(editbox:carat() + 1)
--[[
if editbox:carat() > editbox.edit.visible.endIndex then
editbox.edit.visible.endIndex = editbox:carat()
editbox.edit.visible.startIndex = nil
editbox:getVisibleEditText()
end
]]
used = true
end
elseif button == "backspace" then
if editbox.selected and editbox.selected.start and editbox.selected.finish and math.abs(editbox.selected.finish - editbox.selected.start) > 0 then
local oldSize = #editbox.edit.text
editbox.edit.text = string.sub(editbox.edit.text, 0, math.min(editbox.selected.finish, editbox.selected.start)) .. string.sub(editbox.edit.text, math.max(editbox.selected.finish, editbox.selected.start) + 1)
editbox:carat(math.min(editbox.selected.finish, editbox.selected.start))
editbox:onEditedHandler()
if editbox.edit.visible.endIndex then
editbox.edit.visible.startIndex = nil
editbox.edit.visible.endIndex = editbox.edit.visible.endIndex - (oldSize - #editbox.edit.text)
editbox:getVisibleEditText()
end
used = true
elseif editbox:carat() > 0 then
editbox.edit.text = string.sub(editbox.edit.text, 0, editbox:carat() - 1) .. string.sub(editbox.edit.text, editbox:carat() + 1)
editbox:carat(editbox:carat() - 1)
editbox:onEditedHandler()
if editbox.edit.visible.endIndex then
editbox.edit.visible.startIndex = nil
editbox.edit.visible.endIndex = editbox.edit.visible.endIndex - 1
editbox:getVisibleEditText()
end
used = true
end
elseif button == "delete" then
if editbox.selected and editbox.selected.start and editbox.selected.finish and math.abs(editbox.selected.finish - editbox.selected.start) > 0 then
editbox.edit.text = string.sub(editbox.edit.text, 0, math.min(editbox.selected.finish, editbox.selected.start)) .. string.sub(editbox.edit.text, math.max(editbox.selected.finish, editbox.selected.start) + 1)
editbox:carat(math.min(editbox.selected.finish, editbox.selected.start))
editbox:onEditedHandler()
used = true
elseif editbox:carat() < #editbox.edit.text then
editbox.edit.text = string.sub(editbox.edit.text, 0, editbox:carat()) .. string.sub(editbox.edit.text, editbox:carat() + 2)
editbox:onEditedHandler()
used = true
end
elseif button == "enter" then
editbox:stopEditing()
elseif button == "space" then
if editbox.selected and editbox.selected.start and editbox.selected.finish and math.abs(editbox.selected.finish - editbox.selected.start) > 0 then
keyPressed("delete", true)
keyPressed("delete", false)
end
editbox.edit.text = string.insert(editbox.edit.text, " ", editbox:carat())
editbox:carat(editbox:carat() + 1)
editbox:onEditedHandler(" ")
used = true
elseif button == "capslock" then
--gCapslock = not gCapslock
elseif button == "home" then
editbox:carat(0)
elseif button == "end" then
editbox:carat(#editbox.edit.text)
elseif gCharacterKeys[button] or gCharacterKeys[string.lower(button)] then
if editbox.selected and editbox.selected.start and editbox.selected.finish and math.abs(editbox.selected.finish - editbox.selected.start) > 0 then
keyPressed("delete", true)
keyPressed("delete", false)
end
--editbox.edit.text = string.insert(editbox.edit.text, gCapslock and string.upper(button) or button, editbox.edit.carat)
editbox.edit.text = string.insert(editbox.edit.text, button, editbox:carat())
editbox:carat(editbox:carat() + 1)
--editbox:onEditedHandler(gCapslock and string.upper(button) or button)
editbox:onEditedHandler(button)
used = true
end
if used then
editbox:setCaratBlink(255)
editbox.selected = {}
if not gKeysPressed[button] then
gKeysPressed[button] = getTickCount() + 500
else
gKeysPressed[button] = getTickCount()
end
end
end
end
else
if gKeysPressed[button] then
gKeysPressed[button] = nil
end
end
end
addEventHandler("onClientKey", root,
function(button, pressed)
if not gEnabled then
return
end
-- let onClientCharacter handle the single characters
if not gCharacterKeys[button] then
keyPressed(button, pressed)
end
end
)
addEventHandler("onClientCharacter", root,
function(c)
if not gEnabled then
return
end
keyPressed(c, true)
keyPressed(c, false)
end
)
addEventHandler("onClientRender", root,
function()
if not gEnabled then
return
end
local currentTick = getTickCount()
for _,editbox in ipairs(DX_Editbox.instances) do
if editbox.edit then
if currentTick > (editbox.caratBlink + 400) then
editbox:setCaratBlink()
end
end
end
for key,tick in pairs(gKeysPressed) do
if currentTick > (tick + 40) then
keyPressed(key, true)
end
end
end
)
addEventHandler("onClientClick", root,
function(button, state, absoluteX, absoluteY)
if not gEnabled then
return
end
if not isCursorShowing() then
return
end
if button == "left" and state == "down" then
for _,editbox in ipairs(DX_Editbox.instances) do
if editbox.edit and editbox:enabled() then
editbox.selected = {}
local x, y, w, h = editbox:getEditableTextDimensions()
--if absoluteX > x and absoluteX < (x + w) and
-- absoluteY > y and absoluteY < (y + h) then
if absoluteY > y and absoluteY < (y + h) then
local aX = absoluteX
if absoluteX < x then
aX = x
elseif absoluteX > (x + w) then
aX = x + w
end
local diff = aX - x
local t = editbox:getVisibleEditText()
for i = 1, #t do
local text = string.sub(t, 1, i)
local width = dxGetTextWidth(text, editbox.scale, editbox.font)
if width > diff then
local char = string.sub(t, i, i)
local charWidth = dxGetTextWidth(char, editbox.scale, editbox.font)
if (width - (charWidth / 2)) > diff then
editbox:carat(i - 1)
else
editbox:carat(i)
end
--if editbox.edit.cutPosition then
-- editbox:carat(editbox:carat() + editbox.edit.cutPosition)
--end
editbox:carat(editbox:carat() + editbox.edit.visible.startIndex - 1)
break
end
end
editbox.dragging = {tick = getTickCount()}
editbox.selected.start = editbox:carat()
end
end
end
elseif button == "left" and state == "up" then
for _,editbox in ipairs(DX_Editbox.instances) do
if editbox.dragging then
editbox.dragging = nil
end
end
end
end
)
addEventHandler("onClientCursorMove", root,
function(x, y, absoluteX, absoluteY)
if not gEnabled then
return
end
for _,editbox in ipairs(DX_Editbox.instances) do
if editbox.dragging and editbox.edit then
if editbox.dragging.tick < (getTickCount() - 100) then
local x, y, w, h = editbox:getEditableTextDimensions()
if absoluteX > x and absoluteX < (x + w) and
absoluteY > y and absoluteY < (y + h) then
local diff = absoluteX - x
local t = editbox:getVisibleEditText()
for i = 1, #t do
local text = string.sub(t, 0, i)
local width = dxGetTextWidth(text, editbox.scale, editbox.font)
if width > diff then
local char = string.sub(t, i, i)
local charWidth = dxGetTextWidth(char, editbox.scale, editbox.font)
if (width - (charWidth / 2)) > diff then
editbox.selected.finish = i - 1
else
editbox.selected.finish = i
end
if editbox.edit.cutPosition then
editbox.selected.finish = editbox.selected.finish + editbox.edit.cutPosition
end
break
end
end
end
end
end
end
end
) | {
"content_hash": "9d393123b59217731864a251b69c1a5e",
"timestamp": "",
"source": "github",
"line_count": 864,
"max_line_length": 234,
"avg_line_length": 25.26851851851852,
"alnum_prop": 0.6474899230487358,
"repo_name": "XJMLN/MTA-PSZ",
"id": "56fa824f0c7e131fe03f640055545ccf8fc872a1",
"size": "21887",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "resources/[PSZMTA]/[community]/guieditor/client/dx_elements/dx_editbox_modified.lua",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "18375"
},
{
"name": "FLUX",
"bytes": "103012"
},
{
"name": "HLSL",
"bytes": "152698"
},
{
"name": "HTML",
"bytes": "54395"
},
{
"name": "JavaScript",
"bytes": "153393"
},
{
"name": "Lua",
"bytes": "3183366"
}
],
"symlink_target": ""
} |
#include "Engine/Extension/Spine/SkeletonBone.h"
static void SetToSetupPose(SkeletonBone* bone)
{
Drawable* drawable = bone->drawable;
SkeletonBoneData* boneData = bone->boneData;
ADrawable_SetPosition2(drawable, boneData->x, boneData->y);
ADrawable_SetScale2 (drawable, boneData->scaleX, boneData->scaleY);
ADrawable_SetRotationZ(drawable, boneData->rotationZ);
}
static void Init(SkeletonBoneData* boneData, SkeletonBone* outBone)
{
ADrawable->Init(outBone->drawable);
outBone->boneData = boneData;
SetToSetupPose(outBone);
}
static SkeletonBone* Create(SkeletonBoneData* boneData)
{
SkeletonBone* bone = malloc(sizeof(SkeletonBone));
Init(boneData, bone);
return bone;
}
struct ASkeletonBone ASkeletonBone[1] =
{{
Create,
Init,
SetToSetupPose,
}};
| {
"content_hash": "5f9557e2952b5ea10613bdf8ed725298",
"timestamp": "",
"source": "github",
"line_count": 40,
"max_line_length": 73,
"avg_line_length": 20.875,
"alnum_prop": 0.7077844311377246,
"repo_name": "scottcgi/Mojoc",
"id": "6fadd20f2ad4799a96d3f853f6e135245d010e43",
"size": "1371",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Engine/Extension/Spine/SkeletonBone.c",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "2046425"
},
{
"name": "CMake",
"bytes": "4685"
},
{
"name": "Objective-C",
"bytes": "19252"
}
],
"symlink_target": ""
} |
package com.google.api.ads.adwords.jaxws.v201402.cm;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
*
* Query mutation results, of a {@code COMPLETED} job.
* <p>Use a {@link JobSelector} to query and return either a
* {@link BulkMutateResult} or a {@link SimpleMutateResult}. Submit only one job ID
* at a time.</p>
*
*
* <p>Java class for getResult element declaration.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <element name="getResult">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="selector" type="{https://adwords.google.com/api/adwords/cm/v201402}JobSelector" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"selector"
})
@XmlRootElement(name = "getResult")
public class MutateJobServiceInterfacegetResult {
protected JobSelector selector;
/**
* Gets the value of the selector property.
*
* @return
* possible object is
* {@link JobSelector }
*
*/
public JobSelector getSelector() {
return selector;
}
/**
* Sets the value of the selector property.
*
* @param value
* allowed object is
* {@link JobSelector }
*
*/
public void setSelector(JobSelector value) {
this.selector = value;
}
}
| {
"content_hash": "bf66b4ce9237133cc75574a7cf792984",
"timestamp": "",
"source": "github",
"line_count": 71,
"max_line_length": 126,
"avg_line_length": 26.12676056338028,
"alnum_prop": 0.613477088948787,
"repo_name": "nafae/developer",
"id": "82f34116f0de6ad4ce610b3d66e87c7fbb41558c",
"size": "1855",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201402/cm/MutateJobServiceInterfacegetResult.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "127846798"
},
{
"name": "Perl",
"bytes": "28418"
}
],
"symlink_target": ""
} |
package org.encuestame.mvc.controller.json.v1;
/**
* Created by jpicado on 07/06/15.
*/
public class LoginStatus {
private final boolean loggedIn;
private final String username;
public LoginStatus(boolean loggedIn, String username) {
this.loggedIn = loggedIn;
this.username = username;
}
public boolean isLoggedIn() {
return loggedIn;
}
public String getUsername() {
return username;
}
}
| {
"content_hash": "e3cbb98f9adddcd79893143b8538d72f",
"timestamp": "",
"source": "github",
"line_count": 25,
"max_line_length": 59,
"avg_line_length": 18.44,
"alnum_prop": 0.6464208242950108,
"repo_name": "cristiani/encuestame",
"id": "0b0bd8887aa7b4e9dfe86111a65f2448ba97d0ab",
"size": "1109",
"binary": false,
"copies": "1",
"ref": "refs/heads/development",
"path": "enme-mvc/json/json-api1/src/main/java/org/encuestame/mvc/controller/json/v1/LoginStatus.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "9772228"
},
{
"name": "HTML",
"bytes": "552"
},
{
"name": "Java",
"bytes": "4752329"
},
{
"name": "JavaScript",
"bytes": "7194351"
},
{
"name": "Ruby",
"bytes": "1012"
},
{
"name": "Shell",
"bytes": "4346"
}
],
"symlink_target": ""
} |
#
# OpenSSL/crypto/Makefile
#
DIR= crypto
TOP= ..
CC= cc
INCLUDE= -I. -I$(TOP) -I../include $(ZLIB_INCLUDE)
# INCLUDES targets sudbirs!
INCLUDES= -I.. -I../.. -I../asn1 -I../evp -I../../include $(ZLIB_INCLUDE)
CFLAG= -g
MAKEDEPPROG= makedepend
MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
MAKEFILE= Makefile
RM= rm -f
AR= ar r
RECURSIVE_MAKE= [ -n "$(SDIRS)" ] && for i in $(SDIRS) ; do \
(cd $$i && echo "making $$target in $(DIR)/$$i..." && \
$(MAKE) -e TOP=../.. DIR=$$i INCLUDES='$(INCLUDES)' $$target ) || exit 1; \
done;
PEX_LIBS=
EX_LIBS=
CFLAGS= $(INCLUDE) $(CFLAG)
ASFLAGS= $(INCLUDE) $(ASFLAG)
AFLAGS=$(ASFLAGS)
CPUID_OBJ=mem_clr.o
LIBS=
GENERAL=Makefile README crypto-lib.com install.com
LIB= $(TOP)/libcrypto.a
SHARED_LIB= libcrypto$(SHLIB_EXT)
LIBSRC= cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c cpt_err.c ebcdic.c uid.c o_time.c o_str.c o_dir.c
LIBOBJ= cryptlib.o mem.o mem_dbg.o cversion.o ex_data.o cpt_err.o ebcdic.o uid.o o_time.o o_str.o o_dir.o $(CPUID_OBJ)
SRC= $(LIBSRC)
EXHEADER= crypto.h opensslv.h opensslconf.h ebcdic.h symhacks.h \
ossl_typ.h
HEADER= cryptlib.h buildinf.h md32_common.h o_time.h o_str.h o_dir.h $(EXHEADER)
ALL= $(GENERAL) $(SRC) $(HEADER)
top:
@(cd ..; $(MAKE) DIRS=$(DIR) all)
all: shared
buildinf.h: ../Makefile
( echo "#ifndef MK1MF_BUILD"; \
echo ' /* auto-generated by crypto/Makefile for crypto/cversion.c */'; \
echo ' #define CFLAGS "$(CC) $(CFLAG)"'; \
echo ' #define PLATFORM "$(PLATFORM)"'; \
echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
echo '#endif' ) >buildinf.h
x86cpuid.s: x86cpuid.pl perlasm/x86asm.pl
$(PERL) x86cpuid.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
applink.o: $(TOP)/ms/applink.c
$(CC) $(CFLAGS) -c -o $@ $(TOP)/ms/applink.c
uplink.o: $(TOP)/ms/uplink.c applink.o
$(CC) $(CFLAGS) -c -o $@ $(TOP)/ms/uplink.c
uplink-cof.s: $(TOP)/ms/uplink.pl
$(PERL) $(TOP)/ms/uplink.pl coff > $@
x86_64cpuid.s: x86_64cpuid.pl
$(PERL) x86_64cpuid.pl $(PERLASM_SCHEME) > $@
ia64cpuid.s: ia64cpuid.S
$(CC) $(CFLAGS) -E ia64cpuid.S > $@
ppccpuid.s: ppccpuid.pl; $(PERL) ppccpuid.pl $(PERLASM_SCHEME) $@
alphacpuid.s: alphacpuid.pl
$(PERL) $< | $(CC) -E - | tee $@ > /dev/null
testapps:
[ -z "$(THIS)" ] || ( if echo $(SDIRS) | fgrep ' des '; \
then cd des && $(MAKE) -e des; fi )
[ -z "$(THIS)" ] || ( cd pkcs7 && $(MAKE) -e testapps );
@if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
subdirs:
@target=all; $(RECURSIVE_MAKE)
files:
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
@target=files; $(RECURSIVE_MAKE)
links:
@$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
@$(PERL) $(TOP)/util/mklink.pl ../test $(TEST)
@$(PERL) $(TOP)/util/mklink.pl ../apps $(APPS)
@target=links; $(RECURSIVE_MAKE)
# lib: $(LIB): are splitted to avoid end-less loop
lib: $(LIB)
@touch lib
$(LIB): $(LIBOBJ)
$(AR) $(LIB) $(LIBOBJ)
$(RANLIB) $(LIB) || echo Never mind.
shared: buildinf.h lib subdirs
if [ -n "$(SHARED_LIBS)" ]; then \
(cd ..; $(MAKE) $(SHARED_LIB)); \
fi
libs:
@target=lib; $(RECURSIVE_MAKE)
install:
@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
@headerlist="$(EXHEADER)"; for i in $$headerlist ;\
do \
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
done;
@target=install; $(RECURSIVE_MAKE)
lint:
@target=lint; $(RECURSIVE_MAKE)
depend:
@[ -z "$(THIS)" -o -f buildinf.h ] || touch buildinf.h # fake buildinf.h if it does not exist
@[ -z "$(THIS)" ] || $(MAKEDEPEND) -- $(CFLAG) $(INCLUDE) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
@[ -z "$(THIS)" -o -s buildinf.h ] || rm buildinf.h
@[ -z "$(THIS)" ] || (set -e; target=depend; $(RECURSIVE_MAKE) )
@if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
clean:
rm -f buildinf.h *.s *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
@target=clean; $(RECURSIVE_MAKE)
dclean:
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
mv -f Makefile.new $(MAKEFILE)
rm -f opensslconf.h
@target=dclean; $(RECURSIVE_MAKE)
# DO NOT DELETE THIS LINE -- make depend depends on it.
cpt_err.o: ../include/openssl/bio.h ../include/openssl/crypto.h
cpt_err.o: ../include/openssl/e_os2.h ../include/openssl/err.h
cpt_err.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
cpt_err.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
cpt_err.o: ../include/openssl/safestack.h ../include/openssl/stack.h
cpt_err.o: ../include/openssl/symhacks.h cpt_err.c
cryptlib.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
cryptlib.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
cryptlib.o: ../include/openssl/err.h ../include/openssl/lhash.h
cryptlib.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
cryptlib.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
cryptlib.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.c
cryptlib.o: cryptlib.h
cversion.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
cversion.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
cversion.o: ../include/openssl/err.h ../include/openssl/lhash.h
cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
cversion.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
cversion.o: ../include/openssl/stack.h ../include/openssl/symhacks.h buildinf.h
cversion.o: cryptlib.h cversion.c
ebcdic.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h ebcdic.c
ex_data.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
ex_data.o: ../include/openssl/err.h ../include/openssl/lhash.h
ex_data.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
ex_data.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
ex_data.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
ex_data.o: ex_data.c
mem.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
mem.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
mem.o: ../include/openssl/err.h ../include/openssl/lhash.h
mem.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
mem.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
mem.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
mem.o: mem.c
mem_clr.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
mem_clr.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
mem_clr.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
mem_clr.o: ../include/openssl/stack.h ../include/openssl/symhacks.h mem_clr.c
mem_dbg.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
mem_dbg.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
mem_dbg.o: ../include/openssl/err.h ../include/openssl/lhash.h
mem_dbg.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
mem_dbg.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
mem_dbg.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
mem_dbg.o: mem_dbg.c
o_dir.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/opensslconf.h
o_dir.o: LPdir_unix.c o_dir.c o_dir.h
o_str.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/opensslconf.h
o_str.o: o_str.c o_str.h
o_time.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_time.c
o_time.o: o_time.h
uid.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
uid.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
uid.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
uid.o: ../include/openssl/stack.h ../include/openssl/symhacks.h uid.c
| {
"content_hash": "40161f9238e6d810e4686160d7b6a1c7",
"timestamp": "",
"source": "github",
"line_count": 201,
"max_line_length": 118,
"avg_line_length": 39.930348258706466,
"alnum_prop": 0.646897582855719,
"repo_name": "jiangzhu1212/oooii",
"id": "f5b42cd433618d92a1a476a31ceb4919d57dfa8a",
"size": "8026",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "Ouroboros/External/OpenSSL/openssl-1.0.0e/crypto/Makefile",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Assembly",
"bytes": "1166718"
},
{
"name": "AutoIt",
"bytes": "2656"
},
{
"name": "C",
"bytes": "19126511"
},
{
"name": "C#",
"bytes": "5483"
},
{
"name": "C++",
"bytes": "6379404"
},
{
"name": "CMake",
"bytes": "43005"
},
{
"name": "CSS",
"bytes": "20006"
},
{
"name": "Emacs Lisp",
"bytes": "1684"
},
{
"name": "Groff",
"bytes": "40632"
},
{
"name": "HTML",
"bytes": "502585"
},
{
"name": "Java",
"bytes": "121265"
},
{
"name": "JavaScript",
"bytes": "21232"
},
{
"name": "Makefile",
"bytes": "730389"
},
{
"name": "Objective-C",
"bytes": "295007"
},
{
"name": "Perl",
"bytes": "2635172"
},
{
"name": "Perl6",
"bytes": "28115"
},
{
"name": "Prolog",
"bytes": "30361"
},
{
"name": "Protocol Buffer",
"bytes": "2825"
},
{
"name": "Scheme",
"bytes": "8727"
},
{
"name": "Shell",
"bytes": "741317"
},
{
"name": "Visual Basic",
"bytes": "7995"
},
{
"name": "XS",
"bytes": "4587"
},
{
"name": "eC",
"bytes": "5223"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_45) on Mon Aug 31 00:21:51 CST 2015 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>net.cassite.style Class Hierarchy</title>
<meta name="date" content="2015-08-31">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="net.cassite.style Class Hierarchy";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li>Class</li>
<li>Use</li>
<li class="navBarCell1Rev">Tree</li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li><a href="../../../net/cassite/style/aggregation/package-tree.html">Next</a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?net/cassite/style/package-tree.html" target="_top">Frames</a></li>
<li><a href="package-tree.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 class="title">Hierarchy For Package net.cassite.style</h1>
<span class="packageHierarchyLabel">Package Hierarchies:</span>
<ul class="horizontal">
<li><a href="../../../overview-tree.html">All Packages</a></li>
</ul>
</div>
<div class="contentContainer">
<h2 title="Class Hierarchy">Class Hierarchy</h2>
<ul>
<li type="circle">java.lang.Object
<ul>
<li type="circle">java.util.AbstractMap<K,V> (implements java.util.Map<K,V>)
<ul>
<li type="circle">java.util.HashMap<K,V> (implements java.lang.Cloneable, java.util.Map<K,V>, java.io.Serializable)
<ul>
<li type="circle">java.util.LinkedHashMap<K,V> (implements java.util.Map<K,V>)
<ul>
<li type="circle">net.cassite.style.<a href="../../../net/cassite/style/JSONLike.html" title="class in net.cassite.style"><span class="typeNameLink">JSONLike</span></a><K,V></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li type="circle">net.cassite.style.<a href="../../../net/cassite/style/Async.html" title="class in net.cassite.style"><span class="typeNameLink">Async</span></a><R></li>
<li type="circle">net.cassite.style.<a href="../../../net/cassite/style/AsyncGroup.html" title="class in net.cassite.style"><span class="typeNameLink">AsyncGroup</span></a></li>
<li type="circle">net.cassite.style.<a href="../../../net/cassite/style/Core.html" title="class in net.cassite.style"><span class="typeNameLink">Core</span></a></li>
<li type="circle">net.cassite.style.<a href="../../../net/cassite/style/def.html" title="class in net.cassite.style"><span class="typeNameLink">def</span></a><R></li>
<li type="circle">net.cassite.style.<a href="../../../net/cassite/style/Entry.html" title="class in net.cassite.style"><span class="typeNameLink">Entry</span></a><K2,V2></li>
<li type="circle">net.cassite.style.<a href="../../../net/cassite/style/ForSupport.ToSupport.html" title="class in net.cassite.style"><span class="typeNameLink">ForSupport.ToSupport</span></a><N></li>
<li type="circle">net.cassite.style.<a href="../../../net/cassite/style/LoopInfo.html" title="class in net.cassite.style"><span class="typeNameLink">LoopInfo</span></a><R></li>
<li type="circle">net.cassite.style.<a href="../../../net/cassite/style/ptr.html" title="class in net.cassite.style"><span class="typeNameLink">ptr</span></a><T></li>
<li type="circle">net.cassite.style.<a href="../../../net/cassite/style/Style.html" title="class in net.cassite.style"><span class="typeNameLink">Style</span></a>
<ul>
<li type="circle">net.cassite.style.<a href="../../../net/cassite/style/$.html" title="class in net.cassite.style"><span class="typeNameLink">$</span></a></li>
<li type="circle">net.cassite.style.<a href="../../../net/cassite/style/ForSupport.html" title="class in net.cassite.style"><span class="typeNameLink">ForSupport</span></a><N></li>
<li type="circle">net.cassite.style.<a href="../../../net/cassite/style/IfBlock.html" title="class in net.cassite.style"><span class="typeNameLink">IfBlock</span></a><T,INIT></li>
<li type="circle">net.cassite.style.<a href="../../../net/cassite/style/SwitchBlock.html" title="class in net.cassite.style"><span class="typeNameLink">SwitchBlock</span></a><T,R></li>
</ul>
</li>
<li type="circle">java.lang.Throwable (implements java.io.Serializable)
<ul>
<li type="circle">java.lang.Exception
<ul>
<li type="circle">java.lang.RuntimeException
<ul>
<li type="circle">net.cassite.style.<a href="../../../net/cassite/style/StyleRuntimeException.html" title="class in net.cassite.style"><span class="typeNameLink">StyleRuntimeException</span></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<h2 title="Interface Hierarchy">Interface Hierarchy</h2>
<ul>
<li type="circle">net.cassite.style.<a href="../../../net/cassite/style/var.html" title="interface in net.cassite.style"><span class="typeNameLink">var</span></a></li>
</ul>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li>Class</li>
<li>Use</li>
<li class="navBarCell1Rev">Tree</li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li><a href="../../../net/cassite/style/aggregation/package-tree.html">Next</a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?net/cassite/style/package-tree.html" target="_top">Frames</a></li>
<li><a href="package-tree.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
| {
"content_hash": "326e6e03a257d5c48a406574be879f92",
"timestamp": "",
"source": "github",
"line_count": 183,
"max_line_length": 206,
"avg_line_length": 42.69398907103825,
"alnum_prop": 0.6505823627287853,
"repo_name": "NatureCode/Style",
"id": "cbcde97f42a05f87c407be578d72ef9b1be9e676",
"size": "7813",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "doc/net/cassite/style/package-tree.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "444196"
}
],
"symlink_target": ""
} |
import os
import platform
from setuptools import setup
install_requires = ['mongomock', 'pymongo', 'pprintpp']
if platform.python_version() < '2.7':
install_requires.append('unittest2')
setup(
name='whiskeynode',
version='0.1',
url='https://github.com/texuf/whiskeynode',
classifiers = [
'Programming Language :: Python :: 2.7',
],
description='A graph ORM for MongoDB with a weak-reference cache.',
license='Apache 2.0',
author='Austin Ellis',
author_email='[email protected]',
py_modules=['whiskeynode'],
install_requires=install_requires,
scripts=[],
namespace_packages=[]
)
| {
"content_hash": "1cc32e3f1d18e5a9be8730934bc9647a",
"timestamp": "",
"source": "github",
"line_count": 26,
"max_line_length": 73,
"avg_line_length": 26.46153846153846,
"alnum_prop": 0.625,
"repo_name": "texuf/whiskeynode",
"id": "14a66caf8cb5cb2ae205ab3fd8c0c97d52c48915",
"size": "688",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "setup.py",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Python",
"bytes": "112086"
}
],
"symlink_target": ""
} |
<ul class="UIAPIPlugin-toc">
<li><a href="#overview">Overview</a></li>
<li><a href="#options">Options</a></li>
<li><a href="#events">Events</a></li>
<li><a href="#methods">Methods</a></li>
<li><a href="#theming">Theming</a></li>
</ul>
<div class="UIAPIPlugin">
<h1>jQuery UI Draggable</h1>
<div id="overview">
<h2 class="top-header">Overview</h2>
<div id="overview-main">
<p>The jQuery UI Draggable plugin makes selected elements draggable by mouse.</p>
<p>Draggable elements gets a class of <code>ui-draggable</code>. During drag the element also gets a class of <code>ui-draggable-dragging</code>. If you want not just drag, but drag-and-drop, see the jQuery UI Droppable plugin, which provides a drop target for draggables.</p>
<p>All callbacks (start, stop, drag) receive two arguments: The original browser event and a prepared ui object, view below for a documentation of this object (if you name your second argument 'ui'):</p>
<ul>
<li><b>ui.helper</b> - the jQuery object representing the helper that's being dragged</li>
<li><b>ui.position</b> - current position of the helper as { top, left } object, relative to the offset element</li>
<li><b>ui.offset</b> - current absolute position of the helper as { top, left } object, relative to page</li>
</ul>
<p><br />
</p>
<p>To manipulate the position of a draggable during drag, you can either <a href="http://jsbin.com/etako/edit" class="external text" title="http://jsbin.com/etako/edit">use a wrapper as the draggable helper</a> and position the wrapped element with absolute positioning, or you can correct internal values like so: <code>$(this).data('draggable').offset.click.top -= x</code>.</p>
</div>
<div id="overview-dependencies">
<h3>Dependencies</h3>
<ul>
<li>UI Core</li>
<li>UI Widget</li>
<li>UI Mouse</li>
</ul>
</div>
<div id="overview-example">
<h3>Example</h3>
<div id="overview-example" class="example">
<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
<p><div id="demo" class="tabs-container" rel="170">
Initialize a draggable with default options.<br />
</p>
<pre>$("#draggable").draggable();
</pre>
<p></div><div id="source" class="tabs-container">
</p>
<pre><!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<style type="text/css">
#draggable { width: 100px; height: 70px; background: silver; }
</style>
<script>
$(document).ready(function() {
$("#draggable").draggable();
});
</script>
</head>
<body style="font-size:62.5%;">
<div id="draggable">Drag me</div>
</body>
</html>
</pre>
<p></div>
</p><p></div>
</div>
</div>
<div id="options">
<h2 class="top-header">Options</h2>
<ul class="options-list">
<li class="option" id="option-disabled">
<div class="option-header">
<h3 class="option-name"><a href="#option-disabled">disabled</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Disables (true) or enables (false) the draggable. Can be set when initialising (first creating) the draggable.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>disabled</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ disabled: true });</code></pre>
</dd>
<dt>
Get or set the <code>disabled</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var disabled = $( ".selector" ).draggable( "option", "disabled" );
//setter
$( ".selector" ).draggable( "option", "disabled", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-addClasses">
<div class="option-header">
<h3 class="option-name"><a href="#option-addClasses">addClasses</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">true</dd>
</dl>
</div>
<div class="option-description">
<p>If set to false, will prevent the <code>ui-draggable</code> class from being added. This may be desired as a performance optimization when calling <code>.draggable()</code> init on many hundreds of elements.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>addClasses</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ addClasses: false });</code></pre>
</dd>
<dt>
Get or set the <code>addClasses</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var addClasses = $( ".selector" ).draggable( "option", "addClasses" );
//setter
$( ".selector" ).draggable( "option", "addClasses", false );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-appendTo">
<div class="option-header">
<h3 class="option-name"><a href="#option-appendTo">appendTo</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Element, Selector</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">"parent"</dd>
</dl>
</div>
<div class="option-description">
<p>The element passed to or selected by the <code>appendTo</code> option will be used as the draggable helper's container during dragging. By default, the helper is appended to the same container as the draggable.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>appendTo</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ appendTo: "body" });</code></pre>
</dd>
<dt>
Get or set the <code>appendTo</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var appendTo = $( ".selector" ).draggable( "option", "appendTo" );
//setter
$( ".selector" ).draggable( "option", "appendTo", "body" );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-axis">
<div class="option-header">
<h3 class="option-name"><a href="#option-axis">axis</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Constrains dragging to either the horizontal (x) or vertical (y) axis. Possible values: 'x', 'y'.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>axis</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ axis: "x" });</code></pre>
</dd>
<dt>
Get or set the <code>axis</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var axis = $( ".selector" ).draggable( "option", "axis" );
//setter
$( ".selector" ).draggable( "option", "axis", "x" );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-cancel">
<div class="option-header">
<h3 class="option-name"><a href="#option-cancel">cancel</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Selector</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">":input,option"</dd>
</dl>
</div>
<div class="option-description">
<p>Prevents dragging from starting on specified elements.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>cancel</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ cancel: "button" });</code></pre>
</dd>
<dt>
Get or set the <code>cancel</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var cancel = $( ".selector" ).draggable( "option", "cancel" );
//setter
$( ".selector" ).draggable( "option", "cancel", "button" );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-connectToSortable">
<div class="option-header">
<h3 class="option-name"><a href="#option-connectToSortable">connectToSortable</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Selector</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Allows the draggable to be dropped onto the specified sortables. If this option is used (<code>helper</code> must be set to 'clone' in order to work flawlessly), a draggable can be dropped onto a sortable list and then becomes part of it.
</p><p>Note: Specifying this option as an array of selectors has been removed.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>connectToSortable</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ connectToSortable: "ul#myList" });</code></pre>
</dd>
<dt>
Get or set the <code>connectToSortable</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var connectToSortable = $( ".selector" ).draggable( "option", "connectToSortable" );
//setter
$( ".selector" ).draggable( "option", "connectToSortable", "ul#myList" );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-containment">
<div class="option-header">
<h3 class="option-name"><a href="#option-containment">containment</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Selector, Element, String, Array</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Constrains dragging to within the bounds of the specified element or region. Possible string values: 'parent', 'document', 'window', [x1, y1, x2, y2].</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>containment</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ containment: "parent" });</code></pre>
</dd>
<dt>
Get or set the <code>containment</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var containment = $( ".selector" ).draggable( "option", "containment" );
//setter
$( ".selector" ).draggable( "option", "containment", "parent" );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-cursor">
<div class="option-header">
<h3 class="option-name"><a href="#option-cursor">cursor</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">"auto"</dd>
</dl>
</div>
<div class="option-description">
<p>The css cursor during the drag operation.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>cursor</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ cursor: "crosshair" });</code></pre>
</dd>
<dt>
Get or set the <code>cursor</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var cursor = $( ".selector" ).draggable( "option", "cursor" );
//setter
$( ".selector" ).draggable( "option", "cursor", "crosshair" );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-cursorAt">
<div class="option-header">
<h3 class="option-name"><a href="#option-cursorAt">cursorAt</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Object</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Sets the offset of the dragging helper relative to the mouse cursor. Coordinates can be given as a hash using a combination of one or two keys: <code>{ top, left, right, bottom }</code>.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>cursorAt</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ cursorAt: { left: 5 } });</code></pre>
</dd>
<dt>
Get or set the <code>cursorAt</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var cursorAt = $( ".selector" ).draggable( "option", "cursorAt" );
//setter
$( ".selector" ).draggable( "option", "cursorAt", { left: 5 } );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-delay">
<div class="option-header">
<h3 class="option-name"><a href="#option-delay">delay</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">0</dd>
</dl>
</div>
<div class="option-description">
<p>Time in milliseconds after mousedown until dragging should start. This option can be used to prevent unwanted drags when clicking on an element.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>delay</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ delay: 500 });</code></pre>
</dd>
<dt>
Get or set the <code>delay</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var delay = $( ".selector" ).draggable( "option", "delay" );
//setter
$( ".selector" ).draggable( "option", "delay", 500 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-distance">
<div class="option-header">
<h3 class="option-name"><a href="#option-distance">distance</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">1</dd>
</dl>
</div>
<div class="option-description">
<p>Distance in pixels after mousedown the mouse must move before dragging should start. This option can be used to prevent unwanted drags when clicking on an element.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>distance</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ distance: 30 });</code></pre>
</dd>
<dt>
Get or set the <code>distance</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var distance = $( ".selector" ).draggable( "option", "distance" );
//setter
$( ".selector" ).draggable( "option", "distance", 30 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-grid">
<div class="option-header">
<h3 class="option-name"><a href="#option-grid">grid</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Array</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Snaps the dragging helper to a grid, every x and y pixels. Array values: [x, y]</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>grid</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ grid: [50, 20] });</code></pre>
</dd>
<dt>
Get or set the <code>grid</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var grid = $( ".selector" ).draggable( "option", "grid" );
//setter
$( ".selector" ).draggable( "option", "grid", [50, 20] );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-handle">
<div class="option-header">
<h3 class="option-name"><a href="#option-handle">handle</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Element, Selector</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>If specified, restricts drag start click to the specified element(s).</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>handle</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ handle: "h2" });</code></pre>
</dd>
<dt>
Get or set the <code>handle</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var handle = $( ".selector" ).draggable( "option", "handle" );
//setter
$( ".selector" ).draggable( "option", "handle", "h2" );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-helper">
<div class="option-header">
<h3 class="option-name"><a href="#option-helper">helper</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String, Function</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">"original"</dd>
</dl>
</div>
<div class="option-description">
<p>Allows for a helper element to be used for dragging display. Possible values: 'original', 'clone', Function. If a function is specified, it must return a DOMElement.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>helper</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ helper: "clone" });</code></pre>
</dd>
<dt>
Get or set the <code>helper</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var helper = $( ".selector" ).draggable( "option", "helper" );
//setter
$( ".selector" ).draggable( "option", "helper", "clone" );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-iframeFix">
<div class="option-header">
<h3 class="option-name"><a href="#option-iframeFix">iframeFix</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean, Selector</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Prevent iframes from capturing the mousemove events during a drag. Useful in combination with cursorAt, or in any case, if the mouse cursor is not over the helper. If set to true, transparent overlays will be placed over all iframes on the page. If a selector is supplied, the matched iframes will have an overlay placed over them.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>iframeFix</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ iframeFix: true });</code></pre>
</dd>
<dt>
Get or set the <code>iframeFix</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var iframeFix = $( ".selector" ).draggable( "option", "iframeFix" );
//setter
$( ".selector" ).draggable( "option", "iframeFix", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-opacity">
<div class="option-header">
<h3 class="option-name"><a href="#option-opacity">opacity</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Float</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Opacity for the helper while being dragged.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>opacity</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ opacity: 0.35 });</code></pre>
</dd>
<dt>
Get or set the <code>opacity</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var opacity = $( ".selector" ).draggable( "option", "opacity" );
//setter
$( ".selector" ).draggable( "option", "opacity", 0.35 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-refreshPositions">
<div class="option-header">
<h3 class="option-name"><a href="#option-refreshPositions">refreshPositions</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>If set to true, all droppable positions are calculated on every mousemove. Caution: This solves issues on highly dynamic pages, but dramatically decreases performance.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>refreshPositions</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ refreshPositions: true });</code></pre>
</dd>
<dt>
Get or set the <code>refreshPositions</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var refreshPositions = $( ".selector" ).draggable( "option", "refreshPositions" );
//setter
$( ".selector" ).draggable( "option", "refreshPositions", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-revert">
<div class="option-header">
<h3 class="option-name"><a href="#option-revert">revert</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean, String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>If set to true, the element will return to its start position when dragging stops. Possible string values: 'valid', 'invalid'. If set to invalid, revert will only occur if the draggable has not been dropped on a droppable. For valid, it's the other way around.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>revert</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ revert: true });</code></pre>
</dd>
<dt>
Get or set the <code>revert</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var revert = $( ".selector" ).draggable( "option", "revert" );
//setter
$( ".selector" ).draggable( "option", "revert", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-revertDuration">
<div class="option-header">
<h3 class="option-name"><a href="#option-revertDuration">revertDuration</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">500</dd>
</dl>
</div>
<div class="option-description">
<p>The duration of the revert animation, in milliseconds. Ignored if revert is false.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>revertDuration</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ revertDuration: 1000 });</code></pre>
</dd>
<dt>
Get or set the <code>revertDuration</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var revertDuration = $( ".selector" ).draggable( "option", "revertDuration" );
//setter
$( ".selector" ).draggable( "option", "revertDuration", 1000 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-scope">
<div class="option-header">
<h3 class="option-name"><a href="#option-scope">scope</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">"default"</dd>
</dl>
</div>
<div class="option-description">
<p>Used to group sets of draggable and droppable items, in addition to droppable's accept option. A draggable with the same scope value as a droppable will be accepted by the droppable.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>scope</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ scope: "tasks" });</code></pre>
</dd>
<dt>
Get or set the <code>scope</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var scope = $( ".selector" ).draggable( "option", "scope" );
//setter
$( ".selector" ).draggable( "option", "scope", "tasks" );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-scroll">
<div class="option-header">
<h3 class="option-name"><a href="#option-scroll">scroll</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">true</dd>
</dl>
</div>
<div class="option-description">
<p>If set to true, container auto-scrolls while dragging.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>scroll</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ scroll: false });</code></pre>
</dd>
<dt>
Get or set the <code>scroll</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var scroll = $( ".selector" ).draggable( "option", "scroll" );
//setter
$( ".selector" ).draggable( "option", "scroll", false );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-scrollSensitivity">
<div class="option-header">
<h3 class="option-name"><a href="#option-scrollSensitivity">scrollSensitivity</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">20</dd>
</dl>
</div>
<div class="option-description">
<p>Distance in pixels from the edge of the viewport after which the viewport should scroll. Distance is relative to pointer, not the draggable.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>scrollSensitivity</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ scrollSensitivity: 40 });</code></pre>
</dd>
<dt>
Get or set the <code>scrollSensitivity</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var scrollSensitivity = $( ".selector" ).draggable( "option", "scrollSensitivity" );
//setter
$( ".selector" ).draggable( "option", "scrollSensitivity", 40 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-scrollSpeed">
<div class="option-header">
<h3 class="option-name"><a href="#option-scrollSpeed">scrollSpeed</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">20</dd>
</dl>
</div>
<div class="option-description">
<p>The speed at which the window should scroll once the mouse pointer gets within the <code>scrollSensitivity</code> distance.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>scrollSpeed</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ scrollSpeed: 40 });</code></pre>
</dd>
<dt>
Get or set the <code>scrollSpeed</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var scrollSpeed = $( ".selector" ).draggable( "option", "scrollSpeed" );
//setter
$( ".selector" ).draggable( "option", "scrollSpeed", 40 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-snap">
<div class="option-header">
<h3 class="option-name"><a href="#option-snap">snap</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Boolean, Selector</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>If set to a selector or to true (equivalent to '.ui-draggable'), the draggable will snap to the edges of the selected elements when near an edge of the element.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>snap</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ snap: true });</code></pre>
</dd>
<dt>
Get or set the <code>snap</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var snap = $( ".selector" ).draggable( "option", "snap" );
//setter
$( ".selector" ).draggable( "option", "snap", true );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-snapMode">
<div class="option-header">
<h3 class="option-name"><a href="#option-snapMode">snapMode</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">String</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">"both"</dd>
</dl>
</div>
<div class="option-description">
<p>Determines which edges of snap elements the draggable will snap to. Ignored if snap is false. Possible values: 'inner', 'outer', 'both'</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>snapMode</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ snapMode: "outer" });</code></pre>
</dd>
<dt>
Get or set the <code>snapMode</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var snapMode = $( ".selector" ).draggable( "option", "snapMode" );
//setter
$( ".selector" ).draggable( "option", "snapMode", "outer" );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-snapTolerance">
<div class="option-header">
<h3 class="option-name"><a href="#option-snapTolerance">snapTolerance</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">20</dd>
</dl>
</div>
<div class="option-description">
<p>The distance in pixels from the snap element edges at which snapping should occur. Ignored if snap is false.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>snapTolerance</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ snapTolerance: 40 });</code></pre>
</dd>
<dt>
Get or set the <code>snapTolerance</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var snapTolerance = $( ".selector" ).draggable( "option", "snapTolerance" );
//setter
$( ".selector" ).draggable( "option", "snapTolerance", 40 );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-stack">
<div class="option-header">
<h3 class="option-name"><a href="#option-stack">stack</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Selector</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>Controls the z-Index of the set of elements that match the selector, always brings to front the dragged item. Very useful in things like window managers.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>stack</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ stack: ".products" });</code></pre>
</dd>
<dt>
Get or set the <code>stack</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var stack = $( ".selector" ).draggable( "option", "stack" );
//setter
$( ".selector" ).draggable( "option", "stack", ".products" );</code></pre>
</dd>
</dl>
</div>
</li>
<li class="option" id="option-zIndex">
<div class="option-header">
<h3 class="option-name"><a href="#option-zIndex">zIndex</a></h3>
<dl>
<dt class="option-type-label">Type:</dt>
<dd class="option-type">Integer</dd>
<dt class="option-default-label">Default:</dt>
<dd class="option-default">false</dd>
</dl>
</div>
<div class="option-description">
<p>z-index for the helper while being dragged.</p>
</div>
<div class="option-examples">
<h4>Code examples</h4>
<dl class="option-examples-list">
<dt>
Initialize a draggable with the <code>zIndex</code> option specified.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({ zIndex: 2700 });</code></pre>
</dd>
<dt>
Get or set the <code>zIndex</code> option, after init.
</dt>
<dd>
<pre><code>//getter
var zIndex = $( ".selector" ).draggable( "option", "zIndex" );
//setter
$( ".selector" ).draggable( "option", "zIndex", 2700 );</code></pre>
</dd>
</dl>
</div>
</li>
</ul>
</div>
<div id="events">
<h2 class="top-header">Events</h2>
<ul class="events-list">
<li class="event" id="event-create">
<div class="event-header">
<h3 class="event-name"><a href="#event-create">create</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">dragcreate</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when draggable is created.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>create</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({
create: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>create</code> event by type: <code>dragcreate</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "dragcreate", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-start">
<div class="event-header">
<h3 class="event-name"><a href="#event-start">start</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">dragstart</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when dragging starts.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>start</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({
start: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>start</code> event by type: <code>dragstart</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "dragstart", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-drag">
<div class="event-header">
<h3 class="event-name"><a href="#event-drag">drag</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">drag</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when the mouse is moved during the dragging.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>drag</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({
drag: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>drag</code> event by type: <code>drag</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "drag", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
<li class="event" id="event-stop">
<div class="event-header">
<h3 class="event-name"><a href="#event-stop">stop</a></h3>
<dl>
<dt class="event-type-label">Type:</dt>
<dd class="event-type">dragstop</dd>
</dl>
</div>
<div class="event-description">
<p>This event is triggered when dragging stops.</p>
</div>
<div class="event-examples">
<h4>Code examples</h4>
<dl class="event-examples-list">
<dt>
Supply a callback function to handle the <code>stop</code> event as an init option.
</dt>
<dd>
<pre><code>$( ".selector" ).draggable({
stop: function(event, ui) { ... }
});</code></pre>
</dd>
<dt>
Bind to the <code>stop</code> event by type: <code>dragstop</code>.
</dt>
<dd>
<pre><code>$( ".selector" ).bind( "dragstop", function(event, ui) {
...
});</code></pre>
</dd>
</dl>
</div>
</li>
</ul>
</div>
<div id="methods">
<h2 class="top-header">Methods</h2>
<ul class="methods-list">
<li class="method" id="method-destroy">
<div class="method-header">
<h3 class="method-name"><a href="#method-destroy">destroy</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.draggable( "destroy"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Remove the draggable functionality completely. This will return the element back to its pre-init state.</p>
</div>
</li>
<li class="method" id="method-disable">
<div class="method-header">
<h3 class="method-name"><a href="#method-disable">disable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.draggable( "disable"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Disable the draggable.</p>
</div>
</li>
<li class="method" id="method-enable">
<div class="method-header">
<h3 class="method-name"><a href="#method-enable">enable</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.draggable( "enable"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Enable the draggable.</p>
</div>
</li>
<li class="method" id="method-option">
<div class="method-header">
<h3 class="method-name"><a href="#method-option">option</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.draggable( "option"
, optionName
, <span class="optional">[</span>value<span class="optional">] </span>
)</dd>
</dl>
</div>
<div class="method-description">
<p>Get or set any draggable option. If no value is specified, will act as a getter.</p>
</div>
</li>
<li class="method" id="method-option">
<div class="method-header">
<h3 class="method-name"><a href="#method-option">option</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.draggable( "option"
, options
)</dd>
</dl>
</div>
<div class="method-description">
<p>Set multiple draggable options at once by providing an options object.</p>
</div>
</li>
<li class="method" id="method-widget">
<div class="method-header">
<h3 class="method-name"><a href="#method-widget">widget</a></h3>
<dl>
<dt class="method-signature-label">Signature:</dt>
<dd class="method-signature">.draggable( "widget"
)</dd>
</dl>
</div>
<div class="method-description">
<p>Returns the .ui-draggable element.</p>
</div>
</li>
</ul>
</div>
<div id="theming">
<h2 class="top-header">Theming</h2>
<p>The jQuery UI Draggable plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain.
</p>
<p>If a deeper level of customization is needed, there are widget-specific classes referenced within the jquery.ui.draggable.css stylesheet that can be modified. These classes are highlighed in bold below.
</p>
<h3>Sample markup with jQuery UI CSS Framework classes</h3>
<div class="<strong>ui-draggable</strong>"></div>
<p class="theme-note">
<strong>
Note: This is a sample of markup generated by the draggable plugin, not markup you should use to create a draggable. The only markup needed for that is <div></div>.
</strong>
</p>
</div>
</div>
</p><!--
Pre-expand include size: 61392 bytes
Post-expand include size: 107565 bytes
Template argument size: 58710 bytes
Maximum: 2097152 bytes
-->
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3768-1!1!0!!en!2 and timestamp 20120724123244 -->
| {
"content_hash": "803f3b3f8ae69b580da20095f58ecf59",
"timestamp": "",
"source": "github",
"line_count": 1576,
"max_line_length": 381,
"avg_line_length": 27.111040609137056,
"alnum_prop": 0.6191869309804106,
"repo_name": "comdig/viladigital",
"id": "5b9d7a5e5e8ed7bb07d1f11a2a65312555ee30c7",
"size": "42728",
"binary": false,
"copies": "9",
"ref": "refs/heads/master",
"path": "jquery-ui-1.8.22.custom/development-bundle/docs/draggable.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "1502"
},
{
"name": "PHP",
"bytes": "19372"
}
],
"symlink_target": ""
} |
#include "TextPlacement/TextPlacementPolicy.h"
#include "TextPlacement/TextPlacementData.h"
#include "TextPlacement/TextResult.h"
#include "Util/StringCache.h"
#include "ViewPortInterface.h"
#include "NativeTextInterface.h"
#include "OverlapDetector.h"
#include "MapProjection.h"
#include "TileFeature.h"
#include "TileMapTextSettings.h"
#include "InsideUtil.h"
TextPlacementDelegator::TextPlacementPolicy::TextPlacementPolicy(
NativeTextInterface* textInterface,
ViewPortInterface* viewPort,
TileMapTextSettings& textSettings,
const MapProjection& mapProjection,
StringCache& stringCache,
OverlapDetector<PixelBox>& overlapDetector) :
m_textInterface(textInterface),
m_viewPort(viewPort),
m_textSettings(textSettings),
m_mapProjection(mapProjection),
m_stringCache(stringCache),
m_overlapDetector(overlapDetector)
{
resetViewport();
}
void TextPlacementDelegator::TextPlacementPolicy::resetViewport()
{
isab::Rectangle r;
if(m_viewPort) {
m_viewPort->getMapSizeDrawingUnits( r );
m_screenCoords = r;
} else {
m_screenCoords = PixelBox( MC2Point(0, 0),
MC2Point(0, 0) );
}
}
void
TextPlacementDelegator::TextPlacementPolicy::setTextInterface(
NativeTextInterface* textInterface)
{
m_textInterface = textInterface;
}
void
TextPlacementDelegator::TextPlacementPolicy::setViewPortInterface(
ViewPortInterface* viewPort)
{
m_viewPort = viewPort;
resetViewport();
}
MC2Coordinate&
TextPlacementDelegator::TextPlacementPolicy::toWorld(
MC2Coordinate& dest, const MC2Point& src)
{
m_mapProjection.inverseTranformCosLatSupplied( dest,
src.getX(),
src.getY(),
m_mapProjection.getCosLat(
m_mapProjection.getCenter().lat ) );
return dest;
}
int
TextPlacementDelegator::TextPlacementPolicy::placeHorizontal(
TextPlacementData& data, TextResultVec& output)
{
// For city centers use the first point in the feature.
MC2Point posOfString ( data.pointsInFeature.front().getX(),
data.pointsInFeature.front().getY() +
c_heightDisplacmentOftextOverCityCenter );
TextResult* tr = new TextResult();
const STRING* font = m_stringCache.getOrCreateString(
m_textSettings.getHorizontalFont().first );
uint32 textColor = m_textSettings.getTextColor();
tr->setString( data.nameOfFeature );
tr->setFontName( font );
tr->setFontColor( (textColor >> 16 ) & 0xff,
(textColor >> 8 ) & 0xff,
(textColor >> 0 ) & 0xff );
tr->setTypeOfString( TileMapNameSettings::horizontal );
tr->setFontSize( m_textSettings.getHorizontalFont().second );
m_textInterface->setFont( *font, tr->getFontSize() );
isab::Rectangle stringRectangle( m_textInterface->getStringAsRectangle(
(*data.nameOfFeature), posOfString));
MC2Coordinate worldCoord;
TextPlacementNotice tpn( posOfString,
toWorld(worldCoord, posOfString),
0, -1, 0,
MC2Coordinate(),
MC2Coordinate() );
// Add the TextPlacementNotice to the TextResult.
tr->addTPN( tpn );
if( PixelBox( stringRectangle ).inside( m_screenCoords ) &&
m_overlapDetector.addIfNotOverlapping( stringRectangle ) )
{
output.push_back( tr );
return 1;
} else {
delete( tr );
return 0;
}
}
int
TextPlacementDelegator::TextPlacementPolicy::placeOnRoundRect(
TextPlacementData& data, TextResultVec& output)
{
MC2Point posOfString ( data.pointsInFeature.front() );
if( posOfString.getX() == 0 && posOfString.getY() == 0 ){
return 0;
}
// Collect and send the results to our textresults vector.
const STRING* font =
m_stringCache.getOrCreateString(
m_textSettings.getRoundRectFont().first );
TextResult* tr = new TextResult();
tr->setString( data.nameOfFeature );
tr->setFontName( font );
tr->setFontColor( 255, 255, 255 );
tr->setTypeOfString( TileMapNameSettings::on_roundrect );
tr->setFontSize( m_textSettings.getRoundRectFont().second );
m_textInterface->setFont( *font, tr->getFontSize() );
isab::Rectangle stringRectangle(
m_textInterface->getStringAsRectangle(
(*data.nameOfFeature), posOfString));
int border_size = 3;
int x1 = stringRectangle.getX() - border_size;
int x2 = stringRectangle.getWidth() + ( border_size * 2 );
int y1 = stringRectangle.getY() - border_size;
int y2 = stringRectangle.getHeight() + ( border_size * 2 );
stringRectangle = isab::Rectangle( x1, y1, x2, y2 );
tr->setStringAsRect ( stringRectangle );
MC2Coordinate worldCoord;
TextPlacementNotice tpn( posOfString,
// toWorld returns worldCoord after converting.
toWorld(worldCoord, posOfString),
0, -1, 0,
MC2Coordinate(), MC2Coordinate());
// Add the TextPlacementNotice to the TextResult.
tr->addTPN( tpn );
if( PixelBox( stringRectangle ).inside( m_screenCoords ) &&
m_overlapDetector.addIfNotOverlapping( stringRectangle ) )
{
output.push_back( tr );
return 1;
} else {
delete tr;
return 0;
}
}
int
TextPlacementDelegator::TextPlacementPolicy::placeInsidePolygon(
TextPlacementData& data, TextResultVec& output)
{
int max_x = 0;
int max_y = 0;
int min_x = m_screenCoords.getMaxLon();
int min_y = m_screenCoords.getMaxLat();
for( int i = 0; i < (int)data.pointsInFeature.size(); i++ ) {
int x = data.pointsInFeature[i].getX();
int y = data.pointsInFeature[i].getY();
if( x > max_x ) { max_x = x; }
if( y > max_y ) { max_y = y; }
if( x < min_x ) { min_x = x; }
if( y < min_y ) { min_y = y; }
}
if( max_x > m_screenCoords.getMaxLon() ||
max_y > m_screenCoords.getMaxLat() ||
min_x < m_screenCoords.getMinLon() ||
min_y < m_screenCoords.getMinLat() )
return 0;
MC2Point posOfString( ( min_x + max_x ) / 2,
( min_y + max_y ) / 2 );
if( !InsideUtil::inside(
data.pointsInFeature.begin(),
data.pointsInFeature.end(),
posOfString ) ) {
return 0;
}
if( posOfString.getX() == 0 && posOfString.getY() == 0 ){
return 0;
}
// Collect and send the results to our textresults vector.
TextResult* tr = new TextResult();
tr->setString( data.nameOfFeature );
const STRING* font =
m_stringCache.getOrCreateString(m_textSettings.getInsidePolygonFont().first);
uint32 textColor = m_textSettings.getTextColor();
tr->setFontName( font );
tr->setFontColor( (textColor >> 16 ) & 0xff,
(textColor >> 8 ) & 0xff,
(textColor >> 0 ) & 0xff );
tr->setTypeOfString( TileMapNameSettings::inside_polygon );
tr->setFontSize( m_textSettings.getInsidePolygonFont().second );
m_textInterface->setFont( *font, tr->getFontSize() );
PixelBox stringRectangle =
m_textInterface->getStringAsRectangle( *data.nameOfFeature, posOfString);
MC2Coordinate worldCoord;
// Add the TextPlacementNotice to the TextResult.
TextPlacementNotice tpn( posOfString,
// toWorld returns worldCoord
toWorld(worldCoord, posOfString),
0, -1, 0,
MC2Coordinate(), MC2Coordinate());
tr->addTPN( tpn );
if( stringRectangle.inside( m_screenCoords ) &&
m_overlapDetector.addIfNotOverlapping( stringRectangle ) )
{
output.push_back( tr );
return 1;
} else {
delete tr;
return 0;
}
}
| {
"content_hash": "8e60c5082ec060825f69590d9db09bd9",
"timestamp": "",
"source": "github",
"line_count": 262,
"max_line_length": 89,
"avg_line_length": 30.858778625954198,
"alnum_prop": 0.6136054421768707,
"repo_name": "wayfinder/Wayfinder-CppCore-v2",
"id": "0cea89f1fbff28dc8bbcb93b3d8420f8a2bfd5fb",
"size": "9613",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "cpp/Targets/MapLib/Shared/src/TextPlacement/TextPlacementPolicy.cpp",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C",
"bytes": "7768867"
},
{
"name": "C++",
"bytes": "10721081"
},
{
"name": "Objective-C",
"bytes": "320116"
},
{
"name": "Shell",
"bytes": "7147"
}
],
"symlink_target": ""
} |
BOS is a ruby client that scrape your banking details from your bank of scotland web page. You are higly under risk (e.g. online bank account get blocked; Either password or security code leaks) when using it. So please do use it responsibly (The author of the gem under any circumstances will not responsible for any lost ```BOS``` causes).
It seems like Lloyds Bank plc, TSB Bank plc, Bank of Scotland plc and Halifax, as all of them belong to Lloyds Banking Group, are sharing the same banking system. As a result, you might be able to migrate the gem to some other banking systems without too much difficulties. Again, please do use it responsibly!
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'bos'
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install bos
## Usage
BOS is a screen scraper that collect you your banking details.
If you use it for the first time, then you need do configuration. The code shown below would store your banking details into ~/.bos file and persit in JSON format.
```ruby
BOS.confg USER_ID, PASSWORD, SECURITY_CODE
```
The code snippet below show the basic usage of BOS gem (very easy to understand, isn't it?)
```ruby
client = BOS.client # Return a bos client.
client.balance
client.account_number
client.sort_code
client.mini_statement
client.full_statement
```
## Contributing
1. Fork it ( https://github.com/jaxi/bos/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request
| {
"content_hash": "b6a330d2bce7cbb0ce1e9bda8ec5a331",
"timestamp": "",
"source": "github",
"line_count": 50,
"max_line_length": 341,
"avg_line_length": 32.92,
"alnum_prop": 0.7496962332928311,
"repo_name": "jaxi/bos",
"id": "60225a1ca8a299216f37015e16d7bd847ee131b1",
"size": "1653",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "README.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Ruby",
"bytes": "8461"
}
],
"symlink_target": ""
} |
namespace blink {
struct Manifest;
class WebLocalFrame;
class WebURL;
class WebManifestManager {
public:
using Callback = base::OnceCallback<void(const WebURL&, const Manifest&)>;
BLINK_EXPORT static void RequestManifestForTesting(WebLocalFrame*,
Callback callback);
};
} // namespace blink
#endif // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_MANIFEST_MANAGER_H_
| {
"content_hash": "fe9f0e14c98ded00eef6eb436a012f80",
"timestamp": "",
"source": "github",
"line_count": 17,
"max_line_length": 76,
"avg_line_length": 24.647058823529413,
"alnum_prop": 0.6682577565632458,
"repo_name": "endlessm/chromium-browser",
"id": "503e2c676d96053b2a1f86c9da17ac5388dadeb3",
"size": "794",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "third_party/blink/public/web/web_manifest_manager.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [],
"symlink_target": ""
} |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("12.TripleRotation")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("12.TripleRotation")]
[assembly: AssemblyCopyright("Copyright © 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("516a8277-1af7-4a36-9f46-9241ff9c1257")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| {
"content_hash": "f3f3451104b5009a7f5f841dc39cc018",
"timestamp": "",
"source": "github",
"line_count": 36,
"max_line_length": 84,
"avg_line_length": 39.083333333333336,
"alnum_prop": 0.7455579246624022,
"repo_name": "madbadPi/TelerikAcademy",
"id": "2811e725146d40142bf64eecde0180a43808a135",
"size": "1410",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "CSharpPartOne/ExamPreparation/12.TripleRotation/Properties/AssemblyInfo.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "785303"
},
{
"name": "C++",
"bytes": "59651"
},
{
"name": "HTML",
"bytes": "248"
},
{
"name": "PLSQL",
"bytes": "1758"
}
],
"symlink_target": ""
} |
pub struct VolatileCell<T> {
value: T,
}
impl<T> VolatileCell<T> {
/// Create a cell with initial value.
pub fn new(value: T) -> VolatileCell<T> {
VolatileCell {
value: value,
}
}
/// Get register value.
#[cfg(not(feature="replayer"))]
#[inline]
pub fn get(&self) -> T {
unsafe {
volatile_load(&self.value)
}
}
/// Set register value.
#[cfg(not(feature="replayer"))]
#[inline]
pub fn set(&self, value: T) {
unsafe {
volatile_store(&self.value as *const T as *mut T, value)
}
}
}
#[cfg(feature="replayer")]
impl VolatileCell<u32> {
pub fn get(&self) -> u32 {
unsafe {
GLOBAL_REPLAYER.with(|gr| { gr.borrow_mut().get_cell(transmute(&self.value)) })
}
}
pub fn set(&self, value: u32) {
unsafe {
GLOBAL_REPLAYER.with(|gr| { gr.borrow_mut().set_cell(transmute(&self.value), value) })
}
}
}
#[cfg(feature="replayer")]
impl VolatileCell<u16> {
pub fn get(&self) -> u16 {
unsafe {
GLOBAL_REPLAYER.with(|gr| { gr.borrow_mut().get_cell(transmute(&self.value)) }) as u16
}
}
pub fn set(&self, value: u16) {
unsafe {
GLOBAL_REPLAYER.with(|gr| { gr.borrow_mut().set_cell(transmute(&self.value), value as u32) })
}
}
}
#[cfg(feature="replayer")]
impl VolatileCell<u8> {
pub fn get(&self) -> u8 {
unsafe {
GLOBAL_REPLAYER.with(|gr| { gr.borrow_mut().get_cell(transmute(&self.value)) }) as u8
}
}
pub fn set(&self, value: u8) {
unsafe {
GLOBAL_REPLAYER.with(|gr| { gr.borrow_mut().set_cell(transmute(&self.value), value as u32) })
}
}
}
#[cfg(feature="replayer")]
struct ReplayRecord {
is_read: bool,
address: usize,
value: u32,
replayed: bool,
did_read: bool,
actual_address: usize,
actual_value: u32,
loc: expectest::core::SourceLocation,
}
#[cfg(feature="replayer")]
impl core::fmt::Display for ReplayRecord {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
match self.is_read {
true => write!(f, "read 0x{:x} from 0x{:x}", self.value, self.address),
false => write!(f, "write 0x{:x} to 0x{:x}", self.value, self.address),
}
}
}
#[cfg(feature="replayer")]
pub struct VolatileCellReplayer {
replays: Vec<ReplayRecord>,
current_replay: usize,
}
#[cfg(feature="replayer")]
impl VolatileCellReplayer {
pub fn new() -> VolatileCellReplayer {
VolatileCellReplayer {
replays: Vec::new(),
current_replay: 0,
}
}
pub fn expect_read(&mut self, address: usize, value: u32,
loc: expectest::core::SourceLocation) {
self.replays.push(ReplayRecord {
is_read: true,
address: address,
value: value,
replayed: false,
did_read: false,
actual_address: 0,
actual_value: 0,
loc: loc,
});
}
pub fn expect_write(&mut self, address: usize, value: u32,
loc: expectest::core::SourceLocation) {
self.replays.push(ReplayRecord {
is_read: false,
address: address,
value: value,
replayed: false,
did_read: false,
actual_address: 0,
actual_value: 0,
loc: loc,
});
}
pub fn verify(&self, loc: expectest::core::SourceLocation) {
expect(self.current_replay).location(loc).to(
be_equal_to_with_context(
self.replays.len(),
format!("expected {} replays, performed {}",
self.replays.len(), self.current_replay)));
for ref replay in &*self.replays {
expect(replay.replayed).location(replay.loc).to(be_equal_to_with_context(true,
format!("expected replay {} to be performed, was not", replay)));
expect(replay.is_read).location(replay.loc).to(be_equal_to_with_context(replay.did_read,
format!("expected replay to be {} replay, was {} replay",
if replay.is_read {"read"} else {"write"},
if replay.is_read {"write"} else {"read"})));
expect(replay.address).location(replay.loc).to(be_equal_to_with_context(replay.actual_address,
format!("expected replay address 0x{:x}, was 0x{:x}", replay.address, replay.actual_address)));
if !replay.is_read {
expect(replay.value).location(replay.loc).to(be_equal_to_with_context(replay.actual_value,
format!("expected replay to write 0x{:x}, written 0x{:x}", replay.value, replay.actual_value)));
}
}
}
pub fn get_cell(&mut self, address: usize) -> u32 {
if self.current_replay >= self.replays.len() {
panic!("get_cell(0x{:x}) faled, current replay: {}, total replays: {}",
address, self.current_replay+1, self.replays.len());
}
let replay: &mut ReplayRecord = &mut self.replays[self.current_replay];
replay.replayed = true;
replay.did_read = true;
replay.actual_address = address;
self.current_replay += 1;
replay.value
}
pub fn set_cell(&mut self, address: usize, value: u32) {
if self.current_replay >= self.replays.len() {
panic!("set_cell(0x{:x}, 0x{:x}) faled, current replay: {}, total replays: {}",
address, value, self.current_replay+1, self.replays.len());
}
let replay: &mut ReplayRecord = &mut self.replays[self.current_replay];
replay.replayed = true;
replay.did_read = false;
replay.actual_address = address;
replay.actual_value = value;
self.current_replay += 1;
}
}
#[cfg(feature="replayer")]
thread_local!(static GLOBAL_REPLAYER: RefCell<VolatileCellReplayer> = RefCell::new(VolatileCellReplayer::new()));
#[cfg(feature="replayer")]
pub fn set_replayer(replayer: VolatileCellReplayer) {
GLOBAL_REPLAYER.with(|gr| {
let mut bm = gr.borrow_mut();
*bm = replayer;
});
}
#[cfg(feature="replayer")]
pub fn with_mut_replayer<F>(f: F) where F: core::ops::FnOnce(&mut VolatileCellReplayer) {
GLOBAL_REPLAYER.with(|gr| {
let mut bm = gr.borrow_mut();
f(&mut *bm);
});
}
#[cfg(feature="replayer")]
struct BeEqualToWithContext<E> {
expected: E,
context: String,
}
#[cfg(feature="replayer")]
fn be_equal_to_with_context<E>(expected: E, context: String) -> BeEqualToWithContext<E> {
BeEqualToWithContext {
expected: expected,
context: context,
}
}
#[cfg(feature="replayer")]
impl<A, E> Matcher<A, E> for BeEqualToWithContext<E>
where
A: PartialEq<E> + fmt::Debug,
E: fmt::Debug {
fn failure_message(&self, _: expectest::core::Join, _: &A) -> String {
self.context.clone()
}
fn matches(&self, actual: &A) -> bool {
*actual == self.expected
}
}
#[macro_export]
macro_rules! expect_volatile_read {
($addr: expr, $val: expr) => (
$crate::with_mut_replayer(|r| {
r.expect_read($addr, $val, expectest::core::SourceLocation::new(file!(), line!()));
})
);
}
#[macro_export]
macro_rules! expect_volatile_write {
($addr: expr, $val: expr) => (
$crate::with_mut_replayer(|r| {
r.expect_write($addr, $val, expectest::core::SourceLocation::new(file!(), line!()));
})
);
}
#[macro_export]
macro_rules! expect_replayer_valid {
() => (
$crate::with_mut_replayer(|r| {
r.verify(expectest::core::SourceLocation::new(file!(), line!()));
})
);
}
#[macro_export]
macro_rules! init_replayer {
() => (
set_replayer(VolatileCellReplayer::new());
);
}
| {
"content_hash": "abc4198d76dec593e5c758012d21a689",
"timestamp": "",
"source": "github",
"line_count": 277,
"max_line_length": 113,
"avg_line_length": 26.227436823104693,
"alnum_prop": 0.6100481761871989,
"repo_name": "posborne/zinc",
"id": "67929be175b7fd195dd5bc34dff0b8bd044c851b",
"size": "8907",
"binary": false,
"copies": "2",
"ref": "refs/heads/pwm-support",
"path": "volatile_cell/lib.rs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Assembly",
"bytes": "1677"
},
{
"name": "HTML",
"bytes": "1758"
},
{
"name": "Python",
"bytes": "1990"
},
{
"name": "Ruby",
"bytes": "25086"
},
{
"name": "Rust",
"bytes": "949272"
},
{
"name": "Shell",
"bytes": "2997"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 The Android Open Source Project
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.
-->
<trigger keyword="@string/glass_voice_trigger">
</trigger> | {
"content_hash": "0c352de025fc91ae6400f102cf8d6b4e",
"timestamp": "",
"source": "github",
"line_count": 18,
"max_line_length": 77,
"avg_line_length": 40.55555555555556,
"alnum_prop": 0.7191780821917808,
"repo_name": "unl-nimbus-lab/ros_glass_tools",
"id": "7e5160de05fbcc56f1bd30ddf8228fc404ee7a24",
"size": "730",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "applications/GlassRosMonitor/res/xml/voice_trigger_start.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "70727"
},
{
"name": "Python",
"bytes": "13127"
}
],
"symlink_target": ""
} |
<?php
class ClientesController extends AppController {
var $name = 'Clientes';
var $uses = array('Cliente','Movimiento','Provincia','Localidade','Departamento');
var $components = array('Paginator','Session','Cimage');
var $helpers = array('Html','Form','Time');
public function index() {
$this->layout = 'bootstrap3';
$this->Cliente->recursive = 0;
$this->paginate=array('limit' => 2,
'page' => 1,
'order'=>array('Cliente.nombre'=>'desc'),
'conditions'=>'');
$this->set('clientes', $this->paginate());
}
public function view($id = null) {
$this->layout = 'bmodalbox';
if (!$id) {
$this->Session->setFlash(__('Cliente Invalido', true));
$this->redirect(array('action' => 'index'));
}
$js_funciones=array('view');
$this->set('js_funciones',$js_funciones);
$this->set('cliente', $this->Cliente->read(null, $id));
}
public function add() {
$this->layout='bootstrap3';
if (!empty($this->data)) {
$this->Cliente->create();
$this->request->data['Cliente']['tallercito_id']=$this->Session->read('tallercito_id');
$this->request->data['Cliente']['user_id']=$this->Session->read('user_id');
$result = $this->Cliente->GuardarCliente($this->request->data);
if ($this->Cliente->save($this->data)) {
$this->Session->setFlash(__('No se pudo Guardar el Cliente ', true));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('El Cliente no se pudo grabar. Intente nuevamente.', true));
}
}
}
public function edit($id = null) {
if (!$id && empty($this->data)) {
$this->Session->setFlash(__('Cliente invalido', true));
$this->redirect(array('action' => 'index'));
}
if (!empty($this->request->data)) {
$this->request->data['Cliente']['documento']=str_replace('.', '', $this->request->data['Cliente']['documento']);;
if ($this->Cliente->save($this->request->data)) {
$this->Session->setFlash(__('Actualización de Datos del Cliente correcta', true));
$this->redirect(array('controller' => 'users','action' => 'index'));
} else {
$this->Session->setFlash(__('No se pudo guardar el Cliente. Por favor intente de nuevo.', true));
}
}
if (empty($this->data)) {
$this->data = $this->Cliente->read(null, $id);
}
}
public function delete($id = null) {
if (!$id) {
$this->Session->setFlash(__('Cliente Invalido', true));
$this->redirect(array('action'=>'index'));
}
if ($this->Cliente->delete($id)) {
$this->Session->setFlash(__('Cliente Borrado', true));
$this->redirect(array('action'=>'index'));
}
$this->Session->setFlash(__('No se pudo borrar el Cliente', true));
$this->redirect(array('action' => 'index'));
}
public function getclient($nro = null){
$this->layout='';
$documento = str_replace('.','',$nro);
if(!empty($nro) && $nro <> 0){
$clientes=$this->Cliente->find('all',array('conditions'=>array('Cliente.documento'=>$nro),
'fields'=>array('Cliente.id','Cliente.documento','nomape','User.email',
'Cliente.telefono','Cliente.domicilio')));
}
if(empty($clientes)){
$clientes=$this->Cliente->find('all',array('conditions'=>array('Cliente.id'=>$nro),
'fields'=>array('Cliente.id','Cliente.documento','nomape','User.email',
'Cliente.telefono','Cliente.domicilio')));
}
$this->set('clientes',$clientes);
}
public function seleccionarcliente(){
$this->layout = 'bmodalbox';
}
public function seleccionarclientemov(){
$this->layout = 'bmodalbox';
}
public function seleccionarclienteventa(){
$this->layout='bmodalbox';
}
public function listarclientes(){
$this->layout = '';
$ls_filtro = '1=1 ';
if(!empty($this->request->data)){
if($this->request->data['Cliente']['Documento']!= null &&
$this->request->data['Cliente']['Documento']!= '')
$ls_filtro = $ls_filtro.' AND Cliente.documento = '.str_replace('.', '', $this->request->data['Cliente']['Documento']);
if($this->request->data['Cliente']['Nombre']!= null &&
$this->request->data['Cliente']['Nombre']!= '')
$ls_filtro = $ls_filtro.' AND Cliente.nombre like "%'.$this->request->data['Cliente']['Nombre'].'%"';
if($this->request->data['Cliente']['Apellido']!= null &&
$this->request->data['Cliente']['Apellido']!= '')
$ls_filtro = $ls_filtro.' AND Cliente.apellido like "%'.$this->request->data['Cliente']['Apellido'].'%"';
}
$clientes = $this->Cliente->find('all',array('conditions'=>$ls_filtro));
$this->paginate=array('limit' => 6,
'page' => 1,
'order'=>array('Cliente.apellido,Cliente.nombre'=>'desc'),
'conditions'=>array($ls_filtro,'Cuenta.tallercito_id'=>$this->Session->read('tallercito_id')),
'fields'=>array('Cliente.id','Cliente.documento','Cliente.fechanac','Cliente.nombre','Cliente.apellido','Cuenta.id','Cliente.telefono','Cliente.domicilio'),
'joins'=>array(array('table'=>'cuentas',
'alias'=>'Cuenta',
'type'=>'LEFT',
'conditions'=>array('Cuenta.cliente_id=Cliente.id'))));
$this->set('clientes', $this->paginate());
}
/*
* @funcion: permite grabar siempre el lugar dónde es llamado el objeto
* */
public function beforeRender(){
$this->Session->Write('LLAMADO_DESDE','clientes');
try{
$result = $this->Acl->check(array(
'model' => 'Group', # The name of the Model to check agains
'foreign_key' => $this->Session->read('tipousr') # The foreign key the Model is bind to
), ucfirst($this->params['controller']).'/'.$this->params['action']);
//SI NO TIENE PERMISOS DA ERROR!!!!!!
if(!$result)
$this->redirect(array('controller' => 'accesorapidos','action'=>'seguridaderror',ucfirst($this->params['controller']).'-'.$this->params['action']));
}catch(Exeption $e){
}
/*Agregado provincia */
if($this->params['action']=='add' ||
$this->params['action']=='edit' ){
$provincias = $this->Provincia->find('list',array('fields'=>array('Provincia.id','Provincia.nombre')));
array_push($provincias, '');
asort($provincias,2);
$this->set(compact('provincias'));
if($this->params['action']=='edit'){
$localidades = $this->Localidade->find('list',array('fields'=>array('Localidade.id','Localidade.nombre'),'conditions'=>array('Localidade.departamento_id'=>$this->request->data['Cliente']['departamento_id'])));
$departamentos = $this->Departamento->find('list',array('fields'=>array('Departamento.id','Departamento.nombre'),'conditions'=>array('Departamento.provincia_id'=>$this->request->data['Cliente']['provincia_id'])));
$this->set(compact('localidades','departamentos'));
}
}
parent::beforeRender();
}
public function editimage(){
if ($this->request->is(array('post', 'put'))) {
if ($this->Cliente->save($this->request->data)) {
$this->Session->setFlash(__('Los Datos han sido guardado.'));
} else {
$clienteval = $this->Cliente->invalidFields();
if(!empty($clienteval)){
$this->Session->setFlash(__($clienteval['foto'][0]));
}else{
$this->Session->setFlash(__('No se pudo guardar los datos. Por favor, intente de nuevo.'));
}
}
}
$this->redirect(array('controller' => 'users','action'=>'edit',$this->request->data['Cliente']['user_id']));
}
public function mostrarfoto($id=null){
//buffer
$filename=WWW_ROOT."/files/img/".$id.'client'.'.png';
if(!file_exists($filename)){
$cliente = $this->Cliente->find("first",array('fields'=>
array('Cliente.foto'),
'conditions'=>array('Cliente.id'=>$id)));
if(!empty($cliente)){
//buffer the file
$file = new File($filename,true,0644);
$file->write(base64_decode($cliente['Cliente']['foto']),'wb',true);
$file->close();
$cimage = new CimageComponent(new ComponentCollection());
$cimage->view(base64_decode($cliente['Cliente']['foto']),'jpg');
}
}else{
$file = new File($filename);
$file->open('r',true);
$result = $file->read($filename,'rb',true);
$file->close();
$cimage = new CimageComponent(new ComponentCollection());
$cimage->view($result,'image/jpeg');
}
}
public function clientedeuda(){
$this->set('title_for_layout','Listado de Deudas de Clientes');
}
public function listarclientedeuda(){
$this->layout = '';
$ls_filtro = '1=1 ';
if(!empty($this->request->data)){
if($this->request->data['Cliente']['documento']!= null &&
$this->request->data['Cliente']['documento']!= '')
$ls_filtro = $ls_filtro.' AND Cliente.documento = '.str_replace('.', '', $this->request->data['Cliente']['documento']);
if($this->request->data['Cliente']['nombre']!= null &&
$this->request->data['Cliente']['nombre']!= '')
$ls_filtro = $ls_filtro.' AND Cliente.nombre like "%'.$this->request->data['Cliente']['nombre'].'%"';
if($this->request->data['Cliente']['apellido']!= null &&
$this->request->data['Cliente']['apellido']!= '')
$ls_filtro = $ls_filtro.' AND Cliente.apellido like "%'.$this->request->data['Cliente']['apellido'].'%"';
}
//$clientes = $this->Cliente->find('all',array('conditions'=>$ls_filtro));
$this->paginate=array('limit' => 10,
'page' => 1,
'order'=>array('Cliente.apellido,Cliente.nombre'=>'desc'),
'conditions'=>$ls_filtro,
'fields'=>array('Cliente.id','Cliente.documento','Cliente.fechanac','Cliente.nombre','Cliente.apellido','Cuenta.id'),
'joins'=>array(array('table'=>'cuentas',
'alias'=>'Cuenta',
'type'=>'LEFT',
'conditions'=>array('Cuenta.cliente_id=Cliente.id'))));
$clientes = $this->paginate();
$i=0;
foreach($clientes as $cliente){
$saldo = $this->Movimiento->GetTotalCuenta($cliente['Cliente']['id']);
if($saldo > 0){
$clientes[$i]['Cliente']['saldo']=$saldo;
}/*else{
unset($clientes[$i]);
}*/
$i++;
}
$this->set('clientes', $clientes);
}
/*
* Function: exportar los datos de deuda a un cvs
* */
public function exportdeudatcvs(){
$this->layout = 'ajax';
$this->response->download('clientedeuda-'.date('Y-m-d').'.cvs');
$clientes = $this->Cliente->find('all',array('fields'=>array('Cliente.id','Cliente.documento',
'Cliente.nombre','Cliente.apellido')));
$i=0;
foreach($clientes as $cliente){
$saldo = $this->Movimiento->GetTotalCuenta($cliente['Cliente']['id']);
if($saldo > 0){
$clientes[$i]['Cliente']['saldo']=$saldo;
}else{
unset($clientes[$i]);
}
$i++;
}
$this->set('clientes', $clientes);
return;
}
}
?>
| {
"content_hash": "95ef0624eb1e09a53fbed0ad6ee3db3e",
"timestamp": "",
"source": "github",
"line_count": 272,
"max_line_length": 218,
"avg_line_length": 38.893382352941174,
"alnum_prop": 0.6024198884582663,
"repo_name": "luisse/tbike",
"id": "875882c699847d003df34eb4405188e01aa71412",
"size": "10581",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/Controller/ClientesController.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "3038"
},
{
"name": "C++",
"bytes": "3021"
},
{
"name": "CSS",
"bytes": "390119"
},
{
"name": "HTML",
"bytes": "4005"
},
{
"name": "Hack",
"bytes": "109"
},
{
"name": "JavaScript",
"bytes": "1890720"
},
{
"name": "PHP",
"bytes": "10717596"
},
{
"name": "Python",
"bytes": "3978"
},
{
"name": "Shell",
"bytes": "23555"
}
],
"symlink_target": ""
} |
Bitcoin version 0.4.4 is now available for download at:
http://luke.sarmacoinsjr.org/programs/bitcoin/files/bitcoind-0.4.4/
This is a bugfix-only release based on 0.4.0.
Please note that the wxBitcoin GUI client is no longer maintained nor supported. If someone would like to step up to maintain this, they should contact Luke-Jr.
Please report bugs for the daemon only using the issue tracker at github:
https://github.com/bitcoin/bitcoin/issues
Stable source code is hosted at Gitorious:
http://gitorious.org/bitcoin/bitcoind-stable/archive-tarball/v0.4.4#.tar.gz
BUG FIXES
Limit the number of orphan transactions stored in memory, to prevent a potential denial-of-service attack by flooding orphan transactions. Also never store invalid transactions at all.
Fix possible buffer overflow on systems with very long application data paths. This is not exploitable.
Resolved multiple bugs preventing long-term unlocking of encrypted wallets (issue #922).
Only send local IP in "version" messages if it is globally routable (ie, not private), and try to get such an IP from UPnP if applicable.
Reannounce UPnP port forwards every 20 minutes, to workaround routers expiring old entries, and allow the -upnp option to override any stored setting.
Various memory leaks and potential null pointer deferences have been
fixed.
Several shutdown issues have been fixed.
Check that keys stored in the wallet are valid at startup, and if not,
report corruption.
Various build fixes.
If no password is specified to bitcoind, recommend a secure password.
Update hard-coded fallback seed nodes, choosing recent ones with long uptime and versions at least 0.4.0.
Add checkpoint at block 168,000.
| {
"content_hash": "29dbf714aefa2d4025d0049e5ee8f8a8",
"timestamp": "",
"source": "github",
"line_count": 30,
"max_line_length": 184,
"avg_line_length": 56.233333333333334,
"alnum_prop": 0.8032009484291642,
"repo_name": "inkvisit/sarmacoins",
"id": "72faaccb4704b7bd6e90991b78f17419076fbd22",
"size": "1687",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "doc/release-notes/bitcoin/release-notes-0.4.4.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Assembly",
"bytes": "7639"
},
{
"name": "C",
"bytes": "1014042"
},
{
"name": "C++",
"bytes": "4171326"
},
{
"name": "CSS",
"bytes": "39920"
},
{
"name": "Groff",
"bytes": "18192"
},
{
"name": "HTML",
"bytes": "50621"
},
{
"name": "Java",
"bytes": "2100"
},
{
"name": "M4",
"bytes": "141795"
},
{
"name": "Makefile",
"bytes": "87610"
},
{
"name": "Objective-C",
"bytes": "2023"
},
{
"name": "Objective-C++",
"bytes": "7241"
},
{
"name": "Protocol Buffer",
"bytes": "2308"
},
{
"name": "Python",
"bytes": "211499"
},
{
"name": "QMake",
"bytes": "26363"
},
{
"name": "Shell",
"bytes": "40963"
}
],
"symlink_target": ""
} |
<h1>Access to Google Sheets from Yii2</h1>
Example are using Google REST API. OAuth2 authorization and getting spreadsheet.
<h2>Register Google-project first</h2>
Follow the instructions -
<a href='https://support.google.com/cloud/answer/6158849?hl=en&ref_topic=6262490'>
Setting up OAuth 2.0
</a>.
<h2>Installation</h2>
Copy to corresponding directories of your app.
Change
CLIENT_ID,<br>
CLIENT_SECRET,<br>
REDIRECT_URI
in <code>frontend/controllers/GoogleController.php</code> on your own values.
Now you can view spreadsheets, if you have them, by http://yoursite.ru/goole
| {
"content_hash": "122b9a9816f0c45c2bd9ff902d05e75c",
"timestamp": "",
"source": "github",
"line_count": 24,
"max_line_length": 82,
"avg_line_length": 24.708333333333332,
"alnum_prop": 0.7571669477234402,
"repo_name": "sergmoro1/google-sheets",
"id": "a18190fb6893f8b891f15843731111b40d2fa02f",
"size": "593",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "readme.md",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "PHP",
"bytes": "6248"
}
],
"symlink_target": ""
} |
package controller_test
import (
"testing"
"time"
"github.com/fabric8-services/fabric8-wit/app/test"
. "github.com/fabric8-services/fabric8-wit/controller"
"github.com/fabric8-services/fabric8-wit/gormtestsupport"
"github.com/fabric8-services/fabric8-wit/resource"
testsupport "github.com/fabric8-services/fabric8-wit/test"
"github.com/goadesign/goa"
"github.com/stretchr/testify/suite"
)
type TestStatusREST struct {
gormtestsupport.DBTestSuite
}
func TestRunStatusREST(t *testing.T) {
suite.Run(t, &TestStatusREST{DBTestSuite: gormtestsupport.NewDBTestSuite()})
}
func (rest *TestStatusREST) SecuredController() (*goa.Service, *StatusController) {
svc := testsupport.ServiceAsUser("Status-Service", testsupport.TestIdentity)
return svc, NewStatusController(svc, rest.DB)
}
func (rest *TestStatusREST) UnSecuredController() (*goa.Service, *StatusController) {
svc := goa.New("Status-Service")
return svc, NewStatusController(svc, rest.DB)
}
func (rest *TestStatusREST) TestShowStatusOK() {
t := rest.T()
resource.Require(t, resource.Database)
svc, ctrl := rest.UnSecuredController()
_, res := test.ShowStatusOK(t, svc.Context, svc, ctrl)
if res.Commit != "0" {
t.Error("Commit not found")
}
if res.StartTime != StartTime {
t.Error("StartTime is not correct")
}
_, err := time.Parse("2006-01-02T15:04:05Z", res.StartTime)
if err != nil {
t.Error("Incorrect layout of StartTime: ", err.Error())
}
}
| {
"content_hash": "aed192fe43917541ff5ef934f126fa17",
"timestamp": "",
"source": "github",
"line_count": 51,
"max_line_length": 85,
"avg_line_length": 28.215686274509803,
"alnum_prop": 0.7366226546212647,
"repo_name": "ALMighty/almighty-core",
"id": "ea73c651ecd167e4ee187a80b3816376ad67fd15",
"size": "1439",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "controller/status_test.go",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Cucumber",
"bytes": "726"
},
{
"name": "Go",
"bytes": "25054"
},
{
"name": "Makefile",
"bytes": "1126"
}
],
"symlink_target": ""
} |
package org.nmrg.entity.sys;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.nmrg.entity.BaseEntity;
/**
** 角色-权限
**
* @ClassName: SysRolePermsEntity
** @Description: TODO
** @author CC
** @date 2017年8月30日 - 下午2:32:02
*/
@Entity
@Table(name = "sys_role")
public class SysRolePermsEntity extends BaseEntity {
// --- @Fields serialVersionUID : TODO
private static final long serialVersionUID = 4462042037830477883L;
@Id
@GeneratedValue
private Long id;
@Column(name = "role_id")
private Long roleId;
@Column(name = "permission_id")
private Long permsId;
public SysRolePermsEntity() {
super();
}
public SysRolePermsEntity(Long id, Long roleId, Long permsId) {
super();
this.id = id;
this.roleId = roleId;
this.permsId = permsId;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getRoleId() {
return roleId;
}
public void setRoleId(Long roleId) {
this.roleId = roleId;
}
public Long getPermsId() {
return permsId;
}
public void setPermsId(Long permsId) {
this.permsId = permsId;
}
}
| {
"content_hash": "c68df126ca9de34543fe8c5cf1802598",
"timestamp": "",
"source": "github",
"line_count": 71,
"max_line_length": 67,
"avg_line_length": 18.267605633802816,
"alnum_prop": 0.6638396299151889,
"repo_name": "bella0101/websitePortal",
"id": "f797cf7b66b2a01bbc3a62cca73ff805856af315",
"size": "1315",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/java/org/nmrg/entity/sys/SysRolePermsEntity.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "1367007"
},
{
"name": "HTML",
"bytes": "10594726"
},
{
"name": "Java",
"bytes": "247326"
},
{
"name": "JavaScript",
"bytes": "4978607"
},
{
"name": "PHP",
"bytes": "2966"
}
],
"symlink_target": ""
} |
package node
import "github.com/node4j/node-repo-proxy/util"
func GetMetaData() ([]byte, error) {
data, found := util.GetFromCache("node")
if found {
return data.([]byte), nil
}
data, err := loadMetaData()
if err != nil {
return nil, err
}
util.PutInCache("node", data)
return data.([]byte), nil
}
func loadMetaData() ([]byte, error) {
index, err := fetchNodeIndex()
if err != nil {
return nil, err
}
data, err := indexToMaven(index)
if err != nil {
return nil, err
}
return data, nil
}
| {
"content_hash": "607451354f2628fb6e43f33527aa28c8",
"timestamp": "",
"source": "github",
"line_count": 32,
"max_line_length": 47,
"avg_line_length": 16.15625,
"alnum_prop": 0.6344294003868471,
"repo_name": "srs/node-repo-proxy",
"id": "9ea4ad476f29a49e58e5ed31ceeb3b974cc1e237",
"size": "517",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "node/cache.go",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Go",
"bytes": "8496"
}
],
"symlink_target": ""
} |
<?php
namespace zpt\rest\test\message;
require_once __DIR__ . '/../test-setup.php';
use PHPUnit_Framework_TestCase as TestCase;
use zpt\rest\message\Response;
/**
* This class test the {@link Response} class.
*
* @author Philip Graham <[email protected]>
*/
class ResponseTest extends TestCase
{
public function test200() {
$response = new Response('1.1');
$this->assertEquals('200', $response->getStatusCode());
$this->assertEquals('OK', $response->getReasonPhrase());
}
public function testNumeric() {
$response = new Response('1.1', 200);
$this->assertEquals('200', $response->getStatusCode());
$this->assertEquals('OK', $response->getReasonPhrase());
}
}
| {
"content_hash": "76c0e746725fede1275e8b4251402e6d",
"timestamp": "",
"source": "github",
"line_count": 31,
"max_line_length": 58,
"avg_line_length": 22.161290322580644,
"alnum_prop": 0.6826783114992722,
"repo_name": "pgraham/php-rest-server",
"id": "120e2a3ad551d0dd234d7c13d02e4f13fa65baad",
"size": "924",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "test/message/ResponseTest.php",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "PHP",
"bytes": "73189"
}
],
"symlink_target": ""
} |
"""
Validates the media_metric.
"""
from cli_tools.tbmv3.validators import simple_validator
def CompareHistograms(test_ctx):
v2_metric = 'mediaMetric'
v3_metric = 'media_metric'
v2_histograms = test_ctx.RunTBMv2(v2_metric)
v3_histograms = test_ctx.RunTBMv3(v3_metric)
simple_config = {
'v2_metric': v2_metric,
'v3_metric': v3_metric,
# 1 microsecond precision - default for ms unit histograms.
'float_precision': 1e-3,
'histogram_mappings': {
# mappings are 'v2_histogram: 'v3_histogram'.
'time_to_video_play': 'media::time_to_video_play',
'time_to_audio_play': 'media::time_to_audio_play',
# Dropped frame count is broken in the TBMv2 metric.
# 'dropped_frame_count': 'media::dropped_frame_count',
'buffering_time': 'media::buffering_time',
# Roughness is reported as double in the v3 metric, but as int in v2.
'roughness': ('media::roughness', 1),
'freezing': 'media::freezing'
},
}
simple_validator.CompareSimpleHistograms(test_ctx, simple_config,
v2_histograms, v3_histograms)
# seek time histograms are merged.
seek_time_histograms = [
# v3 histogram => set of v2 histograms that are merged into it.
['media::seek_time', ['seek_time_0_5', 'seek_time_9']],
[
'media::pipeline_seek_time',
['pipeline_seek_time_0_5', 'pipeline_seek_time_9']
],
]
for entry in seek_time_histograms:
v3_hist_name = entry[0]
v3_hist = simple_validator.OptionalGetHistogram(v3_histograms, v3_hist_name,
v3_metric, 'v3')
v2_hists = []
for v2_hist_name in entry[1]:
v2_hist = simple_validator.OptionalGetHistogram(v2_histograms,
v2_hist_name, v2_metric,
'v2')
if v2_hist is None:
continue
v2_hists += [v2_hist]
if v3_hist is None:
if len(v2_hists) > 0:
raise Exception('Expected a %s v3 histogram, but none exists' %
(v3_hist_name))
continue
if len(v2_hists) == 0:
raise Exception('Have a %s v3 histogram but no matching v2 ones' %
(v3_hist_name))
v2_samples = []
for v2_hist in v2_hists:
v2_samples += [s for s in v2_hist.sample_values if s is not None]
v3_samples = [s for s in v3_hist.sample_values if s is not None]
test_ctx.assertEqual(len(v2_samples), len(v3_samples))
v2_samples.sort()
v3_samples.sort()
for v2_sample, v3_sample in zip(v2_samples, v3_samples):
test_ctx.assertAlmostEqual(v2_sample,
v3_sample,
delta=simple_config['float_precision'])
| {
"content_hash": "319dd4ab572972909efd411b50a816a5",
"timestamp": "",
"source": "github",
"line_count": 80,
"max_line_length": 80,
"avg_line_length": 35.8875,
"alnum_prop": 0.5649599442702891,
"repo_name": "scheib/chromium",
"id": "39c8d62b5bb9083c402ec6b63d0a1f73c5be4969",
"size": "3033",
"binary": false,
"copies": "5",
"ref": "refs/heads/main",
"path": "tools/perf/cli_tools/tbmv3/validators/media_metric.py",
"mode": "33188",
"license": "bsd-3-clause",
"language": [],
"symlink_target": ""
} |
SYNONYM
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
Führ. Pilzk. (Zwickau) 75 (1871)
#### Original name
Agaricus tener Schaeff., 1774
### Remarks
null | {
"content_hash": "f0fbb5b46e599e5359f4071d45361ea3",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 39,
"avg_line_length": 14.307692307692308,
"alnum_prop": 0.6989247311827957,
"repo_name": "mdoering/backbone",
"id": "c51441244045ce46906d585f6dfffd11d33b6f46",
"size": "262",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Fungi/Basidiomycota/Agaricomycetes/Agaricales/Bolbitiaceae/Conocybe/Conocybe pilosella/ Syn. Galera tenera pilosella/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
<div class="col-md-12 mb30">
<div class="panel panel-info panel-hovered panel-stacked mb30 text-left">
<div class="clearfix tabs-linearrow">
<ul class="nav nav-tabs">
<li class="active" id="li-account"><a href="#tab-linearrow-one" data-toggle="tab" aria-expanded="false">My Account</a></li>
<li class=""><a href="#tab-linearrow-two" data-toggle="tab" aria-expanded="true">KYC</a></li>
<li class=""><a href="#tab-linearrow-three" data-toggle="tab" aria-expanded="true">Bank Details</a></li>
<li class="" id="li-changepassword"><a href="#tab-linearrow-four" data-toggle="tab" aria-expanded="true">Change Password</a></li>
<li class=""><a href="#tab-linearrow-five" data-toggle="tab" aria-expanded="true">Edit Your Account</a></li>
<li class=""><a href="#tab-linearrow-six" data-toggle="tab" aria-expanded="true">Support Matrix</a></li>
</ul>
</div>
<div class="tab-content" >
<div id="confirm-div"></div>
<div class="tab-pane active" id="tab-linearrow-one">
<?php echo form_open('common/update_profile','method="post" id="profile_form" class="form-horizontal"')?>
<div class="row" style="margin-top:20px">
<div class="col-md-2">
<label>User Id<font color="red">*</font></label>
<input type="text" class="form-control" name="userid" id="userid" value="<?=$this->session->userdata('user_id')?>" required>
</div>
<!-- <div class="col-md-2">
<label>User Name</label>
<input type="text" class="form-control" required>
</div>-->
<div class="col-md-4">
<label>Full Name<font color="red">*</font></label>
<input type="text" class="form-control" name="fullname" id="fullname" value="<?php echo @$profile_info->Name;?>" required>
</div>
<div class="col-md-4">
<label>Company Name</label>
<input type="text" class="form-control" name="companyname" id="companyname" value="<?php echo @$profile_info->Company_Name;?>">
</div>
</div>
<div class="row" style="margin-top:20px">
<div class="col-md-4">
<label>Mobile Number<font color="red">*</font></label>
<input type="text" class="form-control" name="mobileno" id="mobileno" value="<?=$this->session->userdata('Mobile')?>" readonly required>
</div>
<div class="col-md-4">
<label>Email<font color="red">*</font></label>
<input type="text" class="form-control" name="emailid" id="emailid" value="<?=$this->session->userdata('email_id')?>" required readonly>
</div>
<div class="col-md-4">
<label>City<font color="red">*</font></label>
<input type="text" class="form-control" name="city" id="geocomplete" value="<?php echo @$profile_info->City;?>" required>
<div class="map_canvas" style="display:none !important"></div>
</div>
</div>
<div class="row" style="margin-top:20px">
<div class="col-md-8">
<label>Address</label>
<textarea class="form-control" name="content" rows="1" name="address" id="address"><?php echo @$profile_info->Address;?></textarea>
</div>
<div class="col-md-4">
<label>Postal Code<font color="red">*</font></label>
<input type="text" class="form-control" name="postalcode" id="postalcode" value="<?php echo @$profile_info->Postal_code;?>" required>
</div>
</div>
<div class="row text-right" style="margin-top:20px">
<button type="submit" name="form_type" value="profile" class="btn btn-success waves-effect">Update Profile</button>
</div>
</form>
</div>
<div class="tab-pane" id="tab-linearrow-two">
<?php echo form_open('common/update_profile','method="post" id="kyc_form" class="form-horizontal" enctype="multipart/form-data"')?>
<div class="row" >
<div class="col-md-8">
<div class="row" style="margin-top:20px">
<div class="col-md-4">
<label>First Name<font color="red">*</font></label>
<input type="text" name="firstname" class="form-control" required title="Please enter First Name" value="<?php echo @$kyc_info->first_name;?>"/>
</div>
<div class="col-md-4">
<label>Middle Name</label>
<input type="text" name="middlename" class="form-control" required title="Please enter Middle Name" value="<?php echo @$kyc_info->middle_name;?>"/>
</div>
<div class="col-md-4">
<label>Last Name<font color="red">*</font></label>
<input type="text" name="lastname" class="form-control" required title="Please enter Last Name" value="<?php echo @$kyc_info->last_name;?>"/>
</div>
</div>
<div class="row" style="margin-top:20px">
<div class="col-md-5">
<label>Mother Name<font color="red">*</font></label>
<input type="text" name="mothername" class="form-control" required title="Please enter Mother Name" value="<?php echo @$kyc_info->mother_name;?>"/>
</div>
<div class="col-md-4">
<label>Date of Birth<font color="red">*</font></label>
<div class="input-group date" id="datepickerDemo">
<input type="text" class="form-control" name="datepickerDemo" required title="Please enter Date of Birth" value="<?php echo @$kyc_info->dob;?>"/>
<span class="input-group-addon"><i class=" ion ion-calendar"></i></span> </div>
</div>
<div class="col-md-3">
<label>Gender<font color="red">*</font></label>
<p>
<label>
<input type="radio" <?php if(@$kyc_info->gender == 1){ echo "checked ";}else{ echo "";}?> name="gender" value="1">
Female</label>
<label>
<input type="radio" name="gender" <?php if(@$kyc_info->gender == 2 ){ echo "checked ";}else{ echo "";}?> value="2">
Male</label>
</p>
</div>
</div>
<div class="row" style="margin-top:20px">
<div class="col-md-12">
<label>Permanent Address<font color="red">*</font></label>
<textarea class="form-control" name="praddress" rows="2" required title="Please enter Permanent Address" /><?php echo @$kyc_info->permanent_address;?></textarea>
</div>
</div>
<div class="row" style="margin-top:20px">
<div class="col-md-12">
<label>Communication Address<font color="red">*</font></label>
<textarea class="form-control" name="comaddress" required title="Please enter Permanent Address" rows="2" /><?php echo @$kyc_info->communication_address;?></textarea>
</div>
</div>
</div>
<div class="col-md-4">
<h4 style="margin-top:20px">Bussiness Details<font color="red">*</font></h4>
<div class="row">
<div class="col-md-10">
<label>Bussiness type</label>
<input type="text" class="form-control" name="btype" required value="<?php echo @$kyc_info->bussiness_type;?>">
</div>
</div>
<div class="row">
<div class="col-md-11">
<label>Organization Name</label>
<textarea class="form-control" name="organizationname" rows="5" required><?php echo @$kyc_info->organization_name;?></textarea>
</div>
</div>
<div class="row" style=" padding-left:7px">
<label>Upload Photo<font color="red">*</font></label>
<input type="hidden" name="h_photo" value="<?php echo @$kyc_info->photo;?>"/>
<input type="file" name="photo" <?php if(empty($kyc_info->photo)){?>required<?php }?> title="Please upload photo" />
<a href="<?php echo base_url();?>uploads/profile/<?php echo $this->session->userdata('user_id');?>/<?php echo @$kyc_info->photo;?>" target="_blank"><?php echo @$kyc_info->photo;?></a>
</div>
<div class="row" style=" padding-left:7px">
<label>Upload Pan card<font color="red">*</font></label>
<input type="hidden" name="h_pancard" value="<?php echo @$kyc_info->pancard;?>"/>
<input type="file" name="pancard" <?php if(empty($kyc_info->pancard)){?>required<?php }?> title="Please upload PAN Card"/>
<a href="<?php echo base_url();?>uploads/profile/<?php echo $this->session->userdata('user_id');?>/<?php echo @$kyc_info->pancard;?>" target="_blank"><?php echo @$kyc_info->pancard;?></a>
</div>
<div class="row" style=" padding-left:7px">
<label>Resident Proof<font color="red">*</font></label>
<input type="hidden" name="h_proof" value="<?php echo @$kyc_info->resident_proof;?>"/>
<input type="file" name="proof" <?php if(empty($kyc_info->resident_proof)){?>required<?php }?> title="Please upload Resident Proof" />
<a href="<?php echo base_url();?>uploads/profile/<?php echo $this->session->userdata('user_id');?>/<?php echo @$kyc_info->resident_proof;?>" target="_blank"><?php echo @$kyc_info->resident_proof;?></a>
</div>
</div>
</div>
<div class="row text-right" style="margin-top:20px">
<button type="submit" name="form_type" value="kyc" class="btn btn-success waves-effect">Submit</button>
</div>
</form>
</div>
<div class="tab-pane" id="tab-linearrow-three">
<?php echo form_open('common/update_profile','method="post" id="bank_form" class="form-horizontal"')?>
<div class="row" style="margin-top:20px">
<div class="col-md-4 col-md-offset-1">
<label>Account Holder Name<font color="red">*</font></label>
<input type="text" class="form-control" name="holdername" id="holdername" value="<?php echo @$bank_info->acc_holder_name;?>">
</div>
<div class="col-md-4 col-md-offset-1">
<label>Account Type<font color="red">*</font></label>
<select class="form-control" name="accounttype" id="accounttype">
<option value="current">Current Account</option>
<option value="saving">Saving Account</option>
</select>
</div>
</div>
<div class="row" style="margin-top:20px" >
<div class="col-md-4 col-md-offset-1" id="selectaccount">
<p>
<label>
<input type="radio" name="accountselect" checked="checked" value="bankname">
Bank Name<font color="red">*</font>
</label>
<label>
<input type="radio" name="accountselect" value="ifsc">
IFSC Code<font color="red">*</font>
</label>
</p>
</div>
</div>
<div class="row" style="margin-top:20px;" id="showbank">
<div class="col-md-4 col-md-offset-1">
<label>Branch Name<font color="red">*</font></label>
<input type="text" name="branchname" id="branchname" class="form-control" value="<?php echo @$bank_info->branch_name;?>">
</div>
<div class="col-md-4 col-md-offset-1">
<label>Bank Name<font color="red">*</font></label>
<input type="text" name="bankname" id="bankname" class="form-control" value="<?php echo @$bank_info->bank_name;?>">
</div>
</div>
<div class="row" style="margin-top:20px;display:none" id="showifsc">
<div class="col-md-4 col-md-offset-1">
<label>IFSC Code<font color="red">*</font></label>
<input type="text" name="ifsccode" id="ifsccode" class="form-control" value="<?php echo @$bank_info->ifsc_code;?>">
</div>
</div>
<div class="row" style="margin-top:20px">
<div class="col-md-4 col-md-offset-1">
<label>Account Number<font color="red">*</font></label>
<input type="text" class="form-control" name="accountno" id="accountno" value="<?php echo @$bank_info->acc_number;?>">
</div>
<div class="col-md-4 col-md-offset-1">
<label>Confirm Account Number<font color="red">*</font></label>
<input type="text" class="form-control" name="confirmacctno" id="confirmacctno">
</div>
</div>
<div class="row text-right" style="margin-top:20px">
<button name="form_type" value="bank" class="btn btn-success waves-effect">Submit</button>
</div>
</form>
</div>
<div class="tab-pane" id="tab-linearrow-four">
<?php echo form_open('common/update_password','method="post" id="changepassword_form" class="form-horizontal"')?>
<div class="row" style="margin-top:20px">
<div class="col-md-4">
<label>Current Password</label>
<input type="password" class="form-control" name="current_password" id="current_password">
</div>
</div>
<div class="row" style="margin-top:20px">
<div class="col-md-4">
<label>New Password</label>
<input type="password" class="form-control" name="new_password" id="new_password">
</div>
<div class="col-md-4">
<label>Confirm New Password</label>
<input type="password" class="form-control" name="confirm_password" id="confirm_password">
</div>
</div>
<div class="row text-right" style="margin-top:20px">
<button type="submit" class="btn btn-success waves-effect">Submit</button>
</div>
</form>
</div>
<div class="tab-pane" id="tab-linearrow-five">
<div class="panel-body">
<div class="row">
<div class="col-md-4">
<label>Change Designation</label>
<input type="text" class="form-control" required>
</div>
<div class="col-md-4">
<label>Change Time</label>
<input type="text" class="form-control" required>
</div>
</div>
<div class="row" style="margin-top:20px">
<div class="col-md-4">
<label>Change Your Qualification</label>
<input type="text" class="form-control" required>
</div>
<div class="col-md-4">
<label>Add Reviews</label>
<input type="text" class="form-control" required>
</div>
<div class="col-md-4">
<label>Change Hours of Operation</label>
<input type="text" class="form-control" required>
</div>
</div>
<div class="row" style="margin-top:20px">
<div class="col-md-8">
<label>Update Your Listed services</label>
<input class="form-control" name="content">
</div>
<div class="col-md-4">
<label>Change Moderating</label>
<input type="text" class="form-control" required>
</div>
</div>
<div class="row text-right" style="margin-top:20px">
<button type="button" class="btn btn-success waves-effect">Update Profile</button>
</div>
</div>
</div>
<div class="tab-pane" id="tab-linearrow-six">
<div class="row" style="margin-bottom:10px;">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-body">
<div class="row">
<table>
<thead>
<tr><th colspan="2">COMPANY DETAILS</td></th>
</thead>
<tbody>
<tr>
<td style="width:30%;">Company Name:</td>
<td>Varini Info System Pvt. Ltd.</td>
</tr>
<tr>
<td>Company city:</td>
<td>Hyderabad</td>
</tr>
<tr>
<td>Company Address:</td>
<td>302, Sri Kalki Chambers, Opp. Reliance Fresh, Madinaguda, Hyderabad</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-body">
<table>
<thead>
<tr>
<th colspan="2">SALES CONTACT</th>
</tr>
</thead>
<tbody>
<tr>
<td style="width:50%">Contact Number:</td>
<td>9999999999</td>
</tr>
<tr>
<td>Email:</td>
<td>[email protected]</td>
</tr>
<tr>
<td style="vertical-align:top">Sales Timings:</td>
<td>9:30am to 5:30pm (Mon-Sat)</td>
</tr>
<tr>
<td style="vertical-align:top">Sales Comments:</td>
<td>You can also contact your account manager for Sales Enquires</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-body">
<table>
<thead>
<tr>
<th colspan="2">SUPPORT CONTACT</th>
</tr>
</thead>
<tbody>
<tr>
<td style="width:50%">Contact Number:</td>
<td>9999999999</td>
</tr>
<tr>
<td>Email:</td>
<td>[email protected]</td>
</tr>
<tr>
<td style="vertical-align:top">Support Timings:</td>
<td>9:30am to 5:30pm (Mon-Sat)</td>
</tr>
<tr>
<td style="vertical-align:top">Support Comments:</td>
<td>You can also contact your account manager for Support Enquires</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-body">
<table>
<thead>
<tr>
<th colspan="2">BILLING CONTACT</th>
</tr>
</thead>
<tbody>
<tr>
<td style="width:50%">Contact Number:</td>
<td>9999999999</td>
</tr>
<tr>
<td>Email:</td>
<td>[email protected]</td>
</tr>
<tr>
<td style="vertical-align:top">Billing Timings:</td>
<td>9:30am to 5:30pm (Mon-Sat)</td>
</tr>
<tr>
<td style="vertical-align:top">Billing Comments:</td>
<td>You can also contact your account manager for Billing Queries</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function() {
//alert('heloo');
$('#bank_form input').on('change', function() {
//if($('#account').is(':checked')) { alert("it's checked"); }
if($('input[name=accountselect]:checked', '#bank_form').val()=='ifsc'){
$('#showifsc').show();
$('#showbank').hide();
}else{
$('#showifsc').hide();
$('#showbank').show();
}
});
$('#confirm-div').hide();
<?php if($this->session->flashdata('msg')){ ?>
$('#confirm-div').html('<?php echo $this->session->flashdata('msg'); ?>').show();
$('#confirm-div').addClass("alert alert-warning");
//$('#li-changepassword').addClass("active");
//$('#li-account').removeClass("active");
setTimeout(function() { $("#confirm-div").hide(); }, 5000);
<?php }?>
});
$(document).ready(function(){
$("#geocomplete").geocomplete({
map: ".map_canvas",
details: "form",
types: ["geocode", "establishment"],
});
$("#profile_form").validate({
rules: {
//usertype: {required: {depends: function(element) {return $("#usertype").val() == '';}}},
fullname: {required: true},
mobileno:{required:true,minlength:10,maxlength:10},
emailid:{required:true,email:true},
city:{required:true},
postalcode:{required:true},
},
messages: {
fullname:{required:"Please enter Full Name"},
mobileno:{required:"Please enter Mobile Number"},
emailid:{required:"Please enter Email",email:"Please enter valid Email"},
city:{required: "Please enter City"},
postalcode:{required: "Please enter Postcode"},
},
submitHandler: function(form) {
form.submit();
}
});
$("#kyc_form").validate({
submitHandler: function(form) {
form.submit();
}
});
$("#bank_form").validate({
rules: {
holdername: {required: true,minlength: 3,maxlength: 50,lettersonly: true},
accounttype:{required:true},
branchname:{required:true,lettersonly: true},
bankname:{required:true,lettersonly: true},
ifsccode:{required:true,ifsc_code: true},
accountno:{required:true,number: true},
confirmacctno:{required:true,equalTo : "#accountno",number: true},
},
messages: {
holdername:{required:"Please enter Account Holder Name"},
accounttype:{required:"Please select Account Type"},
branchname:{required:"Please enter Branch Name"},
bankname:{required:"Please enter Bank Name"},
ifsccode:{required:"Please enter IFSC Code"},
accountno:{required: "Please enter Account Number"},
confirmacctno:{required: "Please enter Confirm Account Number",equalTo:"Please verify your Account Number"},
},
submitHandler: function(form) {
form.submit();
}
});
jQuery.validator.addMethod("lettersonly", function(value, element) {
return this.optional(element) || /^[a-zA-Z ]*$/i.test(value);
}, "Please enter only letters");
jQuery.validator.addMethod("ifsc_code", function(value, element) {
return this.optional(element) || /^[A-Z]{4}(0)[\d]{6}$/i.test(value);
}, "Please enter valid IFSC code");
$("#changepassword_form").validate({
rules: {
current_password :{required:true,minlength:6,maxlength:20},
new_password :{required:true,minlength:6,maxlength:20},
confirm_password :{required:true,minlength:6,maxlength:20,equalTo : "#new_password"},
},
messages: {
current_password : {required:"Please enter Current password",minlength:"Password should have minimum 6 characters",maxlength:"Password should have maximum 20 characters"},
new_password : {required:"Please enter New password",minlength:"New password should have minimum 6 characters",maxlength:"New password should have maximum 20 characters"},
confirm_password :{required:"Please enter Confirm password",minlength:"New password should have minimum 6 characters",maxlength:"Confirm password should have maximum 20 characters",equalTo:"New password and confirm password should be same"},
},
submitHandler: function(form) {
form.submit();
}
});
$(function () {
$('#datepickerDemo').datepicker({
format: "yyyy-mm-dd"
});
$('#datepickerDemo1').datepicker({
format: "yyyy-mm-dd"
});
});
});
</script>
<style>
.pac-container:after{
content:none !important;
}
</style>
| {
"content_hash": "9083febe4c8e01ba9fb0fa25fbb98614",
"timestamp": "",
"source": "github",
"line_count": 558,
"max_line_length": 269,
"avg_line_length": 47.25627240143369,
"alnum_prop": 0.4834464712351625,
"repo_name": "nageswararao-nali/nagbus",
"id": "b3b8b4294c9fb1f28725f2fefd1e3b2e545bc005",
"size": "26369",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "application_vent/modules/website/views/agent/profile09052016.php",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "3099"
},
{
"name": "CSS",
"bytes": "3504949"
},
{
"name": "HTML",
"bytes": "3863934"
},
{
"name": "JavaScript",
"bytes": "4760011"
},
{
"name": "PHP",
"bytes": "34750101"
},
{
"name": "PLSQL",
"bytes": "7656"
},
{
"name": "Perl",
"bytes": "5452"
}
],
"symlink_target": ""
} |
import * as fp from "@iml/fp";
export function parselyBox() {
"ngInject";
return {
restrict: "E",
scope: {},
bindToController: {
onSubmit: "&",
completer: "&",
parserFormatter: "=",
query: "=?"
},
controllerAs: "ctrl",
controller: fp.noop,
template: `<form name="form" class="p-box" ng-submit="ctrl.onSubmit({ qs: ctrl.query })">
<completionist completer="ctrl.completer({ value: value, cursorPosition: cursorPosition })">
<div class="input-group">
<div class="status-indicator">
<i ng-if="form.$valid" class="fa fa-check-circle"></i>
<i ng-if="form.$invalid" class="fa fa-times-circle"></i>
</div>
<input
name="query"
autocomplete="off"
type="search"
class="form-control"
parse-query
parser-formatter="::ctrl.parserFormatter"
completionist-model-hook
ng-model="ctrl.query"
/>
<iml-tooltip class="error-tooltip" toggle="form.$invalid" direction="top">
{{ ctrl.parserFormatter.parser(form.query.$viewValue).message }}
</iml-tooltip>
<span class="input-group-btn">
<button type="submit" class="btn btn-primary" ng-disabled="form.$invalid">
<i class="fa fa-search"></i>Search
</button>
</span>
</div>
<completionist-dropdown></completionist-dropdown>
</completionist>
</form>`
};
}
export function parseQuery() {
"ngInject";
return {
require: "ngModel",
scope: {
parserFormatter: "="
},
link(scope, element, attrs, ctrl) {
ctrl.$formatters.push(function parseToInput(x) {
const result = scope.parserFormatter.formatter(x);
if (result instanceof Error) throw result;
return result;
});
ctrl.$parsers.push(function parseToQs(x) {
const result = scope.parserFormatter.parser(x);
if (result instanceof Error) return undefined;
return result;
});
}
};
}
| {
"content_hash": "1b1aff559fdf30deac30f702c9eb9213",
"timestamp": "",
"source": "github",
"line_count": 73,
"max_line_length": 94,
"avg_line_length": 27.301369863013697,
"alnum_prop": 0.5890617160060211,
"repo_name": "intel-hpdd/GUI",
"id": "06fea5463547c5f37da0cdb202401aadbc597480",
"size": "2149",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "source/iml/parsely-box/parsely-box.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "45410"
},
{
"name": "HTML",
"bytes": "2784"
},
{
"name": "JavaScript",
"bytes": "1690243"
},
{
"name": "Makefile",
"bytes": "15807"
},
{
"name": "Shell",
"bytes": "3721"
}
],
"symlink_target": ""
} |
<HTML>
<HEAD>
<TITLE>VerbouwingVerplaatsingGebruiksfunctiewijziging</TITLE>
</HEAD>
<BODY>
<FONT face="Verdana, Helvetica, sans-serif">
<H2>
<FONT SIZE="-1">http://data.labs.pdok.nl/data/bbl/bbl#VerbouwingVerplaatsingGebruiksfunctiewijziging</FONT><BR>
Individual VerbouwingVerplaatsingGebruiksfunctiewijziging</H2>
<HR>
<TR BGCOLOR="white">
<TD>
<B><FONT size="-1">type</FONT></B>
<DL>
<DD>
<TABLE><TR><TD VALIGN="TOP">
<IMG border="0" src="icons/RDFSClass.gif" width="16" height="16"></TD><TD><FONT size="-1">
<A href="Toets.html">Toets</A></FONT></TD></TR></TABLE>
</DD>
</DL>
</TD></TR>
<TR BGCOLOR="white">
<TD>
<B><FONT size="-1">skos:definition</FONT></B>
<DL>
<DD>
<TABLE><TR><TD VALIGN="TOP">
<IMG border="0" src="icons/nl.gif" width="16" height="16"></TD><TD><FONT size="-1">
Toetsing is gericht op het verbouwen en/of het verplaatsen van een bouwwerk en/of op de wijziging van een gebruiksfunctie.
</FONT></TD></TR></TABLE>
</DD>
</DL>
</TD></TR>
<TR BGCOLOR="white">
<TD>
<B><FONT size="-1">skos:prefLabel</FONT></B>
<DL>
<DD>
<TABLE><TR><TD VALIGN="TOP">
<IMG border="0" src="icons/nl.gif" width="16" height="16"></TD><TD><FONT size="-1">
verbouwing, verplaatsing of wijziging van gebruiksfunctie
</FONT></TD></TR></TABLE>
</DD>
</DL>
</TD></TR>
</FONT>
<P align="right"><FONT size="-1" face="Verdana, Helvetica, sans-serif">Generated with <A href="http://www.topbraidcomposer.com" target="_top">TopBraid Composer</A>
by <A href="http://www.topquadrant.com" target="_top">TopQuadrant, Inc.</A></P>
</BODY>
</HTML>
| {
"content_hash": "6e0e3747e324e7eac38227f6cda05471",
"timestamp": "",
"source": "github",
"line_count": 50,
"max_line_length": 163,
"avg_line_length": 30.56,
"alnum_prop": 0.6708115183246073,
"repo_name": "PDOK/data.labs.pdok.nl",
"id": "081d1cd252327089b6831328f010c08c70f99db8",
"size": "1528",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "data/bbl/VerbouwingVerplaatsingGebruiksfunctiewijziging.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "460328"
},
{
"name": "HTML",
"bytes": "636442"
},
{
"name": "JavaScript",
"bytes": "11535717"
},
{
"name": "Python",
"bytes": "13532"
},
{
"name": "Ruby",
"bytes": "93"
},
{
"name": "Shell",
"bytes": "12301"
}
],
"symlink_target": ""
} |
"use strict";
/**
* Each module has a <moduleName>.module.js file. This file contains the angular module declaration -
* angular.module("moduleName", []);
* The build system ensures that all the *.module.js files get included prior to any other .js files, which
* ensures that all module declarations occur before any module references.
*/
(function (module) {
var EVENTS = {
start:'mousedown touchstart',
move:'mousemove touchmove',
end: 'mouseup touchend'
};
var NO_SELECT_CLASS = 'no-select';
var CONTAINER_CLASS = 'ng-carousel';
var CONTAINER_NO_INNER_WRAPPER_CLASS = 'ng-carousel-no-inner-wrapper';
var CONTAINER_ACTIVE_CLASS = 'ng-carousel-active';
var defaultOptions = {
carousel: '$carousel',
carouselInterval: 3000,
carouselWrapAround: false,
carouselSwipeGesture: true,
carouselSwipeGestureThreshold: 30,
carouselSwipeGestureTimeout: 1000,
carouselIndex: 0
};
module.controller('ngCarouselController',['$scope','$timeout','ngCarouselService', CarouselController]);
module.directive('carousel', ['ngCarouselService', '$window', '$document', CarouselDirective]);
function CarouselController($scope, $timeout, carouselService){
var model = this;
var lastTimeout;
model.suspended = false;
model.$index = 0;
model.init = init;
model.next = next;
model.resetTimeout = resetTimeout;
model.previous = previous;
// expose index property
Object.defineProperty(model, 'index',{
set: function(value){
model.$index = value;
ensureValidIndexRange();
resetTimeout();
}, get: function(){
return model.$index;
}
});
function init(items){
// if list of items is modified, find currently visible item and adjust the index (no animation)
if (model.items && model.items.length && items && items.length) {
var item = model.items[model.$index];
var newIndex = -1;
for(var i = 0; i< items.length ; i++){
if (items[i] === item) {
newIndex = i;
break;
}
}
model.disableTransition();
if (newIndex!==-1){
model.$index = newIndex;
}
}
model.items = []; // make a copy
if(items){
angular.forEach(items, function(i) {
model.items.push(i);
});
}
ensureValidIndexRange();
resetTimeout();
}
function resetTimeout(){
if(lastTimeout){
$timeout.cancel(lastTimeout);
}
// schedule flip only if interval is set and user did not start dragging
if(model.options.carouselInterval>0 && !model.suspended){
lastTimeout = $timeout(next, model.options.carouselInterval);
}
}
function next(ev){
model.$index++;
ensureValidIndexRange();
resetTimeout();
}
function previous(ev){
model.$index--;
ensureValidIndexRange();
resetTimeout();
}
function ensureValidIndexRange() {
if (model.$index >= model.items.length) {
model.$index = model.options.carouselWrapAround ? 0 : model.items.length - 1;
}
if (model.$index < 0) {
model.$index = model.options.carouselWrapAround ? model.items.length - 1 : 0;
}
}
}
function CarouselDirective(carouselService, $window, $document){
return {
controller:'ngCarouselController',
compile: compile
};
function compile(element, attr, transclude){
var model = false;
var targetElement = element.find('ul');
var li = targetElement.find('li');
if (li.length ===1 && li.attr('ng-repeat')) {
var parts = li.attr('ng-repeat').split(' ');
model = parts[2]; // item in items -> should take `items`
}
var hasInnerWrapper = element[0].querySelectorAll('.carousel-inner-wrapper').length > 0;
return {pre: link};
function link($scope, element, attr, ctrl){
var deferredUpdate = carouselService.invokeOncePerFrame(updateUI);
var initialEvent;
var startTime;
var eventTarget = angular.element($window);
var selectionTarget = $document.find('body');
var wasMoreThanThreshold;
var elementWidth;
ctrl.options = carouselService.normalizeOptions(attr, defaultOptions);
ctrl.disableTransition = disableTransition;
ctrl.suspended = false;
ctrl.$index = ctrl.options.carouselIndex * 1;
ctrl.$offset = 0;
ctrl.options.carouselSwipeGestureThreshold *= 1;
ctrl.options.carouselSwipeGestureTimeout *= 1;
if(typeof ctrl.options.carouselWrapAround ==='string'){
ctrl.options.carouselWrapAround = ctrl.options.carouselWrapAround!=='false';
}
if(typeof ctrl.options.carouselSwipeGesture ==='string'){
ctrl.options.carouselSwipeGesture = ctrl.options.carouselSwipeGesture!=='false';
}
init();
function init() {
element.addClass(CONTAINER_CLASS);
if(!hasInnerWrapper){
element.addClass(CONTAINER_NO_INNER_WRAPPER_CLASS);
}
if (ctrl.options.carouselSwipeGesture) {
element.on(EVENTS.start, pointerDown);
}
// disable/enable timeout
eventTarget.on('focus', focusGained);
eventTarget.on('blur', focusLost);
// disable transition effect if initial
if(ctrl.$index > 0){
disableTransition();
}
// if carousel is dynamic, e.g. has ng-repeat, watch it
if (model) {
$scope.$watch(model+'.length', function(){
ctrl.init($scope.$eval(model));
});
} else {
ctrl.init(li);
}
// expose controller
$scope.$eval(ctrl.options.carousel+'=value', {value:ctrl});
// update offset on next frame after value is changed
$scope.$watch(ctrl.options.carousel+'.$index', deferredUpdate);
}
function updateUI() {
targetElement[0].style.transform='translateX('+((-ctrl.$index*100)-ctrl.$offset)+'%)';
}
function pointerDown(ev) {
if((ev.which === 1 || ev.which === 0) && !ctrl.suspended) {
eventTarget.on(EVENTS.move, pointerMove);
eventTarget.on(EVENTS.end, pointerUp);
element.addClass(CONTAINER_ACTIVE_CLASS);
selectionTarget.addClass(NO_SELECT_CLASS);
initialEvent = carouselService.normalizeEvent(ev);
startTime = Date.now();
ctrl.suspended = true;
wasMoreThanThreshold = false;
elementWidth = element[0].clientWidth || 100;
ctrl.resetTimeout();
}
}
function pointerMove(ev) {
ev.preventDefault();
ev.stopPropagation();
ev = carouselService.normalizeEvent(ev);
ctrl.$offset = (initialEvent.clientX - ev.clientX) * 100 / elementWidth;
// cancel gesture if user doesnt reach treshold value within given time
if (!wasMoreThanThreshold && ctrl.options.carouselSwipeGestureTimeout !== 0 && Math.abs(ctrl.$offset) < ctrl.options.carouselSwipeGestureThreshold && Date.now() - startTime > ctrl.options.carouselSwipeGestureTimeout) {
ctrl.$offset = 0;
cleanupAfterPointerDown();
}
if (Math.abs(ctrl.$offset) >= ctrl.options.carouselSwipeGestureThreshold) {
wasMoreThanThreshold = true;
}
deferredUpdate();
}
function pointerUp(ev) {
if(Math.abs(ctrl.$offset) > ctrl.options.carouselSwipeGestureThreshold) {
if(ctrl.$offset>0){
ctrl.next();
}else{
ctrl.previous();
}
$scope.$apply();
}
ctrl.$offset = 0;
deferredUpdate();
eventTarget.off(EVENTS.end, pointerUp);
cleanupAfterPointerDown();
ctrl.resetTimeout();
}
function cleanupAfterPointerDown() {
ctrl.suspended = false; // to ensure that active class will not be added on next frame
eventTarget.off(EVENTS.move, pointerMove);
element.removeClass(CONTAINER_ACTIVE_CLASS);
selectionTarget.removeClass(NO_SELECT_CLASS);
}
function disableTransition(){
// active class disables transition in stylesheet
carouselService.$$rAF(function(){
element.addClass(CONTAINER_ACTIVE_CLASS);
// remove it after next frame update
carouselService.$$rAF(function(){
element.removeClass(CONTAINER_ACTIVE_CLASS);
});
});
}
// used restore automatic slide when user focuses on other tab / window
function focusGained(){
ctrl.suspended = false;
ctrl.resetTimeout();
}
// used disable timeout when user focuses on other tab / window
function focusLost(){
ctrl.suspended = true;
ctrl.resetTimeout();
}
}
}
}
// The name of the module, followed by its dependencies (at the bottom to facilitate enclosure)
}(angular.module("ngCarousel")));
| {
"content_hash": "c2a3f0a56908e2d450e18e83f3e81771",
"timestamp": "",
"source": "github",
"line_count": 268,
"max_line_length": 228,
"avg_line_length": 34.65298507462686,
"alnum_prop": 0.5948099493916227,
"repo_name": "FDIM/ng-carousel",
"id": "2a00dcf97c9aa1b7a4e00da64447ea5fb4d390da",
"size": "9287",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/directives/carousel.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "2959"
},
{
"name": "HTML",
"bytes": "3153"
},
{
"name": "JavaScript",
"bytes": "41279"
}
],
"symlink_target": ""
} |
We discussed how to deal with missing deadlines and the import of communicating with the client (in this case, teacher).
We also worked through a group exercise on set theory. See: http://en.wikipedia.org/wiki/Venn_diagram
| {
"content_hash": "792492e51c1f8c94107047fb354a7442",
"timestamp": "",
"source": "github",
"line_count": 3,
"max_line_length": 120,
"avg_line_length": 75,
"alnum_prop": 0.7866666666666666,
"repo_name": "elizabrock/NSS-Syllabus-Cohort-3",
"id": "687471f6b48625f7032cfab44193d8a4ab8a6a69",
"size": "225",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "unit2-sql-and-the-ruby-ecosystem/02-tuesday.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Ruby",
"bytes": "1937"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_29) on Thu Jan 19 00:04:42 PST 2012 -->
<TITLE>
ProjectedProtobufTupleFactory
</TITLE>
<META NAME="date" CONTENT="2012-01-19">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ProjectedProtobufTupleFactory";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../com/twitter/elephantbird/pig/util/PigUtil.html" title="class in com.twitter.elephantbird.pig.util"><B>PREV CLASS</B></A>
<A HREF="../../../../../com/twitter/elephantbird/pig/util/ProjectedThriftTupleFactory.html" title="class in com.twitter.elephantbird.pig.util"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?com/twitter/elephantbird/pig/util/ProjectedProtobufTupleFactory.html" target="_top"><B>FRAMES</B></A>
<A HREF="ProjectedProtobufTupleFactory.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.twitter.elephantbird.pig.util</FONT>
<BR>
Class ProjectedProtobufTupleFactory<M extends com.google.protobuf.Message></H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>com.twitter.elephantbird.pig.util.ProjectedProtobufTupleFactory<M></B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>ProjectedProtobufTupleFactory<M extends com.google.protobuf.Message></B><DT>extends java.lang.Object</DL>
</PRE>
<P>
A tuple factory to create protobuf tuples where
only a subset of fields are required.
<P>
<P>
<HR>
<P>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../com/twitter/elephantbird/pig/util/ProjectedProtobufTupleFactory.html#ProjectedProtobufTupleFactory(com.twitter.elephantbird.util.TypeRef, org.apache.pig.LoadPushDown.RequiredFieldList)">ProjectedProtobufTupleFactory</A></B>(<A HREF="../../../../../com/twitter/elephantbird/util/TypeRef.html" title="class in com.twitter.elephantbird.util">TypeRef</A><<A HREF="../../../../../com/twitter/elephantbird/pig/util/ProjectedProtobufTupleFactory.html" title="type parameter in ProjectedProtobufTupleFactory">M</A>> typeRef,
org.apache.pig.LoadPushDown.RequiredFieldList requiredFieldList)</CODE>
<BR>
</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> org.apache.pig.data.Tuple</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/twitter/elephantbird/pig/util/ProjectedProtobufTupleFactory.html#newTuple(M)">newTuple</A></B>(<A HREF="../../../../../com/twitter/elephantbird/pig/util/ProjectedProtobufTupleFactory.html" title="type parameter in ProjectedProtobufTupleFactory">M</A> msg)</CODE>
<BR>
</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="ProjectedProtobufTupleFactory(com.twitter.elephantbird.util.TypeRef, org.apache.pig.LoadPushDown.RequiredFieldList)"><!-- --></A><H3>
ProjectedProtobufTupleFactory</H3>
<PRE>
public <B>ProjectedProtobufTupleFactory</B>(<A HREF="../../../../../com/twitter/elephantbird/util/TypeRef.html" title="class in com.twitter.elephantbird.util">TypeRef</A><<A HREF="../../../../../com/twitter/elephantbird/pig/util/ProjectedProtobufTupleFactory.html" title="type parameter in ProjectedProtobufTupleFactory">M</A>> typeRef,
org.apache.pig.LoadPushDown.RequiredFieldList requiredFieldList)</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="newTuple(com.google.protobuf.Message)"><!-- --></A><A NAME="newTuple(M)"><!-- --></A><H3>
newTuple</H3>
<PRE>
public org.apache.pig.data.Tuple <B>newTuple</B>(<A HREF="../../../../../com/twitter/elephantbird/pig/util/ProjectedProtobufTupleFactory.html" title="type parameter in ProjectedProtobufTupleFactory">M</A> msg)
throws org.apache.pig.backend.executionengine.ExecException</PRE>
<DL>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>org.apache.pig.backend.executionengine.ExecException</CODE></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../com/twitter/elephantbird/pig/util/PigUtil.html" title="class in com.twitter.elephantbird.pig.util"><B>PREV CLASS</B></A>
<A HREF="../../../../../com/twitter/elephantbird/pig/util/ProjectedThriftTupleFactory.html" title="class in com.twitter.elephantbird.pig.util"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?com/twitter/elephantbird/pig/util/ProjectedProtobufTupleFactory.html" target="_top"><B>FRAMES</B></A>
<A HREF="ProjectedProtobufTupleFactory.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>
| {
"content_hash": "e395147b2d53375555be353d03b54494",
"timestamp": "",
"source": "github",
"line_count": 260,
"max_line_length": 564,
"avg_line_length": 45.026923076923076,
"alnum_prop": 0.6436320150337405,
"repo_name": "ketralnis/elephant-bird",
"id": "4cfff27dc1974860460c83050dd8f3f2ba9729f2",
"size": "11707",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "javadoc/com/twitter/elephantbird/pig/util/ProjectedProtobufTupleFactory.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "613174"
},
{
"name": "Shell",
"bytes": "582"
}
],
"symlink_target": ""
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using BotEngine.EveOnline.Sensor;
using BotEngine.EveOnline.Sensor.Option;
using Sanderling.Interface.MemoryStruct;
using Sanderling.MemoryReading.Production;
namespace Optimat.EveOnline.AuswertGbs
{
public class SictAuswertGbsLayerUtilmenu
{
readonly public UINodeInfoInTree AstLayerUtilmenu;
public UINodeInfoInTree AstHeader
{
private set;
get;
}
public UINodeInfoInTree AstHeaderLabel
{
private set;
get;
}
public IUIElementText Header
{
private set;
get;
}
public string MenuTitel
{
private set;
get;
}
public UINodeInfoInTree AstExpandedUtilMenu
{
private set;
get;
}
public SictAuswertGbsLayerUtilmenu(UINodeInfoInTree AstLayerUtilmenu)
{
this.AstLayerUtilmenu = AstLayerUtilmenu;
}
static public bool KandidaatUtilmenuLaagePasendZuExpandedUtilmenu(
UINodeInfoInTree ExpandedUtilMenuAst,
UINodeInfoInTree KandidaatUtilmenuAst)
{
if (null == ExpandedUtilMenuAst || null == KandidaatUtilmenuAst)
{
return false;
}
var ExpandedUtilMenuAstLaagePlusVonParentErbeLaage = ExpandedUtilMenuAst.LaagePlusVonParentErbeLaage();
if (!ExpandedUtilMenuAstLaagePlusVonParentErbeLaage.HasValue)
{
return false;
}
var KandidaatUtilmenuLaagePlusVonParentErbeLaageNulbar = KandidaatUtilmenuAst.LaagePlusVonParentErbeLaage();
var KandidaatUtilmenuGrööseNulbar = KandidaatUtilmenuAst.Grööse;
if (!KandidaatUtilmenuGrööseNulbar.HasValue)
{
return false;
}
if (!KandidaatUtilmenuLaagePlusVonParentErbeLaageNulbar.HasValue)
{
return false;
}
// Linke obere Eke des ExpandedUtilmenu mus in der Nähe von recte untere Eke des Utilmenu liige damit zusamehang vermuutet werd.
var KandidaatUtilmenuEkeLinksUnteLaage =
KandidaatUtilmenuLaagePlusVonParentErbeLaageNulbar.Value +
new Vektor2DSingle(0, KandidaatUtilmenuGrööseNulbar.Value.B);
var VonUtilmenuNaacExpandedUtilmenuSctreke =
ExpandedUtilMenuAstLaagePlusVonParentErbeLaage.Value +
new Vektor2DSingle(0, 1) -
KandidaatUtilmenuEkeLinksUnteLaage;
if (4 < VonUtilmenuNaacExpandedUtilmenuSctreke.Betraag)
{
return false;
}
return true;
}
virtual public void Berecne(
UINodeInfoInTree[] MengeKandidaatUtilmenuAst)
{
if (null == AstLayerUtilmenu)
{
return;
}
if (!(true == AstLayerUtilmenu.VisibleIncludingInheritance))
{
return;
}
AstHeader =
Optimat.EveOnline.AuswertGbs.Extension.FirstMatchingNodeFromSubtreeBreadthFirst(
AstLayerUtilmenu,
(Kandidaat) => Kandidaat.PyObjTypNameIsContainer(), 2, 1);
AstExpandedUtilMenu =
Optimat.EveOnline.AuswertGbs.Extension.FirstMatchingNodeFromSubtreeBreadthFirst(
AstLayerUtilmenu,
(Kandidaat) => string.Equals("ExpandedUtilMenu", Kandidaat.PyObjTypName, StringComparison.InvariantCultureIgnoreCase), 2, 1);
if (null == AstExpandedUtilMenu)
{
return;
}
var AstExpandedUtilMenuLaagePlusVonParentErbeLaage = AstExpandedUtilMenu.LaagePlusVonParentErbeLaage();
if (!AstExpandedUtilMenuLaagePlusVonParentErbeLaage.HasValue)
{
return;
}
UINodeInfoInTree UtilmenuGbsAst = null;
if (null != MengeKandidaatUtilmenuAst)
{
UtilmenuGbsAst = MengeKandidaatUtilmenuAst.FirstOrDefault((Kandidaat) => KandidaatUtilmenuLaagePasendZuExpandedUtilmenu(AstExpandedUtilMenu, Kandidaat));
}
AstHeaderLabel =
Optimat.EveOnline.AuswertGbs.Extension.FirstMatchingNodeFromSubtreeBreadthFirst(
UtilmenuGbsAst,
(Kandidaat) => string.Equals("EveLabelMedium", Kandidaat.PyObjTypName, StringComparison.InvariantCultureIgnoreCase), 2, 1);
if (null != AstHeaderLabel)
{
Header = new UIElementText(AstHeaderLabel.AsUIElementIfVisible(), AstHeaderLabel.LabelText());
}
if (null != Header)
{
MenuTitel = Header.Text;
}
}
}
}
| {
"content_hash": "10d4d5c9518dc7471b723c4ca24bb171",
"timestamp": "",
"source": "github",
"line_count": 158,
"max_line_length": 157,
"avg_line_length": 25.025316455696203,
"alnum_prop": 0.7597369752149722,
"repo_name": "exodus444/Sanderling",
"id": "691685922d85faa5029f1e8ae4c233fedc902a7d",
"size": "3965",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/Sanderling/Sanderling.MemoryReading/Production/MemoryMeasurement/SictGbs/AuswertGbsLayerUtilmenu.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C#",
"bytes": "799725"
}
],
"symlink_target": ""
} |
from builtins import str
from builtins import range
from unittest import TestCase
import sys
import hashlib
import copy
class GeneralTests(TestCase):
def test_load(self):
gxap = sys.modules['argparse2tool']
ap = sys.modules['argparse']
# Ensure we've loaded the correct argparse ;)
self.assertTrue('argparse2tool/argparse' in str(ap))
self.assertTrue('argparse2tool/argparse2tool' in str(gxap))
import argparse as fake_ap
# Do we have a ref to the real ap
self.assertTrue('ap' in dir(fake_ap))
# Is it the real argparse?
self.assertTrue('_os' in dir(fake_ap.ap))
def __gen_id(self, kwargs):
key = ""
for x in sorted(kwargs.keys()):
key += str(kwargs[x])
digest = hashlib.sha1(key).hexdigest()
repl = 'qrstuvwxyz'
for c in range(10):
digest = digest.replace(str(c), repl[c])
return digest
def dict_product(self, odl, key_name, new_key_list):
for x in new_key_list:
if x is None:
for od in odl:
yield od
else:
for od in odl:
od2 = copy.deepcopy(od)
od2[key_name] = x
yield od2
def test_dict_product(self):
a = [{'a': 0}, {'a': 1}]
correct = [
{'a': 0},
{'a': 1},
{'a': 0, 'b': 1},
{'a': 1, 'b': 1},
]
results = list(self.dict_product(a, 'b', [None, 1]))
self.assertCountEqual(correct, results)
def __blacklist(self, item_list):
for i in item_list:
try:
if i['action'] in ('store_true', 'store_false', 'count', 'version', 'help'):
if 'type' not in i and 'nargs' not in i:
yield i
else:
yield i
except Exception:
yield i
def arg_gen(self):
import argparse
prefixes = ['--']
types = [None, str, int, float, argparse.FileType('w'), argparse.FileType('r')]
nargs = [None, 1, 2, '+', '*', '?']
actions = [None, 'store', 'store_true', 'store_false',
'append', 'count', 'version', 'help']
a0 = list(self.dict_product([{}], 'type', types))
a1 = list(self.dict_product(a0, 'nargs', nargs))
a2 = list(self.dict_product(a1, 'action', actions))
a3 = list(self.dict_product(a2, 'prefix', prefixes))
for x in self.__blacklist(a3):
prefix = x['prefix']
id = self.__gen_id(x)
del x['prefix']
yield {'args': prefix + id,
'kwargs': x}
def parse_args(self, args, **setup):
import argparse
parser = argparse.ArgumentParser(**setup)
for arg in self.arg_gen():
print(arg)
parser.add_argument(arg['args'], **arg['kwargs'])
return parser.parse_args(args)
class SimpleTests(TestCase):
pass
| {
"content_hash": "7cbcd88c9a9af5cca00f708b22c34711",
"timestamp": "",
"source": "github",
"line_count": 100,
"max_line_length": 92,
"avg_line_length": 30.61,
"alnum_prop": 0.501796798431885,
"repo_name": "erasche/argparse2tool",
"id": "ab574e591a0da6fe0642a227b15d64e32e402457",
"size": "3061",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "test/test_utils.py",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Common Workflow Language",
"bytes": "4294"
},
{
"name": "Python",
"bytes": "68535"
}
],
"symlink_target": ""
} |
package com.simplicityitself.rxgeode;
import com.gemstone.gemfire.cache.query.CqEvent;
import com.gemstone.gemfire.cache.query.CqListener;
import org.reactivestreams.Subscriber;
class GeodeStreamingCqListener implements CqListener {
private Subscriber<? super CqEvent> subscriber;
GeodeStreamingCqListener(Subscriber<? super CqEvent> sub) {
this.subscriber = sub;
}
@Override
public void onEvent(CqEvent cqEvent) {
//TODO, respect backpressure signals.
subscriber.onNext(cqEvent);
}
@Override
public void onError(CqEvent cqEvent) {
subscriber.onError(cqEvent.getThrowable());
}
@Override
public void close() {
subscriber.onComplete();
}
}
| {
"content_hash": "153d8c9b8a83e2dd4c2d97e87e09939e",
"timestamp": "",
"source": "github",
"line_count": 30,
"max_line_length": 63,
"avg_line_length": 24.466666666666665,
"alnum_prop": 0.7029972752043597,
"repo_name": "simplicityitself/groovy-gemfire",
"id": "14a290cb1425f6f01793970a532ccf6de6f60d83",
"size": "734",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "stream-geode/src/main/java/com/simplicityitself/rxgeode/GeodeStreamingCqListener.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Grammatical Framework",
"bytes": "626"
},
{
"name": "Groovy",
"bytes": "11328"
},
{
"name": "Java",
"bytes": "5727"
},
{
"name": "Shell",
"bytes": "926"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_72) on Wed Dec 31 16:42:13 UTC 2014 -->
<title>GenericMetadataSupport.WildCardBoundedType (Mockito 1.10.19 API)</title>
<meta name="date" content="2014-12-31">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="GenericMetadataSupport.WildCardBoundedType (Mockito 1.10.19 API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/GenericMetadataSupport.WildCardBoundedType.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em>
<!-- Note there is a weird javadoc task bug if using the double quote char \" that causes an 'illegal package name' error -->
<em id="mockito-version-header-javadoc7"><strong>Mockito 1.10.19 API</strong></em>
<!-- using the beautify plugin for jQuery from https://bitbucket.org/larscorneliussen/beautyofcode/ -->
<script type="text/javascript">
var shBaseURL = '../../../../../js/sh-2.1.382/';
</script>
<script type="text/javascript" src="../../../../../js/jquery-1.7.min.js"></script>
<script type="text/javascript" src="../../../../../js/jquery.beautyOfCode-min.js"></script>
<script type="text/javascript">
/* Apply beautification of code */
var usingOldIE = false;
if($.browser.msie && parseInt($.browser.version) < 9) usingOldIE = true;
if(!usingOldIE) {
$.beautyOfCode.init({
theme : 'Eclipse',
brushes: ['Java']
});
var version = '1.10.19';
jQuery.fn.removeAttributes = function() {
return this.each(function() {
var attributes = $.map(this.attributes, function(item) {
return item.name;
});
var img = $(this);
$.each(attributes, function(i, item) {
img.removeAttr(item);
});
});
};
$(function() {
/* Add name & version to header for Javadoc 1.6 */
$('td.NavBarCell1[colspan=2]').each(function(index, element) {
var jqueryTD = $(element);
jqueryTD.after(
$('<td><em><strong>Mockito 1.10.19 API</strong></em></td>').attr('class','NavBarCell1').attr('id','mockito-version-header-javadoc6')
);
jqueryTD.removeAttr('colspan');
});
/* Cleans up mess with Javadoc 1.7 */
$('body > h1').removeAttributes().attr('class', 'bar').attr('title', 'Mockito 1.10.19 API');
/* Cleans up mess with Javadoc 1.7 with Javadoc 1.6 */
$('td em#mockito-version-header-javadoc7').remove();
});
}
</script>
</em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/mockito/internal/util/reflection/GenericMetadataSupport.TypeVarBoundedType.html" title="class in org.mockito.internal.util.reflection"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/mockito/internal/util/reflection/InstanceField.html" title="class in org.mockito.internal.util.reflection"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/mockito/internal/util/reflection/GenericMetadataSupport.WildCardBoundedType.html" target="_top">Frames</a></li>
<li><a href="GenericMetadataSupport.WildCardBoundedType.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.mockito.internal.util.reflection</div>
<h2 title="Class GenericMetadataSupport.WildCardBoundedType" class="title">Class GenericMetadataSupport.WildCardBoundedType</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.mockito.internal.util.reflection.GenericMetadataSupport.WildCardBoundedType</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.lang.reflect.Type, <a href="../../../../../org/mockito/internal/util/reflection/GenericMetadataSupport.BoundedType.html" title="interface in org.mockito.internal.util.reflection">GenericMetadataSupport.BoundedType</a></dd>
</dl>
<dl>
<dt>Enclosing class:</dt>
<dd><a href="../../../../../org/mockito/internal/util/reflection/GenericMetadataSupport.html" title="class in org.mockito.internal.util.reflection">GenericMetadataSupport</a></dd>
</dl>
<hr>
<br>
<pre>public static class <span class="strong">GenericMetadataSupport.WildCardBoundedType</span>
extends java.lang.Object
implements <a href="../../../../../org/mockito/internal/util/reflection/GenericMetadataSupport.BoundedType.html" title="interface in org.mockito.internal.util.reflection">GenericMetadataSupport.BoundedType</a></pre>
<div class="block">Type representing bounds of a wildcard, allows to keep all bounds information.
<p>The JLS says that lower bound and upper bound are mutually exclusive, and that multiple bounds
are not allowed.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="http://docs.oracle.com/javase/specs/jls/se5.0/html/typesValues.html#4.4">http://docs.oracle.com/javase/specs/jls/se5.0/html/typesValues.html#4.4</a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/mockito/internal/util/reflection/GenericMetadataSupport.WildCardBoundedType.html#GenericMetadataSupport.WildCardBoundedType(java.lang.reflect.WildcardType)">GenericMetadataSupport.WildCardBoundedType</a></strong>(java.lang.reflect.WildcardType wildcard)</code> </td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/mockito/internal/util/reflection/GenericMetadataSupport.WildCardBoundedType.html#equals(java.lang.Object)">equals</a></strong>(java.lang.Object o)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.reflect.Type</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/mockito/internal/util/reflection/GenericMetadataSupport.WildCardBoundedType.html#firstBound()">firstBound</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/mockito/internal/util/reflection/GenericMetadataSupport.WildCardBoundedType.html#hashCode()">hashCode</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.reflect.Type[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/mockito/internal/util/reflection/GenericMetadataSupport.WildCardBoundedType.html#interfaceBounds()">interfaceBounds</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/mockito/internal/util/reflection/GenericMetadataSupport.WildCardBoundedType.html#toString()">toString</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.reflect.WildcardType</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/mockito/internal/util/reflection/GenericMetadataSupport.WildCardBoundedType.html#wildCard()">wildCard</a></strong>()</code> </td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>clone, finalize, getClass, notify, notifyAll, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="GenericMetadataSupport.WildCardBoundedType(java.lang.reflect.WildcardType)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>GenericMetadataSupport.WildCardBoundedType</h4>
<pre>public GenericMetadataSupport.WildCardBoundedType(java.lang.reflect.WildcardType wildcard)</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="firstBound()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>firstBound</h4>
<pre>public java.lang.reflect.Type firstBound()</pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/mockito/internal/util/reflection/GenericMetadataSupport.BoundedType.html#firstBound()">firstBound</a></code> in interface <code><a href="../../../../../org/mockito/internal/util/reflection/GenericMetadataSupport.BoundedType.html" title="interface in org.mockito.internal.util.reflection">GenericMetadataSupport.BoundedType</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>The first bound, either a type or a reference to a TypeVariable</dd></dl>
</li>
</ul>
<a name="interfaceBounds()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>interfaceBounds</h4>
<pre>public java.lang.reflect.Type[] interfaceBounds()</pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/mockito/internal/util/reflection/GenericMetadataSupport.BoundedType.html#interfaceBounds()">interfaceBounds</a></code> in interface <code><a href="../../../../../org/mockito/internal/util/reflection/GenericMetadataSupport.BoundedType.html" title="interface in org.mockito.internal.util.reflection">GenericMetadataSupport.BoundedType</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>An empty array as, wildcard don't support multiple bounds.</dd></dl>
</li>
</ul>
<a name="equals(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public boolean equals(java.lang.Object o)</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>equals</code> in class <code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="hashCode()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre>public int hashCode()</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>hashCode</code> in class <code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="toString()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public java.lang.String toString()</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>toString</code> in class <code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="wildCard()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>wildCard</h4>
<pre>public java.lang.reflect.WildcardType wildCard()</pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/GenericMetadataSupport.WildCardBoundedType.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em>
<!-- Note there is a weird javadoc task bug if using the double quote char \" that causes an 'illegal package name' error -->
<em id="mockito-version-header-javadoc7"><strong>Mockito 1.10.19 API</strong></em>
<!-- using the beautify plugin for jQuery from https://bitbucket.org/larscorneliussen/beautyofcode/ -->
<script type="text/javascript">
var shBaseURL = '../../../../../js/sh-2.1.382/';
</script>
<script type="text/javascript" src="../../../../../js/jquery-1.7.min.js"></script>
<script type="text/javascript" src="../../../../../js/jquery.beautyOfCode-min.js"></script>
<script type="text/javascript">
/* Apply beautification of code */
var usingOldIE = false;
if($.browser.msie && parseInt($.browser.version) < 9) usingOldIE = true;
if(!usingOldIE) {
$.beautyOfCode.init({
theme : 'Eclipse',
brushes: ['Java']
});
var version = '1.10.19';
jQuery.fn.removeAttributes = function() {
return this.each(function() {
var attributes = $.map(this.attributes, function(item) {
return item.name;
});
var img = $(this);
$.each(attributes, function(i, item) {
img.removeAttr(item);
});
});
};
$(function() {
/* Add name & version to header for Javadoc 1.6 */
$('td.NavBarCell1[colspan=2]').each(function(index, element) {
var jqueryTD = $(element);
jqueryTD.after(
$('<td><em><strong>Mockito 1.10.19 API</strong></em></td>').attr('class','NavBarCell1').attr('id','mockito-version-header-javadoc6')
);
jqueryTD.removeAttr('colspan');
});
/* Cleans up mess with Javadoc 1.7 */
$('body > h1').removeAttributes().attr('class', 'bar').attr('title', 'Mockito 1.10.19 API');
/* Cleans up mess with Javadoc 1.7 with Javadoc 1.6 */
$('td em#mockito-version-header-javadoc7').remove();
});
}
</script>
</em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/mockito/internal/util/reflection/GenericMetadataSupport.TypeVarBoundedType.html" title="class in org.mockito.internal.util.reflection"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/mockito/internal/util/reflection/InstanceField.html" title="class in org.mockito.internal.util.reflection"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/mockito/internal/util/reflection/GenericMetadataSupport.WildCardBoundedType.html" target="_top">Frames</a></li>
<li><a href="GenericMetadataSupport.WildCardBoundedType.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
| {
"content_hash": "7c968b8da5ec89045c5e92626daaa1a2",
"timestamp": "",
"source": "github",
"line_count": 461,
"max_line_length": 396,
"avg_line_length": 41.947939262472886,
"alnum_prop": 0.6162478022546282,
"repo_name": "JPAT-ROSEMARY/SCUBA",
"id": "aa61dbb774754b88f3008d95cf45f429286ba64e",
"size": "19338",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "org.jpat.scuba.external.mockito/mockito-1.10.19/javadocs/org/mockito/internal/util/reflection/GenericMetadataSupport.WildCardBoundedType.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "479"
},
{
"name": "CSS",
"bytes": "184347"
},
{
"name": "Groovy",
"bytes": "61577"
},
{
"name": "HTML",
"bytes": "72563310"
},
{
"name": "Java",
"bytes": "4674644"
},
{
"name": "JavaScript",
"bytes": "155840"
},
{
"name": "PLSQL",
"bytes": "4133"
},
{
"name": "PLpgSQL",
"bytes": "4948"
},
{
"name": "Roff",
"bytes": "505"
},
{
"name": "Scala",
"bytes": "39880"
},
{
"name": "Shell",
"bytes": "5051"
},
{
"name": "XSLT",
"bytes": "16226"
}
],
"symlink_target": ""
} |
package nl.riebie.mcclans.comparators;
import nl.riebie.mcclans.clan.ClanImpl;
import java.util.Comparator;
/**
* Created by Kippers on 19-1-2016.
*/
public class ClanKdrComparator implements Comparator<ClanImpl> {
@Override
public int compare(ClanImpl clan1, ClanImpl clan2) {
double clan1KDR = clan1.getKDR();
double clan2KDR = clan2.getKDR();
if (clan1KDR < clan2KDR) {
return 1;
} else if (clan1KDR > clan2KDR) {
return -1;
}
long clan1CreationTime = clan1.getCreationDate().getTime();
long clan2CreationTime = clan2.getCreationDate().getTime();
if (clan1CreationTime < clan2CreationTime) {
return -1;
} else if (clan1CreationTime > clan2CreationTime) {
return 1;
}
return 0;
}
}
| {
"content_hash": "f06c23d9bad5b0a8798e9ad606e2d37d",
"timestamp": "",
"source": "github",
"line_count": 34,
"max_line_length": 67,
"avg_line_length": 24.764705882352942,
"alnum_prop": 0.6152019002375297,
"repo_name": "iLefty/mcClans",
"id": "e12491e36c884320163e131926d6fa143f7dcf1e",
"size": "2013",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/java/nl/riebie/mcclans/comparators/ClanKdrComparator.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "726149"
}
],
"symlink_target": ""
} |
package net.explorviz.history.server.resources;
import com.github.jasminb.jsonapi.exceptions.DocumentSerializationException;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.SecuritySchemeType;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.security.SecurityScheme;
import io.swagger.v3.oas.annotations.tags.Tag;
import java.io.InputStream;
import java.util.Optional;
import java.util.stream.Stream;
import javax.annotation.security.RolesAllowed;
import javax.inject.Inject;
import javax.ws.rs.BadRequestException;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.NotFoundException;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import net.explorviz.history.repository.persistence.LandscapeRepository;
import net.explorviz.history.repository.persistence.ReplayRepository;
import net.explorviz.history.repository.persistence.mongo.LandscapeSerializationHelper;
import net.explorviz.history.util.ResourceHelper;
import net.explorviz.landscape.model.landscape.Landscape;
import net.explorviz.security.user.Role;
import net.explorviz.shared.security.filters.Secure;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.FormDataParam;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Resource providing persisted {@link Landscape} data for the frontend.
*/
@Path("v1/landscapes")
@RolesAllowed({Role.ADMIN_NAME, Role.USER_NAME})
@Tag(name = "Landscapes")
@SecurityScheme(type = SecuritySchemeType.HTTP, name = "token", scheme = "bearer",
bearerFormat = "JWT")
@SecurityRequirement(name = "token")
@Secure
public class LandscapeResource {
private static final Logger LOGGER = LoggerFactory.getLogger(LandscapeResource.class);
private static final String MEDIA_TYPE = "application/vnd.api+json";
private static final long QUERY_PARAM_DEFAULT_VALUE_LONG = 0L;
private static final String QUERY_PARAM_EMPTY_STRING = "";
private final LandscapeRepository<String> landscapeStringRepo;
private final ReplayRepository<String> replayStringRepo;
private final LandscapeSerializationHelper serializationHelper;
@Inject
public LandscapeResource(final LandscapeRepository<String> landscapeStringRepo,
final ReplayRepository<String> replayStringRepo,
final LandscapeSerializationHelper serializationHelper) {
this.landscapeStringRepo = landscapeStringRepo;
this.replayStringRepo = replayStringRepo;
this.serializationHelper = serializationHelper;
}
// akr: IMHO best option for decision between 404 or 200 Empty
// https://stackoverflow.com/a/48746789
/**
* Returns a landscape by its id or 404.
*
* @param id - entity id of the landscape
* @return landscape object found by passed id or 404.
*/
@GET
@Path("{id}")
@Produces(MEDIA_TYPE)
@Operation(summary = "Find a landscape by its id")
@ApiResponse(responseCode = "200", description = "Response contains the requested landscape.",
content = @Content(schema = @Schema(implementation = Landscape.class)))
@ApiResponse(responseCode = "404", description = "No landscape with such id.")
public String getLandscapeById(@Parameter(description = "Id of the landscape",
required = true) @PathParam("id") final String id) {
// Check existence in landscapeRepo and replayRepo or throw Exception
// this can be done better since Java 9
return Stream.of(this.landscapeStringRepo.getById(id), this.replayStringRepo.getById(id))
.filter(Optional::isPresent)
.map(Optional::get)
.findFirst()
.orElseThrow(() -> new NotFoundException("Landscape with id " + id + " not found.")); // NOCS
}
/**
* Returns {@link Landscape} with the passed query parameter.
*
* @param timestamp - query parameter
* @return the requested timestamp
*/
@GET
@Produces(MEDIA_TYPE)
@Operation(summary = "Find a landscape by its timestamp")
@ApiResponse(responseCode = "200",
description = "Response contains the first landscape with the given timestamp.",
content = @Content(schema = @Schema(implementation = Landscape.class)))
@ApiResponse(responseCode = "404", description = "No landscape with the given timestamp.")
public String getLandscape(@Parameter(description = "The timestamp to filter by.",
required = true) @QueryParam("timestamp") final long timestamp) {
if (timestamp == QUERY_PARAM_DEFAULT_VALUE_LONG) {
throw new BadRequestException("Query parameter 'timestamp' is mandatory");
}
// Check existence in landscapeRepo and replayRepo or throw Exception
// this can be done better since Java 9
return Stream
.of(this.landscapeStringRepo.getByTimestamp(timestamp),
this.replayStringRepo.getByTimestamp(timestamp))
.filter(Optional::isPresent)
.map(Optional::get)
.findFirst()
.orElseThrow(
() -> new NotFoundException("Landscape with timestamp " + timestamp + " not found."));
}
/**
* Provides a json file for downloading a landscape from the frontend
*
* @param timestamp of the {@link Landscape} to return
* @return the {@link Landscape} as a json file with the given timestamp
*
*/
@GET
@Path("/download")
@Produces("application/json")
@Operation(summary = "Download a landscape by its timestamp")
@ApiResponse(responseCode = "200",
description = "Response contains the first landscape with the given timestamp.",
content = @Content(schema = @Schema(implementation = Landscape.class)))
@ApiResponse(responseCode = "404", description = "No landscape with the given timestamp.")
public String downloadLandscape(@Parameter(description = "The timestamp to filter by.",
required = true) @QueryParam("timestamp") final long timestamp) {
if (timestamp == QUERY_PARAM_DEFAULT_VALUE_LONG) {
throw new BadRequestException("Query parameter 'timestamp' is mandatory");
}
// Check existence in landscapeRepo and replayRepo or throw Exception
// this can be done better since Java 9
return Stream
.of(this.landscapeStringRepo.getByTimestamp(timestamp),
this.replayStringRepo.getByTimestamp(timestamp))
.filter(Optional::isPresent)
.map(Optional::get)
.findFirst()
.orElseThrow(
() -> new NotFoundException("Landscape with timestamp " + timestamp + " not found."));
}
/**
* Accepts uploading a landscape from the frontend
*
* @param uploadedInputStream json-file of the uploaded landscape
* @param fileInfo information of the file, e.g., the filename
*/
@POST
@Path("/replay/upload")
@Consumes("multipart/form-data")
@Produces(MEDIA_TYPE)
@Operation(summary = "Upload a landscape file from the frontend")
@ApiResponse(responseCode = "200", description = "Response contains the uploaded landscape file.",
content = @Content(schema = @Schema(implementation = Landscape.class)))
@ApiResponse(responseCode = "404", description = "Landscape file could not be uploaded.")
public String uploadLandscape(
@Parameter(description = "The name of the file.",
required = true) @QueryParam("filename") final String fileName,
@Parameter(description = "The uploaded landscape file.",
required = true) @FormDataParam("file") final InputStream uploadedInputStream,
@Parameter(description = "The file information of the uploaded landscape.",
required = true) @FormDataParam("file") final FormDataContentDisposition fileInfo) {
// TODO check for empty uploaded landscape file
if (fileName == QUERY_PARAM_EMPTY_STRING) {
throw new BadRequestException("Query parameter 'filename' is mandatory");
}
LOGGER.info("Uploaded Filename: " + fileName);
// split the passed filename
final String fileNameWithoutExtension = ResourceHelper.removeFileNameExtension(fileName);
final String[] splittedFilename = fileNameWithoutExtension.split("-");
final long parsedTimestamp = Long.valueOf(splittedFilename[0]);
// check if landscape already exists in `replay` landscape repository
final String found = Stream.of(this.replayStringRepo.getByTimestamp(parsedTimestamp))
.filter(Optional::isPresent)
.map(Optional::get)
.findFirst()
.orElse(null);
// landscape not persisted yet => persist in mongoDB and return it afterwards
if (found == null) {
Landscape parsedLandscape = null;
final String convertedInputStream =
ResourceHelper.convertInputstreamToString(uploadedInputStream);
try {
parsedLandscape = this.serializationHelper.deserialize(convertedInputStream);
this.replayStringRepo.save(parsedLandscape.getTimestamp().getTimestamp(),
parsedLandscape,
parsedLandscape.getTimestamp().getTotalRequests());
} catch (final DocumentSerializationException e) {
LOGGER.error("Could not save landscape with value {}", parsedLandscape, e);
}
// if upload was successful, check for existence in replayRepo or throw Exception
// this can be done better since Java 9
return Stream.of(this.replayStringRepo.getByTimestamp(parsedTimestamp))
.filter(Optional::isPresent)
.map(Optional::get)
.findFirst()
.orElseThrow(() -> new NotFoundException(
"Uploaded landscape with timestamp " + parsedTimestamp + " not found."));
} else {
// throw new NotFoundException("Landscape with timestamp " + parsedTimestamp + " already
// exists.");
return Stream.of(this.replayStringRepo.getByTimestamp(parsedTimestamp))
.filter(Optional::isPresent)
.map(Optional::get)
.findFirst()
.orElseThrow(() -> new NotFoundException(
"Uploaded landscape with timestamp " + parsedTimestamp + " not found."));
}
}
}
| {
"content_hash": "fd6f35fbf07e90fa93aabbdbe0e5e440",
"timestamp": "",
"source": "github",
"line_count": 245,
"max_line_length": 101,
"avg_line_length": 43.053061224489795,
"alnum_prop": 0.7047781569965871,
"repo_name": "ExplorViz/explorviz-ui-backend",
"id": "d7c673858723f9ed2e2ba1e5e89b22e17b6c6bd9",
"size": "10548",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "history-service/src/main/java/net/explorviz/history/server/resources/LandscapeResource.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "65883"
},
{
"name": "Shell",
"bytes": "595"
},
{
"name": "Xtend",
"bytes": "72998"
}
],
"symlink_target": ""
} |
import _ from 'underscore';
// Returns the channel IF found otherwise it will return the failure of why it didn't. Check the `statusCode` property
function findChannelByIdOrName({ params, checkedArchived = true }) {
if ((!params.roomId || !params.roomId.trim()) && (!params.roomName || !params.roomName.trim())) {
throw new Meteor.Error('error-roomid-param-not-provided', 'The parameter "roomId" or "roomName" is required');
}
const fields = { ...RocketChat.API.v1.defaultFieldsToExclude };
let room;
if (params.roomId) {
room = RocketChat.models.Rooms.findOneById(params.roomId, { fields });
} else if (params.roomName) {
room = RocketChat.models.Rooms.findOneByName(params.roomName, { fields });
}
if (!room || room.t !== 'c') {
throw new Meteor.Error('error-room-not-found', 'The required "roomId" or "roomName" param provided does not match any channel');
}
if (checkedArchived && room.archived) {
throw new Meteor.Error('error-room-archived', `The channel, ${ room.name }, is archived`);
}
return room;
}
RocketChat.API.v1.addRoute('channels.addAll', { authRequired: true }, {
post() {
const findResult = findChannelByIdOrName({ params: this.requestParams() });
Meteor.runAsUser(this.userId, () => {
Meteor.call('addAllUserToRoom', findResult._id, this.bodyParams.activeUsersOnly);
});
return RocketChat.API.v1.success({
channel: RocketChat.models.Rooms.findOneById(findResult._id, { fields: RocketChat.API.v1.defaultFieldsToExclude }),
});
},
});
RocketChat.API.v1.addRoute('channels.addModerator', { authRequired: true }, {
post() {
const findResult = findChannelByIdOrName({ params: this.requestParams() });
const user = this.getUserFromParams();
Meteor.runAsUser(this.userId, () => {
Meteor.call('addRoomModerator', findResult._id, user._id);
});
return RocketChat.API.v1.success();
},
});
RocketChat.API.v1.addRoute('channels.addOwner', { authRequired: true }, {
post() {
const findResult = findChannelByIdOrName({ params: this.requestParams() });
const user = this.getUserFromParams();
Meteor.runAsUser(this.userId, () => {
Meteor.call('addRoomOwner', findResult._id, user._id);
});
return RocketChat.API.v1.success();
},
});
RocketChat.API.v1.addRoute('channels.archive', { authRequired: true }, {
post() {
const findResult = findChannelByIdOrName({ params: this.requestParams() });
Meteor.runAsUser(this.userId, () => {
Meteor.call('archiveRoom', findResult._id);
});
return RocketChat.API.v1.success();
},
});
RocketChat.API.v1.addRoute('channels.close', { authRequired: true }, {
post() {
const findResult = findChannelByIdOrName({ params: this.requestParams(), checkedArchived: false });
const sub = RocketChat.models.Subscriptions.findOneByRoomIdAndUserId(findResult._id, this.userId);
if (!sub) {
return RocketChat.API.v1.failure(`The user/callee is not in the channel "${ findResult.name }.`);
}
if (!sub.open) {
return RocketChat.API.v1.failure(`The channel, ${ findResult.name }, is already closed to the sender`);
}
Meteor.runAsUser(this.userId, () => {
Meteor.call('hideRoom', findResult._id);
});
return RocketChat.API.v1.success();
},
});
RocketChat.API.v1.addRoute('channels.counters', { authRequired: true }, {
get() {
const access = RocketChat.authz.hasPermission(this.userId, 'view-room-administration');
const { userId } = this.requestParams();
let user = this.userId;
let unreads = null;
let userMentions = null;
let unreadsFrom = null;
let joined = false;
let msgs = null;
let latest = null;
let members = null;
if (userId) {
if (!access) {
return RocketChat.API.v1.unauthorized();
}
user = userId;
}
const room = findChannelByIdOrName({
params: this.requestParams(),
returnUsernames: true,
});
const subscription = RocketChat.models.Subscriptions.findOneByRoomIdAndUserId(room._id, user);
const lm = room.lm ? room.lm : room._updatedAt;
if (typeof subscription !== 'undefined' && subscription.open) {
unreads = RocketChat.models.Messages.countVisibleByRoomIdBetweenTimestampsInclusive(subscription.rid, subscription.ls, lm);
unreadsFrom = subscription.ls || subscription.ts;
userMentions = subscription.userMentions;
joined = true;
}
if (access || joined) {
msgs = room.msgs;
latest = lm;
members = room.usersCount;
}
return RocketChat.API.v1.success({
joined,
members,
unreads,
unreadsFrom,
msgs,
latest,
userMentions,
});
},
});
// Channel -> create
function createChannelValidator(params) {
if (!RocketChat.authz.hasPermission(params.user.value, 'create-c')) {
throw new Error('unauthorized');
}
if (!params.name || !params.name.value) {
throw new Error(`Param "${ params.name.key }" is required`);
}
if (params.members && params.members.value && !_.isArray(params.members.value)) {
throw new Error(`Param "${ params.members.key }" must be an array if provided`);
}
if (params.customFields && params.customFields.value && !(typeof params.customFields.value === 'object')) {
throw new Error(`Param "${ params.customFields.key }" must be an object if provided`);
}
}
function createChannel(userId, params) {
const readOnly = typeof params.readOnly !== 'undefined' ? params.readOnly : false;
let id;
Meteor.runAsUser(userId, () => {
id = Meteor.call('createChannel', params.name, params.members ? params.members : [], readOnly, params.customFields);
});
return {
channel: RocketChat.models.Rooms.findOneById(id.rid, { fields: RocketChat.API.v1.defaultFieldsToExclude }),
};
}
RocketChat.API.channels = {};
RocketChat.API.channels.create = {
validate: createChannelValidator,
execute: createChannel,
};
RocketChat.API.v1.addRoute('channels.create', { authRequired: true }, {
post() {
const { userId, bodyParams } = this;
let error;
try {
RocketChat.API.channels.create.validate({
user: {
value: userId,
},
name: {
value: bodyParams.name,
key: 'name',
},
members: {
value: bodyParams.members,
key: 'members',
},
});
} catch (e) {
if (e.message === 'unauthorized') {
error = RocketChat.API.v1.unauthorized();
} else {
error = RocketChat.API.v1.failure(e.message);
}
}
if (error) {
return error;
}
return RocketChat.API.v1.success(RocketChat.API.channels.create.execute(userId, bodyParams));
},
});
RocketChat.API.v1.addRoute('channels.delete', { authRequired: true }, {
post() {
const findResult = findChannelByIdOrName({ params: this.requestParams(), checkedArchived: false });
Meteor.runAsUser(this.userId, () => {
Meteor.call('eraseRoom', findResult._id);
});
return RocketChat.API.v1.success({
channel: findResult,
});
},
});
RocketChat.API.v1.addRoute('channels.files', { authRequired: true }, {
get() {
const findResult = findChannelByIdOrName({ params: this.requestParams(), checkedArchived: false });
const addUserObjectToEveryObject = (file) => {
if (file.userId) {
file = this.insertUserObject({ object: file, userId: file.userId });
}
return file;
};
Meteor.runAsUser(this.userId, () => {
Meteor.call('canAccessRoom', findResult._id, this.userId);
});
const { offset, count } = this.getPaginationItems();
const { sort, fields, query } = this.parseJsonQuery();
const ourQuery = Object.assign({}, query, { rid: findResult._id });
const files = RocketChat.models.Uploads.find(ourQuery, {
sort: sort ? sort : { name: 1 },
skip: offset,
limit: count,
fields,
}).fetch();
return RocketChat.API.v1.success({
files: files.map(addUserObjectToEveryObject),
count:
files.length,
offset,
total: RocketChat.models.Uploads.find(ourQuery).count(),
});
},
});
RocketChat.API.v1.addRoute('channels.getIntegrations', { authRequired: true }, {
get() {
if (!RocketChat.authz.hasPermission(this.userId, 'manage-integrations')) {
return RocketChat.API.v1.unauthorized();
}
const findResult = findChannelByIdOrName({ params: this.requestParams(), checkedArchived: false });
let includeAllPublicChannels = true;
if (typeof this.queryParams.includeAllPublicChannels !== 'undefined') {
includeAllPublicChannels = this.queryParams.includeAllPublicChannels === 'true';
}
let ourQuery = {
channel: `#${ findResult.name }`,
};
if (includeAllPublicChannels) {
ourQuery.channel = {
$in: [ourQuery.channel, 'all_public_channels'],
};
}
const { offset, count } = this.getPaginationItems();
const { sort, fields, query } = this.parseJsonQuery();
ourQuery = Object.assign({}, query, ourQuery);
const integrations = RocketChat.models.Integrations.find(ourQuery, {
sort: sort ? sort : { _createdAt: 1 },
skip: offset,
limit: count,
fields,
}).fetch();
return RocketChat.API.v1.success({
integrations,
count: integrations.length,
offset,
total: RocketChat.models.Integrations.find(ourQuery).count(),
});
},
});
RocketChat.API.v1.addRoute('channels.history', { authRequired: true }, {
get() {
const findResult = findChannelByIdOrName({ params: this.requestParams(), checkedArchived: false });
let latestDate = new Date();
if (this.queryParams.latest) {
latestDate = new Date(this.queryParams.latest);
}
let oldestDate = undefined;
if (this.queryParams.oldest) {
oldestDate = new Date(this.queryParams.oldest);
}
const inclusive = this.queryParams.inclusive || false;
let count = 20;
if (this.queryParams.count) {
count = parseInt(this.queryParams.count);
}
const unreads = this.queryParams.unreads || false;
let result;
Meteor.runAsUser(this.userId, () => {
result = Meteor.call('getChannelHistory', {
rid: findResult._id,
latest: latestDate,
oldest: oldestDate,
inclusive,
count,
unreads,
});
});
if (!result) {
return RocketChat.API.v1.unauthorized();
}
return RocketChat.API.v1.success(result);
},
});
RocketChat.API.v1.addRoute('channels.info', { authRequired: true }, {
get() {
const findResult = findChannelByIdOrName({ params: this.requestParams(), checkedArchived: false });
return RocketChat.API.v1.success({
channel: RocketChat.models.Rooms.findOneById(findResult._id, { fields: RocketChat.API.v1.defaultFieldsToExclude }),
});
},
});
RocketChat.API.v1.addRoute('channels.invite', { authRequired: true }, {
post() {
const findResult = findChannelByIdOrName({ params: this.requestParams() });
const user = this.getUserFromParams();
Meteor.runAsUser(this.userId, () => {
Meteor.call('addUserToRoom', { rid: findResult._id, username: user.username });
});
return RocketChat.API.v1.success({
channel: RocketChat.models.Rooms.findOneById(findResult._id, { fields: RocketChat.API.v1.defaultFieldsToExclude }),
});
},
});
RocketChat.API.v1.addRoute('channels.join', { authRequired: true }, {
post() {
const findResult = findChannelByIdOrName({ params: this.requestParams() });
Meteor.runAsUser(this.userId, () => {
Meteor.call('joinRoom', findResult._id, this.bodyParams.joinCode);
});
return RocketChat.API.v1.success({
channel: RocketChat.models.Rooms.findOneById(findResult._id, { fields: RocketChat.API.v1.defaultFieldsToExclude }),
});
},
});
RocketChat.API.v1.addRoute('channels.kick', { authRequired: true }, {
post() {
const findResult = findChannelByIdOrName({ params: this.requestParams() });
const user = this.getUserFromParams();
Meteor.runAsUser(this.userId, () => {
Meteor.call('removeUserFromRoom', { rid: findResult._id, username: user.username });
});
return RocketChat.API.v1.success({
channel: RocketChat.models.Rooms.findOneById(findResult._id, { fields: RocketChat.API.v1.defaultFieldsToExclude }),
});
},
});
RocketChat.API.v1.addRoute('channels.leave', { authRequired: true }, {
post() {
const findResult = findChannelByIdOrName({ params: this.requestParams() });
Meteor.runAsUser(this.userId, () => {
Meteor.call('leaveRoom', findResult._id);
});
return RocketChat.API.v1.success({
channel: RocketChat.models.Rooms.findOneById(findResult._id, { fields: RocketChat.API.v1.defaultFieldsToExclude }),
});
},
});
RocketChat.API.v1.addRoute('channels.list', { authRequired: true }, {
get: {
// This is defined as such only to provide an example of how the routes can be defined :X
action() {
const { offset, count } = this.getPaginationItems();
const { sort, fields, query } = this.parseJsonQuery();
const hasPermissionToSeeAllPublicChannels = RocketChat.authz.hasPermission(this.userId, 'view-c-room');
const ourQuery = { ...query, t: 'c' };
if (!hasPermissionToSeeAllPublicChannels) {
if (!RocketChat.authz.hasPermission(this.userId, 'view-joined-room')) {
return RocketChat.API.v1.unauthorized();
}
const roomIds = RocketChat.models.Subscriptions.findByUserIdAndType(this.userId, 'c', { fields: { rid: 1 } }).fetch().map((s) => s.rid);
ourQuery._id = { $in: roomIds };
}
const cursor = RocketChat.models.Rooms.find(ourQuery, {
sort: sort ? sort : { name: 1 },
skip: offset,
limit: count,
fields,
});
const total = cursor.count();
const rooms = cursor.fetch();
return RocketChat.API.v1.success({
channels: rooms,
count: rooms.length,
offset,
total,
});
},
},
});
RocketChat.API.v1.addRoute('channels.list.joined', { authRequired: true }, {
get() {
const { offset, count } = this.getPaginationItems();
const { sort, fields } = this.parseJsonQuery();
// TODO: CACHE: Add Breacking notice since we removed the query param
const cursor = RocketChat.models.Rooms.findBySubscriptionTypeAndUserId('c', this.userId, {
sort: sort ? sort : { name: 1 },
skip: offset,
limit: count,
fields,
});
const totalCount = cursor.count();
const rooms = cursor.fetch();
return RocketChat.API.v1.success({
channels: rooms,
offset,
count: rooms.length,
total: totalCount,
});
},
});
RocketChat.API.v1.addRoute('channels.members', { authRequired: true }, {
get() {
const findResult = findChannelByIdOrName({
params: this.requestParams(),
checkedArchived: false,
});
if (findResult.broadcast && !RocketChat.authz.hasPermission(this.userId, 'view-broadcast-member-list')) {
return RocketChat.API.v1.unauthorized();
}
const { offset, count } = this.getPaginationItems();
const { sort = {} } = this.parseJsonQuery();
const subscriptions = RocketChat.models.Subscriptions.findByRoomId(findResult._id, {
fields: { 'u._id': 1 },
sort: { 'u.username': sort.username != null ? sort.username : 1 },
skip: offset,
limit: count,
});
const total = subscriptions.count();
const members = subscriptions.fetch().map((s) => s.u && s.u._id);
const users = RocketChat.models.Users.find({ _id: { $in: members } }, {
fields: { _id: 1, username: 1, name: 1, status: 1, utcOffset: 1 },
sort: { username: sort.username != null ? sort.username : 1 },
}).fetch();
return RocketChat.API.v1.success({
members: users,
count: users.length,
offset,
total,
});
},
});
RocketChat.API.v1.addRoute('channels.messages', { authRequired: true }, {
get() {
const findResult = findChannelByIdOrName({
params: this.requestParams(),
checkedArchived: false,
});
const { offset, count } = this.getPaginationItems();
const { sort, fields, query } = this.parseJsonQuery();
const ourQuery = Object.assign({}, query, { rid: findResult._id });
// Special check for the permissions
if (RocketChat.authz.hasPermission(this.userId, 'view-joined-room') && !RocketChat.models.Subscriptions.findOneByRoomIdAndUserId(findResult._id, this.userId, { fields: { _id: 1 } })) {
return RocketChat.API.v1.unauthorized();
}
if (!RocketChat.authz.hasPermission(this.userId, 'view-c-room')) {
return RocketChat.API.v1.unauthorized();
}
const cursor = RocketChat.models.Messages.find(ourQuery, {
sort: sort ? sort : { ts: -1 },
skip: offset,
limit: count,
fields,
});
const total = cursor.count();
const messages = cursor.fetch();
return RocketChat.API.v1.success({
messages,
count: messages.length,
offset,
total,
});
},
});
// TODO: CACHE: I dont like this method( functionality and how we implemented ) its very expensive
// TODO check if this code is better or not
// RocketChat.API.v1.addRoute('channels.online', { authRequired: true }, {
// get() {
// const { query } = this.parseJsonQuery();
// const ourQuery = Object.assign({}, query, { t: 'c' });
// const room = RocketChat.models.Rooms.findOne(ourQuery);
// if (room == null) {
// return RocketChat.API.v1.failure('Channel does not exists');
// }
// const ids = RocketChat.models.Subscriptions.find({ rid: room._id }, { fields: { 'u._id': 1 } }).fetch().map(sub => sub.u._id);
// const online = RocketChat.models.Users.find({
// username: { $exists: 1 },
// _id: { $in: ids },
// status: { $in: ['online', 'away', 'busy'] }
// }, {
// fields: { username: 1 }
// }).fetch();
// return RocketChat.API.v1.success({
// online
// });
// }
// });
RocketChat.API.v1.addRoute('channels.online', { authRequired: true }, {
get() {
const { query } = this.parseJsonQuery();
const ourQuery = Object.assign({}, query, { t: 'c' });
const room = RocketChat.models.Rooms.findOne(ourQuery);
if (room == null) {
return RocketChat.API.v1.failure('Channel does not exists');
}
const online = RocketChat.models.Users.findUsersNotOffline({
fields: { username: 1 },
}).fetch();
const onlineInRoom = [];
online.forEach((user) => {
const subscription = RocketChat.models.Subscriptions.findOneByRoomIdAndUserId(root._id, user._id, { fields: { _id: 1 } });
if (subscription) {
onlineInRoom.push({
_id: user._id,
username: user.username,
});
}
});
return RocketChat.API.v1.success({
online: onlineInRoom,
});
},
});
RocketChat.API.v1.addRoute('channels.open', { authRequired: true }, {
post() {
const findResult = findChannelByIdOrName({ params: this.requestParams(), checkedArchived: false });
const sub = RocketChat.models.Subscriptions.findOneByRoomIdAndUserId(findResult._id, this.userId);
if (!sub) {
return RocketChat.API.v1.failure(`The user/callee is not in the channel "${ findResult.name }".`);
}
if (sub.open) {
return RocketChat.API.v1.failure(`The channel, ${ findResult.name }, is already open to the sender`);
}
Meteor.runAsUser(this.userId, () => {
Meteor.call('openRoom', findResult._id);
});
return RocketChat.API.v1.success();
},
});
RocketChat.API.v1.addRoute('channels.removeModerator', { authRequired: true }, {
post() {
const findResult = findChannelByIdOrName({ params: this.requestParams() });
const user = this.getUserFromParams();
Meteor.runAsUser(this.userId, () => {
Meteor.call('removeRoomModerator', findResult._id, user._id);
});
return RocketChat.API.v1.success();
},
});
RocketChat.API.v1.addRoute('channels.removeOwner', { authRequired: true }, {
post() {
const findResult = findChannelByIdOrName({ params: this.requestParams() });
const user = this.getUserFromParams();
Meteor.runAsUser(this.userId, () => {
Meteor.call('removeRoomOwner', findResult._id, user._id);
});
return RocketChat.API.v1.success();
},
});
RocketChat.API.v1.addRoute('channels.rename', { authRequired: true }, {
post() {
if (!this.bodyParams.name || !this.bodyParams.name.trim()) {
return RocketChat.API.v1.failure('The bodyParam "name" is required');
}
const findResult = findChannelByIdOrName({ params: { roomId: this.bodyParams.roomId } });
if (findResult.name === this.bodyParams.name) {
return RocketChat.API.v1.failure('The channel name is the same as what it would be renamed to.');
}
Meteor.runAsUser(this.userId, () => {
Meteor.call('saveRoomSettings', findResult._id, 'roomName', this.bodyParams.name);
});
return RocketChat.API.v1.success({
channel: RocketChat.models.Rooms.findOneById(findResult._id, { fields: RocketChat.API.v1.defaultFieldsToExclude }),
});
},
});
RocketChat.API.v1.addRoute('channels.setCustomFields', { authRequired: true }, {
post() {
if (!this.bodyParams.customFields || !(typeof this.bodyParams.customFields === 'object')) {
return RocketChat.API.v1.failure('The bodyParam "customFields" is required with a type like object.');
}
const findResult = findChannelByIdOrName({ params: this.requestParams() });
Meteor.runAsUser(this.userId, () => {
Meteor.call('saveRoomSettings', findResult._id, 'roomCustomFields', this.bodyParams.customFields);
});
return RocketChat.API.v1.success({
channel: RocketChat.models.Rooms.findOneById(findResult._id, { fields: RocketChat.API.v1.defaultFieldsToExclude }),
});
},
});
RocketChat.API.v1.addRoute('channels.setDefault', { authRequired: true }, {
post() {
if (typeof this.bodyParams.default === 'undefined') {
return RocketChat.API.v1.failure('The bodyParam "default" is required', 'error-channels-setdefault-is-same');
}
const findResult = findChannelByIdOrName({ params: this.requestParams() });
if (findResult.default === this.bodyParams.default) {
return RocketChat.API.v1.failure('The channel default setting is the same as what it would be changed to.', 'error-channels-setdefault-missing-default-param');
}
Meteor.runAsUser(this.userId, () => {
Meteor.call('saveRoomSettings', findResult._id, 'default', this.bodyParams.default.toString());
});
return RocketChat.API.v1.success({
channel: RocketChat.models.Rooms.findOneById(findResult._id, { fields: RocketChat.API.v1.defaultFieldsToExclude }),
});
},
});
RocketChat.API.v1.addRoute('channels.setDescription', { authRequired: true }, {
post() {
if (!this.bodyParams.description || !this.bodyParams.description.trim()) {
return RocketChat.API.v1.failure('The bodyParam "description" is required');
}
const findResult = findChannelByIdOrName({ params: this.requestParams() });
if (findResult.description === this.bodyParams.description) {
return RocketChat.API.v1.failure('The channel description is the same as what it would be changed to.');
}
Meteor.runAsUser(this.userId, () => {
Meteor.call('saveRoomSettings', findResult._id, 'roomDescription', this.bodyParams.description);
});
return RocketChat.API.v1.success({
description: this.bodyParams.description,
});
},
});
RocketChat.API.v1.addRoute('channels.setJoinCode', { authRequired: true }, {
post() {
if (!this.bodyParams.joinCode || !this.bodyParams.joinCode.trim()) {
return RocketChat.API.v1.failure('The bodyParam "joinCode" is required');
}
const findResult = findChannelByIdOrName({ params: this.requestParams() });
Meteor.runAsUser(this.userId, () => {
Meteor.call('saveRoomSettings', findResult._id, 'joinCode', this.bodyParams.joinCode);
});
return RocketChat.API.v1.success({
channel: RocketChat.models.Rooms.findOneById(findResult._id, { fields: RocketChat.API.v1.defaultFieldsToExclude }),
});
},
});
RocketChat.API.v1.addRoute('channels.setPurpose', { authRequired: true }, {
post() {
if (!this.bodyParams.purpose || !this.bodyParams.purpose.trim()) {
return RocketChat.API.v1.failure('The bodyParam "purpose" is required');
}
const findResult = findChannelByIdOrName({ params: this.requestParams() });
if (findResult.description === this.bodyParams.purpose) {
return RocketChat.API.v1.failure('The channel purpose (description) is the same as what it would be changed to.');
}
Meteor.runAsUser(this.userId, () => {
Meteor.call('saveRoomSettings', findResult._id, 'roomDescription', this.bodyParams.purpose);
});
return RocketChat.API.v1.success({
purpose: this.bodyParams.purpose,
});
},
});
RocketChat.API.v1.addRoute('channels.setReadOnly', { authRequired: true }, {
post() {
if (typeof this.bodyParams.readOnly === 'undefined') {
return RocketChat.API.v1.failure('The bodyParam "readOnly" is required');
}
const findResult = findChannelByIdOrName({ params: this.requestParams() });
if (findResult.ro === this.bodyParams.readOnly) {
return RocketChat.API.v1.failure('The channel read only setting is the same as what it would be changed to.');
}
Meteor.runAsUser(this.userId, () => {
Meteor.call('saveRoomSettings', findResult._id, 'readOnly', this.bodyParams.readOnly);
});
return RocketChat.API.v1.success({
channel: RocketChat.models.Rooms.findOneById(findResult._id, { fields: RocketChat.API.v1.defaultFieldsToExclude }),
});
},
});
RocketChat.API.v1.addRoute('channels.setTopic', { authRequired: true }, {
post() {
if (!this.bodyParams.topic || !this.bodyParams.topic.trim()) {
return RocketChat.API.v1.failure('The bodyParam "topic" is required');
}
const findResult = findChannelByIdOrName({ params: this.requestParams() });
if (findResult.topic === this.bodyParams.topic) {
return RocketChat.API.v1.failure('The channel topic is the same as what it would be changed to.');
}
Meteor.runAsUser(this.userId, () => {
Meteor.call('saveRoomSettings', findResult._id, 'roomTopic', this.bodyParams.topic);
});
return RocketChat.API.v1.success({
topic: this.bodyParams.topic,
});
},
});
RocketChat.API.v1.addRoute('channels.setAnnouncement', { authRequired: true }, {
post() {
if (!this.bodyParams.announcement || !this.bodyParams.announcement.trim()) {
return RocketChat.API.v1.failure('The bodyParam "announcement" is required');
}
const findResult = findChannelByIdOrName({ params: this.requestParams() });
Meteor.runAsUser(this.userId, () => {
Meteor.call('saveRoomSettings', findResult._id, 'roomAnnouncement', this.bodyParams.announcement);
});
return RocketChat.API.v1.success({
announcement: this.bodyParams.announcement,
});
},
});
RocketChat.API.v1.addRoute('channels.setType', { authRequired: true }, {
post() {
if (!this.bodyParams.type || !this.bodyParams.type.trim()) {
return RocketChat.API.v1.failure('The bodyParam "type" is required');
}
const findResult = findChannelByIdOrName({ params: this.requestParams() });
if (findResult.t === this.bodyParams.type) {
return RocketChat.API.v1.failure('The channel type is the same as what it would be changed to.');
}
Meteor.runAsUser(this.userId, () => {
Meteor.call('saveRoomSettings', findResult._id, 'roomType', this.bodyParams.type);
});
return RocketChat.API.v1.success({
channel: RocketChat.models.Rooms.findOneById(findResult._id, { fields: RocketChat.API.v1.defaultFieldsToExclude }),
});
},
});
RocketChat.API.v1.addRoute('channels.unarchive', { authRequired: true }, {
post() {
const findResult = findChannelByIdOrName({ params: this.requestParams(), checkedArchived: false });
if (!findResult.archived) {
return RocketChat.API.v1.failure(`The channel, ${ findResult.name }, is not archived`);
}
Meteor.runAsUser(this.userId, () => {
Meteor.call('unarchiveRoom', findResult._id);
});
return RocketChat.API.v1.success();
},
});
RocketChat.API.v1.addRoute('channels.getAllUserMentionsByChannel', { authRequired: true }, {
get() {
const { roomId } = this.requestParams();
const { offset, count } = this.getPaginationItems();
const { sort } = this.parseJsonQuery();
if (!roomId) {
return RocketChat.API.v1.failure('The request param "roomId" is required');
}
const mentions = Meteor.runAsUser(this.userId, () => Meteor.call('getUserMentionsByChannel', {
roomId,
options: {
sort: sort ? sort : { ts: 1 },
skip: offset,
limit: count,
},
}));
const allMentions = Meteor.runAsUser(this.userId, () => Meteor.call('getUserMentionsByChannel', {
roomId,
options: {},
}));
return RocketChat.API.v1.success({
mentions,
count: mentions.length,
offset,
total: allMentions.length,
});
},
});
RocketChat.API.v1.addRoute('channels.roles', { authRequired: true }, {
get() {
const findResult = findChannelByIdOrName({ params: this.requestParams() });
const roles = Meteor.runAsUser(this.userId, () => Meteor.call('getRoomRoles', findResult._id));
return RocketChat.API.v1.success({
roles,
});
},
});
| {
"content_hash": "93b7f54e0bec454be7f07d3d85ab2808",
"timestamp": "",
"source": "github",
"line_count": 956,
"max_line_length": 186,
"avg_line_length": 29.53765690376569,
"alnum_prop": 0.678907854663928,
"repo_name": "flaviogrossi/Rocket.Chat",
"id": "a2177bfc317f65e7694f71c640bc0956f3666c30",
"size": "28238",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "packages/rocketchat-api/server/v1/channels.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "549"
},
{
"name": "CSS",
"bytes": "389912"
},
{
"name": "Cap'n Proto",
"bytes": "3959"
},
{
"name": "CoffeeScript",
"bytes": "30843"
},
{
"name": "Dockerfile",
"bytes": "1874"
},
{
"name": "HTML",
"bytes": "415928"
},
{
"name": "JavaScript",
"bytes": "3996494"
},
{
"name": "Ruby",
"bytes": "4653"
},
{
"name": "Shell",
"bytes": "30169"
},
{
"name": "Standard ML",
"bytes": "1843"
}
],
"symlink_target": ""
} |
var lunrIndex, pagesIndex;
function endsWith(str, suffix) {
return str.indexOf(suffix, str.length - suffix.length) !== -1;
}
// Initialize lunrjs using our generated index file
function initLunr() {
if (!endsWith(baseurl,"/")){
baseurl = baseurl+'/'
};
// First retrieve the index file
$.getJSON(baseurl +"index.json")
.done(function(index) {
pagesIndex = index;
// Set up lunrjs by declaring the fields we use
// Also provide their boost level for the ranking
lunrIndex = new lunr.Index
lunrIndex.ref("uri");
lunrIndex.field('title', {
boost: 15
});
lunrIndex.field('tags', {
boost: 10
});
lunrIndex.field("content", {
boost: 5
});
// Feed lunr with each file and let lunr actually index them
pagesIndex.forEach(function(page) {
if (page.tags.indexOf('skipIndexing') == -1) {
lunrIndex.add(page);
}
});
lunrIndex.pipeline.remove(lunrIndex.stemmer)
})
.fail(function(jqxhr, textStatus, error) {
var err = textStatus + ", " + error;
console.error("Error getting Hugo index flie:", err);
});
}
/**
* Trigger a search in lunr and transform the result
*
* @param {String} query
* @return {Array} results
*/
function search(query) {
// Find the item in our index corresponding to the lunr one to have more info
return lunrIndex.search(query).map(function(result) {
return pagesIndex.filter(function(page) {
return page.uri === result.ref;
})[0];
});
}
// Let's get started
initLunr();
$( document ).ready(function() {
var searchList = new autoComplete({
/* selector for the search box element */
selector: $("#search-by").get(0),
/* source is the callback to perform the search */
source: function(term, response) {
response(search(term));
},
/* renderItem displays individual search results */
renderItem: function(item, term) {
var numContextWords = 2;
var text = item.content.match(
"(?:\\s?(?:[\\w]+)\\s?){0,"+numContextWords+"}" +
term+"(?:\\s?(?:[\\w]+)\\s?){0,"+numContextWords+"}");
item.context = text;
return '<div class="autocomplete-suggestion" ' +
'data-term="' + term + '" ' +
'data-title="' + item.title + '" ' +
'data-uri="'+ item.uri + '" ' +
'data-context="' + item.context + '">' +
'» ' + item.title +
'<div class="context">' +
(item.context || '') +'</div>' +
'</div>';
},
/* onSelect callback fires when a search suggestion is chosen */
onSelect: function(e, term, item) {
location.href = item.getAttribute('data-uri');
}
});
});
| {
"content_hash": "87b79f7b8c5d924d6194cd2338f143e9",
"timestamp": "",
"source": "github",
"line_count": 92,
"max_line_length": 81,
"avg_line_length": 33.96739130434783,
"alnum_prop": 0.50496,
"repo_name": "kawamon/hue",
"id": "ac148307a024d5d8046618d2e883032b8000a15d",
"size": "3126",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "docs/docs-site/themes/hugo-theme-learn/static/js/search.js",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ABAP",
"bytes": "962"
},
{
"name": "ActionScript",
"bytes": "1133"
},
{
"name": "Ada",
"bytes": "99"
},
{
"name": "Assembly",
"bytes": "5786"
},
{
"name": "AutoHotkey",
"bytes": "720"
},
{
"name": "Batchfile",
"bytes": "118907"
},
{
"name": "C",
"bytes": "3196521"
},
{
"name": "C#",
"bytes": "83"
},
{
"name": "C++",
"bytes": "308860"
},
{
"name": "COBOL",
"bytes": "4"
},
{
"name": "CSS",
"bytes": "1050129"
},
{
"name": "Cirru",
"bytes": "520"
},
{
"name": "Clojure",
"bytes": "794"
},
{
"name": "CoffeeScript",
"bytes": "403"
},
{
"name": "ColdFusion",
"bytes": "86"
},
{
"name": "Common Lisp",
"bytes": "632"
},
{
"name": "D",
"bytes": "324"
},
{
"name": "Dart",
"bytes": "489"
},
{
"name": "Dockerfile",
"bytes": "10981"
},
{
"name": "Eiffel",
"bytes": "375"
},
{
"name": "Elixir",
"bytes": "692"
},
{
"name": "Elm",
"bytes": "487"
},
{
"name": "Emacs Lisp",
"bytes": "411907"
},
{
"name": "Erlang",
"bytes": "487"
},
{
"name": "Forth",
"bytes": "979"
},
{
"name": "FreeMarker",
"bytes": "1017"
},
{
"name": "G-code",
"bytes": "521"
},
{
"name": "GLSL",
"bytes": "512"
},
{
"name": "Genshi",
"bytes": "946"
},
{
"name": "Gherkin",
"bytes": "699"
},
{
"name": "Go",
"bytes": "7312"
},
{
"name": "Groovy",
"bytes": "1080"
},
{
"name": "HTML",
"bytes": "24999718"
},
{
"name": "Haskell",
"bytes": "512"
},
{
"name": "Haxe",
"bytes": "447"
},
{
"name": "HiveQL",
"bytes": "43"
},
{
"name": "Io",
"bytes": "140"
},
{
"name": "JSONiq",
"bytes": "4"
},
{
"name": "Java",
"bytes": "471854"
},
{
"name": "JavaScript",
"bytes": "28075556"
},
{
"name": "Julia",
"bytes": "210"
},
{
"name": "Jupyter Notebook",
"bytes": "73168"
},
{
"name": "LSL",
"bytes": "2080"
},
{
"name": "Lean",
"bytes": "213"
},
{
"name": "Lex",
"bytes": "264449"
},
{
"name": "Liquid",
"bytes": "1883"
},
{
"name": "LiveScript",
"bytes": "5747"
},
{
"name": "Lua",
"bytes": "78382"
},
{
"name": "M4",
"bytes": "1377"
},
{
"name": "MATLAB",
"bytes": "203"
},
{
"name": "Makefile",
"bytes": "269655"
},
{
"name": "Mako",
"bytes": "3614942"
},
{
"name": "Mask",
"bytes": "597"
},
{
"name": "Myghty",
"bytes": "936"
},
{
"name": "Nix",
"bytes": "2212"
},
{
"name": "OCaml",
"bytes": "539"
},
{
"name": "Objective-C",
"bytes": "2672"
},
{
"name": "OpenSCAD",
"bytes": "333"
},
{
"name": "PHP",
"bytes": "662"
},
{
"name": "PLSQL",
"bytes": "31565"
},
{
"name": "PLpgSQL",
"bytes": "6006"
},
{
"name": "Pascal",
"bytes": "1412"
},
{
"name": "Perl",
"bytes": "4327"
},
{
"name": "PigLatin",
"bytes": "371"
},
{
"name": "PowerShell",
"bytes": "3204"
},
{
"name": "Python",
"bytes": "76440000"
},
{
"name": "R",
"bytes": "2445"
},
{
"name": "Roff",
"bytes": "95764"
},
{
"name": "Ruby",
"bytes": "1098"
},
{
"name": "Rust",
"bytes": "495"
},
{
"name": "Scala",
"bytes": "1541"
},
{
"name": "Scheme",
"bytes": "559"
},
{
"name": "Shell",
"bytes": "190718"
},
{
"name": "Smarty",
"bytes": "130"
},
{
"name": "TSQL",
"bytes": "10013"
},
{
"name": "Tcl",
"bytes": "899"
},
{
"name": "TeX",
"bytes": "165743"
},
{
"name": "Thrift",
"bytes": "317058"
},
{
"name": "TypeScript",
"bytes": "1607"
},
{
"name": "VBA",
"bytes": "2884"
},
{
"name": "VBScript",
"bytes": "938"
},
{
"name": "VHDL",
"bytes": "830"
},
{
"name": "Vala",
"bytes": "485"
},
{
"name": "Verilog",
"bytes": "274"
},
{
"name": "Vim Snippet",
"bytes": "226931"
},
{
"name": "XQuery",
"bytes": "114"
},
{
"name": "XSLT",
"bytes": "521413"
},
{
"name": "Yacc",
"bytes": "2133855"
}
],
"symlink_target": ""
} |
@interface EmptyNSURLCache : NSURLCache
+ (instancetype)emptyNSURLCache;
@end
#endif // IOS_NET_EMPTY_NSURLCACHE_H_
| {
"content_hash": "c539e68f214fc1eacd375c261a5a00b1",
"timestamp": "",
"source": "github",
"line_count": 5,
"max_line_length": 39,
"avg_line_length": 23.6,
"alnum_prop": 0.7711864406779662,
"repo_name": "chromium/chromium",
"id": "1c243f6eb42b6662cf1cfa0d3326b159ac90679d",
"size": "435",
"binary": false,
"copies": "7",
"ref": "refs/heads/main",
"path": "ios/net/empty_nsurlcache.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [],
"symlink_target": ""
} |
package com.algorithm.distance;
import static org.junit.Assert.*;
import org.junit.Test;
public class FareCalculatorTest {
/* ********************************************************************************************
* TRIP COST TESTS
*********************************************************************************************/
@Test
public void testCalculateTaxiFareCost() {
assertEquals("A fare below 155 meters should cost $4.00", 400, FareCalculator.calculateTaxiFareCost(150));
assertEquals("A 305 meter fare should cost $4.25", 425, FareCalculator.calculateTaxiFareCost(305));
assertEquals("A 310 meter fare should cost $4.50", 450, FareCalculator.calculateTaxiFareCost(310));
assertEquals("A 315 meter fare should cost $4.50", 450, FareCalculator.calculateTaxiFareCost(315));
}
}
| {
"content_hash": "d4949424aaa9f676bc4d42e5a97a3753",
"timestamp": "",
"source": "github",
"line_count": 22,
"max_line_length": 114,
"avg_line_length": 40.81818181818182,
"alnum_prop": 0.5278396436525612,
"repo_name": "colinflam/car-dispatch",
"id": "8d13e6c618f666a8816bdc0a8c2f9c257d5202f7",
"size": "898",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "test/com/algorithm/distance/FareCalculatorTest.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "459331"
}
],
"symlink_target": ""
} |
layout: post
status: publish
published: true
title: Rural theatre's radical force
author:
display_name: Jon Clausen
login: JClausen
email: [email protected]
url: http://jonclausen.com
author_login: JClausen
author_email: [email protected]
author_url: http://jonclausen.com
wordpress_id: 63
wordpress_url: http://jonclausen.com/2008/02/06/rural-theatres-radical-force/
date: '2008-02-06 20:54:20 -0500'
date_gmt: '2008-02-07 01:54:20 -0500'
categories:
- Theatre
tags: []
comments: []
---
<p>Guardian theatre blog <a href="http://blogs.guardian.co.uk/theatre/2008/02/the_radical_force_of_rural_the.html">makes some interesting observations on England's rural theatre</a> today:</p>
<blockquote><p>
So it may come as a surprise to the rest of the country to hear that much of the work being made in rural England is new work for new audiences and is presented in different ways and times, through new partnerships. It doesn't call itself "radical" or "experimental" because, like everywhere else, these terms scare the audience. Nevertheless, freed from the restrictions of purpose-built theatres, many artists are experimenting with the way they tell their stories, creating new relationships with audiences and reinventing what contemporary theatre might look like. Indeed, I would contend that much of the future health of theatre relies on exploiting the discoveries being made in rural touring.
</p></blockquote>
<p>Lest we forget that the traditions of storytelling have their deepest roots in rural areas... This subject of pushing the boundaries of rural theatre fascinates me, having grown up in a rural area, myself. Despite stereotypes and assumptions to the contrary, rural theatre-goers are some of the most accepting and loyal patrons which any theatre can have.</p>
<p>While it's true that mainstream musicals, old stand-bys, and light comedies tend to be more well received as a whole by that demographic, I also think that the opportunity exists to present important, even controversial works, to those audiences - providing due diligence, communication, and an ongoing, healthy relationship with the community is part of package.</p>
| {
"content_hash": "5ca2b217362f133fbcf6e17bc8c677da",
"timestamp": "",
"source": "github",
"line_count": 27,
"max_line_length": 701,
"avg_line_length": 80.85185185185185,
"alnum_prop": 0.7883646358222629,
"repo_name": "jclausen/jclausen.github.io",
"id": "44d31b453f5799ef8df573a7aa9191f3b592b2a0",
"size": "2187",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "_posts/2008-02-06-rural-theatres-radical-force.markdown",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "93200"
},
{
"name": "HTML",
"bytes": "1373459"
},
{
"name": "JavaScript",
"bytes": "4418"
},
{
"name": "Ruby",
"bytes": "3377"
}
],
"symlink_target": ""
} |
class DspaceTools
class BulkUploader
attr :dspace_error
def initialize(path, collection_id, user)
@dspace_error = nil
@path = path
@collection_id = collection_id
@user = user
get_instance_vars
end
def submit
import_submission
copy_map_file_to_local
@map_file
end
def dspace_command
@dspace_command
end
private
def get_instance_vars
@map_file = Time.now().to_s[0..18].
gsub(/[\-\s]/,'_') + '_mapfile_' + @user.email.gsub(/[\.@]/, '_')
@map_path = File.join(DspaceTools::Conf.tmp_dir, @map_file)
@data = [DspaceTools::Conf.dspace_path,
@user.email,
@collection_id,
@path,
@map_path,]
@dspace_command =
"%s import ItemImport -w -a -e %s -c %s -s %s -m %s 2>&1" %
@data
@local_mapfile_path = File.join(DspaceTools::Conf.root_path,
'public',
'map_files')
end
def import_submission
begin
@dspace_output = `#{dspace_command}`
rescue RuntimeError => e
raise(DspaceTools::ImportError.new("DSpace upload failed: %s" %
e.message))
end
end
def copy_map_file_to_local
if File.exists?(@map_path) && open(@map_path).read.strip != ''
FileUtils.mv @map_path, @local_mapfile_path
else
@dspace_error = DspaceError.create!(eperson_id: @user.id,
collection_id: @collection_id,
error: @dspace_output)
raise(DspaceTools::ImportError.new(
'DSpace upload failed: empty mapfile'))
end
end
end
end
| {
"content_hash": "016aeee4872f07cac11a5b7527fd18a0",
"timestamp": "",
"source": "github",
"line_count": 64,
"max_line_length": 73,
"avg_line_length": 28.578125,
"alnum_prop": 0.49589939857845816,
"repo_name": "mbl-cli/DspaceTools",
"id": "7089b94ac8ae78aac5c0f7d95922936d50e56ba3",
"size": "1829",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/dspace_tools/bulk_uploader.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Ruby",
"bytes": "90112"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Questionnaire | Forms - Web Components</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css" rel="stylesheet" type='text/css'>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type='text/css'>
<link href="https://zsadler.github.io/css/main.css" rel="stylesheet" type='text/css'>
<link href="https://zsadler.github.io/css/breadcrumb.css" rel="stylesheet" type='text/css'>
<link href="../buttons/button.css" rel="stylesheet" type='text/css'>
<link href="forms.css" rel="stylesheet" type='text/css'>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-142697925-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-142697925-1');
</script>
</head>
<body>
<header class="wrapper">
<div class="overlay"></div>
<div class="hero"></div>
<div class="container">
<h1>Zoe Sadler</h1>
<h2>Javascript Developer</h2>
<blockquote class="quote">"Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails. Explore. Dream. Discover." <span class="author"> ~ Mark Twain</span>
</blockquote>
</div>
</header>
<ul class="breadcrumb">
<li><a href="https://zsadler.github.io"><i class="fa fa-home" aria-hidden="true"></i> Home</a></li>
<li><a href="index.html">Forms</a></li>
<li><a href="questionnaire.html">Questionnaire Form</a></li>
</ul>
<article class="component">
<h2>Questionnaire Form</h2>
<form id="questionnaire" class="questionnaire-form" action="">
<fieldset>
<legend> < Favorite Beer Type > </legend>
<label>What type of beer do you love?</label>
<div class="error-msg radio-error"></div>
<input type="radio" name="beer" value="IPA">IPA<br>
<input type="radio" name="beer" value="Stout">Stout<br>
<input type="radio" name="beer" value="Pale Ale">Pale Ale<br>
<input type="radio" name="beer" value="Porter">Porter<br>
<input type="radio" name="beer" value="Other">Other
<div class="error-msg other-error "></div>
<input type="text" name="other_beer" placeholder="What other type of beer?">
</fieldset>
<button type="submit" class="button button-md">Submit</button>
</form>
</article>
<script type="text/javascript" src="js/validator.js"></script>
<script type="text/javascript" src="js/questionnaire.js"></script>
</body>
</html> | {
"content_hash": "1d726d7c621c11d134c1e69c07238b2b",
"timestamp": "",
"source": "github",
"line_count": 67,
"max_line_length": 313,
"avg_line_length": 44.56716417910448,
"alnum_prop": 0.6346282652377763,
"repo_name": "zsadler/web-components",
"id": "e715ec19b2772efac0fa4f6331a410804f467b97",
"size": "2986",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "components/forms/questionnaire.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "8441"
},
{
"name": "HTML",
"bytes": "71776"
},
{
"name": "JavaScript",
"bytes": "36175"
}
],
"symlink_target": ""
} |
package net.tridentsdk.server.packets.play.out;
import io.netty.buffer.ByteBuf;
import net.tridentsdk.server.netty.packet.OutPacket;
public class PacketPlayOutAttachEntity extends OutPacket {
protected int entityId;
protected int vehicleId;
protected boolean leash;
@Override
public int id() {
return 0x1B;
}
public int entityId() {
return this.entityId;
}
public int vehicleId() {
return this.vehicleId;
}
public boolean isLeashed() {
return this.leash;
}
@Override
public void encode(ByteBuf buf) {
buf.writeInt(this.entityId); // Well, that's a first
buf.writeInt(this.vehicleId); // AGAIN
// rip in peace varints
buf.writeBoolean(this.leash);
}
}
| {
"content_hash": "85a43d69e3e6f40c680d07d55d25d4b0",
"timestamp": "",
"source": "github",
"line_count": 39,
"max_line_length": 60,
"avg_line_length": 20.153846153846153,
"alnum_prop": 0.6424936386768448,
"repo_name": "PizzaCrust/Trident",
"id": "fc2630e09be77c09ac72713e7f33dde03ef8b5f5",
"size": "1435",
"binary": false,
"copies": "2",
"ref": "refs/heads/bleeding-edge",
"path": "src/main/java/net/tridentsdk/server/packets/play/out/PacketPlayOutAttachEntity.java",
"mode": "33261",
"license": "apache-2.0",
"language": [
{
"name": "HTML",
"bytes": "15410"
},
{
"name": "Java",
"bytes": "1031044"
},
{
"name": "Shell",
"bytes": "2459"
}
],
"symlink_target": ""
} |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package net.cybersoft.visitorinfo;
public class RunMode {
private static int mode ;
public static int TEST = 1;
public static int DEVELOPMENT = 2;
public static int STAGING = 3;
public static int PRODUCTION = 4;
public RunMode(){
mode = BuildConfig.DEBUG ? TEST:PRODUCTION;
}
public static int getMode(){
return mode;
}
public static void setMode(int modeToSet){
mode = modeToSet;
}
public static boolean isProduction(){
return mode == PRODUCTION;
}
public static boolean isDevelopment(){
return mode == DEVELOPMENT;
}
public static boolean isStaging(){
return mode == STAGING;
}
public static boolean isTest(){
return mode == TEST;
}
}
| {
"content_hash": "62dab44907f9513851f21f9e9195e53c",
"timestamp": "",
"source": "github",
"line_count": 35,
"max_line_length": 52,
"avg_line_length": 24.914285714285715,
"alnum_prop": 0.6284403669724771,
"repo_name": "frndforall/VisitorManagement",
"id": "a1968b1ebfa14bfdc0429acc7127132a6dbe30f5",
"size": "872",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/src/main/java/net/cybersoft/visitorinfo/RunMode.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "228399"
}
],
"symlink_target": ""
} |
import {ListOfArticlesComponent} from "./list-of-articles.component";
export const routes = [
{path: '', component: ListOfArticlesComponent, pathMatch: 'full'},
]; | {
"content_hash": "8bce1b7e3dac63fd7bef6b35376aa786",
"timestamp": "",
"source": "github",
"line_count": 5,
"max_line_length": 70,
"avg_line_length": 33.6,
"alnum_prop": 0.7261904761904762,
"repo_name": "Lycsona/blog",
"id": "6c28429978b84b2f471a052afbdb2374307e6861",
"size": "169",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "blog-client/client-angular-4/src/app/+admin/+list-of-articles/list-of-articles.routes.ts",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "206839"
},
{
"name": "HTML",
"bytes": "21472"
},
{
"name": "JavaScript",
"bytes": "81575"
},
{
"name": "PHP",
"bytes": "130951"
},
{
"name": "TypeScript",
"bytes": "65013"
}
],
"symlink_target": ""
} |
package com.bvakili.portlet.integration.box.service.messaging;
import com.bvakili.portlet.integration.box.service.BoxRepositoryLocalServiceUtil;
import com.bvakili.portlet.integration.box.service.BoxTokenLocalServiceUtil;
import com.bvakili.portlet.integration.box.service.ClpSerializer;
import com.liferay.portal.kernel.messaging.BaseMessageListener;
import com.liferay.portal.kernel.messaging.Message;
/**
* @author Bijan Vakili
*/
public class ClpMessageListener extends BaseMessageListener {
public static String getServletContextName() {
return ClpSerializer.getServletContextName();
}
@Override
protected void doReceive(Message message) throws Exception {
String command = message.getString("command");
String servletContextName = message.getString("servletContextName");
if (command.equals("undeploy") &&
servletContextName.equals(getServletContextName())) {
BoxRepositoryLocalServiceUtil.clearService();
BoxTokenLocalServiceUtil.clearService();
}
}
} | {
"content_hash": "467db5bb0535fda7a456b99497e063ac",
"timestamp": "",
"source": "github",
"line_count": 32,
"max_line_length": 81,
"avg_line_length": 31.03125,
"alnum_prop": 0.8066465256797583,
"repo_name": "bmvakili/liferay-plugins-sdk-6.2.0-rc6",
"id": "26dd12254e475337c87720b2d658559640d9e83d",
"size": "1581",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "portlets/BoxComIntegrationLiferay-portlet/docroot/WEB-INF/service/com/bvakili/portlet/integration/box/service/messaging/ClpMessageListener.java",
"mode": "33261",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "0"
},
{
"name": "Java",
"bytes": "529941"
},
{
"name": "JavaScript",
"bytes": "2211"
},
{
"name": "Perl",
"bytes": "488"
},
{
"name": "Shell",
"bytes": "7432"
}
],
"symlink_target": ""
} |
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { Component, Input, Output, EventEmitter, HostListener, ElementRef, ChangeDetectionStrategy } from '@angular/core';
import { select } from 'd3-selection';
import { roundedRect } from '../common/shape.helper';
import { id } from '../utils/id';
var BarComponent = /** @class */ (function () {
function BarComponent(element) {
this.roundEdges = true;
this.gradient = false;
this.offset = 0;
this.isActive = false;
this.animations = true;
this.select = new EventEmitter();
this.activate = new EventEmitter();
this.deactivate = new EventEmitter();
this.initialized = false;
this.hasGradient = false;
this.element = element.nativeElement;
}
BarComponent.prototype.ngOnChanges = function (changes) {
if (!this.initialized) {
this.loadAnimation();
this.initialized = true;
}
else {
this.update();
}
};
BarComponent.prototype.update = function () {
this.gradientId = 'grad' + id().toString();
this.gradientFill = "url(#" + this.gradientId + ")";
if (this.gradient || this.stops) {
this.gradientStops = this.getGradient();
this.hasGradient = true;
}
else {
this.hasGradient = false;
}
this.updatePathEl();
};
BarComponent.prototype.loadAnimation = function () {
this.path = this.getStartingPath();
setTimeout(this.update.bind(this), 100);
};
BarComponent.prototype.updatePathEl = function () {
var node = select(this.element).select('.bar');
var path = this.getPath();
if (this.animations) {
node.transition().duration(500)
.attr('d', path);
}
else {
node.attr('d', path);
}
};
BarComponent.prototype.getGradient = function () {
if (this.stops) {
return this.stops;
}
return [
{
offset: 0,
color: this.fill,
opacity: this.getStartOpacity()
},
{
offset: 100,
color: this.fill,
opacity: 1
}
];
};
BarComponent.prototype.getStartingPath = function () {
if (!this.animations) {
return this.getPath();
}
var radius = this.getRadius();
var path;
if (this.roundEdges) {
if (this.orientation === 'vertical') {
radius = Math.min(this.height, radius);
path = roundedRect(this.x, this.y + this.height, this.width, 1, 0, this.edges);
}
else if (this.orientation === 'horizontal') {
radius = Math.min(this.width, radius);
path = roundedRect(this.x, this.y, 1, this.height, 0, this.edges);
}
}
else {
if (this.orientation === 'vertical') {
path = roundedRect(this.x, this.y + this.height, this.width, 1, 0, this.edges);
}
else if (this.orientation === 'horizontal') {
path = roundedRect(this.x, this.y, 1, this.height, 0, this.edges);
}
}
return path;
};
BarComponent.prototype.getPath = function () {
var radius = this.getRadius();
var path;
if (this.roundEdges) {
if (this.orientation === 'vertical') {
radius = Math.min(this.height, radius);
path = roundedRect(this.x, this.y, this.width, this.height, radius, this.edges);
}
else if (this.orientation === 'horizontal') {
radius = Math.min(this.width, radius);
path = roundedRect(this.x, this.y, this.width, this.height, radius, this.edges);
}
}
else {
path = roundedRect(this.x, this.y, this.width, this.height, radius, this.edges);
}
return path;
};
BarComponent.prototype.getRadius = function () {
var radius = 0;
if (this.roundEdges && this.height > 5 && this.width > 5) {
radius = Math.floor(Math.min(5, this.height / 2, this.width / 2));
}
return radius;
};
BarComponent.prototype.getStartOpacity = function () {
if (this.roundEdges) {
return 0.2;
}
else {
return 0.5;
}
};
Object.defineProperty(BarComponent.prototype, "edges", {
get: function () {
var edges = [false, false, false, false];
if (this.roundEdges) {
if (this.orientation === 'vertical') {
if (this.data.value > 0) {
edges = [true, true, false, false];
}
else {
edges = [false, false, true, true];
}
}
else if (this.orientation === 'horizontal') {
if (this.data.value > 0) {
edges = [false, true, false, true];
}
else {
edges = [true, false, true, false];
}
}
}
return edges;
},
enumerable: true,
configurable: true
});
BarComponent.prototype.onMouseEnter = function () {
this.activate.emit(this.data);
};
BarComponent.prototype.onMouseLeave = function () {
this.deactivate.emit(this.data);
};
__decorate([
Input(),
__metadata("design:type", Object)
], BarComponent.prototype, "fill", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], BarComponent.prototype, "data", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], BarComponent.prototype, "width", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], BarComponent.prototype, "height", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], BarComponent.prototype, "x", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], BarComponent.prototype, "y", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], BarComponent.prototype, "orientation", void 0);
__decorate([
Input(),
__metadata("design:type", Boolean)
], BarComponent.prototype, "roundEdges", void 0);
__decorate([
Input(),
__metadata("design:type", Boolean)
], BarComponent.prototype, "gradient", void 0);
__decorate([
Input(),
__metadata("design:type", Object)
], BarComponent.prototype, "offset", void 0);
__decorate([
Input(),
__metadata("design:type", Boolean)
], BarComponent.prototype, "isActive", void 0);
__decorate([
Input(),
__metadata("design:type", Array)
], BarComponent.prototype, "stops", void 0);
__decorate([
Input(),
__metadata("design:type", Boolean)
], BarComponent.prototype, "animations", void 0);
__decorate([
Input(),
__metadata("design:type", String)
], BarComponent.prototype, "ariaLabel", void 0);
__decorate([
Output(),
__metadata("design:type", Object)
], BarComponent.prototype, "select", void 0);
__decorate([
Output(),
__metadata("design:type", Object)
], BarComponent.prototype, "activate", void 0);
__decorate([
Output(),
__metadata("design:type", Object)
], BarComponent.prototype, "deactivate", void 0);
__decorate([
HostListener('mouseenter'),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], BarComponent.prototype, "onMouseEnter", null);
__decorate([
HostListener('mouseleave'),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], BarComponent.prototype, "onMouseLeave", null);
BarComponent = __decorate([
Component({
selector: 'g[ngx-charts-bar]',
template: "\n <svg:defs *ngIf=\"hasGradient\">\n <svg:g ngx-charts-svg-linear-gradient\n [orientation]=\"orientation\"\n [name]=\"gradientId\"\n [stops]=\"gradientStops\"\n />\n </svg:defs>\n <svg:path\n class=\"bar\"\n stroke=\"none\"\n role=\"img\"\n tabIndex=\"-1\"\n [class.active]=\"isActive\"\n [attr.d]=\"path\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.fill]=\"hasGradient ? gradientFill : fill\"\n (click)=\"select.emit(data)\"\n />\n ",
changeDetection: ChangeDetectionStrategy.OnPush
}),
__metadata("design:paramtypes", [ElementRef])
], BarComponent);
return BarComponent;
}());
export { BarComponent };
//# sourceMappingURL=bar.component.js.map | {
"content_hash": "9d210464f66033ffc73a16269001f5e1",
"timestamp": "",
"source": "github",
"line_count": 263,
"max_line_length": 547,
"avg_line_length": 37.6425855513308,
"alnum_prop": 0.5258585858585859,
"repo_name": "friendsofagape/mt2414ui",
"id": "f979224eaeb2c6fdf6bdaaf40d5dadeedd6ddfd8",
"size": "9900",
"binary": false,
"copies": "1",
"ref": "refs/heads/AMTv2",
"path": "node_modules/@swimlane/ngx-charts/release/bar-chart/bar.component.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "10242"
},
{
"name": "HTML",
"bytes": "142509"
},
{
"name": "JavaScript",
"bytes": "2159"
},
{
"name": "TypeScript",
"bytes": "331761"
}
],
"symlink_target": ""
} |
[Single-page web applications][1] have been pretty much standard for quite a while, and I'm a strong advocate for
numerous reasons (reduced latency, separation of concerns and ease of testing to name a few).
However, one point I haven't felt too good about is client side rendering. It's ridiculous how cumbersome it is to
compile the template, render the data and finally manipulate the DOM. For example, with popular template engines like
[Handlebars][2] or [Mustache][3], you typically need do something like
```
<script id="entry-template" type="text/x-handlebars-template">
<div class="entry">
<h1>{{title}}</h1>
<div class="body">
{{body}}
</div>
</div>
</script>
```
```javascript
var data = {title: "My New Post", body: "This is my first post!"}
var source = $("#entry-template").html();
var template = Handlebars.compile(source);
var html = template(data);
$('container').empty().append(html);
```
Frustrated with the amount of labor, I decided to roll out my own and focus on simplicity. In this article,
I walk through some of the main design decisions and corresponding implementation. For the impatient, here's
[the demo site][4].
## No syntax, please!
I started with a modest goal: Given I have a static web page
```html
<div class="container">
<div class="hello"></div>
<div class="goodbye"></div>
</div>
```
and a simple JavaScript object
```javascript
data = {
hello: "Hi there!"
goodbye: "See ya!"
};
```
I want to render that on object on the page with a single function call. No template definition in script tags,
no extra markup, no manual DOM manipulation. So, when I call `$('.container').render(data);`, I should see the
following in the browser
```html
<div class="container">
<div class="hello">Hi there!</div>
<div class="goodbye">See ya!</div>
</div>
```
We'll, it turned out, that wasn't too hard to implement. DOM manipulation is the bread and butter of jQuery,
so all we need to do is
1. Iterate over the key-value pairs of the javascript objects
2. Render the value on the matching DOM element.
The initial implementation looked like something like this (in CoffeeScript):
```coffeescript
jQuery.fn.render = (data) ->
template = this
for key, value of data
for node in template.find(".#{key}")
node = jQuery(node)
children = node.children().detach()
node.text value
node.append children
```
## Getting rid of loops
The next logical step was support for collections. I wanted to keep the interface exactly the same, without explicit
loops or partials. Given an object like
```javascript
friends = [
{name: "Al Pacino"},
{name: "The Joker"}
]
```
And a web page like
```html
<ul class="container">
<li class="name"></li>
</ul>
```
When I call `$('.container').render(friends)`, I should see
```html
<ul class="container">
<li class="name">Al Pacino</li>
<li class="name">The Joker</li>
</ul>
```
Obviously, we need to extend the existing implementation with following steps
1. Iterate through the list of data objects
2. Take a new copy of the template for each object
3. Append the result to the DOM
```coffeescript
jQuery.fn.render = (data) ->
template = this.clone()
context = this
data = [data] unless jQuery.isArray(data)
context.empty()
for object in data
tmp = template.clone()
for key, value of data
for node in tmp.find(".#{key}")
node = jQuery(node)
children = node.children().detach()
node.text value
node.append children
context.append tmp.children()
```
It's worth noticing, that the rendering a single object is actually just an edge case of rendering a list of data
objects. That gives us an opportunity to generalize the edge case by encapsulating the single object into a list as
shown above.
## Do it again!
The previous implementation works, kind of. However, if you call `$('container').render(friends)` twice, it fails.
Result after the first call
```html
<ul class="container">
<li class="name">Al Pacino</li>
<li class="name">The Joker</li>
</ul>
```
Result after the second call
```html
<ul class="container">
<li class="name">Al Pacino</li>
<li class="name">Al Pacino</li>
<li class="name">The Joker</li>
<li class="name">The Joker</li>
</ul>
```
The reason is obvious. The current implementation finds two matching elements on the second call and renders
the name on the both elements. That sucks, because it means you'd have to manually keep the original templates in safe.
To avoid the problem, we need to
1. Cache the original template on the first `.render()`
2. Use the cached template on the successive calls
Luckily, thanks to jQuery `data()`, the functionality is trivial to implement.
```coffeescript
jQuery.fn.render = (data) ->
context = this
data = [data] unless jQuery.isArray(data)
context.data('template', context.clone()) unless context.data 'template'
context.empty()
for object in data
template = context.data('template').clone()
# Render values
for key, value of data
for node in tmp.find(".#{key}")
node = jQuery(node)
children = node.children().detach()
node.text value
node.append children
context.append template.children()
```
## My way or the highway
Rails has shown us how powerful it is to have strong conventions over configurations. Sometimes, however, you need to
do the things differently and then it helps to have all the power. In JavaScript, that means functions.
I wanted to be able to hook into rendering and define by functions how the rendering should happen. Common scenarios
would include, e.g., decorators and attribute assignment.
For example, given a template
```html
<div class="container">
<div class="name"></div>
</div>
```
I want be able render the following data object with the directive
```coffeescript
person = {
firstname: "Lucy",
lastname: "Lambda"
}
directives =
name: -> "#{@firstname} #{@lastname}"
$('.container').render person, directives
```
And the result should be
```html
<div class="container">
<div class="name">Lucy Lambda</div>
</div>
```
At first, implementing directives might seem like a daunting task, but given the flexibility and and power of
javascript functions and object literals, it isn't that bad. We only need to
1. Iterate over the key-function pairs of the directive object
2. Bind the function to the data object and execute it
3. Assign the return value to the matching DOM element
```coffeescript
jQuery.fn.render = (data, directives) ->
context = this
data = [data] unless jQuery.isArray(data)
context.data('template', context.clone()) unless context.data('template')
context.empty()
for object in data
template = context.data('template').clone()
# Render values
for key, value of data
for node in tmp.find(".#{key}")
renderNode node, value
# Render directives
for key, directive of directives
for node in template.find(".#{key}")
renderNode node, directive.call(object, node)
context.append template.children()
renderNode = (node, value) ->
node = jQuery(node)
children = node.children().detach()
node.text value
node.append children
```
## Generalizing to nested data objects, lists and directives
We'll, I bet you saw this coming. Why stop here, if we could easily support nested objects, lists and directives.
For each child object, we should do exactly same operations that we did for the parent object. Sounds like recursion
and, indeed, we need to add only couple of lines:
```coffeescript
jQuery.fn.render = (data, directives) ->
context = this
data = [data] unless jQuery.isArray(data)
context.data('template', context.clone()) unless context.data('template')
context.empty()
for object in data
template = context.data('template').clone()
# Render values
for key, value of data when typeof value != 'object'
for node in tmp.find(".#{key}")
renderNode node, value
# Render directives
for key, directive of directives when typeof directive == 'function'
for node in template.find(".#{key}")
renderNode node, directive.call(object, node)
# Render children
for key, value of object when typeof value == 'object'
template.find(".#{key}").render(value, directives[key])
context.append template.children()
renderNode = (node, value) ->
node = jQuery(node)
children = node.children().detach()
node.text value
node.append children
```
## Using Transparency in the real world applications
Writing Transparency has been a delightful experience. It gave me a chance to get my feet wet with node.js,
CoffeeScript, Jasmine and jQuery plugin development. At Leonidas, we've used it in a numerous projects in the past
couple of months, and so far, we've been happy with it.
The actual implementation is 66 lines of CoffeeScript, available at [GitHub][5]. If you want to give it a try,
check [the demo site][4]. To use it in your own application, grab the
[compiled and minified version](https://raw.github.com/leonidas/transparency/master/lib/jquery.transparency.min.js)
and include it to your application with jQuery
```html
<script src="js/jquery-1.7.1.min.js"></script>
<script src="js/jquery.transparency.min.js"></script>
```
Discussions regarding the article are at [Reddit](http://www.reddit.com/search?q=Implementing+Semantic+Anti-Templating+With+jQuery).
Cheers,
Jarno Keskikangas <[[email protected]](mailto://[email protected])>
Leonidas Oy <[http://leonidasoy.fi](http://leonidasoy.fi)>
[1]: http://en.wikipedia.org/wiki/Single-page_application
[2]: http://handlebarsjs.com/
[3]: http://mustache.github.com/
[4]: http://leonidas.github.com/transparency
[5]: http://github.com/leonidas/transparency | {
"content_hash": "098c559a076124d9fb8885dda55f32ce",
"timestamp": "",
"source": "github",
"line_count": 338,
"max_line_length": 132,
"avg_line_length": 29.275147928994084,
"alnum_prop": 0.7034866093986862,
"repo_name": "leonidas/codeblog",
"id": "a7c82b2dc5965611eaa462b3903583e95993b8c0",
"size": "9948",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "2012/2012-01-13-implementing-semantic-anti-templating-with-jquery.md",
"mode": "33188",
"license": "mit",
"language": [],
"symlink_target": ""
} |
/**
*/
package com.github.lbroudoux.dsl.eip.tests;
import com.github.lbroudoux.dsl.eip.EipFactory;
import com.github.lbroudoux.dsl.eip.Splitter;
import junit.textui.TestRunner;
/**
* <!-- begin-user-doc -->
* A test case for the model object '<em><b>Splitter</b></em>'.
* <!-- end-user-doc -->
* @generated
*/
public class SplitterTest extends MetadatableTest {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static void main(String[] args) {
TestRunner.run(SplitterTest.class);
}
/**
* Constructs a new Splitter test case with the given name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SplitterTest(String name) {
super(name);
}
/**
* Returns the fixture for this Splitter test case.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected Splitter getFixture() {
return (Splitter)fixture;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see junit.framework.TestCase#setUp()
* @generated
*/
@Override
protected void setUp() throws Exception {
setFixture(EipFactory.eINSTANCE.createSplitter());
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see junit.framework.TestCase#tearDown()
* @generated
*/
@Override
protected void tearDown() throws Exception {
setFixture(null);
}
} //SplitterTest
| {
"content_hash": "6c5339395512088f128899f9c24555a4",
"timestamp": "",
"source": "github",
"line_count": 69,
"max_line_length": 63,
"avg_line_length": 21.202898550724637,
"alnum_prop": 0.5933014354066986,
"repo_name": "lbroudoux/eip-designer",
"id": "ed30201bc1768d1c61c9514f08662969b6466035",
"size": "1463",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "plugins/com.github.lbroudoux.dsl.eip.tests/src/com/github/lbroudoux/dsl/eip/tests/SplitterTest.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "2309531"
}
],
"symlink_target": ""
} |
package org.mybatis.generator.config.xml;
import java.io.IOException;
import java.io.InputStream;
import org.mybatis.generator.codegen.XmlConstants;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
/**
* @author Jeff Butler
*/
public class ParserEntityResolver implements EntityResolver {
/**
*
*/
public ParserEntityResolver() {
super();
}
/*
* (non-Javadoc)
*
* @see org.xml.sax.EntityResolver#resolveEntity(java.lang.String,
* java.lang.String)
*/
public InputSource resolveEntity(String publicId, String systemId)
throws SAXException, IOException {
if (XmlConstants.IBATOR_CONFIG_PUBLIC_ID.equalsIgnoreCase(publicId)) {
InputStream is = getClass().getClassLoader().getResourceAsStream(
"org/mybatis/generator/config/xml/ibator-config_1_0.dtd"); //$NON-NLS-1$
InputSource ins = new InputSource(is);
return ins;
} else if (XmlConstants.MYBATIS_GENERATOR_CONFIG_PUBLIC_ID
.equalsIgnoreCase(publicId)) {
InputStream is = getClass()
.getClassLoader()
.getResourceAsStream(
"org/mybatis/generator/config/xml/mybatis-generator-config_1_0.dtd"); //$NON-NLS-1$
InputSource ins = new InputSource(is);
return ins;
} else {
return null;
}
}
}
| {
"content_hash": "4bead08bd3b71ba6eaa4d9507a5c19e2",
"timestamp": "",
"source": "github",
"line_count": 51,
"max_line_length": 111,
"avg_line_length": 29.254901960784313,
"alnum_prop": 0.6146112600536193,
"repo_name": "peterzhu1688/mybatis-generator-core-1.3.5-fix",
"id": "c62f708bcb007e3b2080e4ea8d9dcda1722c7521",
"size": "2161",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/main/java/org/mybatis/generator/config/xml/ParserEntityResolver.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "787"
},
{
"name": "HTML",
"bytes": "311383"
},
{
"name": "Java",
"bytes": "1659096"
}
],
"symlink_target": ""
} |
using System;
using System.Collections.Generic;
using System.Text.Json;
using System.Text.Json.Serialization;
using Azure.Core;
namespace Azure.Analytics.Synapse.Artifacts.Models
{
[JsonConverter(typeof(DataFlowDebugPackageConverter))]
public partial class DataFlowDebugPackage : IUtf8JsonSerializable
{
void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
{
writer.WriteStartObject();
if (Optional.IsDefined(SessionId))
{
writer.WritePropertyName("sessionId");
writer.WriteStringValue(SessionId);
}
if (Optional.IsDefined(DataFlow))
{
writer.WritePropertyName("dataFlow");
writer.WriteObjectValue(DataFlow);
}
if (Optional.IsCollectionDefined(DataFlows))
{
writer.WritePropertyName("dataFlows");
writer.WriteStartArray();
foreach (var item in DataFlows)
{
writer.WriteObjectValue(item);
}
writer.WriteEndArray();
}
if (Optional.IsCollectionDefined(Datasets))
{
writer.WritePropertyName("datasets");
writer.WriteStartArray();
foreach (var item in Datasets)
{
writer.WriteObjectValue(item);
}
writer.WriteEndArray();
}
if (Optional.IsCollectionDefined(LinkedServices))
{
writer.WritePropertyName("linkedServices");
writer.WriteStartArray();
foreach (var item in LinkedServices)
{
writer.WriteObjectValue(item);
}
writer.WriteEndArray();
}
if (Optional.IsDefined(Staging))
{
writer.WritePropertyName("staging");
writer.WriteObjectValue(Staging);
}
if (Optional.IsDefined(DebugSettings))
{
writer.WritePropertyName("debugSettings");
writer.WriteObjectValue(DebugSettings);
}
foreach (var item in AdditionalProperties)
{
writer.WritePropertyName(item.Key);
writer.WriteObjectValue(item.Value);
}
writer.WriteEndObject();
}
internal static DataFlowDebugPackage DeserializeDataFlowDebugPackage(JsonElement element)
{
Optional<string> sessionId = default;
Optional<DataFlowDebugResource> dataFlow = default;
Optional<IList<DataFlowDebugResource>> dataFlows = default;
Optional<IList<DatasetDebugResource>> datasets = default;
Optional<IList<LinkedServiceDebugResource>> linkedServices = default;
Optional<DataFlowStagingInfo> staging = default;
Optional<DataFlowDebugPackageDebugSettings> debugSettings = default;
IDictionary<string, object> additionalProperties = default;
Dictionary<string, object> additionalPropertiesDictionary = new Dictionary<string, object>();
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("sessionId"))
{
sessionId = property.Value.GetString();
continue;
}
if (property.NameEquals("dataFlow"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
property.ThrowNonNullablePropertyIsNull();
continue;
}
dataFlow = DataFlowDebugResource.DeserializeDataFlowDebugResource(property.Value);
continue;
}
if (property.NameEquals("dataFlows"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
property.ThrowNonNullablePropertyIsNull();
continue;
}
List<DataFlowDebugResource> array = new List<DataFlowDebugResource>();
foreach (var item in property.Value.EnumerateArray())
{
array.Add(DataFlowDebugResource.DeserializeDataFlowDebugResource(item));
}
dataFlows = array;
continue;
}
if (property.NameEquals("datasets"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
property.ThrowNonNullablePropertyIsNull();
continue;
}
List<DatasetDebugResource> array = new List<DatasetDebugResource>();
foreach (var item in property.Value.EnumerateArray())
{
array.Add(DatasetDebugResource.DeserializeDatasetDebugResource(item));
}
datasets = array;
continue;
}
if (property.NameEquals("linkedServices"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
property.ThrowNonNullablePropertyIsNull();
continue;
}
List<LinkedServiceDebugResource> array = new List<LinkedServiceDebugResource>();
foreach (var item in property.Value.EnumerateArray())
{
array.Add(LinkedServiceDebugResource.DeserializeLinkedServiceDebugResource(item));
}
linkedServices = array;
continue;
}
if (property.NameEquals("staging"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
property.ThrowNonNullablePropertyIsNull();
continue;
}
staging = DataFlowStagingInfo.DeserializeDataFlowStagingInfo(property.Value);
continue;
}
if (property.NameEquals("debugSettings"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
property.ThrowNonNullablePropertyIsNull();
continue;
}
debugSettings = DataFlowDebugPackageDebugSettings.DeserializeDataFlowDebugPackageDebugSettings(property.Value);
continue;
}
additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
}
additionalProperties = additionalPropertiesDictionary;
return new DataFlowDebugPackage(sessionId.Value, dataFlow.Value, Optional.ToList(dataFlows), Optional.ToList(datasets), Optional.ToList(linkedServices), staging.Value, debugSettings.Value, additionalProperties);
}
internal partial class DataFlowDebugPackageConverter : JsonConverter<DataFlowDebugPackage>
{
public override void Write(Utf8JsonWriter writer, DataFlowDebugPackage model, JsonSerializerOptions options)
{
writer.WriteObjectValue(model);
}
public override DataFlowDebugPackage Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
using var document = JsonDocument.ParseValue(ref reader);
return DeserializeDataFlowDebugPackage(document.RootElement);
}
}
}
}
| {
"content_hash": "5a81f42ec173bc40f9424744a42d8b86",
"timestamp": "",
"source": "github",
"line_count": 185,
"max_line_length": 223,
"avg_line_length": 43.05945945945946,
"alnum_prop": 0.5306301782575947,
"repo_name": "Azure/azure-sdk-for-net",
"id": "cc0c66c7a14f01e1732a9790f070e5eaef0bd004",
"size": "8104",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/DataFlowDebugPackage.Serialization.cs",
"mode": "33188",
"license": "mit",
"language": [],
"symlink_target": ""
} |
import { shallowMount } from '@vue/test-utils';
import EmptyState from 'new-dashboard/components/States/EmptyState';
describe('EmptyState.vue', () => {
it('should render correctly the empty state box', () => {
const text = 'There are no maps here.';
const subtitle = 'Here is the subtitle as well';
const emptyState = shallowMount(EmptyState, {
propsData: { text, subtitle },
slots: {
default: '<img src="test.svg"/>'
}
});
expect(emptyState).toMatchSnapshot();
});
});
| {
"content_hash": "d17beab2ecac8b6b78e648063a0e68bd",
"timestamp": "",
"source": "github",
"line_count": 18,
"max_line_length": 68,
"avg_line_length": 29.055555555555557,
"alnum_prop": 0.6290630975143403,
"repo_name": "CartoDB/cartodb",
"id": "c3006e7c7352a42d38086df6d8437901e6277c2a",
"size": "523",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/assets/test/spec/new-dashboard/unit/specs/components/States/EmptyState.spec.js",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "CSS",
"bytes": "7083"
},
{
"name": "EJS",
"bytes": "311401"
},
{
"name": "HTML",
"bytes": "6933668"
},
{
"name": "JavaScript",
"bytes": "9784580"
},
{
"name": "Jupyter Notebook",
"bytes": "47684"
},
{
"name": "Makefile",
"bytes": "14050"
},
{
"name": "Mustache",
"bytes": "30410"
},
{
"name": "PLpgSQL",
"bytes": "1233"
},
{
"name": "Procfile",
"bytes": "189"
},
{
"name": "Python",
"bytes": "10350"
},
{
"name": "Ruby",
"bytes": "6995180"
},
{
"name": "SCSS",
"bytes": "1454540"
},
{
"name": "Shell",
"bytes": "14538"
},
{
"name": "Smarty",
"bytes": "654458"
},
{
"name": "Vue",
"bytes": "755091"
}
],
"symlink_target": ""
} |
<program xmlns="http://ci.uchicago.edu/swift/2009/02/swiftscript"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<types>
<type>
<typename>markertype</typename>
<typealias>string</typealias>
<typestructure></typestructure>
</type>
</types>
</program>
| {
"content_hash": "756a1f239113c381b032e8a0207f2bce",
"timestamp": "",
"source": "github",
"line_count": 12,
"max_line_length": 65,
"avg_line_length": 30.416666666666668,
"alnum_prop": 0.6164383561643836,
"repo_name": "swift-lang/swift-k",
"id": "d10b2c595f7ac7dc465a0e2703af3066d34f806d",
"size": "365",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "tests/language/working-base/type-marker.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "3839"
},
{
"name": "C",
"bytes": "63095"
},
{
"name": "C++",
"bytes": "199455"
},
{
"name": "CSS",
"bytes": "66734"
},
{
"name": "GAP",
"bytes": "32217"
},
{
"name": "Gnuplot",
"bytes": "9817"
},
{
"name": "HTML",
"bytes": "86466"
},
{
"name": "Java",
"bytes": "6110466"
},
{
"name": "JavaScript",
"bytes": "736447"
},
{
"name": "M4",
"bytes": "3799"
},
{
"name": "Makefile",
"bytes": "17428"
},
{
"name": "Perl",
"bytes": "162187"
},
{
"name": "Perl 6",
"bytes": "31060"
},
{
"name": "Python",
"bytes": "60124"
},
{
"name": "Shell",
"bytes": "373931"
},
{
"name": "Swift",
"bytes": "163182"
},
{
"name": "Tcl",
"bytes": "10821"
}
],
"symlink_target": ""
} |
import { Fun } from '@ephox/katamari';
import { Css, Height, SugarElement } from '@ephox/sugar';
// applies the max-height as determined by Bounder
const setMaxHeight = (element: SugarElement<HTMLElement>, maxHeight: number): void => {
Height.setMax(element, Math.floor(maxHeight));
};
// adds both max-height and overflow to constrain it
const anchored = Fun.constant((element: SugarElement<HTMLElement>, available: number): void => {
setMaxHeight(element, available);
Css.setAll(element, {
'overflow-x': 'hidden',
'overflow-y': 'auto'
});
});
/*
* This adds max height, but not overflow - the effect of this is that elements can grow beyond the max height,
* but if they run off the top they're pushed down.
*
* If the element expands below the screen height it will be cut off, but we were already doing that.
*/
const expandable = Fun.constant((element: SugarElement<HTMLElement>, available: number): void => {
setMaxHeight(element, available);
});
export {
anchored,
expandable
};
| {
"content_hash": "49f269ec7a0f87b618959ba00c5c96fc",
"timestamp": "",
"source": "github",
"line_count": 31,
"max_line_length": 111,
"avg_line_length": 32.806451612903224,
"alnum_prop": 0.7109144542772862,
"repo_name": "tinymce/tinymce",
"id": "e30c22e5d3aa7386f9df954876125fa07b74d5d1",
"size": "1017",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "modules/alloy/src/main/ts/ephox/alloy/positioning/layout/MaxHeight.ts",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "9733"
},
{
"name": "HTML",
"bytes": "183264"
},
{
"name": "JavaScript",
"bytes": "117530"
},
{
"name": "Less",
"bytes": "182379"
},
{
"name": "TypeScript",
"bytes": "11764279"
}
],
"symlink_target": ""
} |
package com.bkromhout.minerva.data;
import javax.annotation.Nonnull;
import java.io.FilterInputStream;
import java.io.IOException;
import java.io.InputStream;
/**
* Hashes an input stream as it is read using the SHA-256 hashing algorithm.
* <p>
* All of the code in this class has been extracted and derived from the Guava library, and I lay no claim to it. I
* chose to extract this functionality so that I don't have to include the whole library in my app, since it's a huge
* dependency.
* <p>
* Guava's license file is located <a href="https://github.com/google/guava/blob/master/COPYING">here</a>, and the
* appropriate license header has been retained in this file, citing all years which were cited in the original files
* this code was derived from at the time of derivation.
* @see SHA256HashFunction
*/
class HashingInputStream extends FilterInputStream {
private final SHA256HashFunction.MessageDigestHasher hasher;
/**
* Constructs a new {@code FilterInputStream} with the specified input stream as source.
* <p>
* <p><strong>Warning:</strong> passing a null source creates an invalid {@code FilterInputStream}, that fails on
* every method that is not overridden. Subclasses should check for null in their constructors.
* @param in the input stream to filter reads on.
*/
HashingInputStream(InputStream in) {
super(in);
hasher = new SHA256HashFunction().newHasher();
}
/**
* Reads the next byte of data from the underlying input stream and updates the hasher with the byte read.
*/
@Override
public int read() throws IOException {
int b = in.read();
if (b != -1) {
hasher.putByte((byte) b);
}
return b;
}
/**
* Reads the specified bytes of data from the underlying input stream and updates the hasher with the bytes read.
*/
@Override
public int read(@Nonnull byte[] bytes, int off, int len) throws IOException {
int numOfBytesRead = in.read(bytes, off, len);
if (numOfBytesRead != -1) hasher.putBytes(bytes, off, numOfBytesRead);
return numOfBytesRead;
}
/**
* mark() is not supported for HashingInputStream
* @return {@code false} always
*/
@Override
public boolean markSupported() {
return false;
}
/**
* mark() is not supported for HashingInputStream
*/
@Override
public void mark(int readlimit) {}
/**
* reset() is not supported for HashingInputStream.
* @throws IOException this operation is not supported
*/
@Override
public void reset() throws IOException {
throw new IOException("reset not supported");
}
/**
* Returns the {@link com.bkromhout.minerva.data.SHA256HashFunction.BytesHashCode} based on the data read from this
* stream. The result is unspecified if this method is called more than once on the same instance.
*/
SHA256HashFunction.BytesHashCode hash() {
return hasher.hash();
}
}
| {
"content_hash": "2edd5c87c5a34716716a036c6f87c04d",
"timestamp": "",
"source": "github",
"line_count": 90,
"max_line_length": 119,
"avg_line_length": 33.93333333333333,
"alnum_prop": 0.6728880157170923,
"repo_name": "bkromhout/Minerva",
"id": "231485d613264a89fc36c8683b87660cbc49a15c",
"size": "3648",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/src/main/java/com/bkromhout/minerva/data/HashingInputStream.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "631648"
}
],
"symlink_target": ""
} |
using System.ComponentModel.DataAnnotations;
using Orchard.ContentManagement;
using Orchard.ContentManagement.Records;
using Orchard.Core.Common.Utilities;
using Orchard.Data.Conventions;
namespace Onestop.Seo.Models {
public class SeoPart : ContentPart<SeoPartRecord> {
private readonly LazyField<string> _generatedTitle = new LazyField<string>();
public LazyField<string> GeneratedTitleField { get { return _generatedTitle; } }
public string GeneratedTitle {
get { return _generatedTitle.Value; }
}
private readonly LazyField<string> _generatedDescription = new LazyField<string>();
public LazyField<string> GeneratedDescriptionField { get { return _generatedDescription; } }
public string GeneratedDescription {
get { return _generatedDescription.Value; }
}
private readonly LazyField<string> _generatedKeywords = new LazyField<string>();
public LazyField<string> GeneratedKeywordsField { get { return _generatedKeywords; } }
public string GeneratedKeywords {
get { return _generatedKeywords.Value; }
}
public string TitleOverride {
get { return Record.TitleOverride; }
set { Record.TitleOverride = value; }
}
public string DescriptionOverride {
get { return Record.DescriptionOverride; }
set { Record.DescriptionOverride = value; }
}
public string KeywordsOverride {
get { return Record.KeywordsOverride; }
set { Record.KeywordsOverride = value; }
}
}
public class SeoPartRecord : ContentPartVersionRecord {
[StringLength(1024)]
public virtual string TitleOverride { get; set; }
[StringLengthMax]
public virtual string DescriptionOverride { get; set; }
[StringLengthMax]
public virtual string KeywordsOverride { get; set; }
}
} | {
"content_hash": "09c4ef8429cbd58314300d672c53d964",
"timestamp": "",
"source": "github",
"line_count": 53,
"max_line_length": 100,
"avg_line_length": 36.924528301886795,
"alnum_prop": 0.6622381195707716,
"repo_name": "CloudMetal/CloudMetal-Pipeline-Deploy",
"id": "39d5df9f1c2e72a3d9674dc0af538ad316935f67",
"size": "1959",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "Modules/OneStop.Seo/Models/SeoPart.cs",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "ASP",
"bytes": "102"
},
{
"name": "C#",
"bytes": "2221073"
},
{
"name": "JavaScript",
"bytes": "822981"
}
],
"symlink_target": ""
} |
namespace Microsoft.Graph
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
/// <summary>
/// The type WorkbookFunctionsGeStepRequestBody.
/// </summary>
[DataContract]
public partial class WorkbookFunctionsGeStepRequestBody
{
/// <summary>
/// Gets or sets Number.
/// </summary>
[DataMember(Name = "number", EmitDefaultValue = false, IsRequired = false)]
public Newtonsoft.Json.Linq.JToken Number { get; set; }
/// <summary>
/// Gets or sets Step.
/// </summary>
[DataMember(Name = "step", EmitDefaultValue = false, IsRequired = false)]
public Newtonsoft.Json.Linq.JToken Step { get; set; }
}
}
| {
"content_hash": "49648f026cdab2dfdc2c804477cf9411",
"timestamp": "",
"source": "github",
"line_count": 28,
"max_line_length": 83,
"avg_line_length": 28.214285714285715,
"alnum_prop": 0.6025316455696202,
"repo_name": "garethj-msft/msgraph-sdk-dotnet",
"id": "bb4d7495cb42f6340af631e30b2f824a3b0d5b7a",
"size": "1194",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/Microsoft.Graph/Models/Generated/WorkbookFunctionsGeStepRequestBody.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "9032877"
},
{
"name": "Smalltalk",
"bytes": "12638"
}
],
"symlink_target": ""
} |
the spider agent watchdog and job dispatcher
| {
"content_hash": "93b0668b5c6d73c4f89f584fc7be922a",
"timestamp": "",
"source": "github",
"line_count": 1,
"max_line_length": 44,
"avg_line_length": 45,
"alnum_prop": 0.8444444444444444,
"repo_name": "spiderjs/watchdog",
"id": "f44da7143ca9b71589e59f97b5516c9d31481133",
"size": "56",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "README.md",
"mode": "33188",
"license": "mit",
"language": [],
"symlink_target": ""
} |
'use strict';
module.exports = function($allonsy) {
$allonsy.outputInfo('► sockets:\n');
var path = require('path');
require(path.resolve(__dirname, 'models/socketio-service-back.js'))();
var $SocketIOService = DependencyInjection.injector.controller.get('$SocketIOService'),
child = $allonsy.childByName('Allons-y Express');
if (!child || !child.processes || !child.processes.length) {
$allonsy.outputInfo(' No Express server started');
}
$allonsy.outputInfo(' Sockets max per server: ' + parseInt(process.env.SOCKETIO_MAX || 1000, 10) + '\n');
child.processes.forEach(function(p) {
var socketsData = $SocketIOService.processSockets(p) || {
sockets: 0,
socketsReserved: 0
};
$allonsy.output([
' ∙ [', $allonsy.textInfo(p.name), ' #', p.id, '] ',
'(', $allonsy.textWarning(socketsData.url), ') ',
'sockets: ', $allonsy.textWarning(socketsData.sockets),
', reserved: ', $allonsy.textWarning(socketsData.socketsReserved)
].join(''), '\n');
});
};
| {
"content_hash": "ebee9b43c48698d39beca11c68b204ac",
"timestamp": "",
"source": "github",
"line_count": 32,
"max_line_length": 108,
"avg_line_length": 32.375,
"alnum_prop": 0.637065637065637,
"repo_name": "CodeCorico/allons-y-socketio",
"id": "a59098e7e9f90222030b6153ef90dbea06c38170",
"size": "1040",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "features/socketio/socketio-live-commands.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "11846"
}
],
"symlink_target": ""
} |
if(!dojo._hasResource["dojo._base.html"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojo._base.html"] = true;
dojo.require("dojo._base.lang");
dojo.provide("dojo._base.html");
// FIXME: need to add unit tests for all the semi-public methods
try{
document.execCommand("BackgroundImageCache", false, true);
}catch(e){
// sane browsers don't have cache "issues"
}
// =============================
// DOM Functions
// =============================
/*=====
dojo.byId = function(id, doc){
// summary:
// Returns DOM node with matching `id` attribute or `null`
// if not found. If `id` is a DomNode, this function is a no-op.
//
// id: String|DOMNode
// A string to match an HTML id attribute or a reference to a DOM Node
//
// doc: Document?
// Document to work in. Defaults to the current value of
// dojo.doc. Can be used to retrieve
// node references from other documents.
//
// example:
// Look up a node by ID:
// | var n = dojo.byId("foo");
//
// example:
// Check if a node exists, and use it.
// | var n = dojo.byId("bar");
// | if(n){ doStuff() ... }
//
// example:
// Allow string or DomNode references to be passed to a custom function:
// | var foo = function(nodeOrId){
// | nodeOrId = dojo.byId(nodeOrId);
// | // ... more stuff
// | }
=====*/
if(dojo.isIE || dojo.isOpera){
dojo.byId = function(id, doc){
if(typeof id != "string"){
return id;
}
var _d = doc || dojo.doc, te = _d.getElementById(id);
// attributes.id.value is better than just id in case the
// user has a name=id inside a form
if(te && (te.attributes.id.value == id || te.id == id)){
return te;
}else{
var eles = _d.all[id];
if(!eles || eles.nodeName){
eles = [eles];
}
// if more than 1, choose first with the correct id
var i=0;
while((te=eles[i++])){
if((te.attributes && te.attributes.id && te.attributes.id.value == id)
|| te.id == id){
return te;
}
}
}
};
}else{
dojo.byId = function(id, doc){
// inline'd type check
return (typeof id == "string") ? (doc || dojo.doc).getElementById(id) : id; // DomNode
};
}
/*=====
};
=====*/
(function(){
var d = dojo;
var byId = d.byId;
var _destroyContainer = null,
_destroyDoc;
d.addOnWindowUnload(function(){
_destroyContainer = null; //prevent IE leak
});
/*=====
dojo._destroyElement = function(node){
// summary:
// Existing alias for `dojo.destroy`. Deprecated, will be removed
// in 2.0
}
=====*/
dojo._destroyElement = dojo.destroy = function(/*String|DomNode*/node){
// summary:
// Removes a node from its parent, clobbering it and all of its
// children.
//
// description:
// Removes a node from its parent, clobbering it and all of its
// children. Function only works with DomNodes, and returns nothing.
//
// node:
// A String ID or DomNode reference of the element to be destroyed
//
// example:
// Destroy a node byId:
// | dojo.destroy("someId");
//
// example:
// Destroy all nodes in a list by reference:
// | dojo.query(".someNode").forEach(dojo.destroy);
node = byId(node);
try{
var doc = node.ownerDocument;
// cannot use _destroyContainer.ownerDocument since this can throw an exception on IE
if(!_destroyContainer || _destroyDoc != doc){
_destroyContainer = doc.createElement("div");
_destroyDoc = doc;
}
_destroyContainer.appendChild(node.parentNode ? node.parentNode.removeChild(node) : node);
// NOTE: see http://trac.dojotoolkit.org/ticket/2931. This may be a bug and not a feature
_destroyContainer.innerHTML = "";
}catch(e){
/* squelch */
}
};
dojo.isDescendant = function(/*DomNode|String*/node, /*DomNode|String*/ancestor){
// summary:
// Returns true if node is a descendant of ancestor
// node: string id or node reference to test
// ancestor: string id or node reference of potential parent to test against
//
// example:
// Test is node id="bar" is a descendant of node id="foo"
// | if(dojo.isDescendant("bar", "foo")){ ... }
try{
node = byId(node);
ancestor = byId(ancestor);
while(node){
if(node == ancestor){
return true; // Boolean
}
node = node.parentNode;
}
}catch(e){ /* squelch, return false */ }
return false; // Boolean
};
dojo.setSelectable = function(/*DomNode|String*/node, /*Boolean*/selectable){
// summary:
// Enable or disable selection on a node
// node:
// id or reference to node
// selectable:
// state to put the node in. false indicates unselectable, true
// allows selection.
// example:
// Make the node id="bar" unselectable
// | dojo.setSelectable("bar");
// example:
// Make the node id="bar" selectable
// | dojo.setSelectable("bar", true);
node = byId(node);
if(d.isMozilla){
node.style.MozUserSelect = selectable ? "" : "none";
}else if(d.isKhtml || d.isWebKit){
node.style.KhtmlUserSelect = selectable ? "auto" : "none";
}else if(d.isIE){
var v = (node.unselectable = selectable ? "" : "on");
d.query("*", node).forEach("item.unselectable = '"+v+"'");
}
//FIXME: else? Opera?
};
var _insertBefore = function(/*DomNode*/node, /*DomNode*/ref){
var parent = ref.parentNode;
if(parent){
parent.insertBefore(node, ref);
}
};
var _insertAfter = function(/*DomNode*/node, /*DomNode*/ref){
// summary:
// Try to insert node after ref
var parent = ref.parentNode;
if(parent){
if(parent.lastChild == ref){
parent.appendChild(node);
}else{
parent.insertBefore(node, ref.nextSibling);
}
}
};
dojo.place = function(node, refNode, position){
// summary:
// Attempt to insert node into the DOM, choosing from various positioning options.
// Returns the first argument resolved to a DOM node.
//
// node: String|DomNode
// id or node reference, or HTML fragment starting with "<" to place relative to refNode
//
// refNode: String|DomNode
// id or node reference to use as basis for placement
//
// position: String|Number?
// string noting the position of node relative to refNode or a
// number indicating the location in the childNodes collection of refNode.
// Accepted string values are:
// | * before
// | * after
// | * replace
// | * only
// | * first
// | * last
// "first" and "last" indicate positions as children of refNode, "replace" replaces refNode,
// "only" replaces all children. position defaults to "last" if not specified
//
// returns: DomNode
// Returned values is the first argument resolved to a DOM node.
//
// .place() is also a method of `dojo.NodeList`, allowing `dojo.query` node lookups.
//
// example:
// Place a node by string id as the last child of another node by string id:
// | dojo.place("someNode", "anotherNode");
//
// example:
// Place a node by string id before another node by string id
// | dojo.place("someNode", "anotherNode", "before");
//
// example:
// Create a Node, and place it in the body element (last child):
// | dojo.place("<div></div>", dojo.body());
//
// example:
// Put a new LI as the first child of a list by id:
// | dojo.place("<li></li>", "someUl", "first");
refNode = byId(refNode);
if(typeof node == "string"){ // inline'd type check
node = node.charAt(0) == "<" ? d._toDom(node, refNode.ownerDocument) : byId(node);
}
if(typeof position == "number"){ // inline'd type check
var cn = refNode.childNodes;
if(!cn.length || cn.length <= position){
refNode.appendChild(node);
}else{
_insertBefore(node, cn[position < 0 ? 0 : position]);
}
}else{
switch(position){
case "before":
_insertBefore(node, refNode);
break;
case "after":
_insertAfter(node, refNode);
break;
case "replace":
refNode.parentNode.replaceChild(node, refNode);
break;
case "only":
d.empty(refNode);
refNode.appendChild(node);
break;
case "first":
if(refNode.firstChild){
_insertBefore(node, refNode.firstChild);
break;
}
// else fallthrough...
default: // aka: last
refNode.appendChild(node);
}
}
return node; // DomNode
}
// Box functions will assume this model.
// On IE/Opera, BORDER_BOX will be set if the primary document is in quirks mode.
// Can be set to change behavior of box setters.
// can be either:
// "border-box"
// "content-box" (default)
dojo.boxModel = "content-box";
// We punt per-node box mode testing completely.
// If anybody cares, we can provide an additional (optional) unit
// that overrides existing code to include per-node box sensitivity.
// Opera documentation claims that Opera 9 uses border-box in BackCompat mode.
// but experiments (Opera 9.10.8679 on Windows Vista) indicate that it actually continues to use content-box.
// IIRC, earlier versions of Opera did in fact use border-box.
// Opera guys, this is really confusing. Opera being broken in quirks mode is not our fault.
if(d.isIE /*|| dojo.isOpera*/){
// client code may have to adjust if compatMode varies across iframes
d.boxModel = document.compatMode == "BackCompat" ? "border-box" : "content-box";
}
// =============================
// Style Functions
// =============================
// getComputedStyle drives most of the style code.
// Wherever possible, reuse the returned object.
//
// API functions below that need to access computed styles accept an
// optional computedStyle parameter.
// If this parameter is omitted, the functions will call getComputedStyle themselves.
// This way, calling code can access computedStyle once, and then pass the reference to
// multiple API functions.
/*=====
dojo.getComputedStyle = function(node){
// summary:
// Returns a "computed style" object.
//
// description:
// Gets a "computed style" object which can be used to gather
// information about the current state of the rendered node.
//
// Note that this may behave differently on different browsers.
// Values may have different formats and value encodings across
// browsers.
//
// Note also that this method is expensive. Wherever possible,
// reuse the returned object.
//
// Use the dojo.style() method for more consistent (pixelized)
// return values.
//
// node: DOMNode
// A reference to a DOM node. Does NOT support taking an
// ID string for speed reasons.
// example:
// | dojo.getComputedStyle(dojo.byId('foo')).borderWidth;
//
// example:
// Reusing the returned object, avoiding multiple lookups:
// | var cs = dojo.getComputedStyle(dojo.byId("someNode"));
// | var w = cs.width, h = cs.height;
return; // CSS2Properties
}
=====*/
// Although we normally eschew argument validation at this
// level, here we test argument 'node' for (duck)type,
// by testing nodeType, ecause 'document' is the 'parentNode' of 'body'
// it is frequently sent to this function even
// though it is not Element.
var gcs;
if(d.isWebKit){
gcs = function(/*DomNode*/node){
var s;
if(node.nodeType == 1){
var dv = node.ownerDocument.defaultView;
s = dv.getComputedStyle(node, null);
if(!s && node.style){
node.style.display = "";
s = dv.getComputedStyle(node, null);
}
}
return s || {};
};
}else if(d.isIE){
gcs = function(node){
// IE (as of 7) doesn't expose Element like sane browsers
return node.nodeType == 1 /* ELEMENT_NODE*/ ? node.currentStyle : {};
};
}else{
gcs = function(node){
return node.nodeType == 1 ?
node.ownerDocument.defaultView.getComputedStyle(node, null) : {};
};
}
dojo.getComputedStyle = gcs;
if(!d.isIE){
d._toPixelValue = function(element, value){
// style values can be floats, client code may want
// to round for integer pixels.
return parseFloat(value) || 0;
};
}else{
d._toPixelValue = function(element, avalue){
if(!avalue){ return 0; }
// on IE7, medium is usually 4 pixels
if(avalue == "medium"){ return 4; }
// style values can be floats, client code may
// want to round this value for integer pixels.
if(avalue.slice && avalue.slice(-2) == 'px'){ return parseFloat(avalue); }
with(element){
var sLeft = style.left;
var rsLeft = runtimeStyle.left;
runtimeStyle.left = currentStyle.left;
try{
// 'avalue' may be incompatible with style.left, which can cause IE to throw
// this has been observed for border widths using "thin", "medium", "thick" constants
// those particular constants could be trapped by a lookup
// but perhaps there are more
style.left = avalue;
avalue = style.pixelLeft;
}catch(e){
avalue = 0;
}
style.left = sLeft;
runtimeStyle.left = rsLeft;
}
return avalue;
}
}
var px = d._toPixelValue;
// FIXME: there opacity quirks on FF that we haven't ported over. Hrm.
/*=====
dojo._getOpacity = function(node){
// summary:
// Returns the current opacity of the passed node as a
// floating-point value between 0 and 1.
// node: DomNode
// a reference to a DOM node. Does NOT support taking an
// ID string for speed reasons.
// returns: Number between 0 and 1
return; // Number
}
=====*/
var astr = "DXImageTransform.Microsoft.Alpha";
var af = function(n, f){
try{
return n.filters.item(astr);
}catch(e){
return f ? {} : null;
}
};
dojo._getOpacity =
d.isIE ? function(node){
try{
return af(node).Opacity / 100; // Number
}catch(e){
return 1; // Number
}
} :
function(node){
return gcs(node).opacity;
};
/*=====
dojo._setOpacity = function(node, opacity){
// summary:
// set the opacity of the passed node portably. Returns the
// new opacity of the node.
// node: DOMNode
// a reference to a DOM node. Does NOT support taking an
// ID string for performance reasons.
// opacity: Number
// A Number between 0 and 1. 0 specifies transparent.
// returns: Number between 0 and 1
return; // Number
}
=====*/
dojo._setOpacity =
d.isIE ? function(/*DomNode*/node, /*Number*/opacity){
var ov = opacity * 100, opaque = opacity == 1;
node.style.zoom = opaque ? "" : 1;
if(!af(node)){
if(opaque){
return opacity;
}
node.style.filter += " progid:" + astr + "(Opacity=" + ov + ")";
}else{
af(node, 1).Opacity = ov;
}
// on IE7 Alpha(Filter opacity=100) makes text look fuzzy so disable it altogether (bug #2661),
//but still update the opacity value so we can get a correct reading if it is read later.
af(node, 1).Enabled = !opaque;
if(node.nodeName.toLowerCase() == "tr"){
d.query("> td", node).forEach(function(i){
d._setOpacity(i, opacity);
});
}
return opacity;
} :
function(node, opacity){
return node.style.opacity = opacity;
};
var _pixelNamesCache = {
left: true, top: true
};
var _pixelRegExp = /margin|padding|width|height|max|min|offset/; // |border
var _toStyleValue = function(node, type, value){
type = type.toLowerCase(); // FIXME: should we really be doing string case conversion here? Should we cache it? Need to profile!
if(d.isIE){
if(value == "auto"){
if(type == "height"){ return node.offsetHeight; }
if(type == "width"){ return node.offsetWidth; }
}
if(type == "fontweight"){
switch(value){
case 700: return "bold";
case 400:
default: return "normal";
}
}
}
if(!(type in _pixelNamesCache)){
_pixelNamesCache[type] = _pixelRegExp.test(type);
}
return _pixelNamesCache[type] ? px(node, value) : value;
};
var _floatStyle = d.isIE ? "styleFloat" : "cssFloat",
_floatAliases = { "cssFloat": _floatStyle, "styleFloat": _floatStyle, "float": _floatStyle }
;
// public API
dojo.style = function( /*DomNode|String*/ node,
/*String?|Object?*/ style,
/*String?*/ value){
// summary:
// Accesses styles on a node. If 2 arguments are
// passed, acts as a getter. If 3 arguments are passed, acts
// as a setter.
// description:
// Getting the style value uses the computed style for the node, so the value
// will be a calculated value, not just the immediate node.style value.
// Also when getting values, use specific style names,
// like "borderBottomWidth" instead of "border" since compound values like
// "border" are not necessarily reflected as expected.
// If you want to get node dimensions, use `dojo.marginBox()`,
// `dojo.contentBox()` or `dojo.position()`.
// node:
// id or reference to node to get/set style for
// style:
// the style property to set in DOM-accessor format
// ("borderWidth", not "border-width") or an object with key/value
// pairs suitable for setting each property.
// value:
// If passed, sets value on the node for style, handling
// cross-browser concerns. When setting a pixel value,
// be sure to include "px" in the value. For instance, top: "200px".
// Otherwise, in some cases, some browsers will not apply the style.
// example:
// Passing only an ID or node returns the computed style object of
// the node:
// | dojo.style("thinger");
// example:
// Passing a node and a style property returns the current
// normalized, computed value for that property:
// | dojo.style("thinger", "opacity"); // 1 by default
//
// example:
// Passing a node, a style property, and a value changes the
// current display of the node and returns the new computed value
// | dojo.style("thinger", "opacity", 0.5); // == 0.5
//
// example:
// Passing a node, an object-style style property sets each of the values in turn and returns the computed style object of the node:
// | dojo.style("thinger", {
// | "opacity": 0.5,
// | "border": "3px solid black",
// | "height": "300px"
// | });
//
// example:
// When the CSS style property is hyphenated, the JavaScript property is camelCased.
// font-size becomes fontSize, and so on.
// | dojo.style("thinger",{
// | fontSize:"14pt",
// | letterSpacing:"1.2em"
// | });
//
// example:
// dojo.NodeList implements .style() using the same syntax, omitting the "node" parameter, calling
// dojo.style() on every element of the list. See: `dojo.query()` and `dojo.NodeList()`
// | dojo.query(".someClassName").style("visibility","hidden");
// | // or
// | dojo.query("#baz > div").style({
// | opacity:0.75,
// | fontSize:"13pt"
// | });
var n = byId(node), args = arguments.length, op = (style == "opacity");
style = _floatAliases[style] || style;
if(args == 3){
return op ? d._setOpacity(n, value) : n.style[style] = value; /*Number*/
}
if(args == 2 && op){
return d._getOpacity(n);
}
var s = gcs(n);
if(args == 2 && typeof style != "string"){ // inline'd type check
for(var x in style){
d.style(node, x, style[x]);
}
return s;
}
return (args == 1) ? s : _toStyleValue(n, style, s[style] || n.style[style]); /* CSS2Properties||String||Number */
}
// =============================
// Box Functions
// =============================
dojo._getPadExtents = function(/*DomNode*/n, /*Object*/computedStyle){
// summary:
// Returns object with special values specifically useful for node
// fitting.
// description:
// Returns an object with `w`, `h`, `l`, `t` properties:
// | l/t = left/top padding (respectively)
// | w = the total of the left and right padding
// | h = the total of the top and bottom padding
// If 'node' has position, l/t forms the origin for child nodes.
// The w/h are used for calculating boxes.
// Normally application code will not need to invoke this
// directly, and will use the ...box... functions instead.
var
s = computedStyle||gcs(n),
l = px(n, s.paddingLeft),
t = px(n, s.paddingTop);
return {
l: l,
t: t,
w: l+px(n, s.paddingRight),
h: t+px(n, s.paddingBottom)
};
}
dojo._getBorderExtents = function(/*DomNode*/n, /*Object*/computedStyle){
// summary:
// returns an object with properties useful for noting the border
// dimensions.
// description:
// * l/t = the sum of left/top border (respectively)
// * w = the sum of the left and right border
// * h = the sum of the top and bottom border
//
// The w/h are used for calculating boxes.
// Normally application code will not need to invoke this
// directly, and will use the ...box... functions instead.
var
ne = "none",
s = computedStyle||gcs(n),
bl = (s.borderLeftStyle != ne ? px(n, s.borderLeftWidth) : 0),
bt = (s.borderTopStyle != ne ? px(n, s.borderTopWidth) : 0);
return {
l: bl,
t: bt,
w: bl + (s.borderRightStyle!=ne ? px(n, s.borderRightWidth) : 0),
h: bt + (s.borderBottomStyle!=ne ? px(n, s.borderBottomWidth) : 0)
};
}
dojo._getPadBorderExtents = function(/*DomNode*/n, /*Object*/computedStyle){
// summary:
// Returns object with properties useful for box fitting with
// regards to padding.
// description:
// * l/t = the sum of left/top padding and left/top border (respectively)
// * w = the sum of the left and right padding and border
// * h = the sum of the top and bottom padding and border
//
// The w/h are used for calculating boxes.
// Normally application code will not need to invoke this
// directly, and will use the ...box... functions instead.
var
s = computedStyle||gcs(n),
p = d._getPadExtents(n, s),
b = d._getBorderExtents(n, s);
return {
l: p.l + b.l,
t: p.t + b.t,
w: p.w + b.w,
h: p.h + b.h
};
}
dojo._getMarginExtents = function(n, computedStyle){
// summary:
// returns object with properties useful for box fitting with
// regards to box margins (i.e., the outer-box).
//
// * l/t = marginLeft, marginTop, respectively
// * w = total width, margin inclusive
// * h = total height, margin inclusive
//
// The w/h are used for calculating boxes.
// Normally application code will not need to invoke this
// directly, and will use the ...box... functions instead.
var
s = computedStyle||gcs(n),
l = px(n, s.marginLeft),
t = px(n, s.marginTop),
r = px(n, s.marginRight),
b = px(n, s.marginBottom);
if(d.isWebKit && (s.position != "absolute")){
// FIXME: Safari's version of the computed right margin
// is the space between our right edge and the right edge
// of our offsetParent.
// What we are looking for is the actual margin value as
// determined by CSS.
// Hack solution is to assume left/right margins are the same.
r = l;
}
return {
l: l,
t: t,
w: l+r,
h: t+b
};
}
// Box getters work in any box context because offsetWidth/clientWidth
// are invariant wrt box context
//
// They do *not* work for display: inline objects that have padding styles
// because the user agent ignores padding (it's bogus styling in any case)
//
// Be careful with IMGs because they are inline or block depending on
// browser and browser mode.
// Although it would be easier to read, there are not separate versions of
// _getMarginBox for each browser because:
// 1. the branching is not expensive
// 2. factoring the shared code wastes cycles (function call overhead)
// 3. duplicating the shared code wastes bytes
dojo._getMarginBox = function(/*DomNode*/node, /*Object*/computedStyle){
// summary:
// returns an object that encodes the width, height, left and top
// positions of the node's margin box.
var s = computedStyle || gcs(node), me = d._getMarginExtents(node, s);
var l = node.offsetLeft - me.l, t = node.offsetTop - me.t, p = node.parentNode;
if(d.isMoz){
// Mozilla:
// If offsetParent has a computed overflow != visible, the offsetLeft is decreased
// by the parent's border.
// We don't want to compute the parent's style, so instead we examine node's
// computed left/top which is more stable.
var sl = parseFloat(s.left), st = parseFloat(s.top);
if(!isNaN(sl) && !isNaN(st)){
l = sl, t = st;
}else{
// If child's computed left/top are not parseable as a number (e.g. "auto"), we
// have no choice but to examine the parent's computed style.
if(p && p.style){
var pcs = gcs(p);
if(pcs.overflow != "visible"){
var be = d._getBorderExtents(p, pcs);
l += be.l, t += be.t;
}
}
}
}else if(d.isOpera || (d.isIE > 7 && !d.isQuirks)){
// On Opera and IE 8, offsetLeft/Top includes the parent's border
if(p){
be = d._getBorderExtents(p);
l -= be.l;
t -= be.t;
}
}
return {
l: l,
t: t,
w: node.offsetWidth + me.w,
h: node.offsetHeight + me.h
};
}
dojo._getContentBox = function(node, computedStyle){
// summary:
// Returns an object that encodes the width, height, left and top
// positions of the node's content box, irrespective of the
// current box model.
// clientWidth/Height are important since the automatically account for scrollbars
// fallback to offsetWidth/Height for special cases (see #3378)
var s = computedStyle || gcs(node),
pe = d._getPadExtents(node, s),
be = d._getBorderExtents(node, s),
w = node.clientWidth,
h
;
if(!w){
w = node.offsetWidth, h = node.offsetHeight;
}else{
h = node.clientHeight, be.w = be.h = 0;
}
// On Opera, offsetLeft includes the parent's border
if(d.isOpera){ pe.l += be.l; pe.t += be.t; };
return {
l: pe.l,
t: pe.t,
w: w - pe.w - be.w,
h: h - pe.h - be.h
};
}
dojo._getBorderBox = function(node, computedStyle){
var s = computedStyle || gcs(node),
pe = d._getPadExtents(node, s),
cb = d._getContentBox(node, s)
;
return {
l: cb.l - pe.l,
t: cb.t - pe.t,
w: cb.w + pe.w,
h: cb.h + pe.h
};
}
// Box setters depend on box context because interpretation of width/height styles
// vary wrt box context.
//
// The value of dojo.boxModel is used to determine box context.
// dojo.boxModel can be set directly to change behavior.
//
// Beware of display: inline objects that have padding styles
// because the user agent ignores padding (it's a bogus setup anyway)
//
// Be careful with IMGs because they are inline or block depending on
// browser and browser mode.
//
// Elements other than DIV may have special quirks, like built-in
// margins or padding, or values not detectable via computedStyle.
// In particular, margins on TABLE do not seems to appear
// at all in computedStyle on Mozilla.
dojo._setBox = function(/*DomNode*/node, /*Number?*/l, /*Number?*/t, /*Number?*/w, /*Number?*/h, /*String?*/u){
// summary:
// sets width/height/left/top in the current (native) box-model
// dimentions. Uses the unit passed in u.
// node:
// DOM Node reference. Id string not supported for performance
// reasons.
// l:
// left offset from parent.
// t:
// top offset from parent.
// w:
// width in current box model.
// h:
// width in current box model.
// u:
// unit measure to use for other measures. Defaults to "px".
u = u || "px";
var s = node.style;
if(!isNaN(l)){ s.left = l + u; }
if(!isNaN(t)){ s.top = t + u; }
if(w >= 0){ s.width = w + u; }
if(h >= 0){ s.height = h + u; }
}
dojo._isButtonTag = function(/*DomNode*/node) {
// summary:
// True if the node is BUTTON or INPUT.type="button".
return node.tagName == "BUTTON"
|| node.tagName=="INPUT" && (node.getAttribute("type")||'').toUpperCase() == "BUTTON"; // boolean
}
dojo._usesBorderBox = function(/*DomNode*/node){
// summary:
// True if the node uses border-box layout.
// We could test the computed style of node to see if a particular box
// has been specified, but there are details and we choose not to bother.
// TABLE and BUTTON (and INPUT type=button) are always border-box by default.
// If you have assigned a different box to either one via CSS then
// box functions will break.
var n = node.tagName;
return d.boxModel=="border-box" || n=="TABLE" || d._isButtonTag(node); // boolean
}
dojo._setContentSize = function(/*DomNode*/node, /*Number*/widthPx, /*Number*/heightPx, /*Object*/computedStyle){
// summary:
// Sets the size of the node's contents, irrespective of margins,
// padding, or borders.
if(d._usesBorderBox(node)){
var pb = d._getPadBorderExtents(node, computedStyle);
if(widthPx >= 0){ widthPx += pb.w; }
if(heightPx >= 0){ heightPx += pb.h; }
}
d._setBox(node, NaN, NaN, widthPx, heightPx);
}
dojo._setMarginBox = function(/*DomNode*/node, /*Number?*/leftPx, /*Number?*/topPx,
/*Number?*/widthPx, /*Number?*/heightPx,
/*Object*/computedStyle){
// summary:
// sets the size of the node's margin box and placement
// (left/top), irrespective of box model. Think of it as a
// passthrough to dojo._setBox that handles box-model vagaries for
// you.
var s = computedStyle || gcs(node),
// Some elements have special padding, margin, and box-model settings.
// To use box functions you may need to set padding, margin explicitly.
// Controlling box-model is harder, in a pinch you might set dojo.boxModel.
bb = d._usesBorderBox(node),
pb = bb ? _nilExtents : d._getPadBorderExtents(node, s)
;
if(d.isWebKit){
// on Safari (3.1.2), button nodes with no explicit size have a default margin
// setting an explicit size eliminates the margin.
// We have to swizzle the width to get correct margin reading.
if(d._isButtonTag(node)){
var ns = node.style;
if(widthPx >= 0 && !ns.width) { ns.width = "4px"; }
if(heightPx >= 0 && !ns.height) { ns.height = "4px"; }
}
}
var mb = d._getMarginExtents(node, s);
if(widthPx >= 0){ widthPx = Math.max(widthPx - pb.w - mb.w, 0); }
if(heightPx >= 0){ heightPx = Math.max(heightPx - pb.h - mb.h, 0); }
d._setBox(node, leftPx, topPx, widthPx, heightPx);
}
var _nilExtents = { l:0, t:0, w:0, h:0 };
// public API
dojo.marginBox = function(/*DomNode|String*/node, /*Object?*/box){
// summary:
// Getter/setter for the margin-box of node.
// description:
// Getter/setter for the margin-box of node.
// Returns an object in the expected format of box (regardless
// if box is passed). The object might look like:
// `{ l: 50, t: 200, w: 300: h: 150 }`
// for a node offset from its parent 50px to the left, 200px from
// the top with a margin width of 300px and a margin-height of
// 150px.
// node:
// id or reference to DOM Node to get/set box for
// box:
// If passed, denotes that dojo.marginBox() should
// update/set the margin box for node. Box is an object in the
// above format. All properties are optional if passed.
// example:
// Retrieve the marginbox of a passed node
// | var box = dojo.marginBox("someNodeId");
// | console.dir(box);
//
// example:
// Set a node's marginbox to the size of another node
// | var box = dojo.marginBox("someNodeId");
// | dojo.marginBox("someOtherNode", box);
var n = byId(node), s = gcs(n), b = box;
return !b ? d._getMarginBox(n, s) : d._setMarginBox(n, b.l, b.t, b.w, b.h, s); // Object
}
dojo.contentBox = function(/*DomNode|String*/node, /*Object?*/box){
// summary:
// Getter/setter for the content-box of node.
// description:
// Returns an object in the expected format of box (regardless if box is passed).
// The object might look like:
// `{ l: 50, t: 200, w: 300: h: 150 }`
// for a node offset from its parent 50px to the left, 200px from
// the top with a content width of 300px and a content-height of
// 150px. Note that the content box may have a much larger border
// or margin box, depending on the box model currently in use and
// CSS values set/inherited for node.
// While the getter will return top and left values, the
// setter only accepts setting the width and height.
// node:
// id or reference to DOM Node to get/set box for
// box:
// If passed, denotes that dojo.contentBox() should
// update/set the content box for node. Box is an object in the
// above format, but only w (width) and h (height) are supported.
// All properties are optional if passed.
var n = byId(node), s = gcs(n), b = box;
return !b ? d._getContentBox(n, s) : d._setContentSize(n, b.w, b.h, s); // Object
}
// =============================
// Positioning
// =============================
var _sumAncestorProperties = function(node, prop){
if(!(node = (node||0).parentNode)){return 0}
var val, retVal = 0, _b = d.body();
while(node && node.style){
if(gcs(node).position == "fixed"){
return 0;
}
val = node[prop];
if(val){
retVal += val - 0;
// opera and khtml #body & #html has the same values, we only
// need one value
if(node == _b){ break; }
}
node = node.parentNode;
}
return retVal; // integer
}
dojo._docScroll = function(){
var n = d.global;
return "pageXOffset" in n? { x:n.pageXOffset, y:n.pageYOffset } :
(n=d.doc.documentElement, n.clientHeight? { x:d._fixIeBiDiScrollLeft(n.scrollLeft), y:n.scrollTop } :
(n=d.body(), { x:n.scrollLeft||0, y:n.scrollTop||0 }));
};
dojo._isBodyLtr = function(){
return "_bodyLtr" in d? d._bodyLtr :
d._bodyLtr = (d.body().dir || d.doc.documentElement.dir || "ltr").toLowerCase() == "ltr"; // Boolean
}
dojo._getIeDocumentElementOffset = function(){
// summary:
// returns the offset in x and y from the document body to the
// visual edge of the page
// description:
// The following values in IE contain an offset:
// | event.clientX
// | event.clientY
// | node.getBoundingClientRect().left
// | node.getBoundingClientRect().top
// But other position related values do not contain this offset,
// such as node.offsetLeft, node.offsetTop, node.style.left and
// node.style.top. The offset is always (2, 2) in LTR direction.
// When the body is in RTL direction, the offset counts the width
// of left scroll bar's width. This function computes the actual
// offset.
//NOTE: assumes we're being called in an IE browser
var de = d.doc.documentElement; // only deal with HTML element here, _abs handles body/quirks
if(d.isIE < 8){
var r = de.getBoundingClientRect(); // works well for IE6+
//console.debug('rect left,top = ' + r.left+','+r.top + ', html client left/top = ' + de.clientLeft+','+de.clientTop + ', rtl = ' + (!d._isBodyLtr()) + ', quirks = ' + d.isQuirks);
var l = r.left,
t = r.top;
if(d.isIE < 7){
l += de.clientLeft; // scrollbar size in strict/RTL, or,
t += de.clientTop; // HTML border size in strict
}
return {
x: l < 0? 0 : l, // FRAME element border size can lead to inaccurate negative values
y: t < 0? 0 : t
};
}else{
return {
x: 0,
y: 0
};
}
};
dojo._fixIeBiDiScrollLeft = function(/*Integer*/ scrollLeft){
// In RTL direction, scrollLeft should be a negative value, but IE < 8
// returns a positive one. All codes using documentElement.scrollLeft
// must call this function to fix this error, otherwise the position
// will offset to right when there is a horizontal scrollbar.
var dd = d.doc;
if(d.isIE < 8 && !d._isBodyLtr()){
var de = d.isQuirks ? dd.body : dd.documentElement;
return scrollLeft + de.clientWidth - de.scrollWidth; // Integer
}
return scrollLeft; // Integer
}
// FIXME: need a setter for coords or a moveTo!!
dojo._abs = dojo.position = function(/*DomNode*/node, /*Boolean?*/includeScroll){
// summary:
// Gets the position and size of the passed element relative to
// the viewport (if includeScroll==false), or relative to the
// document root (if includeScroll==true).
//
// description:
// Returns an object of the form:
// { x: 100, y: 300, w: 20, h: 15 }
// If includeScroll==true, the x and y values will include any
// document offsets that may affect the position relative to the
// viewport.
// Uses the border-box model (inclusive of border and padding but
// not margin). Does not act as a setter.
var db = d.body(), dh = db.parentNode, ret;
node = byId(node);
if(node["getBoundingClientRect"]){
// IE6+, FF3+, super-modern WebKit, and Opera 9.6+ all take this branch
ret = node.getBoundingClientRect();
ret = { x: ret.left, y: ret.top, w: ret.right - ret.left, h: ret.bottom - ret.top };
if(d.isIE){
// On IE there's a 2px offset that we need to adjust for, see _getIeDocumentElementOffset()
var offset = d._getIeDocumentElementOffset();
// fixes the position in IE, quirks mode
ret.x -= offset.x + (d.isQuirks ? db.clientLeft+db.offsetLeft : 0);
ret.y -= offset.y + (d.isQuirks ? db.clientTop+db.offsetTop : 0);
}else if(d.isFF == 3){
// In FF3 you have to subtract the document element margins.
// Fixed in FF3.5 though.
var cs = gcs(dh);
ret.x -= px(dh, cs.marginLeft) + px(dh, cs.borderLeftWidth);
ret.y -= px(dh, cs.marginTop) + px(dh, cs.borderTopWidth);
}
}else{
// FF2 and older WebKit
ret = {
x: 0,
y: 0,
w: node.offsetWidth,
h: node.offsetHeight
};
if(node["offsetParent"]){
ret.x -= _sumAncestorProperties(node, "scrollLeft");
ret.y -= _sumAncestorProperties(node, "scrollTop");
var curnode = node;
do{
var n = curnode.offsetLeft,
t = curnode.offsetTop;
ret.x += isNaN(n) ? 0 : n;
ret.y += isNaN(t) ? 0 : t;
cs = gcs(curnode);
if(curnode != node){
if(d.isMoz){
// tried left+right with differently sized left/right borders
// it really is 2xleft border in FF, not left+right, even in RTL!
ret.x += 2 * px(curnode,cs.borderLeftWidth);
ret.y += 2 * px(curnode,cs.borderTopWidth);
}else{
ret.x += px(curnode, cs.borderLeftWidth);
ret.y += px(curnode, cs.borderTopWidth);
}
}
// static children in a static div in FF2 are affected by the div's border as well
// but offsetParent will skip this div!
if(d.isMoz && cs.position=="static"){
var parent=curnode.parentNode;
while(parent!=curnode.offsetParent){
var pcs=gcs(parent);
if(pcs.position=="static"){
ret.x += px(curnode,pcs.borderLeftWidth);
ret.y += px(curnode,pcs.borderTopWidth);
}
parent=parent.parentNode;
}
}
curnode = curnode.offsetParent;
}while((curnode != dh) && curnode);
}else if(node.x && node.y){
ret.x += isNaN(node.x) ? 0 : node.x;
ret.y += isNaN(node.y) ? 0 : node.y;
}
}
// account for document scrolling
// if offsetParent is used, ret value already includes scroll position
// so we may have to actually remove that value if !includeScroll
if(includeScroll){
var scroll = d._docScroll();
ret.x += scroll.x;
ret.y += scroll.y;
}
return ret; // Object
}
dojo.coords = function(/*DomNode|String*/node, /*Boolean?*/includeScroll){
// summary:
// Deprecated: Use position() for border-box x/y/w/h
// or marginBox() for margin-box w/h/l/t.
// Returns an object representing a node's size and position.
//
// description:
// Returns an object that measures margin-box (w)idth/(h)eight
// and absolute position x/y of the border-box. Also returned
// is computed (l)eft and (t)op values in pixels from the
// node's offsetParent as returned from marginBox().
// Return value will be in the form:
//| { l: 50, t: 200, w: 300: h: 150, x: 100, y: 300 }
// Does not act as a setter. If includeScroll is passed, the x and
// y params are affected as one would expect in dojo.position().
var n = byId(node), s = gcs(n), mb = d._getMarginBox(n, s);
var abs = d.position(n, includeScroll);
mb.x = abs.x;
mb.y = abs.y;
return mb;
}
// =============================
// Element attribute Functions
// =============================
// dojo.attr() should conform to http://www.w3.org/TR/DOM-Level-2-Core/
var _propNames = {
// properties renamed to avoid clashes with reserved words
"class": "className",
"for": "htmlFor",
// properties written as camelCase
tabindex: "tabIndex",
readonly: "readOnly",
colspan: "colSpan",
frameborder: "frameBorder",
rowspan: "rowSpan",
valuetype: "valueType"
},
_attrNames = {
// original attribute names
classname: "class",
htmlfor: "for",
// for IE
tabindex: "tabIndex",
readonly: "readOnly"
},
_forcePropNames = {
innerHTML: 1,
className: 1,
htmlFor: d.isIE,
value: 1
};
var _fixAttrName = function(/*String*/ name){
return _attrNames[name.toLowerCase()] || name;
};
var _hasAttr = function(node, name){
var attr = node.getAttributeNode && node.getAttributeNode(name);
return attr && attr.specified; // Boolean
};
// There is a difference in the presence of certain properties and their default values
// between browsers. For example, on IE "disabled" is present on all elements,
// but it is value is "false"; "tabIndex" of <div> returns 0 by default on IE, yet other browsers
// can return -1.
dojo.hasAttr = function(/*DomNode|String*/node, /*String*/name){
// summary:
// Returns true if the requested attribute is specified on the
// given element, and false otherwise.
// node:
// id or reference to the element to check
// name:
// the name of the attribute
// returns:
// true if the requested attribute is specified on the
// given element, and false otherwise
var lc = name.toLowerCase();
return _forcePropNames[_propNames[lc] || name] || _hasAttr(byId(node), _attrNames[lc] || name); // Boolean
}
var _evtHdlrMap = {}, _ctr = 0,
_attrId = dojo._scopeName + "attrid",
// the next dictionary lists elements with read-only innerHTML on IE
_roInnerHtml = {col: 1, colgroup: 1,
// frameset: 1, head: 1, html: 1, style: 1,
table: 1, tbody: 1, tfoot: 1, thead: 1, tr: 1, title: 1};
dojo.attr = function(/*DomNode|String*/node, /*String|Object*/name, /*String?*/value){
// summary:
// Gets or sets an attribute on an HTML element.
// description:
// Handles normalized getting and setting of attributes on DOM
// Nodes. If 2 arguments are passed, and a the second argumnt is a
// string, acts as a getter.
//
// If a third argument is passed, or if the second argument is a
// map of attributes, acts as a setter.
//
// When passing functions as values, note that they will not be
// directly assigned to slots on the node, but rather the default
// behavior will be removed and the new behavior will be added
// using `dojo.connect()`, meaning that event handler properties
// will be normalized and that some caveats with regards to
// non-standard behaviors for onsubmit apply. Namely that you
// should cancel form submission using `dojo.stopEvent()` on the
// passed event object instead of returning a boolean value from
// the handler itself.
// node:
// id or reference to the element to get or set the attribute on
// name:
// the name of the attribute to get or set.
// value:
// The value to set for the attribute
// returns:
// when used as a getter, the value of the requested attribute
// or null if that attribute does not have a specified or
// default value;
//
// when used as a setter, the DOM node
//
// example:
// | // get the current value of the "foo" attribute on a node
// | dojo.attr(dojo.byId("nodeId"), "foo");
// | // or we can just pass the id:
// | dojo.attr("nodeId", "foo");
//
// example:
// | // use attr() to set the tab index
// | dojo.attr("nodeId", "tabIndex", 3);
// |
//
// example:
// Set multiple values at once, including event handlers:
// | dojo.attr("formId", {
// | "foo": "bar",
// | "tabIndex": -1,
// | "method": "POST",
// | "onsubmit": function(e){
// | // stop submitting the form. Note that the IE behavior
// | // of returning true or false will have no effect here
// | // since our handler is connect()ed to the built-in
// | // onsubmit behavior and so we need to use
// | // dojo.stopEvent() to ensure that the submission
// | // doesn't proceed.
// | dojo.stopEvent(e);
// |
// | // submit the form with Ajax
// | dojo.xhrPost({ form: "formId" });
// | }
// | });
//
// example:
// Style is s special case: Only set with an object hash of styles
// | dojo.attr("someNode",{
// | id:"bar",
// | style:{
// | width:"200px", height:"100px", color:"#000"
// | }
// | });
//
// example:
// Again, only set style as an object hash of styles:
// | var obj = { color:"#fff", backgroundColor:"#000" };
// | dojo.attr("someNode", "style", obj);
// |
// | // though shorter to use `dojo.style()` in this case:
// | dojo.style("someNode", obj);
node = byId(node);
var args = arguments.length, prop;
if(args == 2 && typeof name != "string"){ // inline'd type check
// the object form of setter: the 2nd argument is a dictionary
for(var x in name){
d.attr(node, x, name[x]);
}
return node; // DomNode
}
var lc = name.toLowerCase(),
propName = _propNames[lc] || name,
forceProp = _forcePropNames[propName],
attrName = _attrNames[lc] || name;
if(args == 3){
// setter
do{
if(propName == "style" && typeof value != "string"){ // inline'd type check
// special case: setting a style
d.style(node, value);
break;
}
if(propName == "innerHTML"){
// special case: assigning HTML
if(d.isIE && node.tagName.toLowerCase() in _roInnerHtml){
d.empty(node);
node.appendChild(d._toDom(value, node.ownerDocument));
}else{
node[propName] = value;
}
break;
}
if(d.isFunction(value)){
// special case: assigning an event handler
// clobber if we can
var attrId = d.attr(node, _attrId);
if(!attrId){
attrId = _ctr++;
d.attr(node, _attrId, attrId);
}
if(!_evtHdlrMap[attrId]){
_evtHdlrMap[attrId] = {};
}
var h = _evtHdlrMap[attrId][propName];
if(h){
d.disconnect(h);
}else{
try{
delete node[propName];
}catch(e){}
}
// ensure that event objects are normalized, etc.
_evtHdlrMap[attrId][propName] = d.connect(node, propName, value);
break;
}
if(forceProp || typeof value == "boolean"){
// special case: forcing assignment to the property
// special case: setting boolean to a property instead of attribute
node[propName] = value;
break;
}
// node's attribute
node.setAttribute(attrName, value);
}while(false);
return node; // DomNode
}
// getter
// should we access this attribute via a property or
// via getAttribute()?
value = node[propName];
if(forceProp && typeof value != "undefined"){
// node's property
return value; // Anything
}
if(propName != "href" && (typeof value == "boolean" || d.isFunction(value))){
// node's property
return value; // Anything
}
// node's attribute
// we need _hasAttr() here to guard against IE returning a default value
return _hasAttr(node, attrName) ? node.getAttribute(attrName) : null; // Anything
}
dojo.removeAttr = function(/*DomNode|String*/ node, /*String*/ name){
// summary:
// Removes an attribute from an HTML element.
// node:
// id or reference to the element to remove the attribute from
// name:
// the name of the attribute to remove
byId(node).removeAttribute(_fixAttrName(name));
}
dojo.getNodeProp = function(/*DomNode|String*/ node, /*String*/ name){
// summary:
// Returns an effective value of a property or an attribute.
// node:
// id or reference to the element to remove the attribute from
// name:
// the name of the attribute
node = byId(node);
var lc = name.toLowerCase(),
propName = _propNames[lc] || name;
if((propName in node) && propName != "href"){
// node's property
return node[propName]; // Anything
}
// node's attribute
var attrName = _attrNames[lc] || name;
return _hasAttr(node, attrName) ? node.getAttribute(attrName) : null; // Anything
}
dojo.create = function(tag, attrs, refNode, pos){
// summary:
// Create an element, allowing for optional attribute decoration
// and placement.
//
// description:
// A DOM Element creation function. A shorthand method for creating a node or
// a fragment, and allowing for a convenient optional attribute setting step,
// as well as an optional DOM placement reference.
//|
// Attributes are set by passing the optional object through `dojo.attr`.
// See `dojo.attr` for noted caveats and nuances, and API if applicable.
//|
// Placement is done via `dojo.place`, assuming the new node to be the action
// node, passing along the optional reference node and position.
//
// tag: String|DomNode
// A string of the element to create (eg: "div", "a", "p", "li", "script", "br"),
// or an existing DOM node to process.
//
// attrs: Object
// An object-hash of attributes to set on the newly created node.
// Can be null, if you don't want to set any attributes/styles.
// See: `dojo.attr` for a description of available attributes.
//
// refNode: String?|DomNode?
// Optional reference node. Used by `dojo.place` to place the newly created
// node somewhere in the dom relative to refNode. Can be a DomNode reference
// or String ID of a node.
//
// pos: String?
// Optional positional reference. Defaults to "last" by way of `dojo.place`,
// though can be set to "first","after","before","last", "replace" or "only"
// to further control the placement of the new node relative to the refNode.
// 'refNode' is required if a 'pos' is specified.
//
// returns: DomNode
//
// example:
// Create a DIV:
// | var n = dojo.create("div");
//
// example:
// Create a DIV with content:
// | var n = dojo.create("div", { innerHTML:"<p>hi</p>" });
//
// example:
// Place a new DIV in the BODY, with no attributes set
// | var n = dojo.create("div", null, dojo.body());
//
// example:
// Create an UL, and populate it with LI's. Place the list as the first-child of a
// node with id="someId":
// | var ul = dojo.create("ul", null, "someId", "first");
// | var items = ["one", "two", "three", "four"];
// | dojo.forEach(items, function(data){
// | dojo.create("li", { innerHTML: data }, ul);
// | });
//
// example:
// Create an anchor, with an href. Place in BODY:
// | dojo.create("a", { href:"foo.html", title:"Goto FOO!" }, dojo.body());
//
// example:
// Create a `dojo.NodeList()` from a new element (for syntatic sugar):
// | dojo.query(dojo.create('div'))
// | .addClass("newDiv")
// | .onclick(function(e){ console.log('clicked', e.target) })
// | .place("#someNode"); // redundant, but cleaner.
var doc = d.doc;
if(refNode){
refNode = byId(refNode);
doc = refNode.ownerDocument;
}
if(typeof tag == "string"){ // inline'd type check
tag = doc.createElement(tag);
}
if(attrs){ d.attr(tag, attrs); }
if(refNode){ d.place(tag, refNode, pos); }
return tag; // DomNode
}
/*=====
dojo.empty = function(node){
// summary:
// safely removes all children of the node.
// node: DOMNode|String
// a reference to a DOM node or an id.
// example:
// Destroy node's children byId:
// | dojo.empty("someId");
//
// example:
// Destroy all nodes' children in a list by reference:
// | dojo.query(".someNode").forEach(dojo.empty);
}
=====*/
d.empty =
d.isIE ? function(node){
node = byId(node);
for(var c; c = node.lastChild;){ // intentional assignment
d.destroy(c);
}
} :
function(node){
byId(node).innerHTML = "";
};
/*=====
dojo._toDom = function(frag, doc){
// summary:
// instantiates an HTML fragment returning the corresponding DOM.
// frag: String
// the HTML fragment
// doc: DocumentNode?
// optional document to use when creating DOM nodes, defaults to
// dojo.doc if not specified.
// returns: DocumentFragment
//
// example:
// Create a table row:
// | var tr = dojo._toDom("<tr><td>First!</td></tr>");
}
=====*/
// support stuff for dojo._toDom
var tagWrap = {
option: ["select"],
tbody: ["table"],
thead: ["table"],
tfoot: ["table"],
tr: ["table", "tbody"],
td: ["table", "tbody", "tr"],
th: ["table", "thead", "tr"],
legend: ["fieldset"],
caption: ["table"],
colgroup: ["table"],
col: ["table", "colgroup"],
li: ["ul"]
},
reTag = /<\s*([\w\:]+)/,
masterNode = {}, masterNum = 0,
masterName = "__" + d._scopeName + "ToDomId";
// generate start/end tag strings to use
// for the injection for each special tag wrap case.
for(var param in tagWrap){
var tw = tagWrap[param];
tw.pre = param == "option" ? '<select multiple="multiple">' : "<" + tw.join("><") + ">";
tw.post = "</" + tw.reverse().join("></") + ">";
// the last line is destructive: it reverses the array,
// but we don't care at this point
}
d._toDom = function(frag, doc){
// summary:
// converts HTML string into DOM nodes.
doc = doc || d.doc;
var masterId = doc[masterName];
if(!masterId){
doc[masterName] = masterId = ++masterNum + "";
masterNode[masterId] = doc.createElement("div");
}
// make sure the frag is a string.
frag += "";
// find the starting tag, and get node wrapper
var match = frag.match(reTag),
tag = match ? match[1].toLowerCase() : "",
master = masterNode[masterId],
wrap, i, fc, df;
if(match && tagWrap[tag]){
wrap = tagWrap[tag];
master.innerHTML = wrap.pre + frag + wrap.post;
for(i = wrap.length; i; --i){
master = master.firstChild;
}
}else{
master.innerHTML = frag;
}
// one node shortcut => return the node itself
if(master.childNodes.length == 1){
return master.removeChild(master.firstChild); // DOMNode
}
// return multiple nodes as a document fragment
df = doc.createDocumentFragment();
while(fc = master.firstChild){ // intentional assignment
df.appendChild(fc);
}
return df; // DOMNode
}
// =============================
// (CSS) Class Functions
// =============================
var _className = "className";
dojo.hasClass = function(/*DomNode|String*/node, /*String*/classStr){
// summary:
// Returns whether or not the specified classes are a portion of the
// class list currently applied to the node.
//
// node:
// String ID or DomNode reference to check the class for.
//
// classStr:
// A string class name to look for.
//
// example:
// Do something if a node with id="someNode" has class="aSillyClassName" present
// | if(dojo.hasClass("someNode","aSillyClassName")){ ... }
return ((" "+ byId(node)[_className] +" ").indexOf(" " + classStr + " ") >= 0); // Boolean
};
var spaces = /\s+/, a1 = [""],
str2array = function(s){
if(typeof s == "string" || s instanceof String){
if(s.indexOf(" ") < 0){
a1[0] = s;
return a1;
}else{
return s.split(spaces);
}
}
// assumed to be an array
return s || "";
};
dojo.addClass = function(/*DomNode|String*/node, /*String|Array*/classStr){
// summary:
// Adds the specified classes to the end of the class list on the
// passed node. Will not re-apply duplicate classes.
//
// node:
// String ID or DomNode reference to add a class string too
//
// classStr:
// A String class name to add, or several space-separated class names,
// or an array of class names.
//
// example:
// Add a class to some node:
// | dojo.addClass("someNode", "anewClass");
//
// example:
// Add two classes at once:
// | dojo.addClass("someNode", "firstClass secondClass");
//
// example:
// Add two classes at once (using array):
// | dojo.addClass("someNode", ["firstClass", "secondClass"]);
//
// example:
// Available in `dojo.NodeList` for multiple additions
// | dojo.query("ul > li").addClass("firstLevel");
node = byId(node);
classStr = str2array(classStr);
var cls = node[_className], oldLen;
cls = cls ? " " + cls + " " : " ";
oldLen = cls.length;
for(var i = 0, len = classStr.length, c; i < len; ++i){
c = classStr[i];
if(c && cls.indexOf(" " + c + " ") < 0){
cls += c + " ";
}
}
if(oldLen < cls.length){
node[_className] = cls.substr(1, cls.length - 2);
}
};
dojo.removeClass = function(/*DomNode|String*/node, /*String|Array?*/classStr){
// summary:
// Removes the specified classes from node. No `dojo.hasClass`
// check is required.
//
// node:
// String ID or DomNode reference to remove the class from.
//
// classStr:
// An optional String class name to remove, or several space-separated
// class names, or an array of class names. If omitted, all class names
// will be deleted.
//
// example:
// Remove a class from some node:
// | dojo.removeClass("someNode", "firstClass");
//
// example:
// Remove two classes from some node:
// | dojo.removeClass("someNode", "firstClass secondClass");
//
// example:
// Remove two classes from some node (using array):
// | dojo.removeClass("someNode", ["firstClass", "secondClass"]);
//
// example:
// Remove all classes from some node:
// | dojo.removeClass("someNode");
//
// example:
// Available in `dojo.NodeList()` for multiple removal
// | dojo.query(".foo").removeClass("foo");
node = byId(node);
var cls;
if(classStr !== undefined){
classStr = str2array(classStr);
cls = " " + node[_className] + " ";
for(var i = 0, len = classStr.length; i < len; ++i){
cls = cls.replace(" " + classStr[i] + " ", " ");
}
cls = d.trim(cls);
}else{
cls = "";
}
if(node[_className] != cls){ node[_className] = cls; }
};
dojo.toggleClass = function(/*DomNode|String*/node, /*String|Array*/classStr, /*Boolean?*/condition){
// summary:
// Adds a class to node if not present, or removes if present.
// Pass a boolean condition if you want to explicitly add or remove.
// condition:
// If passed, true means to add the class, false means to remove.
//
// example:
// | dojo.toggleClass("someNode", "hovered");
//
// example:
// Forcefully add a class
// | dojo.toggleClass("someNode", "hovered", true);
//
// example:
// Available in `dojo.NodeList()` for multiple toggles
// | dojo.query(".toggleMe").toggleClass("toggleMe");
if(condition === undefined){
condition = !d.hasClass(node, classStr);
}
d[condition ? "addClass" : "removeClass"](node, classStr);
};
})();
}
| {
"content_hash": "7bb1897c71c28d01095872197d5b6a7e",
"timestamp": "",
"source": "github",
"line_count": 1830,
"max_line_length": 183,
"avg_line_length": 32.15901639344262,
"alnum_prop": 0.6232179572139811,
"repo_name": "najamelan/vhffs-4.5",
"id": "be5fd2aaa06af5e1942b764428756dd5d5499585",
"size": "59045",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "vhffs-panel/js/dojo/_base/html.js",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C",
"bytes": "194692"
},
{
"name": "CSS",
"bytes": "18728"
},
{
"name": "Groff",
"bytes": "2027"
},
{
"name": "HTML",
"bytes": "1372"
},
{
"name": "JavaScript",
"bytes": "3107948"
},
{
"name": "Logos",
"bytes": "3470"
},
{
"name": "PHP",
"bytes": "2550"
},
{
"name": "PLpgSQL",
"bytes": "15840"
},
{
"name": "Perl",
"bytes": "1034350"
},
{
"name": "Shell",
"bytes": "130474"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>LiteNetLib </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="LiteNetLib ">
<meta name="generator" content="docfx 2.59.2.0">
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="styles/docfx.vendor.css">
<link rel="stylesheet" href="styles/docfx.css">
<link rel="stylesheet" href="styles/main.css">
<meta property="docfx:navrel" content="toc.html">
<meta property="docfx:tocrel" content="toc.html">
</head>
<body data-spy="scroll" data-target="#affix" data-offset="120">
<div id="wrapper">
<header>
<nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">
<img id="logo" class="svg" src="logo.svg" alt="">
</a>
</div>
<div class="collapse navbar-collapse" id="navbar">
<form class="navbar-form navbar-right" role="search" id="search">
<div class="form-group">
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
</div>
</form>
</div>
</div>
</nav>
<div class="subnav navbar navbar-default">
<div class="container hide-when-search" id="breadcrumb">
<ul class="breadcrumb">
<li></li>
</ul>
</div>
</div>
</header>
<div role="main" class="container body-content hide-when-search">
<div class="article row grid">
<div class="col-md-10">
<article class="content wrap" id="_content" data-uid="">
<h1 id="litenetlib">LiteNetLib</h1>
<p>Lite reliable UDP library for .NET Framework 3.5, Mono, .NET Core 2.0, .NET Standard 2.0.</p>
<p><a href="https://discord.gg/FATFPdy"><img src="https://img.shields.io/discord/501682175930925058.svg" alt="Discord"></a></p>
<p><a href="https://github.com/RevenantX/NetGameExample">Little Game Example on Unity</a></p>
<h2 id="features">Features</h2>
<ul>
<li>Lightweight<ul>
<li>Small CPU and RAM usage</li>
<li>Small packet size overhead ( 1 byte for unreliable, 3 bytes for reliable packets )</li>
</ul>
</li>
<li>Simple connection handling</li>
<li>Peer to peer connections</li>
<li>Helper classes for sending and reading messages</li>
<li>Multiple data channels</li>
<li>Different send mechanics<ul>
<li>Reliable with order</li>
<li>Reliable without order</li>
<li>Reliable sequenced (realiable only last packet)</li>
<li>Ordered but unreliable with duplication prevention</li>
<li>Simple UDP packets without order and reliability</li>
</ul>
</li>
<li>Fast packet serializer <a href="https://github.com/RevenantX/LiteNetLib/wiki/NetSerializer-usage">(Usage manual)</a></li>
<li>Automatic small packets merging</li>
<li>Automatic fragmentation of reliable packets</li>
<li>Automatic MTU detection</li>
<li>UDP NAT hole punching</li>
<li>NTP time requests</li>
<li>Packet loss and latency simulation</li>
<li>IPv6 support (dual mode)</li>
<li>Connection statisitcs (need DEBUG or STATS_ENABLED flag)</li>
<li>Multicasting (for discovering hosts in local network)</li>
<li>Unity support</li>
<li>Supported platforms:<ul>
<li>Windows/Mac/Linux (.NET Framework, Mono, .NET Core)</li>
<li>Android (Unity)</li>
<li>iOS (Unity)</li>
<li>UWP Windows 10 including phones</li>
<li>Lumin OS (Magic Leap)</li>
</ul>
</li>
</ul>
<h2 id="unity-notes">Unity notes!!!</h2>
<ul>
<li>Always use library sources instead of precompiled DLL files ( because there are platform specific #ifdefs and workarounds for unity bugs )</li>
</ul>
<h2 id="usage-samples">Usage samples</h2>
<h3 id="client">Client</h3>
<pre><code class="lang-csharp">EventBasedNetListener listener = new EventBasedNetListener();
NetManager client = new NetManager(listener);
client.Start();
client.Connect("localhost" /* host ip or name */, 9050 /* port */, "SomeConnectionKey" /* text key or NetDataWriter */);
listener.NetworkReceiveEvent += (fromPeer, dataReader, deliveryMethod) =>
{
Console.WriteLine("We got: {0}", dataReader.GetString(100 /* max length of string */));
dataReader.Recycle();
};
while (!Console.KeyAvailable)
{
client.PollEvents();
Thread.Sleep(15);
}
client.Stop();
</code></pre><h3 id="server">Server</h3>
<pre><code class="lang-csharp">EventBasedNetListener listener = new EventBasedNetListener();
NetManager server = new NetManager(listener);
server.Start(9050 /* port */);
listener.ConnectionRequestEvent += request =>
{
if(server.PeersCount < 10 /* max connections */)
request.AcceptIfKey("SomeConnectionKey");
else
request.Reject();
};
listener.PeerConnectedEvent += peer =>
{
Console.WriteLine("We got connection: {0}", peer.EndPoint); // Show peer ip
NetDataWriter writer = new NetDataWriter(); // Create writer class
writer.Put("Hello client!"); // Put some string
peer.Send(writer, DeliveryMethod.ReliableOrdered); // Send with reliability
};
while (!Console.KeyAvailable)
{
server.PollEvents();
Thread.Sleep(15);
}
server.Stop();
</code></pre><h2 id="netmanager-settings-description">NetManager settings description</h2>
<ul>
<li><strong>UnconnectedMessagesEnabled</strong><ul>
<li>enable messages receiving without connection. (with SendUnconnectedMessage method)</li>
<li>default value: <strong>false</strong></li>
</ul>
</li>
<li><strong>NatPunchEnabled</strong><ul>
<li>enable NAT punch messages</li>
<li>default value: <strong>false</strong></li>
</ul>
</li>
<li><strong>UpdateTime</strong><ul>
<li>library logic update (and send) period in milliseconds</li>
<li>default value: <strong>15 msec</strong>.</li>
</ul>
</li>
<li><strong>PingInterval</strong><ul>
<li>Interval for latency detection and checking connection</li>
<li>default value: <strong>1000 msec</strong>.</li>
</ul>
</li>
<li><strong>DisconnectTimeout</strong><ul>
<li>if client or server doesn't receive any packet from remote peer during this time then connection will be closed</li>
<li>(including library internal keepalive packets)</li>
<li>default value: <strong>5000 msec</strong>.</li>
</ul>
</li>
<li><strong>SimulatePacketLoss</strong><ul>
<li>simulate packet loss by dropping random amout of packets. (Works only in DEBUG mode)</li>
<li>default value: <strong>false</strong></li>
</ul>
</li>
<li><strong>SimulateLatency</strong><ul>
<li>simulate latency by holding packets for random time. (Works only in DEBUG mode)</li>
<li>default value: <strong>false</strong></li>
</ul>
</li>
<li><strong>SimulationPacketLossChance</strong><ul>
<li>chance of packet loss when simulation enabled. value in percents.</li>
<li>default value: <strong>10 (%)</strong></li>
</ul>
</li>
<li><strong>SimulationMinLatency</strong><ul>
<li>minimum simulated latency</li>
<li>default value: <strong>30 msec</strong></li>
</ul>
</li>
<li><strong>SimulationMaxLatency</strong><ul>
<li>maximum simulated latency</li>
<li>default value: <strong>100 msec</strong></li>
</ul>
</li>
<li><strong>BroadcastEnabled</strong><ul>
<li>Allows receive Broadcast packets</li>
<li>default value: <strong>false</strong></li>
</ul>
</li>
<li><strong>ReconnectDelay</strong><ul>
<li>delay betwen connection attempts</li>
<li>default value: <strong>500 msec</strong></li>
</ul>
</li>
<li><strong>MaxConnectAttempts</strong><ul>
<li>maximum connection attempts before client stops and call disconnect event.</li>
<li>default value: <strong>10</strong></li>
</ul>
</li>
<li><strong>UnsyncedEvents</strong><ul>
<li>Experimental feature. Events automatically will be called without PollEvents method from another thread</li>
<li>default value: <strong>false</strong></li>
</ul>
</li>
</ul>
</article>
</div>
<div class="hidden-sm col-md-2" role="complementary">
<div class="sideaffix">
<div class="contribution">
<ul class="nav">
</ul>
</div>
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
<h5>In This Article</h5>
<div></div>
</nav>
</div>
</div>
</div>
</div>
<footer>
<div class="grad-bottom"></div>
<div class="footer">
<div class="container">
<span class="pull-right">
<a href="#top">Back to top</a>
</span>
<span>Generated by <strong>DocFX</strong></span>
</div>
</div>
</footer>
</div>
<script type="text/javascript" src="styles/docfx.vendor.js"></script>
<script type="text/javascript" src="styles/docfx.js"></script>
<script type="text/javascript" src="styles/main.js"></script>
</body>
</html>
| {
"content_hash": "25d9fdddd6d51a3c3abea911607f9789",
"timestamp": "",
"source": "github",
"line_count": 267,
"max_line_length": 147,
"avg_line_length": 35.90262172284644,
"alnum_prop": 0.6421865220112665,
"repo_name": "RevenantX/LiteNetLib",
"id": "62e727745907874d6629fc873059b3fd314e0864",
"size": "9588",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "docs/index.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "54"
},
{
"name": "C#",
"bytes": "448089"
}
],
"symlink_target": ""
} |
require 'net/http'
require File.expand_path('../fixtures/http_server', __FILE__)
require File.expand_path('../shared/request_head', __FILE__)
describe "Net::HTTP#request_head" do
it_behaves_like :net_ftp_request_head, :request_head
end
| {
"content_hash": "e53191cce095c38608a8eab34cfdf4aa",
"timestamp": "",
"source": "github",
"line_count": 7,
"max_line_length": 61,
"avg_line_length": 34.142857142857146,
"alnum_prop": 0.7154811715481172,
"repo_name": "rubysl/rubysl-net-http",
"id": "3cde4c269ea7c6ef163193e3352a176c1dc9550a",
"size": "239",
"binary": false,
"copies": "1",
"ref": "refs/heads/2.0",
"path": "spec/http/request_head_spec.rb",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Ruby",
"bytes": "218289"
}
],
"symlink_target": ""
} |
package cqrs
// InMemoryEventBus provides an inmemory implementation of the VersionedEventPublisher VersionedEventReceiver interfaces
type InMemoryEventBus struct {
publishedEventsChannel chan VersionedEvent
startReceiving bool
}
// NewInMemoryEventBus constructor
func NewInMemoryEventBus() *InMemoryEventBus {
publishedEventsChannel := make(chan VersionedEvent, 0)
return &InMemoryEventBus{publishedEventsChannel, false}
}
// PublishEvents publishes events to the event bus
func (bus *InMemoryEventBus) PublishEvents(events []VersionedEvent) error {
for _, event := range events {
bus.publishedEventsChannel <- event
}
return nil
}
// ReceiveEvents starts a go routine that monitors incoming events and routes them to a receiver channel specified within the options
func (bus *InMemoryEventBus) ReceiveEvents(options VersionedEventReceiverOptions) error {
go func() {
for {
select {
case ch := <-options.Close:
ch <- nil
case versionedEvent := <-bus.publishedEventsChannel:
if err := options.ReceiveEvent(versionedEvent); err != nil {
}
}
}
}()
return nil
}
| {
"content_hash": "550149e558de47ef751932fc258d3e4f",
"timestamp": "",
"source": "github",
"line_count": 41,
"max_line_length": 133,
"avg_line_length": 27.21951219512195,
"alnum_prop": 0.7598566308243727,
"repo_name": "andrewwebber/cqrs",
"id": "4d1bc7809c7c4c64a86623ee80c28c9af0214a61",
"size": "1116",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "inmemory-eventbus.go",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Go",
"bytes": "101867"
},
{
"name": "Makefile",
"bytes": "717"
},
{
"name": "Shell",
"bytes": "433"
}
],
"symlink_target": ""
} |
from __future__ import absolute_import
from django.contrib import admin
from django.core.urlresolvers import reverse
from ..utils.compatibility import LTE_DJANGO_1_7
class PrimitivePermissionAwareModelAdmin(admin.ModelAdmin):
def has_add_permission(self, request):
# we don't have a "add" permission... but all adding is handled
# by special methods that go around these permissions anyway
# TODO: reactivate return False
return False
def has_change_permission(self, request, obj=None):
if hasattr(obj, 'has_edit_permission'):
if obj.has_edit_permission(request):
return True
else:
return False
else:
return True
def has_delete_permission(self, request, obj=None):
# we don't have a specific delete permission... so we use change
return self.has_change_permission(request, obj)
def _get_post_url(self, obj):
"""
Needed to retrieve the changelist url as Folder/File can be extended
and admin url may change
"""
# Code from django ModelAdmin to determine changelist on the fly
opts = obj._meta
if LTE_DJANGO_1_7:
model_name = opts.module_name
else:
model_name = opts.model_name
return reverse('admin:%s_%s_changelist' %
(opts.app_label, model_name),
current_app=self.admin_site.name)
| {
"content_hash": "e81e19cc0c77b50815262e5b96bf0692",
"timestamp": "",
"source": "github",
"line_count": 42,
"max_line_length": 76,
"avg_line_length": 34.95238095238095,
"alnum_prop": 0.6239782016348774,
"repo_name": "jakob-o/django-filer",
"id": "c7dc121ca9f3f0871bc3e6d67f41aeb45fe37ed4",
"size": "1492",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "filer/admin/permissions.py",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "CSS",
"bytes": "89790"
},
{
"name": "HTML",
"bytes": "80070"
},
{
"name": "JavaScript",
"bytes": "58473"
},
{
"name": "Python",
"bytes": "563685"
},
{
"name": "Ruby",
"bytes": "1157"
},
{
"name": "Shell",
"bytes": "246"
}
],
"symlink_target": ""
} |
<?php
class CausaController extends Controller {
/**
* @var string the default layout for the views. Defaults to '//layouts/column2', meaning
* using two-column layout. See 'protected/views/layouts/column2.php'.
*/
public $layout = '//layouts/column2';
/**
* @return array action filters
*/
public function filters() {
return array(
'rights', // perform access control for CRUD operations
);
}
/**
* Specifies the access control rules.
* This method is used by the 'accessControl' filter.
* @return array access control rules
*/
public function accessRules() {
return array(
array('allow', // allow all users to perform 'index' and 'view' actions
'actions' => array('index', 'view'),
'users' => array('*'),
),
array('allow', // allow authenticated user to perform 'create' and 'update' actions
'actions' => array('create', 'update'),
'users' => array('@'),
),
array('allow', // allow admin user to perform 'admin' and 'delete' actions
'actions' => array('admin', 'delete'),
'users' => array('admin'),
),
array('deny', // deny all users
'users' => array('*'),
),
);
}
/**
* Displays a particular model.
* @param integer $id the ID of the model to be displayed
*/
public function actionView($id) {
$this->render('view', array(
'model' => $this->loadModel($id),
));
}
/**
* Creates a new model.
* If creation is successful, the browser will be redirected to the 'view' page.
*/
public function actionCreate() {
$model = new Causa();
$model->nombre = $_POST['nombreCausa'];
$model->id_tipo_causa = $_POST['idTipoCausaCausa'];
$model->save();
$this->redirect(array('default/index'));
}
/**
* Updates a particular model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id the ID of the model to be updated
*/
public function actionUpdate() {
$modelCausa = new Causa();
$model = $modelCausa->findByPk($_POST['idCausaEditar']);
$model->nombre = $_POST['nombreCausaEditar'];
$model->id_tipo_causa = $_POST['idTipoCausaCausaEditar'];
$model->save();
$this->redirect(array('default/index'));
}
/**
* Deletes a particular model.
* If deletion is successful, the browser will be redirected to the 'admin' page.
* @param integer $id the ID of the model to be deleted
*/
public function actionDelete() {
$id = $_POST['idCausaEliminar'];
$this->loadModel($id)->delete();
// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser
$this->redirect(array('default/index'));
}
/**
* Lists all models.
*/
public function actionIndex() {
$dataProvider = new CActiveDataProvider('Causa');
$this->render('index', array(
'dataProvider' => $dataProvider,
));
}
/**
* Manages all models.
*/
public function actionAdmin() {
$model = new Causa('search');
$model->unsetAttributes(); // clear any default values
if (isset($_GET['Causa']))
$model->attributes = $_GET['Causa'];
$this->render('admin', array(
'model' => $model,
));
}
/**
* Returns the data model based on the primary key given in the GET variable.
* If the data model is not found, an HTTP exception will be raised.
* @param integer $id the ID of the model to be loaded
* @return Causa the loaded model
* @throws CHttpException
*/
public function loadModel($id) {
$model = Causa::model()->findByPk($id);
if ($model === null)
throw new CHttpException(404, 'The requested page does not exist.');
return $model;
}
/**
* Performs the AJAX validation.
* @param Causa $model the model to be validated
*/
protected function performAjaxValidation($model) {
if (isset($_POST['ajax']) && $_POST['ajax'] === 'causa-form') {
echo CActiveForm::validate($model);
Yii::app()->end();
}
}
}
| {
"content_hash": "160492b7fb1a619419e3be2a0a581ff5",
"timestamp": "",
"source": "github",
"line_count": 142,
"max_line_length": 106,
"avg_line_length": 31.654929577464788,
"alnum_prop": 0.5497219132369299,
"repo_name": "VrainSystem/Proyecto_PROFIT",
"id": "456a19f9f937f1c1a69c97495257376e5baacce4",
"size": "4495",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "protected/modules/InventarioRiesgo/controllers/CausaController.php",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ApacheConf",
"bytes": "112"
},
{
"name": "Batchfile",
"bytes": "1337"
},
{
"name": "CSS",
"bytes": "1004576"
},
{
"name": "HTML",
"bytes": "1703266"
},
{
"name": "Java",
"bytes": "102172"
},
{
"name": "JavaScript",
"bytes": "3563043"
},
{
"name": "PHP",
"bytes": "18688515"
}
],
"symlink_target": ""
} |
This plugin allows to create service users in Gerrit.
A service user is a user that is used by another service to communicate
with Gerrit. E.g. a service user is needed to run the
[Gerrit Trigger Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Gerrit+Trigger)
in Jenkins. A service user is not able to login into the Gerrit WebUI
and it cannot push commits or tags.
This plugin supports the creation of service users via [SSH](cmd-create.md) and
[REST](rest-api-config.md).
To create a service user a user must be a member of a group that is
granted the 'Create Service User' capability (provided by this plugin)
or the 'Administrate Server' capability.
The plugin can be [configured to automatically add new service users to
groups](config.md#group). This allows to automatically assign or
block certain access rights for the service users.
For each created service user the plugin stores some
[properties](#properties).
<a id="properties"></a>
Service User Properties
-----------------------
The service user properties are stored in the `refs/meta/config` branch
of the `All-Projects` project in the file `@[email protected]`, which is a
Git config file:
```
[user "build-bot"]
createdBy = jdoe
createdAt = Wed, 13 Nov 2013 14:31:11 +0100
[user "voter"]
createdBy = jroe
createdAt = Wed, 13 Nov 2013 14:45:00 +0100
```
<a id="createdBy"></a>
`user.<service-user-name>.createdBy`
: The username of the user who created the service user.
<a id="createdAt"></a>
`user.<service-user-name>.createdAt`
: The date when the service user was created.
| {
"content_hash": "115f118e4c5379f0f3d173ad252d95c2",
"timestamp": "",
"source": "github",
"line_count": 46,
"max_line_length": 83,
"avg_line_length": 34.17391304347826,
"alnum_prop": 0.7360050890585241,
"repo_name": "GerritCodeReview/plugins_serviceuser",
"id": "e19d85662c67bea912306a774bbbf3d762bb32f9",
"size": "1572",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/resources/Documentation/about.md",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "HTML",
"bytes": "20348"
},
{
"name": "Java",
"bytes": "103980"
},
{
"name": "JavaScript",
"bytes": "19832"
},
{
"name": "Python",
"bytes": "871"
},
{
"name": "Shell",
"bytes": "744"
},
{
"name": "Starlark",
"bytes": "2851"
}
],
"symlink_target": ""
} |
<?php
namespace Alphatrader\ApiBundle\Model;
use Doctrine\Common\Collections\ArrayCollection;
use JMS\Serializer\Annotation;
/**
* Class ListingProfile
*
* @package Alphatrader\ApiBundle\Model
* @Annotation\ExclusionPolicy("none")
* @SuppressWarnings(PHPMD)
*/
class ListingProfile
{
use DateTrait;
/**
* @var Bond
* @Annotation\Type("Alphatrader\ApiBundle\Model\Bond")
* @Annotation\SerializedName("bond")
*/
private $bond;
/**
* @var CompanyCompactProfile
* @Annotation\Type("Alphatrader\ApiBundle\Model\CompanyCompactProfile")
* @Annotation\SerializedName("company")
*/
private $company;
/**
* @var PriceSpread
* @Annotation\Type("Alphatrader\ApiBundle\Model\PriceSpread")
* @Annotation\SerializedName("currentSpread")
*/
private $currentSpread;
/**
* @var SecuritySponsorship[]
* @Annotation\Type("ArrayCollection<Alphatrader\ApiBundle\Model\SecuritySponsorship>")
* @Annotation\SerializedName("designatedSponsors")
*/
private $designatedSponsors;
/**
* @Annotation\Type("string")
* @Annotation\SerializedName("id")
*/
private $id;
/**
* @var SecurityOrderLogEntry
* @Annotation\Type("Alphatrader\ApiBundle\Model\SecurityOrderLogEntry")
* @Annotation\SerializedName("lastOrderLogEntry")
*/
private $lastOrderLogEntry;
/**
* @var SecurityPrice
* @Annotation\Type("Alphatrader\ApiBundle\Model\SecurityPrice")
* @Annotation\SerializedName("lastPrice")
*/
private $lastPrice;
/**
* @var float
* @Annotation\Type("float")
* @Annotation\SerializedName("marketCap")
*/
private $marketCap;
/**
* @var string
* @Annotation\Type("string")
* @Annotation\SerializedName("name")
*/
private $name;
/**
* @var integer
* @Annotation\Type("integer")
* @Annotation\SerializedName("outstandingShares")
*/
private $outstandingShares;
/**
* @var ArrayCollection<SecurityPrice>
* @Annotation\Type("ArrayCollection<Alphatrader\ApiBundle\Model\SecurityPrice>")
* @Annotation\SerializedName("prices14d")
*/
private $prices14d;
/**
* @var string
* @Annotation\Type("string")
* @Annotation\SerializedName("securityIdentifier")
*/
private $securityIdentifier;
/**
* @var Bond
* @Annotation\Type("Alphatrader\ApiBundle\Model\SystemBond")
* @Annotation\SerializedName("systemBond")
*/
private $systemBond;
/**
* @var string
* @Annotation\Type("string")
* @Annotation\SerializedName("type")
*/
private $type;
/**
* @var ShareholderStake
* @Annotation\Type("Alphatrader\ApiBundle\Model\ShareholderStake")
* @Annotation\SerializedName("shareholderStake")
*/
private $shareholderStake;
/**
* @return ShareholderStake
*/
public function getShareholderStake()
{
return $this->shareholderStake;
}
/**
* @param ShareholderStake $shareholderStake
*/
public function setShareholderStake($shareholderStake)
{
$this->shareholderStake = $shareholderStake;
}
/**
* @return Bond
*/
public function getBond()
{
return $this->bond;
}
/**
* @param Bond $bond
*/
public function setBond($bond)
{
$this->bond = $bond;
}
/**
* @return CompanyCompactProfile
*/
public function getCompany()
{
return $this->company;
}
/**
* @param CompanyCompactProfile $company
*/
public function setCompany($company)
{
$this->company = $company;
}
/**
* @return PriceSpread
*/
public function getCurrentSpread()
{
return $this->currentSpread;
}
/**
* @param PriceSpread $currentSpread
*/
public function setCurrentSpread($currentSpread)
{
$this->currentSpread = $currentSpread;
}
/**
* @return SecuritySponsorship[]
*/
public function getDesignatedSponsors()
{
return $this->designatedSponsors;
}
/**
* @param SecuritySponsorship[] $designatedSponsors
*/
public function setDesignatedSponsors($designatedSponsors)
{
$this->designatedSponsors = $designatedSponsors;
}
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @param mixed $id
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return SecurityOrderLogEntry
*/
public function getLastOrderLogEntry()
{
return $this->lastOrderLogEntry;
}
/**
* @param SecurityOrderLogEntry $lastOrderLogEntry
*/
public function setLastOrderLogEntry($lastOrderLogEntry)
{
$this->lastOrderLogEntry = $lastOrderLogEntry;
}
/**
* @return SecurityPrice
*/
public function getLastPrice()
{
return $this->lastPrice;
}
/**
* @param SecurityPrice $lastPrice
*/
public function setLastPrice($lastPrice)
{
$this->lastPrice = $lastPrice;
}
/**
* @return float
*/
public function getMarketCap()
{
return $this->marketCap;
}
/**
* @param float $marketCap
*/
public function setMarketCap($marketCap)
{
$this->marketCap = $marketCap;
}
/**
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return int
*/
public function getOutstandingShares()
{
return $this->outstandingShares;
}
/**
* @param int $outstandingShares
*/
public function setOutstandingShares($outstandingShares)
{
$this->outstandingShares = $outstandingShares;
}
/**
* @return ArrayCollection<SecurityPrice>
*/
public function getPrices14d()
{
return $this->prices14d;
}
/**
* @param ArrayCollection<SecurityPrice> $prices14d
*/
public function setPrices14d($prices14d)
{
$this->prices14d = $prices14d;
}
/**
* @return string
*/
public function getSecurityIdentifier()
{
return $this->securityIdentifier;
}
/**
* @param string $securityIdentifier
*/
public function setSecurityIdentifier($securityIdentifier)
{
$this->securityIdentifier = $securityIdentifier;
}
/**
* @return Bond
*/
public function getSystemBond()
{
return $this->systemBond;
}
/**
* @param Bond $systemBond
*/
public function setSystemBond($systemBond)
{
$this->systemBond = $systemBond;
}
/**
* @return string
*/
public function getType()
{
return $this->type;
}
/**
* @param string $type
*/
public function setType($type)
{
$this->type = $type;
}
/**
* @return mixed
*/
public function getName()
{
if (null !== $this->name) {
return $this->name;
}
if (null !== $this->bond) {
return $this->bond->getName();
}
if (null !== $this->company) {
return $this->company->getName();
}
if (null !== $this->systemBond) {
return $this->systemBond->getName();
}
return null;
}
/**
* @return string
*/
public function getIssuerName()
{
if (null !== $this->company) {
return $this->getCompany()->getName();
}
if (null !== $this->bond) {
return $this->getBond()->getIssuer()->getName();
}
return "Central Bank";
}
/**
* @return mixed
*/
public function getIssuerSecurityIdentifier()
{
if (null !== $this->company || null !== $this->systemBond) {
return $this->securityIdentifier;
}
if (null !== $this->bond) {
return $this->getBond()->getIssuer()->getListing()->getSecurityIdentifier();
}
return null;
}
/**
* @return Bond
*/
public function getBondOrSystemBond()
{
if (null !== $this->bond) {
return $this->bond;
}
return $this->systemBond;
}
/**
* @return float|int|string
*/
public function getPriceGain()
{
/**
* @var SecurityPrice[] $prices14d
*/
$prices14d = $this->prices14d;
$size = count($prices14d);
if ($size < 2) {
return 0;
}
$currentPrice = $prices14d[$size - 1]->getValue();
$lastPrice = $prices14d[$size - 2]->getValue();
$res = (($currentPrice / $lastPrice) - 1) * 100;
if (empty($res)) {
return "0.00";
}
return $res;
}
/**
* @return SecurityPrice|null
*/
public function getPreviousPriceDate()
{
/**
* @var SecurityPrice[] $prices14d
*/
$prices14d = $this->prices14d;
$size = count($prices14d);
if ($size < 2) {
return null;
}
$lastPriceDate = $prices14d[$size - 2]->getDate();
return $lastPriceDate;
}
/**
* @return string
*/
public function getPrices14dDates()
{
if (empty($this->prices14d)) {
return "";
}
return implode(
',',
array_map(
function ($securityprice) {
$date = $securityprice instanceof SecurityPrice
? $securityprice->getDate()->getTimestamp() : $securityprice['date'] / 1000;
$seconds = $date;
return '"' . date("d.m.", $seconds) . '"';
},
$this->prices14d->toArray()
)
);
}
/**
* @return string
*/
public function getPrices14dValues()
{
if (empty($this->prices14d)) {
return "";
}
return implode(
',',
array_map(
function ($securityprice) {
return $securityprice instanceof SecurityPrice
? $securityprice->getValue() : $securityprice['value'];
},
$this->prices14d->toArray()
)
);
}
}
| {
"content_hash": "31939ad373a8656f7e98b9aaeb8f1e10",
"timestamp": "",
"source": "github",
"line_count": 504,
"max_line_length": 100,
"avg_line_length": 20.9265873015873,
"alnum_prop": 0.5366454916089883,
"repo_name": "Tr0nYx/AlphaTraderApiBundle",
"id": "edba3a9e26ff0c3bb5eee933ec5d672b24a66859",
"size": "10547",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "src/Model/ListingProfile.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "PHP",
"bytes": "523842"
}
],
"symlink_target": ""
} |
#ifndef __GST_GL_GBM_PRIVATE_H__
#define __GST_GL_GBM_PRIVATE_H__
#include <gbm.h>
#include <xf86drm.h>
#include <xf86drmMode.h>
#include <gst/gst.h>
typedef struct _GstGLDRMFramebuffer GstGLDRMFramebuffer;
struct _GstGLDRMFramebuffer
{
struct gbm_bo *bo;
guint32 fb_id;
};
const gchar* gst_gl_gbm_get_name_for_drm_connector (drmModeConnector * connector);
const gchar* gst_gl_gbm_get_name_for_drm_encoder (drmModeEncoder * encoder);
const gchar* gst_gl_gbm_format_to_string (guint32 format);
int gst_gl_gbm_depth_from_format (guint32 format);
int gst_gl_gbm_bpp_from_format (guint32 format);
GstGLDRMFramebuffer* gst_gl_gbm_drm_fb_get_from_bo (struct gbm_bo *bo);
int gst_gl_gbm_find_and_open_drm_node (void);
#endif /* __GST_GL_DISPLAY_GBM_UTILS_H__ */
| {
"content_hash": "31d5d196c7be08554eeb92473576b4cb",
"timestamp": "",
"source": "github",
"line_count": 31,
"max_line_length": 82,
"avg_line_length": 24.838709677419356,
"alnum_prop": 0.7285714285714285,
"repo_name": "google/aistreams",
"id": "c50029724b12a83e4e730228674e6314d352f038",
"size": "1599",
"binary": false,
"copies": "7",
"ref": "refs/heads/master",
"path": "third_party/gst-plugins-base/gst-libs/gst/gl/gbm/gstgl_gbm_utils.h",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C",
"bytes": "77741"
},
{
"name": "C++",
"bytes": "626396"
},
{
"name": "Python",
"bytes": "41809"
},
{
"name": "Starlark",
"bytes": "56595"
}
],
"symlink_target": ""
} |
// -*- C++ -*-
//=============================================================================
/**
* @file Codecs.h
*
* @author Krishnakumar B <[email protected]>
*
* Codecs is a generic wrapper for various encoding and decoding
* mechanisms. Currently it includes Base64 content transfer-encoding as
* specified by RFC 2045, Multipurpose Internet Mail Extensions (MIME) Part
* One: Format of Internet Message Bodies.
*/
//=============================================================================
#ifndef ACE_CODECS_H
#define ACE_CODECS_H
#include /**/ "ace/pre.h"
#include /**/ "ace/ACE_export.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/Basic_Types.h"
#include "ace/Global_Macros.h"
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
/**
* @class ACE_Base64
*
* @brief Encode/Decode a stream of bytes according to Base64 encoding.
*
* This class provides methods to encode or decode a stream of bytes
* to/from Base64 encoding. It doesn't convert the input stream to a
* canonical form before encoding.
*/
class ACE_Export ACE_Base64
{
public:
//@{
/**
* Encodes a stream of bytes to Base64 data
*
* @param input Binary data in byte stream.
* @param input_len Length of the byte stream.
* @param output_len Length of the encoded Base64 byte stream.
* @param is_chunked If true, terminate 72 character blocks with newline
* @return Encoded Base64 data in byte stream or NULL if input data cannot
* be encoded.
*/
static ACE_Byte* encode (const ACE_Byte* input,
const size_t input_len,
size_t* output_len,
bool is_chunked = true);
/**
* Decodes a stream of Base64 to bytes data
*
* @param input Encoded Base64 data in byte stream.
* @param output_len Length of the binary byte stream.
* @return Binary data in byte stream or NULL if input data cannot
* be encoded.
*/
static ACE_Byte* decode (const ACE_Byte* input,
size_t* output_len);
/**
* Return the length of the encoded input data
*
* @param input Encoded Base64 data in byte stream.
* @return Length of the encoded Base64 data.
*
*/
static size_t length (const ACE_Byte* input);
//@}
protected:
// Prevent default construction.
ACE_Base64 (void) {}
private:
// Preventing copying and assignment.
ACE_Base64 (ACE_Base64 const &);
ACE_Base64 & operator= (ACE_Base64 const &);
/// Initialize the tables for encoding/decoding.
static void init (void);
private:
/// Alphabet used for decoding i.e decoder_[alphabet_[i = 0..63]] = i
static ACE_Byte decoder_[];
/// Alphabet used to check valid range of encoded input i.e
/// member_[alphabet_[0..63]] = 1
static ACE_Byte member_[];
/// Boolean to denote whether initialization is complete
static bool init_;
};
ACE_END_VERSIONED_NAMESPACE_DECL
#include /**/ "ace/post.h"
#endif /* ACE_CODECS_H */
| {
"content_hash": "ca7283e9585a252b0c6295bcdfc16f4d",
"timestamp": "",
"source": "github",
"line_count": 116,
"max_line_length": 79,
"avg_line_length": 26.129310344827587,
"alnum_prop": 0.6172880237545365,
"repo_name": "wfnex/openbras",
"id": "f8d68639753354a39c9eb5203261c38598380c88",
"size": "3031",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "src/ace/ACE_wrappers/ace/Codecs.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Assembly",
"bytes": "14862"
},
{
"name": "Batchfile",
"bytes": "4261"
},
{
"name": "C",
"bytes": "13613148"
},
{
"name": "C++",
"bytes": "20488678"
},
{
"name": "CSS",
"bytes": "40942"
},
{
"name": "Emacs Lisp",
"bytes": "104244"
},
{
"name": "Gnuplot",
"bytes": "48840"
},
{
"name": "HTML",
"bytes": "2553584"
},
{
"name": "Java",
"bytes": "120574"
},
{
"name": "LLVM",
"bytes": "4067"
},
{
"name": "Logos",
"bytes": "162"
},
{
"name": "Lua",
"bytes": "79957"
},
{
"name": "M4",
"bytes": "8638"
},
{
"name": "Makefile",
"bytes": "5632150"
},
{
"name": "Max",
"bytes": "84390"
},
{
"name": "Objective-C",
"bytes": "32394"
},
{
"name": "Perl",
"bytes": "1406609"
},
{
"name": "Perl 6",
"bytes": "2356"
},
{
"name": "PostScript",
"bytes": "152076"
},
{
"name": "Python",
"bytes": "1450179"
},
{
"name": "Roff",
"bytes": "740"
},
{
"name": "Ruby",
"bytes": "4020"
},
{
"name": "Shell",
"bytes": "187908"
},
{
"name": "Tcl",
"bytes": "397"
},
{
"name": "Yacc",
"bytes": "17850"
}
],
"symlink_target": ""
} |
package org.joyrest.context.helper.aspects;
import org.joyrest.interceptor.Interceptor;
import org.joyrest.interceptor.InterceptorChain;
import org.joyrest.model.request.InternalRequest;
import org.joyrest.model.response.InternalResponse;
public class DuplicatedInterceptor implements Interceptor {
@Override
public InternalResponse<Object> around(InterceptorChain chain,
InternalRequest<Object> request, InternalResponse<Object> response) {
return null;
}
@Override
public int getOrder() {
return -50;
}
}
| {
"content_hash": "feaaa5ba1c9c266388ea4bacd91c7d4c",
"timestamp": "",
"source": "github",
"line_count": 22,
"max_line_length": 112,
"avg_line_length": 27.09090909090909,
"alnum_prop": 0.709731543624161,
"repo_name": "petrbouda/joyrest",
"id": "c63853e0bca59672564d12e8180fcfc2eb7e26b7",
"size": "1189",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "joyrest-core/src/test/java/org/joyrest/context/helper/aspects/DuplicatedInterceptor.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "620430"
}
],
"symlink_target": ""
} |
<!--
~ 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.
~
~ Copyright 2014 Redwarp
-->
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>
| {
"content_hash": "647dc481f89d5b01012cfd3cdaca0665",
"timestamp": "",
"source": "github",
"line_count": 21,
"max_line_length": 76,
"avg_line_length": 39.04761904761905,
"alnum_prop": 0.7134146341463414,
"repo_name": "redwarp/Download-Count-For-GitHub",
"id": "fe009be5bd0dd731f67e8b7b89392db6fc799b65",
"size": "820",
"binary": false,
"copies": "2",
"ref": "refs/heads/develop",
"path": "app/src/main/res/values/dimens.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "39436"
}
],
"symlink_target": ""
} |
.. highlight:: cython
.. _sharing-declarations:
********************************************
Sharing Declarations Between Cython Modules
********************************************
This section describes how to make C declarations, functions and extension
types in one Cython module available for use in another Cython module.
These facilities are closely modeled on the Python import mechanism,
and can be thought of as a compile-time version of it.
Definition and Implementation files
====================================
A Cython module can be split into two parts: a definition file with a ``.pxd``
suffix, containing C declarations that are to be available to other Cython
modules, and an implementation file with a ``.pyx`` suffix, containing
everything else. When a module wants to use something declared in another
module's definition file, it imports it using the :keyword:`cimport`
statement.
A ``.pxd`` file that consists solely of extern declarations does not need
to correspond to an actual ``.pyx`` file or Python module. This can make it a
convenient place to put common declarations, for example declarations of
functions from an :ref:`external library <external-C-code>` that one
wants to use in several modules.
What a Definition File contains
================================
A definition file can contain:
* Any kind of C type declaration.
* extern C function or variable declarations.
* Declarations of C functions defined in the module.
* The definition part of an extension type (see below).
It cannot contain the implementations of any C or Python functions, or any
Python class definitions, or any executable statements. It is needed when one
wants to access :keyword:`cdef` attributes and methods, or to inherit from
:keyword:`cdef` classes defined in this module.
.. note::
You don't need to (and shouldn't) declare anything in a declaration file
public in order to make it available to other Cython modules; its mere
presence in a definition file does that. You only need a public
declaration if you want to make something available to external C code.
What an Implementation File contains
======================================
An implementation file can contain any kind of Cython statement, although there
are some restrictions on the implementation part of an extension type if the
corresponding definition file also defines that type (see below).
If one doesn't need to :keyword:`cimport` anything from this module, then this
is the only file one needs.
.. _cimport:
The cimport statement
=======================
The :keyword:`cimport` statement is used in a definition or
implementation file to gain access to names declared in another definition
file. Its syntax exactly parallels that of the normal Python import
statement::
cimport module [, module...]
from module cimport name [as name] [, name [as name] ...]
Here is an example. :file:`dishes.pxd` is a definition file which exports a
C data type. :file:`restaurant.pyx` is an implementation file which imports and
uses it.
:file:`dishes.pxd`::
cdef enum otherstuff:
sausage, eggs, lettuce
cdef struct spamdish:
int oz_of_spam
otherstuff filler
:file:`restaurant.pyx`::
cimport dishes
from dishes cimport spamdish
cdef void prepare(spamdish *d):
d.oz_of_spam = 42
d.filler = dishes.sausage
def serve():
cdef spamdish d
prepare(&d)
print "%d oz spam, filler no. %d" % (d.oz_of_spam, d.filler)
It is important to understand that the :keyword:`cimport` statement can only
be used to import C data types, C functions and variables, and extension
types. It cannot be used to import any Python objects, and (with one
exception) it doesn't imply any Python import at run time. If you want to
refer to any Python names from a module that you have cimported, you will have
to include a regular import statement for it as well.
The exception is that when you use :keyword:`cimport` to import an extension type, its
type object is imported at run time and made available by the name under which
you imported it. Using :keyword:`cimport` to import extension types is covered in more
detail below.
If a ``.pxd`` file changes, any modules that :keyword:`cimport` from it may need to be
recompiled. The ``Cython.Build.cythonize`` utility can take care of this for you.
Search paths for definition files
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
When you :keyword:`cimport` a module called ``modulename``, the Cython
compiler searches for a file called :file:`modulename.pxd`.
It searches for this file along the path for include files
(as specified by ``-I`` command line options or the ``include_path``
option to ``cythonize()``), as well as ``sys.path``.
Using ``package_data`` to install ``.pxd`` files in your ``setup.py`` script
allows other packages to cimport items from your module as a dependency.
Also, whenever you compile a file :file:`modulename.pyx`, the corresponding
definition file :file:`modulename.pxd` is first searched for along the
include path (but not ``sys.path``), and if found, it is processed before
processing the ``.pyx`` file.
Using cimport to resolve naming conflicts
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The :keyword:`cimport` mechanism provides a clean and simple way to solve the
problem of wrapping external C functions with Python functions of the same
name. All you need to do is put the extern C declarations into a ``.pxd`` file
for an imaginary module, and :keyword:`cimport` that module. You can then
refer to the C functions by qualifying them with the name of the module.
Here's an example:
:file:`c_lunch.pxd`::
cdef extern from "lunch.h":
void eject_tomato(float)
:file:`lunch.pyx`::
cimport c_lunch
def eject_tomato(float speed):
c_lunch.eject_tomato(speed)
You don't need any :file:`c_lunch.pyx` file, because the only things defined
in :file:`c_lunch.pxd` are extern C entities. There won't be any actual
``c_lunch`` module at run time, but that doesn't matter; the
:file:`c_lunch.pxd` file has done its job of providing an additional namespace
at compile time.
Sharing C Functions
===================
C functions defined at the top level of a module can be made available via
:keyword:`cimport` by putting headers for them in the ``.pxd`` file, for
example:
:file:`volume.pxd`::
cdef float cube(float)
:file:`volume.pyx`::
cdef float cube(float x):
return x * x * x
:file:`spammery.pyx`::
from volume cimport cube
def menu(description, size):
print description, ":", cube(size), \
"cubic metres of spam"
menu("Entree", 1)
menu("Main course", 3)
menu("Dessert", 2)
.. note::
When a module exports a C function in this way, an object appears in the
module dictionary under the function's name. However, you can't make use of
this object from Python, nor can you use it from Cython using a normal import
statement; you have to use :keyword:`cimport`.
Sharing Extension Types
=======================
An extension type can be made available via :keyword:`cimport` by splitting
its definition into two parts, one in a definition file and the other in the
corresponding implementation file.
The definition part of the extension type can only declare C attributes and C
methods, not Python methods, and it must declare all of that type's C
attributes and C methods.
The implementation part must implement all of the C methods declared in the
definition part, and may not add any further C attributes. It may also define
Python methods.
Here is an example of a module which defines and exports an extension type,
and another module which uses it:
:file:`Shrubbing.pxd`::
cdef class Shrubbery:
cdef int width
cdef int length
:file:`Shrubbing.pyx`::
cdef class Shrubbery:
def __cinit__(self, int w, int l):
self.width = w
self.length = l
def standard_shrubbery():
return Shrubbery(3, 7)
:file:`Landscaping.pyx`::
cimport Shrubbing
import Shrubbing
cdef Shrubbing.Shrubbery sh
sh = Shrubbing.standard_shrubbery()
print "Shrubbery size is %d x %d" % (sh.width, sh.length)
One would then need to compile both of these modules, e.g. using
:file:`setup.py`::
from distutils.core import setup
from Cython.Build import cythonize
setup(ext_modules = cythonize(["Landscaping.pyx", "Shrubbing.pyx"]))
Some things to note about this example:
* There is a :keyword:`cdef` class Shrubbery declaration in both
:file:`Shrubbing.pxd` and :file:`Shrubbing.pyx`. When the Shrubbing module
is compiled, these two declarations are combined into one.
* In Landscaping.pyx, the :keyword:`cimport` Shrubbing declaration allows us
to refer to the Shrubbery type as :class:`Shrubbing.Shrubbery`. But it
doesn't bind the name Shrubbing in Landscaping's module namespace at run
time, so to access :func:`Shrubbing.standard_shrubbery` we also need to
``import Shrubbing``.
| {
"content_hash": "36df8837ff8615189ecb798fffa1a1da",
"timestamp": "",
"source": "github",
"line_count": 265,
"max_line_length": 87,
"avg_line_length": 34.72830188679245,
"alnum_prop": 0.698359230685646,
"repo_name": "c-blake/cython",
"id": "63807bb5b89bc30e89dc76fe7435d098192dc0c9",
"size": "9203",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "docs/src/userguide/sharing_declarations.rst",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "1429"
},
{
"name": "C",
"bytes": "476635"
},
{
"name": "C++",
"bytes": "23080"
},
{
"name": "CSS",
"bytes": "11543"
},
{
"name": "Emacs Lisp",
"bytes": "11931"
},
{
"name": "HTML",
"bytes": "112723"
},
{
"name": "JavaScript",
"bytes": "15703"
},
{
"name": "Makefile",
"bytes": "5078"
},
{
"name": "PowerShell",
"bytes": "3803"
},
{
"name": "Python",
"bytes": "5421452"
},
{
"name": "Smalltalk",
"bytes": "618"
}
],
"symlink_target": ""
} |
using StageMaker.models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using static StageMaker.StageMaker;
using static StageMaker.utils.DataGridViewHelper;
namespace StageMaker.utils
{
public class JsonGridHelper
{
public static void insertParticleMove(DataGridView particleMove, ParticleMoveEvent ev)
{
object time = null;
if (ev.time >= 0)
time = new JsonFloat(ev.time);
object particleId = null;
if (ev.particleId >= 0)
particleId = ev.particleId;
object speed = null;
if (!float.IsNaN(ev.speed))
speed = new JsonFloat(ev.speed);
particleMove.Rows.Add(time, particleId, ev.position, ev.destination, ev.direction, speed);
}
public static void insertMove(DataGridView move, MoveEvent ev)
{
object time = null;
if (ev.time >= 0)
time = new JsonFloat(ev.time);
object targetId = null;
if (ev.targetId >= 0)
targetId = ev.targetId;
object speed = null;
if (!float.IsNaN(ev.speed))
speed = new JsonFloat(ev.speed);
object fspeed = null;
if (!float.IsNaN(ev.fspeed))
fspeed = new JsonFloat(ev.fspeed);
move.Rows.Add(time, targetId, ev.destination, ev.direction, speed, ev.fdirection, fspeed);
}
public static void insertShoot(DataGridView shoot, ShootEvent ev)
{
object time = null;
if (ev.time >= 0)
time = new JsonFloat(ev.time);
object targetId = null;
if (ev.targetId >= 0)
targetId = ev.targetId;
object speed = null;
if (!float.IsNaN(ev.bullet.speed))
speed = new JsonFloat(ev.bullet.speed);
shoot.Rows.Add(time, ev.bullet.id, targetId, ev.bullet.position, ev.bullet.destination, ev.bullet.direction, speed, ev.bullet.type);
}
public static void insertEnemy(DataGridView enemies, CreateEvent ev)
{
object time = null;
if (ev.time >= 0)
time = new JsonFloat(ev.time);
object health = null;
if (ev.target.health >= 0)
health = ev.target.health;
object speed = null;
if (!float.IsNaN(ev.target.speed))
speed = new JsonFloat(ev.target.speed);
object fspeed = null;
if (!float.IsNaN(ev.target.fspeed))
fspeed = new JsonFloat(ev.target.fspeed);
enemies.Rows.Add(time, ev.target.type, health, ev.target.position, ev.target.destination, ev.target.direction, speed, ev.target.fdirection, fspeed);
}
public static T parseCellValue<T>(DataGridViewRow row, string columnName) //generics abuse but w/e
{
object result = null;
if (typeof(float) == typeof(T))
{
if (row.Cells[columnName].Value == null)
{
result = float.NaN;
}
else
{
result = ((JsonFloat)(row.Cells[columnName].Value)).f;
}
}
else if (typeof(string) == typeof(T))
{
result = (string)row.Cells[columnName].Value;
}
else if (typeof(long) == typeof(T))
{
if (row.Cells[columnName].Value == null)
{
result = (long)-1;
}
else
{
result = (long)row.Cells[columnName].Value;
}
}
return (T)result;
}
}
}
| {
"content_hash": "28379881ca170460b88ca6dc9fad1c99",
"timestamp": "",
"source": "github",
"line_count": 124,
"max_line_length": 160,
"avg_line_length": 31.68548387096774,
"alnum_prop": 0.5153983201832527,
"repo_name": "PeaceMaker503/danmaku-game",
"id": "603f366c80f23e174b59752ba13c8350e73363f8",
"size": "3931",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "stage_maker/StageMaker/utils/JsonGridHelper.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "234"
},
{
"name": "C",
"bytes": "120013"
},
{
"name": "C#",
"bytes": "235022"
},
{
"name": "HLSL",
"bytes": "5140"
},
{
"name": "Lex",
"bytes": "1221"
},
{
"name": "PowerShell",
"bytes": "3737"
},
{
"name": "SourcePawn",
"bytes": "1336"
},
{
"name": "Yacc",
"bytes": "11799"
}
],
"symlink_target": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.