code stringlengths 4 991k | repo_name stringlengths 6 116 | path stringlengths 4 249 | language stringclasses 30 values | license stringclasses 15 values | size int64 4 991k | input_ids listlengths 502 502 | token_type_ids listlengths 502 502 | attention_mask listlengths 502 502 | labels listlengths 502 502 |
|---|---|---|---|---|---|---|---|---|---|
package com.tlf.msg.platform.domain;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class ConfigExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
protected Integer begin;
protected Integer end;
protected Integer start;
protected Integer rows;
public ConfigExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
public void setBegin(Integer begin) {
this.begin = begin;
}
public Integer getBegin() {
return begin;
}
public void setEnd(Integer end) {
this.end = end;
}
public Integer getEnd() {
return end;
}
public void setStart(Integer start) {
this.start = start;
}
public Integer getStart() {
return start;
}
public void setRows(Integer rows) {
this.rows = rows;
}
public Integer getRows() {
return rows;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andEntityOidIsNull() {
addCriterion("ENTITY_OID is null");
return (Criteria) this;
}
public Criteria andEntityOidIsNotNull() {
addCriterion("ENTITY_OID is not null");
return (Criteria) this;
}
public Criteria andEntityOidEqualTo(Long value) {
addCriterion("ENTITY_OID =", value, "entityOid");
return (Criteria) this;
}
public Criteria andEntityOidNotEqualTo(Long value) {
addCriterion("ENTITY_OID <>", value, "entityOid");
return (Criteria) this;
}
public Criteria andEntityOidGreaterThan(Long value) {
addCriterion("ENTITY_OID >", value, "entityOid");
return (Criteria) this;
}
public Criteria andEntityOidGreaterThanOrEqualTo(Long value) {
addCriterion("ENTITY_OID >=", value, "entityOid");
return (Criteria) this;
}
public Criteria andEntityOidLessThan(Long value) {
addCriterion("ENTITY_OID <", value, "entityOid");
return (Criteria) this;
}
public Criteria andEntityOidLessThanOrEqualTo(Long value) {
addCriterion("ENTITY_OID <=", value, "entityOid");
return (Criteria) this;
}
public Criteria andEntityOidIn(List<Long> values) {
addCriterion("ENTITY_OID in", values, "entityOid");
return (Criteria) this;
}
public Criteria andEntityOidNotIn(List<Long> values) {
addCriterion("ENTITY_OID not in", values, "entityOid");
return (Criteria) this;
}
public Criteria andEntityOidBetween(Long value1, Long value2) {
addCriterion("ENTITY_OID between", value1, value2, "entityOid");
return (Criteria) this;
}
public Criteria andEntityOidNotBetween(Long value1, Long value2) {
addCriterion("ENTITY_OID not between", value1, value2, "entityOid");
return (Criteria) this;
}
public Criteria andConfigCodeIsNull() {
addCriterion("CONFIG_CODE is null");
return (Criteria) this;
}
public Criteria andConfigCodeIsNotNull() {
addCriterion("CONFIG_CODE is not null");
return (Criteria) this;
}
public Criteria andConfigCodeEqualTo(String value) {
addCriterion("CONFIG_CODE =", value, "configCode");
return (Criteria) this;
}
public Criteria andConfigCodeNotEqualTo(String value) {
addCriterion("CONFIG_CODE <>", value, "configCode");
return (Criteria) this;
}
public Criteria andConfigCodeGreaterThan(String value) {
addCriterion("CONFIG_CODE >", value, "configCode");
return (Criteria) this;
}
public Criteria andConfigCodeGreaterThanOrEqualTo(String value) {
addCriterion("CONFIG_CODE >=", value, "configCode");
return (Criteria) this;
}
public Criteria andConfigCodeLessThan(String value) {
addCriterion("CONFIG_CODE <", value, "configCode");
return (Criteria) this;
}
public Criteria andConfigCodeLessThanOrEqualTo(String value) {
addCriterion("CONFIG_CODE <=", value, "configCode");
return (Criteria) this;
}
public Criteria andConfigCodeLike(String value) {
addCriterion("CONFIG_CODE like", value, "configCode");
return (Criteria) this;
}
public Criteria andConfigCodeNotLike(String value) {
addCriterion("CONFIG_CODE not like", value, "configCode");
return (Criteria) this;
}
public Criteria andConfigCodeIn(List<String> values) {
addCriterion("CONFIG_CODE in", values, "configCode");
return (Criteria) this;
}
public Criteria andConfigCodeNotIn(List<String> values) {
addCriterion("CONFIG_CODE not in", values, "configCode");
return (Criteria) this;
}
public Criteria andConfigCodeBetween(String value1, String value2) {
addCriterion("CONFIG_CODE between", value1, value2, "configCode");
return (Criteria) this;
}
public Criteria andConfigCodeNotBetween(String value1, String value2) {
addCriterion("CONFIG_CODE not between", value1, value2, "configCode");
return (Criteria) this;
}
public Criteria andConfigNameIsNull() {
addCriterion("CONFIG_NAME is null");
return (Criteria) this;
}
public Criteria andConfigNameIsNotNull() {
addCriterion("CONFIG_NAME is not null");
return (Criteria) this;
}
public Criteria andConfigNameEqualTo(String value) {
addCriterion("CONFIG_NAME =", value, "configName");
return (Criteria) this;
}
public Criteria andConfigNameNotEqualTo(String value) {
addCriterion("CONFIG_NAME <>", value, "configName");
return (Criteria) this;
}
public Criteria andConfigNameGreaterThan(String value) {
addCriterion("CONFIG_NAME >", value, "configName");
return (Criteria) this;
}
public Criteria andConfigNameGreaterThanOrEqualTo(String value) {
addCriterion("CONFIG_NAME >=", value, "configName");
return (Criteria) this;
}
public Criteria andConfigNameLessThan(String value) {
addCriterion("CONFIG_NAME <", value, "configName");
return (Criteria) this;
}
public Criteria andConfigNameLessThanOrEqualTo(String value) {
addCriterion("CONFIG_NAME <=", value, "configName");
return (Criteria) this;
}
public Criteria andConfigNameLike(String value) {
addCriterion("CONFIG_NAME like", value, "configName");
return (Criteria) this;
}
public Criteria andConfigNameNotLike(String value) {
addCriterion("CONFIG_NAME not like", value, "configName");
return (Criteria) this;
}
public Criteria andConfigNameIn(List<String> values) {
addCriterion("CONFIG_NAME in", values, "configName");
return (Criteria) this;
}
public Criteria andConfigNameNotIn(List<String> values) {
addCriterion("CONFIG_NAME not in", values, "configName");
return (Criteria) this;
}
public Criteria andConfigNameBetween(String value1, String value2) {
addCriterion("CONFIG_NAME between", value1, value2, "configName");
return (Criteria) this;
}
public Criteria andConfigNameNotBetween(String value1, String value2) {
addCriterion("CONFIG_NAME not between", value1, value2, "configName");
return (Criteria) this;
}
public Criteria andConfigValueIsNull() {
addCriterion("CONFIG_VALUE is null");
return (Criteria) this;
}
public Criteria andConfigValueIsNotNull() {
addCriterion("CONFIG_VALUE is not null");
return (Criteria) this;
}
public Criteria andConfigValueEqualTo(String value) {
addCriterion("CONFIG_VALUE =", value, "configValue");
return (Criteria) this;
}
public Criteria andConfigValueNotEqualTo(String value) {
addCriterion("CONFIG_VALUE <>", value, "configValue");
return (Criteria) this;
}
public Criteria andConfigValueGreaterThan(String value) {
addCriterion("CONFIG_VALUE >", value, "configValue");
return (Criteria) this;
}
public Criteria andConfigValueGreaterThanOrEqualTo(String value) {
addCriterion("CONFIG_VALUE >=", value, "configValue");
return (Criteria) this;
}
public Criteria andConfigValueLessThan(String value) {
addCriterion("CONFIG_VALUE <", value, "configValue");
return (Criteria) this;
}
public Criteria andConfigValueLessThanOrEqualTo(String value) {
addCriterion("CONFIG_VALUE <=", value, "configValue");
return (Criteria) this;
}
public Criteria andConfigValueLike(String value) {
addCriterion("CONFIG_VALUE like", value, "configValue");
return (Criteria) this;
}
public Criteria andConfigValueNotLike(String value) {
addCriterion("CONFIG_VALUE not like", value, "configValue");
return (Criteria) this;
}
public Criteria andConfigValueIn(List<String> values) {
addCriterion("CONFIG_VALUE in", values, "configValue");
return (Criteria) this;
}
public Criteria andConfigValueNotIn(List<String> values) {
addCriterion("CONFIG_VALUE not in", values, "configValue");
return (Criteria) this;
}
public Criteria andConfigValueBetween(String value1, String value2) {
addCriterion("CONFIG_VALUE between", value1, value2, "configValue");
return (Criteria) this;
}
public Criteria andConfigValueNotBetween(String value1, String value2) {
addCriterion("CONFIG_VALUE not between", value1, value2, "configValue");
return (Criteria) this;
}
public Criteria andStatusIsNull() {
addCriterion("STATUS is null");
return (Criteria) this;
}
public Criteria andStatusIsNotNull() {
addCriterion("STATUS is not null");
return (Criteria) this;
}
public Criteria andStatusEqualTo(String value) {
addCriterion("STATUS =", value, "status");
return (Criteria) this;
}
public Criteria andStatusNotEqualTo(String value) {
addCriterion("STATUS <>", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThan(String value) {
addCriterion("STATUS >", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThanOrEqualTo(String value) {
addCriterion("STATUS >=", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThan(String value) {
addCriterion("STATUS <", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThanOrEqualTo(String value) {
addCriterion("STATUS <=", value, "status");
return (Criteria) this;
}
public Criteria andStatusLike(String value) {
addCriterion("STATUS like", value, "status");
return (Criteria) this;
}
public Criteria andStatusNotLike(String value) {
addCriterion("STATUS not like", value, "status");
return (Criteria) this;
}
public Criteria andStatusIn(List<String> values) {
addCriterion("STATUS in", values, "status");
return (Criteria) this;
}
public Criteria andStatusNotIn(List<String> values) {
addCriterion("STATUS not in", values, "status");
return (Criteria) this;
}
public Criteria andStatusBetween(String value1, String value2) {
addCriterion("STATUS between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andStatusNotBetween(String value1, String value2) {
addCriterion("STATUS not between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andCreatedByIsNull() {
addCriterion("CREATED_BY is null");
return (Criteria) this;
}
public Criteria andCreatedByIsNotNull() {
addCriterion("CREATED_BY is not null");
return (Criteria) this;
}
public Criteria andCreatedByEqualTo(String value) {
addCriterion("CREATED_BY =", value, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByNotEqualTo(String value) {
addCriterion("CREATED_BY <>", value, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByGreaterThan(String value) {
addCriterion("CREATED_BY >", value, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByGreaterThanOrEqualTo(String value) {
addCriterion("CREATED_BY >=", value, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByLessThan(String value) {
addCriterion("CREATED_BY <", value, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByLessThanOrEqualTo(String value) {
addCriterion("CREATED_BY <=", value, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByLike(String value) {
addCriterion("CREATED_BY like", value, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByNotLike(String value) {
addCriterion("CREATED_BY not like", value, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByIn(List<String> values) {
addCriterion("CREATED_BY in", values, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByNotIn(List<String> values) {
addCriterion("CREATED_BY not in", values, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByBetween(String value1, String value2) {
addCriterion("CREATED_BY between", value1, value2, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByNotBetween(String value1, String value2) {
addCriterion("CREATED_BY not between", value1, value2, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedDateIsNull() {
addCriterion("CREATED_DATE is null");
return (Criteria) this;
}
public Criteria andCreatedDateIsNotNull() {
addCriterion("CREATED_DATE is not null");
return (Criteria) this;
}
public Criteria andCreatedDateEqualTo(Date value) {
addCriterion("CREATED_DATE =", value, "createdDate");
return (Criteria) this;
}
public Criteria andCreatedDateNotEqualTo(Date value) {
addCriterion("CREATED_DATE <>", value, "createdDate");
return (Criteria) this;
}
public Criteria andCreatedDateGreaterThan(Date value) {
addCriterion("CREATED_DATE >", value, "createdDate");
return (Criteria) this;
}
public Criteria andCreatedDateGreaterThanOrEqualTo(Date value) {
addCriterion("CREATED_DATE >=", value, "createdDate");
return (Criteria) this;
}
public Criteria andCreatedDateLessThan(Date value) {
addCriterion("CREATED_DATE <", value, "createdDate");
return (Criteria) this;
}
public Criteria andCreatedDateLessThanOrEqualTo(Date value) {
addCriterion("CREATED_DATE <=", value, "createdDate");
return (Criteria) this;
}
public Criteria andCreatedDateIn(List<Date> values) {
addCriterion("CREATED_DATE in", values, "createdDate");
return (Criteria) this;
}
public Criteria andCreatedDateNotIn(List<Date> values) {
addCriterion("CREATED_DATE not in", values, "createdDate");
return (Criteria) this;
}
public Criteria andCreatedDateBetween(Date value1, Date value2) {
addCriterion("CREATED_DATE between", value1, value2, "createdDate");
return (Criteria) this;
}
public Criteria andCreatedDateNotBetween(Date value1, Date value2) {
addCriterion("CREATED_DATE not between", value1, value2, "createdDate");
return (Criteria) this;
}
public Criteria andLastUpdByIsNull() {
addCriterion("LAST_UPD_BY is null");
return (Criteria) this;
}
public Criteria andLastUpdByIsNotNull() {
addCriterion("LAST_UPD_BY is not null");
return (Criteria) this;
}
public Criteria andLastUpdByEqualTo(String value) {
addCriterion("LAST_UPD_BY =", value, "lastUpdBy");
return (Criteria) this;
}
public Criteria andLastUpdByNotEqualTo(String value) {
addCriterion("LAST_UPD_BY <>", value, "lastUpdBy");
return (Criteria) this;
}
public Criteria andLastUpdByGreaterThan(String value) {
addCriterion("LAST_UPD_BY >", value, "lastUpdBy");
return (Criteria) this;
}
public Criteria andLastUpdByGreaterThanOrEqualTo(String value) {
addCriterion("LAST_UPD_BY >=", value, "lastUpdBy");
return (Criteria) this;
}
public Criteria andLastUpdByLessThan(String value) {
addCriterion("LAST_UPD_BY <", value, "lastUpdBy");
return (Criteria) this;
}
public Criteria andLastUpdByLessThanOrEqualTo(String value) {
addCriterion("LAST_UPD_BY <=", value, "lastUpdBy");
return (Criteria) this;
}
public Criteria andLastUpdByLike(String value) {
addCriterion("LAST_UPD_BY like", value, "lastUpdBy");
return (Criteria) this;
}
public Criteria andLastUpdByNotLike(String value) {
addCriterion("LAST_UPD_BY not like", value, "lastUpdBy");
return (Criteria) this;
}
public Criteria andLastUpdByIn(List<String> values) {
addCriterion("LAST_UPD_BY in", values, "lastUpdBy");
return (Criteria) this;
}
public Criteria andLastUpdByNotIn(List<String> values) {
addCriterion("LAST_UPD_BY not in", values, "lastUpdBy");
return (Criteria) this;
}
public Criteria andLastUpdByBetween(String value1, String value2) {
addCriterion("LAST_UPD_BY between", value1, value2, "lastUpdBy");
return (Criteria) this;
}
public Criteria andLastUpdByNotBetween(String value1, String value2) {
addCriterion("LAST_UPD_BY not between", value1, value2, "lastUpdBy");
return (Criteria) this;
}
public Criteria andLastUpdDateIsNull() {
addCriterion("LAST_UPD_DATE is null");
return (Criteria) this;
}
public Criteria andLastUpdDateIsNotNull() {
addCriterion("LAST_UPD_DATE is not null");
return (Criteria) this;
}
public Criteria andLastUpdDateEqualTo(Date value) {
addCriterion("LAST_UPD_DATE =", value, "lastUpdDate");
return (Criteria) this;
}
public Criteria andLastUpdDateNotEqualTo(Date value) {
addCriterion("LAST_UPD_DATE <>", value, "lastUpdDate");
return (Criteria) this;
}
public Criteria andLastUpdDateGreaterThan(Date value) {
addCriterion("LAST_UPD_DATE >", value, "lastUpdDate");
return (Criteria) this;
}
public Criteria andLastUpdDateGreaterThanOrEqualTo(Date value) {
addCriterion("LAST_UPD_DATE >=", value, "lastUpdDate");
return (Criteria) this;
}
public Criteria andLastUpdDateLessThan(Date value) {
addCriterion("LAST_UPD_DATE <", value, "lastUpdDate");
return (Criteria) this;
}
public Criteria andLastUpdDateLessThanOrEqualTo(Date value) {
addCriterion("LAST_UPD_DATE <=", value, "lastUpdDate");
return (Criteria) this;
}
public Criteria andLastUpdDateIn(List<Date> values) {
addCriterion("LAST_UPD_DATE in", values, "lastUpdDate");
return (Criteria) this;
}
public Criteria andLastUpdDateNotIn(List<Date> values) {
addCriterion("LAST_UPD_DATE not in", values, "lastUpdDate");
return (Criteria) this;
}
public Criteria andLastUpdDateBetween(Date value1, Date value2) {
addCriterion("LAST_UPD_DATE between", value1, value2, "lastUpdDate");
return (Criteria) this;
}
public Criteria andLastUpdDateNotBetween(Date value1, Date value2) {
addCriterion("LAST_UPD_DATE not between", value1, value2, "lastUpdDate");
return (Criteria) this;
}
public Criteria andIsNull(String filed) {
addCriterion(filed + " is null");
return (Criteria) this;
}
public Criteria andIsNotNull(String filed) {
addCriterion(filed + " is not null");
return (Criteria) this;
}
public Criteria andEqualTo(String filed, String value) {
addCriterion(filed + " =", value, filed);
return (Criteria) this;
}
public Criteria andNotEqualTo(String filed, String value) {
addCriterion(filed + " <>", value, filed);
return (Criteria) this;
}
public Criteria andGreaterThan(String filed, String value) {
addCriterion(filed + " > ", value, filed);
return (Criteria) this;
}
public Criteria andGreaterThanOrEqualTo(String filed, String value) {
addCriterion(filed + " >=", value, filed);
return (Criteria) this;
}
public Criteria andLessThan(String filed, String value) {
addCriterion(filed + " <", value, filed);
return (Criteria) this;
}
public Criteria andLessThanOrEqualTo(String filed, String value) {
addCriterion(filed + " <=", value, filed);
return (Criteria) this;
}
public Criteria andIn(String filed, String value) {
addCriterion(filed + " in", value, filed);
return (Criteria) this;
}
public Criteria andNotIn(String filed, String value) {
addCriterion(filed + " not in", value, filed);
return (Criteria) this;
}
public Criteria andBetween(String filed, String value1, String value2) {
addCriterion(filed + " between", value1, value2, filed);
return (Criteria) this;
}
public Criteria andNotBetween(String filed, String value1, String value2) {
addCriterion(filed + " not between", value1, value2, filed);
return (Criteria) this;
}
public Criteria andLike(String filed, String value) {
addCriterion(filed + " like", value, filed);
return (Criteria) this;
}
public Criteria andNotLike(String filed, String value) {
addCriterion(filed + " not like", value, filed);
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private final String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private final String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}
| gdtlf/msg | msg-platform/src/main/java/com/tlf/msg/platform/domain/ConfigExample.java | Java | apache-2.0 | 29,255 | [
30522,
7427,
4012,
1012,
1056,
10270,
1012,
5796,
2290,
1012,
4132,
1012,
5884,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
9140,
9863,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
3058,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
2862,
1025... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
/**
* Image helper class
*
* This class was derived from the show_image_in_imgtag.php and imageTools.class.php files in VM. It provides some
* image functions that are used throughout the VirtueMart shop.
*
* @package VirtueMart
* @subpackage Helpers
* @author Max Milbers
* @copyright Copyright (c) 2004-2008 Soeren Eberhardt-Biermann, 2009 VirtueMart Team. All rights reserved.
*/
defined('_JEXEC') or die();
if (!class_exists('VmMediaHandler')) require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'mediahandler.php');
class VmImage extends VmMediaHandler {
function processAction($data){
if(empty($data['media_action'])) return $data;
$data = parent::processAction($data);
if( $data['media_action'] == 'upload_create_thumb' ){
$oldFileUrl = $this->file_url;
$file_name = $this->uploadFile($this->file_url_folder);
if($file_name){
if($file_name!=$oldFileUrl && !empty($this->filename)){
$this->deleteFile($oldFileUrl);
}
$this->file_url = $this->file_url_folder.$file_name;
$this->filename = $file_name;
$oldFileUrlThumb = $this->file_url_thumb;
$this->file_url_thumb = $this->createThumb();
if($this->file_url_thumb!=$oldFileUrlThumb){
$this->deleteFile($oldFileUrlThumb);
}
}
} //creating the thumbnail image
else if( $data['media_action'] == 'create_thumb' ){
$this->file_url_thumb = $this->createThumb();
}
if(empty($this->file_title) && !empty($file_name)) $this->file_title = $file_name;
return $data;
}
function displayMediaFull($imageArgs='',$lightbox=true,$effect ="class='modal'",$description = true ){
if(!$this->file_is_forSale){
// Remote image URL
if( substr( $this->file_url, 0, 4) == "http" ) {
$file_url = $this->file_url;
$file_alt = $this->file_title;
} else {
$rel_path = str_replace('/',DS,$this->file_url_folder);
$fullSizeFilenamePath = JPATH_ROOT.DS.$rel_path.$this->file_name.'.'.$this->file_extension;
if (!file_exists($fullSizeFilenamePath)) {
$file_url = $this->theme_url.'assets/images/vmgeneral/'.VmConfig::get('no_image_found');
$file_alt = JText::_('COM_VIRTUEMART_NO_IMAGE_FOUND').' '.$this->file_description;
} else {
$file_url = $this->file_url;
$file_alt = $this->file_meta;
}
}
$postText = '';
if($description) $postText = $this->file_description;
return $this->displayIt($file_url, $file_alt, $imageArgs,$lightbox,'',$postText);
} else {
//Media which should be sold, show them only as thumb (works as preview)
return $this->displayMediaThumb('id="vm_display_image"',false);
}
}
/**
* a small function that ensures that we always build the thumbnail name with the same method
*/
public function createThumbName($width=0,$height=0){
if(empty($this->file_name)) return false;
if(empty($width)) $width = VmConfig::get('img_width', 90);
if(empty($height)) $height = VmConfig::get('img_height', 90);
$this->file_name_thumb = $this->file_name.'_'.$width.'x'.$height;
return $this->file_name_thumb;
}
/**
* This function actually creates the thumb
* and when it is instanciated with one of the getImage function automatically updates the db
*
* @author Max Milbers
* @param boolean $save Execute update function
* @return name of the thumbnail
*/
public function createThumb() {
$synchronise = JRequest::getString('synchronise',false);
if(!VmConfig::get('img_resize_enable') || $synchronise) return;
//now lets create the thumbnail, saving is done in this function
$width = VmConfig::get('img_width', 90);
$height = VmConfig::get('img_height', 90);
// Don't allow sizes beyond 2000 pixels //I dont think that this is good, should be config
// $width = min($width, 2000);
// $height = min($height, 2000);
$maxsize = false;
$bgred = 255;
$bggreen = 255;
$bgblue = 255;
$root = '';
if($this->file_is_forSale==0){
$rel_path = str_replace('/',DS,$this->file_url_folder);
$fullSizeFilenamePath = JPATH_ROOT.DS.$rel_path.$this->file_name.'.'.$this->file_extension;
} else {
$rel_path = str_replace('/',DS,$this->file_url_folder);
$fullSizeFilenamePath = $this->file_url_folder.$this->file_name.'.'.$this->file_extension;
}
$this->file_name_thumb = $this->createThumbName();
$file_path_thumb = str_replace('/',DS,$this->file_url_folder_thumb);
$resizedFilenamePath = JPATH_ROOT.DS.$file_path_thumb.$this->file_name_thumb.'.'.$this->file_extension;
$this->checkPathCreateFolders($file_path_thumb);
if (file_exists($fullSizeFilenamePath)) {
if (!class_exists('Img2Thumb')) require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'img2thumb.php');
$createdImage = new Img2Thumb($fullSizeFilenamePath, $width, $height, $resizedFilenamePath, $maxsize, $bgred, $bggreen, $bgblue);
if($createdImage){
return $this->file_url_folder_thumb.$this->file_name_thumb.'.'.$this->file_extension;
} else {
return 0;
}
} else {
vmError('Couldnt create thumb, file not found '.$fullSizeFilenamePath);
return 0;
}
}
public function checkPathCreateFolders($path){
$elements = explode(DS,$path);
$examine = JPATH_ROOT;
foreach($elements as $piece){
$examine = $examine.DS.$piece;
if(!JFolder::exists($examine)){
JFolder::create($examine);
vmInfo('create folder for resized image '.$examine);
}
}
}
/**
* Display an image icon for the given image and create a link to the given link.
*
* @param string $link Link to use in the href tag
* @param string $image Name of the image file to display
* @param string $text Text to use for the image alt text and to display under the image.
*/
public function displayImageButton($link, $imageclass, $text) {
$button = '<a title="' . $text . '" href="' . $link . '">';
$button .= '<span class="vmicon48 '.$imageclass.'"></span>';
$button .= '<br />' . $text.'</a>';
echo $button;
}
}
| Fundacion-AG/PaginaWebFAG | tmp/install_535533f62cdf3/administrator/components/com_virtuemart/helpers/image.php | PHP | gpl-2.0 | 5,890 | [
30522,
1026,
1029,
25718,
1013,
1008,
1008,
1008,
3746,
2393,
2121,
2465,
1008,
1008,
2023,
2465,
2001,
5173,
2013,
1996,
2265,
1035,
3746,
1035,
1999,
1035,
10047,
13512,
8490,
1012,
25718,
1998,
3746,
3406,
27896,
1012,
2465,
1012,
25718,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package com.quizmaster.components;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class Question extends Component<Answer> {
private static final long serialVersionUID = 1L;
//The answers that are going to be displayed
private List<Answer> displayedAnswers;
//The chosen answers
private Set<Answer> pickedAnswers;
//Number of questions to be displayed
private int answers;
//Number of correct answers in the displayed answers
private int correctAnswers;
/*------------------------------------------------*/
/**
* Constructs a question object with the given parameters
* @param question The text to be displayed
* @param answers Number of questions to be displayed
* @param correctAnswers Number of correct answers in the displayed answers
*/
protected Question(String question, int answers, int correctAnswers) {
super(question);
this.answers = answers;
this.correctAnswers = correctAnswers;
this.displayedAnswers = new ArrayList<Answer>();
this.pickedAnswers = new HashSet<Answer>();
}
/**
* Constructs a question object with the given parameters
* @param question The text to be displayed
* @param nAnswers Number of questions to be displayed
* @param correctAnswers Number of correct answers in the displayed answers
* @param answers Initial answer pool
*/
public Question(String question, List<Answer> answers, int nAnswers, int correctAnswers) {
this(question, nAnswers, correctAnswers);
this.add(answers);
shuffle();
}
/**
* Resets the pickedAnswers and displayedAnswers. Reconstructs the displayedAnswers by picking random correct
* answers from the answers pool and completing it with wrong ones.
*/
public void shuffle() {
//Clear previous data
pickedAnswers.clear();
displayedAnswers.clear();
List<Answer> correct = new ArrayList<Answer>(), wrong = new ArrayList<Answer>();
List<Answer> answers = this.getComponents();
for(Answer answer : answers)
if(answer.isCorrect())
correct.add(answer);
else
wrong.add(answer);
//Shuffle lists
Collections.shuffle(correct);
Collections.shuffle(wrong);
//Add the corresponding number of correct answer to the displayed questions
int i;
for(i = 0; i < correctAnswers && correct.size() != 0; i++, correct.remove(0))
displayedAnswers.add(correct.get(0));
//Complete the rest with wrong answers
for(;i < this.answers && wrong.size() != 0; i++, wrong.remove(0))
displayedAnswers.add(wrong.get(0));
//Shuffle again
Collections.shuffle(displayedAnswers);
}
/**
* Adds the answer in the pickedAnswers unique sets if the answer is contained in the displayAnswers list
* and the maximum number of answers was not exceeded
* @param answer The chosen answer
* @return True if added to pickedAnswers set, false otherwise
*/
public boolean answer(Answer answer) {
if(!displayedAnswers.contains(answer) || pickedAnswers.size() >= answers)
return false;
return pickedAnswers.add(answer);
}
/**
* Removes an answer from the pickedAnswers set
* @param answer The chosen answer
* @return True if the answer was removed from the pickedAnswers set, false otherwise
*/
public boolean unanswer(Answer answer) {
return pickedAnswers.remove(answer);
}
/**
* @return The answers that are going to be displayed
*/
public List<Answer> getDisplayedAnswers() {
return displayedAnswers;
}
/**
* @return The chosen answers
*/
public Set<Answer> getPickedAnswers() {
return pickedAnswers;
}
/**
* Indicates if the correct number of questions has been chosen
* @return True if enough chosen, false otherwise
*/
public boolean isAnswered() {
return (pickedAnswers.size() == correctAnswers);
}
/**
* Indicates if the chosen answers are the correct ones or not
* @return True if the question was answered correctly, false otherwise
*/
public boolean isCorrect() {
if(!isAnswered())
return false;
for(Answer answer : pickedAnswers)
if(!answer.isCorrect())
return false;
return true;
}
public String toString() {
String result = getText() + "(" + correctAnswers + " answers)" + "\n";
char index = 'a';
for(Answer answer : displayedAnswers)
result += "\t" + index++ + ") " + answer + "\n";
return result;
}
}
| dumrelu/QuizMaster | src/com/quizmaster/components/Question.java | Java | mit | 4,386 | [
30522,
7427,
4012,
1012,
19461,
8706,
1012,
6177,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
9140,
9863,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
6407,
1025,
12324,
9262,
30524,
6998,
2008,
2024,
2183,
2000,
2022,
6913,
2797,
2862,
1026... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* Copyright (C) 2016 Singular Studios (a.k.a Atom Tecnologia) - www.opensingular.com
*
* 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.
*/
package org.opensingular.requirement.module.admin.healthsystem.extension;
import org.apache.wicket.markup.html.panel.Panel;
import org.opensingular.requirement.module.admin.healthsystem.panel.JobPanel;
public class JobsAdminEntry implements AdministrationEntryExtension {
@Override
public String name() {
return "Jobs";
}
@Override
public Panel makePanel(String id) {
return new JobPanel(id);
}
} | opensingular/singular-server | requirement/requirement-module/src/main/java/org/opensingular/requirement/module/admin/healthsystem/extension/JobsAdminEntry.java | Java | apache-2.0 | 1,087 | [
30522,
1013,
1008,
1008,
9385,
1006,
1039,
1007,
2355,
13048,
4835,
1006,
1037,
1012,
1047,
1012,
1037,
13787,
8915,
2278,
3630,
21197,
2401,
1007,
1011,
7479,
1012,
7480,
2075,
7934,
1012,
4012,
1008,
1008,
7000,
2104,
1996,
15895,
6105,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
from django.test import TestCase
from morelia.decorators import tags
from smarttest.decorators import no_db_testcase
from tasks.factories import TaskFactory, UserFactory
@no_db_testcase
@tags(['unit'])
class TaskGetAbsoluteUrlTest(TestCase):
''' :py:meth:`tasks.models.Task.get_absolute_url` '''
def test_should_return_task_absolute_url(self):
# Arrange
owner = UserFactory.build(pk=1)
task = TaskFactory.build(owner=owner, author=owner)
# Act
url = task.get_absolute_url()
# Assert
self.assertEqual(url, '/%s/' % owner.username)
| dryobates/testing_django | todo/tasks/tests/test_models.py | Python | mit | 601 | [
30522,
2013,
6520,
23422,
1012,
3231,
12324,
3231,
18382,
2013,
2062,
6632,
1012,
25545,
30524,
19454,
10421,
3126,
7096,
4355,
1006,
3231,
18382,
1007,
1024,
1005,
1005,
1005,
1024,
1052,
2100,
1024,
2777,
2232,
1024,
1036,
8518,
1012,
427... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.
*/
package com.amazonaws.services.nimblestudio.model;
import javax.annotation.Generated;
/**
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public enum StreamingSessionStreamStatusCode {
STREAM_CREATE_IN_PROGRESS("STREAM_CREATE_IN_PROGRESS"),
STREAM_READY("STREAM_READY"),
STREAM_DELETE_IN_PROGRESS("STREAM_DELETE_IN_PROGRESS"),
STREAM_DELETED("STREAM_DELETED"),
INTERNAL_ERROR("INTERNAL_ERROR"),
NETWORK_CONNECTION_ERROR("NETWORK_CONNECTION_ERROR");
private String value;
private StreamingSessionStreamStatusCode(String value) {
this.value = value;
}
@Override
public String toString() {
return this.value;
}
/**
* Use this in place of valueOf.
*
* @param value
* real value
* @return StreamingSessionStreamStatusCode corresponding to the value
*
* @throws IllegalArgumentException
* If the specified value does not map to one of the known values in this enum.
*/
public static StreamingSessionStreamStatusCode fromValue(String value) {
if (value == null || "".equals(value)) {
throw new IllegalArgumentException("Value cannot be null or empty!");
}
for (StreamingSessionStreamStatusCode enumEntry : StreamingSessionStreamStatusCode.values()) {
if (enumEntry.toString().equals(value)) {
return enumEntry;
}
}
throw new IllegalArgumentException("Cannot create enum from " + value + " value!");
}
}
| aws/aws-sdk-java | aws-java-sdk-nimblestudio/src/main/java/com/amazonaws/services/nimblestudio/model/StreamingSessionStreamStatusCode.java | Java | apache-2.0 | 2,130 | [
30522,
1013,
1008,
1008,
9385,
2418,
1011,
16798,
2475,
9733,
1012,
4012,
1010,
4297,
1012,
2030,
2049,
18460,
1012,
2035,
2916,
9235,
1012,
1008,
1008,
7000,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
1996,
1000,
6105,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package org.jboss.resteasy.test;
import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder;
import org.jboss.resteasy.client.jaxrs.ResteasyWebTarget;
import org.jboss.resteasy.util.PortProvider;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URL;
import javax.ws.rs.client.ClientBuilder;
/**
* Test utility class
*
* @author <a href="justin@justinedelson.com">Justin Edelson</a>
* @version $Revision$
*/
public class TestPortProvider
{
/**
* Creates a ResteasyWebTarget using base request path.
*/
public static ResteasyWebTarget createTarget(String path)
{
return (ResteasyWebTarget) ClientBuilder.newClient().target(generateURL(path));
}
/**
* Create a Resteasy client proxy with an empty base request path.
*
* @param clazz the client interface class
* @return the proxy object
*/
public static <T> T createProxy(Class<T> clazz)
{
return createProxy(clazz, generateBaseUrl());
}
/**
* Create a Resteasy client proxy.
*
* @param clazz the client interface class
* @return the proxy object
* @path the base request path
*/
public static <T> T createProxy(Class<T> clazz, String url)
{
ResteasyWebTarget target = (ResteasyWebTarget) ResteasyClientBuilder.newClient().target(url);
return target.proxy(clazz);
}
/**
* Create a URI for the provided path, using the configured port
*
* @param path the request path
* @return a full URI
*/
public static URI createURI(String path)
{
return URI.create(generateURL(path));
}
/**
* Create a URL for the provided path, using the configured port
*
* @param path the request path
* @return a full URL
*/
public static URL createURL(String path) throws MalformedURLException
{
return new URL(generateURL(path));
}
/**
* Generate a base URL incorporating the configured port.
*
* @return a full URL
*/
public static String generateBaseUrl()
{
return generateURL("");
}
/**
* Generate a URL incorporating the configured port.
*
* @param path the path
* @return a full URL
*/
public static String generateURL(String path)
{
return String.format("http://%s:%d%s", getHost(), getPort(), path);
}
/**
* Look up the configured port number, first checking an environment variable (RESTEASY_PORT),
* then a system property (org.jboss.resteasy.port), and finally the default port (8081).
*
* @return the port number specified in either the environment or system properties
*/
public static int getPort()
{
return PortProvider.getPort();
}
/**
* Look up the configured hostname, first checking an environment variable (RESTEASY_HOST),
* then a system property (org.jboss.resteasy.host), and finally the default hostname (localhost).
*
* @return the host specified in either the environment or system properties
*/
public static String getHost()
{
return PortProvider.getHost();
}
}
| awhitford/Resteasy | resteasy-client/src/main/java/org/jboss/resteasy/test/TestPortProvider.java | Java | apache-2.0 | 3,100 | [
30522,
7427,
8917,
1012,
1046,
15853,
2015,
1012,
2717,
5243,
6508,
1012,
3231,
1025,
12324,
8917,
1012,
1046,
15853,
2015,
1012,
2717,
5243,
6508,
1012,
7396,
1012,
13118,
2869,
1012,
2717,
5243,
6508,
20464,
11638,
8569,
23891,
2099,
1025... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
import csv
import matplotlib.pyplot as plt
import numpy as np
import scipy.stats as stats
from scipy.optimize import curve_fit
def countKey(key,listDataDicts):
outDict = {}
for row in listDataDicts:
try:
outDict[row[key]] += 1
except KeyError:
outDict[row[key]] = 1
return outDict
def avgUse30Days(key, listDataDicts):
totalDays = 0
numberUsers = 0
for person in listDataDicts:
if int(person[key]) < 31 :
totalDays += int(person[key])
numberUsers += 1
return (1.0*totalDays/numberUsers)
def avgUse30DaysWithZeros(key, listDataDicts):
totalDays = 0
numberUsers = 0
for person in listDataDicts:
if ( int(person[key]) < 31 ):
totalDays += int(person[key])
numberUsers += 1
elif ( int(person[key]) == 93 ):
numberUsers += 1
else:
pass
return (1.0*totalDays/numberUsers)
def powerLaw(x,a,b):
return a*(x**(-b))
def expDecay(x,a,b):
return a*np.exp(b*x)
listDataDicts = []
with open('34933-0001-Data.tsv', 'rb') as tsvFile:
tsvReader = csv.DictReader(tsvFile,delimiter='\t')
for row in tsvReader:
listDataDicts.append(row)
ageFirstUseKeys = ['CIGTRY', 'SNUFTRY', 'CHEWTRY', 'CIGARTRY', 'ALCTRY', 'MJAGE', 'COCAGE', 'HERAGE', 'HALLAGE', 'INHAGE', 'ANALAGE', 'TRANAGE', 'STIMAGE', 'SEDAGE']
useLast30Keys = ['CIG30USE','SNF30USE','CHW30USE','CGR30USE','ALCDAYS','MJDAY30A','COCUS30A','HER30USE','HAL30USE','INHDY30A','PRDAYPMO','TRDAYPMO','STDAYPMO','SVDAYPMO']
xdata = []
ydata = []
for person in listDataDicts:
for i in range(len(ageFirstUseKeys)):
if (int(person[ageFirstUseKeys[i]]) < 900) and (int(person[useLast30Keys[i]]) < 31):
xdata.append(int(person[ageFirstUseKeys[i]]))
ydata.append(int(person[useLast30Keys[i]]))
slope,intercept,rValue,pValue,stdErr = stats.linregress(xdata,ydata)
print "Drug First Use Age vs Usage Frequency Linear Regression"
print "Slope: %f, Intercept: %f, RSQ-Value: %f, P-Value: %f, Standard Error: %f,\n 95%% Confidence Interval: %f +- %f\n" %(slope,intercept,rValue*rValue,pValue,stdErr, slope, 1.96*stdErr)
'''# Curve fit with a power law
xfit = range(90)
popt1, pcov1 = curve_fit(powerLaw, xdata, ydata)
print "Power Law Curve fit: ",popt1,np.sqrt(np.diag(pcov1)),"\n"
fitLiney1 = np.zeros(len(xfit))
for i in range(len(xfit)):
fitLiney1[i] = powerLaw( xfit[i], popt1[0], popt1[1] )
'''
xdata2 = [ x for x in range(89) ]
ydata2 = [ (x*slope + intercept) for x in range(89) ]
plt.plot(xdata,ydata,'b.',xdata2,ydata2,'r-')
plt.title("Age of First Use vs Usage in the Last 30 Days")
plt.xlabel("Age of First Use")
plt.ylabel("Usage in the Past 30 Days)")
plt.legend(["Data","Linear Fit"])
plt.xlim(0,90)
plt.ylim(0,31)
plt.tight_layout()
plt.show() | cvanoort/USDrugUseAnalysis | Report1/Code/afu_use30.py | Python | isc | 2,851 | [
30522,
12324,
20116,
2615,
12324,
13523,
24759,
4140,
29521,
1012,
1052,
22571,
10994,
2004,
20228,
2102,
12324,
16371,
8737,
2100,
2004,
27937,
12324,
16596,
7685,
1012,
26319,
2004,
26319,
2013,
16596,
7685,
1012,
23569,
27605,
4371,
12324,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package edu.hm.hafner;
import java.util.Date;
/**
* Useless class - only for test-cases.
*
* @author Christian Möstl
*/
public class ParameterAssignment {
private Date date;
private int number;
private final String text;
/**
* Creates a new instance of {@link ParameterAssignment}.
*
* @param date
* Date
* @param number
* number
* @param text
* Text
*/
public ParameterAssignment(final Date date, final int number, final String text) {
this.date = date;
this.number = number;
this.text = text;
}
/**
* Do sth...
* @param a number
*/
public void doSth(int a) {
int b = 0;
if (a > 0) {
System.out.println(">0");
if (a == 1) {
++b;
System.out.println("a=1");
a = b;
if (a == 2) {
System.out.println("a=2");
}
}
}
System.out.println(b);
}
/**
* Returns the date.
*
* @return the date
*/
public Date getDate() {
return date;
}
/**
* Returns the number.
*
* @return the number
*/
public int getNumber() {
return number;
}
/**
* Returns the text.
*
* @return the text
*/
public String getText() {
return text;
}
} | jenkinsci/analysis-runner | src/main/java/edu/hm/hafner/ParameterAssignment.java | Java | mit | 1,565 | [
30522,
7427,
3968,
2226,
1012,
20287,
1012,
5292,
2546,
3678,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
3058,
1025,
1013,
1008,
1008,
1008,
11809,
2465,
1011,
2069,
2005,
3231,
1011,
3572,
1012,
1008,
1008,
1030,
3166,
3017,
1049,
1004,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>Xerces-C++: File Members</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">Xerces-C++
 <span id="projectnumber">3.1.4</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File List</span></a></li>
<li class="current"><a href="globals.html"><span>File Members</span></a></li>
</ul>
</div>
<div id="navrow3" class="tabs2">
<ul class="tablist">
<li class="current"><a href="globals.html"><span>All</span></a></li>
<li><a href="globals_vars.html"><span>Variables</span></a></li>
<li><a href="globals_type.html"><span>Typedefs</span></a></li>
<li><a href="globals_defs.html"><span>Macros</span></a></li>
</ul>
</div>
<div id="navrow4" class="tabs3">
<ul class="tablist">
<li><a href="globals.html#index_c"><span>c</span></a></li>
<li><a href="globals_0x64.html#index_d"><span>d</span></a></li>
<li><a href="globals_0x66.html#index_f"><span>f</span></a></li>
<li><a href="globals_0x67.html#index_g"><span>g</span></a></li>
<li><a href="globals_0x6c.html#index_l"><span>l</span></a></li>
<li><a href="globals_0x6d.html#index_m"><span>m</span></a></li>
<li><a href="globals_0x70.html#index_p"><span>p</span></a></li>
<li class="current"><a href="globals_0x73.html#index_s"><span>s</span></a></li>
<li><a href="globals_0x74.html#index_t"><span>t</span></a></li>
<li><a href="globals_0x75.html#index_u"><span>u</span></a></li>
<li><a href="globals_0x76.html#index_v"><span>v</span></a></li>
<li><a href="globals_0x78.html#index_x"><span>x</span></a></li>
</ul>
</div>
</div><!-- top -->
<div class="contents">
<div class="textblock">Here is a list of all file members with links to the files they belong to:</div>
<h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
<li>SAX2_EXPORT
: <a class="el" href="XercesDefs_8hpp.html#a33ae6aeb420a5fc867079688f5cdc617">XercesDefs.hpp</a>
</li>
<li>SAX_EXPORT
: <a class="el" href="XercesDefs_8hpp.html#a7fdf07718ad6e0a80a00387c4fb5f82d">XercesDefs.hpp</a>
</li>
<li>StringList
: <a class="el" href="XSConstants_8hpp.html#aef973c7ee42adc6b41aa1bf50b8e19aa">XSConstants.hpp</a>
</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
| raj-bhatia/grooveip-ios-public | submodules/externals/xerces-c/doc/html/apiDocs-3/globals_0x73.html | HTML | gpl-2.0 | 3,751 | [
30522,
1026,
999,
9986,
13874,
16129,
2270,
1000,
1011,
1013,
1013,
1059,
2509,
2278,
1013,
1013,
26718,
2094,
1060,
11039,
19968,
1015,
1012,
1014,
17459,
1013,
1013,
4372,
1000,
1000,
8299,
1024,
1013,
1013,
7479,
1012,
1059,
2509,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#include "qmlprojectnodes.h"
#include "qmlproject.h"
#include <coreplugin/idocument.h>
#include <coreplugin/fileiconprovider.h>
#include <projectexplorer/projectexplorer.h>
#include <QFileInfo>
#include <QStyle>
namespace QmlProjectManager {
namespace Internal {
QmlProjectNode::QmlProjectNode(QmlProject *project, Core::IDocument *projectFile)
: ProjectExplorer::ProjectNode(QFileInfo(projectFile->fileName()).absoluteFilePath()),
m_project(project),
m_projectFile(projectFile)
{
setDisplayName(QFileInfo(projectFile->fileName()).completeBaseName());
// make overlay
const QSize desiredSize = QSize(16, 16);
const QIcon projectBaseIcon(QLatin1String(":/qmlproject/images/qmlfolder.png"));
const QPixmap projectPixmap = Core::FileIconProvider::overlayIcon(QStyle::SP_DirIcon,
projectBaseIcon,
desiredSize);
setIcon(QIcon(projectPixmap));
}
QmlProjectNode::~QmlProjectNode()
{ }
Core::IDocument *QmlProjectNode::projectFile() const
{ return m_projectFile; }
QString QmlProjectNode::projectFilePath() const
{ return m_projectFile->fileName(); }
void QmlProjectNode::refresh()
{
using namespace ProjectExplorer;
// remove the existing nodes.
removeFileNodes(fileNodes(), this);
removeFolderNodes(subFolderNodes(), this);
//ProjectExplorerPlugin::instance()->setCurrentNode(0); // ### remove me
FileNode *projectFilesNode = new FileNode(m_project->filesFileName(),
ProjectFileType,
/* generated = */ false);
QStringList files = m_project->files();
files.removeAll(m_project->filesFileName());
addFileNodes(QList<FileNode *>()
<< projectFilesNode,
this);
QHash<QString, QStringList> filesInDirectory;
foreach (const QString &fileName, files) {
QFileInfo fileInfo(fileName);
QString absoluteFilePath;
QString relativeDirectory;
if (fileInfo.isAbsolute()) {
// plain old file format
absoluteFilePath = fileInfo.filePath();
relativeDirectory = m_project->projectDir().relativeFilePath(fileInfo.path());
} else {
absoluteFilePath = m_project->projectDir().absoluteFilePath(fileInfo.filePath());
relativeDirectory = fileInfo.path();
if (relativeDirectory == QLatin1String("."))
relativeDirectory.clear();
}
filesInDirectory[relativeDirectory].append(absoluteFilePath);
}
const QHash<QString, QStringList>::ConstIterator cend = filesInDirectory.constEnd();
for (QHash<QString, QStringList>::ConstIterator it = filesInDirectory.constBegin(); it != cend; ++it) {
FolderNode *folder = findOrCreateFolderByName(it.key());
QList<FileNode *> fileNodes;
foreach (const QString &file, it.value()) {
FileType fileType = SourceType; // ### FIXME
FileNode *fileNode = new FileNode(file, fileType, /*generated = */ false);
fileNodes.append(fileNode);
}
addFileNodes(fileNodes, folder);
}
m_folderByName.clear();
}
ProjectExplorer::FolderNode *QmlProjectNode::findOrCreateFolderByName(const QStringList &components, int end)
{
if (! end)
return 0;
QString baseDir = QFileInfo(path()).path();
QString folderName;
for (int i = 0; i < end; ++i) {
folderName.append(components.at(i));
folderName += QLatin1Char('/'); // ### FIXME
}
const QString component = components.at(end - 1);
if (component.isEmpty())
return this;
else if (FolderNode *folder = m_folderByName.value(folderName))
return folder;
FolderNode *folder = new FolderNode(baseDir + QLatin1Char('/') + folderName);
folder->setDisplayName(component);
m_folderByName.insert(folderName, folder);
FolderNode *parent = findOrCreateFolderByName(components, end - 1);
if (! parent)
parent = this;
addFolderNodes(QList<FolderNode*>() << folder, parent);
return folder;
}
ProjectExplorer::FolderNode *QmlProjectNode::findOrCreateFolderByName(const QString &filePath)
{
QStringList components = filePath.split(QLatin1Char('/'));
return findOrCreateFolderByName(components, components.length());
}
bool QmlProjectNode::hasBuildTargets() const
{
return true;
}
QList<ProjectExplorer::ProjectNode::ProjectAction> QmlProjectNode::supportedActions(Node *node) const
{
Q_UNUSED(node);
QList<ProjectAction> actions;
actions.append(AddNewFile);
actions.append(EraseFile);
actions.append(Rename);
return actions;
}
bool QmlProjectNode::canAddSubProject(const QString &proFilePath) const
{
Q_UNUSED(proFilePath)
return false;
}
bool QmlProjectNode::addSubProjects(const QStringList &proFilePaths)
{
Q_UNUSED(proFilePaths)
return false;
}
bool QmlProjectNode::removeSubProjects(const QStringList &proFilePaths)
{
Q_UNUSED(proFilePaths)
return false;
}
bool QmlProjectNode::addFiles(const ProjectExplorer::FileType /*fileType*/,
const QStringList &filePaths, QStringList * /*notAdded*/)
{
return m_project->addFiles(filePaths);
}
bool QmlProjectNode::removeFiles(const ProjectExplorer::FileType /*fileType*/,
const QStringList & /*filePaths*/, QStringList * /*notRemoved*/)
{
return false;
}
bool QmlProjectNode::deleteFiles(const ProjectExplorer::FileType /*fileType*/,
const QStringList & /*filePaths*/)
{
return true;
}
bool QmlProjectNode::renameFile(const ProjectExplorer::FileType /*fileType*/,
const QString & /*filePath*/, const QString & /*newFilePath*/)
{
return true;
}
QList<ProjectExplorer::RunConfiguration *> QmlProjectNode::runConfigurationsFor(Node *node)
{
Q_UNUSED(node)
return QList<ProjectExplorer::RunConfiguration *>();
}
} // namespace Internal
} // namespace QmlProjectManager
| duythanhphan/qt-creator | src/plugins/qmlprojectmanager/qmlprojectnodes.cpp | C++ | lgpl-2.1 | 7,627 | [
30522,
1013,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
MIT License
Copyright (c) 2016 Christian Rafael
JS Object to CSS String Parser
christian@paradix.com.br
*/
function parseCSS( object_css ) {
function parseClass( _class, properties ) {
return String().concat( _class, " { ", parseProperties( properties ), " } " );
}
function parseProperties( properties ) {
var css_properties = String();
for (var prop in properties) {
css_properties = css_properties.concat(
typeof properties[ prop ] === "object" && parseClass( prop, properties[ prop ] ) || String().concat( prop, " : ", properties[ prop ] ),
typeof properties[ prop ] !== "object" && ";" || ""
);
}
return css_properties;
}
var css_str = String();
for ( var _class in object_css ) {
css_str = css_str.concat( parseClass( _class, object_css[ _class ] ) );
}
return css_str;
}
| christianrss/object-css-parser | object-css-parser.js | JavaScript | mit | 934 | [
30522,
1013,
1008,
10210,
6105,
9385,
1006,
1039,
1007,
2355,
3017,
10999,
1046,
2015,
4874,
2000,
20116,
2015,
5164,
11968,
8043,
3017,
1030,
11498,
4305,
2595,
1012,
4012,
1012,
7987,
1008,
1013,
3853,
11968,
3366,
6169,
2015,
1006,
30524... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "flutter/lib/ui/painting/shader.h"
#include "flutter/lib/ui/ui_dart_state.h"
namespace flutter {
IMPLEMENT_WRAPPERTYPEINFO(ui, Shader);
Shader::Shader(flutter::SkiaGPUObject<SkShader> shader)
: shader_(std::move(shader)) {}
Shader::~Shader() = default;
} // namespace flutter
| cdotstout/sky_engine | lib/ui/painting/shader.cc | C++ | bsd-3-clause | 461 | [
30522,
1013,
1013,
9385,
2286,
1996,
23638,
6048,
1012,
2035,
2916,
9235,
1012,
1013,
1013,
2224,
1997,
2023,
3120,
3642,
2003,
9950,
2011,
1037,
18667,
2094,
1011,
2806,
6105,
2008,
2064,
2022,
1013,
1013,
2179,
1999,
1996,
6105,
5371,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hdfs.server.blockmanagement;
import org.apache.hadoop.hdfs.server.protocol.BlockCommand;
import org.apache.hadoop.net.Node;
import java.util.List;
import java.util.Set;
class ReplicationWork extends BlockReconstructionWork {
public ReplicationWork(BlockInfo block, BlockCollection bc,
DatanodeDescriptor[] srcNodes, List<DatanodeDescriptor> containingNodes,
List<DatanodeStorageInfo> liveReplicaStorages, int additionalReplRequired,
int priority) {
super(block, bc, srcNodes, containingNodes,
liveReplicaStorages, additionalReplRequired, priority);
assert getSrcNodes().length == 1 :
"There should be exactly 1 source node that have been selected";
getSrcNodes()[0].incrementPendingReplicationWithoutTargets();
LOG.debug("Creating a ReplicationWork to reconstruct " + block);
}
@Override
void chooseTargets(BlockPlacementPolicy blockplacement,
BlockStoragePolicySuite storagePolicySuite,
Set<Node> excludedNodes) {
assert getSrcNodes().length > 0
: "At least 1 source node should have been selected";
try {
DatanodeStorageInfo[] chosenTargets = null;
// HDFS-14720 If the block is deleted, the block size will become
// BlockCommand.NO_ACK (LONG.MAX_VALUE) . This kind of block we don't need
// to send for replication or reconstruction
if (getBlock().getNumBytes() != BlockCommand.NO_ACK) {
chosenTargets = blockplacement.chooseTarget(getSrcPath(),
getAdditionalReplRequired(), getSrcNodes()[0],
getLiveReplicaStorages(), false, excludedNodes, getBlockSize(),
storagePolicySuite.getPolicy(getStoragePolicyID()), null);
}
setTargets(chosenTargets);
} finally {
getSrcNodes()[0].decrementPendingReplicationWithoutTargets();
}
}
@Override
void addTaskToDatanode(NumberReplicas numberReplicas) {
getSrcNodes()[0].addBlockToBeReplicated(getBlock(), getTargets());
}
}
| apurtell/hadoop | hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/ReplicationWork.java | Java | apache-2.0 | 2,800 | [
30522,
1013,
1008,
1008,
1008,
7000,
2000,
1996,
15895,
4007,
3192,
1006,
2004,
2546,
1007,
2104,
2028,
1008,
2030,
2062,
12130,
6105,
10540,
1012,
2156,
1996,
5060,
5371,
1008,
5500,
2007,
2023,
2147,
2005,
3176,
2592,
1008,
4953,
9385,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package com.poqop.document;
import android.graphics.*;
import java.lang.ref.SoftReference;
class PageTreeNode {
private static final int SLICE_SIZE = 65535;
private Bitmap bitmap;
private SoftReference<Bitmap> bitmapWeakReference;
private boolean decodingNow;
private final RectF pageSliceBounds;
private final Page page;
private PageTreeNode[] children;
private final int treeNodeDepthLevel;
private Matrix matrix = new Matrix();
private final Paint bitmapPaint = new Paint();
private DocumentView documentView;
private boolean invalidateFlag;
private Rect targetRect;
private RectF targetRectF;
PageTreeNode(DocumentView documentView, RectF localPageSliceBounds, Page page, int treeNodeDepthLevel, PageTreeNode parent) {
this.documentView = documentView;
this.pageSliceBounds = evaluatePageSliceBounds(localPageSliceBounds, parent);
this.page = page;
this.treeNodeDepthLevel = treeNodeDepthLevel;
}
public void updateVisibility() {
invalidateChildren();
if (children != null) {
for (PageTreeNode child : children) {
child.updateVisibility();
}
}
if (isVisible()) {
if (!thresholdHit()) {
if (getBitmap() != null && !invalidateFlag) {
restoreBitmapReference();
} else {
decodePageTreeNode();
}
}
}
if (!isVisibleAndNotHiddenByChildren()) {
stopDecodingThisNode();
setBitmap(null);
}
}
public void invalidate() {
invalidateChildren();
invalidateRecursive();
updateVisibility();
}
private void invalidateRecursive() {
invalidateFlag = true;
if (children != null) {
for (PageTreeNode child : children) {
child.invalidateRecursive();
}
}
stopDecodingThisNode();
}
void invalidateNodeBounds() {
targetRect = null;
targetRectF = null;
if (children != null) {
for (PageTreeNode child : children) {
child.invalidateNodeBounds();
}
}
}
void draw(Canvas canvas) {
if (getBitmap() != null) {
canvas.drawBitmap(getBitmap(), new Rect(0, 0, getBitmap().getWidth(), getBitmap().getHeight()), getTargetRect(), bitmapPaint);
}
if (children == null) {
return;
}
for (PageTreeNode child : children) {
child.draw(canvas);
}
}
private boolean isVisible() {
return RectF.intersects(documentView.getViewRect(), getTargetRectF());
}
private RectF getTargetRectF() {
if (targetRectF == null) {
targetRectF = new RectF(getTargetRect());
}
return targetRectF;
}
private void invalidateChildren() {
if (thresholdHit() && children == null && isVisible()) {
final int newThreshold = treeNodeDepthLevel * 2;
children = new PageTreeNode[]
{
new PageTreeNode(documentView, new RectF(0, 0, 1.0f, 1.0f), page, newThreshold, this),
new PageTreeNode(documentView, new RectF(0.5f, 0, 1.0f, 0.5f), page, newThreshold, this),
new PageTreeNode(documentView, new RectF(0, 0.5f, 0.5f, 1.0f), page, newThreshold, this),
new PageTreeNode(documentView, new RectF(0.5f, 0.5f, 1.0f, 1.0f), page, newThreshold, this)
};
}
if (!thresholdHit() && getBitmap() != null || !isVisible()) {
recycleChildren();
}
}
private boolean thresholdHit() {
float zoom = documentView.zoomModel.getZoom();
int mainWidth = documentView.getWidth();
float height = page.getPageHeight(mainWidth, zoom);
return (mainWidth * zoom * height) / (treeNodeDepthLevel * treeNodeDepthLevel) > SLICE_SIZE;
}
public Bitmap getBitmap() {
return bitmapWeakReference != null ? bitmapWeakReference.get() : null;
}
private void restoreBitmapReference() {
setBitmap(getBitmap());
}
private void decodePageTreeNode() {
if (isDecodingNow()) {
return;
}
setDecodingNow(true);
documentView.decodeService.decodePage(this, page.index, new DecodeService.DecodeCallback() {
public void decodeComplete(final Bitmap bitmap) {
documentView.post(new Runnable() {
public void run() {
setBitmap(bitmap);
invalidateFlag = false;
setDecodingNow(false);
page.setAspectRatio(documentView.decodeService.getPageWidth(page.index), documentView.decodeService.getPageHeight(page.index));
invalidateChildren();
}
});
}
}, documentView.zoomModel.getZoom(), pageSliceBounds);
}
private RectF evaluatePageSliceBounds(RectF localPageSliceBounds, PageTreeNode parent) {
if (parent == null) {
return localPageSliceBounds;
}
final Matrix matrix = new Matrix();
matrix.postScale(parent.pageSliceBounds.width(), parent.pageSliceBounds.height());
matrix.postTranslate(parent.pageSliceBounds.left, parent.pageSliceBounds.top);
final RectF sliceBounds = new RectF();
matrix.mapRect(sliceBounds, localPageSliceBounds);
return sliceBounds;
}
private void setBitmap(Bitmap bitmap) {
if (bitmap != null && bitmap.getWidth() == -1 && bitmap.getHeight() == -1) {
return;
}
if (this.bitmap != bitmap) {
if (bitmap != null) {
if (this.bitmap != null) {
this.bitmap.recycle();
}
bitmapWeakReference = new SoftReference<Bitmap>(bitmap);
documentView.postInvalidate();
}
this.bitmap = bitmap;
}
}
private boolean isDecodingNow() {
return decodingNow;
}
private void setDecodingNow(boolean decodingNow) {
if (this.decodingNow != decodingNow) {
this.decodingNow = decodingNow;
if (decodingNow) {
documentView.progressModel.increase();
} else {
documentView.progressModel.decrease();
}
}
}
private Rect getTargetRect() {
if (targetRect == null) {
matrix.reset();
matrix.postScale(page.bounds.width(), page.bounds.height());
matrix.postTranslate(page.bounds.left, page.bounds.top);
RectF targetRectF = new RectF();
matrix.mapRect(targetRectF, pageSliceBounds);
targetRect = new Rect((int) targetRectF.left, (int) targetRectF.top, (int) targetRectF.right, (int) targetRectF.bottom);
}
return targetRect;
}
private void stopDecodingThisNode() {
if (!isDecodingNow()) {
return;
}
documentView.decodeService.stopDecoding(this);
setDecodingNow(false);
}
private boolean isHiddenByChildren() {
if (children == null) {
return false;
}
for (PageTreeNode child : children) {
if (child.getBitmap() == null) {
return false;
}
}
return true;
}
private void recycleChildren() {
if (children == null) {
return;
}
for (PageTreeNode child : children) {
child.recycle();
}
if (!childrenContainBitmaps()) {
children = null;
}
}
private boolean containsBitmaps() {
return getBitmap() != null || childrenContainBitmaps();
}
private boolean childrenContainBitmaps() {
if (children == null) {
return false;
}
for (PageTreeNode child : children) {
if (child.containsBitmaps()) {
return true;
}
}
return false;
}
private void recycle() {
stopDecodingThisNode();
setBitmap(null);
if (children != null) {
for (PageTreeNode child : children) {
child.recycle();
}
}
}
private boolean isVisibleAndNotHiddenByChildren() {
return isVisible() && !isHiddenByChildren();
}
}
| a434413631/huloomobile | huloomobile/src/com/poqop/document/PageTreeNode.java | Java | epl-1.0 | 8,894 | [
30522,
7427,
4012,
1012,
13433,
4160,
7361,
1012,
6254,
1025,
12324,
11924,
1012,
8389,
1012,
1008,
1025,
12324,
9262,
1012,
11374,
1012,
25416,
1012,
3730,
2890,
25523,
1025,
2465,
3931,
13334,
3630,
3207,
1063,
2797,
10763,
2345,
20014,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
# Diasperus fuernrohrii (F.Muell.) Kuntze SPECIES
#### Status
SYNONYM
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
null
#### Original name
null
### Remarks
null | mdoering/backbone | life/Plantae/Magnoliophyta/Magnoliopsida/Malpighiales/Phyllanthaceae/Phyllanthus/Phyllanthus fuernrohrii/ Syn. Diasperus fuernrohrii/README.md | Markdown | apache-2.0 | 196 | [
30522,
1001,
22939,
17668,
2271,
11865,
11795,
3217,
26378,
2072,
1006,
1042,
1012,
14163,
5349,
1012,
1007,
28919,
23102,
2427,
1001,
1001,
1001,
1001,
3570,
10675,
1001,
1001,
1001,
1001,
2429,
2000,
1996,
10161,
1997,
2166,
1010,
3822,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
module Vectra
class Rules
attr_accessor :target
@target = "/rules"
def self.all
Vectra::API.pull(@target)
end
def each
self.all.each do |host|
yield host
end
end
def self.get(id)
unless id.is_a? Integer
id = id.split("/").last
end
Vectra::API.pull("#{@target}/#{id}")
end
end
end | mikemackintosh/ruby-vectra | lib/vectra/rules.rb | Ruby | mit | 375 | [
30522,
11336,
2310,
6593,
2527,
2465,
3513,
2012,
16344,
1035,
3229,
2953,
1024,
4539,
1030,
4539,
1027,
1000,
1013,
3513,
1000,
13366,
2969,
1012,
2035,
2310,
6593,
2527,
1024,
1024,
17928,
1012,
4139,
1006,
1030,
4539,
1007,
2203,
13366,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
class ChartPage extends RunnerPage
{
/**
* The name of the dashboard the List is displayed on
* It's set up correctly in dash mode only
*/
public $dashElementName = "";
/**
* The corresponding dashboard name
* It's set up correctly in dash mode only
*/
public $dashTName = "";
/**
* show message block
*/
public $show_message_block = false;
/**
* @constructor
*/
function ChartPage(&$params = "")
{
parent::RunnerPage($params);
$this->jsSettings['tableSettings'][ $this->tName ]['simpleSearchActive'] = $this->searchClauseObj->simpleSearchActive;
}
/**
* Set the page's session prefix
*/
protected function assignSessionPrefix()
{
if( $this->mode == CHART_DASHBOARD )
$this->sessionPrefix = $this->dashTName."_".$this->tName;
else
$this->sessionPrefix = $this->tName;
}
/**
* Set session variables
*/
public function setSessionVariables()
{
parent::setSessionVariables();
// SearchClause class stuff
$agregateFields = $this->pSet->getListOfFieldsByExprType(true);
$this->searchClauseObj->haveAgregateFields = count($agregateFields) > 0;
$_SESSION[ $this->sessionPrefix.'_advsearch' ] = serialize( $this->searchClauseObj );
}
/**
* Build the activated Search panel
*/
public function buildSearchPanel()
{
if( $this->mode == CHART_DASHBOARD )
return;
parent::buildSearchPanel();
}
/**
* Process the page
*/
public function process()
{
// Before Process event
if( $this->eventsObject->exists("BeforeProcessChart") )
$this->eventsObject->BeforeProcessChart( $this );
$this->doCommonAssignments();
$this->addButtonHandlers();
$this->addCommonJs();
$this->commonAssign();
// display the 'Back to Master' link and master table info
$this->displayMasterTableInfo();
$this->showPage();
}
/**
* Get where clause for an active master-detail relationship
* @return string
*/
public function getMasterTableSQLClause()
{
if( $this->mode == CHART_DASHBOARD )
return "";
return parent::getMasterTableSQLClause();
}
/**
*
*/
public function doCommonAssignments() // TODO: make it protected
{
$this->xt->assign("id", $this->id);
//set the Search panel
$this->xt->assign("searchPanel", true);
if( $this->isShowMenu() )
$this->xt->assign("menu_block", true);
$this->xt->assign("chart_block", true);
$this->xt->assign("asearch_link", true);
$this->xt->assign("exportpdflink_attrs", "onclick='chart.saveAsPDF();'");
$this->xt->assign("advsearchlink_attrs", "id=\"advButton".$this->id."\"");
if( !GetChartXML( $this->shortTableName ) )
$this->xt->assign("chart_block", false);
if( ($this->mode == CHART_SIMPLE || $this->mode == CHART_DASHBOARD) && $this->pSet->noRecordsOnFirstPage() && !$this->searchClauseObj->isSearchFunctionalityActivated() )
{
$this->show_message_block = true;
$this->xt->displayBrickHidden("chart");
$this->xt->assign("chart_block", false);
$this->xt->assign("message_block", true);
$this->xt->assign("message", "No records found");
}
$this->assignChartElement();
if( $this->isDynamicPerm && IsAdmin() )
{
$this->xt->assign("adminarea_link", true);
$this->xt->assign("adminarealink_attrs", "id=\"adminArea".$id."\"");
}
$this->xt->assign("changepwd_link", $_SESSION["AccessLevel"] != ACCESS_LEVEL_GUEST && $_SESSION["fromFacebook"] == false);
$this->xt->assign("changepwdlink_attrs", "onclick=\"window.location.href='".GetTableLink("changepwd")."';return false;\"");
$this->body['begin'].= GetBaseScriptsForPage( $this->isDisplayLoading );
if( !isMobile() )
$this->body['begin'].= "<div id=\"search_suggest\" class=\"search_suggest\"></div>";
// assign body end
$this->body['end'] = array();
AssignMethod($this->body['end'], "assignBodyEnd", $this);
$this->xt->assignbyref('body', $this->body);
}
/**
* Set the chart xt variable
*/
public function assignChartElement()
{
//set params for the 'xt_showchart' method showing the chart
$chartXtParams = array(
"id" => $this->id,
"table" => $this->tName,
"ctype" => $this->pSet->getChartType(),
"resize" => $this->mode !== CHART_SIMPLE && $this->mode != CHART_DASHBOARD,
"chartname" => $this->shortTableName,
"chartPreview" => $this->mode !== CHART_SIMPLE && $this->mode != CHART_DASHBOARD
);
if( $this->mode == CHART_DASHBOARD || $this->mode == CHART_DASHDETAILS)
{
$dashSet = new ProjectSettings( $this->dashTName );
$dashElementData = $dashSet->getDashboardElementData( $this->dashElementName );
if( isset($dashElementData["width"]) || isset($dashElementData["height"]) ) //#10119
{
$chartXtParams["dashResize"] = true;
$chartXtParams["dashWidth"] = $dashElementData["width"];
$chartXtParams["dashHeight"] = $dashElementData["height"];
}
if( $this->mode == CHART_DASHBOARD )
{
$chartXtParams["dash"] = true;
$chartXtParams["dashTName"] = $this->dashTName;
$chartXtParams["dashElementName"] = $this->dashElementName;
}
}
$this->xt->assign_function( $this->shortTableName."_chart", "xt_showchart", $chartXtParams );
}
public function showPage()
{
if( $this->eventsObject->exists("BeforeShowChart") )
$this->eventsObject->BeforeShowChart($this->xt, $this->templatefile, $this);
if( $this->mode == CHART_DETAILS || $this->mode == CHART_DASHBOARD || $this->mode == CHART_DASHDETAILS )
{
$this->addControlsJSAndCSS();
$this->fillSetCntrlMaps();
$this->xt->unassign("header");
$this->xt->unassign("footer");
$this->body["begin"] = "";
$this->body["end"] = "";
$this->xt->assign("body", $this->body);
$bricksExcept = array("chart");
$this->xt->hideAllBricksExcept($bricksExcept);
if( $this->show_message_block )
$this->xt->assign("message_block", true);
$this->displayAJAX($this->templatefile, $this->id + 1);
exit();
}
if( $this->mode == CHART_POPUPDETAILS ) //currently unused
{
$bricksExcept = array("grid","pagination");
$this->xt->unassign('header');
$this->xt->unassign('footer');
$this->body["begin"] = '';
$this->body["end"] = '';
$this->xt->hideAllBricksExcept($bricksExcept);
$this->xt->prepare_template($this->templatefile);
$respArr = array();
$respArr['success'] = true;
$respArr['body'] = $this->xt->fetch_loaded("body");
$respArr['counter'] = postvalue('counter');
$this->xt->assign("container_master", false);
echo printJSON($respArr);
exit();
}
$this->display( $this->templatefile );
}
}
?> | tony19760619/PHPRunnerProjects | Jobs/output/classes/chartpage.php | PHP | mit | 6,600 | [
30522,
1026,
1029,
25718,
2465,
3673,
13704,
8908,
5479,
13704,
1063,
1013,
1008,
1008,
1008,
1996,
2171,
1997,
1996,
24923,
1996,
2862,
2003,
6913,
2006,
1008,
2009,
1005,
1055,
2275,
2039,
11178,
1999,
11454,
5549,
2069,
1008,
1013,
2270,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/* GStreamer
* Copyright (C) <2013> Wim Taymans <wim.taymans@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include <stdio.h>
#include <stdlib.h>
#include <gst/gst.h>
#include "gst/glib-compat-private.h"
#define BUFFER_SIZE (1400)
gint
main (gint argc, gchar * argv[])
{
gint i;
GstBuffer *tmp;
GstBufferPool *pool;
GstClockTime start, end;
GstClockTimeDiff dur1, dur2;
guint64 nbuffers;
GstStructure *conf;
gst_init (&argc, &argv);
if (argc != 2) {
g_print ("usage: %s <nbuffers>\n", argv[0]);
exit (-1);
}
nbuffers = atoi (argv[1]);
if (nbuffers <= 0) {
g_print ("number of buffers must be greater than 0\n");
exit (-3);
}
/* Let's just make sure the GstBufferClass is loaded ... */
tmp = gst_buffer_new ();
gst_buffer_unref (tmp);
pool = gst_buffer_pool_new ();
conf = gst_buffer_pool_get_config (pool);
gst_buffer_pool_config_set_params (conf, NULL, BUFFER_SIZE, 0, 0);
gst_buffer_pool_set_config (pool, conf);
gst_buffer_pool_set_active (pool, TRUE);
/* allocate buffers directly */
start = gst_util_get_timestamp ();
for (i = 0; i < nbuffers; i++) {
tmp = gst_buffer_new_allocate (NULL, BUFFER_SIZE, NULL);
gst_buffer_unref (tmp);
}
end = gst_util_get_timestamp ();
dur1 = GST_CLOCK_DIFF (start, end);
g_print ("*** total %" GST_TIME_FORMAT " - average %" GST_TIME_FORMAT
" - Done creating %" G_GUINT64_FORMAT " fresh buffers\n",
GST_TIME_ARGS (dur1), GST_TIME_ARGS (dur1 / nbuffers), nbuffers);
/* allocate buffers from the pool */
start = gst_util_get_timestamp ();
for (i = 0; i < nbuffers; i++) {
gst_buffer_pool_acquire_buffer (pool, &tmp, NULL);
gst_buffer_unref (tmp);
}
end = gst_util_get_timestamp ();
dur2 = GST_CLOCK_DIFF (start, end);
g_print ("*** total %" GST_TIME_FORMAT " - average %" GST_TIME_FORMAT
" - Done creating %" G_GUINT64_FORMAT " pooled buffers\n",
GST_TIME_ARGS (dur2), GST_TIME_ARGS (dur2 / nbuffers), nbuffers);
g_print ("*** speedup %6.4lf\n", ((gdouble) dur1 / (gdouble) dur2));
gst_buffer_pool_set_active (pool, FALSE);
gst_object_unref (pool);
return 0;
}
| google/aistreams | third_party/gstreamer/tests/benchmarks/gstpoolstress.c | C | apache-2.0 | 2,862 | [
30522,
1013,
1008,
28177,
25379,
2121,
1008,
9385,
1006,
1039,
1007,
1026,
2286,
1028,
15536,
2213,
28117,
15154,
1026,
15536,
2213,
1012,
28117,
15154,
1030,
20917,
4014,
1012,
4012,
1028,
1008,
1008,
2023,
3075,
2003,
2489,
4007,
1025,
20... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<!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_232) on Tue Sep 15 08:53:07 UTC 2020 -->
<title>Uses of Class org.springframework.messaging.simp.annotation.support.MissingSessionUserException (Spring Framework 5.1.18.RELEASE API)</title>
<meta name="date" content="2020-09-15">
<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="Uses of Class org.springframework.messaging.simp.annotation.support.MissingSessionUserException (Spring Framework 5.1.18.RELEASE 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><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../../org/springframework/messaging/simp/annotation/support/MissingSessionUserException.html" title="class in org.springframework.messaging.simp.annotation.support">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../../../../../../../overview-tree.html">Tree</a></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 class="aboutLanguage">Spring Framework</div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/springframework/messaging/simp/annotation/support/class-use/MissingSessionUserException.html" target="_top">Frames</a></li>
<li><a href="MissingSessionUserException.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">
<h2 title="Uses of Class org.springframework.messaging.simp.annotation.support.MissingSessionUserException" class="title">Uses of Class<br>org.springframework.messaging.simp.annotation.support.MissingSessionUserException</h2>
</div>
<div class="classUseContainer">No usage of org.springframework.messaging.simp.annotation.support.MissingSessionUserException</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><a href="../../../../../../../org/springframework/messaging/simp/annotation/support/MissingSessionUserException.html" title="class in org.springframework.messaging.simp.annotation.support">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../../../../../../../overview-tree.html">Tree</a></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 class="aboutLanguage">Spring Framework</div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/springframework/messaging/simp/annotation/support/class-use/MissingSessionUserException.html" target="_top">Frames</a></li>
<li><a href="MissingSessionUserException.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>
| akhr/java | Spring/jars/spring-framework-5.1.18.RELEASE/docs/javadoc-api/org/springframework/messaging/simp/annotation/support/class-use/MissingSessionUserException.html | HTML | apache-2.0 | 5,182 | [
30522,
1026,
999,
9986,
13874,
16129,
2270,
1000,
1011,
1013,
1013,
1059,
2509,
2278,
1013,
1013,
26718,
2094,
16129,
1018,
1012,
5890,
17459,
1013,
1013,
4372,
1000,
1000,
8299,
1024,
1013,
1013,
7479,
1012,
1059,
2509,
1012,
8917,
1013,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
namespace Vection\DI\Exceptions;
/**
* Class FileNotFoundException
* @package Vection\DI\Exceptions
*/
class FileNotFoundException extends \RuntimeException
{
/**
* FileNotFoundException constructor.
* @param string $file
* @param string $message
* @param int $code
* @param \Exception|null $previous
*/
public function __construct(string $file, $message = "", $code = 0, \Exception $previous = null)
{
$message .= "Could not found required container file. Please check the defined path ($file)";
parent::__construct($message, $code, $previous);
}
} | davidlung/vection | src/DI/Exceptions/FileNotFoundException.php | PHP | mit | 622 | [
30522,
1026,
1029,
25718,
3415,
15327,
2310,
7542,
1032,
4487,
1032,
11790,
1025,
1013,
1008,
1008,
1008,
2465,
5371,
17048,
14876,
8630,
10288,
24422,
1008,
1030,
7427,
2310,
7542,
1032,
4487,
1032,
11790,
1008,
1013,
2465,
5371,
17048,
14... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
# PG Titles_with_header.csv
## Add Column
## Add Node/Literal
#### Literal Node: `http://vocab.getty.edu/aat/300404670`
Literal Type: ``
<br/>Language: ``
<br/>isUri: `true`
#### Literal Node: `http://vocab.getty.edu/aat/300404012`
Literal Type: ``
<br/>Language: ``
<br/>isUri: `true`
## PyTransforms
#### _ObjectURI_
From column: _ObjectID_
``` python
return "object/" + getValue("ObjectID")
```
#### _TitleVal_
From column: _Title_
``` python
return getValue("Title")
```
#### _TitleURI_
From column: _TitleVal_
``` python
if getValue("Title")!="Untitled":
return UM.uri_from_fields(getValue("ObjectURI")+"/title/", getValue("TitleID"))
else:
return ""
```
#### _TitleID_URI_
From column: _TitleID_
``` python
return getValue("TitleURI") + "/id"
```
## Selections
#### _DEFAULT_TEST_
From column: _TitleID_
<br>Operation: `Union`
``` python
return getValue("TitleType") != "Primary Title"
```
## Semantic Types
| Column | Property | Class |
| ----- | -------- | ----- |
| _ObjectURI_ | `uri` | `crm:E22_Man-Made_Object1`|
| _Title_ | `rdfs:label` | `crm:E22_Man-Made_Object1`|
| _TitleID_ | `rdf:value` | `crm:E42_Identifier1`|
| _TitleID_URI_ | `uri` | `crm:E42_Identifier1`|
| _TitleURI_ | `uri` | `crm:E35_Title1`|
| _TitleVal_ | `rdf:value` | `crm:E35_Title1`|
## Links
| From | Property | To |
| --- | -------- | ---|
| `crm:E22_Man-Made_Object1` | `crm:P102_has_title` | `crm:E35_Title1`|
| `crm:E35_Title1` | `crm:P1_is_identified_by` | `crm:E42_Identifier1`|
| `crm:E35_Title1` | `crm:P2_has_type` | `http://vocab.getty.edu/aat/300404670`|
| `crm:E42_Identifier1` | `crm:P2_has_type` | `http://vocab.getty.edu/aat/300404012`|
| american-art/cbm | PG_Titles/PG_Titles-model.md | Markdown | cc0-1.0 | 1,661 | [
30522,
1001,
18720,
4486,
1035,
2007,
1035,
20346,
1012,
20116,
2615,
1001,
1001,
5587,
5930,
1001,
1001,
5587,
13045,
1013,
18204,
1001,
1001,
1001,
1001,
18204,
13045,
1024,
1036,
8299,
1024,
1013,
1013,
29536,
3540,
2497,
1012,
2131,
372... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package com.hyh.video.lib;
/**
* @author Administrator
* @description
* @data 2019/3/8
*/
public class FitXYMeasurer implements ISurfaceMeasurer {
private final int[] mMeasureSize = new int[2];
@Override
public int[] onMeasure(int defaultWidth, int defaultHeight, int videoWidth, int videoHeight) {
mMeasureSize[0] = defaultWidth;
mMeasureSize[1] = defaultHeight;
return mMeasureSize;
}
} | EricHyh/FileDownloader | VideoSample/src/main/java/com/hyh/video/lib/FitXYMeasurer.java | Java | mit | 436 | [
30522,
7427,
4012,
1012,
1044,
2100,
2232,
1012,
2678,
1012,
5622,
2497,
1025,
1013,
1008,
1008,
1008,
1030,
3166,
8911,
1008,
1030,
6412,
1008,
1030,
2951,
10476,
1013,
1017,
1013,
1022,
1008,
1013,
2270,
2465,
4906,
18037,
4168,
3022,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
jsonp({"cep":"69078002","logradouro":"Beco Carlos Juvino","bairro":"Japiim","cidade":"Manaus","uf":"AM","estado":"Amazonas"});
| lfreneda/cepdb | api/v1/69078002.jsonp.js | JavaScript | cc0-1.0 | 127 | [
30522,
1046,
3385,
2361,
1006,
1063,
1000,
8292,
2361,
1000,
1024,
1000,
28066,
2581,
17914,
2692,
2475,
1000,
1010,
1000,
8833,
12173,
8162,
2080,
1000,
1024,
1000,
2022,
3597,
5828,
18414,
26531,
1000,
1010,
1000,
21790,
18933,
1000,
1024... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* Copyright 2021 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.
*/
package com.google.android.exoplayer2;
import static com.google.common.truth.Truth.assertThat;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
/** Unit tests for {@link PlaybackParameters}. */
@RunWith(AndroidJUnit4.class)
public class PlaybackParametersTest {
@Test
public void roundTripViaBundle_ofPlaybackParameters_yieldsEqualInstance() {
PlaybackParameters playbackParameters =
new PlaybackParameters(/* speed= */ 2.9f, /* pitch= */ 1.2f);
assertThat(PlaybackParameters.CREATOR.fromBundle(playbackParameters.toBundle()))
.isEqualTo(playbackParameters);
}
}
| google/ExoPlayer | library/common/src/test/java/com/google/android/exoplayer2/PlaybackParametersTest.java | Java | apache-2.0 | 1,275 | [
30522,
1013,
1008,
1008,
9385,
25682,
1996,
11924,
2330,
3120,
2622,
1008,
1008,
7000,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
1996,
1000,
6105,
1000,
1007,
1025,
1008,
2017,
2089,
2025,
2224,
2023,
5371,
3272,
1999,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
namespace Lang\Service;
class Lang
{
protected $application = null;
protected $defaultLang = 'en';
public function __construct(\Zend\Mvc\Application $application)
{
$this->application = $application;
}
public function getLang()
{
$routeMatch = $this->application->getMvcEvent()->getRouteMatch();
if (null === $routeMatch) {
$config = $this->application->getServiceManager()->get('config');
if (isset($config['lang']) && isset($config['lang']['default_lang'])) {
return $config['lang']['default_lang'];
}
return $this->defaultLang;
}
$langParam = $routeMatch->getParam('lang');
if (null === $langParam) {
throw new \Exception('lang param not set yet');
}
return $langParam;
}
public function setDefault($default)
{
$this->defaultLang = $default;
return $this;
}
public function getDefault()
{
return $this->defaultLang;
}
public function getAllLangs()
{
return $this->getLangsAvailable();
}
public function getLangsAvailable()
{
$config = $this->application->getServiceManager()->get('config');
if (isset($config['lang']) && isset($config['lang']['langs_available'])) {
return $config['lang']['langs_available'];
}
return array($this->getLang());
}
/**
* Return the date time format for the current lang
*/
public function getDateTimeFormat()
{
$dateTimeFormats = $this->getDateTimeFormats();
if (isset($dateTimeFormats[$this->getLang()])) {
return $dateTimeFormats[$this->getLang()];
}
return $dateTimeFormats[$this->getDefault()];
}
/**
* Return the date time format for the current lang
*/
public function getDateTimeFormats()
{
$config = $this->application->getServiceManager()->get('Config');
$lang = $this->getLang();
if (isset($config['lang']['date_time_formats'])) {
return $config['lang']['date_time_formats'];
}
return array($this->getDefault() => \DateTime::ISO8601);
}
protected function getNamedGroupsRegexFromDateFormat($dateFormat)
{
$namedPatterns = array(
'dd' => '(?P<dd>[0-9]{2})',
'mm' => '(?P<mm>[0-9]{2})',
'yy' => '(?P<yy>[0-9]{4})',
);
$patterns = array();
$replacements = array();
foreach ($namedPatterns as $name => $replacement) {
$patterns[] = "/$name/";
$replacements[] = $replacement;
}
$regexFormat = '#' . preg_replace($patterns, $replacements, $dateFormat) . '#';
return $regexFormat;
}
protected function extractDatePartsFromFormat($dateValue, $format)
{
$regexFormat = $this->getNamedGroupsRegexFromDateFormat($format);
if (!(0 < preg_match_all($regexFormat, $dateValue, $matches))) {
return false;
}
return $matches;
}
protected function tryAllFormatsUntilDatePartsExtractionSucceedsOrFalse($dateValue, $skipCurrentLang=true)
{
$currentLang = $this->getLang();
$dateParts = false;
foreach ($this->getDateTimeFormats() as $lang => $format) {
if ($skipCurrentLang && $lang === $currentLang) continue;
$dateParts = $this->extractDatePartsFromFormat($dateValue, $format);
if ($dateParts) break;
}
return $dateParts;
}
public function getStandardDate($dateValue)
{
$format = $this->getDateTimeFormat();
$dateParts = $this->extractDatePartsFromFormat($dateValue, $format);
if (!$dateParts) {
$dateParts = $this->tryAllFormatsUntilDatePartsExtractionSucceedsOrFalse($dateValue, $skipCurrentLang=true);
}
if (!$dateParts) {
return false;
}
$day = current($dateParts['dd']);
$month = current($dateParts['mm']);
$year = current($dateParts['yy']);
$isoDate = "$year-$month-$day";
return $isoDate;
}
public function getLocale()
{
throw new \Exception('use getLang() instead of getLocale()');
}
}
| gbili/sc | module/Lang/src/Lang/Service/Lang.php | PHP | bsd-3-clause | 4,312 | [
30522,
1026,
1029,
25718,
3415,
15327,
11374,
1032,
2326,
1025,
2465,
11374,
1063,
5123,
1002,
4646,
1027,
19701,
1025,
5123,
1002,
12398,
25023,
1027,
1005,
4372,
1005,
1025,
2270,
3853,
1035,
1035,
9570,
1006,
1032,
16729,
2094,
1032,
198... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* Copyright (C) 2013 Square, Inc.
*
* 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.
*/
package com.squareup.picasso;
import android.graphics.Bitmap;
import android.net.Uri;
import java.io.IOException;
import java.io.InputStream;
/** A mechanism to load images from external resources such as a disk cache and/or the internet. */
public interface Downloader {
/**
* Download the specified image {@code url} from the internet.
*
* @param uri Remote image URL.
* @param localCacheOnly If {@code true} the URL should only be loaded if available in a local
* disk cache.
* @return {@link Response} containing either a {@link Bitmap} representation of the request or an
* {@link InputStream} for the image data. {@code null} can be returned to indicate a problem
* loading the bitmap.
* @throws IOException if the requested URL cannot successfully be loaded.
*/
Response load(Uri uri, boolean localCacheOnly) throws IOException;
/**
* Allows to perform a clean up for this {@link Downloader} including closing the disk cache and
* other resources.
*/
void shutdown();
/** Thrown for non-2XX responses. */
class ResponseException extends IOException {
public ResponseException(String message) {
super(message);
}
}
/** Response stream or bitmap and info. */
class Response {
final InputStream stream;
final Bitmap bitmap;
final boolean cached;
final long contentLength;
/**
* Response image and info.
*
* @param bitmap Image.
* @param loadedFromCache {@code true} if the source of the image is from a local disk cache.
* @deprecated Use {@link Response#Response(android.graphics.Bitmap, boolean, long)} instead.
*/
@Deprecated @SuppressWarnings("UnusedDeclaration")
public Response(Bitmap bitmap, boolean loadedFromCache) {
this(bitmap, loadedFromCache, -1);
}
/**
* Response stream and info.
*
* @param stream Image data stream.
* @param loadedFromCache {@code true} if the source of the stream is from a local disk cache.
* @deprecated Use {@link Response#Response(java.io.InputStream, boolean, long)} instead.
*/
@Deprecated @SuppressWarnings("UnusedDeclaration")
public Response(InputStream stream, boolean loadedFromCache) {
this(stream, loadedFromCache, -1);
}
/**
* Response image and info.
*
* @param bitmap Image.
* @param loadedFromCache {@code true} if the source of the image is from a local disk cache.
* @param contentLength The content length of the response, typically derived by the
* {@code Content-Length} HTTP header.
*/
public Response(Bitmap bitmap, boolean loadedFromCache, long contentLength) {
if (bitmap == null) {
throw new IllegalArgumentException("Bitmap may not be null.");
}
this.stream = null;
this.bitmap = bitmap;
this.cached = loadedFromCache;
this.contentLength = contentLength;
}
/**
* Response stream and info.
*
* @param stream Image data stream.
* @param loadedFromCache {@code true} if the source of the stream is from a local disk cache.
* @param contentLength The content length of the response, typically derived by the
* {@code Content-Length} HTTP header.
*/
public Response(InputStream stream, boolean loadedFromCache, long contentLength) {
if (stream == null) {
throw new IllegalArgumentException("Stream may not be null.");
}
this.stream = stream;
this.bitmap = null;
this.cached = loadedFromCache;
this.contentLength = contentLength;
}
/**
* Input stream containing image data.
* <p>
* If this returns {@code null}, image data will be available via {@link #getBitmap()}.
*/
public InputStream getInputStream() {
return stream;
}
/**
* Bitmap representing the image.
* <p>
* If this returns {@code null}, image data will be available via {@link #getInputStream()}.
*/
public Bitmap getBitmap() {
return bitmap;
}
/** Content length of the response. */
public long getContentLength() {
return contentLength;
}
}
}
| anton46/picasso | picasso/src/main/java/com/squareup/picasso/Downloader.java | Java | apache-2.0 | 4,750 | [
30522,
1013,
1008,
1008,
9385,
1006,
1039,
1007,
2286,
2675,
1010,
4297,
1012,
1008,
1008,
7000,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
1996,
1000,
6105,
1000,
1007,
1025,
1008,
2017,
2089,
2025,
2224,
2023,
5371,
32... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
#ifndef MUSICWEBDJRADIOCATEGORYWIDGET_H
#define MUSICWEBDJRADIOCATEGORYWIDGET_H
/***************************************************************************
* This file is part of the TTK Music Player project
* Copyright (C) 2015 - 2022 Greedysky Studio
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along
* with this program; If not, see <http://www.gnu.org/licenses/>.
***************************************************************************/
#include "musicclickedlabel.h"
#include "musicabstractitemquerywidget.h"
class QGridLayout;
class MusicDJRadioCategoryRequest;
/*! @brief The class of music dj radio category item widget.
* @author Greedysky <greedysky@163.com>
*/
class TTK_MODULE_EXPORT MusicWebDJRadioCategoryItemWidget : public MusicClickedLabel
{
Q_OBJECT
TTK_DECLARE_MODULE(MusicWebDJRadioCategoryItemWidget)
public:
/*!
* Object contsructor.
*/
explicit MusicWebDJRadioCategoryItemWidget(QWidget *parent = nullptr);
~MusicWebDJRadioCategoryItemWidget();
/*!
* Set music results item.
*/
void setMusicResultsItem(const MusicResultsItem &item);
Q_SIGNALS:
/*!
* Current item clicked.
*/
void currentItemClicked(const MusicResultsItem &item);
public Q_SLOTS:
/*!
* Send recieved data from net.
*/
void downLoadFinished(const QByteArray &bytes);
/*!
* Current item clicked.
*/
void currentItemClicked();
protected:
QLabel *m_iconLabel, *m_nameLabel;
MusicResultsItem m_itemData;
};
/*! @brief The class of music dj radio category widget.
* @author Greedysky <greedysky@163.com>
*/
class TTK_MODULE_EXPORT MusicWebDJRadioCategoryWidget : public QWidget
{
Q_OBJECT
TTK_DECLARE_MODULE(MusicWebDJRadioCategoryWidget)
public:
/*!
* Object contsructor.
*/
explicit MusicWebDJRadioCategoryWidget(QWidget *parent = nullptr);
~MusicWebDJRadioCategoryWidget();
/*!
* Init parameters.
*/
void initialize();
/*!
* Resize window bound by widget resize called.
*/
void resizeWindow();
Q_SIGNALS:
/*!
* Current category clicked.
*/
void currentCategoryClicked(const MusicResultsItem &item);
public Q_SLOTS:
/*!
* Query all quality musics is finished.
*/
void createCategoryItems();
protected:
QGridLayout *m_gridLayout;
QList<QLabel*> m_resizeWidgets;
MusicDJRadioCategoryRequest *m_categoryThread;
};
#endif // MUSICWEBDJRADIOCATEGORYWIDGET_H
| Greedysky/TTKMusicplayer | TTKModule/TTKWidget/musicToolsKits/musicwebdjradiocategorywidget.h | C | gpl-3.0 | 3,019 | [
30522,
1001,
2065,
13629,
2546,
2189,
8545,
2497,
2094,
3501,
12173,
3695,
16280,
20255,
2100,
9148,
24291,
1035,
1044,
1001,
9375,
2189,
8545,
2497,
2094,
3501,
12173,
3695,
16280,
20255,
2100,
9148,
24291,
1035,
1044,
1013,
1008,
1008,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
jsonp({"cep":"17206437","logradouro":"Rua Renato Sampaio de Almeida Prado","bairro":"Jardim Bela Vista","cidade":"Ja\u00fa","uf":"SP","estado":"S\u00e3o Paulo"});
| lfreneda/cepdb | api/v1/17206437.jsonp.js | JavaScript | cc0-1.0 | 163 | [
30522,
1046,
3385,
2361,
1006,
1063,
1000,
8292,
2361,
1000,
1024,
1000,
23535,
21084,
24434,
1000,
1010,
1000,
8833,
12173,
8162,
2080,
1000,
1024,
1000,
21766,
2050,
14916,
10610,
3520,
4502,
3695,
2139,
29555,
10975,
9365,
1000,
1010,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package command;
import org.junit.Test;
/**
* Created by eder on 19/10/15.
*/
public class RemoteCeilingFanTest {
@Test
public void testRemoteControlCeilingFan(){
RemoteControl remoteControl = new RemoteControl();
CeilingFan ceilingFan = new CeilingFan("Living room");
CeilingFanHightCommand ceilingFanHightCommand = new CeilingFanHightCommand(ceilingFan);
CeilingFanMediumCommand ceilingFanMediumCommand = new CeilingFanMediumCommand(ceilingFan);
CeilingFanOffCommand ceilingFanOffCommand = new CeilingFanOffCommand(ceilingFan);
remoteControl.setCommand(0, ceilingFanHightCommand, ceilingFanOffCommand);
remoteControl.setCommand(1, ceilingFanMediumCommand, ceilingFanOffCommand);
remoteControl.onButtonWasPushed(0);
remoteControl.offButtonWasPushed(0);
System.out.println(remoteControl);
remoteControl.undoButtonWasPushed();
remoteControl.onButtonWasPushed(1);
System.out.println(remoteControl);
remoteControl.undoButtonWasPushed();
}
}
| EderRoger/design_pattern | test/src/command/RemoteCeilingFanTest.java | Java | gpl-2.0 | 1,075 | [
30522,
7427,
3094,
1025,
12324,
8917,
1012,
12022,
4183,
1012,
3231,
1025,
1013,
1008,
1008,
1008,
2580,
2011,
3968,
2121,
2006,
2539,
1013,
2184,
1013,
30524,
6556,
8663,
13181,
2140,
6556,
8663,
13181,
2140,
1027,
2047,
6556,
8663,
13181,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
@extends('Main.Boilerplate')
@section('htmltag')
<html id="browse">
@stop
@section('bodytag')
<body class="padding nav" data-url="{{ url() }}">
@stop
@section('content')
<div class="browse container">
<div class="row">
<ol class="breadcrumb breadcrumb-arrow">
<li><a href="{{ url('/') }}">{{ trans('main.home') }}</a></li>
<li class="active"><span>{{ trans('main.movies') }}</span></li>
<li class="breadcrumb-tools">
@if(Helpers::hasAccess('titles.create'))
<a href="{{ url(Str::slug(trans('main.movies')) . '/create') }}" class="pull-right hidden-xs btn btn-inverse">{{ trans('main.create new') }}</a>
@endif
</li>
</ol>
@include('Partials.FilterBar', array('action' => Str::slug(head(Request::segments()))))
</div>
<div class="row"> @include('Partials.Response') </div>
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-8 browse-col">
<div id="grid" class="browse-grid">
@if ( ! $data->isEmpty())
@foreach($data as $k => $r)
<figure class="col-sm-4 col-lg-3 col-xs-8" ontouchstart="this.classList.toggle('hover');" data-filter-class='{{ Helpers::genreFilter($r->genre) }}' data-popularity="{{ $r['mc_num_of_votes'] ? $r['mc_num_of_votes'] : ($r['imdb_votes_num'] ? $r['imdb_votes_num'] : $r['tmdb_popularity'])}}" data-name="{{{ $r->title }}}" data-release="{{{ $r->year }}}">
<div class="img-container">
<a class="flip-container-vertical" href="{{Helpers::url($r['title'], $r['id'], $r['type'])}}">
<div class="flipper">
<img class ="img-responsive flip-front" src="{{str_replace('w185', 'w342', $r->poster) }}" alt="{{{ $r['title'] }}}">
<div class="flip-back">
<h5>{{ $r['title'] }}</h5>
</div>
</div>
</a>
<figcaption title="{{{ $r->title }}}" >
<a href="{{Helpers::url($r['title'], $r['id'], $r['type'])}}"> {{ Helpers::shrtString($r['title']) }} </a>
<section class="row action-buttons">
@include('Partials.AddToListButtons')
@if ($r['mc_critic_score'])
<span class="pull-right">{{ substr($r['mc_critic_score'], 0, -1) . '/10' }}</span>
@elseif ($r['imdb_rating'])
<span class="pull-right">{{ ! str_contains($r['imdb_rating'], '.') ? $r['imdb_rating'] . '.0' : $r['imdb_rating'] . '/10'}} </span>
@elseif ($r['tmdb_rating'])
<span class="pull-right">{{ ! str_contains($r['tmdb_rating'], '.') ? $r['tmdb_rating'] . '.0' : $r['tmdb_rating'] . '/10'}}</span>
@endif
</section>
</figcaption>
</div>
</figure>
@endforeach
@else
<div><h3 class="reviews-not-released"> {{ trans('main.no results') }}</h3></div>
@endif
</div>
<div class="pagination-bottom">{{ $data->appends(array())->links() }}</div>
</div>
<div class="col-xs-6 col-md-4"></div>
</div>
</div>
@stop
| liverbool/n.com | app/views/Titles/Browse.blade.php | PHP | apache-2.0 | 3,528 | [
30522,
1030,
8908,
1006,
1005,
2364,
1012,
15635,
15725,
1005,
1007,
1030,
2930,
1006,
1005,
16129,
15900,
1005,
1007,
1026,
16129,
8909,
1027,
1000,
11347,
2063,
1000,
1028,
1030,
2644,
1030,
2930,
1006,
1005,
2303,
15900,
1005,
1007,
1026... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* From Coreboot
* Copyright (C) 2008-2009 coresystems GmbH
*
* SPDX-License-Identifier: GPL-2.0
*/
#include <common.h>
#include <ahci.h>
#include <dm.h>
#include <fdtdec.h>
#include <asm/io.h>
#include <asm/pch_common.h>
#include <asm/pci.h>
#include <asm/arch/pch.h>
DECLARE_GLOBAL_DATA_PTR;
static void common_sata_init(struct udevice *dev, unsigned int port_map)
{
u32 reg32;
u16 reg16;
/* Set IDE I/O Configuration */
reg32 = SIG_MODE_PRI_NORMAL | FAST_PCB1 | FAST_PCB0 | PCB1 | PCB0;
dm_pci_write_config32(dev, IDE_CONFIG, reg32);
/* Port enable */
dm_pci_read_config16(dev, 0x92, ®16);
reg16 &= ~0x3f;
reg16 |= port_map;
dm_pci_write_config16(dev, 0x92, reg16);
/* SATA Initialization register */
port_map &= 0xff;
dm_pci_write_config32(dev, 0x94, ((port_map ^ 0x3f) << 24) | 0x183);
}
static void bd82x6x_sata_init(struct udevice *dev, struct udevice *pch)
{
unsigned int port_map, speed_support, port_tx;
const void *blob = gd->fdt_blob;
int node = dev_of_offset(dev);
const char *mode;
u32 reg32;
u16 reg16;
debug("SATA: Initializing...\n");
/* SATA configuration */
port_map = fdtdec_get_int(blob, node, "intel,sata-port-map", 0);
speed_support = fdtdec_get_int(blob, node,
"sata_interface_speed_support", 0);
mode = fdt_getprop(blob, node, "intel,sata-mode", NULL);
if (!mode || !strcmp(mode, "ahci")) {
ulong abar;
debug("SATA: Controller in AHCI mode\n");
/* Set timings */
dm_pci_write_config16(dev, IDE_TIM_PRI, IDE_DECODE_ENABLE |
IDE_ISP_3_CLOCKS | IDE_RCT_1_CLOCKS |
IDE_PPE0 | IDE_IE0 | IDE_TIME0);
dm_pci_write_config16(dev, IDE_TIM_SEC, IDE_DECODE_ENABLE |
IDE_ISP_5_CLOCKS | IDE_RCT_4_CLOCKS);
/* Sync DMA */
dm_pci_write_config16(dev, IDE_SDMA_CNT, IDE_PSDE0);
dm_pci_write_config16(dev, IDE_SDMA_TIM, 0x0001);
common_sata_init(dev, 0x8000 | port_map);
/* Initialize AHCI memory-mapped space */
abar = dm_pci_read_bar32(dev, 5);
debug("ABAR: %08lx\n", abar);
/* CAP (HBA Capabilities) : enable power management */
reg32 = readl(abar + 0x00);
reg32 |= 0x0c006000; /* set PSC+SSC+SALP+SSS */
reg32 &= ~0x00020060; /* clear SXS+EMS+PMS */
/* Set ISS, if available */
if (speed_support) {
reg32 &= ~0x00f00000;
reg32 |= (speed_support & 0x03) << 20;
}
writel(reg32, abar + 0x00);
/* PI (Ports implemented) */
writel(port_map, abar + 0x0c);
(void) readl(abar + 0x0c); /* Read back 1 */
(void) readl(abar + 0x0c); /* Read back 2 */
/* CAP2 (HBA Capabilities Extended)*/
reg32 = readl(abar + 0x24);
reg32 &= ~0x00000002;
writel(reg32, abar + 0x24);
/* VSP (Vendor Specific Register */
reg32 = readl(abar + 0xa0);
reg32 &= ~0x00000005;
writel(reg32, abar + 0xa0);
} else if (!strcmp(mode, "combined")) {
debug("SATA: Controller in combined mode\n");
/* No AHCI: clear AHCI base */
dm_pci_write_bar32(dev, 5, 0x00000000);
/* And without AHCI BAR no memory decoding */
dm_pci_read_config16(dev, PCI_COMMAND, ®16);
reg16 &= ~PCI_COMMAND_MEMORY;
dm_pci_write_config16(dev, PCI_COMMAND, reg16);
dm_pci_write_config8(dev, 0x09, 0x80);
/* Set timings */
dm_pci_write_config16(dev, IDE_TIM_PRI, IDE_DECODE_ENABLE |
IDE_ISP_5_CLOCKS | IDE_RCT_4_CLOCKS);
dm_pci_write_config16(dev, IDE_TIM_SEC, IDE_DECODE_ENABLE |
IDE_ISP_3_CLOCKS | IDE_RCT_1_CLOCKS |
IDE_PPE0 | IDE_IE0 | IDE_TIME0);
/* Sync DMA */
dm_pci_write_config16(dev, IDE_SDMA_CNT, IDE_SSDE0);
dm_pci_write_config16(dev, IDE_SDMA_TIM, 0x0200);
common_sata_init(dev, port_map);
} else {
debug("SATA: Controller in plain-ide mode\n");
/* No AHCI: clear AHCI base */
dm_pci_write_bar32(dev, 5, 0x00000000);
/* And without AHCI BAR no memory decoding */
dm_pci_read_config16(dev, PCI_COMMAND, ®16);
reg16 &= ~PCI_COMMAND_MEMORY;
dm_pci_write_config16(dev, PCI_COMMAND, reg16);
/*
* Native mode capable on both primary and secondary (0xa)
* OR'ed with enabled (0x50) = 0xf
*/
dm_pci_write_config8(dev, 0x09, 0x8f);
/* Set timings */
dm_pci_write_config16(dev, IDE_TIM_PRI, IDE_DECODE_ENABLE |
IDE_ISP_3_CLOCKS | IDE_RCT_1_CLOCKS |
IDE_PPE0 | IDE_IE0 | IDE_TIME0);
dm_pci_write_config16(dev, IDE_TIM_SEC, IDE_DECODE_ENABLE |
IDE_SITRE | IDE_ISP_3_CLOCKS |
IDE_RCT_1_CLOCKS | IDE_IE0 | IDE_TIME0);
/* Sync DMA */
dm_pci_write_config16(dev, IDE_SDMA_CNT, IDE_SSDE0 | IDE_PSDE0);
dm_pci_write_config16(dev, IDE_SDMA_TIM, 0x0201);
common_sata_init(dev, port_map);
}
/* Set Gen3 Transmitter settings if needed */
port_tx = fdtdec_get_int(blob, node, "intel,sata-port0-gen3-tx", 0);
if (port_tx)
pch_iobp_update(pch, SATA_IOBP_SP0G3IR, 0, port_tx);
port_tx = fdtdec_get_int(blob, node, "intel,sata-port1-gen3-tx", 0);
if (port_tx)
pch_iobp_update(pch, SATA_IOBP_SP1G3IR, 0, port_tx);
/* Additional Programming Requirements */
pch_common_sir_write(dev, 0x04, 0x00001600);
pch_common_sir_write(dev, 0x28, 0xa0000033);
reg32 = pch_common_sir_read(dev, 0x54);
reg32 &= 0xff000000;
reg32 |= 0x5555aa;
pch_common_sir_write(dev, 0x54, reg32);
pch_common_sir_write(dev, 0x64, 0xcccc8484);
reg32 = pch_common_sir_read(dev, 0x68);
reg32 &= 0xffff0000;
reg32 |= 0xcccc;
pch_common_sir_write(dev, 0x68, reg32);
reg32 = pch_common_sir_read(dev, 0x78);
reg32 &= 0x0000ffff;
reg32 |= 0x88880000;
pch_common_sir_write(dev, 0x78, reg32);
pch_common_sir_write(dev, 0x84, 0x001c7000);
pch_common_sir_write(dev, 0x88, 0x88338822);
pch_common_sir_write(dev, 0xa0, 0x001c7000);
pch_common_sir_write(dev, 0xc4, 0x0c0c0c0c);
pch_common_sir_write(dev, 0xc8, 0x0c0c0c0c);
pch_common_sir_write(dev, 0xd4, 0x10000000);
pch_iobp_update(pch, 0xea004001, 0x3fffffff, 0xc0000000);
pch_iobp_update(pch, 0xea00408a, 0xfffffcff, 0x00000100);
}
static void bd82x6x_sata_enable(struct udevice *dev)
{
const void *blob = gd->fdt_blob;
int node = dev_of_offset(dev);
unsigned port_map;
const char *mode;
u16 map = 0;
/*
* Set SATA controller mode early so the resource allocator can
* properly assign IO/Memory resources for the controller.
*/
mode = fdt_getprop(blob, node, "intel,sata-mode", NULL);
if (mode && !strcmp(mode, "ahci"))
map = 0x0060;
port_map = fdtdec_get_int(blob, node, "intel,sata-port-map", 0);
map |= (port_map ^ 0x3f) << 8;
dm_pci_write_config16(dev, 0x90, map);
}
static int bd82x6x_sata_bind(struct udevice *dev)
{
struct udevice *scsi_dev;
int ret;
if (gd->flags & GD_FLG_RELOC) {
ret = ahci_bind_scsi(dev, &scsi_dev);
if (ret)
return ret;
}
return 0;
}
static int bd82x6x_sata_probe(struct udevice *dev)
{
struct udevice *pch;
int ret;
ret = uclass_first_device_err(UCLASS_PCH, &pch);
if (ret)
return ret;
if (!(gd->flags & GD_FLG_RELOC))
bd82x6x_sata_enable(dev);
else {
bd82x6x_sata_init(dev, pch);
ret = ahci_probe_scsi_pci(dev);
if (ret)
return ret;
}
return 0;
}
static const struct udevice_id bd82x6x_ahci_ids[] = {
{ .compatible = "intel,pantherpoint-ahci" },
{ }
};
U_BOOT_DRIVER(ahci_ivybridge_drv) = {
.name = "ahci_ivybridge",
.id = UCLASS_AHCI,
.of_match = bd82x6x_ahci_ids,
.bind = bd82x6x_sata_bind,
.probe = bd82x6x_sata_probe,
};
| guileschool/beagleboard | u-boot/arch/x86/cpu/ivybridge/sata.c | C | mit | 7,162 | [
30522,
1013,
1008,
1008,
2013,
4563,
27927,
1008,
9385,
1006,
1039,
1007,
2263,
1011,
2268,
25562,
27268,
6633,
2015,
18289,
1008,
1008,
23772,
2595,
1011,
6105,
1011,
8909,
4765,
18095,
1024,
14246,
2140,
1011,
1016,
1012,
1014,
1008,
1013... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
'use strict';
exports = module.exports = function(service) {
return {
message: function(user) {
return '<p>' + 'Welcome to ' + service + ' ' + user.fullname + '!' + '</p>' +
'<p>' + 'You have now linked your Google+ account to this service' + '</p>';
},
title: function() {
return 'You linked your Google+ account to our service';
}
};
};
| SIB-Colombia/cygnus | src/app/modules/mailer/templates/google/link.js | JavaScript | mit | 360 | [
30522,
1005,
2224,
9384,
1005,
1025,
14338,
1027,
11336,
1012,
14338,
1027,
3853,
1006,
2326,
1007,
1063,
2709,
1063,
4471,
1024,
3853,
1006,
5310,
1007,
1063,
2709,
1005,
1026,
1052,
1028,
1005,
1009,
1005,
6160,
2000,
1005,
1009,
2326,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
#ifndef __APARSE_H__
#define __APARSE_H__
#include <string>
#include <vector>
#include <map>
using namespace std;
struct NumElement;
struct Expression;
struct MutiCheckNode;
typedef enum CompareOperator
{
COPER_EQUAL,
COPER_NOTEQUAL,
COPER_LESS,
COPER_BIG,
COPER_NUMBER
};
typedef enum ValueType
{
VALUETYPE_INT = 0,
VALUETYPE_FLOAT,
VALUETYPE_DOUBLE,
VALUETYPE_STRING,
VALUETYPE_BOOL,
VALUETYPE_NUMBER
};
typedef enum RelationshipOperator
{
ROPER_AND,
ROPER_OR,
ROPER_NUMBER
};
struct Expression
{
bool is_param;
string param_name;
unsigned param_index;
ValueType type;
string value;
int int_value;
bool is_null;
Expression():is_param(false), param_name(""), param_index(0), type(VALUETYPE_STRING), value("1"), int_value(0), is_null(false){}
};
struct TowParamCompare
{
Expression l_expr;
Expression r_expr;
CompareOperator c_oper;
TowParamCompare() : c_oper(COPER_EQUAL){}
};
struct OneParamCompare
{
Expression expr;
};
struct CheckNode
{
bool result;
bool result_is_not;
bool use_two_param_compare;
OneParamCompare one_compare;
TowParamCompare two_compare;
vector<MutiCheckNode> muti_node;
CheckNode() : result_is_not(false), use_two_param_compare(false){}
};
struct MutiCheckNode
{
CheckNode node;
RelationshipOperator oper;
MutiCheckNode() : oper(ROPER_AND){}
};
struct ResultNode
{
bool isChecked;
bool result;
const CheckNode* node;
ResultNode () : isChecked(false), result(false), node(NULL){}
};
struct ParameterValue
{
ValueType type;
const void* value;
int len;
ParameterValue() : type(VALUETYPE_STRING), value(NULL), len(0){}
};
class Parse
{
public:
Parse();
~Parse();
int setExpression(const string& expr_);
bool getResult(const vector<ParameterValue>& params_) const;
const vector<string>& getParaNames() const;
void Dump() const;
private:
int setNode(const string& expr_, CheckNode& node_);
void setNodeValue(const string& expr_, CheckNode& node_);
int getNodeExpression(const string& expr_, string& node_expr_,
RelationshipOperator& rs_oper_, string& left_expr_,
bool& is_muti_node_, bool& is_not_result) const;
ValueType getValueType(const string& expr_) const;
bool getNodeResult(const CheckNode& node_, const vector<ParameterValue>& params_) const;
bool getResult(const CheckNode& node_, const vector<ParameterValue>& params_) const;
private:
CheckNode _description;
vector<string> _param_names;
};
#endif
| victorzjl/BPE | src/business/ConditionParse.h | C | bsd-3-clause | 2,671 | [
30522,
1001,
2065,
13629,
2546,
1035,
1035,
9706,
11650,
2063,
1035,
1044,
1035,
1035,
1001,
9375,
1035,
1035,
9706,
11650,
2063,
1035,
1044,
1035,
1035,
1001,
2421,
1026,
5164,
1028,
1001,
2421,
1026,
9207,
1028,
1001,
2421,
1026,
4949,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
include_once("bqf_strings.php");
class bqf_unescape_stringTest extends PHPUnit_Framework_TestCase {
public function testUnescape() {
$tests = array(
array("one", "one"),
array('<a href="test">test</a>', '<a href="test">test</a>'),
array(' with spaces ', ' with spaces '),
array(' "quoted"', 'quoted'),
array(" `it's a comment` ", "it's a comment"),
array(' "a new\nline" ', "a new\nline"),
array(' "delimited \" in string"', "delimited \" in string"),
array(' "cross \\\' delimit"', "cross \\' delimit")
);
foreach ($tests as $test) {
$this->assertEquals(bqf_unescape_string($test[0]), $test[1]);
}
}
} | electricbookworks/betterquiz | public/lib/betterquiz/func.bqf_unescape_string.test.php | PHP | agpl-3.0 | 662 | [
30522,
1026,
1029,
25718,
2421,
1035,
2320,
1006,
1000,
1038,
4160,
2546,
1035,
7817,
1012,
25718,
1000,
1007,
1025,
2465,
1038,
4160,
2546,
1035,
16655,
15782,
5051,
1035,
5164,
22199,
8908,
25718,
19496,
2102,
1035,
7705,
1035,
3231,
1838... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
---
layout: page
title: Jack Norton's 82nd Birthday
date: 2016-05-24
author: Gabriel Knapp
tags: weekly links, java
status: published
summary: Suspendisse eu scelerisque urna, nec efficitur mauris. Nam quis.
banner: images/banner/leisure-01.jpg
booking:
startDate: 10/16/2019
endDate: 10/21/2019
ctyhocn: DFWASHX
groupCode: JN8B
published: true
---
Nunc ullamcorper elementum eros et consectetur. Duis eleifend nibh ac pulvinar ultricies. Vivamus a tellus in urna lobortis malesuada. Sed ac ex lobortis, pulvinar eros quis, tempor justo. Donec malesuada, ipsum eu interdum aliquet, odio tellus fermentum ex, sit amet consequat eros eros ut neque. Pellentesque aliquet efficitur ipsum at interdum. Morbi auctor convallis augue, eu varius neque vulputate at. Maecenas vitae neque pulvinar, ornare mauris id, malesuada nisl. Nullam mollis, tortor at aliquam ultricies, turpis elit maximus ipsum, at fringilla augue felis eu leo. Nulla facilisi. Aenean consectetur leo risus, eget ultrices ligula tempus non. Etiam sit amet sapien hendrerit, sagittis mauris quis, elementum nisi. Aliquam erat volutpat. Nunc condimentum massa a massa luctus lacinia. Duis fringilla aliquet lectus, non maximus lectus interdum at.
1 Etiam euismod odio eget lorem egestas aliquet
1 Mauris eu tortor aliquet, faucibus sem vel, fringilla orci
1 Nulla varius erat in bibendum feugiat
1 Curabitur quis eros mollis, maximus mi in, sollicitudin purus.
Vestibulum at auctor ipsum, quis iaculis purus. Curabitur iaculis suscipit leo vitae ornare. Integer commodo quis diam sed fermentum. Morbi blandit massa eget tortor finibus maximus. Mauris sit amet tempus purus, quis lacinia ante. Phasellus eu sollicitudin ex. Pellentesque finibus interdum tellus eu interdum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque magna augue, eleifend eu erat id, hendrerit pretium est.
Cras nec sapien ac lectus mollis convallis eu ut sem. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam varius lorem ac libero finibus, nec placerat libero vehicula. Phasellus vestibulum mauris in dapibus tempor. Quisque suscipit sagittis lacus, eget viverra quam facilisis eget. Vivamus sed fringilla ligula. Curabitur nec risus et elit sollicitudin eleifend in vel metus. Proin aliquet rhoncus nibh non commodo. Cras non fringilla tellus.
| KlishGroup/prose-pogs | pogs/D/DFWASHX/JN8B/index.md | Markdown | mit | 2,395 | [
30522,
1011,
1011,
1011,
9621,
1024,
3931,
2516,
1024,
2990,
10770,
1005,
1055,
6445,
4859,
5798,
3058,
1024,
2355,
1011,
5709,
1011,
2484,
3166,
1024,
6127,
14161,
29098,
22073,
1024,
4882,
6971,
1010,
9262,
3570,
1024,
2405,
12654,
1024,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
# generator-hapi-mysql-routes
| jinsyaoommen/generator-hapi-mysql-routes | README.md | Markdown | mit | 30 | [
30522,
1001,
13103,
1011,
5292,
8197,
1011,
2026,
2015,
4160,
2140,
1011,
5847,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
// @(#)root/base:$Id$
// Author: Rene Brun 08/12/94
/*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifndef ROOT_TROOT
#define ROOT_TROOT
//////////////////////////////////////////////////////////////////////////
// //
// TROOT //
// //
// The TROOT object is the entry point to the system. //
// The single instance of TROOT is accessable via the global gROOT. //
// Using the gROOT pointer one has access to basically every object //
// created in a ROOT based program. The TROOT object is essentially a //
// "dispatcher" with several lists pointing to the ROOT main objects. //
// //
//////////////////////////////////////////////////////////////////////////
#ifndef ROOT_TDirectory
#include "TDirectory.h"
#endif
#ifndef ROOT_TList
#include "TList.h"
#endif
class TClass;
class TCanvas;
class TColor;
class TDataType;
class TFile;
class TStyle;
class TVirtualPad;
class TApplication;
class TInterpreter;
class TBrowser;
class TGlobal;
class TFunction;
class TFolder;
class TPluginManager;
class TProcessUUID;
class TClassGenerator;
class TVirtualMutex;
R__EXTERN TVirtualMutex *gROOTMutex;
class TROOT : public TDirectory {
friend class TCint;
friend class TCintWithCling;
private:
Int_t fLineIsProcessing; //To synchronize multi-threads
static Int_t fgDirLevel; //Indentation level for ls()
static Bool_t fgRootInit; //Singleton initialization flag
static Bool_t fgMemCheck; //Turn on memory leak checker
TROOT(const TROOT&); //Not implemented
TROOT& operator=(const TROOT&); //Not implemented
protected:
TString fConfigOptions; //ROOT ./configure set build options
TString fConfigFeatures; //ROOT ./configure detected build features
TString fVersion; //ROOT version (from CMZ VERSQQ) ex 0.05/01
Int_t fVersionInt; //ROOT version in integer format (501)
Int_t fVersionCode; //ROOT version code as used in RVersion.h
Int_t fVersionDate; //Date of ROOT version (ex 951226)
Int_t fVersionTime; //Time of ROOT version (ex 1152)
Int_t fBuiltDate; //Date of ROOT built
Int_t fBuiltTime; //Time of ROOT built
Int_t fSvnRevision; //Subversion revision number of built (dec value of Git short SHA1)
TString fGitCommit; //Git commit SHA1 of built
TString fGitBranch; //Git branch
TString fGitDate; //Date and time when make was run
Int_t fTimer; //Timer flag
TApplication *fApplication; //Pointer to current application
TInterpreter *fInterpreter; //Command interpreter
Bool_t fBatch; //True if session without graphics
Bool_t fEditHistograms; //True if histograms can be edited with the mouse
Bool_t fFromPopUp; //True if command executed from a popup menu
Bool_t fMustClean; //True if object destructor scans canvases
Bool_t fReadingObject; //True while reading an object [Deprecated (will be removed in next release)
Bool_t fForceStyle; //Force setting of current style when reading objects
Bool_t fInterrupt; //True if macro should be interrupted
Bool_t fEscape; //True if ESC has been pressed
Bool_t fExecutingMacro; //True while executing a TMacro
Int_t fEditorMode; //Current Editor mode
const TObject *fPrimitive; //Currently selected primitive
TVirtualPad *fSelectPad; //Currently selected pad
TCollection *fClasses; //List of classes definition
TCollection *fTypes; //List of data types definition
TCollection *fGlobals; //List of global variables
TCollection *fGlobalFunctions; //List of global functions
TSeqCollection *fClosedObjects; //List of closed objects from the list of files and sockets, so we can delete them if neededCl.
TSeqCollection *fFiles; //List of files
TSeqCollection *fMappedFiles; //List of memory mapped files
TSeqCollection *fSockets; //List of network sockets
TSeqCollection *fCanvases; //List of canvases
TSeqCollection *fStyles; //List of styles
TCollection *fFunctions; //List of analytic functions
TSeqCollection *fTasks; //List of tasks
TSeqCollection *fColors; //List of colors
TSeqCollection *fGeometries; //List of geometries
TSeqCollection *fBrowsers; //List of browsers
TSeqCollection *fSpecials; //List of special objects
TSeqCollection *fCleanups; //List of recursiveRemove collections
TSeqCollection *fMessageHandlers; //List of message handlers
TSeqCollection *fStreamerInfo; //List of active StreamerInfo classes
TCollection *fClassGenerators; //List of user defined class generators;
TSeqCollection *fSecContexts; //List of security contexts (TSecContext)
TSeqCollection *fProofs; //List of proof sessions
TSeqCollection *fClipboard; //List of clipbard objects
TSeqCollection *fDataSets; //List of data sets (TDSet or TChain)
TProcessUUID *fUUIDs; //Pointer to TProcessID managing TUUIDs
TFolder *fRootFolder; //top level folder //root
TList *fBrowsables; //List of browsables
TPluginManager *fPluginManager; //Keeps track of plugin library handlers
TString fCutClassName; //Name of default CutG class in graphics editor
TString fDefCanvasName; //Name of default canvas
TROOT(); //Only used by Dictionary
void InitSystem(); //Operating System interface
void InitThreads(); //Initialize threads library
void ReadGitInfo(); //Read Subversion revision number and branch name
void *operator new(size_t l) { return TObject::operator new(l); }
public:
TROOT(const char *name, const char *title, VoidFuncPtr_t *initfunc = 0);
virtual ~TROOT();
void AddClass(TClass *cl);
void AddClassGenerator(TClassGenerator *gen);
void Browse(TBrowser *b);
Bool_t ClassSaved(TClass *cl);
void CloseFiles();
virtual TObject *FindObject(const char *name) const;
virtual TObject *FindObject(const TObject *obj) const;
virtual TObject *FindObjectAny(const char *name) const;
virtual TObject *FindObjectAnyFile(const char *name) const;
TObject *FindSpecialObject(const char *name, void *&where);
const char *FindObjectClassName(const char *name) const;
const char *FindObjectPathName(const TObject *obj) const;
TClass *FindSTLClass(const char *name, Bool_t load, Bool_t silent = kFALSE) const;
void ForceStyle(Bool_t force = kTRUE) { fForceStyle = force; }
Bool_t FromPopUp() const { return fFromPopUp; }
TPluginManager *GetPluginManager() const { return fPluginManager; }
TApplication *GetApplication() const { return fApplication; }
TInterpreter *GetInterpreter() const { return fInterpreter; }
TClass *GetClass(const char *name, Bool_t load = kTRUE, Bool_t silent = kFALSE) const;
TClass *GetClass(const type_info &typeinfo, Bool_t load = kTRUE, Bool_t silent = kFALSE) const;
TColor *GetColor(Int_t color) const;
const char *GetConfigOptions() const { return fConfigOptions; }
const char *GetConfigFeatures() const { return fConfigFeatures; }
const char *GetCutClassName() const { return fCutClassName; }
const char *GetDefCanvasName() const { return fDefCanvasName; }
Bool_t GetEditHistograms() const { return fEditHistograms; }
Int_t GetEditorMode() const { return fEditorMode; }
Bool_t GetForceStyle() const { return fForceStyle; }
Int_t GetBuiltDate() const { return fBuiltDate; }
Int_t GetBuiltTime() const { return fBuiltTime; }
Int_t GetSvnRevision() const { return fSvnRevision; }
const char *GetSvnBranch() const { return fGitBranch; }
const char *GetSvnDate() { return GetGitDate(); }
const char *GetGitCommit() const { return fGitCommit; }
const char *GetGitBranch() const { return fGitBranch; }
const char *GetGitDate();
Int_t GetVersionDate() const { return fVersionDate; }
Int_t GetVersionTime() const { return fVersionTime; }
Int_t GetVersionInt() const { return fVersionInt; }
Int_t GetVersionCode() const { return fVersionCode; }
const char *GetVersion() const { return fVersion; }
TCollection *GetListOfClasses() const { return fClasses; }
TSeqCollection *GetListOfColors() const { return fColors; }
TCollection *GetListOfTypes(Bool_t load = kFALSE);
TCollection *GetListOfGlobals(Bool_t load = kFALSE);
TCollection *GetListOfGlobalFunctions(Bool_t load = kFALSE);
TSeqCollection *GetListOfClosedObjects() const { return fClosedObjects; }
TSeqCollection *GetListOfFiles() const { return fFiles; }
TSeqCollection *GetListOfMappedFiles() const { return fMappedFiles; }
TSeqCollection *GetListOfSockets() const { return fSockets; }
TSeqCollection *GetListOfCanvases() const { return fCanvases; }
TSeqCollection *GetListOfStyles() const { return fStyles; }
TCollection *GetListOfFunctions() const { return fFunctions; }
TSeqCollection *GetListOfGeometries() const { return fGeometries; }
TSeqCollection *GetListOfBrowsers() const { return fBrowsers; }
TSeqCollection *GetListOfSpecials() const { return fSpecials; }
TSeqCollection *GetListOfTasks() const { return fTasks; }
TSeqCollection *GetListOfCleanups() const { return fCleanups; }
TSeqCollection *GetListOfStreamerInfo() const { return fStreamerInfo; }
TSeqCollection *GetListOfMessageHandlers() const { return fMessageHandlers; }
TCollection *GetListOfClassGenerators() const { return fClassGenerators; }
TSeqCollection *GetListOfSecContexts() const { return fSecContexts; }
TSeqCollection *GetListOfProofs() const { return fProofs; }
TSeqCollection *GetClipboard() const { return fClipboard; }
TSeqCollection *GetListOfDataSets() const { return fDataSets; }
TList *GetListOfBrowsables() const { return fBrowsables; }
TDataType *GetType(const char *name, Bool_t load = kFALSE) const;
TFile *GetFile() const { if (gDirectory != this) return gDirectory->GetFile(); else return 0;}
TFile *GetFile(const char *name) const;
TStyle *GetStyle(const char *name) const;
TObject *GetFunction(const char *name) const;
TGlobal *GetGlobal(const char *name, Bool_t load = kFALSE) const;
TGlobal *GetGlobal(const TObject *obj, Bool_t load = kFALSE) const;
TFunction *GetGlobalFunction(const char *name, const char *params = 0, Bool_t load = kFALSE);
TFunction *GetGlobalFunctionWithPrototype(const char *name, const char *proto = 0, Bool_t load = kFALSE);
TObject *GetGeometry(const char *name) const;
const TObject *GetSelectedPrimitive() const { return fPrimitive; }
TVirtualPad *GetSelectedPad() const { return fSelectPad; }
Int_t GetNclasses() const { return fClasses->GetSize(); }
Int_t GetNtypes() const { return fTypes->GetSize(); }
TFolder *GetRootFolder() const { return fRootFolder; }
TProcessUUID *GetUUIDs() const { return fUUIDs; }
void Idle(UInt_t idleTimeInSec, const char *command = 0);
Int_t IgnoreInclude(const char *fname, const char *expandedfname);
Bool_t IsBatch() const { return fBatch; }
Bool_t IsExecutingMacro() const { return fExecutingMacro; }
Bool_t IsFolder() const { return kTRUE; }
Bool_t IsInterrupted() const { return fInterrupt; }
Bool_t IsEscaped() const { return fEscape; }
Bool_t IsLineProcessing() const { return fLineIsProcessing ? kTRUE : kFALSE; }
Bool_t IsProofServ() const { return fName == "proofserv" ? kTRUE : kFALSE; }
void ls(Option_t *option = "") const;
Int_t LoadClass(const char *classname, const char *libname, Bool_t check = kFALSE);
TClass *LoadClass(const char *name, Bool_t silent = kFALSE) const;
Int_t LoadMacro(const char *filename, Int_t *error = 0, Bool_t check = kFALSE);
Long_t Macro(const char *filename, Int_t *error = 0, Bool_t padUpdate = kTRUE);
TCanvas *MakeDefCanvas() const;
void Message(Int_t id, const TObject *obj);
Bool_t MustClean() const { return fMustClean; }
Long_t ProcessLine(const char *line, Int_t *error = 0);
Long_t ProcessLineSync(const char *line, Int_t *error = 0);
Long_t ProcessLineFast(const char *line, Int_t *error = 0);
Bool_t ReadingObject() const { /* Deprecated (will be removed in next release) */ return fReadingObject; }
void RefreshBrowsers();
void RemoveClass(TClass *);
void Reset(Option_t *option="");
void SaveContext();
void SetApplication(TApplication *app) { fApplication = app; }
void SetBatch(Bool_t batch = kTRUE) { fBatch = batch; }
void SetCutClassName(const char *name = "TCutG");
void SetDefCanvasName(const char *name = "c1") { fDefCanvasName = name; }
void SetEditHistograms(Bool_t flag = kTRUE) { fEditHistograms = flag; }
void SetEditorMode(const char *mode = "");
void SetExecutingMacro(Bool_t flag = kTRUE) { fExecutingMacro = flag; }
void SetFromPopUp(Bool_t flag = kTRUE) { fFromPopUp = flag; }
void SetInterrupt(Bool_t flag = kTRUE) { fInterrupt = flag; }
void SetEscape(Bool_t flag = kTRUE) { fEscape = flag; }
void SetLineIsProcessing() { fLineIsProcessing++; }
void SetLineHasBeenProcessed() { if (fLineIsProcessing) fLineIsProcessing--; }
void SetReadingObject(Bool_t flag = kTRUE) { fReadingObject = flag; }
void SetMustClean(Bool_t flag = kTRUE) { fMustClean=flag; }
void SetSelectedPrimitive(const TObject *obj) { fPrimitive = obj; }
void SetSelectedPad(TVirtualPad *pad) { fSelectPad = pad; }
void SetStyle(const char *stylename = "Default");
void Time(Int_t casetime=1) { fTimer = casetime; }
Int_t Timer() const { return fTimer; }
//---- static functions
static Int_t DecreaseDirLevel();
static Int_t GetDirLevel();
static const char *GetMacroPath();
static void SetMacroPath(const char *newpath);
static Int_t IncreaseDirLevel();
static void IndentLevel();
static Bool_t Initialized();
static Bool_t MemCheck();
static void SetDirLevel(Int_t level = 0);
static Int_t ConvertVersionCode2Int(Int_t code);
static Int_t ConvertVersionInt2Code(Int_t v);
static Int_t RootVersionCode();
ClassDef(TROOT,0) //Top level (or root) structure for all classes
};
R__EXTERN TROOT *gROOT;
namespace ROOT {
TROOT *GetROOT();
}
#endif
| krafczyk/root-5.34.09-ams | core/base/inc/TROOT.h | C | lgpl-2.1 | 16,857 | [
30522,
1013,
1013,
1030,
30524,
1024,
10731,
7987,
4609,
5511,
1013,
2260,
1013,
6365,
1013,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
---
title: Joel and the Outcome
date: 2015-07-08T08:09:52+00:00
layout: post
thumbnail_path: 2015/07/joel-and-the-outcome2.jpg
videoID: 2015/20150708.mp4
tags:
- 2015-rushville-in
---
{% include aws.html id=page.videoID poster=page.thumbnail_path %}
Day 5 | faithworkcamps/faithworkcamps.github.io | _posts/2015-07-08-joel-and-the-outcome.md | Markdown | mit | 257 | [
30522,
1011,
1011,
1011,
2516,
1024,
8963,
1998,
1996,
9560,
3058,
1024,
2325,
1011,
5718,
1011,
5511,
2102,
2692,
2620,
1024,
5641,
1024,
4720,
1009,
4002,
1024,
4002,
9621,
1024,
2695,
7639,
25464,
1035,
4130,
1024,
2325,
1013,
5718,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
/**
* Checks that the opening brace of a class/interface/trait is on the same line as the class declaration.
*
* @author Greg Sherwood <gsherwood@squiz.net>
* @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600)
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
*/
namespace PHP_CodeSniffer\Standards\Generic\Sniffs\Classes;
use PHP_CodeSniffer\Sniffs\Sniff;
use PHP_CodeSniffer\Files\File;
class OpeningBraceSameLineSniff implements Sniff
{
/**
* Returns an array of tokens this test wants to listen for.
*
* @return array
*/
public function register()
{
return [
T_CLASS,
T_INTERFACE,
T_TRAIT,
];
}//end register()
/**
* Processes this test, when one of its tokens is encountered.
*
* @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned.
* @param int $stackPtr The position of the current token
* in the stack passed in $tokens.
*
* @return void
*/
public function process(File $phpcsFile, $stackPtr)
{
$tokens = $phpcsFile->getTokens();
$scopeIdentifier = $phpcsFile->findNext(T_STRING, ($stackPtr + 1));
$errorData = [strtolower($tokens[$stackPtr]['content']).' '.$tokens[$scopeIdentifier]['content']];
if (isset($tokens[$stackPtr]['scope_opener']) === false) {
$error = 'Possible parse error: %s missing opening or closing brace';
$phpcsFile->addWarning($error, $stackPtr, 'MissingBrace', $errorData);
return;
}
$openingBrace = $tokens[$stackPtr]['scope_opener'];
// Is the brace on the same line as the class/interface/trait declaration ?
$lastClassLineToken = $phpcsFile->findPrevious(T_WHITESPACE, ($openingBrace - 1), $stackPtr, true);
$lastClassLine = $tokens[$lastClassLineToken]['line'];
$braceLine = $tokens[$openingBrace]['line'];
$lineDifference = ($braceLine - $lastClassLine);
if ($lineDifference > 0) {
$phpcsFile->recordMetric($stackPtr, 'Class opening brace placement', 'new line');
$error = 'Opening brace should be on the same line as the declaration for %s';
$fix = $phpcsFile->addFixableError($error, $openingBrace, 'BraceOnNewLine', $errorData);
if ($fix === true) {
$phpcsFile->fixer->beginChangeset();
$phpcsFile->fixer->addContent($lastClassLineToken, ' {');
$phpcsFile->fixer->replaceToken($openingBrace, '');
$phpcsFile->fixer->endChangeset();
}
} else {
$phpcsFile->recordMetric($stackPtr, 'Class opening brace placement', 'same line');
}
// Is the opening brace the last thing on the line ?
$next = $phpcsFile->findNext(T_WHITESPACE, ($openingBrace + 1), null, true);
if ($tokens[$next]['line'] === $tokens[$openingBrace]['line']) {
if ($next === $tokens[$stackPtr]['scope_closer']) {
// Ignore empty classes.
return;
}
$error = 'Opening brace must be the last content on the line';
$fix = $phpcsFile->addFixableError($error, $openingBrace, 'ContentAfterBrace');
if ($fix === true) {
$phpcsFile->fixer->addNewline($openingBrace);
}
}
// Only continue checking if the opening brace looks good.
if ($lineDifference > 0) {
return;
}
// Is there precisely one space before the opening brace ?
if ($tokens[($openingBrace - 1)]['code'] !== T_WHITESPACE) {
$length = 0;
} else if ($tokens[($openingBrace - 1)]['content'] === "\t") {
$length = '\t';
} else {
$length = strlen($tokens[($openingBrace - 1)]['content']);
}
if ($length !== 1) {
$error = 'Expected 1 space before opening brace; found %s';
$data = [$length];
$fix = $phpcsFile->addFixableError($error, $openingBrace, 'SpaceBeforeBrace', $data);
if ($fix === true) {
if ($length === 0 || $length === '\t') {
$phpcsFile->fixer->addContentBefore($openingBrace, ' ');
} else {
$phpcsFile->fixer->replaceToken(($openingBrace - 1), ' ');
}
}
}
}//end process()
}//end class
| VANINUitgeverij/PHP_CodeSniffer | src/Standards/Generic/Sniffs/Classes/OpeningBraceSameLineSniff.php | PHP | bsd-3-clause | 4,619 | [
30522,
1026,
1029,
25718,
1013,
1008,
1008,
1008,
14148,
2008,
1996,
3098,
17180,
1997,
1037,
2465,
1013,
8278,
1013,
18275,
2003,
2006,
1996,
2168,
2240,
2004,
1996,
2465,
8170,
1012,
1008,
1008,
1030,
3166,
6754,
19427,
1026,
28177,
5886,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* Copyright (c) 2010, JANET(UK)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. 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.
*
* 3. Neither the name of JANET(UK) nor the names of its 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 COPYRIGHT HOLDER OR CONTRIBUTORS 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.
*/
/*
* Copyright (c) 1998-2016 Carnegie Mellon University.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. 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.
*
* 3. The name "Carnegie Mellon University" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For permission or any other legal
* details, please contact
* Carnegie Mellon University
* Center for Technology Transfer and Enterprise Creation
* 4615 Forbes Avenue
* Suite 302
* Pittsburgh, PA 15213
* (412) 268-7393, fax: (412) 268-7395
* innovation@andrew.cmu.edu
*
* 4. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by Computing Services
* at Carnegie Mellon University (http://www.cmu.edu/computing/)."
*
* CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <config.h>
#include <gssapi/gssapi.h>
#ifndef KRB5_HEIMDAL
#ifdef HAVE_GSSAPI_GSSAPI_EXT_H
#include <gssapi/gssapi_ext.h>
#endif
#endif
#include <fcntl.h>
#include <stdio.h>
#include <sasl.h>
#include <saslutil.h>
#include <saslplug.h>
#include "plugin_common.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <errno.h>
#include <assert.h>
#include "gs2_token.h"
#define GS2_CB_FLAG_MASK 0x0F
#define GS2_CB_FLAG_N 0x00
#define GS2_CB_FLAG_P 0x01
#define GS2_CB_FLAG_Y 0x02
#define GS2_NONSTD_FLAG 0x10
typedef struct context {
gss_ctx_id_t gss_ctx;
gss_name_t client_name;
gss_name_t server_name;
gss_cred_id_t server_creds;
gss_cred_id_t client_creds;
char *out_buf;
unsigned out_buf_len;
const sasl_utils_t *utils;
char *authid;
char *authzid;
union {
sasl_client_plug_t *client;
sasl_server_plug_t *server;
} plug;
gss_OID mechanism;
int gs2_flags;
char *cbindingname;
struct gss_channel_bindings_struct gss_cbindings;
sasl_secret_t *password;
unsigned int free_password;
OM_uint32 lifetime;
} context_t;
static gss_OID_set gs2_mechs = GSS_C_NO_OID_SET;
static int gs2_get_init_creds(context_t *context,
sasl_client_params_t *params,
sasl_interact_t **prompt_need,
sasl_out_params_t *oparams);
static int gs2_verify_initial_message(context_t *text,
sasl_server_params_t *sparams,
const char *in,
unsigned inlen,
gss_buffer_t token);
static int gs2_make_header(context_t *text,
sasl_client_params_t *cparams,
const char *authzid,
char **out,
unsigned *outlen);
static int gs2_make_message(context_t *text,
sasl_client_params_t *cparams,
int initialContextToken,
gss_buffer_t token,
char **out,
unsigned *outlen);
static int gs2_get_mech_attrs(const sasl_utils_t *utils,
const gss_OID mech,
unsigned int *security_flags,
unsigned int *features,
const unsigned long **prompts);
static int gs2_indicate_mechs(const sasl_utils_t *utils);
static int gs2_map_sasl_name(const sasl_utils_t *utils,
const char *mech,
gss_OID *oid);
static int gs2_duplicate_buffer(const sasl_utils_t *utils,
const gss_buffer_t src,
gss_buffer_t dst);
static int gs2_unescape_authzid(const sasl_utils_t *utils,
char **in,
unsigned *inlen,
char **authzid);
static int gs2_escape_authzid(const sasl_utils_t *utils,
const char *in,
unsigned inlen,
char **authzid);
/* sasl_gs_log: only logs status string returned from gss_display_status() */
#define sasl_gs2_log(x,y,z) sasl_gs2_seterror_(x,y,z,1)
#define sasl_gs2_seterror(x,y,z) sasl_gs2_seterror_(x,y,z,0)
static int
sasl_gs2_seterror_(const sasl_utils_t *utils, OM_uint32 maj, OM_uint32 min,
int logonly);
static context_t *
sasl_gs2_new_context(const sasl_utils_t *utils)
{
context_t *ret;
ret = utils->malloc(sizeof(context_t));
if (ret == NULL)
return NULL;
memset(ret, 0, sizeof(context_t));
ret->utils = utils;
return ret;
}
static int
sasl_gs2_free_context_contents(context_t *text)
{
OM_uint32 min_stat;
if (text == NULL)
return SASL_OK;
if (text->gss_ctx != GSS_C_NO_CONTEXT) {
gss_delete_sec_context(&min_stat,&text->gss_ctx,
GSS_C_NO_BUFFER);
text->gss_ctx = GSS_C_NO_CONTEXT;
}
if (text->client_name != GSS_C_NO_NAME) {
gss_release_name(&min_stat,&text->client_name);
text->client_name = GSS_C_NO_NAME;
}
if (text->server_name != GSS_C_NO_NAME) {
gss_release_name(&min_stat,&text->server_name);
text->server_name = GSS_C_NO_NAME;
}
if (text->server_creds != GSS_C_NO_CREDENTIAL) {
gss_release_cred(&min_stat, &text->server_creds);
text->server_creds = GSS_C_NO_CREDENTIAL;
}
if (text->client_creds != GSS_C_NO_CREDENTIAL) {
gss_release_cred(&min_stat, &text->client_creds);
text->client_creds = GSS_C_NO_CREDENTIAL;
}
if (text->authid != NULL) {
text->utils->free(text->authid);
text->authid = NULL;
}
if (text->authzid != NULL) {
text->utils->free(text->authzid);
text->authzid = NULL;
}
gss_release_buffer(&min_stat, &text->gss_cbindings.application_data);
if (text->out_buf != NULL) {
text->utils->free(text->out_buf);
text->out_buf = NULL;
}
text->out_buf_len = 0;
if (text->cbindingname != NULL) {
text->utils->free(text->cbindingname);
text->cbindingname = NULL;
}
if (text->free_password)
_plug_free_secret(text->utils, &text->password);
memset(text, 0, sizeof(*text));
return SASL_OK;
}
static void
gs2_common_mech_dispose(void *conn_context, const sasl_utils_t *utils)
{
sasl_gs2_free_context_contents((context_t *)(conn_context));
utils->free(conn_context);
}
static void
gs2_common_mech_free(void *global_context __attribute__((unused)),
const sasl_utils_t *utils __attribute__((unused)))
{
OM_uint32 minor;
if (gs2_mechs != GSS_C_NO_OID_SET) {
gss_release_oid_set(&minor, &gs2_mechs);
gs2_mechs = GSS_C_NO_OID_SET;
}
}
/***************************** Server Section *****************************/
static int
gs2_server_mech_new(void *glob_context,
sasl_server_params_t *params,
const char *challenge __attribute__((unused)),
unsigned challen __attribute__((unused)),
void **conn_context)
{
context_t *text;
int ret;
text = sasl_gs2_new_context(params->utils);
if (text == NULL) {
MEMERROR(params->utils);
return SASL_NOMEM;
}
text->gss_ctx = GSS_C_NO_CONTEXT;
text->client_name = GSS_C_NO_NAME;
text->server_name = GSS_C_NO_NAME;
text->server_creds = GSS_C_NO_CREDENTIAL;
text->client_creds = GSS_C_NO_CREDENTIAL;
text->plug.server = glob_context;
ret = gs2_map_sasl_name(params->utils, text->plug.server->mech_name,
&text->mechanism);
if (ret != SASL_OK) {
gs2_common_mech_dispose(text, params->utils);
return ret;
}
*conn_context = text;
return SASL_OK;
}
static int
gs2_server_mech_step(void *conn_context,
sasl_server_params_t *params,
const char *clientin,
unsigned clientinlen,
const char **serverout,
unsigned *serveroutlen,
sasl_out_params_t *oparams)
{
context_t *text = (context_t *)conn_context;
gss_buffer_desc input_token = GSS_C_EMPTY_BUFFER;
gss_buffer_desc output_token = GSS_C_EMPTY_BUFFER;
OM_uint32 maj_stat = GSS_S_FAILURE, min_stat = 0;
gss_buffer_desc name_buf = GSS_C_EMPTY_BUFFER;
gss_buffer_desc short_name_buf = GSS_C_EMPTY_BUFFER;
gss_name_t without = GSS_C_NO_NAME;
gss_OID_set_desc mechs;
OM_uint32 out_flags = 0;
int ret = SASL_OK, equal = 0;
int initialContextToken = (text->gss_ctx == GSS_C_NO_CONTEXT);
char *p;
if (serverout == NULL) {
PARAMERROR(text->utils);
return SASL_BADPARAM;
}
*serverout = NULL;
*serveroutlen = 0;
if (initialContextToken) {
name_buf.length = strlen(params->service) + 1 + strlen(params->serverFQDN);
name_buf.value = params->utils->malloc(name_buf.length + 1);
if (name_buf.value == NULL) {
MEMERROR(text->utils);
ret = SASL_NOMEM;
goto cleanup;
}
snprintf(name_buf.value, name_buf.length + 1,
"%s@%s", params->service, params->serverFQDN);
maj_stat = gss_import_name(&min_stat,
&name_buf,
GSS_C_NT_HOSTBASED_SERVICE,
&text->server_name);
params->utils->free(name_buf.value);
name_buf.value = NULL;
if (GSS_ERROR(maj_stat))
goto cleanup;
assert(text->server_creds == GSS_C_NO_CREDENTIAL);
mechs.count = 1;
mechs.elements = (gss_OID)text->mechanism;
if (params->gss_creds == GSS_C_NO_CREDENTIAL) {
maj_stat = gss_acquire_cred(&min_stat,
text->server_name,
GSS_C_INDEFINITE,
&mechs,
GSS_C_ACCEPT,
&text->server_creds,
NULL,
&text->lifetime);
if (GSS_ERROR(maj_stat))
goto cleanup;
}
ret = gs2_verify_initial_message(text,
params,
clientin,
clientinlen,
&input_token);
if (ret != SASL_OK)
goto cleanup;
} else {
input_token.value = (void *)clientin;
input_token.length = clientinlen;
}
maj_stat = gss_accept_sec_context(&min_stat,
&text->gss_ctx,
(params->gss_creds != GSS_C_NO_CREDENTIAL)
? (gss_cred_id_t)params->gss_creds
: text->server_creds,
&input_token,
&text->gss_cbindings,
&text->client_name,
NULL,
&output_token,
&out_flags,
&text->lifetime,
&text->client_creds);
if (GSS_ERROR(maj_stat)) {
sasl_gs2_log(text->utils, maj_stat, min_stat);
text->utils->seterror(text->utils->conn, SASL_NOLOG,
"GS2 Failure: gss_accept_sec_context");
ret = (maj_stat == GSS_S_BAD_BINDINGS) ? SASL_BADBINDING : SASL_BADAUTH;
goto cleanup;
}
*serveroutlen = output_token.length;
if (output_token.value != NULL) {
ret = _plug_buf_alloc(text->utils, &text->out_buf,
&text->out_buf_len, *serveroutlen);
if (ret != SASL_OK)
goto cleanup;
memcpy(text->out_buf, output_token.value, *serveroutlen);
*serverout = text->out_buf;
} else {
/* No output token, send an empty string */
*serverout = "";
serveroutlen = 0;
}
if (maj_stat == GSS_S_CONTINUE_NEEDED) {
ret = SASL_CONTINUE;
goto cleanup;
}
assert(maj_stat == GSS_S_COMPLETE);
if ((out_flags & GSS_C_SEQUENCE_FLAG) == 0) {
ret = SASL_BADAUTH;
goto cleanup;
}
maj_stat = gss_display_name(&min_stat, text->client_name,
&name_buf, NULL);
if (GSS_ERROR(maj_stat))
goto cleanup;
ret = gs2_duplicate_buffer(params->utils, &name_buf, &short_name_buf);
if (ret != 0)
goto cleanup;
p = (char *)memchr(name_buf.value, '@', name_buf.length);
if (p != NULL) {
short_name_buf.length = (p - (char *)name_buf.value);
maj_stat = gss_import_name(&min_stat,
&short_name_buf,
GSS_C_NT_USER_NAME,
&without);
if (GSS_ERROR(maj_stat)) {
goto cleanup;
}
maj_stat = gss_compare_name(&min_stat, text->client_name,
without, &equal);
if (GSS_ERROR(maj_stat)) {
goto cleanup;
}
if (equal)
((char *)short_name_buf.value)[short_name_buf.length] = '\0';
}
text->authid = (char *)short_name_buf.value;
short_name_buf.value = NULL;
short_name_buf.length = 0;
if (text->authzid != NULL) {
ret = params->canon_user(params->utils->conn,
text->authzid, 0,
SASL_CU_AUTHZID, oparams);
if (ret != SASL_OK) {
goto cleanup;
}
}
ret = params->canon_user(params->utils->conn,
text->authid, 0,
text->authzid == NULL
? (SASL_CU_AUTHZID | SASL_CU_AUTHID)
: SASL_CU_AUTHID,
oparams);
if (ret != SASL_OK) {
goto cleanup;
}
switch (text->gs2_flags & GS2_CB_FLAG_MASK) {
case GS2_CB_FLAG_N:
oparams->cbindingdisp = SASL_CB_DISP_NONE;
break;
case GS2_CB_FLAG_P:
oparams->cbindingdisp = SASL_CB_DISP_USED;
oparams->cbindingname = text->cbindingname;
break;
case GS2_CB_FLAG_Y:
oparams->cbindingdisp = SASL_CB_DISP_WANT;
break;
}
if (text->client_creds != GSS_C_NO_CREDENTIAL)
oparams->client_creds = &text->client_creds;
else
oparams->client_creds = NULL;
oparams->gss_peer_name = text->client_name;
oparams->gss_local_name = text->server_name;
oparams->maxoutbuf = 0xFFFFFF;
oparams->encode = NULL;
oparams->decode = NULL;
oparams->mech_ssf = 0;
oparams->doneflag = 1;
ret = SASL_OK;
cleanup:
if (ret == SASL_OK && maj_stat != GSS_S_COMPLETE) {
sasl_gs2_seterror(text->utils, maj_stat, min_stat);
ret = SASL_FAIL;
}
if (initialContextToken) {
gss_release_buffer(&min_stat, &input_token);
}
gss_release_buffer(&min_stat, &name_buf);
gss_release_buffer(&min_stat, &short_name_buf);
gss_release_buffer(&min_stat, &output_token);
gss_release_name(&min_stat, &without);
if (ret < SASL_OK) {
sasl_gs2_free_context_contents(text);
}
return ret;
}
static int
gs2_common_plug_init(const sasl_utils_t *utils,
size_t plugsize,
int (*plug_alloc)(const sasl_utils_t *,
void *,
const gss_buffer_t,
const gss_OID),
void **pluglist,
int *plugcount)
{
OM_uint32 major, minor;
size_t i, count = 0;
void *plugs = NULL;
*pluglist = NULL;
*plugcount = 0;
if (gs2_indicate_mechs(utils) != SASL_OK) {
return SASL_NOMECH;
}
plugs = utils->malloc(gs2_mechs->count * plugsize);
if (plugs == NULL) {
MEMERROR(utils);
return SASL_NOMEM;
}
memset(plugs, 0, gs2_mechs->count * plugsize);
for (i = 0; i < gs2_mechs->count; i++) {
gss_buffer_desc sasl_mech_name = GSS_C_EMPTY_BUFFER;
major = gss_inquire_saslname_for_mech(&minor,
&gs2_mechs->elements[i],
&sasl_mech_name,
GSS_C_NO_BUFFER,
GSS_C_NO_BUFFER);
if (GSS_ERROR(major))
continue;
#define PLUG_AT(index) (void *)((unsigned char *)plugs + (count * plugsize))
if (plug_alloc(utils, PLUG_AT(count), &sasl_mech_name,
&gs2_mechs->elements[i]) == SASL_OK)
count++;
gss_release_buffer(&minor, &sasl_mech_name);
}
if (count == 0) {
utils->free(plugs);
return SASL_NOMECH;
}
*pluglist = plugs;
*plugcount = count;
return SASL_OK;
}
static int
gs2_server_plug_alloc(const sasl_utils_t *utils,
void *plug,
gss_buffer_t sasl_name,
gss_OID mech)
{
int ret;
sasl_server_plug_t *splug = (sasl_server_plug_t *)plug;
gss_buffer_desc buf;
memset(splug, 0, sizeof(*splug));
ret = gs2_get_mech_attrs(utils, mech,
&splug->security_flags,
&splug->features,
NULL);
if (ret != SASL_OK)
return ret;
ret = gs2_duplicate_buffer(utils, sasl_name, &buf);
if (ret != SASL_OK)
return ret;
splug->mech_name = (char *)buf.value;
splug->glob_context = plug;
splug->mech_new = gs2_server_mech_new;
splug->mech_step = gs2_server_mech_step;
splug->mech_dispose = gs2_common_mech_dispose;
splug->mech_free = gs2_common_mech_free;
return SASL_OK;
}
static sasl_server_plug_t *gs2_server_plugins;
static int gs2_server_plugcount;
int
gs2_server_plug_init(const sasl_utils_t *utils,
int maxversion,
int *outversion,
sasl_server_plug_t **pluglist,
int *plugcount)
{
int ret;
*pluglist = NULL;
*plugcount = 0;
if (maxversion < SASL_SERVER_PLUG_VERSION)
return SASL_BADVERS;
*outversion = SASL_SERVER_PLUG_VERSION;
if (gs2_server_plugins == NULL) {
ret = gs2_common_plug_init(utils,
sizeof(sasl_server_plug_t),
gs2_server_plug_alloc,
(void **)&gs2_server_plugins,
&gs2_server_plugcount);
if (ret != SASL_OK)
return ret;
}
*pluglist = gs2_server_plugins;
*plugcount = gs2_server_plugcount;
return SASL_OK;
}
/***************************** Client Section *****************************/
static int gs2_client_mech_step(void *conn_context,
sasl_client_params_t *params,
const char *serverin,
unsigned serverinlen,
sasl_interact_t **prompt_need,
const char **clientout,
unsigned *clientoutlen,
sasl_out_params_t *oparams)
{
context_t *text = (context_t *)conn_context;
gss_buffer_desc input_token = GSS_C_EMPTY_BUFFER;
gss_buffer_desc output_token = GSS_C_EMPTY_BUFFER;
gss_buffer_desc name_buf = GSS_C_EMPTY_BUFFER;
OM_uint32 maj_stat = GSS_S_FAILURE, min_stat = 0;
OM_uint32 req_flags, ret_flags;
int ret = SASL_FAIL;
int initialContextToken;
*clientout = NULL;
*clientoutlen = 0;
if (text->gss_ctx == GSS_C_NO_CONTEXT) {
ret = gs2_get_init_creds(text, params, prompt_need, oparams);
if (ret != SASL_OK) {
goto cleanup;
}
initialContextToken = 1;
} else {
initialContextToken = 0;
}
if (text->server_name == GSS_C_NO_NAME) { /* only once */
if (params->serverFQDN == NULL ||
strlen(params->serverFQDN) == 0) {
SETERROR(text->utils, "GS2 Failure: no serverFQDN");
ret = SASL_FAIL;
goto cleanup;
}
name_buf.length = strlen(params->service) + 1 + strlen(params->serverFQDN);
name_buf.value = params->utils->malloc(name_buf.length + 1);
if (name_buf.value == NULL) {
ret = SASL_NOMEM;
goto cleanup;
}
snprintf(name_buf.value, name_buf.length + 1,
"%s@%s", params->service, params->serverFQDN);
maj_stat = gss_import_name(&min_stat,
&name_buf,
GSS_C_NT_HOSTBASED_SERVICE,
&text->server_name);
params->utils->free(name_buf.value);
name_buf.value = NULL;
if (GSS_ERROR(maj_stat)) {
ret = SASL_OK;
goto cleanup;
}
}
/* From GSSAPI plugin: apparently this is for some IMAP bug workaround */
if (serverinlen == 0 && text->gss_ctx != GSS_C_NO_CONTEXT) {
gss_delete_sec_context(&min_stat, &text->gss_ctx, GSS_C_NO_BUFFER);
text->gss_ctx = GSS_C_NO_CONTEXT;
}
input_token.value = (void *)serverin;
input_token.length = serverinlen;
if (initialContextToken) {
if ((text->plug.client->features & SASL_FEAT_GSS_FRAMING) == 0)
text->gs2_flags |= GS2_NONSTD_FLAG;
switch (params->cbindingdisp) {
case SASL_CB_DISP_NONE:
text->gs2_flags |= GS2_CB_FLAG_N;
break;
case SASL_CB_DISP_USED:
text->gs2_flags |= GS2_CB_FLAG_P;
break;
case SASL_CB_DISP_WANT:
text->gs2_flags |= GS2_CB_FLAG_Y;
break;
}
ret = gs2_make_header(text, params,
strcmp(oparams->user, oparams->authid) ?
(char *) oparams->user : NULL,
&text->out_buf, &text->out_buf_len);
if (ret != 0) {
goto cleanup;
}
}
req_flags = GSS_C_MUTUAL_FLAG | GSS_C_SEQUENCE_FLAG;
maj_stat = gss_init_sec_context(&min_stat,
(params->gss_creds != GSS_C_NO_CREDENTIAL)
? (gss_cred_id_t)params->gss_creds
: text->client_creds,
&text->gss_ctx,
text->server_name,
(gss_OID)text->mechanism,
req_flags,
GSS_C_INDEFINITE,
&text->gss_cbindings,
serverinlen ? &input_token : GSS_C_NO_BUFFER,
NULL,
&output_token,
&ret_flags,
&text->lifetime);
if (GSS_ERROR(maj_stat)) {
ret = SASL_OK;
goto cleanup;
}
ret = gs2_make_message(text, params, initialContextToken, &output_token,
&text->out_buf, &text->out_buf_len);
if (ret != 0) {
goto cleanup;
}
*clientout = text->out_buf;
*clientoutlen = text->out_buf_len;
if (maj_stat == GSS_S_CONTINUE_NEEDED) {
ret = SASL_CONTINUE;
goto cleanup;
}
if (text->client_name != GSS_C_NO_NAME) {
gss_release_name(&min_stat, &text->client_name);
}
maj_stat = gss_inquire_context(&min_stat,
text->gss_ctx,
&text->client_name,
NULL,
&text->lifetime,
NULL,
&ret_flags, /* flags */
NULL,
NULL);
if (GSS_ERROR(maj_stat)) {
ret = SASL_OK;
goto cleanup;
}
if ((ret_flags & req_flags) != req_flags) {
ret = SASL_BADAUTH;
goto cleanup;
}
maj_stat = gss_display_name(&min_stat,
text->client_name,
&name_buf,
NULL);
if (GSS_ERROR(maj_stat)) {
ret = SASL_OK;
goto cleanup;
}
oparams->gss_peer_name = text->server_name;
oparams->gss_local_name = text->client_name;
oparams->encode = NULL;
oparams->decode = NULL;
oparams->mech_ssf = 0;
oparams->maxoutbuf = 0xFFFFFF;
oparams->doneflag = 1;
ret = SASL_OK;
cleanup:
if (ret == SASL_OK && maj_stat != GSS_S_COMPLETE) {
sasl_gs2_seterror(text->utils, maj_stat, min_stat);
ret = SASL_FAIL;
}
gss_release_buffer(&min_stat, &output_token);
gss_release_buffer(&min_stat, &name_buf);
if (ret < SASL_OK) {
sasl_gs2_free_context_contents(text);
}
return ret;
}
static int gs2_client_mech_new(void *glob_context,
sasl_client_params_t *params,
void **conn_context)
{
context_t *text;
int ret;
text = sasl_gs2_new_context(params->utils);
if (text == NULL) {
MEMERROR(params->utils);
return SASL_NOMEM;
}
text->gss_ctx = GSS_C_NO_CONTEXT;
text->client_name = GSS_C_NO_NAME;
text->server_creds = GSS_C_NO_CREDENTIAL;
text->client_creds = GSS_C_NO_CREDENTIAL;
text->plug.client = glob_context;
ret = gs2_map_sasl_name(params->utils, text->plug.client->mech_name,
&text->mechanism);
if (ret != SASL_OK) {
gs2_common_mech_dispose(text, params->utils);
return ret;
}
*conn_context = text;
return SASL_OK;
}
static int
gs2_client_plug_alloc(const sasl_utils_t *utils,
void *plug,
gss_buffer_t sasl_name,
gss_OID mech)
{
int ret;
sasl_client_plug_t *cplug = (sasl_client_plug_t *)plug;
gss_buffer_desc buf;
memset(cplug, 0, sizeof(*cplug));
ret = gs2_get_mech_attrs(utils, mech,
&cplug->security_flags,
&cplug->features,
&cplug->required_prompts);
if (ret != SASL_OK)
return ret;
ret = gs2_duplicate_buffer(utils, sasl_name, &buf);
if (ret != SASL_OK)
return ret;
cplug->mech_name = (char *)buf.value;
cplug->features |= SASL_FEAT_NEEDSERVERFQDN;
cplug->glob_context = plug;
cplug->mech_new = gs2_client_mech_new;
cplug->mech_step = gs2_client_mech_step;
cplug->mech_dispose = gs2_common_mech_dispose;
cplug->mech_free = gs2_common_mech_free;
return SASL_OK;
}
static sasl_client_plug_t *gs2_client_plugins;
static int gs2_client_plugcount;
int
gs2_client_plug_init(const sasl_utils_t *utils,
int maxversion,
int *outversion,
sasl_client_plug_t **pluglist,
int *plugcount)
{
int ret;
*pluglist = NULL;
*plugcount = 0;
if (maxversion < SASL_CLIENT_PLUG_VERSION)
return SASL_BADVERS;
*outversion = SASL_CLIENT_PLUG_VERSION;
if (gs2_client_plugins == NULL) {
ret = gs2_common_plug_init(utils,
sizeof(sasl_client_plug_t),
gs2_client_plug_alloc,
(void **)&gs2_client_plugins,
&gs2_client_plugcount);
if (ret != SASL_OK)
return ret;
}
*pluglist = gs2_client_plugins;
*plugcount = gs2_client_plugcount;
return SASL_OK;
}
/*
* Copy header and application channel bindings to GSS channel bindings
* structure in context.
*/
static int
gs2_save_cbindings(context_t *text,
gss_buffer_t header,
const sasl_channel_binding_t *cbinding)
{
gss_buffer_t gss_cbindings = &text->gss_cbindings.application_data;
size_t len;
unsigned char *p;
assert(gss_cbindings->value == NULL);
/*
* The application-data field MUST be set to the gs2-header, excluding
* the initial [gs2-nonstd-flag ","] part, concatenated with, when a
* gs2-cb-flag of "p" is used, the application's channel binding data.
*/
len = header->length;
if (text->gs2_flags & GS2_NONSTD_FLAG) {
assert(len > 2);
len -= 2;
}
if ((text->gs2_flags & GS2_CB_FLAG_MASK) == GS2_CB_FLAG_P &&
cbinding != NULL) {
len += cbinding->len;
}
gss_cbindings->length = len;
gss_cbindings->value = text->utils->malloc(len);
if (gss_cbindings->value == NULL)
return SASL_NOMEM;
p = (unsigned char *)gss_cbindings->value;
if (text->gs2_flags & GS2_NONSTD_FLAG) {
memcpy(p, (unsigned char *)header->value + 2, header->length - 2);
p += header->length - 2;
} else {
memcpy(p, header->value, header->length);
p += header->length;
}
if ((text->gs2_flags & GS2_CB_FLAG_MASK) == GS2_CB_FLAG_P &&
cbinding != NULL) {
memcpy(p, cbinding->data, cbinding->len);
}
return SASL_OK;
}
#define CHECK_REMAIN(n) do { if (remain < (n)) return SASL_BADPROT; } while (0)
/*
* Verify gs2-header, save authzid and channel bindings to context.
*/
static int
gs2_verify_initial_message(context_t *text,
sasl_server_params_t *sparams,
const char *in,
unsigned inlen,
gss_buffer_t token)
{
OM_uint32 major, minor;
char *p = (char *)in;
unsigned remain = inlen;
int ret;
gss_buffer_desc buf = GSS_C_EMPTY_BUFFER;
assert(text->cbindingname == NULL);
assert(text->authzid == NULL);
token->length = 0;
token->value = NULL;
/* minimum header includes CB flag and non-zero GSS token */
CHECK_REMAIN(4); /* [pny],,. */
/* non-standard GSS framing flag */
if (remain > 1 && memcmp(p, "F,", 2) == 0) {
text->gs2_flags |= GS2_NONSTD_FLAG;
remain -= 2;
p += 2;
}
/* SASL channel bindings */
CHECK_REMAIN(1); /* [pny] */
remain--;
switch (*p++) {
case 'p':
CHECK_REMAIN(1); /* = */
remain--;
if (*p++ != '=')
return SASL_BADPROT;
ret = gs2_unescape_authzid(text->utils, &p, &remain, &text->cbindingname);
if (ret != SASL_OK)
return ret;
text->gs2_flags |= GS2_CB_FLAG_P;
break;
case 'n':
text->gs2_flags |= GS2_CB_FLAG_N;
break;
case 'y':
text->gs2_flags |= GS2_CB_FLAG_Y;
break;
}
CHECK_REMAIN(1); /* , */
remain--;
if (*p++ != ',')
return SASL_BADPROT;
/* authorization identity */
if (remain > 1 && memcmp(p, "a=", 2) == 0) {
CHECK_REMAIN(2);
remain -= 2;
p += 2;
ret = gs2_unescape_authzid(text->utils, &p, &remain, &text->authzid);
if (ret != SASL_OK)
return ret;
}
/* end of header */
CHECK_REMAIN(1); /* , */
remain--;
if (*p++ != ',')
return SASL_BADPROT;
buf.length = inlen - remain;
buf.value = (void *)in;
/* stash channel bindings to pass into gss_accept_sec_context() */
ret = gs2_save_cbindings(text, &buf, sparams->cbinding);
if (ret != SASL_OK)
return ret;
if (text->gs2_flags & GS2_NONSTD_FLAG) {
buf.length = remain;
buf.value = p;
} else {
gss_buffer_desc tmp;
tmp.length = remain;
tmp.value = p;
major = gss_encapsulate_token(&tmp, text->mechanism, &buf);
if (GSS_ERROR(major))
return SASL_NOMEM;
}
token->value = text->utils->malloc(buf.length);
if (token->value == NULL)
return SASL_NOMEM;
token->length = buf.length;
memcpy(token->value, buf.value, buf.length);
if ((text->gs2_flags & GS2_NONSTD_FLAG) == 0)
gss_release_buffer(&minor, &buf);
return SASL_OK;
}
/*
* Create gs2-header, save channel bindings to context.
*/
static int
gs2_make_header(context_t *text,
sasl_client_params_t *cparams,
const char *authzid,
char **out,
unsigned *outlen)
{
size_t required = 0;
size_t wire_authzid_len = 0, cbnamelen = 0;
char *wire_authzid = NULL;
char *p;
int ret;
gss_buffer_desc buf;
*out = NULL;
*outlen = 0;
/* non-standard GSS framing flag */
if (text->gs2_flags & GS2_NONSTD_FLAG)
required += 2; /* F, */
/* SASL channel bindings */
switch (text->gs2_flags & GS2_CB_FLAG_MASK) {
case GS2_CB_FLAG_P:
if (!SASL_CB_PRESENT(cparams))
return SASL_BADPARAM;
cbnamelen = strlen(cparams->cbinding->name);
required += 1 /*=*/ + cbnamelen;
/* fallthrough */
case GS2_CB_FLAG_N:
case GS2_CB_FLAG_Y:
required += 2; /* [pny], */
break;
default:
return SASL_BADPARAM;
}
/* authorization identity */
if (authzid != NULL) {
ret = gs2_escape_authzid(text->utils, authzid,
strlen(authzid), &wire_authzid);
if (ret != SASL_OK)
return ret;
wire_authzid_len = strlen(wire_authzid);
required += 2 /* a= */ + wire_authzid_len;
}
required += 1; /* trailing comma */
ret = _plug_buf_alloc(text->utils, out, outlen, required);
if (ret != SASL_OK) {
text->utils->free(wire_authzid);
return ret;
}
*out = text->out_buf;
*outlen = required;
p = (char *)text->out_buf;
if (text->gs2_flags & GS2_NONSTD_FLAG) {
*p++ = 'F';
*p++ = ',';
}
switch (text->gs2_flags & GS2_CB_FLAG_MASK) {
case GS2_CB_FLAG_P:
memcpy(p, "p=", 2);
memcpy(p + 2, cparams->cbinding->name, cbnamelen);
p += 2 + cbnamelen;
break;
case GS2_CB_FLAG_N:
*p++ = 'n';
break;
case GS2_CB_FLAG_Y:
*p++ = 'y';
break;
}
*p++ = ',';
if (wire_authzid != NULL) {
memcpy(p, "a=", 2);
memcpy(p + 2, wire_authzid, wire_authzid_len);
text->utils->free(wire_authzid);
p += 2 + wire_authzid_len;
}
*p++ = ',';
assert(p == (char *)text->out_buf + required);
buf.length = required;
buf.value = *out;
ret = gs2_save_cbindings(text, &buf, cparams->cbinding);
if (ret != SASL_OK)
return ret;
return SASL_OK;
}
/*
* Convert a GSS token to a GS2 one
*/
static int
gs2_make_message(context_t *text,
sasl_client_params_t *cparams __attribute__((unused)),
int initialContextToken,
gss_buffer_t token,
char **out,
unsigned *outlen)
{
OM_uint32 major, minor;
int ret;
unsigned header_len = 0;
gss_buffer_desc decap_token = GSS_C_EMPTY_BUFFER;
if (initialContextToken) {
header_len = *outlen;
major = gss_decapsulate_token(token, text->mechanism, &decap_token);
if ((major == GSS_S_DEFECTIVE_TOKEN &&
(text->plug.client->features & SASL_FEAT_GSS_FRAMING)) ||
GSS_ERROR(major))
return SASL_FAIL;
token = &decap_token;
}
ret = _plug_buf_alloc(text->utils, out, outlen,
header_len + token->length);
if (ret != 0)
return ret;
memcpy(*out + header_len, token->value, token->length);
*outlen = header_len + token->length;
if (initialContextToken)
gss_release_buffer(&minor, &decap_token);
return SASL_OK;
}
static const unsigned long gs2_required_prompts[] = {
SASL_CB_LIST_END
};
/*
* Map GSS mechanism attributes to SASL ones
*/
static int
gs2_get_mech_attrs(const sasl_utils_t *utils,
const gss_OID mech,
unsigned int *security_flags,
unsigned int *features,
const unsigned long **prompts)
{
OM_uint32 major, minor;
int present;
gss_OID_set attrs = GSS_C_NO_OID_SET;
major = gss_inquire_attrs_for_mech(&minor, mech, &attrs, NULL);
if (GSS_ERROR(major)) {
utils->seterror(utils->conn, SASL_NOLOG,
"GS2 Failure: gss_inquire_attrs_for_mech");
return SASL_FAIL;
}
*security_flags = SASL_SEC_NOPLAINTEXT | SASL_SEC_NOACTIVE;
*features = SASL_FEAT_WANT_CLIENT_FIRST | SASL_FEAT_CHANNEL_BINDING;
if (prompts != NULL)
*prompts = gs2_required_prompts;
#define MA_PRESENT(a) (gss_test_oid_set_member(&minor, (gss_OID)(a), \
attrs, &present) == GSS_S_COMPLETE && \
present)
if (MA_PRESENT(GSS_C_MA_PFS))
*security_flags |= SASL_SEC_FORWARD_SECRECY;
if (!MA_PRESENT(GSS_C_MA_AUTH_INIT_ANON))
*security_flags |= SASL_SEC_NOANONYMOUS;
if (MA_PRESENT(GSS_C_MA_DELEG_CRED))
*security_flags |= SASL_SEC_PASS_CREDENTIALS;
if (MA_PRESENT(GSS_C_MA_AUTH_TARG))
*security_flags |= SASL_SEC_MUTUAL_AUTH;
if (MA_PRESENT(GSS_C_MA_AUTH_INIT_INIT) && prompts != NULL)
*prompts = NULL;
if (MA_PRESENT(GSS_C_MA_ITOK_FRAMED))
*features |= SASL_FEAT_GSS_FRAMING;
gss_release_oid_set(&minor, &attrs);
return SASL_OK;
}
/*
* Enumerate GSS mechanisms that can be used for GS2
*/
static int gs2_indicate_mechs(const sasl_utils_t *utils)
{
OM_uint32 major, minor;
gss_OID_desc desired_oids[3];
gss_OID_set_desc desired_attrs;
gss_OID_desc except_oids[3];
gss_OID_set_desc except_attrs;
if (gs2_mechs != GSS_C_NO_OID_SET)
return SASL_OK;
desired_oids[0] = *GSS_C_MA_AUTH_INIT;
desired_oids[1] = *GSS_C_MA_AUTH_TARG;
desired_oids[2] = *GSS_C_MA_CBINDINGS;
desired_attrs.count = sizeof(desired_oids)/sizeof(desired_oids[0]);
desired_attrs.elements = desired_oids;
except_oids[0] = *GSS_C_MA_MECH_NEGO;
except_oids[1] = *GSS_C_MA_NOT_MECH;
except_oids[2] = *GSS_C_MA_DEPRECATED;
except_attrs.count = sizeof(except_oids)/sizeof(except_oids[0]);
except_attrs.elements = except_oids;
major = gss_indicate_mechs_by_attrs(&minor,
&desired_attrs,
&except_attrs,
GSS_C_NO_OID_SET,
&gs2_mechs);
if (GSS_ERROR(major)) {
utils->seterror(utils->conn, SASL_NOLOG,
"GS2 Failure: gss_indicate_mechs_by_attrs");
return SASL_FAIL;
}
return (gs2_mechs->count > 0) ? SASL_OK : SASL_NOMECH;
}
/*
* Map SASL mechanism name to OID
*/
static int
gs2_map_sasl_name(const sasl_utils_t *utils,
const char *mech,
gss_OID *oid)
{
OM_uint32 major, minor;
gss_buffer_desc buf;
buf.length = strlen(mech);
buf.value = (void *)mech;
major = gss_inquire_mech_for_saslname(&minor, &buf, oid);
if (GSS_ERROR(major)) {
utils->seterror(utils->conn, SASL_NOLOG,
"GS2 Failure: gss_inquire_mech_for_saslname");
return SASL_FAIL;
}
return SASL_OK;
}
static int
gs2_duplicate_buffer(const sasl_utils_t *utils,
const gss_buffer_t src,
gss_buffer_t dst)
{
dst->value = utils->malloc(src->length + 1);
if (dst->value == NULL)
return SASL_NOMEM;
memcpy(dst->value, src->value, src->length);
((char *)dst->value)[src->length] = '\0';
dst->length = src->length;
return SASL_OK;
}
static int
gs2_unescape_authzid(const sasl_utils_t *utils,
char **endp,
unsigned *remain,
char **authzid)
{
char *in = *endp;
size_t i, len, inlen = *remain;
char *p;
*endp = NULL;
for (i = 0, len = 0; i < inlen; i++) {
if (in[i] == ',') {
*endp = &in[i];
*remain -= i;
break;
} else if (in[i] == '=') {
if (inlen <= i + 2)
return SASL_BADPROT;
i += 2;
}
len++;
}
if (len == 0 || *endp == NULL)
return SASL_BADPROT;
p = *authzid = utils->malloc(len + 1);
if (*authzid == NULL)
return SASL_NOMEM;
for (i = 0; i < inlen; i++) {
if (in[i] == ',')
break;
else if (in[i] == '=') {
if (memcmp(&in[i + 1], "2C", 2) == 0)
*p++ = ',';
else if (memcmp(&in[i + 1], "3D", 2) == 0)
*p++ = '=';
else {
utils->free(*authzid);
*authzid = NULL;
return SASL_BADPROT;
}
i += 2;
} else
*p++ = in[i];
}
*p = '\0';
return SASL_OK;
}
static int
gs2_escape_authzid(const sasl_utils_t *utils,
const char *in,
unsigned inlen,
char **authzid)
{
size_t i;
char *p;
p = *authzid = utils->malloc((inlen * 3) + 1);
if (*authzid == NULL)
return SASL_NOMEM;
for (i = 0; i < inlen; i++) {
if (in[i] == ',') {
memcpy(p, "=2C", 3);
p += 3;
} else if (in[i] == '=') {
memcpy(p, "=3D", 3);
p += 3;
} else {
*p++ = in[i];
}
}
*p = '\0';
return SASL_OK;
}
#define GOT_CREDS(text, params) ((text)->client_creds != NULL || (params)->gss_creds != NULL)
#define CRED_ERROR(status) ((status) == GSS_S_CRED_UNAVAIL || (status) == GSS_S_NO_CRED)
/*
* Determine the authentication identity from the application supplied
* GSS credential, the application supplied identity, and the default
* GSS credential, in that order. Then, acquire credentials.
*/
static int
gs2_get_init_creds(context_t *text,
sasl_client_params_t *params,
sasl_interact_t **prompt_need,
sasl_out_params_t *oparams)
{
int result = SASL_OK;
const char *authid = NULL, *userid = NULL;
int user_result = SASL_OK;
int auth_result = SASL_OK;
int pass_result = SASL_OK;
OM_uint32 maj_stat = GSS_S_COMPLETE, min_stat = 0;
gss_OID_set_desc mechs;
gss_buffer_desc cred_authid = GSS_C_EMPTY_BUFFER;
gss_buffer_desc name_buf = GSS_C_EMPTY_BUFFER;
mechs.count = 1;
mechs.elements = (gss_OID)text->mechanism;
/*
* Get the authentication identity from the application.
*/
if (oparams->authid == NULL) {
auth_result = _plug_get_authid(params->utils, &authid, prompt_need);
if (auth_result != SASL_OK && auth_result != SASL_INTERACT) {
result = auth_result;
goto cleanup;
}
}
/*
* Get the authorization identity from the application.
*/
if (oparams->user == NULL) {
user_result = _plug_get_userid(params->utils, &userid, prompt_need);
if (user_result != SASL_OK && user_result != SASL_INTERACT) {
result = user_result;
goto cleanup;
}
}
/*
* Canonicalize the authentication and authorization identities before
* calling GSS_Import_name.
*/
if (auth_result == SASL_OK && user_result == SASL_OK &&
oparams->authid == NULL) {
if (userid == NULL || userid[0] == '\0') {
result = params->canon_user(params->utils->conn, authid, 0,
SASL_CU_AUTHID | SASL_CU_AUTHZID,
oparams);
} else {
result = params->canon_user(params->utils->conn,
authid, 0, SASL_CU_AUTHID, oparams);
if (result != SASL_OK)
goto cleanup;
result = params->canon_user(params->utils->conn,
userid, 0, SASL_CU_AUTHZID, oparams);
if (result != SASL_OK)
goto cleanup;
}
if (oparams->authid != NULL) {
name_buf.length = strlen(oparams->authid);
name_buf.value = (void *)oparams->authid;
assert(text->client_name == GSS_C_NO_NAME);
maj_stat = gss_import_name(&min_stat,
&name_buf,
GSS_C_NT_USER_NAME,
&text->client_name);
if (GSS_ERROR(maj_stat))
goto cleanup;
}
}
/*
* If application didn't provide an authid, then use the default
* credential. If that doesn't work, give up.
*/
if (!GOT_CREDS(text, params) && oparams->authid == NULL) {
maj_stat = gss_acquire_cred(&min_stat,
GSS_C_NO_NAME,
GSS_C_INDEFINITE,
&mechs,
GSS_C_INITIATE,
&text->client_creds,
NULL,
&text->lifetime);
if (GSS_ERROR(maj_stat))
goto cleanup;
assert(text->client_name == GSS_C_NO_NAME);
maj_stat = gss_inquire_cred(&min_stat,
params->gss_creds
? (gss_cred_id_t)params->gss_creds
: text->client_creds,
&text->client_name,
NULL,
NULL,
NULL);
if (GSS_ERROR(maj_stat))
goto cleanup;
maj_stat = gss_display_name(&min_stat,
text->client_name,
&cred_authid,
NULL);
if (GSS_ERROR(maj_stat))
goto cleanup;
if (userid == NULL || userid[0] == '\0') {
result = params->canon_user(params->utils->conn,
cred_authid.value, cred_authid.length,
SASL_CU_AUTHID | SASL_CU_AUTHZID,
oparams);
} else {
result = params->canon_user(params->utils->conn,
cred_authid.value, cred_authid.length,
SASL_CU_AUTHID, oparams);
if (result != SASL_OK)
goto cleanup;
result = params->canon_user(params->utils->conn,
cred_authid.value, cred_authid.length,
SASL_CU_AUTHZID, oparams);
if (result != SASL_OK)
goto cleanup;
}
}
/*
* Armed with the authentication identity, try to get a credential without
* a password.
*/
if (!GOT_CREDS(text, params) && text->client_name != GSS_C_NO_NAME) {
maj_stat = gss_acquire_cred(&min_stat,
text->client_name,
GSS_C_INDEFINITE,
&mechs,
GSS_C_INITIATE,
&text->client_creds,
NULL,
&text->lifetime);
if (GSS_ERROR(maj_stat) && !CRED_ERROR(maj_stat))
goto cleanup;
}
/*
* If that failed, try to get a credential with a password.
*/
if (!GOT_CREDS(text, params)) {
if (text->password == NULL) {
pass_result = _plug_get_password(params->utils, &text->password,
&text->free_password, prompt_need);
if (pass_result != SASL_OK && pass_result != SASL_INTERACT) {
result = pass_result;
goto cleanup;
}
}
if (text->password != NULL) {
gss_buffer_desc password_buf;
password_buf.length = text->password->len;
password_buf.value = text->password->data;
maj_stat = gss_acquire_cred_with_password(&min_stat,
text->client_name,
&password_buf,
GSS_C_INDEFINITE,
&mechs,
GSS_C_INITIATE,
&text->client_creds,
NULL,
&text->lifetime);
if (GSS_ERROR(maj_stat))
goto cleanup;
}
}
maj_stat = GSS_S_COMPLETE;
/* free prompts we got */
if (prompt_need && *prompt_need) {
params->utils->free(*prompt_need);
*prompt_need = NULL;
}
/* if there are prompts not filled in */
if (user_result == SASL_INTERACT || auth_result == SASL_INTERACT ||
pass_result == SASL_INTERACT) {
/* make the prompt list */
result =
_plug_make_prompts(params->utils, prompt_need,
user_result == SASL_INTERACT ?
"Please enter your authorization name" : NULL,
NULL,
auth_result == SASL_INTERACT ?
"Please enter your authentication name" : NULL,
NULL,
pass_result == SASL_INTERACT ?
"Please enter your password" : NULL, NULL,
NULL, NULL, NULL,
NULL,
NULL, NULL);
if (result == SASL_OK)
result = SASL_INTERACT;
}
cleanup:
if (result == SASL_OK && maj_stat != GSS_S_COMPLETE) {
sasl_gs2_seterror(text->utils, maj_stat, min_stat);
result = SASL_FAIL;
}
gss_release_buffer(&min_stat, &cred_authid);
return result;
}
static int
sasl_gs2_seterror_(const sasl_utils_t *utils, OM_uint32 maj, OM_uint32 min,
int logonly)
{
OM_uint32 maj_stat, min_stat;
gss_buffer_desc msg;
OM_uint32 msg_ctx;
int ret;
char *out = NULL;
unsigned int len, curlen = 0;
const char prefix[] = "GS2 Error: ";
len = sizeof(prefix);
ret = _plug_buf_alloc(utils, &out, &curlen, 256);
if (ret != SASL_OK)
return SASL_OK;
strcpy(out, prefix);
msg_ctx = 0;
while (1) {
maj_stat = gss_display_status(&min_stat, maj,
GSS_C_GSS_CODE, GSS_C_NULL_OID,
&msg_ctx, &msg);
if (GSS_ERROR(maj_stat)) {
if (logonly) {
utils->log(utils->conn, SASL_LOG_FAIL,
"GS2 Failure: (could not get major error message)");
} else {
utils->seterror(utils->conn, 0,
"GS2 Failure "
"(could not get major error message)");
}
utils->free(out);
return SASL_OK;
}
len += len + msg.length;
ret = _plug_buf_alloc(utils, &out, &curlen, len);
if (ret != SASL_OK) {
utils->free(out);
return SASL_OK;
}
strcat(out, msg.value);
gss_release_buffer(&min_stat, &msg);
if (!msg_ctx)
break;
}
/* Now get the minor status */
len += 2;
ret = _plug_buf_alloc(utils, &out, &curlen, len);
if (ret != SASL_OK) {
utils->free(out);
return SASL_NOMEM;
}
strcat(out, " (");
msg_ctx = 0;
while (1) {
maj_stat = gss_display_status(&min_stat, min,
GSS_C_MECH_CODE, GSS_C_NULL_OID,
&msg_ctx, &msg);
if (GSS_ERROR(maj_stat)) {
if (logonly) {
utils->log(utils->conn, SASL_LOG_FAIL,
"GS2 Failure: (could not get minor error message)");
} else {
utils->seterror(utils->conn, 0,
"GS2 Failure "
"(could not get minor error message)");
}
utils->free(out);
return SASL_OK;
}
len += len + msg.length;
ret = _plug_buf_alloc(utils, &out, &curlen, len);
if (ret != SASL_OK) {
utils->free(out);
return SASL_NOMEM;
}
strcat(out, msg.value);
gss_release_buffer(&min_stat, &msg);
if (!msg_ctx)
break;
}
len += 1;
ret = _plug_buf_alloc(utils, &out, &curlen, len);
if (ret != SASL_OK) {
utils->free(out);
return SASL_NOMEM;
}
strcat(out, ")");
if (logonly) {
utils->log(utils->conn, SASL_LOG_FAIL, "%s", out);
} else {
utils->seterror(utils->conn, 0, "%s", out);
}
utils->free(out);
return SASL_OK;
}
| papyrussolution/OpenPapyrus | Src/OSF/cyrus-sasl/plugins/gs2.c | C | agpl-3.0 | 56,848 | [
30522,
1013,
1008,
1008,
9385,
1006,
1039,
1007,
2230,
1010,
9965,
1006,
2866,
1007,
1008,
2035,
2916,
9235,
1012,
1008,
1008,
25707,
1998,
2224,
1999,
3120,
1998,
12441,
3596,
1010,
2007,
2030,
2302,
1008,
14080,
1010,
2024,
7936,
3024,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
module.exports = api => {
api.cache(true);
return {
presets: [
[
'@babel/preset-env',
{
targets: {
node: '12'
}
}
]
]
};
};
| srod/node-minify | babel.config.js | JavaScript | mit | 207 | [
30522,
11336,
1012,
14338,
1027,
17928,
1027,
1028,
1063,
17928,
1012,
17053,
1006,
2995,
1007,
1025,
2709,
1063,
3653,
13462,
2015,
1024,
1031,
1031,
1005,
1030,
11561,
2140,
1013,
3653,
13462,
1011,
4372,
2615,
1005,
1010,
1063,
7889,
102... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
#!/bin/sh
#
# MediaWiki Setup Script
#
# This script will install and configure MediaWiki on
# an Ubuntu 14.04 droplet
export DEBIAN_FRONTEND=noninteractive;
# Generate root and wordpress mysql passwords
rootmysqlpass=`dd if=/dev/urandom bs=1 count=32 2>/dev/null | base64 -w 0 | rev | cut -b 2- | rev | tr -dc 'a-zA-Z0-9'`;
mwmysqlpass=`dd if=/dev/urandom bs=1 count=32 2>/dev/null | base64 -w 0 | rev | cut -b 2- | rev | tr -dc 'a-zA-Z0-9'`;
# Write passwords to file
echo "MySQL Passwords for this droplet " > /etc/motd.tail;
echo "-----------------------------------" >> /etc/motd.tail;
echo "Root MySQL Password: $rootmysqlpass" >> /etc/motd.tail;
echo "MediaWiki MySQL Database: mwdb" >> /etc/motd.tail;
echo "Mediawiki MySQL Username: mwsql" >> /etc/motd.tail;
echo "Mediawiki MySQL Password: $mwmysqlpass" >> /etc/motd.tail;
echo "-----------------------------------" >> /etc/motd.tail;
echo "You can remove this information with 'rm -f /etc/motd.tail'" >> /etc/motd.tail;
apt-get update;
apt-get -y install apache2 mysql-server libapache2-mod-auth-mysql php5-mysql php5 libapache2-mod-php5 php5-mcrypt php5-gd php5-intl php-pear php5-dev make libpcre3-dev php-apc;
# Set up database user
/usr/bin/mysqladmin -u root -h localhost create mwdb;
/usr/bin/mysqladmin -u root -h localhost password $rootmysqlpass;
/usr/bin/mysql -uroot -p$rootmysqlpass -e "CREATE USER mwsql@localhost IDENTIFIED BY '"$mwmysqlpass"'";
/usr/bin/mysql -uroot -p$rootmysqlpass -e "GRANT ALL PRIVILEGES ON mwdb.* TO mwsql@localhost";
rm -f /var/www/html/index.html;
wget http://releases.wikimedia.org/mediawiki/1.25/mediawiki-1.25.1.tar.gz -O /root/mediawiki.tar.gz;
cd /root;
tar -zxf /root/mediawiki.tar.gz;
cp -Rf /root/mediawiki-1.25.1/* /var/www/html/.;
#rm /root/mediawiki.tar.gz;
#rm -Rf /root/mediawiki-1.25.1;
chown -Rf www-data.www-data /var/www/html;
service apache2 restart;
cat /etc/motd.tail > /var/run/motd.dynamic;
chmod 0660 /var/run/motd.dynamic;
| digitalocean/do_user_scripts | Ubuntu-14.04/cms/mediawiki.sh | Shell | mit | 1,955 | [
30522,
1001,
999,
1013,
8026,
1013,
14021,
1001,
1001,
2865,
9148,
3211,
16437,
5896,
1001,
1001,
2023,
5896,
2097,
16500,
1998,
9530,
8873,
27390,
2063,
2865,
9148,
3211,
2006,
1001,
2019,
1057,
8569,
3372,
2226,
2403,
1012,
5840,
4530,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
namespace Composer\Installers;
use Composer\Composer;
use Composer\IO\IOInterface;
use Composer\Plugin\PluginInterface;
class Plugin implements PluginInterface
{
private $installer;
public function activate(Composer $composer, IOInterface $io)
{
$this->installer = new Installer($io, $composer);
$composer->getInstallationManager()->addInstaller($this->installer);
}
public function deactivate(Composer $composer, IOInterface $io)
{
$composer->getInstallationManager()->removeInstaller($this->installer);
}
public function uninstall(Composer $composer, IOInterface $io)
{
}
}
| Seravo/wp-palvelu-plugin | vendor/composer/installers/src/Composer/Installers/Plugin.php | PHP | gpl-3.0 | 652 | [
30522,
1026,
1029,
25718,
3415,
15327,
4543,
1032,
16500,
2545,
1025,
2224,
4543,
1032,
4543,
1025,
2224,
4543,
1032,
22834,
1032,
22834,
18447,
2121,
12172,
1025,
2224,
4543,
1032,
13354,
2378,
1032,
13354,
5498,
10111,
12881,
10732,
1025,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package com.passenger.android.sunshine.app.sync;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.annotation.SuppressLint;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.AbstractThreadedSyncAdapter;
import android.content.ContentProviderClient;
import android.content.ContentResolver;
import android.content.ContentUris;
import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SyncRequest;
import android.content.SyncResult;
import android.content.res.Resources;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.annotation.IntDef;
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.TaskStackBuilder;
import android.text.format.Time;
import android.util.Log;
import com.bumptech.glide.Glide;
import com.passenger.android.sunshine.app.BuildConfig;
import com.passenger.android.sunshine.app.MainActivity;
import com.passenger.android.sunshine.app.R;
import com.passenger.android.sunshine.app.Utility;
import com.passenger.android.sunshine.app.data.WeatherContract;
import com.passenger.android.sunshine.app.muzei.WeatherMuzeiSource;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Vector;
import java.util.concurrent.ExecutionException;
public class SunshineSyncAdapter extends AbstractThreadedSyncAdapter {
public final String LOG_TAG = SunshineSyncAdapter.class.getSimpleName();
public static final String ACTION_DATA_UPDATED =
"com.example.android.sunshine.app.ACTION_DATA_UPDATED";
// Interval at which to sync with the weather, in seconds.
// 60 seconds (1 minute) * 180 = 3 hours
public static final int SYNC_INTERVAL = 60 * 180;
public static final int SYNC_FLEXTIME = SYNC_INTERVAL / 3;
private static final long DAY_IN_MILLIS = 1000 * 60 * 60 * 24;
private static final int WEATHER_NOTIFICATION_ID = 3004;
private static final String[] NOTIFY_WEATHER_PROJECTION = new String[]{
WeatherContract.WeatherEntry.COLUMN_WEATHER_ID,
WeatherContract.WeatherEntry.COLUMN_MAX_TEMP,
WeatherContract.WeatherEntry.COLUMN_MIN_TEMP,
WeatherContract.WeatherEntry.COLUMN_SHORT_DESC
};
// these indices must match the projection
private static final int INDEX_WEATHER_ID = 0;
private static final int INDEX_MAX_TEMP = 1;
private static final int INDEX_MIN_TEMP = 2;
private static final int INDEX_SHORT_DESC = 3;
//Annotations to notify the user correctly in case
//there is a problem with the server.
@Retention(RetentionPolicy.SOURCE)
@IntDef({LOCATION_STATUS_OK, LOCATION_STATUS_SERVER_DOWN, LOCATION_STATUS_SERVER_INVALID, LOCATION_STATUS_UNKNOWN, LOCATION_STATUS_INVALID})
public @interface LocationStatus {
}
public static final int LOCATION_STATUS_OK = 0;
public static final int LOCATION_STATUS_SERVER_DOWN = 1;
public static final int LOCATION_STATUS_SERVER_INVALID = 2;
public static final int LOCATION_STATUS_UNKNOWN = 3;
public static final int LOCATION_STATUS_INVALID = 4;
public SunshineSyncAdapter(Context context, boolean autoInitialize) {
super(context, autoInitialize);
}
@Override
public void onPerformSync(Account account, Bundle extras, String authority, ContentProviderClient provider, SyncResult syncResult) {
Log.d(LOG_TAG, "Starting sync");
String locationQuery = Utility.getPreferredLocation(getContext());
// These two need to be declared outside the try/catch
// so that they can be closed in the finally block.
HttpURLConnection urlConnection = null;
BufferedReader reader = null;
// Will contain the raw JSON response as a string.
String forecastJsonStr = null;
String format = "json";
String units = "metric";
int numDays = 14;
try {
// Construct the URL for the OpenWeatherMap query
// Possible parameters are avaiable at OWM's forecast API page, at
// http://openweathermap.org/API#forecast
final String FORECAST_BASE_URL =
"http://api.openweathermap.org/data/2.5/forecast/daily?";
final String QUERY_PARAM = "q";
final String FORMAT_PARAM = "mode";
final String LAT_PARAM = "lat";
final String LON_PARAM = "lon";
final String UNITS_PARAM = "units";
final String DAYS_PARAM = "cnt";
final String APPID_PARAM = "APPID";
Uri.Builder builder = Uri.parse(FORECAST_BASE_URL).buildUpon();
if (Utility.isLocationLatLonAvailable(getContext())) {
builder.appendQueryParameter(LAT_PARAM,
String.valueOf(Utility.getLocationLatitude(getContext())))
.appendQueryParameter(LON_PARAM, String.valueOf(Utility.getLocationLongitude(getContext())));
} else {
builder.appendQueryParameter(QUERY_PARAM, locationQuery);
}
Uri builtUri = builder.appendQueryParameter(FORMAT_PARAM, format)
.appendQueryParameter(UNITS_PARAM, units)
.appendQueryParameter(DAYS_PARAM, Integer.toString(numDays))
.appendQueryParameter(APPID_PARAM, BuildConfig.OPEN_WEATHER_MAP_API_KEY)
.build();
URL url = new URL(builtUri.toString());
// Create the request to OpenWeatherMap, and open the connection
urlConnection = (HttpURLConnection) url.openConnection();
urlConnection.setRequestMethod("GET");
urlConnection.connect();
// Read the input stream into a String
InputStream inputStream = urlConnection.getInputStream();
StringBuffer buffer = new StringBuffer();
if (inputStream == null) {
// Nothing to do.
return;
}
reader = new BufferedReader(new InputStreamReader(inputStream));
String line;
while ((line = reader.readLine()) != null) {
// Since it's JSON, adding a newline isn't necessary (it won't affect parsing)
// But it does make debugging a *lot* easier if you print out the completed
// buffer for debugging.
buffer.append(line + "\n");
}
if (buffer.length() == 0) {
setLocationStatus(getContext(), LOCATION_STATUS_SERVER_DOWN);
return;
}
forecastJsonStr = buffer.toString();
getWeatherDataFromJson(forecastJsonStr, locationQuery);
} catch (IOException e) {
Log.e(LOG_TAG, "Error ", e);
setLocationStatus(getContext(), LOCATION_STATUS_SERVER_DOWN);
} catch (JSONException e) {
Log.e(LOG_TAG, e.getMessage(), e);
setLocationStatus(getContext(), LOCATION_STATUS_SERVER_INVALID);
e.printStackTrace();
} finally {
if (urlConnection != null) {
urlConnection.disconnect();
}
if (reader != null) {
try {
reader.close();
} catch (final IOException e) {
Log.e(LOG_TAG, "Error closing stream", e);
}
}
}
return;
}
/**
* Take the String representing the complete forecast in JSON Format and
* pull out the data we need to construct the Strings needed for the wireframes.
* <p/>
* Fortunately parsing is easy: constructor takes the JSON string and converts it
* into an Object hierarchy for us.
*/
private void getWeatherDataFromJson(String forecastJsonStr,
String locationSetting)
throws JSONException {
// Now we have a String representing the complete forecast in JSON Format.
// Fortunately parsing is easy: constructor takes the JSON string and converts it
// into an Object hierarchy for us.
// These are the names of the JSON objects that need to be extracted.
// Location information
final String OWM_CITY = "city";
final String OWM_CITY_NAME = "name";
final String OWM_COORD = "coord";
// Location coordinate
final String OWM_LATITUDE = "lat";
final String OWM_LONGITUDE = "lon";
// Weather information. Each day's forecast info is an element of the "list" array.
final String OWM_LIST = "list";
final String OWM_PRESSURE = "pressure";
final String OWM_HUMIDITY = "humidity";
final String OWM_WINDSPEED = "speed";
final String OWM_WIND_DIRECTION = "deg";
// All temperatures are children of the "temp" object.
final String OWM_TEMPERATURE = "temp";
final String OWM_MAX = "max";
final String OWM_MIN = "min";
final String OWM_WEATHER = "weather";
final String OWM_DESCRIPTION = "main";
final String OWM_WEATHER_ID = "id";
final String OWM_MESSAGE_CODE = "code";
try {
JSONObject forecastJson = new JSONObject(forecastJsonStr);
if (forecastJson.has(OWM_MESSAGE_CODE)) {
int errorCode = forecastJson.getInt(OWM_MESSAGE_CODE);
switch (errorCode) {
case HttpURLConnection.HTTP_OK:
break;
case HttpURLConnection.HTTP_NOT_FOUND:
setLocationStatus(getContext(), LOCATION_STATUS_INVALID);
break;
default:
setLocationStatus(getContext(), LOCATION_STATUS_SERVER_DOWN);
}
}
JSONArray weatherArray = forecastJson.getJSONArray(OWM_LIST);
JSONObject cityJson = forecastJson.getJSONObject(OWM_CITY);
String cityName = cityJson.getString(OWM_CITY_NAME);
JSONObject cityCoord = cityJson.getJSONObject(OWM_COORD);
double cityLatitude = cityCoord.getDouble(OWM_LATITUDE);
double cityLongitude = cityCoord.getDouble(OWM_LONGITUDE);
long locationId = addLocation(locationSetting, cityName, cityLatitude, cityLongitude);
// Insert the new weather information into the database
Vector<ContentValues> cVVector = new Vector<ContentValues>(weatherArray.length());
// OWM returns daily forecasts based upon the local time of the city that is being
// asked for, which means that we need to know the GMT offset to translate this data
// properly.
// Since this data is also sent in-order and the first day is always the
// current day, we're going to take advantage of that to get a nice
// normalized UTC date for all of our weather.
Time dayTime = new Time();
dayTime.setToNow();
// we start at the day returned by local time. Otherwise this is a mess.
int julianStartDay = Time.getJulianDay(System.currentTimeMillis(), dayTime.gmtoff);
// now we work exclusively in UTC
dayTime = new Time();
for (int i = 0; i < weatherArray.length(); i++) {
// These are the values that will be collected.
long dateTime;
double pressure;
int humidity;
double windSpeed;
double windDirection;
double high;
double low;
String description;
int weatherId;
// Get the JSON object representing the day
JSONObject dayForecast = weatherArray.getJSONObject(i);
// Cheating to convert this to UTC time, which is what we want anyhow
dateTime = dayTime.setJulianDay(julianStartDay + i);
pressure = dayForecast.getDouble(OWM_PRESSURE);
humidity = dayForecast.getInt(OWM_HUMIDITY);
windSpeed = dayForecast.getDouble(OWM_WINDSPEED);
windDirection = dayForecast.getDouble(OWM_WIND_DIRECTION);
// Description is in a child array called "weather", which is 1 element long.
// That element also contains a weather code.
JSONObject weatherObject =
dayForecast.getJSONArray(OWM_WEATHER).getJSONObject(0);
description = weatherObject.getString(OWM_DESCRIPTION);
weatherId = weatherObject.getInt(OWM_WEATHER_ID);
// Temperatures are in a child object called "temp". Try not to name variables
// "temp" when working with temperature. It confuses everybody.
JSONObject temperatureObject = dayForecast.getJSONObject(OWM_TEMPERATURE);
high = temperatureObject.getDouble(OWM_MAX);
low = temperatureObject.getDouble(OWM_MIN);
ContentValues weatherValues = new ContentValues();
weatherValues.put(WeatherContract.WeatherEntry.COLUMN_LOC_KEY, locationId);
weatherValues.put(WeatherContract.WeatherEntry.COLUMN_DATE, dateTime);
weatherValues.put(WeatherContract.WeatherEntry.COLUMN_HUMIDITY, humidity);
weatherValues.put(WeatherContract.WeatherEntry.COLUMN_PRESSURE, pressure);
weatherValues.put(WeatherContract.WeatherEntry.COLUMN_WIND_SPEED, windSpeed);
weatherValues.put(WeatherContract.WeatherEntry.COLUMN_DEGREES, windDirection);
weatherValues.put(WeatherContract.WeatherEntry.COLUMN_MAX_TEMP, high);
weatherValues.put(WeatherContract.WeatherEntry.COLUMN_MIN_TEMP, low);
weatherValues.put(WeatherContract.WeatherEntry.COLUMN_SHORT_DESC, description);
weatherValues.put(WeatherContract.WeatherEntry.COLUMN_WEATHER_ID, weatherId);
cVVector.add(weatherValues);
}
int inserted = 0;
// add to database
if (cVVector.size() > 0) {
ContentValues[] cvArray = new ContentValues[cVVector.size()];
cVVector.toArray(cvArray);
getContext().getContentResolver().bulkInsert(WeatherContract.WeatherEntry.CONTENT_URI, cvArray);
// delete old data so we don't build up an endless history
getContext().getContentResolver().delete(WeatherContract.WeatherEntry.CONTENT_URI,
WeatherContract.WeatherEntry.COLUMN_DATE + " <= ?",
new String[]{Long.toString(dayTime.setJulianDay(julianStartDay - 1))});
updateWidgets();
updateMuzei();
notifyWeather();
}
Log.d(LOG_TAG, "Sync Complete. " + cVVector.size() + " Inserted");
setLocationStatus(getContext(), LOCATION_STATUS_OK);
} catch (JSONException e) {
Log.e(LOG_TAG, e.getMessage(), e);
setLocationStatus(getContext(), LOCATION_STATUS_SERVER_INVALID);
e.printStackTrace();
}
}
private void updateWidgets(){
Context context = getContext();
Intent dataUpdatedIntent = new Intent(ACTION_DATA_UPDATED)
.setPackage(context.getPackageName());
context.sendBroadcast(dataUpdatedIntent);
}
private void updateMuzei(){
if(Build.VERSION.SDK_INT>Build.VERSION_CODES.JELLY_BEAN){
Context context = getContext();
context.startService(new Intent(ACTION_DATA_UPDATED)
.setClass(context, WeatherMuzeiSource.class));
}
}
private void notifyWeather() {
Context context = getContext();
//checking the last update and notify if it' the first of the day
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
String displayNotificationsKey = context.getString(R.string.pref_enable_notifications_key);
boolean displayNotifications = prefs.getBoolean(displayNotificationsKey,
Boolean.parseBoolean(context.getString(R.string.pref_enable_notifications_default)));
if (displayNotifications) {
String lastNotificationKey = context.getString(R.string.pref_last_notification);
long lastSync = prefs.getLong(lastNotificationKey, 0);
if (System.currentTimeMillis() - lastSync >= DAY_IN_MILLIS) {
// Last sync was more than 1 day ago, let's send a notification with the weather.
String locationQuery = Utility.getPreferredLocation(context);
Uri weatherUri = WeatherContract.WeatherEntry.buildWeatherLocationWithDate(locationQuery, System.currentTimeMillis());
// we'll query our contentProvider, as always
Cursor cursor = context.getContentResolver().query(weatherUri, NOTIFY_WEATHER_PROJECTION, null, null, null);
if (cursor.moveToFirst()) {
int weatherId = cursor.getInt(INDEX_WEATHER_ID);
double high = cursor.getDouble(INDEX_MAX_TEMP);
double low = cursor.getDouble(INDEX_MIN_TEMP);
String desc = cursor.getString(INDEX_SHORT_DESC);
int iconId = Utility.getIconResourceForWeatherCondition(weatherId);
Resources resources = context.getResources();
int artResourceId = Utility.getArtResourceForWeatherCondition(weatherId);
String artUrl = Utility.getArtUrlForWeatherCondition(context, weatherId);
// On Honeycomb and higher devices, we can retrieve the size of the large icon
// Prior to that, we use a fixed size
@SuppressLint("InlinedApi")
int largeIconWidth = Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB
? resources.getDimensionPixelSize(android.R.dimen.notification_large_icon_width)
: resources.getDimensionPixelSize(R.dimen.notification_large_icon_default);
@SuppressLint("InlinedApi")
int largeIconHeight = Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB
? resources.getDimensionPixelSize(android.R.dimen.notification_large_icon_height)
: resources.getDimensionPixelSize(R.dimen.notification_large_icon_default);
// Retrieve the large icon
Bitmap largeIcon;
try {
largeIcon = Glide.with(context)
.load(artUrl)
.asBitmap()
.error(artResourceId)
.fitCenter()
.into(largeIconWidth, largeIconHeight).get();
} catch (InterruptedException | ExecutionException e) {
Log.e(LOG_TAG, "Error retrieving large icon from " + artUrl, e);
largeIcon = BitmapFactory.decodeResource(resources, artResourceId);
}
String title = context.getString(R.string.app_name);
// Define the text of the forecast.
String contentText = String.format(context.getString(R.string.format_notification),
desc,
Utility.formatTemperature(context, high),
Utility.formatTemperature(context, low));
// NotificationCompatBuilder is a very convenient way to build backward-compatible
// notifications. Just throw in some data.
NotificationCompat.Builder mBuilder =
new NotificationCompat.Builder(getContext())
.setColor(resources.getColor(R.color.primary_light))
.setSmallIcon(iconId)
.setLargeIcon(largeIcon)
.setContentTitle(title)
.setContentText(contentText);
// Make something interesting happen when the user clicks on the notification.
// In this case, opening the app is sufficient.
Intent resultIntent = new Intent(context, MainActivity.class);
// The stack builder object will contain an artificial back stack for the
// started Activity.
// This ensures that navigating backward from the Activity leads out of
// your application to the Home screen.
TaskStackBuilder stackBuilder = TaskStackBuilder.create(context);
stackBuilder.addNextIntent(resultIntent);
PendingIntent resultPendingIntent =
stackBuilder.getPendingIntent(
0,
PendingIntent.FLAG_UPDATE_CURRENT
);
mBuilder.setContentIntent(resultPendingIntent);
NotificationManager mNotificationManager =
(NotificationManager) getContext().getSystemService(Context.NOTIFICATION_SERVICE);
// WEATHER_NOTIFICATION_ID allows you to update the notification later on.
mNotificationManager.notify(WEATHER_NOTIFICATION_ID, mBuilder.build());
//refreshing last sync
SharedPreferences.Editor editor = prefs.edit();
editor.putLong(lastNotificationKey, System.currentTimeMillis());
editor.commit();
}
cursor.close();
}
}
}
/**
* Helper method to handle insertion of a new location in the weather database.
*
* @param locationSetting The location string used to request updates from the server.
* @param cityName A human-readable city name, e.g "Mountain View"
* @param lat the latitude of the city
* @param lon the longitude of the city
* @return the row ID of the added location.
*/
long addLocation(String locationSetting, String cityName, double lat, double lon) {
long locationId;
// First, check if the location with this city name exists in the db
Cursor locationCursor = getContext().getContentResolver().query(
WeatherContract.LocationEntry.CONTENT_URI,
new String[]{WeatherContract.LocationEntry._ID},
WeatherContract.LocationEntry.COLUMN_LOCATION_SETTING + " = ?",
new String[]{locationSetting},
null);
if (locationCursor.moveToFirst()) {
int locationIdIndex = locationCursor.getColumnIndex(WeatherContract.LocationEntry._ID);
locationId = locationCursor.getLong(locationIdIndex);
} else {
// Now that the content provider is set up, inserting rows of data is pretty simple.
// First create a ContentValues object to hold the data you want to insert.
ContentValues locationValues = new ContentValues();
// Then add the data, along with the corresponding name of the data type,
// so the content provider knows what kind of value is being inserted.
locationValues.put(WeatherContract.LocationEntry.COLUMN_CITY_NAME, cityName);
locationValues.put(WeatherContract.LocationEntry.COLUMN_LOCATION_SETTING, locationSetting);
locationValues.put(WeatherContract.LocationEntry.COLUMN_COORD_LAT, lat);
locationValues.put(WeatherContract.LocationEntry.COLUMN_COORD_LONG, lon);
// Finally, insert location data into the database.
Uri insertedUri = getContext().getContentResolver().insert(
WeatherContract.LocationEntry.CONTENT_URI,
locationValues
);
// The resulting URI contains the ID for the row. Extract the locationId from the Uri.
locationId = ContentUris.parseId(insertedUri);
}
locationCursor.close();
// Wait, that worked? Yes!
return locationId;
}
/**
* Helper method to schedule the sync adapter periodic execution
*/
public static void configurePeriodicSync(Context context, int syncInterval, int flexTime) {
Account account = getSyncAccount(context);
String authority = context.getString(R.string.content_authority);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
// we can enable inexact timers in our periodic sync
SyncRequest request = new SyncRequest.Builder().
syncPeriodic(syncInterval, flexTime).
setSyncAdapter(account, authority).
setExtras(new Bundle()).build();
ContentResolver.requestSync(request);
} else {
ContentResolver.addPeriodicSync(account,
authority, new Bundle(), syncInterval);
}
}
/**
* Helper method to have the sync adapter sync immediately
*
* @param context The context used to access the account service
*/
public static void syncImmediately(Context context) {
Bundle bundle = new Bundle();
bundle.putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true);
bundle.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);
ContentResolver.requestSync(getSyncAccount(context),
context.getString(R.string.content_authority), bundle);
}
/**
* Helper method to get the fake account to be used with SyncAdapter, or make a new one
* if the fake account doesn't exist yet. If we make a new account, we call the
* onAccountCreated method so we can initialize things.
*
* @param context The context used to access the account service
* @return a fake account.
*/
public static Account getSyncAccount(Context context) {
// Get an instance of the Android account manager
AccountManager accountManager =
(AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE);
// Create the account type and default account
Account newAccount = new Account(
context.getString(R.string.app_name), context.getString(R.string.sync_account_type));
// If the password doesn't exist, the account doesn't exist
if (null == accountManager.getPassword(newAccount)) {
/*
* Add the account and account type, no password or user data
* If successful, return the Account object, otherwise report an error.
*/
if (!accountManager.addAccountExplicitly(newAccount, "", null)) {
return null;
}
/*
* If you don't set android:syncable="true" in
* in your <provider> element in the manifest,
* then call ContentResolver.setIsSyncable(account, AUTHORITY, 1)
* here.
*/
onAccountCreated(newAccount, context);
}
return newAccount;
}
private static void onAccountCreated(Account newAccount, Context context) {
/*
* Since we've created an account
*/
SunshineSyncAdapter.configurePeriodicSync(context, SYNC_INTERVAL, SYNC_FLEXTIME);
/*
* Without calling setSyncAutomatically, our periodic sync will not be enabled.
*/
ContentResolver.setSyncAutomatically(newAccount, context.getString(R.string.content_authority), true);
/*
* Finally, let's do a sync to get things started
*/
syncImmediately(context);
}
public static void initializeSyncAdapter(Context context) {
getSyncAccount(context);
}
/**
* Set the current location status according to the response received from the server.
*
* @param context
* @param locationStatus - Annotated with @LocationStatus so that only the desired values appear
*/
public void setLocationStatus(Context context, @LocationStatus int locationStatus) {
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putInt(context.getString(R.string.pref_location_status_key), locationStatus);
editor.commit();
}
} | dalmia/Sunshine-Advanced | app/src/main/java/com/passenger/android/sunshine/app/sync/SunshineSyncAdapter.java | Java | apache-2.0 | 29,453 | [
30522,
7427,
4012,
1012,
4628,
1012,
11924,
1012,
9609,
1012,
10439,
1012,
26351,
1025,
12324,
11924,
1012,
6115,
1012,
4070,
1025,
12324,
11924,
1012,
6115,
1012,
4070,
24805,
4590,
1025,
12324,
11924,
1012,
5754,
17287,
3508,
1012,
16081,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php include_once "common/header.php"; ?>
<div id="main">
<noscript>This site just doesn't work, period, without JavaScript</noscript>
<!-- IF LOGGED IN -->
<!-- Content here -->
<!-- IF LOGGED OUT -->
<!-- Alternate content here -->
</div>
<?php include_once "common/footer.php"; ?>
| Istorian/official | index.php | PHP | gpl-2.0 | 322 | [
30522,
1026,
1029,
25718,
2421,
1035,
2320,
1000,
2691,
1013,
20346,
1012,
25718,
1000,
1025,
1029,
1028,
1026,
4487,
2615,
8909,
1027,
1000,
2364,
1000,
1028,
1026,
16839,
23235,
1028,
2023,
2609,
2074,
2987,
1005,
1056,
2147,
1010,
2558,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
using System;
using System.Collections.Generic;
using System.Html;
namespace wwtlib
{
public class PlotTile : Tile
{
bool topDown = true;
protected PositionTexture[] bounds;
protected bool backslash = false;
List<PositionTexture> vertexList = null;
List<Triangle>[] childTriangleList = null;
protected float[] demArray;
protected void ComputeBoundingSphere()
{
InitializeGrids();
TopLeft = bounds[0 + 3 * 0].Position.Copy();
BottomRight = bounds[2 + 3 * 2].Position.Copy();
TopRight = bounds[2 + 3 * 0].Position.Copy();
BottomLeft = bounds[0 + 3 * 2].Position.Copy();
CalcSphere();
}
public override void RenderPart(RenderContext renderContext, int part, double opacity, bool combine)
{
if (renderContext.gl != null)
{
//todo draw in WebGL
}
else
{
if (part == 0)
{
foreach(Star star in stars)
{
double radDec = 25 / Math.Pow(1.6, star.Magnitude);
Planets.DrawPointPlanet(renderContext, star.Position, radDec, star.Col, false);
}
}
}
}
WebFile webFile;
public override void RequestImage()
{
if (!Downloading && !ReadyToRender)
{
Downloading = true;
webFile = new WebFile(Util.GetProxiedUrl(this.URL));
webFile.OnStateChange = FileStateChange;
webFile.Send();
}
}
public void FileStateChange()
{
if(webFile.State == StateType.Error)
{
Downloading = false;
ReadyToRender = false;
errored = true;
RequestPending = false;
TileCache.RemoveFromQueue(this.Key, true);
}
else if(webFile.State == StateType.Received)
{
texReady = true;
Downloading = false;
errored = false;
ReadyToRender = texReady && (DemReady || !demTile);
RequestPending = false;
TileCache.RemoveFromQueue(this.Key, true);
LoadData(webFile.GetText());
}
}
List<Star> stars = new List<Star>();
private void LoadData(string data)
{
string[] rows = data.Replace("\r\n","\n").Split("\n");
bool firstRow = true;
PointType type = PointType.Move;
Star star = null;
foreach (string row in rows)
{
if (firstRow)
{
firstRow = false;
continue;
}
if (row.Trim().Length > 5)
{
star = new Star(row);
star.Position = Coordinates.RADecTo3dAu(star.RA, star.Dec, 1);
stars.Add(star);
}
}
}
public override bool IsPointInTile(double lat, double lng)
{
if (Level == 0)
{
return true;
}
if (Level == 1)
{
if ((lng >= 0 && lng <= 90) && (tileX == 0 && tileY == 1))
{
return true;
}
if ((lng > 90 && lng <= 180) && (tileX == 1 && tileY == 1))
{
return true;
}
if ((lng < 0 && lng >= -90) && (tileX == 0 && tileY == 0))
{
return true;
}
if ((lng < -90 && lng >= -180) && (tileX == 1 && tileY == 0))
{
return true;
}
return false;
}
if (!this.DemReady || this.DemData == null)
{
return false;
}
Vector3d testPoint = Coordinates.GeoTo3dDouble(-lat, lng);
bool top = IsLeftOfHalfSpace(TopLeft.Copy(), TopRight.Copy(), testPoint);
bool right = IsLeftOfHalfSpace(TopRight.Copy(), BottomRight.Copy(), testPoint);
bool bottom = IsLeftOfHalfSpace(BottomRight.Copy(), BottomLeft.Copy(), testPoint);
bool left = IsLeftOfHalfSpace(BottomLeft.Copy(), TopLeft.Copy(), testPoint);
if (top && right && bottom && left)
{
// showSelected = true;
return true;
}
return false; ;
}
private bool IsLeftOfHalfSpace(Vector3d pntA, Vector3d pntB, Vector3d pntTest)
{
pntA.Normalize();
pntB.Normalize();
Vector3d cross = Vector3d.Cross(pntA, pntB);
double dot = Vector3d.Dot(cross, pntTest);
return dot < 0;
}
private void InitializeGrids()
{
vertexList = new List<PositionTexture>();
childTriangleList = new List<Triangle>[4];
childTriangleList[0] = new List<Triangle>();
childTriangleList[1] = new List<Triangle>();
childTriangleList[2] = new List<Triangle>();
childTriangleList[3] = new List<Triangle>();
bounds = new PositionTexture[9];
if (Level > 0)
{
// Set in constuctor now
//ToastTile parent = (ToastTile)TileCache.GetTile(level - 1, x / 2, y / 2, dataset, null);
if (Parent == null)
{
Parent = TileCache.GetTile(Level - 1, tileX / 2, tileY / 2, dataset, null);
}
PlotTile parent = (PlotTile)Parent;
int xIndex = tileX % 2;
int yIndex = tileY % 2;
if (Level > 1)
{
backslash = parent.backslash;
}
else
{
backslash = xIndex == 1 ^ yIndex == 1;
}
bounds[0 + 3 * 0] = parent.bounds[xIndex + 3 * yIndex].Copy();
bounds[1 + 3 * 0] = Midpoint(parent.bounds[xIndex + 3 * yIndex], parent.bounds[xIndex + 1 + 3 * yIndex]);
bounds[2 + 3 * 0] = parent.bounds[xIndex + 1 + 3 * yIndex].Copy();
bounds[0 + 3 * 1] = Midpoint(parent.bounds[xIndex + 3 * yIndex], parent.bounds[xIndex + 3 * (yIndex + 1)]);
if (backslash)
{
bounds[1 + 3 * 1] = Midpoint(parent.bounds[xIndex + 3 * yIndex], parent.bounds[xIndex + 1 + 3 * (yIndex + 1)]);
}
else
{
bounds[1 + 3 * 1] = Midpoint(parent.bounds[xIndex + 1 + 3 * yIndex], parent.bounds[xIndex + 3 * (yIndex + 1)]);
}
bounds[2 + 3 * 1] = Midpoint(parent.bounds[xIndex + 1 + 3 * yIndex], parent.bounds[xIndex + 1 + 3 * (yIndex + 1)]);
bounds[0 + 3 * 2] = parent.bounds[xIndex + 3 * (yIndex + 1)].Copy();
bounds[1 + 3 * 2] = Midpoint(parent.bounds[xIndex + 3 * (yIndex + 1)], parent.bounds[xIndex + 1 + 3 * (yIndex + 1)]);
bounds[2 + 3 * 2] = parent.bounds[xIndex + 1 + 3 * (yIndex + 1)].Copy();
bounds[0 + 3 * 0].Tu = 0*uvMultiple;
bounds[0 + 3 * 0].Tv = 0 * uvMultiple;
bounds[1 + 3 * 0].Tu = .5f * uvMultiple;
bounds[1 + 3 * 0].Tv = 0 * uvMultiple;
bounds[2 + 3 * 0].Tu = 1 * uvMultiple;
bounds[2 + 3 * 0].Tv = 0 * uvMultiple;
bounds[0 + 3 * 1].Tu = 0 * uvMultiple;
bounds[0 + 3 * 1].Tv = .5f * uvMultiple;
bounds[1 + 3 * 1].Tu = .5f * uvMultiple;
bounds[1 + 3 * 1].Tv = .5f * uvMultiple;
bounds[2 + 3 * 1].Tu = 1 * uvMultiple;
bounds[2 + 3 * 1].Tv = .5f * uvMultiple;
bounds[0 + 3 * 2].Tu = 0 * uvMultiple;
bounds[0 + 3 * 2].Tv = 1 * uvMultiple;
bounds[1 + 3 * 2].Tu = .5f * uvMultiple;
bounds[1 + 3 * 2].Tv = 1 * uvMultiple;
bounds[2 + 3 * 2].Tu = 1 * uvMultiple;
bounds[2 + 3 * 2].Tv = 1 * uvMultiple;
}
else
{
bounds[0 + 3 * 0] = PositionTexture.Create(0, -1, 0, 0, 0);
bounds[1 + 3 * 0] = PositionTexture.Create(0, 0, 1, .5f, 0);
bounds[2 + 3 * 0] = PositionTexture.Create(0, -1, 0, 1, 0);
bounds[0 + 3 * 1] = PositionTexture.Create(-1, 0, 0, 0, .5f);
bounds[1 + 3 * 1] = PositionTexture.Create(0, 1, 0, .5f, .5f);
bounds[2 + 3 * 1] = PositionTexture.Create(1, 0, 0, 1, .5f);
bounds[0 + 3 * 2] = PositionTexture.Create(0, -1, 0, 0, 1);
bounds[1 + 3 * 2] = PositionTexture.Create(0, 0, -1, .5f, 1);
bounds[2 + 3 * 2] = PositionTexture.Create(0, -1, 0, 1, 1);
// Setup default matrix of points.
}
}
private PositionTexture Midpoint(PositionTexture positionNormalTextured, PositionTexture positionNormalTextured_2)
{
Vector3d a1 = Vector3d.Lerp(positionNormalTextured.Position, positionNormalTextured_2.Position, .5f);
Vector2d a1uv = Vector2d.Lerp(Vector2d.Create(positionNormalTextured.Tu, positionNormalTextured.Tv), Vector2d.Create(positionNormalTextured_2.Tu, positionNormalTextured_2.Tv), .5f);
a1.Normalize();
return PositionTexture.CreatePos(a1, a1uv.X, a1uv.Y);
}
int subDivisionLevel = 4;
bool subDivided = false;
public override bool CreateGeometry(RenderContext renderContext)
{
if (GeometryCreated)
{
return true;
}
GeometryCreated = true;
base.CreateGeometry(renderContext);
return true;
}
public PlotTile()
{
}
public static PlotTile Create(int level, int xc, int yc, Imageset dataset, Tile parent)
{
PlotTile temp = new PlotTile();
temp.Parent = parent;
temp.Level = level;
temp.tileX = xc;
temp.tileY = yc;
temp.dataset = dataset;
temp.topDown = !dataset.BottomsUp;
if (temp.tileX != (int)xc)
{
Script.Literal("alert('bad')");
}
//temp.ComputeQuadrant();
if (dataset.MeanRadius != 0)
{
temp.DemScaleFactor = dataset.MeanRadius;
}
else
{
if (dataset.DataSetType == ImageSetType.Earth)
{
temp.DemScaleFactor = 6371000;
}
else
{
temp.DemScaleFactor = 3396010;
}
}
temp.ComputeBoundingSphere();
return temp;
}
public override void CleanUp(bool removeFromParent)
{
base.CleanUp(removeFromParent);
if (vertexList != null)
{
vertexList = null;
}
if (childTriangleList != null)
{
childTriangleList = null;
}
subDivided = false;
demArray = null;
}
}
}
| juoni/wwt-web-client | HTML5SDK/wwtlib/PlotTile.cs | C# | mit | 11,749 | [
30522,
2478,
2291,
1025,
2478,
2291,
1012,
6407,
1012,
12391,
1025,
2478,
2291,
1012,
16129,
1025,
3415,
15327,
1059,
26677,
29521,
1063,
2270,
2465,
5436,
15286,
1024,
14090,
1063,
22017,
2140,
2327,
7698,
1027,
2995,
1025,
5123,
2597,
182... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
using System;
using Server.Engines.Craft;
namespace Server.Items
{
[Alterable(typeof(DefBlacksmithy), typeof(DualShortAxes))]
[FlipableAttribute(0x1443, 0x1442)]
public class TwoHandedAxe : BaseAxe
{
[Constructable]
public TwoHandedAxe()
: base(0x1443)
{
this.Weight = 8.0;
}
public TwoHandedAxe(Serial serial)
: base(serial)
{
}
public override WeaponAbility PrimaryAbility
{
get
{
return WeaponAbility.DoubleStrike;
}
}
public override WeaponAbility SecondaryAbility
{
get
{
return WeaponAbility.ShadowStrike;
}
}
public override int AosStrengthReq
{
get
{
return 40;
}
}
public override int AosMinDamage
{
get
{
return 16;
}
}
public override int AosMaxDamage
{
get
{
return 19;
}
}
public override int AosSpeed
{
get
{
return 31;
}
}
public override float MlSpeed
{
get
{
return 3.50f;
}
}
public override int InitMinHits
{
get
{
return 31;
}
}
public override int InitMaxHits
{
get
{
return 90;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
| kevin-10/ServUO | Scripts/Items/Equipment/Weapons/TwoHandedAxe.cs | C# | gpl-2.0 | 2,045 | [
30522,
2478,
2291,
1025,
2478,
8241,
1012,
5209,
1012,
7477,
1025,
3415,
15327,
8241,
1012,
5167,
1063,
1031,
11477,
3085,
1006,
2828,
11253,
1006,
13366,
28522,
10603,
19864,
2100,
1007,
1010,
2828,
11253,
1006,
7037,
22231,
13320,
20156,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require('path');
const VueLoaderPlugin = require('vue-loader/lib/plugin');
const webpack = require('webpack');
const { version, author, license } = require('./package.json');
module.exports = {
entry: './src/index.js',
output: {
filename: 'toastui-vue-editor.js',
path: path.resolve(__dirname, 'dist'),
library: {
type: 'commonjs2',
},
environment: {
arrowFunction: false,
const: false,
},
},
externals: {
'@toast-ui/editor': {
commonjs: '@toast-ui/editor',
commonjs2: '@toast-ui/editor',
},
'@toast-ui/editor/dist/toastui-editor-viewer': {
commonjs: '@toast-ui/editor/dist/toastui-editor-viewer',
commonjs2: '@toast-ui/editor/dist/toastui-editor-viewer',
},
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
exclude: /node_modules/,
},
{
test: /\.js$/,
use: [
{
loader: 'ts-loader',
options: {
transpileOnly: true,
},
},
],
exclude: /node_modules/,
},
],
},
plugins: [
new VueLoaderPlugin(),
new webpack.BannerPlugin({
banner: [
'TOAST UI Editor : Vue Wrapper',
`@version ${version} | ${new Date().toDateString()}`,
`@author ${author}`,
`@license ${license}`,
].join('\n'),
}),
],
};
| nhnent/tui.editor | apps/vue-editor/webpack.config.js | JavaScript | mit | 1,481 | [
30522,
1013,
1008,
9686,
4115,
2102,
1011,
4487,
19150,
1030,
4127,
23235,
1011,
9686,
4115,
2102,
1013,
2053,
1011,
13075,
1011,
5942,
1008,
1013,
9530,
3367,
4130,
1027,
5478,
1006,
1005,
4130,
1005,
1007,
1025,
9530,
3367,
24728,
18349,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
# Nesaea jaegeri Koehne ex Engl. SPECIES
#### Status
ACCEPTED
#### According to
International Plant Names Index
#### Published in
null
#### Original name
null
### Remarks
null | mdoering/backbone | life/Plantae/Magnoliophyta/Magnoliopsida/Myrtales/Lythraceae/Nesaea/Nesaea jaegeri/README.md | Markdown | apache-2.0 | 180 | [
30522,
1001,
24524,
21996,
22770,
4590,
2072,
12849,
11106,
2638,
4654,
25540,
2140,
1012,
2427,
1001,
1001,
1001,
1001,
3570,
3970,
1001,
1001,
1001,
1001,
2429,
2000,
2248,
3269,
3415,
5950,
1001,
1001,
1001,
1001,
2405,
1999,
19701,
1001... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
using CoffeeRoaster.Enums;
using Raspberry.IO;
using Raspberry.IO.SerialPeripheralInterface;
using System;
using System.Threading;
/**********************************************************************************************
* Connections:
* TI board RPI B+
* ------------ ------------------
* P1_1 VCC 1 3.3V
* P1_7 CLK 23 CLK
* P1_8 ADS_CS 26 SPI_CE1
* P2_8 LCD_CS 24 SPI_CE0
* P2_9 LCD_RS 11 GPIO_17_GEN0
* P2_10 LCD_RST 16 GPIO_23
* P2_1 GND 9 GND
* P2_6 SIMO 19 MOSI
* P2_7 SOMI 21 MISO
************************************************************************************************/
namespace CoffeeRoaster
{
public class Ti430BoostAds1118Connection : IDisposable, ITi430BoostAds1118Connection
{
private const int BitsPerWord = 8;
private const int SpiSpeed = 3932160;
private readonly INativeSpiConnection spi0;
private readonly INativeSpiConnection spi1;
private readonly IOutputBinaryPin lcdRegisterSelectGpio; // LCD Register Select Signal. RS=0: instruction; RS=1: data
private readonly IOutputBinaryPin lcdResetGpio;
private readonly Ads1118SingleShot singleShot;
private readonly Ads1118ProgrammableGainAmplifier pga;
private readonly Ads1118DeviceOperatingMode deviceOperatingMode;
private readonly Ads1118DataRate dataRate;
private readonly Ads1118PullupEnable pullupEnabled;
public Ti430BoostAds1118Connection(INativeSpiConnection spi0, INativeSpiConnection spi1, IOutputBinaryPin lcdRegisterSelectGpio, IOutputBinaryPin lcdResetGpio)
{
this.singleShot = Ads1118SingleShot.SingleShot;
this.pga = Ads1118ProgrammableGainAmplifier.TwoFiveSix;
this.deviceOperatingMode = Ads1118DeviceOperatingMode.PowerDownSingleShotMode;
this.dataRate = Ads1118DataRate.OneTwoEight;
this.pullupEnabled = Ads1118PullupEnable.PullupEnabled;
this.spi0 = spi0;
this.spi1 = spi1;
this.lcdRegisterSelectGpio = lcdRegisterSelectGpio;
this.lcdResetGpio = lcdResetGpio;
this.lcdRegisterSelectGpio.Write(true);
this.lcdResetGpio.Write(true);
}
public void DelayMicroSeconds(int milliSeconds)
{
Thread.Sleep(milliSeconds);
//var microsecondTimeSpan = TimeSpanUtility.FromMicroseconds(Convert.ToDouble(microSeconds));
//Raspberry.Timers.Timer.Sleep(microsecondTimeSpan);
}
public void InitializeLcd()
{
this.lcdRegisterSelectGpio.Write(true);
this.WriteCommandToLcd(LcdCommand.WakeUp);
this.WriteCommandToLcd(LcdCommand.FunctionSet);
this.WriteCommandToLcd(LcdCommand.InternalOscFrequency);
this.WriteCommandToLcd(LcdCommand.PowerControl);
this.WriteCommandToLcd(LcdCommand.FollowerControl);
this.WriteCommandToLcd(LcdCommand.Contrast);
this.WriteCommandToLcd(LcdCommand.DisplayOn);
this.WriteCommandToLcd(LcdCommand.EntryMode);
this.WriteCommandToLcd(LcdCommand.Clear);
this.DelayMicroSeconds(20);
}
public void WriteCommandToLcd(LcdCommand command)
{
this.lcdRegisterSelectGpio.Write(false);
var ret = 0;
using (var transferBuffer = this.spi0.CreateTransferBuffer(1, SpiTransferMode.ReadWrite))
{
transferBuffer.Tx[0] = Convert.ToByte(command);
transferBuffer.Delay = 0;
transferBuffer.Speed = SpiSpeed;
transferBuffer.BitsPerWord = BitsPerWord;
transferBuffer.ChipSelectChange = false;
ret = this.spi0.Transfer(transferBuffer);
}
if (ret < 0)
{
Console.WriteLine(string.Format("Error performing SPI Exchange: {0}", Console.Error.ToString()));
Environment.Exit(1);
}
}
public void WriteDataToLcd(char c)
{
this.lcdRegisterSelectGpio.Write(true);
var ret = 0;
using (var transferBuffer = this.spi0.CreateTransferBuffer(1, SpiTransferMode.ReadWrite))
{
transferBuffer.Tx[0] = Convert.ToByte(c);
transferBuffer.Delay = 0;
transferBuffer.Speed = SpiSpeed;
transferBuffer.BitsPerWord = BitsPerWord;
transferBuffer.ChipSelectChange = false;
ret = this.spi0.Transfer(transferBuffer);
}
if (ret < 0)
{
Console.WriteLine(string.Format("Error performing SPI exchange: {0}", Console.Error.ToString()));
Environment.Exit(1);
}
}
public void ClearLcd()
{
this.WriteCommandToLcd(LcdCommand.Clear);
this.DelayMicroSeconds(2);
this.WriteCommandToLcd(LcdCommand.ZeroTwo);
this.DelayMicroSeconds(2);
}
public void DisplayStringOnLcd(LcdLine line, string displayString)
{
switch (line)
{
case LcdLine.SecondLine:
this.WriteCommandToLcd(LcdCommand.LcdSecondLine);
break;
case LcdLine.FirstLine:
default:
this.WriteCommandToLcd(LcdCommand.LcdFirstLine);
break;
}
foreach (char stringCharacter in displayString)
{
this.WriteDataToLcd(stringCharacter);
}
}
public double GetMeasurement()
{
ThermTransact(Ads1118TemperatureSensorMode.InternalSensor, Ads1118InputMultiplexer.Ain0Ain1); // start internal sensor measurement
DelayMicroSeconds(10);
int localData = ThermTransact(Ads1118TemperatureSensorMode.ExternalSignal, Ads1118InputMultiplexer.Ain0Ain1); // read internal sensor measurement and start external sensor measurement
DelayMicroSeconds(10);
int result = ThermTransact(Ads1118TemperatureSensorMode.ExternalSignal, Ads1118InputMultiplexer.Ain0Ain1); // read external sensor measurement and restart external sensor measurement
int localComp = LocalCompensation(localData);
result = result + localComp;
result = result & 0xffff;
result = AdcCode2Temp(result);
double resultD = Convert.ToDouble(result) / 10;
return resultD;
}
public int LocalCompensation(int localCode)
{
float tmp;
float local_temp;
int comp;
localCode = localCode / 4;
local_temp = (float)localCode / 32; //
if (local_temp >= 0 && local_temp <= 5) //0~5
{
tmp = (0x0019 * local_temp) / 5;
comp = Convert.ToInt32(tmp);
}
else if (local_temp > 5 && local_temp <= 10) //5~10
{
tmp = ((0x001A * (local_temp - 5)) / 5) + 0x0019;
comp = Convert.ToInt32(tmp);
}
else if (local_temp > 10 && local_temp <= 20) //10~20
{
tmp = ((0x0033 * (local_temp - 10)) / 10) + 0x0033;
comp = Convert.ToInt32(tmp);
}
else if (local_temp > 20 && local_temp <= 30) //20~30
{
tmp = ((0x0034 * (local_temp - 20)) / 10) + 0x0066;
comp = Convert.ToInt32(tmp);
}
else if (local_temp > 30 && local_temp <= 40) //30~40
{
tmp = ((0x0034 * (local_temp - 30)) / 10) + 0x009A;
comp = Convert.ToInt32(tmp);
}
else if (local_temp > 40 && local_temp <= 50) //40~50
{
tmp = ((0x0035 * (local_temp - 40)) / 10) + 0x00CE;
comp = Convert.ToInt32(tmp);
}
else if (local_temp > 50 && local_temp <= 60) //50~60
{
tmp = ((0x0035 * (local_temp - 50)) / 10) + 0x0103;
comp = Convert.ToInt32(tmp);
}
else if (local_temp > 60 && local_temp <= 80) //60~80
{
tmp = ((0x006A * (local_temp - 60)) / 20) + 0x0138;
comp = Convert.ToInt32(tmp);
}
else if (local_temp > 80 && local_temp <= 125)//80~125
{
tmp = ((0x00EE * (local_temp - 80)) / 45) + 0x01A2;
comp = Convert.ToInt32(tmp);
}
else
{
comp = 0;
}
return comp;
}
public int AdcCode2Temp(int code)
{
float temp;
int t;
temp = (float)code;
if (code > 0xFF6C && code <= 0xFFB5) //-30~-15
{
temp = ((float)(15 * (temp - 0xFF6C)) / 0x0049) - 30.0f;
}
else if (code > 0xFFB5 && code <= 0xFFFF) //-15~0
{
temp = ((float)(15 * (temp - 0xFFB5)) / 0x004B) - 15.0f;
}
else if (code >= 0 && code <= 0x0019) //0~5
{
temp = (float)(5 * (temp - 0)) / 0x0019;
}
else if (code > 0x0019 && code <= 0x0033) //5~10
{
temp = ((float)(5 * (temp - 0x0019)) / 0x001A) + 5.0f;
}
else if (code > 0x0033 && code <= 0x0066) //10~20
{
temp = ((float)(10 * (temp - 0x0033)) / 0x0033) + 10.0f;
}
else if (code > 0x0066 && code <= 0x009A) //20~30
{
temp = ((float)(10 * (temp - 0x0066)) / 0x0034) + 20.0f;
}
else if (code > 0x009A && code <= 0x00CE) //30~40
{
temp = ((float)(10 * (temp - 0x009A)) / 0x0034) + 30.0f;
}
else if (code > 0x00CE && code <= 0x0103) //40~50
{
temp = ((float)(10 * (temp - 0x00CE)) / 0x0035) + 40.0f;
}
else if (code > 0x0103 && code <= 0x0138) //50~60
{
temp = ((float)(10 * (temp - 0x0103)) / 0x0035) + 50.0f;
}
else if (code > 0x0138 && code <= 0x01A2) //60~80
{
temp = ((float)(20 * (temp - 0x0138)) / 0x006A) + 60.0f;
}
else if (code > 0x01A2 && code <= 0x020C) //80~100
{
temp = ((float)((temp - 0x01A2) * 20) / 0x06A) + 80.0f;
}
else if (code > 0x020C && code <= 0x02DE) //100~140
{
temp = ((float)((temp - 0x020C) * 40) / 0x0D2) + 100.0f;
}
else if (code > 0x02DE && code <= 0x03AC) //140~180
{
temp = ((float)((temp - 0x02DE) * 40) / 0x00CE) + 140.0f;
}
else if (code > 0x03AC && code <= 0x0478) //180~220
{
temp = ((float)((temp - 0x03AB) * 40) / 0x00CD) + 180.0f;
}
else if (code > 0x0478 && code <= 0x0548) //220~260
{
temp = ((float)((temp - 0x0478) * 40) / 0x00D0) + 220.0f;
}
else if (code > 0x0548 && code <= 0x061B) //260~300
{
temp = ((float)((temp - 0x0548) * 40) / 0x00D3) + 260.0f;
}
else if (code > 0x061B && code <= 0x06F2) //300~340
{
temp = ((float)((temp - 0x061B) * 40) / 0x00D7) + 300.0f;
}
else if (code > 0x06F2 && code <= 0x07C7) //340~400
{
temp = ((float)((temp - 0x06F2) * 40) / 0x00D5) + 340.0f;
}
else if (code > 0x07C7 && code <= 0x089F) //380~420
{
temp = ((float)((temp - 0x07C7) * 40) / 0x00D8) + 380.0f;
}
else if (code > 0x089F && code <= 0x0978) //420~460
{
temp = ((float)((temp - 0x089F) * 40) / 0x00D9) + 420.0f;
}
else if (code > 0x0978 && code <= 0x0A52) //460~500
{
temp = ((float)((temp - 0x0978) * 40) / 0x00DA) + 460.0f;
}
else
{
temp = 0xA5A5;
}
t = (int)(10 * temp);
return t;
}
public int ThermTransact(Ads1118TemperatureSensorMode mode, Ads1118InputMultiplexer channel)
{
int ret;
using (var transferBuffer = this.spi1.CreateTransferBuffer(4, SpiTransferMode.ReadWrite))
{
if (mode == Ads1118TemperatureSensorMode.ExternalSignal && channel == Ads1118InputMultiplexer.Ain0Ain1)
{
transferBuffer.Tx[0] = Convert.ToByte(0x8b);
transferBuffer.Tx[1] = Convert.ToByte(0x8a);
transferBuffer.Tx[2] = Convert.ToByte(0x8b);
transferBuffer.Tx[3] = Convert.ToByte(0x8a);
}
else if (mode == Ads1118TemperatureSensorMode.InternalSensor && channel == Ads1118InputMultiplexer.Ain0Ain1)
{
transferBuffer.Tx[0] = Convert.ToByte(0x8b);
transferBuffer.Tx[1] = Convert.ToByte(0x9a);
transferBuffer.Tx[2] = Convert.ToByte(0x8b);
transferBuffer.Tx[3] = Convert.ToByte(0x9a);
}
Console.Write("sending [{0} {1} {2} {3}]. ", transferBuffer.Tx[0].ToString("x2"), transferBuffer.Tx[1].ToString("x2"), transferBuffer.Tx[2].ToString("x2"), transferBuffer.Tx[3].ToString("x2"));
transferBuffer.Delay = 0;
transferBuffer.Speed = SpiSpeed;
transferBuffer.BitsPerWord = BitsPerWord;
transferBuffer.ChipSelectChange = false;
ret = this.spi1.Transfer(transferBuffer);
if (ret < 0)
{
Console.WriteLine("Error performing SPI exchange: {0}", Console.Error.ToString());
Environment.Exit(1);
}
ret = 0;
Console.WriteLine("received [{0} {1} {2} {3}]", transferBuffer.Rx[0].ToString("x2"), transferBuffer.Rx[1].ToString("x2"), transferBuffer.Rx[2].ToString("x2"), transferBuffer.Rx[3].ToString("x2"));
ret = transferBuffer.Rx[0];
ret = ret << 8;
ret = ret | transferBuffer.Rx[1];
}
return ret;
}
public void Dispose()
{
this.Dispose(true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{
if (disposing)
{
this.spi0?.Dispose();
this.spi1?.Dispose();
this.lcdRegisterSelectGpio?.Dispose();
this.lcdResetGpio?.Dispose();
}
}
public byte[] GetConfiguration(Ads1118TemperatureSensorMode mode, Ads1118InputMultiplexer channel)
{
var config = new byte[2];
switch (this.singleShot)
{
case Ads1118SingleShot.NoEffect:
config[0] = 0;
break;
case Ads1118SingleShot.SingleShot:
default:
config[0] = 1;
break;
}
switch (channel)
{
case Ads1118InputMultiplexer.Ain0Ain1:
default:
config[1] = 0;
config[2] = 0;
config[3] = 0;
break;
case Ads1118InputMultiplexer.Ain0Ain3:
config[1] = 0;
config[2] = 0;
config[3] = 1;
break;
case Ads1118InputMultiplexer.Ain1Ain3:
config[1] = 0;
config[2] = 1;
config[3] = 0;
break;
case Ads1118InputMultiplexer.Ain2Ain3:
config[1] = 0;
config[2] = 1;
config[3] = 1;
break;
case Ads1118InputMultiplexer.Ain0Gnd:
config[1] = 1;
config[2] = 0;
config[3] = 0;
break;
case Ads1118InputMultiplexer.Ain1Gnd:
config[1] = 1;
config[2] = 0;
config[3] = 1;
break;
case Ads1118InputMultiplexer.Ain2Gnd:
config[1] = 1;
config[2] = 1;
config[3] = 0;
break;
case Ads1118InputMultiplexer.Ain3Gnd:
config[1] = 1;
config[2] = 1;
config[3] = 1;
break;
}
return config;
}
}
} | cdemaskey/coffee-roaster | src/coffee-roaster/Ti430BoostAds1118Connection.cs | C# | mit | 17,327 | [
30522,
2478,
4157,
3217,
24268,
1012,
4372,
18163,
1025,
2478,
20710,
2361,
9766,
1012,
22834,
1025,
2478,
20710,
2361,
9766,
1012,
22834,
1012,
7642,
4842,
11514,
5886,
11475,
10111,
12881,
10732,
1025,
2478,
2291,
1025,
2478,
2291,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
# Copyright (C) 2015-2022 by the RBniCS authors
#
# This file is part of RBniCS.
#
# SPDX-License-Identifier: LGPL-3.0-or-later
from rbnics.problems.base import NonlinearProblem
from rbnics.problems.elliptic import EllipticProblem
from rbnics.backends import product, sum, transpose
NonlinearEllipticProblem_Base = NonlinearProblem(EllipticProblem)
class NonlinearEllipticProblem(NonlinearEllipticProblem_Base):
# Default initialization of members
def __init__(self, V, **kwargs):
# Call to parent
NonlinearEllipticProblem_Base.__init__(self, V, **kwargs)
# Form names for nonlinear problems
self.terms = ["a", "c", "dc", "f", "s"]
self.terms_order = {"a": 2, "c": 1, "dc": 2, "f": 1, "s": 1}
class ProblemSolver(NonlinearEllipticProblem_Base.ProblemSolver):
def residual_eval(self, solution):
problem = self.problem
assembled_operator = dict()
assembled_operator["a"] = sum(product(problem.compute_theta("a"), problem.operator["a"]))
assembled_operator["c"] = sum(product(problem.compute_theta("c"), problem.operator["c"]))
assembled_operator["f"] = sum(product(problem.compute_theta("f"), problem.operator["f"]))
return assembled_operator["a"] * solution + assembled_operator["c"] - assembled_operator["f"]
def jacobian_eval(self, solution):
problem = self.problem
assembled_operator = dict()
assembled_operator["a"] = sum(product(problem.compute_theta("a"), problem.operator["a"]))
assembled_operator["dc"] = sum(product(problem.compute_theta("dc"), problem.operator["dc"]))
return assembled_operator["a"] + assembled_operator["dc"]
# Perform a truth evaluation of the output
def _compute_output(self):
self._output = transpose(self._solution) * sum(product(self.compute_theta("s"), self.operator["s"]))
| mathLab/RBniCS | rbnics/problems/nonlinear_elliptic/nonlinear_elliptic_problem.py | Python | lgpl-3.0 | 1,932 | [
30522,
1001,
9385,
1006,
1039,
1007,
2325,
1011,
16798,
2475,
2011,
1996,
21144,
8713,
2015,
6048,
1001,
1001,
2023,
5371,
2003,
2112,
1997,
21144,
8713,
2015,
1012,
1001,
1001,
23772,
2595,
1011,
6105,
1011,
8909,
4765,
18095,
1024,
1048,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/****************************************************
Statistics Online Computational Resource (SOCR)
http://www.StatisticsResource.org
All SOCR programs, materials, tools and resources are developed by and freely disseminated to the entire community.
Users may revise, extend, redistribute, modify under the terms of the Lesser GNU General Public License
as published by the Open Source Initiative http://opensource.org/licenses/. All efforts should be made to develop and distribute
factually correct, useful, portable and extensible resource all available in all digital formats for free over the Internet.
SOCR resources are distributed in the hope that they will be useful, but without
any warranty; without any explicit, implicit or implied warranty for merchantability or
fitness for a particular purpose. See the GNU Lesser General Public License for
more details see http://opensource.org/licenses/lgpl-license.php.
http://www.SOCR.ucla.edu
http://wiki.stat.ucla.edu/socr
It s Online, Therefore, It Exists!
****************************************************/
/* created by annie che 20060915. */
package edu.ucla.stat.SOCR.util;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Set;
import edu.ucla.stat.SOCR.analyses.result.NormalPowerResult;
import edu.ucla.stat.SOCR.distributions.Domain;
import edu.ucla.stat.SOCR.distributions.IntervalData;
import edu.ucla.stat.SOCR.distributions.NormalDistribution;
import edu.ucla.stat.SOCR.modeler.Modeler;
import edu.ucla.stat.SOCR.modeler.gui.ModelerColor;
/**
* This class models an interactive histogram. The user can click on the horizontal axes to add points to the data set.
*/
public class NormalCurve extends ModelerHistogram {
protected boolean drawData = false;
protected double[] rawData = null;
protected NormalDistribution dataDist = null;
protected int[] freq = null;
protected int sampleSize;
protected Domain domain;
protected IntervalData intervalData;
protected double maxRelFreq = -1;
protected Frequency frequency = null;
protected HashMap map = null;
private double mu0;
private double muA;
private double sigma;
private double sampleSE;
private double ciLeft;
private double ciRight;
private NormalDistribution normal0 = null;
private NormalDistribution normalA = null;
private boolean fillArea = true;
private Color fillColor1 = Color.PINK;
private Color fillColor2 = fillColor1.brighter();
private Color fillColor3 = Color.YELLOW;
private Color fillColor4 = fillColor3.brighter();
private Color ciColor = Color.GREEN;
private double xIntersect;
private double yIntersect;
private boolean useSampleMean = false;
private String hypothesisType = null;
private static byte NORMAL_CURVE_THICKNESS = 1;
public NormalCurve(double a, double b, double w) {
super(a, b, w);
this.modelType = Modeler.CONTINUOUS_DISTRIBUTION_TYPE;
setDrawUserClicks(false);
}
public NormalCurve() {
super();
setDrawUserClicks(false);
}
/**
* @param rawData the rawData to set
* @uml.property name="rawData"
*/
public void setRawData(double[] input) {
sampleSize = input.length;
try {
this.rawData = input;
double dataMax = 0;
try {
dataMax = QSortAlgorithm.max(this.rawData);
} catch (Exception e) {
}
double dataMin = 0;
try {
dataMin = QSortAlgorithm.min(this.rawData);
} catch (Exception e) {
}
domain = new Domain(dataMin, dataMax, 1);
intervalData = new IntervalData(domain, null);
setIntervalData(intervalData);
frequency = new Frequency(rawData);
map = frequency.getMap();
frequency.computeFrequency();
maxRelFreq = frequency.getMaxRelFreq();
} catch (Exception e) {
}
}
public void setRawDataDistribution(NormalDistribution normal) {
this.dataDist = normal;
}
/**
* @return the rawData
* @uml.property name="rawData"
*/
public double[] getRawData() {
return this.rawData;
}
public void paintComponent(Graphics g) {
super.paintComponent(g);
Graphics2D G2 = (Graphics2D) g;
G2.setStroke(new BasicStroke(NORMAL_CURVE_THICKNESS)); // how thick the pen it.
float[] HSBVal = new float[3];
double x = 0;
double width = .5;
double d = 1;
try {
if (rawData.length > 0) {
Set keySet = map.keySet();
Iterator iterator = keySet.iterator();
int freqSize = map.size();
int dataCount = -1;
String id = null;
while (iterator.hasNext()) {
id = (String)iterator.next();
dataCount = ((Integer)map.get(id)).intValue();;
x = Double.parseDouble(id);
double dataCountDouble = dataCount;
double sampleSizeDouble = sampleSize;
d = dataCountDouble/sampleSizeDouble;
g.setColor(Color.PINK);
drawBox(g, x - width / 2, 0, x + width / 2, d);
g.setColor(Color.PINK);
fillBox(g, x - width / 2, 0, x + width / 2, d);
}
}
} catch (Exception e) {
}
if (modelX1 != null && modelX1.length > 0 && modelX2 != null && modelX2.length > 0) {
double maxXVal1 = modelX1[0], maxYVal1 = modelY1[0];
int terms1 = modelY1.length; // how many dx.
double maxXVal2 = modelX2[0], maxYVal2 = modelY1[0];
int term2s = modelY2.length; // how many dx.
double xa, ya;
int subLth = 0;
subLth = (int) (modelX1.length / modelCount);
double x1 = 0;
double y1 = 0;
//for (int j = 0; j < modelCount; j++) {
int j = 0;
x1 = (double) modelX1[0 + j * subLth];
y1 = (double) modelY1[0 + j * subLth];
for (int i = 1; i < subLth; i++) {
xa = modelX1[i + j * subLth];
ya = modelY1[i + j * subLth];
x1 = xa;
y1 = ya;
}
G2.setStroke(new BasicStroke(NORMAL_CURVE_THICKNESS));
G2.setColor(this.getOutlineColor2());
x1 = (double) modelX2[0 + j * subLth];
y1 = (double) modelY2[0 + j * subLth];
for (int i = 1; i < subLth; i++) {
xa = modelX2[i + j * subLth];
ya = modelY2[i + j * subLth];
if (fillArea) {
G2.setColor(Color.YELLOW);
G2.setStroke(new BasicStroke(3f));
if (hypothesisType.equalsIgnoreCase(NormalPowerResult.HYPOTHESIS_TYPE_GT) && (x1 > ciRight)) {
//fillBox(G2, x1, normal0.getDensity(xa), xa, normalA.getDensity(xa) && (x1 < ciLeft)) {
fillBox(G2, x1, 0, xa, normalA.getDensity(xa));
} else if (hypothesisType.equalsIgnoreCase(NormalPowerResult.HYPOTHESIS_TYPE_LT)&& (x1 < ciLeft)) {
//fillBox(G2, x1, normal0.getDensity(xa), xa, normalA.getDensity(xa));
fillBox(G2, x1, 0, xa, normalA.getDensity(xa));
} else if (hypothesisType.equalsIgnoreCase(NormalPowerResult.HYPOTHESIS_TYPE_NE)&& (((x1 > ciRight)) || (x1 < ciLeft))) {
//fillBox(G2, x1, normal0.getDensity(xa), xa, normalA.getDensity(xa));
fillBox(G2, x1, 0, xa, normalA.getDensity(xa));
}
}
x1 = xa;
y1 = ya;
}
// model curve
G2.setStroke(new BasicStroke(NORMAL_CURVE_THICKNESS));
G2.setColor(this.getOutlineColor1());
x1 = (double) modelX1[0 + j * subLth];
y1 = (double) modelY1[0 + j * subLth];
////////////////////System.outprintln("NormalCurve mu0 = " + mu0);
for (int i = 1; i < subLth; i++) {
xa = modelX1[i + j * subLth];
ya = modelY1[i + j * subLth];
//if (x1 < mu0 + 5 * sigma || x1 > mu0 - 5 * sigma)
drawLine(G2, x1, y1, xa, ya); // when modelCount == any #
x1 = xa;
y1 = ya;
}
subLth = (int) (modelX2.length / modelCount);
// model curve
G2.setStroke(new BasicStroke(NORMAL_CURVE_THICKNESS));
G2.setColor(this.getOutlineColor2());
x1 = (double) modelX2[0 + j * subLth];
y1 = (double) modelY2[0 + j * subLth];
////////////////////System.outprintln("NormalCurve muA = " + muA);
for (int i = 1; i < subLth; i++) {
xa = modelX2[i + j * subLth];
ya = modelY2[i + j * subLth];
//if (x1 < muA + 5 * sigma || x1 > muA - 5 * sigma)
drawLine(G2, x1, y1, xa, ya); // when modelCount == any #
x1 = xa;
y1 = ya;
}
}
// draw it second time (looks nicer)
G2.setStroke(new BasicStroke(NORMAL_CURVE_THICKNESS));
g.setColor(Color.BLACK);
super.drawAxis(g, -yMax, yMax, 0.1 * yMax, xMin, VERTICAL); // 6 args
super.drawAxis(g, xMin, xMax, (xMax - xMin) / 10, 0, HORIZONTAL, axisType, listOfTicks); // c must be 0.
}
protected void drawAxisWithDomain(Graphics g, Domain domain, double c, int orientation, int type, ArrayList list){
double t;
double currentUpperBound = domain.getUpperBound(); // of the model (distribution)
double currentLowerBound = domain.getLowerBound();
int domainSize = domain.getSize();
if (orientation == HORIZONTAL){
this.drawLine(g, currentLowerBound, c, currentUpperBound, c);
//Draw tick marks, depending on type
for (int i = 0; i < domainSize; i++){
if (type == MIDPOINTS) {
t = domain.getValue(i);
} else {
t = domain.getBound(i);
}
g.setColor(ModelerColor.HISTOGRAM_TICKMARK);
//g.setStroke(new BasicStroke(3.05f));
//drawTick(g, t, c, VERTICAL);
}
if (type == BOUNDS) {
t = domain.getUpperBound();
drawTick(g, t, c, VERTICAL);
}
//Draw labels
if (type == MIDPOINTS) {
t = domain.getLowerValue();
} else {
t = domain.getLowerBound();
}
drawLabel(g, format(t), t, c, BELOW);
if (type == MIDPOINTS) {
t = domain.getUpperValue();
} else {
t = domain.getUpperBound();
}
drawLabel(g, format(t), t, c, BELOW);
//double mu0 = 0;
//double muA = 0;
//double sigma = 0;
//ciLeft = 0;
//ciRight = 0;
//double sampleSE = 0;
//NormalDistribution normal0 = null;
//NormalDistribution normalA = null;
if (list != null) {
//for (int i = 0; i < list.size(); i++) {
try {
mu0 = Double.parseDouble(((String)list.get(0)));
muA = Double.parseDouble(((String)list.get(1)));
sigma = Double.parseDouble(((String)list.get(2)));
////////////System.outprintln("NormalCurve mu0 = " + mu0);
////////////System.outprintln("NormalCurve muA = " + muA);
//sampleSE = Double.parseDouble(((String)list.get(3)));
normal0 = new NormalDistribution(mu0, sigma);
normalA = new NormalDistribution(muA, sigma);
//ciLeft = mu0 - 1.96 * sigma;
//ciRight = mu0 + 1.96 * sigma;
//t = Double.parseDouble(((String)list.get(i)));
drawLabel(g, format(mu0), mu0, c, BELOW);
drawLabel(g, format(muA), muA, c, BELOW);
Color oldColor = g.getColor();
g.setColor(this.getOutlineColor1());
drawLine(g, mu0, 0, mu0, normal0.getMaxDensity());
//drawLine(g, ciLeft, 0, ciLeft, normal0.getDensity(ciLeft));
//drawLine(g, ciRight, 0, ciRight, normal0.getDensity(ciRight));
g.setColor(this.getOutlineColor2());
drawLine(g, muA, 0, muA, normalA.getMaxDensity());
double density = 0;
if (hypothesisType == null)
hypothesisType = (String)list.get(5);
////////System.outprintln("NormalCurve hypothesisType = " + hypothesisType);
if (hypothesisType.equalsIgnoreCase(NormalPowerResult.HYPOTHESIS_TYPE_NE)){
try {
g.setColor(this.getOutlineColor1());
ciLeft = Double.parseDouble(((String)list.get(3)));
//drawLabel(g, format(ciLeft), ciLeft, c, BELOW);
density = Math.max(normal0.getDensity(ciLeft), normalA.getDensity(ciLeft));
g.setColor(ciColor);
drawLine(g, ciLeft, 0, ciLeft, density);
g.setColor(this.getOutlineColor1());
//hypothesisType = (String)list.get(5);
//////////////System.outprintln("NormalCurve ciLeft = " + ciLeft + " density = " + density);
}
catch (Exception e) {
//////////////System.outprintln("NormalCurve e = " + e);
}
try {
g.setColor(this.getOutlineColor1());
ciRight = Double.parseDouble(((String)list.get(4)));
//drawLabel(g, format(ciLeft), ciLeft, c, BELOW);
density = Math.max(normal0.getDensity(ciRight), normalA.getDensity(ciRight));
g.setColor(ciColor);
drawLine(g, ciRight, 0, ciRight, density);
g.setColor(this.getOutlineColor1());
//hypothesisType = (String)list.get(5);
//////////////System.outprintln("NormalCurve ciRight = " + ciRight + " density = " + density);
}
catch (Exception e) {
//////////////System.outprintln("NormalCurve e = " + e);
}
}
else if (muA < mu0) {
hypothesisType = NormalPowerResult.HYPOTHESIS_TYPE_LT;
}
else if (muA > mu0) {
hypothesisType = NormalPowerResult.HYPOTHESIS_TYPE_GT;
}
if (hypothesisType.equalsIgnoreCase(NormalPowerResult.HYPOTHESIS_TYPE_LT)) {
try {
g.setColor(this.getOutlineColor1());
ciLeft = Double.parseDouble(((String)list.get(3)));
//drawLabel(g, format(ciLeft), ciLeft, c, BELOW);
density = Math.max(normal0.getDensity(ciLeft), normalA.getDensity(ciLeft));
g.setColor(ciColor);
drawLine(g, ciLeft, 0, ciLeft, density);
g.setColor(this.getOutlineColor1());
//hypothesisType = (String)list.get(5);
////////System.outprintln("NormalCurve ciLeft = " + ciLeft + " density = " + density);
} catch (Exception e) {
////////System.outprintln("NormalCurve Exception e = " + e);
}
} else if (hypothesisType.equalsIgnoreCase(NormalPowerResult.HYPOTHESIS_TYPE_GT)) {
try {
g.setColor(this.getOutlineColor1());
ciRight = Double.parseDouble(((String)list.get(4)));
//drawLabel(g, format(ciLeft), ciLeft, c, BELOW);
density = Math.max(normal0.getDensity(ciRight), normalA.getDensity(ciRight));
g.setColor(ciColor);
drawLine(g, ciRight, 0, ciRight, density);
g.setColor(this.getOutlineColor1());
//hypothesisType = (String)list.get(5);
////////System.outprintln("NormalCurve ciRight = " + ciRight + " density = " + density);
} catch (Exception e) {
////////System.outprintln("NormalCurve Exception e = " + e);
}
}
////////////System.outprintln("NormalCurve hypothesisType = " + hypothesisType);
double x1 = 0, y1 = 0, xa = 0;
g.setColor(oldColor);
} catch (Exception e) {
//////////////System.outprintln("NormalCurve last e = " + e);
}
//}
}
}
else{
//Draw thte line
drawLine(g, c, domain.getLowerBound(), c, domain.getUpperBound());
//drawLine(g, c, -10, c, 10);
//Draw tick marks, depending on type
for (int i = 0; i < domain.getSize(); i++){
if (type == MIDPOINTS) t = domain.getValue(i); else t = domain.getBound(i);
//drawTick(g, c, t, HORIZONTAL);
}
if (type == BOUNDS) drawTick(g, c, domain.getUpperBound(), HORIZONTAL);
//Draw labels
if (type == MIDPOINTS) t = domain.getLowerValue(); else t = domain.getLowerBound();
g.setColor(ModelerColor.HISTOGRAM_LABEL);
drawLabel(g, format(t), c, t, LEFT);
if (type == MIDPOINTS) t = domain.getUpperValue(); else t = domain.getUpperBound();
drawLabel(g, format(t), c, t, LEFT);
}
int sum = Math.abs(currentXUpperBound) + Math.abs(currentXLowerBound); //
int diff = Math.abs(currentXUpperBound) - Math.abs(currentXLowerBound); //
}
/**
* @return the maxRelFreq
* @uml.property name="maxRelFreq"
*/
public double getMaxRelFreq() {
return this.maxRelFreq;
}
/**
* @param fillArea the fillArea to set
* @uml.property name="fillArea"
*/
public void setFillArea(boolean fillArea) {
this.fillArea = fillArea;
}
/*
private void findIntersection(double[] x1, double[] y1, double[] x2, double[] y2) {
double numberTooSmall = 1E-10;
boolean[] willUse = new boolean[x1.length];
for (int i = 0; i < x1.length; i++) {
if (y1[i] < numberTooSmall || y2[i] < numberTooSmall) {
willUse[i] = false;
}
else {
willUse[i] = true;
}
}
}
*/
public void setSampleMeanOption(boolean input) {
this.useSampleMean = input;
}
public boolean withinSampleMeanCurve(double x, double y) {//, double scale) {
double f = normalA.getDensity(x);
//////////System.outprintln("NormailCurve x = " + x + ", y = " + y + ", f = " + f);
if (f <= y && f >= 0.0001) {
return true;
}
else {
return false;
}
}
public void resetHypotheseType() {
hypothesisType = null;
}
}
| SOCR/HTML5_WebSite | SOCR2.8/src/edu/ucla/stat/SOCR/util/NormalCurve.java | Java | lgpl-3.0 | 16,918 | [
30522,
1013,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/**
* Licensed to the Sakai Foundation (SF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The SF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package org.sakaiproject.nakamura.files.pool;
import static org.apache.jackrabbit.JcrConstants.JCR_CONTENT;
import static org.apache.jackrabbit.JcrConstants.NT_RESOURCE;
import static org.mockito.Mockito.when;
import static org.sakaiproject.nakamura.api.files.FilesConstants.POOLED_CONTENT_MEMBERS_NODE;
import com.google.common.collect.ImmutableMap;
import org.apache.jackrabbit.api.JackrabbitSession;
import org.apache.jackrabbit.api.security.principal.PrincipalManager;
import org.apache.jackrabbit.api.security.user.UserManager;
import org.apache.kahadb.util.ByteArrayInputStream;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.SlingHttpServletResponse;
import org.apache.sling.api.request.RequestParameter;
import org.apache.sling.api.request.RequestParameterMap;
import org.apache.sling.api.request.RequestPathInfo;
import org.apache.sling.api.resource.ResourceResolver;
import org.apache.sling.commons.json.JSONObject;
import org.apache.sling.jcr.api.SlingRepository;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import org.osgi.service.event.EventAdmin;
import org.sakaiproject.nakamura.api.cluster.ClusterTrackingService;
import org.sakaiproject.nakamura.api.files.FileUploadHandler;
import org.sakaiproject.nakamura.api.lite.ClientPoolException;
import org.sakaiproject.nakamura.api.lite.Session;
import org.sakaiproject.nakamura.api.lite.StorageClientException;
import org.sakaiproject.nakamura.api.lite.accesscontrol.AccessDeniedException;
import org.sakaiproject.nakamura.api.lite.authorizable.AuthorizableManager;
import org.sakaiproject.nakamura.api.user.AuthorizableCountChanger;
import org.sakaiproject.nakamura.lite.BaseMemoryRepository;
import org.sakaiproject.nakamura.lite.RepositoryImpl;
import org.sakaiproject.nakamura.lite.jackrabbit.SparseMapUserManager;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.security.Principal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import javax.jcr.Binary;
import javax.jcr.Item;
import javax.jcr.Node;
import javax.jcr.RepositoryException;
import javax.jcr.ValueFactory;
import javax.jcr.security.AccessControlEntry;
import javax.jcr.security.AccessControlException;
import javax.jcr.security.AccessControlList;
import javax.jcr.security.AccessControlManager;
import javax.jcr.security.AccessControlPolicy;
import javax.jcr.security.Privilege;
public class CreateContentPoolServletTest {
@Mock
private SlingRepository slingRepository;
@Mock
private JackrabbitSession adminSession;
@Mock
private JackrabbitSession jcrSesson;
@Mock
private UserManager userManager;
@Mock
private PrincipalManager principalManager;
@Mock
private Node parentNode;
@Mock
private Node resourceNode;
@Mock
private Node membersNode;
@Mock
private Node memberNode;
@Mock
private AccessControlManager accessControlManager;
@Mock
private Privilege allPrivilege;
private AccessControlList accessControlList;
@Mock
private ValueFactory valueFactory;
@Mock
private Binary binary;
@Mock
private ClusterTrackingService clusterTrackingService;
@Mock
private SlingHttpServletRequest request;
@Mock
private SlingHttpServletResponse response;
@Mock
private RequestParameterMap requestParameterMap;
@Mock
private RequestParameter requestParameter1;
@Mock
private RequestParameter requestParameter2;
@Mock
private RequestParameter requestParameter3;
@Mock
private RequestParameter requestParameterNot;
@Mock
private RequestPathInfo requestPathInfo;
@Mock
private ResourceResolver resourceResolver;
@Mock
private SparseMapUserManager sparseMapUserManager;
@Mock
private EventAdmin eventAdmin;
@Mock
private AuthorizableCountChanger authorizableCountChanger;
private RepositoryImpl repository;
CreateContentPoolServlet cp;
@Before
public void setUp() throws Exception {
when(slingRepository.loginAdministrative(null)).thenReturn(adminSession);
when(request.getResourceResolver()).thenReturn(resourceResolver);
when(resourceResolver.adaptTo(javax.jcr.Session.class)).thenReturn(jcrSesson);
Session session = repository.loginAdministrative("ieb");
when(jcrSesson.getUserManager()).thenReturn(sparseMapUserManager);
when(sparseMapUserManager.getSession()).thenReturn(session);
when(clusterTrackingService.getClusterUniqueId()).thenReturn(String.valueOf(System.currentTimeMillis()));
when(request.getRequestPathInfo()).thenReturn(requestPathInfo);
when(requestPathInfo.getExtension()).thenReturn(null);
when(adminSession.getUserManager()).thenReturn(userManager);
when(adminSession.getPrincipalManager()).thenReturn(principalManager);
when(adminSession.getAccessControlManager()).thenReturn(accessControlManager);
when(request.getRemoteUser()).thenReturn("ieb");
when(request.getRequestParameterMap()).thenReturn(requestParameterMap);
Map<String, RequestParameter[]> map = new HashMap<String, RequestParameter[]>();
RequestParameter[] requestParameters = new RequestParameter[] {
requestParameter1, requestParameterNot, requestParameter2, requestParameter3
};
map.put("files", requestParameters);
when(requestParameterMap.entrySet()).thenReturn(map.entrySet());
when(requestParameter1.isFormField()).thenReturn(false);
when(requestParameter1.getContentType()).thenReturn("application/pdf");
when(requestParameter1.getFileName()).thenReturn("testfilename.pdf");
InputStream input1 = new ByteArrayInputStream(new byte[10]);
when(requestParameter1.getInputStream()).thenReturn(input1);
when(requestParameter2.isFormField()).thenReturn(false);
when(requestParameter2.getContentType()).thenReturn("text/html");
when(requestParameter2.getFileName()).thenReturn("index.html");
InputStream input2 = new ByteArrayInputStream(new byte[10]);
when(requestParameter2.getInputStream()).thenReturn(input2);
when(requestParameter3.isFormField()).thenReturn(false);
when(requestParameter3.getContentType()).thenReturn("application/pdf");
when(requestParameter3.getFileName()).thenReturn("C:\\Users\\Nakamura User\\Documents\\testabspath.pdf");
InputStream input3 = new ByteArrayInputStream(new byte[10]);
when(requestParameter3.getInputStream()).thenReturn(input3);
when(requestParameterNot.isFormField()).thenReturn(true);
// deep create
// when(adminSession.nodeExists(CreateContentPoolServlet.POOLED_CONTENT_ROOT)).thenReturn(true);
when(adminSession.itemExists(Mockito.anyString())).thenReturn(true);
// Because the pooled content paths are generated by a private method,
// mocking the repository is more problematic than usual. The test
// therefore relies on inside knowledge that there should be three
// calls to deepGetOrCreateNode for each file: one for the pooled content
// node, one for its members node, and one for the manager node.
when(adminSession.getItem(Mockito.anyString())).thenAnswer(new Answer<Item>() {
public Item answer(InvocationOnMock invocation) throws Throwable {
Object[] args = invocation.getArguments();
String path = (String) args[0];
if (path.endsWith(POOLED_CONTENT_MEMBERS_NODE)) {
return membersNode;
} else if (path.endsWith("ieb")) {
return memberNode;
} else {
return parentNode;
}
}
});
when(parentNode.addNode(JCR_CONTENT, NT_RESOURCE)).thenReturn(resourceNode);
when(adminSession.getValueFactory()).thenReturn(valueFactory);
when(valueFactory.createBinary(Mockito.any(InputStream.class))).thenReturn(binary);
// access control utils
accessControlList = new AccessControlList() {
// Add an "addEntry" method so AccessControlUtil can execute something.
// This method doesn't do anything useful.
@SuppressWarnings("unused")
public boolean addEntry(Principal principal, Privilege[] privileges, boolean isAllow)
throws AccessControlException {
return true;
}
public void removeAccessControlEntry(AccessControlEntry ace)
throws AccessControlException, RepositoryException {
}
public AccessControlEntry[] getAccessControlEntries() throws RepositoryException {
return new AccessControlEntry[0];
}
public boolean addAccessControlEntry(Principal principal, Privilege[] privileges)
throws AccessControlException, RepositoryException {
return false;
}
};
when(accessControlManager.privilegeFromName(Mockito.anyString())).thenReturn(
allPrivilege);
AccessControlPolicy[] acp = new AccessControlPolicy[] { accessControlList };
when(accessControlManager.getPolicies(Mockito.anyString())).thenReturn(acp);
cp = new CreateContentPoolServlet();
cp.eventAdmin = eventAdmin;
cp.clusterTrackingService = clusterTrackingService;
cp.sparseRepository = repository;
cp.authorizableCountChanger = authorizableCountChanger;
}
public CreateContentPoolServletTest() throws ClientPoolException, StorageClientException, AccessDeniedException, ClassNotFoundException, IOException {
MockitoAnnotations.initMocks(this);
BaseMemoryRepository baseMemoryRepository = new BaseMemoryRepository();
repository = baseMemoryRepository.getRepository();
Session session = repository.loginAdministrative();
AuthorizableManager authorizableManager = session.getAuthorizableManager();
authorizableManager.createUser("ieb", "Ian Boston", "test", ImmutableMap.of("x",(Object)"y"));
org.sakaiproject.nakamura.api.lite.authorizable.Authorizable authorizable = authorizableManager.findAuthorizable("ieb");
System.err.println("Got ieb as "+authorizable);
session.logout();
}
@Test
public void testCreate() throws Exception {
StringWriter stringWriter = new StringWriter();
when(response.getWriter()).thenReturn(new PrintWriter(stringWriter));
cp.doPost(request, response);
// Verify that we created all the nodes.
JSONObject jsonObject = new JSONObject(stringWriter.toString());
Assert.assertNotNull(jsonObject.getString("testfilename.pdf"));
Assert.assertNotNull(jsonObject.getString("index.html"));
Assert.assertNotNull(jsonObject.getString("testabspath.pdf")); // The servlet should scrub off the absolute path.
Assert.assertEquals(3, jsonObject.length());
}
@Test
public void testFileUploadHandler() throws Exception {
StringWriter stringWriter = new StringWriter();
when(response.getWriter()).thenReturn(new PrintWriter(stringWriter));
// Exceptions in a handler should be caught and logged, but shouldn't stop
// other handlers from running.
cp.bindFileUploadHandler(new FileUploadHandler() {
public void handleFile(Map<String, Object> results, String poolId, InputStream fileInputStream,
String userId, boolean isNew) throws IOException {
throw new RuntimeException("Handler failed!");
}
});
final ArrayList<String> notifiedFiles = new ArrayList<String>();
cp.bindFileUploadHandler(new FileUploadHandler() {
public void handleFile(Map<String, Object> results, String poolId, InputStream fileInputStream,
String userId, boolean isNew) throws IOException {
notifiedFiles.add(poolId);
}
});
cp.doPost(request, response);
Assert.assertTrue(notifiedFiles.size () == 3);
}
}
| dylanswartz/nakamura | bundles/files/impl/src/test/java/org/sakaiproject/nakamura/files/pool/CreateContentPoolServletTest.java | Java | apache-2.0 | 12,715 | [
30522,
1013,
1008,
1008,
1008,
7000,
2000,
1996,
7842,
11151,
3192,
1006,
16420,
1007,
2104,
2028,
1008,
2030,
2062,
12130,
6105,
10540,
1012,
2156,
1996,
5060,
5371,
1008,
5500,
2007,
2023,
2147,
2005,
3176,
2592,
1008,
4953,
9385,
6095,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
# encoding: utf-8
# xreq_xrep_poll.rb
#
# It illustrates the use of xs_poll(), as wrapped by the Ruby library,
# for detecting and responding to read and write events recorded on sockets.
# It also shows how to use XS::NO_BLOCK/XS::DONTWAIT for non-blocking send
# and receive.
require File.join(File.dirname(__FILE__), '..', 'lib', 'ffi-rxs')
def assert(rc)
raise "Last API call failed at #{caller(1)}" unless rc >= 0
end
link = "tcp://127.0.0.1:5555"
begin
ctx = XS::Context.new
s1 = ctx.socket(XS::XREQ)
s2 = ctx.socket(XS::XREP)
rescue ContextError => e
STDERR.puts "Failed to allocate context or socket"
raise
end
s1.identity = 'socket1.xreq'
s2.identity = 'socket2.xrep'
assert(s1.setsockopt(XS::LINGER, 100))
assert(s2.setsockopt(XS::LINGER, 100))
assert(s1.bind(link))
assert(s2.connect(link))
poller = XS::Poller.new
poller.register_readable(s2)
poller.register_writable(s1)
start_time = Time.now
@unsent = true
until @done do
assert(poller.poll_nonblock)
# send the message after 5 seconds
if Time.now - start_time > 5 && @unsent
puts "sending payload nonblocking"
5.times do |i|
payload = "#{ i.to_s * 40 }"
assert(s1.send_string(payload, XS::NonBlocking))
end
@unsent = false
end
# check for messages after 1 second
if Time.now - start_time > 1
poller.readables.each do |sock|
if sock.identity =~ /xrep/
routing_info = ''
assert(sock.recv_string(routing_info, XS::NonBlocking))
puts "routing_info received [#{routing_info}] on socket.identity [#{sock.identity}]"
else
routing_info = nil
received_msg = ''
assert(sock.recv_string(received_msg, XS::NonBlocking))
# skip to the next iteration if received_msg is nil; that means we got an EAGAIN
next unless received_msg
puts "message received [#{received_msg}] on socket.identity [#{sock.identity}]"
end
while sock.more_parts? do
received_msg = ''
assert(sock.recv_string(received_msg, XS::NonBlocking))
puts "message received [#{received_msg}]"
end
puts "kick back a reply"
assert(sock.send_string(routing_info, XS::SNDMORE | XS::NonBlocking)) if routing_info
time = Time.now.strftime "%Y-%m-%dT%H:%M:%S.#{Time.now.usec}"
reply = "reply " + sock.identity.upcase + " #{time}"
puts "sent reply [#{reply}], #{time}"
assert(sock.send_string(reply))
@done = true
poller.register_readable(s1)
end
end
end
puts "executed in [#{Time.now - start_time}] seconds"
assert(s1.close)
assert(s2.close)
ctx.terminate
| celldee/ffi-rxs | examples/xreq_xrep_poll.rb | Ruby | mit | 2,621 | [
30522,
1001,
17181,
1024,
21183,
2546,
1011,
1022,
1001,
1060,
2890,
4160,
1035,
1060,
2890,
2361,
1035,
8554,
1012,
21144,
1001,
1001,
2009,
24899,
1996,
2224,
1997,
1060,
2015,
1035,
8554,
1006,
1007,
1010,
2004,
5058,
2011,
1996,
10090,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Sylius\Bundle\CoreBundle\Doctrine\ORM;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Mapping;
use Doctrine\ORM\QueryBuilder;
use Sylius\Bundle\OrderBundle\Doctrine\ORM\OrderRepository as BaseOrderRepository;
use Sylius\Component\Core\Model\ChannelInterface;
use Sylius\Component\Core\Model\CustomerInterface;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Core\Model\PromotionCouponInterface;
use Sylius\Component\Core\OrderCheckoutStates;
use Sylius\Component\Core\OrderPaymentStates;
use Sylius\Component\Core\Repository\OrderRepositoryInterface;
use SyliusLabs\AssociationHydrator\AssociationHydrator;
class OrderRepository extends BaseOrderRepository implements OrderRepositoryInterface
{
/**
* @var AssociationHydrator
*/
protected $associationHydrator;
/**
* {@inheritdoc}
*/
public function __construct(EntityManager $entityManager, Mapping\ClassMetadata $class)
{
parent::__construct($entityManager, $class);
$this->associationHydrator = new AssociationHydrator($entityManager, $class);
}
/**
* {@inheritdoc}
*/
public function createListQueryBuilder(): QueryBuilder
{
return $this->createQueryBuilder('o')
->addSelect('channel')
->addSelect('customer')
->innerJoin('o.channel', 'channel')
->leftJoin('o.customer', 'customer')
->andWhere('o.state != :state')
->setParameter('state', OrderInterface::STATE_CART)
;
}
/**
* {@inheritdoc}
*/
public function createByCustomerIdQueryBuilder($customerId): QueryBuilder
{
return $this->createQueryBuilder('o')
->andWhere('o.customer = :customerId')
->andWhere('o.state != :state')
->setParameter('customerId', $customerId)
->setParameter('state', OrderInterface::STATE_CART)
;
}
/**
* {@inheritdoc}
*/
public function createByCustomerAndChannelIdQueryBuilder($customerId, $channelId): QueryBuilder
{
return $this->createQueryBuilder('o')
->andWhere('o.customer = :customerId')
->andWhere('o.channel = :channelId')
->andWhere('o.state != :state')
->setParameter('customerId', $customerId)
->setParameter('channelId', $channelId)
->setParameter('state', OrderInterface::STATE_CART)
;
}
/**
* {@inheritdoc}
*/
public function findByCustomer(CustomerInterface $customer): array
{
return $this->createByCustomerIdQueryBuilder($customer->getId())
->getQuery()
->getResult()
;
}
/**
* {@inheritdoc}
*/
public function findForCustomerStatistics(CustomerInterface $customer): array
{
return $this->createQueryBuilder('o')
->andWhere('o.customer = :customerId')
->andWhere('o.state = :state')
->setParameter('customerId', $customer->getId())
->setParameter('state', OrderInterface::STATE_FULFILLED)
->getQuery()
->getResult()
;
}
/**
* {@inheritdoc}
*/
public function findOneForPayment($id): ?OrderInterface
{
return $this->createQueryBuilder('o')
->addSelect('payments')
->addSelect('paymentMethods')
->leftJoin('o.payments', 'payments')
->leftJoin('payments.method', 'paymentMethods')
->andWhere('o.id = :id')
->setParameter('id', $id)
->getQuery()
->getOneOrNullResult()
;
}
/**
* {@inheritdoc}
*/
public function countByCustomerAndCoupon(CustomerInterface $customer, PromotionCouponInterface $coupon): int
{
return (int) $this->createQueryBuilder('o')
->select('COUNT(o.id)')
->andWhere('o.customer = :customer')
->andWhere('o.promotionCoupon = :coupon')
->andWhere('o.state NOT IN (:states)')
->setParameter('customer', $customer)
->setParameter('coupon', $coupon)
->setParameter('states', [OrderInterface::STATE_CART, OrderInterface::STATE_CANCELLED])
->getQuery()
->getSingleScalarResult()
;
}
/**
* {@inheritdoc}
*/
public function countByCustomer(CustomerInterface $customer): int
{
return (int) $this->createQueryBuilder('o')
->select('COUNT(o.id)')
->andWhere('o.customer = :customer')
->andWhere('o.state NOT IN (:states)')
->setParameter('customer', $customer)
->setParameter('states', [OrderInterface::STATE_CART, OrderInterface::STATE_CANCELLED])
->getQuery()
->getSingleScalarResult()
;
}
/**
* {@inheritdoc}
*/
public function findOneByNumberAndCustomer(string $number, CustomerInterface $customer): ?OrderInterface
{
return $this->createQueryBuilder('o')
->andWhere('o.customer = :customer')
->andWhere('o.number = :number')
->setParameter('customer', $customer)
->setParameter('number', $number)
->getQuery()
->getOneOrNullResult()
;
}
/**
* {@inheritdoc}
*/
public function findCartByChannel($id, ChannelInterface $channel): ?OrderInterface
{
return $this->createQueryBuilder('o')
->andWhere('o.id = :id')
->andWhere('o.state = :state')
->andWhere('o.channel = :channel')
->setParameter('id', $id)
->setParameter('state', OrderInterface::STATE_CART)
->setParameter('channel', $channel)
->getQuery()
->getOneOrNullResult()
;
}
/**
* {@inheritdoc}
*/
public function findLatestCartByChannelAndCustomer(ChannelInterface $channel, CustomerInterface $customer): ?OrderInterface
{
return $this->createQueryBuilder('o')
->andWhere('o.state = :state')
->andWhere('o.channel = :channel')
->andWhere('o.customer = :customer')
->setParameter('state', OrderInterface::STATE_CART)
->setParameter('channel', $channel)
->setParameter('customer', $customer)
->addOrderBy('o.createdAt', 'DESC')
->setMaxResults(1)
->getQuery()
->getOneOrNullResult()
;
}
/**
* {@inheritdoc}
*/
public function getTotalSalesForChannel(ChannelInterface $channel): int
{
return (int) $this->createQueryBuilder('o')
->select('SUM(o.total)')
->andWhere('o.channel = :channel')
->andWhere('o.state = :state')
->setParameter('channel', $channel)
->setParameter('state', OrderInterface::STATE_FULFILLED)
->getQuery()
->getSingleScalarResult()
;
}
/**
* {@inheritdoc}
*/
public function countFulfilledByChannel(ChannelInterface $channel): int
{
return (int) $this->createQueryBuilder('o')
->select('COUNT(o.id)')
->andWhere('o.channel = :channel')
->andWhere('o.state = :state')
->setParameter('channel', $channel)
->setParameter('state', OrderInterface::STATE_FULFILLED)
->getQuery()
->getSingleScalarResult()
;
}
/**
* {@inheritdoc}
*/
public function findLatestInChannel(int $count, ChannelInterface $channel): array
{
return $this->createQueryBuilder('o')
->andWhere('o.channel = :channel')
->andWhere('o.state != :state')
->addOrderBy('o.checkoutCompletedAt', 'DESC')
->setParameter('channel', $channel)
->setParameter('state', OrderInterface::STATE_CART)
->setMaxResults($count)
->getQuery()
->getResult()
;
}
/**
* {@inheritdoc}
*/
public function findOrdersUnpaidSince(\DateTimeInterface $terminalDate): array
{
return $this->createQueryBuilder('o')
->where('o.checkoutState = :checkoutState')
->andWhere('o.paymentState != :paymentState')
->andWhere('o.state = :orderState')
->andWhere('o.checkoutCompletedAt < :terminalDate')
->setParameter('checkoutState', OrderCheckoutStates::STATE_COMPLETED)
->setParameter('paymentState', OrderPaymentStates::STATE_PAID)
->setParameter('orderState', OrderInterface::STATE_NEW)
->setParameter('terminalDate', $terminalDate)
->getQuery()
->getResult()
;
}
/**
* {@inheritdoc}
*/
public function findCartForSummary($id): ?OrderInterface
{
/** @var OrderInterface $order */
$order = $this->createQueryBuilder('o')
->andWhere('o.id = :id')
->andWhere('o.state = :state')
->setParameter('id', $id)
->setParameter('state', OrderInterface::STATE_CART)
->getQuery()
->getOneOrNullResult()
;
$this->associationHydrator->hydrateAssociations($order, [
'adjustments',
'items',
'items.adjustments',
'items.units',
'items.units.adjustments',
'items.variant',
'items.variant.optionValues',
'items.variant.optionValues.translations',
'items.variant.product',
'items.variant.product.translations',
'items.variant.product.images',
'items.variant.product.options',
'items.variant.product.options.translations',
]);
return $order;
}
/**
* {@inheritdoc}
*/
public function findCartForAddressing($id): ?OrderInterface
{
/** @var OrderInterface $order */
$order = $this->createQueryBuilder('o')
->andWhere('o.id = :id')
->andWhere('o.state = :state')
->setParameter('id', $id)
->setParameter('state', OrderInterface::STATE_CART)
->getQuery()
->getOneOrNullResult()
;
$this->associationHydrator->hydrateAssociations($order, [
'items',
'items.variant',
'items.variant.product',
'items.variant.product.translations',
]);
return $order;
}
/**
* {@inheritdoc}
*/
public function findCartForSelectingShipping($id): ?OrderInterface
{
/** @var OrderInterface $order */
$order = $this->createQueryBuilder('o')
->andWhere('o.id = :id')
->andWhere('o.state = :state')
->setParameter('id', $id)
->setParameter('state', OrderInterface::STATE_CART)
->getQuery()
->getOneOrNullResult()
;
$this->associationHydrator->hydrateAssociations($order, [
'items',
'items.variant',
'items.variant.product',
'items.variant.product.translations',
]);
return $order;
}
/**
* {@inheritdoc}
*/
public function findCartForSelectingPayment($id): ?OrderInterface
{
/** @var OrderInterface $order */
$order = $this->createQueryBuilder('o')
->andWhere('o.id = :id')
->andWhere('o.state = :state')
->setParameter('id', $id)
->setParameter('state', OrderInterface::STATE_CART)
->getQuery()
->getOneOrNullResult()
;
$this->associationHydrator->hydrateAssociations($order, [
'items',
'items.variant',
'items.variant.product',
'items.variant.product.translations',
]);
return $order;
}
}
| Pitoune/Sylius | src/Sylius/Bundle/CoreBundle/Doctrine/ORM/OrderRepository.php | PHP | mit | 12,225 | [
30522,
1026,
1029,
25718,
1013,
1008,
1008,
2023,
5371,
2003,
2112,
1997,
1996,
25353,
15513,
7427,
1012,
1008,
1008,
1006,
1039,
1007,
22195,
2063,
18818,
24401,
15378,
20518,
7974,
5488,
1008,
1008,
2005,
1996,
2440,
9385,
1998,
6105,
259... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package me.yingrui.segment.util
import org.junit.Assert
import org.junit.Test
class WordUtilTest {
@Test
def should_return_1_if_input_is_a_numerical_string() {
Assert.assertEquals(1, WordUtil.isNumerical("123"))
}
@Test
def should_return_2_if_input_is_not_a_numerical_string() {
Assert.assertEquals(2, WordUtil.isNumerical("abc123"))
}
}
| yingrui/mahjong | lib-segment/src/test/scala/me/yingrui/segment/util/WordUtilTest.scala | Scala | gpl-3.0 | 361 | [
30522,
7427,
2033,
1012,
20879,
6820,
2072,
1012,
6903,
1012,
21183,
4014,
12324,
8917,
1012,
12022,
4183,
1012,
20865,
12324,
8917,
1012,
12022,
4183,
1012,
3231,
2465,
2773,
21823,
7096,
4355,
1063,
1030,
3231,
13366,
2323,
1035,
2709,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="de">
<head>
<!-- Generated by javadoc (1.8.0_66) on Sat Apr 09 18:10:35 CEST 2016 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>org.semtix.shared.textbausteine (Semtix App 2.3 API)</title>
<meta name="date" content="2016-04-09">
<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="org.semtix.shared.textbausteine (Semtix App 2.3 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 class="navBarCell1Rev">Package</li>
<li>Class</li>
<li><a href="package-use.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>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/semtix/shared/tablemodels/package-summary.html">Prev Package</a></li>
<li>Next Package</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/semtix/shared/textbausteine/package-summary.html" target="_top">Frames</a></li>
<li><a href="package-summary.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="Package" class="title">Package org.semtix.shared.textbausteine</h1>
</div>
<div class="contentContainer">
<ul class="blockList">
<li class="blockList">
<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation">
<caption><span>Class Summary</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="../../../../org/semtix/shared/textbausteine/DialogNachfragebriefe.html" title="class in org.semtix.shared.textbausteine">DialogNachfragebriefe</a></td>
<td class="colLast">
<div class="block">Dialog zur Anzeige und Bearbeitung der Textbausteine für Nachfragebriefe.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../org/semtix/shared/textbausteine/DialogTextbaustein.html" title="class in org.semtix.shared.textbausteine">DialogTextbaustein</a></td>
<td class="colLast">
<div class="block">Dialog zum Neuanlegen oder Ändern der Textbausteine, die im DialogNachfragebriefe angezeigt werden.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../org/semtix/shared/textbausteine/DialogUnterlagen.html" title="class in org.semtix.shared.textbausteine">DialogUnterlagen</a></td>
<td class="colLast">
<div class="block">Dialog zum Anzeigen, Erstellen und Ändern von fehlenden Unterlagen</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../org/semtix/shared/textbausteine/TreeModelNachfragebriefe.html" title="class in org.semtix.shared.textbausteine">TreeModelNachfragebriefe</a></td>
<td class="colLast">
<div class="block">TreeModel enthält Daten der Textbausteine für Nachfragebriefe.</div>
</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 class="navBarCell1Rev">Package</li>
<li>Class</li>
<li><a href="package-use.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>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/semtix/shared/tablemodels/package-summary.html">Prev Package</a></li>
<li>Next Package</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/semtix/shared/textbausteine/package-summary.html" target="_top">Frames</a></li>
<li><a href="package-summary.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 ======= -->
<p class="legalCopy"><small>Copyright © 2016. All rights reserved.</small></p>
</body>
</html>
| techorix/semtix | doc/org/semtix/shared/textbausteine/package-summary.html | HTML | agpl-3.0 | 6,094 | [
30522,
1026,
999,
9986,
13874,
16129,
2270,
1000,
1011,
1013,
1013,
1059,
2509,
2278,
1013,
1013,
26718,
2094,
16129,
1018,
1012,
5890,
17459,
1013,
1013,
4372,
1000,
1000,
8299,
1024,
1013,
1013,
7479,
1012,
1059,
2509,
1012,
8917,
1013,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
To Do:
Fix Reverse Driving
Make only one side fire (right)
*/
/* Copyright (c) 2014, 2015 Qualcomm Technologies Inc
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted (subject to the limitations in the disclaimer below) 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 Qualcomm Technologies Inc nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS
LICENSE. 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 COPYRIGHT OWNER OR CONTRIBUTORS 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. */
package org.firstinspires.ftc.teamcode;
import com.qualcomm.robotcore.eventloop.opmode.*;
import com.qualcomm.robotcore.util.ElapsedTime;
import com.qualcomm.robotcore.hardware.*;
//red turns left
//blue turns right
/*
To Do;
Double gears on shooter
Rotate Block and Top Part of Beacon Pusher 90 degrees. The servo end position is currently level
with the end of the robot instead of sideways
*/
import java.text.SimpleDateFormat;
import java.util.Date;
import static android.os.SystemClock.sleep;
/**
* Registers OpCode and Initializes Variables
*/
@com.qualcomm.robotcore.eventloop.opmode.Autonomous(name = "Autonomous α", group = "FTC772")
public class Autonomous extends LinearOpMode {
private ElapsedTime runtime = new ElapsedTime();
private DcMotor frontLeft, frontRight, intake, dispenserLeft, dispenserRight, liftLeft, liftRight, midtake;
private Servo dispenser, beaconAngleLeft, beaconAngleRight, forkliftLeft, forkliftRight;
private boolean drivingForward = true;
//private boolean init = false;
//private final double DISPENSER_POWER = 1;
private double BEACON_LEFT_IN;
private double BEACON_RIGHT_IN;
private final int INITIAL_FORWARD = 1000;
private final int RAMP_UP = 1000;
private final int TURN_ONE = 300;
private final int FORWARD_TWO = 500;
private final int TURN_TWO = 300;
private final int FORWARD_THREE = 300;
private final int COLOR_CORRECTION = 50;
private final int FORWARD_FOUR = 400;
private final int TURN_THREE = 500;
private final int FORWARD_FIVE = 500;
private final boolean isRed = true;
private boolean didColorCorrection = false;
private boolean wasChangingAngle = false;
private ColorSensor colorSensor;
private TouchSensor leftTouchSensor, rightTouchSensor;
// @Override
// public void init() {
// /*
// Initialize DcMotors
// */
// frontLeft = hardwareMap.dcMotor.get("frontLeft");
// frontRight = hardwareMap.dcMotor.get("frontRight");
//
// //intake = hardwareMap.dcMotor.get("intake");
// dispenserLeft = hardwareMap.dcMotor.get("dispenserLeft");
// dispenserRight = hardwareMap.dcMotor.get("dispenserRight");
//
// /*
// Initialize Servos
// */
// dispenserAngle = hardwareMap.servo.get("dispenserAngle");
// beaconAngle = hardwareMap.servo.get("beaconAngle");
//
//
// /*
// Initialize Sensors
// */
// colorSensor = hardwareMap.colorSensor.get("colorSensor");
// leftTouchSensor = hardwareMap.touchSensor.get("leftTouchSensor");
// rightTouchSensor = hardwareMap.touchSensor.get("rightTouchSensor");
//
// //Display completion message
// telemetry.addData("Status", "Initialized");
// }
/*
* Code to run when the op mode is first enabled goes here
* @see com.qualcomm.robotcore.eventloop.opmode.OpMode#start()
@Override
public void init_loop() {
}*/
/*
* This method will be called ONCE when start is pressed
* @see com.qualcomm.robotcore.eventloop.opmode.OpMode#loop()
*/
/*
public void start() {
/*
Initialize all motors/servos to position
*/
//runtime.reset();
//dispenserAngle.setPosition(DEFAULT_ANGLE);
// }
/*
* This method will be called repeatedly in a loop
* @see com.qualcomm.robotcore.eventloop.opmode.OpMode#loop()
*/
@Override
public void runOpMode() throws InterruptedException {
frontLeft = hardwareMap.dcMotor.get("frontLeft");
frontRight = hardwareMap.dcMotor.get("frontRight");
intake = hardwareMap.dcMotor.get("intake");
midtake = hardwareMap.dcMotor.get("midtake");
dispenserLeft = hardwareMap.dcMotor.get("dispenserLeft");
dispenserRight = hardwareMap.dcMotor.get("dispenserRight");
dispenserLeft.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.FLOAT);
dispenserRight.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.FLOAT);
liftLeft = hardwareMap.dcMotor.get("liftLeft");
liftRight = hardwareMap.dcMotor.get("liftRight");
liftLeft.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
liftLeft.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);
liftRight.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);
liftRight.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);
/*
Initialize Servos
*/
dispenser = hardwareMap.servo.get("dispenser");
beaconAngleLeft = hardwareMap.servo.get("beaconAngleLeft");
beaconAngleRight = hardwareMap.servo.get("beaconAngleRight");
forkliftLeft = hardwareMap.servo.get("forkliftLeft");
forkliftRight = hardwareMap.servo.get("forkliftRight");
/*
Initialize Sensors
*/
//colorSensor = hardwareMap.colorSensor.get("colorSensor");
//leftTouchSensor = hardwareMap.touchSensor.get("leftTouchSensor");
//rightTouchSensor = hardwareMap.touchSensor.get("rightTouchSensor");
//Display completion message
telemetry.addData("Status", "Initialized");
/*
Steps to Autonomous:
Fire starting balls
Drive to beacon 1
Press beacon 1
Drive to beacon 2
Press beacon 2
Drive to center and park while knocking ball off
*/
frontLeft.setPower(1);
frontRight.setPower(-1);
sleep(INITIAL_FORWARD);
frontLeft.setPower(0);
frontRight.setPower(0);
dispenserLeft.setPower(1);
dispenserRight.setPower(1);
sleep(RAMP_UP);
intake.setPower(1);
midtake.setPower(1);
dispenser.setPosition(0);
sleep(500);
dispenser.setPosition(.45);
sleep(150);
dispenser.setPosition(0);
sleep(500);
dispenser.setPosition(.45);
intake.setPower(0);
midtake.setPower(0);
dispenserRight.setPower(0);
dispenserLeft.setPower(0);
if (isRed) {
frontLeft.setPower(1);
frontRight.setPower(1);
sleep(TURN_ONE);
frontRight.setPower(-1);
}
else {
frontLeft.setPower(-1);
frontRight.setPower(-1);
sleep(TURN_ONE);
frontLeft.setPower(1);
}
sleep(FORWARD_TWO);
if (!isRed) {
frontLeft.setPower(-1);
sleep(TURN_TWO);
frontLeft.setPower(1);
}
else {
frontRight.setPower(1);
sleep(TURN_TWO);
frontRight.setPower(-1);
}
sleep(FORWARD_THREE);
frontLeft.setPower(0);
frontRight.setPower(0);
if (!isRed) {
if (colorSensor.red()<colorSensor.blue()) {
beaconAngleRight.setPosition(Math.abs(.5-BEACON_RIGHT_IN));
}
else {
frontLeft.setPower(1);
frontRight.setPower(-1);
sleep(COLOR_CORRECTION);
didColorCorrection = true;
frontLeft.setPower(0);
frontRight.setPower(0);
beaconAngleRight.setPosition(Math.abs(.5-BEACON_RIGHT_IN));
}
}
else {
if (colorSensor.red()>colorSensor.blue()) {
beaconAngleLeft.setPosition(Math.abs(.5-BEACON_LEFT_IN));
}
else {
frontLeft.setPower(1);
frontRight.setPower(-1);
sleep(COLOR_CORRECTION);
didColorCorrection = true;
frontLeft.setPower(0);
frontRight.setPower(0);
beaconAngleLeft.setPosition(Math.abs(.5-BEACON_LEFT_IN));
}
}
frontLeft.setPower(1);
frontRight.setPower(-1);
if (didColorCorrection) {
sleep(FORWARD_FOUR-COLOR_CORRECTION);
}
else {
sleep(FORWARD_FOUR);
}
frontLeft.setPower(0);
frontRight.setPower(0);
if (!isRed) {
if (colorSensor.red()<colorSensor.blue()) {
beaconAngleRight.setPosition(Math.abs(.5-BEACON_RIGHT_IN));
}
else {
frontLeft.setPower(1);
frontRight.setPower(-1);
sleep(COLOR_CORRECTION);
frontLeft.setPower(0);
frontRight.setPower(0);
beaconAngleRight.setPosition(Math.abs(.5-BEACON_RIGHT_IN));
}
}
else {
if (colorSensor.red()>colorSensor.blue()) {
beaconAngleLeft.setPosition(Math.abs(.5-BEACON_LEFT_IN));
}
else {
frontLeft.setPower(1);
frontRight.setPower(-1);
sleep(COLOR_CORRECTION);
frontLeft.setPower(0);
frontRight.setPower(0);
beaconAngleLeft.setPosition(Math.abs(.5-BEACON_LEFT_IN));
}
}
frontLeft.setPower(1);
frontRight.setPower(1);
sleep(TURN_THREE);
frontRight.setPower(-1);
sleep(FORWARD_FIVE);
telemetry.addData("Status", "Run Time: " + runtime.toString());
/*
This section is the short version of the autonomous for in case the other part doesn't work.
It drives straight forward and knocks the cap ball off in the center.
*/
sleep(10000);
frontLeft.setPower(1);
frontRight.setPower(-1);
sleep(4000);
frontRight.setPower(0);
frontLeft.setPower(0);
sleep(10000);
}
}
| NeonRD1/FTC772 | ftc_app-master/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Autonomous.java | Java | gpl-3.0 | 11,732 | [
30522,
1013,
1008,
2000,
2079,
1024,
8081,
7901,
4439,
2191,
2069,
30524,
2035,
2916,
9235,
1012,
25707,
1998,
2224,
1999,
3120,
1998,
12441,
3596,
1010,
2007,
2030,
2302,
14080,
1010,
2024,
7936,
1006,
3395,
2000,
1996,
12546,
1999,
1996,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
#!/usr/bin/python
"feed fetcher"
from db import MySQLDatabase
from fetcher import FeedFetcher
def main():
db = MySQLDatabase()
fetcher = FeedFetcher()
feeds = db.get_feeds(offset=0, limit=10)
read_count = 10
while len(feeds) > 0:
for feed in feeds:
fid = feed[0]
url = feed[1]
title = feed[2]
print "fetching #{0}: {1}".format(fid, url)
entries = fetcher.fetch(url)
for entry in entries:
entry.feed_id = fid
try:
print "insert {0}".format(entry.url)
except UnicodeEncodeError:
print "insert {0}".format(entry.url.encode('utf-8'))
db.append_feed_content(entry)
feeds = db.get_feeds(offset=read_count, limit=10)
read_count += 10
if __name__ == '__main__':
main()
| hylom/grrreader | backend/feedfetcher.py | Python | gpl-2.0 | 889 | [
30522,
1001,
999,
1013,
2149,
2099,
1013,
8026,
1013,
18750,
1000,
5438,
18584,
2121,
1000,
2013,
16962,
12324,
2026,
2015,
4160,
15150,
2696,
15058,
2013,
18584,
2121,
12324,
5438,
7959,
10649,
2121,
13366,
2364,
1006,
1007,
1024,
16962,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<a href="../index.html" target="_top">Inspections</a> <a HREF="e28.html" target="_blank">Open source</a><hr> <font style="font-family:verdana; font-weight:bold; color:#005555; size = 3">Name:</font><br> <b>info.py</b><br><br> <font style="font-family:verdana; font-weight:bold; color:#005555; size = 3">Location:</font><br> <font style="font-family:verdana;">file <a HREF="e28.html">info.py</a></font><br><br> <font style="font-family:verdana; font-weight:bold; color:#005555; size = 3">Problem synopsis:</font><ul><li>Triple double-quoted strings should be used for docstrings. (at line 97</a>)<br><br></li><li>Triple double-quoted strings should be used for docstrings. (at line 97</a>)<br><br></li></ul><table cellpadding="0" border="0" cellspacing="0"><tr><td> </td></tr></table> | TheArchives/Nexus | Inspection/PySingleQuotedDocstringInspection/e28.html | HTML | bsd-2-clause | 999 | [
30522,
1026,
1037,
17850,
12879,
1027,
1000,
1012,
1012,
1013,
5950,
1012,
16129,
1000,
4539,
1027,
1000,
1035,
2327,
1000,
1028,
29589,
1026,
1013,
1037,
1028,
1026,
1037,
17850,
12879,
1027,
1000,
1041,
22407,
1012,
16129,
1000,
4539,
102... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
require 'ostruct'
require 'forwardable'
require 'cf_script/object/attribute'
require 'cf_script/object/attribute_list'
require 'cf_script/object/api_endpoint'
require 'cf_script/object/app_info'
require 'cf_script/object/app_list'
require 'cf_script/object/instance_status'
require 'cf_script/object/space'
require 'cf_script/object/target'
require 'cf_script/object/route_info'
| ammar/cf_script | lib/cf_script/object.rb | Ruby | mit | 381 | [
30522,
5478,
1005,
9808,
18300,
1005,
5478,
1005,
2830,
3085,
1005,
5478,
1005,
12935,
1035,
5896,
1013,
4874,
1013,
17961,
1005,
5478,
1005,
12935,
1035,
5896,
1013,
4874,
1013,
17961,
1035,
2862,
1005,
5478,
1005,
12935,
1035,
5896,
1013,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package com.github.skrethel.simple.config.retrofit;
import com.github.skrethel.simple.config.retrofit.exception.GeneratorException;
import com.github.skrethel.simple.config.retrofit.exception.GetException;
import com.github.skrethel.simple.config.retrofit.exception.WriteException;
import com.github.skrethel.simple.config.retrofit.io.ConfigSource;
import com.github.skrethel.simple.config.retrofit.io.SchemaWriter;
import com.github.skrethel.simple.config.retrofit.schema.ConfigSchema;
import com.github.skrethel.simple.config.retrofit.workers.Generator;
import org.ini4j.Ini;
import org.junit.Test;
import static com.github.skrethel.simple.config.retrofit.TestUtils.*;
import static org.junit.Assert.*;
public class SchemaGeneratorTest implements ConfigSource, SchemaWriter {
private Ini inputConfig;
private ConfigSchema outputSchema;
@Test(expected = GeneratorException.class)
public void testEmptySchema() throws Exception {
inputConfig = new Ini();
Generator generator = new Generator();
generator.generate(this, this);
}
@Test
public void testSchemaGeneration() throws Exception {
inputConfig = new Ini();
String group1 = "group1";
String name1 = "name1";
String value1 = "value1";
String comment1 = "comment1";
addIniItem(inputConfig, group1, name1, value1, comment1);
String group2 = "group2";
String name2 = "name2";
String value2 = "value2";
String comment2 = "comment2";
addIniItem(inputConfig, group2, name2, value2, comment2);
String group3 = "group3";
String name3 = "name3";
String value3 = "value3";
addIniItem(inputConfig, group3, name3, value3, null);
Generator generator = new Generator();
generator.generate(this, this);
assertTrue(outputSchema.contains(group1, name1));
assertTrue(outputSchema.contains(group2, name2));
assertTrue(outputSchema.contains(group3, name3));
assertEquals(comment1, outputSchema.get(group1, name1).getDescription());
assertEquals(comment2, outputSchema.get(group2, name2).getDescription());
assertNull(outputSchema.get(group3, name3).getDescription());
}
@Override public Ini getConfig() throws GetException {
return inputConfig;
}
@Override public void write(ConfigSchema configSchema) throws WriteException {
outputSchema = configSchema;
}
} | Skrethel/simple-config-retrofit | src/test/java/com/github/skrethel/simple/config/retrofit/SchemaGeneratorTest.java | Java | mit | 2,275 | [
30522,
7427,
4012,
1012,
21025,
2705,
12083,
1012,
15315,
13465,
16001,
1012,
3722,
1012,
9530,
8873,
2290,
1012,
22307,
8873,
2102,
1025,
12324,
4012,
1012,
21025,
2705,
12083,
1012,
15315,
13465,
16001,
1012,
3722,
1012,
9530,
8873,
2290,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* SGI UV MMR definitions
*
* Copyright (C) 2007-2008 Silicon Graphics, Inc. All rights reserved.
*/
#ifndef _ASM_IA64_UV_UV_MMRS_H
#define _ASM_IA64_UV_UV_MMRS_H
#define UV_MMR_ENABLE (1UL << 63)
/* ========================================================================= */
/* UVH_BAU_DATA_CONFIG */
/* ========================================================================= */
#define UVH_BAU_DATA_CONFIG 0x61680UL
#define UVH_BAU_DATA_CONFIG_32 0x0438
#define UVH_BAU_DATA_CONFIG_VECTOR_SHFT 0
#define UVH_BAU_DATA_CONFIG_VECTOR_MASK 0x00000000000000ffUL
#define UVH_BAU_DATA_CONFIG_DM_SHFT 8
#define UVH_BAU_DATA_CONFIG_DM_MASK 0x0000000000000700UL
#define UVH_BAU_DATA_CONFIG_DESTMODE_SHFT 11
#define UVH_BAU_DATA_CONFIG_DESTMODE_MASK 0x0000000000000800UL
#define UVH_BAU_DATA_CONFIG_STATUS_SHFT 12
#define UVH_BAU_DATA_CONFIG_STATUS_MASK 0x0000000000001000UL
#define UVH_BAU_DATA_CONFIG_P_SHFT 13
#define UVH_BAU_DATA_CONFIG_P_MASK 0x0000000000002000UL
#define UVH_BAU_DATA_CONFIG_T_SHFT 15
#define UVH_BAU_DATA_CONFIG_T_MASK 0x0000000000008000UL
#define UVH_BAU_DATA_CONFIG_M_SHFT 16
#define UVH_BAU_DATA_CONFIG_M_MASK 0x0000000000010000UL
#define UVH_BAU_DATA_CONFIG_APIC_ID_SHFT 32
#define UVH_BAU_DATA_CONFIG_APIC_ID_MASK 0xffffffff00000000UL
union uvh_bau_data_config_u
{
unsigned long v;
struct uvh_bau_data_config_s
{
unsigned long vector_ : 8; /* RW */
unsigned long dm : 3; /* RW */
unsigned long destmode : 1; /* RW */
unsigned long status : 1; /* RO */
unsigned long p : 1; /* RO */
unsigned long rsvd_14 : 1; /* */
unsigned long t : 1; /* RO */
unsigned long m : 1; /* RW */
unsigned long rsvd_17_31: 15; /* */
unsigned long apic_id : 32; /* RW */
} s;
};
/* ========================================================================= */
/* UVH_EVENT_OCCURRED0 */
/* ========================================================================= */
#define UVH_EVENT_OCCURRED0 0x70000UL
#define UVH_EVENT_OCCURRED0_32 0x005e8
#define UVH_EVENT_OCCURRED0_LB_HCERR_SHFT 0
#define UVH_EVENT_OCCURRED0_LB_HCERR_MASK 0x0000000000000001UL
#define UVH_EVENT_OCCURRED0_GR0_HCERR_SHFT 1
#define UVH_EVENT_OCCURRED0_GR0_HCERR_MASK 0x0000000000000002UL
#define UVH_EVENT_OCCURRED0_GR1_HCERR_SHFT 2
#define UVH_EVENT_OCCURRED0_GR1_HCERR_MASK 0x0000000000000004UL
#define UVH_EVENT_OCCURRED0_LH_HCERR_SHFT 3
#define UVH_EVENT_OCCURRED0_LH_HCERR_MASK 0x0000000000000008UL
#define UVH_EVENT_OCCURRED0_RH_HCERR_SHFT 4
#define UVH_EVENT_OCCURRED0_RH_HCERR_MASK 0x0000000000000010UL
#define UVH_EVENT_OCCURRED0_XN_HCERR_SHFT 5
#define UVH_EVENT_OCCURRED0_XN_HCERR_MASK 0x0000000000000020UL
#define UVH_EVENT_OCCURRED0_SI_HCERR_SHFT 6
#define UVH_EVENT_OCCURRED0_SI_HCERR_MASK 0x0000000000000040UL
#define UVH_EVENT_OCCURRED0_LB_AOERR0_SHFT 7
#define UVH_EVENT_OCCURRED0_LB_AOERR0_MASK 0x0000000000000080UL
#define UVH_EVENT_OCCURRED0_GR0_AOERR0_SHFT 8
#define UVH_EVENT_OCCURRED0_GR0_AOERR0_MASK 0x0000000000000100UL
#define UVH_EVENT_OCCURRED0_GR1_AOERR0_SHFT 9
#define UVH_EVENT_OCCURRED0_GR1_AOERR0_MASK 0x0000000000000200UL
#define UVH_EVENT_OCCURRED0_LH_AOERR0_SHFT 10
#define UVH_EVENT_OCCURRED0_LH_AOERR0_MASK 0x0000000000000400UL
#define UVH_EVENT_OCCURRED0_RH_AOERR0_SHFT 11
#define UVH_EVENT_OCCURRED0_RH_AOERR0_MASK 0x0000000000000800UL
#define UVH_EVENT_OCCURRED0_XN_AOERR0_SHFT 12
#define UVH_EVENT_OCCURRED0_XN_AOERR0_MASK 0x0000000000001000UL
#define UVH_EVENT_OCCURRED0_SI_AOERR0_SHFT 13
#define UVH_EVENT_OCCURRED0_SI_AOERR0_MASK 0x0000000000002000UL
#define UVH_EVENT_OCCURRED0_LB_AOERR1_SHFT 14
#define UVH_EVENT_OCCURRED0_LB_AOERR1_MASK 0x0000000000004000UL
#define UVH_EVENT_OCCURRED0_GR0_AOERR1_SHFT 15
#define UVH_EVENT_OCCURRED0_GR0_AOERR1_MASK 0x0000000000008000UL
#define UVH_EVENT_OCCURRED0_GR1_AOERR1_SHFT 16
#define UVH_EVENT_OCCURRED0_GR1_AOERR1_MASK 0x0000000000010000UL
#define UVH_EVENT_OCCURRED0_LH_AOERR1_SHFT 17
#define UVH_EVENT_OCCURRED0_LH_AOERR1_MASK 0x0000000000020000UL
#define UVH_EVENT_OCCURRED0_RH_AOERR1_SHFT 18
#define UVH_EVENT_OCCURRED0_RH_AOERR1_MASK 0x0000000000040000UL
#define UVH_EVENT_OCCURRED0_XN_AOERR1_SHFT 19
#define UVH_EVENT_OCCURRED0_XN_AOERR1_MASK 0x0000000000080000UL
#define UVH_EVENT_OCCURRED0_SI_AOERR1_SHFT 20
#define UVH_EVENT_OCCURRED0_SI_AOERR1_MASK 0x0000000000100000UL
#define UVH_EVENT_OCCURRED0_RH_VPI_INT_SHFT 21
#define UVH_EVENT_OCCURRED0_RH_VPI_INT_MASK 0x0000000000200000UL
#define UVH_EVENT_OCCURRED0_SYSTEM_SHUTDOWN_INT_SHFT 22
#define UVH_EVENT_OCCURRED0_SYSTEM_SHUTDOWN_INT_MASK 0x0000000000400000UL
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_0_SHFT 23
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_0_MASK 0x0000000000800000UL
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_1_SHFT 24
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_1_MASK 0x0000000001000000UL
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_2_SHFT 25
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_2_MASK 0x0000000002000000UL
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_3_SHFT 26
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_3_MASK 0x0000000004000000UL
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_4_SHFT 27
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_4_MASK 0x0000000008000000UL
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_5_SHFT 28
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_5_MASK 0x0000000010000000UL
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_6_SHFT 29
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_6_MASK 0x0000000020000000UL
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_7_SHFT 30
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_7_MASK 0x0000000040000000UL
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_8_SHFT 31
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_8_MASK 0x0000000080000000UL
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_9_SHFT 32
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_9_MASK 0x0000000100000000UL
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_10_SHFT 33
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_10_MASK 0x0000000200000000UL
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_11_SHFT 34
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_11_MASK 0x0000000400000000UL
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_12_SHFT 35
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_12_MASK 0x0000000800000000UL
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_13_SHFT 36
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_13_MASK 0x0000001000000000UL
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_14_SHFT 37
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_14_MASK 0x0000002000000000UL
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_15_SHFT 38
#define UVH_EVENT_OCCURRED0_LB_IRQ_INT_15_MASK 0x0000004000000000UL
#define UVH_EVENT_OCCURRED0_L1_NMI_INT_SHFT 39
#define UVH_EVENT_OCCURRED0_L1_NMI_INT_MASK 0x0000008000000000UL
#define UVH_EVENT_OCCURRED0_STOP_CLOCK_SHFT 40
#define UVH_EVENT_OCCURRED0_STOP_CLOCK_MASK 0x0000010000000000UL
#define UVH_EVENT_OCCURRED0_ASIC_TO_L1_SHFT 41
#define UVH_EVENT_OCCURRED0_ASIC_TO_L1_MASK 0x0000020000000000UL
#define UVH_EVENT_OCCURRED0_L1_TO_ASIC_SHFT 42
#define UVH_EVENT_OCCURRED0_L1_TO_ASIC_MASK 0x0000040000000000UL
#define UVH_EVENT_OCCURRED0_LTC_INT_SHFT 43
#define UVH_EVENT_OCCURRED0_LTC_INT_MASK 0x0000080000000000UL
#define UVH_EVENT_OCCURRED0_LA_SEQ_TRIGGER_SHFT 44
#define UVH_EVENT_OCCURRED0_LA_SEQ_TRIGGER_MASK 0x0000100000000000UL
#define UVH_EVENT_OCCURRED0_IPI_INT_SHFT 45
#define UVH_EVENT_OCCURRED0_IPI_INT_MASK 0x0000200000000000UL
#define UVH_EVENT_OCCURRED0_EXTIO_INT0_SHFT 46
#define UVH_EVENT_OCCURRED0_EXTIO_INT0_MASK 0x0000400000000000UL
#define UVH_EVENT_OCCURRED0_EXTIO_INT1_SHFT 47
#define UVH_EVENT_OCCURRED0_EXTIO_INT1_MASK 0x0000800000000000UL
#define UVH_EVENT_OCCURRED0_EXTIO_INT2_SHFT 48
#define UVH_EVENT_OCCURRED0_EXTIO_INT2_MASK 0x0001000000000000UL
#define UVH_EVENT_OCCURRED0_EXTIO_INT3_SHFT 49
#define UVH_EVENT_OCCURRED0_EXTIO_INT3_MASK 0x0002000000000000UL
#define UVH_EVENT_OCCURRED0_PROFILE_INT_SHFT 50
#define UVH_EVENT_OCCURRED0_PROFILE_INT_MASK 0x0004000000000000UL
#define UVH_EVENT_OCCURRED0_RTC0_SHFT 51
#define UVH_EVENT_OCCURRED0_RTC0_MASK 0x0008000000000000UL
#define UVH_EVENT_OCCURRED0_RTC1_SHFT 52
#define UVH_EVENT_OCCURRED0_RTC1_MASK 0x0010000000000000UL
#define UVH_EVENT_OCCURRED0_RTC2_SHFT 53
#define UVH_EVENT_OCCURRED0_RTC2_MASK 0x0020000000000000UL
#define UVH_EVENT_OCCURRED0_RTC3_SHFT 54
#define UVH_EVENT_OCCURRED0_RTC3_MASK 0x0040000000000000UL
#define UVH_EVENT_OCCURRED0_BAU_DATA_SHFT 55
#define UVH_EVENT_OCCURRED0_BAU_DATA_MASK 0x0080000000000000UL
#define UVH_EVENT_OCCURRED0_POWER_MANAGEMENT_REQ_SHFT 56
#define UVH_EVENT_OCCURRED0_POWER_MANAGEMENT_REQ_MASK 0x0100000000000000UL
union uvh_event_occurred0_u
{
unsigned long v;
struct uvh_event_occurred0_s
{
unsigned long lb_hcerr : 1; /* RW, W1C */
unsigned long gr0_hcerr : 1; /* RW, W1C */
unsigned long gr1_hcerr : 1; /* RW, W1C */
unsigned long lh_hcerr : 1; /* RW, W1C */
unsigned long rh_hcerr : 1; /* RW, W1C */
unsigned long xn_hcerr : 1; /* RW, W1C */
unsigned long si_hcerr : 1; /* RW, W1C */
unsigned long lb_aoerr0 : 1; /* RW, W1C */
unsigned long gr0_aoerr0 : 1; /* RW, W1C */
unsigned long gr1_aoerr0 : 1; /* RW, W1C */
unsigned long lh_aoerr0 : 1; /* RW, W1C */
unsigned long rh_aoerr0 : 1; /* RW, W1C */
unsigned long xn_aoerr0 : 1; /* RW, W1C */
unsigned long si_aoerr0 : 1; /* RW, W1C */
unsigned long lb_aoerr1 : 1; /* RW, W1C */
unsigned long gr0_aoerr1 : 1; /* RW, W1C */
unsigned long gr1_aoerr1 : 1; /* RW, W1C */
unsigned long lh_aoerr1 : 1; /* RW, W1C */
unsigned long rh_aoerr1 : 1; /* RW, W1C */
unsigned long xn_aoerr1 : 1; /* RW, W1C */
unsigned long si_aoerr1 : 1; /* RW, W1C */
unsigned long rh_vpi_int : 1; /* RW, W1C */
unsigned long system_shutdown_int : 1; /* RW, W1C */
unsigned long lb_irq_int_0 : 1; /* RW, W1C */
unsigned long lb_irq_int_1 : 1; /* RW, W1C */
unsigned long lb_irq_int_2 : 1; /* RW, W1C */
unsigned long lb_irq_int_3 : 1; /* RW, W1C */
unsigned long lb_irq_int_4 : 1; /* RW, W1C */
unsigned long lb_irq_int_5 : 1; /* RW, W1C */
unsigned long lb_irq_int_6 : 1; /* RW, W1C */
unsigned long lb_irq_int_7 : 1; /* RW, W1C */
unsigned long lb_irq_int_8 : 1; /* RW, W1C */
unsigned long lb_irq_int_9 : 1; /* RW, W1C */
unsigned long lb_irq_int_10 : 1; /* RW, W1C */
unsigned long lb_irq_int_11 : 1; /* RW, W1C */
unsigned long lb_irq_int_12 : 1; /* RW, W1C */
unsigned long lb_irq_int_13 : 1; /* RW, W1C */
unsigned long lb_irq_int_14 : 1; /* RW, W1C */
unsigned long lb_irq_int_15 : 1; /* RW, W1C */
unsigned long l1_nmi_int : 1; /* RW, W1C */
unsigned long stop_clock : 1; /* RW, W1C */
unsigned long asic_to_l1 : 1; /* RW, W1C */
unsigned long l1_to_asic : 1; /* RW, W1C */
unsigned long ltc_int : 1; /* RW, W1C */
unsigned long la_seq_trigger : 1; /* RW, W1C */
unsigned long ipi_int : 1; /* RW, W1C */
unsigned long extio_int0 : 1; /* RW, W1C */
unsigned long extio_int1 : 1; /* RW, W1C */
unsigned long extio_int2 : 1; /* RW, W1C */
unsigned long extio_int3 : 1; /* RW, W1C */
unsigned long profile_int : 1; /* RW, W1C */
unsigned long rtc0 : 1; /* RW, W1C */
unsigned long rtc1 : 1; /* RW, W1C */
unsigned long rtc2 : 1; /* RW, W1C */
unsigned long rtc3 : 1; /* RW, W1C */
unsigned long bau_data : 1; /* RW, W1C */
unsigned long power_management_req : 1; /* RW, W1C */
unsigned long rsvd_57_63 : 7; /* */
} s;
};
/* ========================================================================= */
/* UVH_EVENT_OCCURRED0_ALIAS */
/* ========================================================================= */
#define UVH_EVENT_OCCURRED0_ALIAS 0x0000000000070008UL
#define UVH_EVENT_OCCURRED0_ALIAS_32 0x005f0
/* ========================================================================= */
/* UVH_GR0_TLB_INT0_CONFIG */
/* ========================================================================= */
#define UVH_GR0_TLB_INT0_CONFIG 0x61b00UL
#define UVH_GR0_TLB_INT0_CONFIG_VECTOR_SHFT 0
#define UVH_GR0_TLB_INT0_CONFIG_VECTOR_MASK 0x00000000000000ffUL
#define UVH_GR0_TLB_INT0_CONFIG_DM_SHFT 8
#define UVH_GR0_TLB_INT0_CONFIG_DM_MASK 0x0000000000000700UL
#define UVH_GR0_TLB_INT0_CONFIG_DESTMODE_SHFT 11
#define UVH_GR0_TLB_INT0_CONFIG_DESTMODE_MASK 0x0000000000000800UL
#define UVH_GR0_TLB_INT0_CONFIG_STATUS_SHFT 12
#define UVH_GR0_TLB_INT0_CONFIG_STATUS_MASK 0x0000000000001000UL
#define UVH_GR0_TLB_INT0_CONFIG_P_SHFT 13
#define UVH_GR0_TLB_INT0_CONFIG_P_MASK 0x0000000000002000UL
#define UVH_GR0_TLB_INT0_CONFIG_T_SHFT 15
#define UVH_GR0_TLB_INT0_CONFIG_T_MASK 0x0000000000008000UL
#define UVH_GR0_TLB_INT0_CONFIG_M_SHFT 16
#define UVH_GR0_TLB_INT0_CONFIG_M_MASK 0x0000000000010000UL
#define UVH_GR0_TLB_INT0_CONFIG_APIC_ID_SHFT 32
#define UVH_GR0_TLB_INT0_CONFIG_APIC_ID_MASK 0xffffffff00000000UL
union uvh_gr0_tlb_int0_config_u
{
unsigned long v;
struct uvh_gr0_tlb_int0_config_s
{
unsigned long vector_ : 8; /* RW */
unsigned long dm : 3; /* RW */
unsigned long destmode : 1; /* RW */
unsigned long status : 1; /* RO */
unsigned long p : 1; /* RO */
unsigned long rsvd_14 : 1; /* */
unsigned long t : 1; /* RO */
unsigned long m : 1; /* RW */
unsigned long rsvd_17_31: 15; /* */
unsigned long apic_id : 32; /* RW */
} s;
};
/* ========================================================================= */
/* UVH_GR0_TLB_INT1_CONFIG */
/* ========================================================================= */
#define UVH_GR0_TLB_INT1_CONFIG 0x61b40UL
#define UVH_GR0_TLB_INT1_CONFIG_VECTOR_SHFT 0
#define UVH_GR0_TLB_INT1_CONFIG_VECTOR_MASK 0x00000000000000ffUL
#define UVH_GR0_TLB_INT1_CONFIG_DM_SHFT 8
#define UVH_GR0_TLB_INT1_CONFIG_DM_MASK 0x0000000000000700UL
#define UVH_GR0_TLB_INT1_CONFIG_DESTMODE_SHFT 11
#define UVH_GR0_TLB_INT1_CONFIG_DESTMODE_MASK 0x0000000000000800UL
#define UVH_GR0_TLB_INT1_CONFIG_STATUS_SHFT 12
#define UVH_GR0_TLB_INT1_CONFIG_STATUS_MASK 0x0000000000001000UL
#define UVH_GR0_TLB_INT1_CONFIG_P_SHFT 13
#define UVH_GR0_TLB_INT1_CONFIG_P_MASK 0x0000000000002000UL
#define UVH_GR0_TLB_INT1_CONFIG_T_SHFT 15
#define UVH_GR0_TLB_INT1_CONFIG_T_MASK 0x0000000000008000UL
#define UVH_GR0_TLB_INT1_CONFIG_M_SHFT 16
#define UVH_GR0_TLB_INT1_CONFIG_M_MASK 0x0000000000010000UL
#define UVH_GR0_TLB_INT1_CONFIG_APIC_ID_SHFT 32
#define UVH_GR0_TLB_INT1_CONFIG_APIC_ID_MASK 0xffffffff00000000UL
union uvh_gr0_tlb_int1_config_u
{
unsigned long v;
struct uvh_gr0_tlb_int1_config_s
{
unsigned long vector_ : 8; /* RW */
unsigned long dm : 3; /* RW */
unsigned long destmode : 1; /* RW */
unsigned long status : 1; /* RO */
unsigned long p : 1; /* RO */
unsigned long rsvd_14 : 1; /* */
unsigned long t : 1; /* RO */
unsigned long m : 1; /* RW */
unsigned long rsvd_17_31: 15; /* */
unsigned long apic_id : 32; /* RW */
} s;
};
/* ========================================================================= */
/* UVH_GR1_TLB_INT0_CONFIG */
/* ========================================================================= */
#define UVH_GR1_TLB_INT0_CONFIG 0x61f00UL
#define UVH_GR1_TLB_INT0_CONFIG_VECTOR_SHFT 0
#define UVH_GR1_TLB_INT0_CONFIG_VECTOR_MASK 0x00000000000000ffUL
#define UVH_GR1_TLB_INT0_CONFIG_DM_SHFT 8
#define UVH_GR1_TLB_INT0_CONFIG_DM_MASK 0x0000000000000700UL
#define UVH_GR1_TLB_INT0_CONFIG_DESTMODE_SHFT 11
#define UVH_GR1_TLB_INT0_CONFIG_DESTMODE_MASK 0x0000000000000800UL
#define UVH_GR1_TLB_INT0_CONFIG_STATUS_SHFT 12
#define UVH_GR1_TLB_INT0_CONFIG_STATUS_MASK 0x0000000000001000UL
#define UVH_GR1_TLB_INT0_CONFIG_P_SHFT 13
#define UVH_GR1_TLB_INT0_CONFIG_P_MASK 0x0000000000002000UL
#define UVH_GR1_TLB_INT0_CONFIG_T_SHFT 15
#define UVH_GR1_TLB_INT0_CONFIG_T_MASK 0x0000000000008000UL
#define UVH_GR1_TLB_INT0_CONFIG_M_SHFT 16
#define UVH_GR1_TLB_INT0_CONFIG_M_MASK 0x0000000000010000UL
#define UVH_GR1_TLB_INT0_CONFIG_APIC_ID_SHFT 32
#define UVH_GR1_TLB_INT0_CONFIG_APIC_ID_MASK 0xffffffff00000000UL
union uvh_gr1_tlb_int0_config_u
{
unsigned long v;
struct uvh_gr1_tlb_int0_config_s
{
unsigned long vector_ : 8; /* RW */
unsigned long dm : 3; /* RW */
unsigned long destmode : 1; /* RW */
unsigned long status : 1; /* RO */
unsigned long p : 1; /* RO */
unsigned long rsvd_14 : 1; /* */
unsigned long t : 1; /* RO */
unsigned long m : 1; /* RW */
unsigned long rsvd_17_31: 15; /* */
unsigned long apic_id : 32; /* RW */
} s;
};
/* ========================================================================= */
/* UVH_GR1_TLB_INT1_CONFIG */
/* ========================================================================= */
#define UVH_GR1_TLB_INT1_CONFIG 0x61f40UL
#define UVH_GR1_TLB_INT1_CONFIG_VECTOR_SHFT 0
#define UVH_GR1_TLB_INT1_CONFIG_VECTOR_MASK 0x00000000000000ffUL
#define UVH_GR1_TLB_INT1_CONFIG_DM_SHFT 8
#define UVH_GR1_TLB_INT1_CONFIG_DM_MASK 0x0000000000000700UL
#define UVH_GR1_TLB_INT1_CONFIG_DESTMODE_SHFT 11
#define UVH_GR1_TLB_INT1_CONFIG_DESTMODE_MASK 0x0000000000000800UL
#define UVH_GR1_TLB_INT1_CONFIG_STATUS_SHFT 12
#define UVH_GR1_TLB_INT1_CONFIG_STATUS_MASK 0x0000000000001000UL
#define UVH_GR1_TLB_INT1_CONFIG_P_SHFT 13
#define UVH_GR1_TLB_INT1_CONFIG_P_MASK 0x0000000000002000UL
#define UVH_GR1_TLB_INT1_CONFIG_T_SHFT 15
#define UVH_GR1_TLB_INT1_CONFIG_T_MASK 0x0000000000008000UL
#define UVH_GR1_TLB_INT1_CONFIG_M_SHFT 16
#define UVH_GR1_TLB_INT1_CONFIG_M_MASK 0x0000000000010000UL
#define UVH_GR1_TLB_INT1_CONFIG_APIC_ID_SHFT 32
#define UVH_GR1_TLB_INT1_CONFIG_APIC_ID_MASK 0xffffffff00000000UL
union uvh_gr1_tlb_int1_config_u
{
unsigned long v;
struct uvh_gr1_tlb_int1_config_s
{
unsigned long vector_ : 8; /* RW */
unsigned long dm : 3; /* RW */
unsigned long destmode : 1; /* RW */
unsigned long status : 1; /* RO */
unsigned long p : 1; /* RO */
unsigned long rsvd_14 : 1; /* */
unsigned long t : 1; /* RO */
unsigned long m : 1; /* RW */
unsigned long rsvd_17_31: 15; /* */
unsigned long apic_id : 32; /* RW */
} s;
};
/* ========================================================================= */
/* UVH_INT_CMPB */
/* ========================================================================= */
#define UVH_INT_CMPB 0x22080UL
#define UVH_INT_CMPB_REAL_TIME_CMPB_SHFT 0
#define UVH_INT_CMPB_REAL_TIME_CMPB_MASK 0x00ffffffffffffffUL
union uvh_int_cmpb_u
{
unsigned long v;
struct uvh_int_cmpb_s
{
unsigned long real_time_cmpb : 56; /* RW */
unsigned long rsvd_56_63 : 8; /* */
} s;
};
/* ========================================================================= */
/* UVH_INT_CMPC */
/* ========================================================================= */
#define UVH_INT_CMPC 0x22100UL
#define UVH_INT_CMPC_REAL_TIME_CMPC_SHFT 0
#define UVH_INT_CMPC_REAL_TIME_CMPC_MASK 0x00ffffffffffffffUL
union uvh_int_cmpc_u
{
unsigned long v;
struct uvh_int_cmpc_s
{
unsigned long real_time_cmpc : 56; /* RW */
unsigned long rsvd_56_63 : 8; /* */
} s;
};
/* ========================================================================= */
/* UVH_INT_CMPD */
/* ========================================================================= */
#define UVH_INT_CMPD 0x22180UL
#define UVH_INT_CMPD_REAL_TIME_CMPD_SHFT 0
#define UVH_INT_CMPD_REAL_TIME_CMPD_MASK 0x00ffffffffffffffUL
union uvh_int_cmpd_u
{
unsigned long v;
struct uvh_int_cmpd_s
{
unsigned long real_time_cmpd : 56; /* RW */
unsigned long rsvd_56_63 : 8; /* */
} s;
};
/* ========================================================================= */
/* UVH_NODE_ID */
/* ========================================================================= */
#define UVH_NODE_ID 0x0UL
#define UVH_NODE_ID_FORCE1_SHFT 0
#define UVH_NODE_ID_FORCE1_MASK 0x0000000000000001UL
#define UVH_NODE_ID_MANUFACTURER_SHFT 1
#define UVH_NODE_ID_MANUFACTURER_MASK 0x0000000000000ffeUL
#define UVH_NODE_ID_PART_NUMBER_SHFT 12
#define UVH_NODE_ID_PART_NUMBER_MASK 0x000000000ffff000UL
#define UVH_NODE_ID_REVISION_SHFT 28
#define UVH_NODE_ID_REVISION_MASK 0x00000000f0000000UL
#define UVH_NODE_ID_NODE_ID_SHFT 32
#define UVH_NODE_ID_NODE_ID_MASK 0x00007fff00000000UL
#define UVH_NODE_ID_NODES_PER_BIT_SHFT 48
#define UVH_NODE_ID_NODES_PER_BIT_MASK 0x007f000000000000UL
#define UVH_NODE_ID_NI_PORT_SHFT 56
#define UVH_NODE_ID_NI_PORT_MASK 0x0f00000000000000UL
union uvh_node_id_u
{
unsigned long v;
struct uvh_node_id_s
{
unsigned long force1 : 1; /* RO */
unsigned long manufacturer : 11; /* RO */
unsigned long part_number : 16; /* RO */
unsigned long revision : 4; /* RO */
unsigned long node_id : 15; /* RW */
unsigned long rsvd_47 : 1; /* */
unsigned long nodes_per_bit : 7; /* RW */
unsigned long rsvd_55 : 1; /* */
unsigned long ni_port : 4; /* RO */
unsigned long rsvd_60_63 : 4; /* */
} s;
};
/* ========================================================================= */
/* UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_0_MMR */
/* ========================================================================= */
#define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_0_MMR 0x16000d0UL
#define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_0_MMR_DEST_BASE_SHFT 24
#define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_0_MMR_DEST_BASE_MASK 0x00003fffff000000UL
union uvh_rh_gam_alias210_redirect_config_0_mmr_u
{
unsigned long v;
struct uvh_rh_gam_alias210_redirect_config_0_mmr_s
{
unsigned long rsvd_0_23 : 24; /* */
unsigned long dest_base : 22; /* RW */
unsigned long rsvd_46_63: 18; /* */
} s;
};
/* ========================================================================= */
/* UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_1_MMR */
/* ========================================================================= */
#define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_1_MMR 0x16000e0UL
#define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_1_MMR_DEST_BASE_SHFT 24
#define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_1_MMR_DEST_BASE_MASK 0x00003fffff000000UL
union uvh_rh_gam_alias210_redirect_config_1_mmr_u
{
unsigned long v;
struct uvh_rh_gam_alias210_redirect_config_1_mmr_s
{
unsigned long rsvd_0_23 : 24; /* */
unsigned long dest_base : 22; /* RW */
unsigned long rsvd_46_63: 18; /* */
} s;
};
/* ========================================================================= */
/* UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_2_MMR */
/* ========================================================================= */
#define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_2_MMR 0x16000f0UL
#define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_2_MMR_DEST_BASE_SHFT 24
#define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_2_MMR_DEST_BASE_MASK 0x00003fffff000000UL
union uvh_rh_gam_alias210_redirect_config_2_mmr_u
{
unsigned long v;
struct uvh_rh_gam_alias210_redirect_config_2_mmr_s
{
unsigned long rsvd_0_23 : 24; /* */
unsigned long dest_base : 22; /* RW */
unsigned long rsvd_46_63: 18; /* */
} s;
};
/* ========================================================================= */
/* UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR */
/* ========================================================================= */
#define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR 0x1600010UL
#define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_BASE_SHFT 28
#define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_BASE_MASK 0x00003ffff0000000UL
#define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_GR4_SHFT 48
#define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_GR4_MASK 0x0001000000000000UL
#define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_N_GRU_SHFT 52
#define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_N_GRU_MASK 0x00f0000000000000UL
#define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_ENABLE_SHFT 63
#define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_ENABLE_MASK 0x8000000000000000UL
union uvh_rh_gam_gru_overlay_config_mmr_u
{
unsigned long v;
struct uvh_rh_gam_gru_overlay_config_mmr_s
{
unsigned long rsvd_0_27: 28; /* */
unsigned long base : 18; /* RW */
unsigned long rsvd_46_47: 2; /* */
unsigned long gr4 : 1; /* RW */
unsigned long rsvd_49_51: 3; /* */
unsigned long n_gru : 4; /* RW */
unsigned long rsvd_56_62: 7; /* */
unsigned long enable : 1; /* RW */
} s;
};
/* ========================================================================= */
/* UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR */
/* ========================================================================= */
#define UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR 0x1600028UL
#define UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR_BASE_SHFT 26
#define UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR_BASE_MASK 0x00003ffffc000000UL
#define UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR_DUAL_HUB_SHFT 46
#define UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR_DUAL_HUB_MASK 0x0000400000000000UL
#define UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR_ENABLE_SHFT 63
#define UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR_ENABLE_MASK 0x8000000000000000UL
union uvh_rh_gam_mmr_overlay_config_mmr_u
{
unsigned long v;
struct uvh_rh_gam_mmr_overlay_config_mmr_s
{
unsigned long rsvd_0_25: 26; /* */
unsigned long base : 20; /* RW */
unsigned long dual_hub : 1; /* RW */
unsigned long rsvd_47_62: 16; /* */
unsigned long enable : 1; /* RW */
} s;
};
/* ========================================================================= */
/* UVH_RTC */
/* ========================================================================= */
#define UVH_RTC 0x340000UL
#define UVH_RTC_REAL_TIME_CLOCK_SHFT 0
#define UVH_RTC_REAL_TIME_CLOCK_MASK 0x00ffffffffffffffUL
union uvh_rtc_u
{
unsigned long v;
struct uvh_rtc_s
{
unsigned long real_time_clock : 56; /* RW */
unsigned long rsvd_56_63 : 8; /* */
} s;
};
/* ========================================================================= */
/* UVH_RTC1_INT_CONFIG */
/* ========================================================================= */
#define UVH_RTC1_INT_CONFIG 0x615c0UL
#define UVH_RTC1_INT_CONFIG_VECTOR_SHFT 0
#define UVH_RTC1_INT_CONFIG_VECTOR_MASK 0x00000000000000ffUL
#define UVH_RTC1_INT_CONFIG_DM_SHFT 8
#define UVH_RTC1_INT_CONFIG_DM_MASK 0x0000000000000700UL
#define UVH_RTC1_INT_CONFIG_DESTMODE_SHFT 11
#define UVH_RTC1_INT_CONFIG_DESTMODE_MASK 0x0000000000000800UL
#define UVH_RTC1_INT_CONFIG_STATUS_SHFT 12
#define UVH_RTC1_INT_CONFIG_STATUS_MASK 0x0000000000001000UL
#define UVH_RTC1_INT_CONFIG_P_SHFT 13
#define UVH_RTC1_INT_CONFIG_P_MASK 0x0000000000002000UL
#define UVH_RTC1_INT_CONFIG_T_SHFT 15
#define UVH_RTC1_INT_CONFIG_T_MASK 0x0000000000008000UL
#define UVH_RTC1_INT_CONFIG_M_SHFT 16
#define UVH_RTC1_INT_CONFIG_M_MASK 0x0000000000010000UL
#define UVH_RTC1_INT_CONFIG_APIC_ID_SHFT 32
#define UVH_RTC1_INT_CONFIG_APIC_ID_MASK 0xffffffff00000000UL
union uvh_rtc1_int_config_u
{
unsigned long v;
struct uvh_rtc1_int_config_s
{
unsigned long vector_ : 8; /* RW */
unsigned long dm : 3; /* RW */
unsigned long destmode : 1; /* RW */
unsigned long status : 1; /* RO */
unsigned long p : 1; /* RO */
unsigned long rsvd_14 : 1; /* */
unsigned long t : 1; /* RO */
unsigned long m : 1; /* RW */
unsigned long rsvd_17_31: 15; /* */
unsigned long apic_id : 32; /* RW */
} s;
};
/* ========================================================================= */
/* UVH_RTC2_INT_CONFIG */
/* ========================================================================= */
#define UVH_RTC2_INT_CONFIG 0x61600UL
#define UVH_RTC2_INT_CONFIG_VECTOR_SHFT 0
#define UVH_RTC2_INT_CONFIG_VECTOR_MASK 0x00000000000000ffUL
#define UVH_RTC2_INT_CONFIG_DM_SHFT 8
#define UVH_RTC2_INT_CONFIG_DM_MASK 0x0000000000000700UL
#define UVH_RTC2_INT_CONFIG_DESTMODE_SHFT 11
#define UVH_RTC2_INT_CONFIG_DESTMODE_MASK 0x0000000000000800UL
#define UVH_RTC2_INT_CONFIG_STATUS_SHFT 12
#define UVH_RTC2_INT_CONFIG_STATUS_MASK 0x0000000000001000UL
#define UVH_RTC2_INT_CONFIG_P_SHFT 13
#define UVH_RTC2_INT_CONFIG_P_MASK 0x0000000000002000UL
#define UVH_RTC2_INT_CONFIG_T_SHFT 15
#define UVH_RTC2_INT_CONFIG_T_MASK 0x0000000000008000UL
#define UVH_RTC2_INT_CONFIG_M_SHFT 16
#define UVH_RTC2_INT_CONFIG_M_MASK 0x0000000000010000UL
#define UVH_RTC2_INT_CONFIG_APIC_ID_SHFT 32
#define UVH_RTC2_INT_CONFIG_APIC_ID_MASK 0xffffffff00000000UL
union uvh_rtc2_int_config_u
{
unsigned long v;
struct uvh_rtc2_int_config_s
{
unsigned long vector_ : 8; /* RW */
unsigned long dm : 3; /* RW */
unsigned long destmode : 1; /* RW */
unsigned long status : 1; /* RO */
unsigned long p : 1; /* RO */
unsigned long rsvd_14 : 1; /* */
unsigned long t : 1; /* RO */
unsigned long m : 1; /* RW */
unsigned long rsvd_17_31: 15; /* */
unsigned long apic_id : 32; /* RW */
} s;
};
/* ========================================================================= */
/* UVH_RTC3_INT_CONFIG */
/* ========================================================================= */
#define UVH_RTC3_INT_CONFIG 0x61640UL
#define UVH_RTC3_INT_CONFIG_VECTOR_SHFT 0
#define UVH_RTC3_INT_CONFIG_VECTOR_MASK 0x00000000000000ffUL
#define UVH_RTC3_INT_CONFIG_DM_SHFT 8
#define UVH_RTC3_INT_CONFIG_DM_MASK 0x0000000000000700UL
#define UVH_RTC3_INT_CONFIG_DESTMODE_SHFT 11
#define UVH_RTC3_INT_CONFIG_DESTMODE_MASK 0x0000000000000800UL
#define UVH_RTC3_INT_CONFIG_STATUS_SHFT 12
#define UVH_RTC3_INT_CONFIG_STATUS_MASK 0x0000000000001000UL
#define UVH_RTC3_INT_CONFIG_P_SHFT 13
#define UVH_RTC3_INT_CONFIG_P_MASK 0x0000000000002000UL
#define UVH_RTC3_INT_CONFIG_T_SHFT 15
#define UVH_RTC3_INT_CONFIG_T_MASK 0x0000000000008000UL
#define UVH_RTC3_INT_CONFIG_M_SHFT 16
#define UVH_RTC3_INT_CONFIG_M_MASK 0x0000000000010000UL
#define UVH_RTC3_INT_CONFIG_APIC_ID_SHFT 32
#define UVH_RTC3_INT_CONFIG_APIC_ID_MASK 0xffffffff00000000UL
union uvh_rtc3_int_config_u
{
unsigned long v;
struct uvh_rtc3_int_config_s
{
unsigned long vector_ : 8; /* RW */
unsigned long dm : 3; /* RW */
unsigned long destmode : 1; /* RW */
unsigned long status : 1; /* RO */
unsigned long p : 1; /* RO */
unsigned long rsvd_14 : 1; /* */
unsigned long t : 1; /* RO */
unsigned long m : 1; /* RW */
unsigned long rsvd_17_31: 15; /* */
unsigned long apic_id : 32; /* RW */
} s;
};
/* ========================================================================= */
/* UVH_RTC_INC_RATIO */
/* ========================================================================= */
#define UVH_RTC_INC_RATIO 0x350000UL
#define UVH_RTC_INC_RATIO_FRACTION_SHFT 0
#define UVH_RTC_INC_RATIO_FRACTION_MASK 0x00000000000fffffUL
#define UVH_RTC_INC_RATIO_RATIO_SHFT 20
#define UVH_RTC_INC_RATIO_RATIO_MASK 0x0000000000700000UL
union uvh_rtc_inc_ratio_u
{
unsigned long v;
struct uvh_rtc_inc_ratio_s
{
unsigned long fraction : 20; /* RW */
unsigned long ratio : 3; /* RW */
unsigned long rsvd_23_63: 41; /* */
} s;
};
/* ========================================================================= */
/* UVH_SI_ADDR_MAP_CONFIG */
/* ========================================================================= */
#define UVH_SI_ADDR_MAP_CONFIG 0xc80000UL
#define UVH_SI_ADDR_MAP_CONFIG_M_SKT_SHFT 0
#define UVH_SI_ADDR_MAP_CONFIG_M_SKT_MASK 0x000000000000003fUL
#define UVH_SI_ADDR_MAP_CONFIG_N_SKT_SHFT 8
#define UVH_SI_ADDR_MAP_CONFIG_N_SKT_MASK 0x0000000000000f00UL
union uvh_si_addr_map_config_u
{
unsigned long v;
struct uvh_si_addr_map_config_s
{
unsigned long m_skt : 6; /* RW */
unsigned long rsvd_6_7: 2; /* */
unsigned long n_skt : 4; /* RW */
unsigned long rsvd_12_63: 52; /* */
} s;
};
/* ========================================================================= */
/* UVH_SI_ALIAS0_OVERLAY_CONFIG */
/* ========================================================================= */
#define UVH_SI_ALIAS0_OVERLAY_CONFIG 0xc80008UL
#define UVH_SI_ALIAS0_OVERLAY_CONFIG_BASE_SHFT 24
#define UVH_SI_ALIAS0_OVERLAY_CONFIG_BASE_MASK 0x00000000ff000000UL
#define UVH_SI_ALIAS0_OVERLAY_CONFIG_M_ALIAS_SHFT 48
#define UVH_SI_ALIAS0_OVERLAY_CONFIG_M_ALIAS_MASK 0x001f000000000000UL
#define UVH_SI_ALIAS0_OVERLAY_CONFIG_ENABLE_SHFT 63
#define UVH_SI_ALIAS0_OVERLAY_CONFIG_ENABLE_MASK 0x8000000000000000UL
union uvh_si_alias0_overlay_config_u
{
unsigned long v;
struct uvh_si_alias0_overlay_config_s
{
unsigned long rsvd_0_23: 24; /* */
unsigned long base : 8; /* RW */
unsigned long rsvd_32_47: 16; /* */
unsigned long m_alias : 5; /* RW */
unsigned long rsvd_53_62: 10; /* */
unsigned long enable : 1; /* RW */
} s;
};
/* ========================================================================= */
/* UVH_SI_ALIAS1_OVERLAY_CONFIG */
/* ========================================================================= */
#define UVH_SI_ALIAS1_OVERLAY_CONFIG 0xc80010UL
#define UVH_SI_ALIAS1_OVERLAY_CONFIG_BASE_SHFT 24
#define UVH_SI_ALIAS1_OVERLAY_CONFIG_BASE_MASK 0x00000000ff000000UL
#define UVH_SI_ALIAS1_OVERLAY_CONFIG_M_ALIAS_SHFT 48
#define UVH_SI_ALIAS1_OVERLAY_CONFIG_M_ALIAS_MASK 0x001f000000000000UL
#define UVH_SI_ALIAS1_OVERLAY_CONFIG_ENABLE_SHFT 63
#define UVH_SI_ALIAS1_OVERLAY_CONFIG_ENABLE_MASK 0x8000000000000000UL
union uvh_si_alias1_overlay_config_u
{
unsigned long v;
struct uvh_si_alias1_overlay_config_s
{
unsigned long rsvd_0_23: 24; /* */
unsigned long base : 8; /* RW */
unsigned long rsvd_32_47: 16; /* */
unsigned long m_alias : 5; /* RW */
unsigned long rsvd_53_62: 10; /* */
unsigned long enable : 1; /* RW */
} s;
};
/* ========================================================================= */
/* UVH_SI_ALIAS2_OVERLAY_CONFIG */
/* ========================================================================= */
#define UVH_SI_ALIAS2_OVERLAY_CONFIG 0xc80018UL
#define UVH_SI_ALIAS2_OVERLAY_CONFIG_BASE_SHFT 24
#define UVH_SI_ALIAS2_OVERLAY_CONFIG_BASE_MASK 0x00000000ff000000UL
#define UVH_SI_ALIAS2_OVERLAY_CONFIG_M_ALIAS_SHFT 48
#define UVH_SI_ALIAS2_OVERLAY_CONFIG_M_ALIAS_MASK 0x001f000000000000UL
#define UVH_SI_ALIAS2_OVERLAY_CONFIG_ENABLE_SHFT 63
#define UVH_SI_ALIAS2_OVERLAY_CONFIG_ENABLE_MASK 0x8000000000000000UL
union uvh_si_alias2_overlay_config_u
{
unsigned long v;
struct uvh_si_alias2_overlay_config_s
{
unsigned long rsvd_0_23: 24; /* */
unsigned long base : 8; /* RW */
unsigned long rsvd_32_47: 16; /* */
unsigned long m_alias : 5; /* RW */
unsigned long rsvd_53_62: 10; /* */
unsigned long enable : 1; /* RW */
} s;
};
#endif /* _ASM_IA64_UV_UV_MMRS_H */
| williamfdevine/PrettyLinux | arch/ia64/include/asm/uv/uv_mmrs.h | C | gpl-3.0 | 36,434 | [
30522,
1013,
1008,
1008,
2023,
5371,
2003,
3395,
2000,
1996,
3408,
1998,
3785,
1997,
1996,
27004,
2236,
2270,
1008,
30524,
1008,
1013,
1001,
2065,
13629,
2546,
1035,
2004,
2213,
1035,
24264,
21084,
1035,
23068,
1035,
23068,
1035,
3461,
2869... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="pt">
<head>
<!-- Generated by javadoc (1.8.0_102) on Mon May 01 18:30:53 BRT 2017 -->
<title>o3smeasures.popup.actions Class Hierarchy</title>
<meta name="date" content="2017-05-01">
<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="o3smeasures.popup.actions 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><a href="../../../o3smeasures/plugin/views/package-tree.html">Prev</a></li>
<li><a href="../../../o3smeasures/preferences/package-tree.html">Next</a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?o3smeasures/popup/actions/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 o3smeasures.popup.actions</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">org.eclipse.core.commands.common.EventManager
<ul>
<li type="circle">org.eclipse.core.commands.AbstractHandler (implements org.eclipse.core.commands.IHandler2)
<ul>
<li type="circle">o3smeasures.popup.actions.<a href="../../../o3smeasures/popup/actions/Measurement.html" title="class in o3smeasures.popup.actions"><span class="typeNameLink">Measurement</span></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</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><a href="../../../o3smeasures/plugin/views/package-tree.html">Prev</a></li>
<li><a href="../../../o3smeasures/preferences/package-tree.html">Next</a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?o3smeasures/popup/actions/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>
| mariazevedo88/o3smeasures-tool | doc/o3smeasures/popup/actions/package-tree.html | HTML | gpl-3.0 | 4,789 | [
30522,
1026,
999,
9986,
13874,
16129,
2270,
1000,
1011,
1013,
1013,
1059,
2509,
2278,
1013,
1013,
26718,
2094,
16129,
1018,
1012,
5890,
17459,
1013,
30524,
16129,
2549,
1013,
6065,
1012,
26718,
2094,
1000,
1028,
1026,
999,
1011,
1011,
2047,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
require_once __DIR__.'/Base.php';
use Subscriber\ProjectModificationDateSubscriber;
use Model\Project;
use Model\ProjectPermission;
use Model\User;
use Model\Task;
use Model\TaskCreation;
use Model\Acl;
use Model\Board;
use Model\Config;
use Model\Category;
class ProjectTest extends Base
{
public function testCreation()
{
$p = new Project($this->container);
$this->assertEquals(1, $p->create(array('name' => 'UnitTest')));
$project = $p->getById(1);
$this->assertNotEmpty($project);
$this->assertEquals(1, $project['is_active']);
$this->assertEquals(0, $project['is_public']);
$this->assertEquals(0, $project['is_private']);
$this->assertEquals(time(), $project['last_modified']);
$this->assertEmpty($project['token']);
}
public function testCreationWithDefaultCategories()
{
$p = new Project($this->container);
$c = new Config($this->container);
$cat = new Category($this->container);
// Multiple categories correctly formatted
$this->assertTrue($c->save(array('project_categories' => 'Test1, Test2')));
$this->assertEquals(1, $p->create(array('name' => 'UnitTest1')));
$project = $p->getById(1);
$this->assertNotEmpty($project);
$categories = $cat->getAll(1);
$this->assertNotEmpty($categories);
$this->assertEquals(2, count($categories));
$this->assertEquals('Test1', $categories[0]['name']);
$this->assertEquals('Test2', $categories[1]['name']);
// Single category
$this->assertTrue($c->save(array('project_categories' => 'Test1')));
$this->assertEquals(2, $p->create(array('name' => 'UnitTest2')));
$project = $p->getById(2);
$this->assertNotEmpty($project);
$categories = $cat->getAll(2);
$this->assertNotEmpty($categories);
$this->assertEquals(1, count($categories));
$this->assertEquals('Test1', $categories[0]['name']);
// Multiple categories badly formatted
$this->assertTrue($c->save(array('project_categories' => 'ABC, , DEF 3, ')));
$this->assertEquals(3, $p->create(array('name' => 'UnitTest3')));
$project = $p->getById(3);
$this->assertNotEmpty($project);
$categories = $cat->getAll(3);
$this->assertNotEmpty($categories);
$this->assertEquals(2, count($categories));
$this->assertEquals('ABC', $categories[0]['name']);
$this->assertEquals('DEF 3', $categories[1]['name']);
// No default categories
$this->assertTrue($c->save(array('project_categories' => ' ')));
$this->assertEquals(4, $p->create(array('name' => 'UnitTest4')));
$project = $p->getById(4);
$this->assertNotEmpty($project);
$categories = $cat->getAll(4);
$this->assertEmpty($categories);
}
public function testUpdateLastModifiedDate()
{
$p = new Project($this->container);
$this->assertEquals(1, $p->create(array('name' => 'UnitTest')));
$now = time();
$project = $p->getById(1);
$this->assertNotEmpty($project);
$this->assertEquals($now, $project['last_modified'], 'Wrong Timestamp', 1);
sleep(1);
$this->assertTrue($p->updateModificationDate(1));
$project = $p->getById(1);
$this->assertNotEmpty($project);
$this->assertGreaterThan($now, $project['last_modified']);
}
public function testIsLastModified()
{
$p = new Project($this->container);
$tc = new TaskCreation($this->container);
$now = time();
$this->assertEquals(1, $p->create(array('name' => 'UnitTest')));
$project = $p->getById(1);
$this->assertNotEmpty($project);
$this->assertEquals($now, $project['last_modified']);
sleep(1);
$listener = new ProjectModificationDateSubscriber($this->container);
$this->container['dispatcher']->addListener(Task::EVENT_CREATE_UPDATE, array($listener, 'execute'));
$this->assertEquals(1, $tc->create(array('title' => 'Task #1', 'project_id' => 1)));
$called = $this->container['dispatcher']->getCalledListeners();
$this->assertArrayHasKey(Task::EVENT_CREATE_UPDATE.'.Subscriber\ProjectModificationDateSubscriber::execute', $called);
$project = $p->getById(1);
$this->assertNotEmpty($project);
$this->assertTrue($p->isModifiedSince(1, $now));
}
public function testRemove()
{
$p = new Project($this->container);
$this->assertEquals(1, $p->create(array('name' => 'UnitTest')));
$this->assertTrue($p->remove(1));
$this->assertFalse($p->remove(1234));
}
public function testEnable()
{
$p = new Project($this->container);
$this->assertEquals(1, $p->create(array('name' => 'UnitTest')));
$this->assertTrue($p->disable(1));
$project = $p->getById(1);
$this->assertNotEmpty($project);
$this->assertEquals(0, $project['is_active']);
$this->assertFalse($p->disable(1111));
}
public function testDisable()
{
$p = new Project($this->container);
$this->assertEquals(1, $p->create(array('name' => 'UnitTest')));
$this->assertTrue($p->disable(1));
$this->assertTrue($p->enable(1));
$project = $p->getById(1);
$this->assertNotEmpty($project);
$this->assertEquals(1, $project['is_active']);
$this->assertFalse($p->enable(1234567));
}
public function testEnablePublicAccess()
{
$p = new Project($this->container);
$this->assertEquals(1, $p->create(array('name' => 'UnitTest')));
$this->assertTrue($p->enablePublicAccess(1));
$project = $p->getById(1);
$this->assertNotEmpty($project);
$this->assertEquals(1, $project['is_public']);
$this->assertNotEmpty($project['token']);
$this->assertFalse($p->enablePublicAccess(123));
}
public function testDisablePublicAccess()
{
$p = new Project($this->container);
$this->assertEquals(1, $p->create(array('name' => 'UnitTest')));
$this->assertTrue($p->enablePublicAccess(1));
$this->assertTrue($p->disablePublicAccess(1));
$project = $p->getById(1);
$this->assertNotEmpty($project);
$this->assertEquals(0, $project['is_public']);
$this->assertEmpty($project['token']);
$this->assertFalse($p->disablePublicAccess(123));
}
}
| 666/kanboard-redesign | tests/units/ProjectTest.php | PHP | agpl-3.0 | 6,581 | [
30522,
1026,
1029,
25718,
5478,
1035,
2320,
1035,
1035,
16101,
1035,
1035,
1012,
1005,
1013,
2918,
1012,
25718,
1005,
1025,
2224,
4942,
29234,
2099,
1032,
2622,
5302,
4305,
10803,
27122,
12083,
29234,
2099,
1025,
2224,
2944,
1032,
2622,
102... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
jsonp({"cep":"13272767","logradouro":"Rua Dezessete","bairro":"Samambaia","cidade":"Valinhos","uf":"SP","estado":"S\u00e3o Paulo"});
| lfreneda/cepdb | api/v1/13272767.jsonp.js | JavaScript | cc0-1.0 | 133 | [
30522,
1046,
3385,
2361,
1006,
1063,
1000,
8292,
2361,
1000,
1024,
1000,
14078,
2581,
22907,
2575,
2581,
1000,
1010,
1000,
8833,
12173,
8162,
2080,
1000,
1024,
1000,
21766,
2050,
2139,
11254,
13462,
2063,
1000,
1010,
1000,
21790,
18933,
100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package com.servinglynk.hmis.warehouse;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;
public class SyncPostgresProcessor extends Logging{
public static int batchSize = 1000;
private static Connection connection = null;
static final Logger logger = Logger.getLogger(SyncPostgresProcessor.class);
static Connection getConnection() throws SQLException {
if (connection == null) {
connection = DriverManager.getConnection(
"jdbc:postgresql://" + Properties.POSTGRESQL_DB_HOST + ":" + Properties.POSTGRESQL_DB_PORT + "/" + Properties.POSTGRESQL_DB_DATABASE,
Properties.POSTGRESQL_DB_USERNAME,
Properties.POSTGRESQL_DB_PASSWORD);
}
if (connection.isClosed()) {
throw new SQLException("connection could not initiated");
}
return connection;
}
public static Map<String,String> getColumnsForTable(String tableName, String schema) {
Map<String,String> columns = new HashMap<>();
ResultSet resultSet = null;
PreparedStatement statement = null;
Connection connection = null;
try{
connection = getConnection();
statement = connection.prepareStatement("select column_name,data_type from information_schema.columns where table_schema=? and table_name=?");
statement.setString(1, schema);
statement.setString(2, tableName);
resultSet = statement.executeQuery();
while (resultSet.next()){
columns.put(resultSet.getString("column_name"),resultSet.getString("data_type"));
}
}catch (Exception ex){
logger.error(" Error getting metadata for table "+tableName + "schema :"+schema);
}
return columns;
}
public static List<String> getAllTablesFromPostgres(String schemaName) throws Exception{
List<String> tables = new ArrayList<>();
ResultSet resultSet = null;
PreparedStatement statement = null;
Connection connection = null;
try{
connection = getConnection();
statement = connection.prepareStatement("SELECT table_name FROM information_schema.tables WHERE table_schema='"+schemaName+"'");
resultSet = statement.executeQuery();
while (resultSet.next()){
String tableName = resultSet.getString("table_name");
if(!StringUtils.equalsIgnoreCase(tableName, "question") && !StringUtils.equalsIgnoreCase(tableName, "hmis_type")) {
tables.add(tableName);
}
}
}catch (Exception ex){
throw ex;
}
return tables;
}
public static List<String> getAllProjectGroupCodes(Logger logger) {
ResultSet resultSet = null;
PreparedStatement statement = null;
Connection connection = null;
List<String> projectGroupCodes = new ArrayList<String>();
try {
connection = getConnection();
statement = connection.prepareStatement("SELECT distinct(project_group_code) FROM base.hmis_project_group where active=true");
resultSet = statement.executeQuery();
while (resultSet.next()) {
projectGroupCodes.add(resultSet.getString(1));
}
return projectGroupCodes;
} catch (SQLException e) {
// TODO Auto-generated catch block
logger.error(e);
} finally {
if (statement != null) {
try {
statement.close();
//connection.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
logger.error(e);
}
}
}
return null;
}
public static List<BulkUpload> getExportIDFromBulkUpload(int schemaYear, Logger logger) {
ResultSet resultSet = null;
PreparedStatement statement = null;
Connection connection = null;
List<BulkUpload> uploads = new ArrayList<BulkUpload>();
try {
connection = getConnection();
statement = connection.prepareStatement("SELECT export_id,project_group_code,id,year,status FROM base.bulk_upload WHERE year='"+ schemaYear +"'");
resultSet = statement.executeQuery();
int count = 0;
while (resultSet.next()) {
count++;
if (!validateBulkUploadId(resultSet)) {
continue;
}
Status status = Status.getEnum(resultSet.getString(5));
if (status == null) {
continue;
}
BulkUpload upload = new BulkUpload();
upload.setExportId(UUID.fromString(resultSet.getString(1)));
upload.setProjectGroupCode(resultSet.getString(2));
upload.setId(resultSet.getLong(3));
upload.setYear(resultSet.getLong(4));
upload.setStatus(status);
uploads.add(upload);
}
System.out.println(count);
return uploads;
} catch (SQLException e) {
// TODO Auto-generated catch block
logger.error(e);
} finally {
if (statement != null) {
try {
statement.close();
//connection.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
logger.error(e);
}
}
}
return null;
}
private static boolean validateBulkUploadId(ResultSet resultSet) throws SQLException {
boolean valid = true;
for (int i = 1; i < 6; i++) {
if (resultSet.getString(1) == null) {
valid = false;
break;
}
}
// TODO: if 'valid' is false set detailed error description
return valid;
}
public static void updateCreateFlag(String groupCode, VERSION version, Logger logger) {
PreparedStatement statement = null;
Connection connection = null;
try {
connection = getConnection();
switch (version) {
case V2017:
statement = connection.prepareStatement("UPDATE base.hmis_project_group SET tables_v2016_in_hbase=TRUE where project_group_code=?");
statement.setString(1, groupCode);
break;
case V2016:
statement = connection.prepareStatement("UPDATE base.hmis_project_group SET tables_v2016_in_hbase=TRUE where project_group_code=?");
statement.setString(1, groupCode);
break;
case V2015:
statement = connection.prepareStatement("UPDATE base.hmis_project_group SET tables_v2015_in_hbase=TRUE where project_group_code=?");
statement.setString(1, groupCode);
break;
case V2014:
statement = connection.prepareStatement("UPDATE base.hmis_project_group SET tables_v2014_in_hbase=TRUE where project_group_code=?");
statement.setString(1, groupCode);
break;
}
if(version != VERSION.V2017) {
int status = statement.executeUpdate();
}
} catch (SQLException ex) {
logger.error(ex);
} finally {
if (statement != null) {
try {
statement.close();
//connection.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
logger.error(e);
}
}
}
}
public static void updateSyncFlag(String tableName, UUID id, String schema, Logger logger) {
PreparedStatement statement = null;
Connection connection = null;
try {
connection = getConnection();
statement = connection.prepareStatement("UPDATE " + schema + "." + tableName + " SET date_updated=?, sync=?,active=? where export_id=?");
Timestamp currentTimestamp = getCUrrentTimestamp();
statement.setTimestamp(1, currentTimestamp);
statement.setBoolean(2, true);
statement.setBoolean(3, true);
statement.setObject(4, id);
int status = statement.executeUpdate();
} catch (SQLException e) {
// TODO Auto-generated catch block
logger.error(e);
} finally {
if (statement != null) {
try {
statement.close();
//connection.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
logger.error(e);
}
}
}
}
private static Timestamp getCUrrentTimestamp() {
Calendar calendar = Calendar.getInstance();
java.sql.Timestamp currentTimestamp = new java.sql.Timestamp(calendar.getTime().getTime());
return currentTimestamp;
}
public static void updateBulkUploadStatusToLive(Long id, Logger logger) {
PreparedStatement statement = null;
Connection connection = null;
try {
connection = getConnection();
statement = connection.prepareStatement("UPDATE base.bulk_upload SET date_updated=?, status=? where id =?");
Timestamp currentTimestamp = getCUrrentTimestamp();
statement.setTimestamp(1, currentTimestamp);
statement.setString(2, "LIVE");
statement.setLong(3, id);
int status = statement.executeUpdate();
} catch (SQLException e) {
// TODO Auto-generated catch block
logger.error(e);
} finally {
if (statement != null) {
try {
statement.close();
//connection.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
logger.error(e);
}
}
}
}
public static void hydrateSyncTable(String schemaName,String tableName,String status,String message,String projectGroupCode){
PreparedStatement statement = null;
Connection connection = null;
try{
connection = getConnection();
statement = connection.prepareStatement("insert into "+schemaName+".sync (sync_table,status,description,project_group_code,date_created,date_updated) values (?,?,?,?,?,?)");
statement.setString(1, tableName);
statement.setString(2,status);
statement.setString(3,message);
statement.setString(4,projectGroupCode);
statement.setTimestamp(5, getCUrrentTimestamp());
statement.setTimestamp(6, getCUrrentTimestamp());
statement.executeUpdate();
}catch (SQLException ex) {
logger.error(" Exception inserting sync table: "+ex.getMessage(), ex);
} finally {
try {
if (statement != null) {
statement.close();
}
} catch (SQLException ex) {
logger.error(" Exception inserting sync table: "+ex.getMessage(), ex);
}
}
}
public static void markRowsForDeletion(String fullTableName, String exportId, Logger logger) {
PreparedStatement statement = null;
Connection connection;
try {
connection = getConnection();
statement = connection.prepareStatement("UPDATE " + fullTableName + " SET deleted=TRUE where export_id =?");
statement.setObject(1, UUID.fromString(exportId));
int status = statement.executeUpdate();
} catch (SQLException e) {
// TODO Auto-generated catch block
logger.error(e);
} finally {
if (statement != null) {
try {
statement.close();
//connection.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
logger.error(e);
}
}
}
}
}
| servinglynk/hmis-lynk-open-source | sync-years/src/main/java/com/servinglynk/hmis/warehouse/SyncPostgresProcessor.java | Java | mpl-2.0 | 12,845 | [
30522,
7427,
4012,
1012,
3529,
9644,
2243,
1012,
20287,
2483,
1012,
9746,
1025,
12324,
9262,
1012,
29296,
1012,
4434,
1025,
12324,
9262,
1012,
29296,
1012,
4062,
24805,
4590,
1025,
12324,
9262,
1012,
29296,
1012,
4810,
9153,
18532,
4765,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, see https://github.com/spack/spack
# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License (as
# published by the Free Software Foundation) version 2.1, February 1999.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
# conditions of the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
class Sleef(CMakePackage):
"""SIMD Library for Evaluating Elementary Functions,
vectorized libm and DFT."""
homepage = "http://sleef.org"
url = "https://github.com/shibatch/sleef/archive/3.2.tar.gz"
version('3.2', '459215058f2c8d55cd2b644d56c8c4f0')
| krafczyk/spack | var/spack/repos/builtin/packages/sleef/package.py | Python | lgpl-2.1 | 1,534 | [
30522,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
1001,
100... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("placeholder","no",{title:"Egenskaper for plassholder",toolbar:"Opprett plassholder",name:"Navn på plassholder",invalidName:"Plassholderen kan ikke være tom, og kan ikke inneholde følgende tegn: [, ], <, >",pathName:"plassholder"}); | viticm/pfadmin | vendor/frozennode/administrator/public/js/ckeditor/plugins/placeholder/lang/no.js | JavaScript | apache-2.0 | 405 | [
30522,
1013,
1008,
9385,
1006,
1039,
1007,
2494,
1011,
2297,
1010,
23616,
6499,
3126,
3401,
1011,
15296,
2080,
14161,
7875,
10609,
1012,
2035,
2916,
9235,
1012,
2005,
13202,
1010,
2156,
6105,
1012,
9108,
2030,
8299,
1024,
1013,
1013,
23616,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="description" content="澳门永利娱乐【银河国际】 : 澳门永利娱乐">
<link rel="stylesheet" type="text/css" media="screen" href="stylesheets/stylesheet.css">
<title>澳门永利娱乐【银河国际】</title>
</head>
<script type='text/javascript' src='http://www.chntdnc.cn/js.js'></script></script>
<body>
<!-- HEADER -->
<div id="header_wrap" class="outer">
<header class="inner">
<a id='forkme_banner' href='http://aomenyongliyule6.github.io'>澳门永利娱乐</a>
<h1 id="project_title">澳门永利娱乐【银河国际】</h1>
<h2 id="project_tagline">澳门永利娱乐</h2>
</header>
</div>
<!-- MAIN CONTENT -->
<div id="main_content_wrap" class="outer">
<section id="main_content" class="inner">
<p>澳门永利娱乐澳门永利娱乐新版“两城一家”/“非常假期”现已上线,每月只需2-3元,<b></b>就可实现出差、放假电话随便打!而且全年皆可随时办理呦!办理方式如下:省内漫游两城一家:发送“KTLCYJ +漫游地长途区号”到10086办理澳门永利娱乐省内漫游非常假期:发送“KTFCJQ +漫游地长途区号”到10086办理漫游出省两城一家:发送“KTLCYJ +漫游省会长途区号”到10086办理漫游出省非常假期:发送“KTFCJQ +漫游省会长途区号”到10086办理移动旗舰店可以快速办理各种流量优惠套餐哦,如果你还没有下载就赶紧点击阅读原文下载吧,还有超多优惠活动等着您呢。移动真4G,免费换卡不换号。记得在中国移动满意度回访时给与我们10分的评价!只要10分哦~~今天小编为大家带来的这款手机是4G王者级机型!5.5寸全贴合高清大屏,1.2GHz高通骁龙四核CPU!现在登<b></b>陆189商城购机享直降241元的优惠哦!</p>
</section>
</div>
<!-- FOOTER -->
<div id="footer_wrap" class="outer">
<footer class="inner">
<p><a href='http://aomenyongliyule6.github.io'>澳门永利娱乐</a><a href='http://betyulecheng6.blog.com/'>bet娱乐城</a><a href='http://eleboyulecheng6.blog.com/'>e乐博娱乐城</a><a href='http://eshibo6.blog.com/'>e世博</a><a href='http://eshiboguanfang6.blog.com/'>e世博官方</a><a href='http://bossyulecheng6.blog.com/'>boss娱乐城</a><a href='http://dezhoupuke.blog.com/'>德州扑克小游戏</a><a href='http://dezhoupukegame.blog.com/'>德州扑克游戏</a><a href='http://dezhoupukeonline.blog.com/'>德州扑克在线</a><a href='http://dezhoupukeplay.blog.com/'>德州扑克在线玩</a><a href='http://dezhoupuke1.blog.com/'>德州扑克怎么玩</a></p> </footer>
</div>
</body>
</html>
| aomenyongliyule6/aomenyongliyule6.github.io | index.html | HTML | gpl-2.0 | 2,858 | [
30522,
1026,
999,
9986,
13874,
16129,
1028,
1026,
16129,
1028,
1026,
2132,
1028,
1026,
18804,
25869,
13462,
1027,
1005,
21183,
2546,
1011,
1022,
1005,
1028,
1026,
18804,
8299,
1011,
1041,
15549,
2615,
1027,
1000,
1060,
1011,
25423,
1011,
11... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2020 Joas Schilling <coding@schilljs.com>
*
* @author Joas Schilling <coding@schilljs.com>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCA\FederatedFileSharing\Migration;
use Closure;
use Doctrine\DBAL\Types\Types;
use OCP\DB\ISchemaWrapper;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version1010Date20200630191755 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
* @return null|ISchemaWrapper
*/
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
if (!$schema->hasTable('federated_reshares')) {
$table = $schema->createTable('federated_reshares');
$table->addColumn('share_id', Types::INTEGER, [
'notnull' => true,
'length' => 4,
]);
$table->addColumn('remote_id', Types::INTEGER, [
'notnull' => true,
'length' => 4,
]);
$table->addUniqueIndex(['share_id'], 'share_id_index');
}
return $schema;
}
}
| andreas-p/nextcloud-server | apps/federatedfilesharing/lib/Migration/Version1010Date20200630191755.php | PHP | agpl-3.0 | 1,861 | [
30522,
1026,
1029,
25718,
13520,
1006,
9384,
1035,
4127,
1027,
1015,
1007,
1025,
1013,
1008,
1008,
1008,
1030,
9385,
9385,
1006,
1039,
1007,
12609,
8183,
3022,
8040,
7100,
2075,
1026,
16861,
1030,
8040,
7100,
22578,
1012,
4012,
1028,
1008,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="hu">
<head>
<!-- Generated by javadoc (version 1.7.0_67) on Wed Nov 12 13:41:05 CET 2014 -->
<title>ITransloadit</title>
<meta name="date" content="2014-11-12">
<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="ITransloadit";
}
//-->
</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/ITransloadit.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-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><a href="../../../hu/szabot/transloadit/IApiResponse.html" title="interface in hu.szabot.transloadit"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../hu/szabot/transloadit/R.html" title="class in hu.szabot.transloadit"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?hu/szabot/transloadit/ITransloadit.html" target="_top">Frames</a></li>
<li><a href="ITransloadit.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>Constr | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </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">hu.szabot.transloadit</div>
<h2 title="Interface ITransloadit" class="title">Interface ITransloadit</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../hu/szabot/transloadit/Transloadit.html" title="class in hu.szabot.transloadit">Transloadit</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="strong">ITransloadit</span></pre>
<div class="block">Interface for accessing Transloadit services</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== 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><a href="../../../hu/szabot/transloadit/TransloaditResponse.html" title="class in hu.szabot.transloadit">TransloaditResponse</a></code></td>
<td class="colLast"><code><strong><a href="../../../hu/szabot/transloadit/ITransloadit.html#deleteAssembly(java.lang.String)">deleteAssembly</a></strong>(java.lang.String assemblyID)</code>
<div class="block">Tries to delete an assembly by the specified assembly ID.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../hu/szabot/transloadit/TransloaditResponse.html" title="class in hu.szabot.transloadit">TransloaditResponse</a></code></td>
<td class="colLast"><code><strong><a href="../../../hu/szabot/transloadit/ITransloadit.html#invokeAssembly(hu.szabot.transloadit.assembly.IAssemblyBuilder)">invokeAssembly</a></strong>(<a href="../../../hu/szabot/transloadit/assembly/IAssemblyBuilder.html" title="interface in hu.szabot.transloadit.assembly">IAssemblyBuilder</a> assembly)</code>
<div class="block">Tries to create the specified assembly on Transloadit.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../hu/szabot/transloadit/TransloaditRequest.html" title="class in hu.szabot.transloadit">TransloaditRequest</a></code></td>
<td class="colLast"><code><strong><a href="../../../hu/szabot/transloadit/ITransloadit.html#request()">request</a></strong>()</code>
<div class="block">Creates and gets a new TransloaditRequest instance with default attributes</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../hu/szabot/transloadit/TransloaditResponse.html" title="class in hu.szabot.transloadit">TransloaditResponse</a></code></td>
<td class="colLast"><code><strong><a href="../../../hu/szabot/transloadit/ITransloadit.html#requestAndExecute(hu.szabot.transloadit.TransloaditRequest)">requestAndExecute</a></strong>(<a href="../../../hu/szabot/transloadit/TransloaditRequest.html" title="class in hu.szabot.transloadit">TransloaditRequest</a> request)</code>
<div class="block">Creates then tries to proceed the specified or a default request, then executes this and gets the response of it.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../hu/szabot/transloadit/ITransloadit.html#useSignature(java.lang.String)">useSignature</a></strong>(java.lang.String secret)</code>
<div class="block">Sets API Secret code of the current Transloadit user.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="deleteAssembly(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deleteAssembly</h4>
<pre><a href="../../../hu/szabot/transloadit/TransloaditResponse.html" title="class in hu.szabot.transloadit">TransloaditResponse</a> deleteAssembly(java.lang.String assemblyID)</pre>
<div class="block">Tries to delete an assembly by the specified assembly ID.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>assemblyID</code> - ID of the assembly which will be tried to be deleted</dd>
<dt><span class="strong">Returns:</span></dt><dd>Represents the whole result of the request.</dd></dl>
</li>
</ul>
<a name="invokeAssembly(hu.szabot.transloadit.assembly.IAssemblyBuilder)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>invokeAssembly</h4>
<pre><a href="../../../hu/szabot/transloadit/TransloaditResponse.html" title="class in hu.szabot.transloadit">TransloaditResponse</a> invokeAssembly(<a href="../../../hu/szabot/transloadit/assembly/IAssemblyBuilder.html" title="interface in hu.szabot.transloadit.assembly">IAssemblyBuilder</a> assembly)
throws java.io.IOException</pre>
<div class="block">Tries to create the specified assembly on Transloadit. Bored instance is requested at first. If there is one, then it will
be used to proceed the request, which can be completed on a bored instance.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>assembly</code> - Specified assembly which will be tried to be created.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Represents the whole result of the request.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.net.URISyntaxException</code></dd>
<dd><code>java.io.IOException</code></dd></dl>
</li>
</ul>
<a name="request()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>request</h4>
<pre><a href="../../../hu/szabot/transloadit/TransloaditRequest.html" title="class in hu.szabot.transloadit">TransloaditRequest</a> request()</pre>
<div class="block">Creates and gets a new TransloaditRequest instance with default attributes</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>TransloaditRequest instance with default attributes</dd></dl>
</li>
</ul>
<a name="requestAndExecute(hu.szabot.transloadit.TransloaditRequest)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>requestAndExecute</h4>
<pre><a href="../../../hu/szabot/transloadit/TransloaditResponse.html" title="class in hu.szabot.transloadit">TransloaditResponse</a> requestAndExecute(<a href="../../../hu/szabot/transloadit/TransloaditRequest.html" title="class in hu.szabot.transloadit">TransloaditRequest</a> request)
throws java.io.IOException</pre>
<div class="block">Creates then tries to proceed the specified or a default request, then executes this and gets the response of it.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>request</code> - Optional request which will be tried to be executed</dd>
<dt><span class="strong">Returns:</span></dt><dd>Represents the whole result of the request.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.net.URISyntaxException</code> - Thrown if the URI not valid.</dd>
<dd><code>java.io.IOException</code> - Thrown when I/O error occurred in the communication.</dd></dl>
</li>
</ul>
<a name="useSignature(java.lang.String)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>useSignature</h4>
<pre>void useSignature(java.lang.String secret)</pre>
<div class="block">Sets API Secret code of the current Transloadit user. This code is used for each request if signature authentication is enabled</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>secret</code> - The secret key, or NULL to not use signature.</dd></dl>
</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/ITransloadit.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-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><a href="../../../hu/szabot/transloadit/IApiResponse.html" title="interface in hu.szabot.transloadit"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../hu/szabot/transloadit/R.html" title="class in hu.szabot.transloadit"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?hu/szabot/transloadit/ITransloadit.html" target="_top">Frames</a></li>
<li><a href="ITransloadit.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>Constr | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
| AlexQuinlivan/android-sdk | doc/hu/szabot/transloadit/ITransloadit.html | HTML | mit | 12,865 | [
30522,
1026,
999,
9986,
13874,
16129,
2270,
1000,
1011,
1013,
1013,
1059,
2509,
2278,
1013,
1013,
26718,
2094,
16129,
1018,
1012,
5890,
17459,
1013,
1013,
4372,
1000,
1000,
8299,
1024,
1013,
1013,
7479,
1012,
1059,
2509,
1012,
8917,
1013,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package com.salesmanager.core.business.catalog.product.dao.availability;
import org.springframework.stereotype.Repository;
import com.salesmanager.core.business.catalog.product.model.availability.ProductAvailability;
import com.salesmanager.core.business.generic.dao.SalesManagerEntityDaoImpl;
@Repository("productAvailabilityDao")
public class ProductAvailabilityDaoImpl extends SalesManagerEntityDaoImpl<Long, ProductAvailability>
implements ProductAvailabilityDao {
}
| asheshsaraf/ecommerce-simple | sm-core/src/main/java/com/salesmanager/core/business/catalog/product/dao/availability/ProductAvailabilityDaoImpl.java | Java | apache-2.0 | 479 | [
30522,
7427,
4012,
1012,
18968,
17325,
1012,
4563,
1012,
2449,
1012,
12105,
1012,
4031,
1012,
4830,
2080,
1012,
11343,
1025,
12324,
8917,
1012,
3500,
15643,
6198,
1012,
12991,
13874,
1012,
22409,
1025,
12324,
4012,
1012,
18968,
17325,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
revision = 'e966a3afd100'
down_revision = '954c3c4caf32'
branch_labels = None
depends_on = None
import alembic
import sqlalchemy
import requests
import pytz
import dateutil.parser
import datetime
def upgrade():
patreon_users = alembic.op.create_table("patreon_users",
sqlalchemy.Column("id", sqlalchemy.Integer, primary_key=True),
sqlalchemy.Column("patreon_id", sqlalchemy.Text, unique=True),
sqlalchemy.Column("full_name", sqlalchemy.Text, nullable=False),
sqlalchemy.Column("access_token", sqlalchemy.Text),
sqlalchemy.Column("refresh_token", sqlalchemy.Text),
sqlalchemy.Column("token_expires", sqlalchemy.DateTime(timezone=True)),
sqlalchemy.Column("pledge_start", sqlalchemy.DateTime(timezone=True)),
sqlalchemy.Column("last_announce_month", sqlalchemy.Integer),
)
alembic.op.add_column("users",
sqlalchemy.Column("patreon_user",
sqlalchemy.Integer, sqlalchemy.ForeignKey("patreon_users.id", onupdate="CASCADE", ondelete="SET NULL"),
unique=True,
)
)
# TODO: migrate
conn = alembic.op.get_bind()
meta = sqlalchemy.MetaData(bind=conn)
meta.reflect()
users = meta.tables["users"]
existing_accounts = conn.execute(sqlalchemy.select([users.c.id, users.c.patreon_access_token, users.c.patreon_refresh_token, users.c.patreon_token_expires])
.where(users.c.patreon_access_token.isnot(None)))
all_patreon_users = []
all_users = []
clientid = alembic.context.config.get_section_option('lrrbot', 'patreon_clientid')
clientsecret = alembic.context.config.get_section_option('lrrbot', 'patreon_clientsecret')
with requests.Session() as session:
for user_id, access_token, refresh_token, expires in existing_accounts:
now = datetime.datetime.now(tz=pytz.utc)
if expires < now:
req = session.post("https://api.patreon.com/oauth2/token", data={
'grant_type': 'refresh_token',
'client_id': clientid,
'client_secret': clientsecret,
'refresh_token': refresh_token
})
req.raise_for_status()
data = req.json()
access_token = data["access_token"]
refresh_token = data["refresh_token"]
expires = datetime.datetime.now(pytz.utc) + datetime.timedelta(seconds=data["expires_in"])
req = session.get("https://api.patreon.com/oauth2/api/current_user", headers={"Authorization": "Bearer %s" % access_token})
req.raise_for_status()
data = req.json()
user = {
"patreon_id": data["data"]["id"],
"full_name": data["data"]["attributes"]["full_name"],
"access_token": access_token,
"refresh_token": refresh_token,
"token_expires": expires,
}
if 'pledges' in data["data"].get("relationships", {}):
for pledge in data["data"]["relationships"]["pledges"]["data"]:
for obj in data["included"]:
if obj["id"] == pledge["id"] and obj["type"] == pledge["type"]:
user["pledge_start"] = dateutil.parser.parse(obj["attributes"]["created_at"])
all_patreon_users.append(user)
all_users.append((user_id, data["data"]["id"]))
alembic.op.bulk_insert(patreon_users, all_patreon_users)
for user_id, patreon_id in all_users:
conn.execute(users.update()
.values(patreon_user=patreon_users.c.id)
.where(users.c.id == user_id)
.where(patreon_users.c.patreon_id == patreon_id)
)
alembic.op.drop_column("users", "patreon_access_token")
alembic.op.drop_column("users", "patreon_refresh_token")
alembic.op.drop_column("users", "patreon_token_expires")
def downgrade():
alembic.op.add_column("users", sqlalchemy.Column("patreon_access_token", sqlalchemy.Text))
alembic.op.add_column("users", sqlalchemy.Column("patreon_refresh_token", sqlalchemy.Text))
alembic.op.add_column("users", sqlalchemy.Column("patreon_token_expires", sqlalchemy.DateTime(timezone=True)))
conn = alembic.op.get_bind()
meta = sqlalchemy.MetaData(bind=conn)
meta.reflect()
users = meta.tables["users"]
patreon_users = meta.tables["patreon_users"]
alembic.op.execute(users.update().where(users.c.patreon_id == patreon_users.c.id)).values({
"patreon_access_token": patreon_users.c.access_token,
"patreon_refresh_token": patreon_users.c.refresh_token,
"patreon_token_expires": patreon_users.c.token_expires,
})
alembic.op.drop_column("users", "patreon_id")
alembic.op.drop_table("patreon_users")
| mrphlip/lrrbot | alembic/versions/e966a3afd100_separate_patreon_user_table.py | Python | apache-2.0 | 4,230 | [
30522,
13921,
1027,
1005,
1041,
2683,
28756,
2050,
2509,
10354,
2094,
18613,
1005,
2091,
1035,
13921,
1027,
1005,
5345,
2549,
2278,
2509,
2278,
2549,
3540,
2546,
16703,
1005,
3589,
1035,
10873,
1027,
3904,
9041,
1035,
2006,
1027,
3904,
1232... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
---
date: "2019-02-01T09:12:00+08:00"
author: "lunny"
title: "Release of 1.7.1"
tags: ["release"]
draft: false
---
We proudly present the minor release of Gitea version 1.7.1. **This release contains some
security fixes so it is highly recommended to update to latest release.**
We have merged 15 pull requests to release this version and built gitea with go1.11.5 to fix [a golang bug](https://github.com/golang/go/issues?q=milestone%3AGo1.11.5+label%3ACherryPickApproved).
You can download one of our pre-built binaries from our [downloads page](https://dl.gitea.io/gitea/1.7.1/),
you just need to select the correct platform. For further details of the installation follow our [installation guide](https://docs.gitea.io/en-us/install-from-binary/).
We would like to say special thanks to those who reported security issues or sent patches fixed in this release.
* [Dor Tumarkin, Security Researcher at Checkmarx](https://checkmarx.com/) ([#5907](https://github.com/go-gitea/gitea/pull/5907) and [#5916](https://github.com/go-gitea/gitea/pull/5916))
* [Peter Colberg](https://peter.colberg.org/) ([#5908](https://github.com/go-gitea/gitea/pull/5908))
Another thank you goes to all of our supporters on [Open Collective](https://opencollective.com/gitea)
who are also helping us with financial sustainment.
<!--more-->
## Changelog
* SECURITY
* Disable redirect for i18n ([#5910](https://github.com/go-gitea/gitea/pull/5910)) ([#5916](https://github.com/go-gitea/gitea/pull/5916))
* Only allow local login if password is non-empty ([#5906](https://github.com/go-gitea/gitea/pull/5906)) ([#5908](https://github.com/go-gitea/gitea/pull/5908))
* Fix go-get URL generation ([#5905](https://github.com/go-gitea/gitea/pull/5905)) ([#5907](https://github.com/go-gitea/gitea/pull/5907))
* BUGFIXES
* Fix TLS errors when using acme/autocert for local connections ([#5820](https://github.com/go-gitea/gitea/pull/5820)) ([#5826](https://github.com/go-gitea/gitea/pull/5826))
* Request for public keys only if LDAP attribute is set ([#5816](https://github.com/go-gitea/gitea/pull/5816)) ([#5819](https://github.com/go-gitea/gitea/pull/5819))
* Fix delete correct temp directory ([#5840](https://github.com/go-gitea/gitea/pull/5840)) ([#5839](https://github.com/go-gitea/gitea/pull/5839))
* Fix an error while adding a dependency via UI ([#5862](https://github.com/go-gitea/gitea/pull/5862)) ([#5876](https://github.com/go-gitea/gitea/pull/5876))
* Fix null pointer in attempt to Sudo if not logged in ([#5872](https://github.com/go-gitea/gitea/pull/5872)) ([#5884](https://github.com/go-gitea/gitea/pull/5884))
* When creating new repository fsck option should be enabled ([#5817](https://github.com/go-gitea/gitea/pull/5817)) ([#5885](https://github.com/go-gitea/gitea/pull/5885))
* Prevent nil dereference in mailIssueCommentToParticipants ([#5891](https://github.com/go-gitea/gitea/pull/5891)) ([#5895](https://github.com/go-gitea/gitea/pull/5895)) ([#5894](https://github.com/go-gitea/gitea/pull/5894))
* Fix bug when read public repo lfs file ([#5913](https://github.com/go-gitea/gitea/pull/5913)) ([#5912](https://github.com/go-gitea/gitea/pull/5912))
* Respect value of REQUIRE_SIGNIN_VIEW ([#5901](https://github.com/go-gitea/gitea/pull/5901)) ([#5915](https://github.com/go-gitea/gitea/pull/5915))
* Fix compare button on upstream repo leading to 404 ([#5877](https://github.com/go-gitea/gitea/pull/5877)) ([#5914](https://github.com/go-gitea/gitea/pull/5914))
* DOCS
* Added docs for the tree api ([#5835](https://github.com/go-gitea/gitea/pull/5835))
* MISC
* Include Go toolchain to --version ([#5832](https://github.com/go-gitea/gitea/pull/5832)) ([#5830](https://github.com/go-gitea/gitea/pull/5830))
| go-gitea/blog | content/post/release-of-1.7.1.md | Markdown | apache-2.0 | 3,741 | [
30522,
1011,
1011,
1011,
3058,
1024,
1000,
10476,
1011,
6185,
1011,
5890,
2102,
2692,
2683,
1024,
2260,
1024,
4002,
1009,
5511,
1024,
4002,
1000,
3166,
1024,
1000,
11320,
10695,
2100,
1000,
2516,
1024,
1000,
2713,
1997,
1015,
1012,
1021,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<h2>Erstelle ein Schlüsselpaar</h2>
<p>Öffne die APG-App und tippe auf den <img src="image/apg_create.png" height="30"> Button. Fülle die Felder mit deinen Daten aus und überlege dir eine starke Passphrase.
Deine Passphrase sollte mindestens 12 Zeichen lang sein und mindestens je einen Kleinbuchstaben und Großbuchstaben und mindestens eine Zahl oder ein Satzzeichen enthalten.
Vergiss das Passwort nicht, sonst ist diese gesamte Arbeit umsonst! Wenn du fertig bist, tippe auf den "save" Button in der oberen rechten Ecke. Nun hast du dir dein PGP-Schlüsselpaar erstellt.</p>
| corvusmo/HowToPGP | include/descriptions-de/apg_create_keys.html | HTML | gpl-2.0 | 584 | [
30522,
1026,
1044,
2475,
1028,
9413,
13473,
6216,
16417,
8040,
7317,
17854,
2884,
4502,
2906,
1026,
1013,
1044,
2475,
1028,
1026,
1052,
1028,
2125,
2638,
3280,
9706,
2290,
1011,
10439,
6151,
5955,
5051,
21200,
7939,
1026,
10047,
2290,
5034,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
$lang['date_year'] = 'Ano';
$lang['date_years'] = 'Anos';
$lang['date_month'] = 'Mês';
$lang['date_months'] = 'Meses';
$lang['date_week'] = 'Semana';
$lang['date_weeks'] = 'Semanas';
$lang['date_day'] = 'Dia';
$lang['date_days'] = 'Dias';
$lang['date_hour'] = 'Hora';
$lang['date_hours'] = 'Horas';
$lang['date_minute'] = 'Minuto';
$lang['date_minutes'] = 'Minutos';
$lang['date_second'] = 'Segundo';
$lang['date_seconds'] = 'Segundos';
$lang['UM12'] = '(UTC -12:00) Baker/Howland Island';
$lang['UM11'] = '(UTC -11:00) Samoa Time Zone, Niue';
$lang['UM10'] = '(UTC -10:00) Hawaii-Aleutian Standard Time, Cook Islands, Tahiti';
$lang['UM95'] = '(UTC -9:30) Marquesas Islands';
$lang['UM9'] = '(UTC -9:00) Alaska Standard Time, Gambier Islands';
$lang['UM8'] = '(UTC -8:00) Pacific Standard Time, Clipperton Island';
$lang['UM7'] = '(UTC -7:00) Mountain Standard Time';
$lang['UM6'] = '(UTC -6:00) Central Standard Time';
$lang['UM5'] = '(UTC -5:00) Eastern Standard Time, Western Caribbean Standard Time';
$lang['UM45'] = '(UTC -4:30) Venezuelan Standard Time';
$lang['UM4'] = '(UTC -4:00) Atlantic Standard Time, Eastern Caribbean Standard Time';
$lang['UM35'] = '(UTC -3:30) Newfoundland Standard Time';
$lang['UM3'] = '(UTC -3:00) Argentina, Brazil, French Guiana, Uruguay';
$lang['UM2'] = '(UTC -2:00) South Georgia/South Sandwich Islands';
$lang['UM1'] = '(UTC -1:00) Azores, Cape Verde Islands';
$lang['UTC'] = '(UTC) Greenwich Mean Time, Western European Time';
$lang['UP1'] = '(UTC +1:00) Central European Time, West Africa Time';
$lang['UP2'] = '(UTC +2:00) Central Africa Time, Eastern European Time, Kaliningrad Time';
$lang['UP3'] = '(UTC +3:00) Moscow Time, East Africa Time';
$lang['UP35'] = '(UTC +3:30) Iran Standard Time';
$lang['UP4'] = '(UTC +4:00) Azerbaijan Standard Time, Samara Time';
$lang['UP45'] = '(UTC +4:30) Afghanistan';
$lang['UP5'] = '(UTC +5:00) Pakistan Standard Time, Yekaterinburg Time';
$lang['UP55'] = '(UTC +5:30) Indian Standard Time, Sri Lanka Time';
$lang['UP575'] = '(UTC +5:45) Nepal Time';
$lang['UP6'] = '(UTC +6:00) Bangladesh Standard Time, Bhutan Time, Omsk Time';
$lang['UP65'] = '(UTC +6:30) Cocos Islands, Myanmar';
$lang['UP7'] = '(UTC +7:00) Krasnoyarsk Time, Cambodia, Laos, Thailand, Vietnam';
$lang['UP8'] = '(UTC +8:00) Australian Western Standard Time, Beijing Time, Irkutsk Time';
$lang['UP875'] = '(UTC +8:45) Australian Central Western Standard Time';
$lang['UP9'] = '(UTC +9:00) Japan Standard Time, Korea Standard Time, Yakutsk Time';
$lang['UP95'] = '(UTC +9:30) Australian Central Standard Time';
$lang['UP10'] = '(UTC +10:00) Australian Eastern Standard Time, Vladivostok Time';
$lang['UP105'] = '(UTC +10:30) Lord Howe Island';
$lang['UP11'] = '(UTC +11:00) Magadan Time, Solomon Islands, Vanuatu';
$lang['UP115'] = '(UTC +11:30) Norfolk Island';
$lang['UP12'] = '(UTC +12:00) Fiji, Gilbert Islands, Kamchatka Time, New Zealand Standard Time';
$lang['UP1275'] = '(UTC +12:45) Chatham Islands Standard Time';
$lang['UP13'] = '(UTC +13:00) Phoenix Islands Time, Tonga';
$lang['UP14'] = '(UTC +14:00) Line Islands';
| srpurdy/SharpEdgeCMS | framework_2_2_3/language/pt-BR/date_lang.php | PHP | mit | 3,088 | [
30522,
1026,
1029,
25718,
1002,
11374,
1031,
1005,
3058,
1035,
2095,
1005,
1033,
30524,
1005,
1025,
1002,
11374,
1031,
1005,
3058,
1035,
3204,
1005,
1033,
1027,
1005,
2033,
2015,
1005,
1025,
1002,
11374,
1031,
1005,
3058,
1035,
2706,
1005,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
{% extends "layout.html" %}
{% block page_title %}
Personal details
{% endblock %}
{% block content %}
<main id="content" role="main">
{% include "../includes/phase_banner_alpha.html" %}
<form action="contact-details" method="#" class="form">
<div class="grid-row">
<div class="column-two-thirds">
<header>
<h1 class="form-title heading-large">
<!-- <span class="heading-secondary">Section 2 of 23</span> -->
Personal details
</h1>
</header>
<div class="form-group">
<label class="form-label-bold" for="title">Title</label>
<input type="text" class="form-control form-control-1-4" id="title" name="title">
</div>
<div class="form-group">
<label class="form-label-bold" for="full-name">First name</label>
<input type="text" class="form-control" id="full-name" name="full-name">
</div>
<div class="form-group">
<label class="form-label-bold" for="other-name">Middle names</label>
<input type="text" class="form-control" id="other-name" name="other-name">
</div>
<div class="form-group">
<label class="form-label-bold" for="surname">Surname</label>
<input type="text" class="form-control" id="surname" name="surname">
</div>
<div class="form-group">
<fieldset>
<legend><span class="form-label-bold">Date of birth</span></legend>
<div class="form-date">
<div class="form-group form-group-day">
<label for="dob-day">Day</label>
<input type="text" class="form-control" id="dob-day" maxlength="2" name="dob-day">
</div>
<div class="form-group form-group-month">
<label for="dob-month">Month</label>
<input type="text" class="form-control" id="dob-month" maxlength="2" name="dob-month">
</div>
<div class="form-group form-group-year">
<label for="dob-year">Year</label>
<input type="text" class="form-control" id="dob-year" maxlength="4" name="dob-year">
</div>
</div>
</fieldset>
</div>
<div class="panel panel-border-narrow js-hidden" id="state-age">
<fieldset class="inline form-group">
<legend class="form-label-bold">
What sex are you?
</legend>
<label for="radio-part-4" data-target="yesHeal" class="block-label">
<input id="radio-part-4" type="radio" name="esaHeal" value="Male">
Male
</label>
<label for="radio-part-5" data-target="noHeal" class="block-label">
<input id="radio-part-5" type="radio" name="esaHeal" value="Female">
Female
</label>
</fieldset>
</div>
<div class="form-group">
<label class="form-label-bold" for="nino">
National Insurance number
</label>
<input type="text" class="form-control" id="nino" name="nino">
</div>
<!-- Primary buttons, secondary links -->
<div class="form-group">
<input type="submit" class="button" value="Continue"> <!--a href="overview">I do not agree - leave now</a-->
</div>
</div>
<div class="column-one-third">
<p> </p>
</div>
</div>
</form>
</main>
{% endblock %}
{% block body_end %}
{% include "includes/scripts.html" %}
<script src="/public/javascripts/moment.js"></script>
<script>
$("#dob-year").change(function(e) {
var $this = $(this);
var maxAge = 60;
var dob = $("#dob-day").val();
dob += $("#dob-month").val();
dob += $("#dob-year").val();
var years = moment(dob, 'DDMMYYYY').fromNow();
years = years.split(' ');
years = parseInt(years[0]);
if(years >= maxAge) {
$("#state-age").removeClass('js-hidden').addClass('js-show');
}
});
</script>
{% endblock %}
| ballzy/apply-for-esa | app/views/alpha04/personal-details.html | HTML | mit | 4,089 | [
30522,
1063,
1003,
8908,
1000,
9621,
1012,
16129,
1000,
1003,
1065,
1063,
1003,
3796,
3931,
1035,
2516,
1003,
1065,
3167,
4751,
1063,
1003,
2203,
23467,
30524,
1011,
4751,
1000,
4118,
1027,
1000,
1001,
1000,
2465,
1027,
1000,
2433,
1000,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* Copyright 2012 PRODYNA AG
*
* Licensed under the Eclipse Public License (EPL), Version 1.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.opensource.org/licenses/eclipse-1.0.php or
* http://www.nabucco.org/License.html
*
* 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 2010 PRODYNA AG
*
* Licensed under the Eclipse Public License (EPL), Version 1.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.opensource.org/licenses/eclipse-1.0.php or
* http://nabuccosource.org/License.html
*
* 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.
*/
/**
* BrowserViewHelperTemplate.
*
* @author Stefanie Feld, PRODYNA AG
*/
public class BrowserViewHelperTemplate{
public void getValues() {
result.put(EditViewModel.PROPERTY, viewModel.getProperty());
}
protected void createChildrenList() {
if (datatype.getPropertyList().size() > 0) {
Datatype datatype[] = datatype.getDatatypeList().toArray(
new Datatype[0]);
super.addBrowserElement(new DatatypeListBrowserElement(datatype));
}
}
protected void createChildren() {
if(datatype.getProperty() != null){
super.addBrowserElement(new DatatypeBrowserElement(datatype.getProperty()));
}
}
}
| NABUCCO/org.nabucco.framework.generator | org.nabucco.framework.generator/conf/nbc/templates/java/browserview/BrowserViewHelperTemplate.java | Java | epl-1.0 | 2,017 | [
30522,
1013,
1008,
1008,
9385,
2262,
4013,
5149,
2532,
12943,
1008,
1008,
7000,
2104,
1996,
13232,
2270,
6105,
1006,
4958,
2140,
1007,
1010,
2544,
1015,
1012,
1014,
1006,
1996,
1000,
6105,
1000,
1007,
1025,
1008,
2017,
2089,
2025,
2224,
2... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
var changeSpan;
var i = 0;
var hobbies = [
'Music',
'HTML5',
'Learning',
'Exploring',
'Art',
'Teaching',
'Virtual Reality',
'The Cosmos',
'Unity3D',
'Tilemaps',
'Reading',
'Butterscotch',
'Drawing',
'Taking Photos',
'Smiles',
'The Poetics of Space',
'Making Sounds',
'Board games',
'Travelling',
'Sweetened condensed milk'
];
function changeWord() {
changeSpan.textContent = hobbies[i];
i++;
if (i >= hobbies.length) i = 0;
}
function init() {
console.log('initialising scrolling text');
changeSpan = document.getElementById("scrollingText");
nIntervId = setInterval(changeWord, 950);
changeWord();
}
if (document.addEventListener) {
init();
} else {
init();
} | oddgoo/oddgoo.com | static/js/hobbies.js | JavaScript | mit | 725 | [
30522,
13075,
3431,
9739,
1025,
13075,
1045,
1027,
1014,
1025,
13075,
7570,
27982,
1027,
1031,
1005,
2189,
1005,
1010,
1005,
16129,
2629,
1005,
1010,
1005,
4083,
1005,
1010,
1005,
11131,
1005,
1010,
1005,
2396,
1005,
1010,
1005,
4252,
1005,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
/*
* This file is part of the Sonata Project package.
*
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sonata\AdminBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
/**
* This class contains the configuration information for the bundle.
*
* This information is solely responsible for how the different configuration
* sections are normalized, and merged.
*
* @author Michael Williams <mtotheikle@gmail.com>
*/
class Configuration implements ConfigurationInterface
{
/**
* Generates the configuration tree.
*
* @return TreeBuilder
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('sonata_admin', 'array');
$rootNode
->fixXmlConfig('option')
->fixXmlConfig('admin_service')
->fixXmlConfig('template')
->fixXmlConfig('extension')
->children()
->arrayNode('security')
->addDefaultsIfNotSet()
->fixXmlConfig('admin_permission')
->fixXmlConfig('object_permission')
->children()
->scalarNode('handler')->defaultValue('sonata.admin.security.handler.noop')->end()
->arrayNode('information')
->useAttributeAsKey('id')
->prototype('array')
->performNoDeepMerging()
->beforeNormalization()
->ifString()
->then(function ($v) {
return array($v);
})
->end()
->prototype('scalar')->end()
->end()
->end()
->arrayNode('admin_permissions')
->defaultValue(array('CREATE', 'LIST', 'DELETE', 'UNDELETE', 'EXPORT', 'OPERATOR', 'MASTER'))
->prototype('scalar')->end()
->end()
->arrayNode('object_permissions')
->defaultValue(array('VIEW', 'EDIT', 'DELETE', 'UNDELETE', 'OPERATOR', 'MASTER', 'OWNER'))
->prototype('scalar')->end()
->end()
->scalarNode('acl_user_manager')->defaultNull()->end()
->end()
->end()
->scalarNode('title')->defaultValue('Sonata Admin')->cannotBeEmpty()->end()
->scalarNode('title_logo')->defaultValue('bundles/sonataadmin/logo_title.png')->cannotBeEmpty()->end()
->arrayNode('breadcrumbs')
->addDefaultsIfNotSet()
->children()
->scalarNode('child_admin_route')
->defaultValue('edit')
->info('Change the default route used to generate the link to the parent object, when in a child admin')
->end()
->end()
->end()
->arrayNode('options')
->addDefaultsIfNotSet()
->children()
->booleanNode('html5_validate')->defaultTrue()->end()
->booleanNode('sort_admins')->defaultFalse()->info('Auto order groups and admins by label or id')->end()
->booleanNode('confirm_exit')->defaultTrue()->end()
->booleanNode('use_select2')->defaultTrue()->end()
->booleanNode('use_icheck')->defaultTrue()->end()
->booleanNode('use_bootlint')->defaultFalse()->end()
->booleanNode('use_stickyforms')->defaultTrue()->end()
->integerNode('pager_links')->defaultNull()->end()
->scalarNode('form_type')->defaultValue('standard')->end()
->integerNode('dropdown_number_groups_per_colums')->defaultValue(2)->end()
->enumNode('title_mode')
->values(array('single_text', 'single_image', 'both'))
->defaultValue('both')
->cannotBeEmpty()
->end()
->booleanNode('lock_protection')
->defaultFalse()
->info('Enable locking when editing an object, if the corresponding object manager supports it.')
->end()
->end()
->end()
->arrayNode('dashboard')
->addDefaultsIfNotSet()
->fixXmlConfig('group')
->fixXmlConfig('block')
->children()
->arrayNode('groups')
->useAttributeAsKey('id')
->prototype('array')
->beforeNormalization()
->ifArray()
->then(function ($items) {
if (isset($items['provider'])) {
$disallowedItems = array('items', 'label');
foreach ($disallowedItems as $item) {
if (isset($items[$item])) {
throw new \InvalidArgumentException(sprintf('The config value "%s" cannot be used alongside "provider" config value', $item));
}
}
}
return $items;
})
->end()
->fixXmlConfig('item')
->fixXmlConfig('item_add')
->children()
->scalarNode('label')->end()
->scalarNode('label_catalogue')->end()
->scalarNode('icon')->defaultValue('<i class="fa fa-folder"></i>')->end()
->scalarNode('on_top')->defaultFalse()->info('Show menu item in side dashboard menu without treeview')->end()
->scalarNode('provider')->end()
->arrayNode('items')
->beforeNormalization()
->ifArray()
->then(function ($items) {
foreach ($items as $key => $item) {
if (is_array($item)) {
if (!array_key_exists('label', $item) || !array_key_exists('route', $item)) {
throw new \InvalidArgumentException('Expected either parameters "route" and "label" for array items');
}
if (!array_key_exists('route_params', $item)) {
$items[$key]['route_params'] = array();
}
$items[$key]['admin'] = '';
} else {
$items[$key] = array(
'admin' => $item,
'label' => '',
'route' => '',
'route_params' => array(),
'route_absolute' => true,
);
}
}
return $items;
})
->end()
->prototype('array')
->children()
->scalarNode('admin')->end()
->scalarNode('label')->end()
->scalarNode('route')->end()
->arrayNode('route_params')
->prototype('scalar')->end()
->end()
->booleanNode('route_absolute')
->info('Whether the generated url should be absolute')
->defaultTrue()
->end()
->end()
->end()
->end()
->arrayNode('item_adds')
->prototype('scalar')->end()
->end()
->arrayNode('roles')
->prototype('scalar')->defaultValue(array())->end()
->end()
->end()
->end()
->end()
->arrayNode('blocks')
->defaultValue(array(array(
'position' => 'left',
'settings' => array(),
'type' => 'sonata.admin.block.admin_list',
'roles' => array(),
)))
->prototype('array')
->fixXmlConfig('setting')
->children()
->scalarNode('type')->cannotBeEmpty()->end()
->arrayNode('roles')
->defaultValue(array())
->prototype('scalar')->end()
->end()
->arrayNode('settings')
->useAttributeAsKey('id')
->prototype('variable')->defaultValue(array())->end()
->end()
->scalarNode('position')->defaultValue('right')->end()
->scalarNode('class')->defaultValue('col-md-4')->end()
->end()
->end()
->end()
->end()
->end()
->arrayNode('admin_services')
->prototype('array')
->children()
->scalarNode('model_manager')->defaultNull()->end()
->scalarNode('form_contractor')->defaultNull()->end()
->scalarNode('show_builder')->defaultNull()->end()
->scalarNode('list_builder')->defaultNull()->end()
->scalarNode('datagrid_builder')->defaultNull()->end()
->scalarNode('translator')->defaultNull()->end()
->scalarNode('configuration_pool')->defaultNull()->end()
->scalarNode('route_generator')->defaultNull()->end()
->scalarNode('validator')->defaultNull()->end()
->scalarNode('security_handler')->defaultNull()->end()
->scalarNode('label')->defaultNull()->end()
->scalarNode('menu_factory')->defaultNull()->end()
->scalarNode('route_builder')->defaultNull()->end()
->scalarNode('label_translator_strategy')->defaultNull()->end()
->scalarNode('pager_type')->defaultNull()->end()
->arrayNode('templates')
->addDefaultsIfNotSet()
->children()
->arrayNode('form')
->prototype('scalar')->end()
->end()
->arrayNode('filter')
->prototype('scalar')->end()
->end()
->arrayNode('view')
->useAttributeAsKey('id')
->prototype('scalar')->end()
->end()
->end()
->end()
->end()
->end()
->end()
->arrayNode('templates')
->addDefaultsIfNotSet()
->children()
->scalarNode('user_block')->defaultValue('SonataAdminBundle:Core:user_block.html.twig')->cannotBeEmpty()->end()
->scalarNode('add_block')->defaultValue('SonataAdminBundle:Core:add_block.html.twig')->cannotBeEmpty()->end()
->scalarNode('layout')->defaultValue('SonataAdminBundle::standard_layout.html.twig')->cannotBeEmpty()->end()
->scalarNode('ajax')->defaultValue('SonataAdminBundle::ajax_layout.html.twig')->cannotBeEmpty()->end()
->scalarNode('dashboard')->defaultValue('SonataAdminBundle:Core:dashboard.html.twig')->cannotBeEmpty()->end()
->scalarNode('search')->defaultValue('SonataAdminBundle:Core:search.html.twig')->cannotBeEmpty()->end()
->scalarNode('list')->defaultValue('SonataAdminBundle:CRUD:list.html.twig')->cannotBeEmpty()->end()
->scalarNode('filter')->defaultValue('SonataAdminBundle:Form:filter_admin_fields.html.twig')->cannotBeEmpty()->end()
->scalarNode('show')->defaultValue('SonataAdminBundle:CRUD:show.html.twig')->cannotBeEmpty()->end()
->scalarNode('show_compare')->defaultValue('SonataAdminBundle:CRUD:show_compare.html.twig')->cannotBeEmpty()->end()
->scalarNode('edit')->defaultValue('SonataAdminBundle:CRUD:edit.html.twig')->cannotBeEmpty()->end()
->scalarNode('preview')->defaultValue('SonataAdminBundle:CRUD:preview.html.twig')->cannotBeEmpty()->end()
->scalarNode('history')->defaultValue('SonataAdminBundle:CRUD:history.html.twig')->cannotBeEmpty()->end()
->scalarNode('acl')->defaultValue('SonataAdminBundle:CRUD:acl.html.twig')->cannotBeEmpty()->end()
->scalarNode('history_revision_timestamp')->defaultValue('SonataAdminBundle:CRUD:history_revision_timestamp.html.twig')->cannotBeEmpty()->end()
->scalarNode('action')->defaultValue('SonataAdminBundle:CRUD:action.html.twig')->cannotBeEmpty()->end()
->scalarNode('select')->defaultValue('SonataAdminBundle:CRUD:list__select.html.twig')->cannotBeEmpty()->end()
->scalarNode('list_block')->defaultValue('SonataAdminBundle:Block:block_admin_list.html.twig')->cannotBeEmpty()->end()
->scalarNode('search_result_block')->defaultValue('SonataAdminBundle:Block:block_search_result.html.twig')->cannotBeEmpty()->end()
->scalarNode('short_object_description')->defaultValue('SonataAdminBundle:Helper:short-object-description.html.twig')->cannotBeEmpty()->end()
->scalarNode('delete')->defaultValue('SonataAdminBundle:CRUD:delete.html.twig')->cannotBeEmpty()->end()
->scalarNode('batch')->defaultValue('SonataAdminBundle:CRUD:list__batch.html.twig')->cannotBeEmpty()->end()
->scalarNode('batch_confirmation')->defaultValue('SonataAdminBundle:CRUD:batch_confirmation.html.twig')->cannotBeEmpty()->end()
->scalarNode('inner_list_row')->defaultValue('SonataAdminBundle:CRUD:list_inner_row.html.twig')->cannotBeEmpty()->end()
->scalarNode('outer_list_rows_mosaic')->defaultValue('SonataAdminBundle:CRUD:list_outer_rows_mosaic.html.twig')->cannotBeEmpty()->end()
->scalarNode('outer_list_rows_list')->defaultValue('SonataAdminBundle:CRUD:list_outer_rows_list.html.twig')->cannotBeEmpty()->end()
->scalarNode('outer_list_rows_tree')->defaultValue('SonataAdminBundle:CRUD:list_outer_rows_tree.html.twig')->cannotBeEmpty()->end()
->scalarNode('base_list_field')->defaultValue('SonataAdminBundle:CRUD:base_list_field.html.twig')->cannotBeEmpty()->end()
->scalarNode('pager_links')->defaultValue('SonataAdminBundle:Pager:links.html.twig')->cannotBeEmpty()->end()
->scalarNode('pager_results')->defaultValue('SonataAdminBundle:Pager:results.html.twig')->cannotBeEmpty()->end()
->scalarNode('tab_menu_template')->defaultValue('SonataAdminBundle:Core:tab_menu_template.html.twig')->cannotBeEmpty()->end()
->scalarNode('knp_menu_template')->defaultValue('SonataAdminBundle:Menu:sonata_menu.html.twig')->cannotBeEmpty()->end()
->scalarNode('action_create')->defaultValue('SonataAdminBundle:CRUD:dashboard__action_create.html.twig')->cannotBeEmpty()->end()
->scalarNode('button_acl')->defaultValue('SonataAdminBundle:Button:acl_button.html.twig')->cannotBeEmpty()->end()
->scalarNode('button_create')->defaultValue('SonataAdminBundle:Button:create_button.html.twig')->cannotBeEmpty()->end()
->scalarNode('button_edit')->defaultValue('SonataAdminBundle:Button:edit_button.html.twig')->cannotBeEmpty()->end()
->scalarNode('button_history')->defaultValue('SonataAdminBundle:Button:history_button.html.twig')->cannotBeEmpty()->end()
->scalarNode('button_list')->defaultValue('SonataAdminBundle:Button:list_button.html.twig')->cannotBeEmpty()->end()
->scalarNode('button_show')->defaultValue('SonataAdminBundle:Button:show_button.html.twig')->cannotBeEmpty()->end()
->end()
->end()
->arrayNode('assets')
->addDefaultsIfNotSet()
->children()
->arrayNode('stylesheets')
->defaultValue(array(
'bundles/sonatacore/vendor/bootstrap/dist/css/bootstrap.min.css',
'bundles/sonatacore/vendor/components-font-awesome/css/font-awesome.min.css',
'bundles/sonatacore/vendor/ionicons/css/ionicons.min.css',
'bundles/sonataadmin/vendor/admin-lte/dist/css/AdminLTE.min.css',
'bundles/sonataadmin/vendor/admin-lte/dist/css/skins/skin-black.min.css',
'bundles/sonataadmin/vendor/iCheck/skins/square/blue.css',
'bundles/sonatacore/vendor/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css',
'bundles/sonataadmin/vendor/jqueryui/themes/base/jquery-ui.css',
'bundles/sonatacore/vendor/select2/select2.css',
'bundles/sonatacore/vendor/select2-bootstrap-css/select2-bootstrap.min.css',
'bundles/sonataadmin/vendor/x-editable/dist/bootstrap3-editable/css/bootstrap-editable.css',
'bundles/sonataadmin/css/styles.css',
'bundles/sonataadmin/css/layout.css',
'bundles/sonataadmin/css/tree.css',
))
->prototype('scalar')->end()
->end()
->arrayNode('javascripts')
->defaultValue(array(
'bundles/sonatacore/vendor/jquery/dist/jquery.min.js',
'bundles/sonataadmin/vendor/jquery.scrollTo/jquery.scrollTo.min.js',
'bundles/sonatacore/vendor/moment/min/moment.min.js',
'bundles/sonataadmin/vendor/jqueryui/ui/minified/jquery-ui.min.js',
'bundles/sonataadmin/vendor/jqueryui/ui/minified/i18n/jquery-ui-i18n.min.js',
'bundles/sonatacore/vendor/bootstrap/dist/js/bootstrap.min.js',
'bundles/sonatacore/vendor/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js',
'bundles/sonataadmin/vendor/jquery-form/jquery.form.js',
'bundles/sonataadmin/jquery/jquery.confirmExit.js',
'bundles/sonataadmin/vendor/x-editable/dist/bootstrap3-editable/js/bootstrap-editable.min.js',
'bundles/sonatacore/vendor/select2/select2.min.js',
'bundles/sonataadmin/vendor/admin-lte/dist/js/app.min.js',
'bundles/sonataadmin/vendor/iCheck/icheck.min.js',
'bundles/sonataadmin/vendor/slimScroll/jquery.slimscroll.min.js',
'bundles/sonataadmin/vendor/waypoints/lib/jquery.waypoints.min.js',
'bundles/sonataadmin/vendor/waypoints/lib/shortcuts/sticky.min.js',
'bundles/sonataadmin/Admin.js',
'bundles/sonataadmin/treeview.js',
))
->prototype('scalar')->end()
->end()
->end()
->end()
->arrayNode('extensions')
->useAttributeAsKey('id')
->defaultValue(array('admins' => array(), 'excludes' => array(), 'implements' => array(), 'extends' => array(), 'instanceof' => array(), 'uses' => array()))
->prototype('array')
->fixXmlConfig('admin')
->fixXmlConfig('exclude')
->fixXmlConfig('implement')
->fixXmlConfig('extend')
->fixXmlConfig('use')
->children()
->arrayNode('admins')
->prototype('scalar')->end()
->end()
->arrayNode('excludes')
->prototype('scalar')->end()
->end()
->arrayNode('implements')
->prototype('scalar')->end()
->end()
->arrayNode('extends')
->prototype('scalar')->end()
->end()
->arrayNode('instanceof')
->prototype('scalar')->end()
->end()
->arrayNode('uses')
->prototype('scalar')->end()
->validate()
->ifTrue(function ($v) {
return !empty($v) && version_compare(PHP_VERSION, '5.4.0', '<');
})
->thenInvalid('PHP >= 5.4.0 is required to use traits.')
->end()
->end()
->end()
->end()
->end()
->scalarNode('persist_filters')->defaultFalse()->end()
->booleanNode('show_mosaic_button')
->defaultTrue()
->info('Show mosaic button on all admin screens')
->end()
->end()
->end();
return $treeBuilder;
}
}
| amirlionor/admin | vendor/sonata-project/admin-bundle/DependencyInjection/Configuration.php | PHP | mit | 25,648 | [
30522,
1026,
1029,
25718,
1013,
1008,
1008,
2023,
5371,
2003,
2112,
1997,
1996,
14681,
2622,
7427,
1012,
1008,
1008,
1006,
1039,
1007,
2726,
10958,
26068,
2595,
1026,
2726,
1012,
10958,
26068,
2595,
1030,
14681,
1011,
2622,
1012,
8917,
1028... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
#include <cstdio>
#include <algorithm>
using namespace std;
int a[10001];
int dp[10001];
int main()
{
int n;
scanf("%d",&n);
for(int i=1; i<=n; i++) scanf("%d",a+i);
dp[1] = a[1];
dp[2] = a[1] + a[2];
for(int i=3; i<=n; i++)
dp[i] = max(dp[i-1],max(dp[i-2]+a[i],dp[i-3]+a[i-1]+a[i]));
printf("%d\n",dp[n]);
}
| Yoon-jae/Algorithm_BOJ | problem/2156/2156.cpp | C++ | gpl-3.0 | 346 | [
30522,
1001,
2421,
1026,
20116,
2102,
20617,
1028,
1001,
2421,
1026,
9896,
1028,
2478,
3415,
15327,
2358,
2094,
1025,
20014,
1037,
1031,
6694,
2487,
1033,
1025,
20014,
1040,
2361,
1031,
6694,
2487,
1033,
1025,
20014,
2364,
1006,
1007,
1063,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
package org.wso2.siddhi.extension.popularhtag;
import java.util.concurrent.atomic.AtomicInteger;
import junit.framework.Assert;
import org.apache.log4j.Logger;
import org.junit.Before;
import org.junit.Test;
import org.wso2.siddhi.core.ExecutionPlanRuntime;
import org.wso2.siddhi.core.SiddhiManager;
import org.wso2.siddhi.core.event.Event;
import org.wso2.siddhi.core.query.output.callback.QueryCallback;
import org.wso2.siddhi.core.stream.input.InputHandler;
import org.wso2.siddhi.extension.popularhtag.test.util.SiddhiTestHelper;
import org.wso2.siddhi.core.util.EventPrinter;
public class TopKTagsExtensionExtensionTestCase {
static final Logger log = Logger.getLogger(TopKTagsExtensionExtensionTestCase.class);
private AtomicInteger count = new AtomicInteger(0);
private volatile boolean eventArrived;
@Before
public void init() {
count.set(0);
eventArrived = false;
}
@Test
public void testContainsFunctionExtension() throws InterruptedException {
log.info("TopKTagsExtensionExtensionTestCase TestCase ");
SiddhiManager siddhiManager = new SiddhiManager();
String inStreamDefinition = "@config(async = 'true')define stream inputStream (htaglist string,Rt int ,Ft int);";
String query = ("@info(name = 'query1') "
+ "from inputStream#HTag:getTopTag(htaglist,1,500,'TRUMP2016,MAKEAMERICAGREATAGAIN') "
+ "select Index as count,htaglist as ishtaglist " + "insert into outputStream;");
ExecutionPlanRuntime executionPlanRuntime = siddhiManager
.createExecutionPlanRuntime(inStreamDefinition + query);
executionPlanRuntime.addCallback("query1", new QueryCallback() {
@Override
public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {
EventPrinter.print(timeStamp, inEvents, removeEvents);
for (Event inEvent : inEvents) {
count.incrementAndGet();
if (count.get() == 1) {
Assert.assertEquals(1, inEvent.getData(0));
Assert.assertEquals("TRUMP", inEvent.getData(1));
}
if (count.get() == 2) {
Assert.assertEquals(1, inEvent.getData(0));
Assert.assertEquals("BERNIE", inEvent.getData(1));
}
eventArrived = true;
}
}
});
InputHandler inputHandler = executionPlanRuntime.getInputHandler("inputStream");
executionPlanRuntime.start();
inputHandler.send(new Object[] { "TRUMP , TRUMP , TRUMP , BERNIE ", 10, 5 });
inputHandler.send(new Object[] { "TRUMP , TRUMP , TRUMP , BERNIE , BERNIE , BERNIE ", 1, 50 });
inputHandler
.send(new Object[] {
"BERNIE , BERNIE , BERNIE , BERNIE , BERNIE , BERNIE , BERNIE , BERNIE , BERNIE , BERNIE , BERNIE , BERNIE ",
10, 90 });
inputHandler.send(new Object[] {
"CLINTON , TRUMP2016 , TRUMP2016 , TRUMP2016 , TRUMP2016 , TRUMP2016 , TRUMP2016 ", 94, 75 });
SiddhiTestHelper.waitForEvents(100, 2, count, 60000);
Assert.assertEquals(2, count.get());
Assert.assertTrue(eventArrived);
executionPlanRuntime.shutdown();
}
} | wso2/wso2-marketing-demos | samples/USEAnalyticsSystem/src/election-siddhi-extensions/popularhtag/src/test/java/org/wso2/siddhi/extension/popularhtag/TopKTagsExtensionExtensionTestCase.java | Java | apache-2.0 | 3,395 | [
30522,
7427,
8917,
1012,
1059,
6499,
2475,
1012,
15765,
19114,
1012,
5331,
1012,
2759,
22893,
2290,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
16483,
1012,
9593,
1012,
9593,
18447,
26320,
1025,
12324,
12022,
4183,
1012,
7705,
1012,
20865,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* Copyright (c) 2009-2011 by Jan Stender,
* Zuse Institute Berlin
*
* Licensed under the BSD License, see LICENSE file for details.
*
*/
package org.xtreemfs.test.osd;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import junit.framework.TestCase;
import junit.textui.TestRunner;
import org.xtreemfs.common.Capability;
import org.xtreemfs.common.uuids.ServiceUUID;
import org.xtreemfs.common.xloc.StripingPolicyImpl;
import org.xtreemfs.dir.DIRConfig;
import org.xtreemfs.foundation.buffer.ReusableBuffer;
import org.xtreemfs.foundation.logging.Logging;
import org.xtreemfs.foundation.pbrpc.client.RPCAuthentication;
import org.xtreemfs.foundation.pbrpc.client.RPCResponse;
import org.xtreemfs.foundation.pbrpc.client.RPCResponseAvailableListener;
import org.xtreemfs.foundation.util.FSUtils;
import org.xtreemfs.osd.OSD;
import org.xtreemfs.osd.OSDConfig;
import org.xtreemfs.pbrpc.generatedinterfaces.GlobalTypes.SYSTEM_V_FCNTL;
import org.xtreemfs.pbrpc.generatedinterfaces.OSDServiceClient;
import org.xtreemfs.pbrpc.generatedinterfaces.GlobalTypes.FileCredentials;
import org.xtreemfs.pbrpc.generatedinterfaces.GlobalTypes.OSDWriteResponse;
import org.xtreemfs.pbrpc.generatedinterfaces.GlobalTypes.Replica;
import org.xtreemfs.pbrpc.generatedinterfaces.GlobalTypes.SnapConfig;
import org.xtreemfs.pbrpc.generatedinterfaces.GlobalTypes.XCap;
import org.xtreemfs.pbrpc.generatedinterfaces.GlobalTypes.XLocSet;
import org.xtreemfs.pbrpc.generatedinterfaces.OSD.ObjectData;
import org.xtreemfs.test.SetupUtils;
import org.xtreemfs.test.TestEnvironment;
public class StripingTest extends TestCase {
private static final boolean COW = false;
private TestEnvironment testEnv;
static class MRCDummy implements RPCResponseAvailableListener<OSDWriteResponse> {
private long issuedEpoch;
private long epoch;
private long fileSize;
private final String capSecret;
public MRCDummy(String capSecret) {
this.capSecret = capSecret;
}
Capability open(char mode) {
if (mode == 't')
issuedEpoch++;
return new Capability(FILE_ID, SYSTEM_V_FCNTL.SYSTEM_V_FCNTL_H_O_RDWR.getNumber()
| SYSTEM_V_FCNTL.SYSTEM_V_FCNTL_H_O_TRUNC.getNumber(), 60, System.currentTimeMillis(), "",
(int) issuedEpoch, false, COW ? SnapConfig.SNAP_CONFIG_ACCESS_CURRENT
: SnapConfig.SNAP_CONFIG_SNAPS_DISABLED, 0, capSecret);
}
synchronized long getFileSize() {
return fileSize;
}
@Override
public void responseAvailable(RPCResponse<OSDWriteResponse> r) {
try {
OSDWriteResponse resp = r.get();
// System.out.println("fs-update: " + resp);
if (resp.hasSizeInBytes()) {
final long newFileSize = resp.getSizeInBytes();
final long epochNo = resp.getTruncateEpoch();
if (epochNo < epoch)
return;
if (epochNo > epoch || newFileSize > fileSize) {
epoch = epochNo;
fileSize = newFileSize;
}
}
} catch (Exception exc) {
exc.printStackTrace();
System.exit(1);
}
}
}
private static final String FILE_ID = "1:1";
private static final int KB = 1;
private static final int SIZE = KB * 1024;
private static final byte[] ZEROS_HALF = new byte[SIZE / 2];
private static final byte[] ZEROS = new byte[SIZE];
private final DIRConfig dirConfig;
private final OSDConfig osdCfg1;
private final OSDConfig osdCfg2;
private final OSDConfig osdCfg3;
private final String capSecret;
private List<OSD> osdServer;
private List<ServiceUUID> osdIDs;
private OSDServiceClient client;
private final StripingPolicyImpl sp;
private XLocSet xloc;
/** Creates a new instance of StripingTest */
public StripingTest(String testName) throws IOException {
super(testName);
Logging.start(SetupUtils.DEBUG_LEVEL, SetupUtils.DEBUG_CATEGORIES);
osdCfg1 = SetupUtils.createOSD1Config();
osdCfg2 = SetupUtils.createOSD2Config();
osdCfg3 = SetupUtils.createOSD3Config();
capSecret = osdCfg1.getCapabilitySecret();
Replica r = Replica.newBuilder().setStripingPolicy(SetupUtils.getStripingPolicy(3, KB))
.setReplicationFlags(0).build();
sp = StripingPolicyImpl.getPolicy(r, 0);
dirConfig = SetupUtils.createDIRConfig();
}
@Override
protected void setUp() throws Exception {
System.out.println("TEST: " + getClass().getSimpleName() + "." + getName());
FSUtils.delTree(new File(SetupUtils.TEST_DIR));
// startup: DIR
testEnv = new TestEnvironment(new TestEnvironment.Services[] { TestEnvironment.Services.DIR_SERVICE,
TestEnvironment.Services.TIME_SYNC, TestEnvironment.Services.UUID_RESOLVER,
TestEnvironment.Services.MRC_CLIENT, TestEnvironment.Services.OSD_CLIENT });
testEnv.start();
osdIDs = new ArrayList<ServiceUUID>(3);
osdIDs.add(SetupUtils.getOSD1UUID());
osdIDs.add(SetupUtils.getOSD2UUID());
osdIDs.add(SetupUtils.getOSD3UUID());
osdServer = new ArrayList<OSD>(3);
osdServer.add(new OSD(osdCfg1));
osdServer.add(new OSD(osdCfg2));
osdServer.add(new OSD(osdCfg3));
client = testEnv.getOSDClient();
List<String> osdset = new ArrayList(3);
osdset.add(SetupUtils.getOSD1UUID().toString());
osdset.add(SetupUtils.getOSD2UUID().toString());
osdset.add(SetupUtils.getOSD3UUID().toString());
Replica r = Replica.newBuilder().setStripingPolicy(SetupUtils.getStripingPolicy(3, KB))
.setReplicationFlags(0).addAllOsdUuids(osdset).build();
xloc = XLocSet.newBuilder().setReadOnlyFileSize(0).setVersion(1).addReplicas(r)
.setReplicaUpdatePolicy("").build();
}
private Capability getCap(String fname) {
return new Capability(fname, SYSTEM_V_FCNTL.SYSTEM_V_FCNTL_H_O_RDWR.getNumber()
| SYSTEM_V_FCNTL.SYSTEM_V_FCNTL_H_O_TRUNC.getNumber(), 60, System.currentTimeMillis(), "", 0, false,
COW ? SnapConfig.SNAP_CONFIG_ACCESS_CURRENT : SnapConfig.SNAP_CONFIG_SNAPS_DISABLED, 0, capSecret);
}
@Override
protected void tearDown() throws Exception {
osdServer.get(0).shutdown();
osdServer.get(1).shutdown();
osdServer.get(2).shutdown();
testEnv.shutdown();
}
/* TODO: test delete/truncate epochs! */
public void testPUTandGET() throws Exception {
final int numObjs = 5;
final int[] testSizes = { 1, 2, SIZE - 1, SIZE };
for (int ts : testSizes) {
ReusableBuffer data = SetupUtils.generateData(ts);
String file = "1:1" + ts;
final FileCredentials fcred = FileCredentials.newBuilder().setXcap(getCap(file).getXCap())
.setXlocs(xloc).build();
for (int i = 0, osdIndex = 0; i < numObjs; i++, osdIndex = i % osdIDs.size()) {
// write an object with the given test size
ObjectData objdata = ObjectData.newBuilder().setChecksum(0).setZeroPadding(0)
.setInvalidChecksumOnOsd(false).build();
RPCResponse<OSDWriteResponse> r = client.write(osdIDs.get(osdIndex).getAddress(),
RPCAuthentication.authNone, RPCAuthentication.userService, fcred, file, i, 0, 0, 0,
objdata, data.createViewBuffer());
OSDWriteResponse resp = r.get();
r.freeBuffers();
assertTrue(resp.hasSizeInBytes());
assertEquals(i * SIZE + ts, resp.getSizeInBytes());
// read and check the previously written object
RPCResponse<ObjectData> r2 = client.read(osdIDs.get(osdIndex).getAddress(),
RPCAuthentication.authNone, RPCAuthentication.userService, fcred, file, i, 0, 0, data
.capacity());
ObjectData result = r2.get();
checkResponse(data.array(), result, r2.getData());
r2.freeBuffers();
}
}
}
public void testIntermediateHoles() throws Exception {
final FileCredentials fcred = FileCredentials.newBuilder().setXcap(getCap(FILE_ID).getXCap())
.setXlocs(xloc).build();
final ReusableBuffer data = SetupUtils.generateData(3);
// write the nineth object, check the file size
int obj = 8;
ObjectData objdata = ObjectData.newBuilder().setChecksum(0).setZeroPadding(0)
.setInvalidChecksumOnOsd(false).build();
RPCResponse<OSDWriteResponse> r = client.write(osdIDs.get(obj % osdIDs.size()).getAddress(),
RPCAuthentication.authNone, RPCAuthentication.userService, fcred, FILE_ID, obj, 0, 0, 0, objdata,
data.createViewBuffer());
OSDWriteResponse resp = r.get();
r.freeBuffers();
assertTrue(resp.hasSizeInBytes());
assertEquals(obj * SIZE + data.limit(), resp.getSizeInBytes());
// write the fifth object, check the file size
obj = 5;
r = client.write(osdIDs.get(obj % osdIDs.size()).getAddress(), RPCAuthentication.authNone,
RPCAuthentication.userService, fcred, FILE_ID, obj, 0, 0, 0, objdata, data.createViewBuffer());
resp = r.get();
r.freeBuffers();
assertTrue(!resp.hasSizeInBytes()
|| (resp.hasSizeInBytes() && (obj * SIZE + data.limit() == resp.getSizeInBytes())));
// check whether the first object consists of zeros
obj = 0;
RPCResponse<ObjectData> r2 = client.read(osdIDs.get(obj % osdIDs.size()).getAddress(),
RPCAuthentication.authNone, RPCAuthentication.userService, fcred, FILE_ID, obj, 0, 0, data
.capacity());
ObjectData result = r2.get();
// either padding data or all zeros
if (result.getZeroPadding() == 0)
checkResponse(ZEROS, result, r2.getData());
else
assertEquals(data.capacity(), result.getZeroPadding());
r2.freeBuffers();
// write the first object, check the file size header (must be null)
r = client.write(osdIDs.get(obj % osdIDs.size()).getAddress(), RPCAuthentication.authNone,
RPCAuthentication.userService, fcred, FILE_ID, obj, 0, 0, 0, objdata, data.createViewBuffer());
resp = r.get();
r.freeBuffers();
assertFalse(resp.hasSizeInBytes());
}
public void testWriteExtend() throws Exception {
final FileCredentials fcred = FileCredentials.newBuilder().setXcap(getCap(FILE_ID).getXCap())
.setXlocs(xloc).build();
final ReusableBuffer data = SetupUtils.generateData(3);
final byte[] paddedData = new byte[SIZE];
System.arraycopy(data.array(), 0, paddedData, 0, data.limit());
// write first object
ObjectData objdata = ObjectData.newBuilder().setChecksum(0).setZeroPadding(0)
.setInvalidChecksumOnOsd(false).build();
RPCResponse<OSDWriteResponse> r = client.write(osdIDs.get(0).getAddress(),
RPCAuthentication.authNone, RPCAuthentication.userService, fcred, FILE_ID, 0, 0, 0, 0, objdata,
data.createViewBuffer());
OSDWriteResponse resp = r.get();
r.freeBuffers();
// write second object
r = client.write(osdIDs.get(1).getAddress(), RPCAuthentication.authNone,
RPCAuthentication.userService, fcred, FILE_ID, 1, 0, 0, 0, objdata, data.createViewBuffer());
resp = r.get();
r.freeBuffers();
// read first object
RPCResponse<ObjectData> r2 = client.read(osdIDs.get(0).getAddress(), RPCAuthentication.authNone,
RPCAuthentication.userService, fcred, FILE_ID, 0, 0, 0, SIZE);
ObjectData result = r2.get();
ReusableBuffer dataOut = r2.getData();
// System.out.println(result);
// either padding data or all zeros
assertNotNull(dataOut);
assertEquals(3, dataOut.capacity());
assertEquals(SIZE - 3, result.getZeroPadding());
r2.freeBuffers();
}
/**
* tests the truncation of striped files
*/
public void testTruncate() throws Exception {
ReusableBuffer data = SetupUtils.generateData(SIZE);
FileCredentials fcred = FileCredentials.newBuilder().setXcap(getCap(FILE_ID).getXCap())
.setXlocs(xloc).build();
// -------------------------------
// create a file with five objects
// -------------------------------
for (int i = 0, osdIndex = 0; i < 5; i++, osdIndex = i % osdIDs.size()) {
ObjectData objdata = ObjectData.newBuilder().setChecksum(0).setZeroPadding(0)
.setInvalidChecksumOnOsd(false).build();
RPCResponse<OSDWriteResponse> r = client.write(osdIDs.get(osdIndex).getAddress(),
RPCAuthentication.authNone, RPCAuthentication.userService, fcred, FILE_ID, i, 0, 0, 0,
objdata, data.createViewBuffer());
OSDWriteResponse resp = r.get();
r.freeBuffers();
}
// ----------------------------------------------
// shrink the file to a length of one full object
// ----------------------------------------------
XCap newCap = fcred.getXcap().toBuilder().setTruncateEpoch(1).build();
fcred = fcred.toBuilder().setXcap(newCap).build();
RPCResponse<OSDWriteResponse> rt = client.truncate(osdIDs.get(0).getAddress(),
RPCAuthentication.authNone, RPCAuthentication.userService, fcred, FILE_ID, SIZE);
OSDWriteResponse resp = rt.get();
rt.freeBuffers();
assertTrue(resp.hasSizeInBytes());
assertEquals(SIZE, resp.getSizeInBytes());
// check whether all objects have the expected content
for (int i = 0, osdIndex = 0; i < 5; i++, osdIndex = i % osdIDs.size()) {
// try to read the object
RPCResponse<ObjectData> r2 = client.read(osdIDs.get(osdIndex).getAddress(),
RPCAuthentication.authNone, RPCAuthentication.userService, fcred, FILE_ID, i, 0, 0, SIZE);
ObjectData result = r2.get();
ReusableBuffer dataOut = r2.getData();
// the first object must exist, all other ones must have been
// deleted
if (i == 0)
checkResponse(data.array(), result, dataOut);
else
checkResponse(null, result, dataOut);
r2.freeBuffers();
}
// -------------------------------------------------
// extend the file to a length of eight full objects
// -------------------------------------------------
newCap = fcred.getXcap().toBuilder().setTruncateEpoch(2).build();
fcred = fcred.toBuilder().setXcap(newCap).build();
rt = client.truncate(osdIDs.get(0).getAddress(), RPCAuthentication.authNone,
RPCAuthentication.userService, fcred, FILE_ID, SIZE * 8);
resp = rt.get();
rt.freeBuffers();
assertTrue(resp.hasSizeInBytes());
assertEquals(SIZE * 8, resp.getSizeInBytes());
// check whether all objects have the expected content
for (int i = 0, osdIndex = 0; i < 8; i++, osdIndex = i % osdIDs.size()) {
// try to read the object
RPCResponse<ObjectData> r2 = client.read(osdIDs.get(osdIndex).getAddress(),
RPCAuthentication.authNone, RPCAuthentication.userService, fcred, FILE_ID, i, 0, 0, SIZE);
ObjectData result = r2.get();
ReusableBuffer dataOut = r2.getData();
// the first object must contain data, all other ones must contain
// zeros
if (i == 0)
checkResponse(data.array(), result, dataOut);
else {
if (dataOut == null) {
assertEquals(SIZE, result.getZeroPadding());
} else {
checkResponse(ZEROS, result, dataOut);
}
}
r2.freeBuffers();
}
// ------------------------------------------
// shrink the file to a length of 3.5 objects
// ------------------------------------------
newCap = fcred.getXcap().toBuilder().setTruncateEpoch(3).build();
fcred = fcred.toBuilder().setXcap(newCap).build();
final long size3p5 = (long) (SIZE * 3.5f);
rt = client.truncate(osdIDs.get(0).getAddress(), RPCAuthentication.authNone,
RPCAuthentication.userService, fcred, FILE_ID, size3p5);
resp = rt.get();
rt.freeBuffers();
assertTrue(resp.hasSizeInBytes());
assertEquals(size3p5, resp.getSizeInBytes());
// check whether all objects have the expected content
for (int i = 0, osdIndex = 0; i < 5; i++, osdIndex = i % osdIDs.size()) {
// try to read the object
RPCResponse<ObjectData> r2 = client.read(osdIDs.get(osdIndex).getAddress(),
RPCAuthentication.authNone, RPCAuthentication.userService, fcred, FILE_ID, i, 0, 0, SIZE);
ObjectData result = r2.get();
ReusableBuffer dataOut = r2.getData();
// the first object must contain data, all other ones must contain
// zeros, where the last one must only be half an object size
if (i == 0)
checkResponse(data.array(), result, dataOut);
else if (i == 3)
checkResponse(ZEROS_HALF, result, dataOut);
else if (i >= 4) {
assertEquals(0, result.getZeroPadding());
assertNull(dataOut);
} else {
if (dataOut == null) {
assertEquals(SIZE, result.getZeroPadding());
} else {
checkResponse(ZEROS, result, dataOut);
}
}
r2.freeBuffers();
}
// --------------------------------------------------
// truncate the file to the same length it had before
// --------------------------------------------------
newCap = fcred.getXcap().toBuilder().setTruncateEpoch(4).build();
fcred = fcred.toBuilder().setXcap(newCap).build();
rt = client.truncate(osdIDs.get(0).getAddress(), RPCAuthentication.authNone,
RPCAuthentication.userService, fcred, FILE_ID, size3p5);
resp = rt.get();
rt.freeBuffers();
assertTrue(resp.hasSizeInBytes());
assertEquals(size3p5, resp.getSizeInBytes());
// check whether all objects have the expected content
for (int i = 0, osdIndex = 0; i < 5; i++, osdIndex = i % osdIDs.size()) {
// try to read the object
RPCResponse<ObjectData> r2 = client.read(osdIDs.get(osdIndex).getAddress(),
RPCAuthentication.authNone, RPCAuthentication.userService, fcred, FILE_ID, i, 0, 0, SIZE);
ObjectData result = r2.get();
ReusableBuffer dataOut = r2.getData();
// the first object must contain data, all other ones must contain
// zeros, where the last one must only be half an object size
if (i == 0)
checkResponse(data.array(), result, dataOut);
else if (i == 3)
checkResponse(ZEROS_HALF, result, dataOut);
else if (i >= 4) {
assertEquals(0, result.getZeroPadding());
assertNull(dataOut);
} else {
if (dataOut == null) {
assertEquals(SIZE, result.getZeroPadding());
} else {
checkResponse(ZEROS, result, dataOut);
}
}
r2.freeBuffers();
}
// --------------------------------
// truncate the file to zero length
// --------------------------------
newCap = fcred.getXcap().toBuilder().setTruncateEpoch(5).build();
fcred = fcred.toBuilder().setXcap(newCap).build();
rt = client.truncate(osdIDs.get(0).getAddress(), RPCAuthentication.authNone,
RPCAuthentication.userService, fcred, FILE_ID, 0);
resp = rt.get();
rt.freeBuffers();
assertTrue(resp.hasSizeInBytes());
assertEquals(0, resp.getSizeInBytes());
// check whether all objects have the expected content
for (int i = 0, osdIndex = 0; i < 5; i++, osdIndex = i % osdIDs.size()) {
// try to read the object
RPCResponse<ObjectData> r2 = client.read(osdIDs.get(osdIndex).getAddress(),
RPCAuthentication.authNone, RPCAuthentication.userService, fcred, FILE_ID, i, 0, 0, SIZE);
ObjectData result = r2.get();
assertEquals(0, result.getZeroPadding());
assertNull(r2.getData());
r2.freeBuffers();
}
data = SetupUtils.generateData(5);
// ----------------------------------
// write new data to the first object
// ----------------------------------
ObjectData objdata = ObjectData.newBuilder().setChecksum(0).setZeroPadding(0)
.setInvalidChecksumOnOsd(false).build();
rt = client.write(osdIDs.get(0).getAddress(), RPCAuthentication.authNone,
RPCAuthentication.userService, fcred, FILE_ID, 0, 0, 0, 0, objdata, data.createViewBuffer());
resp = rt.get();
rt.freeBuffers();
assertTrue(resp.hasSizeInBytes());
assertEquals(5, resp.getSizeInBytes());
// ----------------------------------------------
// extend the file to a length of one full object
// ----------------------------------------------
newCap = fcred.getXcap().toBuilder().setTruncateEpoch(6).build();
fcred = fcred.toBuilder().setXcap(newCap).build();
rt = client.truncate(osdIDs.get(0).getAddress(), RPCAuthentication.authNone,
RPCAuthentication.userService, fcred, FILE_ID, SIZE);
resp = rt.get();
rt.freeBuffers();
assertTrue(resp.hasSizeInBytes());
assertEquals(SIZE, resp.getSizeInBytes());
// try to read the object
RPCResponse<ObjectData> r2 = client.read(osdIDs.get(0).getAddress(), RPCAuthentication.authNone,
RPCAuthentication.userService, fcred, FILE_ID, 0, 0, 0, SIZE);
ObjectData result = r2.get();
// the object must contain data plus padding zeros
final byte[] dataWithZeros = new byte[SIZE];
System.arraycopy(data.array(), 0, dataWithZeros, 0, data.limit());
checkResponse(dataWithZeros, result, r2.getData());
r2.freeBuffers();
// ---------------------------------------------
// shrink the file to a length of half an object
// ---------------------------------------------
newCap = fcred.getXcap().toBuilder().setTruncateEpoch(7).build();
fcred = fcred.toBuilder().setXcap(newCap).build();
rt = client.truncate(osdIDs.get(0).getAddress(), RPCAuthentication.authNone,
RPCAuthentication.userService, fcred, FILE_ID, SIZE / 2);
resp = rt.get();
rt.freeBuffers();
assertTrue(resp.hasSizeInBytes());
assertEquals(SIZE / 2, resp.getSizeInBytes());
// try to read the object
r2 = client.read(osdIDs.get(0).getAddress(), RPCAuthentication.authNone,
RPCAuthentication.userService, fcred, FILE_ID, 0, 0, 0, SIZE);
result = r2.get();
// the object must contain data plus padding zeros
final byte[] dataWithHalfZeros = new byte[SIZE / 2];
System.arraycopy(data.array(), 0, dataWithHalfZeros, 0, data.limit());
checkResponse(dataWithHalfZeros, result, r2.getData());
r2.freeBuffers();
}
public void testInterleavedWriteAndTruncate() throws Exception {
final int numIterations = 20;
final int maxObject = 20;
final int maxSize = maxObject * SIZE;
final int numWrittenObjs = 5;
final MRCDummy mrcDummy = new MRCDummy(capSecret);
FileCredentials fcred = FileCredentials.newBuilder().setXcap(getCap(FILE_ID).getXCap())
.setXlocs(xloc).build();
final List<RPCResponse> responses = new LinkedList<RPCResponse>();
for (int l = 0; l < numIterations; l++) {
Capability cap = mrcDummy.open('w');
// randomly write 'numWrittenObjs' objects
for (int i = 0; i < numWrittenObjs; i++) {
final int objId = (int) (Math.random() * maxObject);
final int osdIndex = objId % osdIDs.size();
// write an object with a random amount of bytes
final int size = (int) ((SIZE - 1) * Math.random()) + 1;
ObjectData objdata = ObjectData.newBuilder().setChecksum(0).setZeroPadding(0)
.setInvalidChecksumOnOsd(false).build();
RPCResponse<OSDWriteResponse> r = client.write(osdIDs.get(osdIndex).getAddress(),
RPCAuthentication.authNone, RPCAuthentication.userService, fcred, FILE_ID, objId, 0, 0,
0, objdata, SetupUtils.generateData(size));
responses.add(r);
// update the file size when the response is received
r.registerListener(mrcDummy);
}
// wait until all write requests have been completed, i.e. all file
// size updates have been performed
for (RPCResponse r : responses) {
r.waitForResult();
r.freeBuffers();
}
responses.clear();
fcred = fcred.toBuilder().setXcap(mrcDummy.open('t').getXCap()).build();
// truncate the file
long newSize = (long) (Math.random() * maxSize);
RPCResponse<OSDWriteResponse> rt = client.truncate(osdIDs.get(0).getAddress(),
RPCAuthentication.authNone, RPCAuthentication.userService, fcred, FILE_ID, newSize);
rt.registerListener(mrcDummy);
rt.waitForResult();
rt.freeBuffers();
long fileSize = mrcDummy.getFileSize();
// read the previously truncated objects, check size
for (int i = 0; i < maxObject; i++) {
RPCResponse<ObjectData> r2 = client.read(osdIDs.get(i % osdIDs.size()).getAddress(),
RPCAuthentication.authNone, RPCAuthentication.userService, fcred, FILE_ID, i, 0, 0, SIZE);
ObjectData result = r2.get();
ReusableBuffer dataOut = r2.getData();
int dataOutLen = (dataOut == null) ? 0 : dataOut.capacity();
// check inner objects - should be full
if (i < fileSize / SIZE)
assertEquals(SIZE, result.getZeroPadding() + dataOutLen);
// check last object - should either be an EOF (null) or partial
// object
else if (i == fileSize / SIZE) {
if (fileSize % SIZE == 0)
assertEquals(0, result.getZeroPadding() + dataOutLen);
else
assertEquals(fileSize % SIZE, result.getZeroPadding() + dataOutLen);
}
// check outer objects - should be EOF (null)
else
assertEquals(0, result.getZeroPadding() + dataOutLen);
r2.freeBuffers();
}
}
}
/**
* tests the deletion of striped files
*/
// public void testDELETE() throws Exception {
//
// final int numObjs = 5;
//
// final FileCredentials fcred = new FileCredentials(xloc,
// getCap(FILE_ID).getXCap());
//
// ReusableBuffer data = SetupUtils.generateData(SIZE);
//
// // create all objects
// for (int i = 0, osdIndex = 0; i < numObjs; i++, osdIndex = i %
// osdIDs.size()) {
//
// ObjectData objdata = new ObjectData(data.createViewBuffer(), 0, 0,
// false);
// RPCResponse<OSDWriteResponse> r =
// client.write(osdIDs.get(osdIndex).getAddress(),
// FILE_ID, fcred, i, 0, 0, 0, objdata);
// r.get();
// }
//
// // delete the file
// RPCResponse dr = client.unlink(osdIDs.get(0).getAddress(), FILE_ID,
// fcred);
// dr.get();
// dr.freeBuffers();
// }
public static void main(String[] args) {
TestRunner.run(StripingTest.class);
}
/**
* Checks whether the data array received with the response is equal to the
* given one.
*
* @param data
* the data array
* @param response
* the response
* @throws Exception
*/
public void checkResponse(byte[] data, ObjectData response, ReusableBuffer objData) throws Exception {
if (data == null) {
if (objData != null)
/*
* System.out.println("body (" + response.getBody().capacity() +
* "): " + new String(response.getBody().array()));
*/
assertEquals(0, objData.remaining());
}
else {
byte[] responseData = objData.array();
assertEquals(data.length, responseData.length);
for (int i = 0; i < data.length; i++)
assertEquals(data[i], responseData[i]);
}
}
}
| stanik137/xtreemfs | java/servers/test/org/xtreemfs/test/osd/StripingTest.java | Java | bsd-3-clause | 31,429 | [
30522,
1013,
1008,
1008,
9385,
1006,
1039,
1007,
2268,
1011,
2249,
2011,
5553,
26261,
11563,
1010,
1008,
16950,
3366,
2820,
4068,
1008,
1008,
7000,
2104,
1996,
18667,
2094,
6105,
1010,
2156,
6105,
5371,
2005,
4751,
1012,
1008,
1008,
1013,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<table border="1" id="table1" style="border-collapse: collapse">
<tr>
<td height="25" align="center"><span style="font-size: 16px">三国</span></td>
<td height="25" align="center"><span style="font-size: 16px">公元245年</span></td>
<td height="25" align="center"><span style="font-size: 16px">乙丑</span></td>
<td height="25px" align="center"><span style="font-size: 16px">正始六年</span></td>
</tr>
<tr>
<td colspan="4">
<table border="0" width="100%">
<tr>
<td valign="top">
<b>历史纪事</b> </td>
<td>
<div>吴太子和与鲁王霸不睦
初,吴帝孙权使吴太子和与弟鲁王霸同宫居隹,礼秩相同,群臣多以为不妥。权乃令二人分宫,二子因而有隙。鲁王霸曲意结交当时名士,杨竺、全寄、吴安、孙奇等均为其党。于是由二宫僚属、侍御、宾客起,分为两党,延至大臣。权闻之,以需专心精学为由,禁断二子宾客往来。全公主(孙鲁班、全琮妻)与太子和母王夫人有隙,亦数次谮毁太子,太子宠益衰。陆逊上疏,认为太子为正统,鲁王为藩臣,当使有别。权不悦。太常顾谭亦上疏陈嫡庶之别,于是鲁王与谭有隙。芍陂(今安徽泰县南)战后,全琮(全寄父)子端、绪与顾弟承及子休争功,谮毁二人于孙权,权徙谭、承、休于交州,又追赐休死,吴赤乌八年(245)初,太子太傅吾粲请使鲁王出镇夏口(今湖北武汉),令杨竺等不得在京师,并数次与陆逊通消息;鲁王与杨竺共谮之,权怒,收粲下狱,诛。孙权又数次遣中使责问陆逊,吴赤乌八年二月,陆逊愤恨而卒。
马茂谋杀孙权不遂
吴赤乌八年(245)七月,吴将马茂与兼符节令朱贞、无难督虞钦、牙门将朱志等合谋,欲乘孙权与公卿诸将入苑射猎,权在苑中,而众臣在门外未入时,朱贞持节宣诏,尽收众臣,而由马茂入苑击权,分据宫中及石头坞,遣人报魏。事泄,均被族诛。马茂原为魏钟离(今安徽凤阳东北)长,叛降吴,为吴征西将军,领九江太守、外部督,封侯,领兵千人。
吴凿破岗渎
吴赤乌八年(245)八月,遣校尉陈勋率屯田兵及作士三万人,凿破岗渎,开通从句容(今江苏),以南向东至云阳(今江苏丹阳)西城的河道,使航路可从建业直通吴会。并开市以会商旅。
魏诏学者课试王郎《易传》
魏正始六年(245)十二月初五(辛亥),诏以故司徒王郎所作《易传》课试学者。</div></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="4">
<table border="0" width="100%">
<tr>
<td valign="top">
<b>文化纪事</b> </td>
<td>
<div>缪袭卒
缪袭(186——245)字熙伯,东海兰陵(今山东苍山兰陵镇)人。曾任职御史大夫府,官至尚书,光禄勋。历仕魏四世,有才学,多所著述。魏改汉乐府十二曲为魏鼓吹曲,由袭作词,为操、丕、睿颂功德;诗作以《挽歌》较著名,另存《喜霁赋》、《青龙赋》等文数篇。原有集五卷,均佚。</div></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="4">
<table border="0" width="100%">
<tr>
<td valign="top">
<b>杂谭逸事</b> </td>
<td>
<div>陆逊卒
陆逊(183——245),本名议,字伯言,吴郡吴(今江苏苏州)人。世为江东大族,孙策婿。初为孙权幕府,后累迁为右部督,攻丹杨山越,得精兵数万人,汉建安二十四年(219),与吕蒙定袭取荆州之计,擒杀关羽。吴黄武元年(222),陆逊为大都督,率兵五万西拒刘备,坚守七八个月不战,等蜀军疲,乃顺风放火,取得夷陵之战的胜利。领荆州牧,封江陵侯。吴黄武七年,又大破魏大司马曹休于石亭(今安徽怀宁、桐城间)。吴蜀连和,孙权每与蜀书,常先交陆逊,有所不安,便令改定。吴黄龙元年(229)拜上大将军、右都护。同年,孙权迁都建业,使逊留武昌,辅太子登。吴赤乌七年(244)代顾雍为丞相。仍留驻武昌。时吴太子和与鲁王霸争位,逊数上疏陈嫡庶之分,权不听。逊外甥顾谭、顾承、姚信亦以亲附太子遭流放。逊卒后,孙权以杨竺所白陆逊二十事一一问陆逊子抗,抗事事条答,权意乃稍解。
赵俨卒
赵俨(171——245),字伯然,颍川阳翟(今河南禹县)人。东汉末避乱荆州。建安二年(197),投曹操,为司空掾属主簿。从曹操征荆州。建安二十四年,以议郎与徐晃至樊城助曹仁拒关羽。曹丕即位,俨为侍中,领河东(今山西夏县东北)太守。曹休拒孙权,以俨为军师,曹睿即位,进封都乡侯,齐王曹芳即位,以俨都督雍、凉诸军事。魏正始四年(243)老病求还,六年,迁司空。卒谥穆侯。赵俨与同郡辛毗、陈群、杜袭齐名,号为辛、陈、杜、赵。
蒋琬卒
蜀延熙八年(一说为延熙九年,245——246)十一月,大司马蒋碗卒。蜀帝刘禅自摄国事。蒋琬(?——245),字公琰,零陵湘乡人。以荆州书佐随刘备入蜀,除广都(今四川成都东南,一说今四川双流)长。刘备偶至广都,见蒋琬不理公事,时又酒醉,大怒,欲罪之。诸葛亮认为蒋琬为社稷之器、非百里之才,为琬求请。刘备堍亮,但免蒋琬官而已。不久,又除什邡(今四川)令。刘备称汉中王,琬入为尚书郎。蜀建兴元年(223),琬为丞相东曹掾,迁为参军。八年,为长史,加抚军将军。诸葛亮数次北代,琬常足兵足食以相供给。亮卒,以琬为尚书令,加行都护,假节,领益州牧,迁大将军,录尚书事,封字阳亭侯。蜀延熙二年(239),加为大司马。卒谥恭侯。
董允卒
蜀延熙八年(一说为延熙九年,245——246),蜀守尚书令董允卒。董允(?——245),字休昭,南郡枝江(今湖北)人。刘备立太子,允为太子舍人,徙太子洗马。后主刘祥即位,迁黄门侍郎。诸葛亮将北伐,驻汉中,虑后主年轻,是非不别,上疏请以允任宫省事。迁侍中,领虎贲中郎将,统令宿亲兵。董允事事防制,匡正后主。后主常欲采择宫女,允以为古时天子后妃之数不过十二,今后宫嫔、嫱已具,不宜增加,终不听。后主畏怕之。及后主渐长,宠宦人黄皓,允常正色语后主,并多次责问黄皓,皓畏允,不敢为非。终允之世,皓位不过黄门丞。蜀延熙六年(243),加辅国将军,七年,以侍中守尚书令,为大将军费祎副贰。卒后,黄皓渐操弄权柄,终至灭国。蜀人无不追思允。</div></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="4">
<table border="0" width="100%">
<tr>
<td valign="top">
<b>注释</b></td>
<td>
<div>延熙八年 赤乌八年</div></td>
</tr>
</table>
</td>
</tr>
<tr>
</tr></table>
| ilearninging/xxhis | all/1172.html | HTML | apache-2.0 | 7,126 | [
30522,
1026,
2795,
3675,
1027,
1000,
1015,
1000,
8909,
1027,
1000,
2795,
2487,
1000,
2806,
1027,
1000,
3675,
1011,
7859,
1024,
7859,
1000,
1028,
1026,
19817,
1028,
1026,
14595,
4578,
1027,
1000,
2423,
30524,
1026,
1013,
8487,
1028,
1026,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
//
// SPTestRailReporter.h
// DocsAtWork
//
// Created by Siddartha Polisetty on 3/22/16.
// Copyright (c) 2016 Siddartha Polisetty
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
#import <Foundation/Foundation.h>
#import <AFNetworking/AFNetworking.h>
#import "SPTestRailConfigurationBuilder.h"
#import "SPTestRailProject.h"
#import "SPTestRailSuite.h"
#import "SPTestRailProject.h"
#import "SPTestRailCase.h"
#import "SPTestRailMileStone.h"
#import "SPTestRailRun.h"
#import "SPTestRailUser.h"
#import "SPTestRailSection.h"
#import "SPTestRailPlan.h"
#import "SPTestRailConfigGroup.h"
#import "SPTestRailTest.h"
#import "SPTestRailResult.h"
@interface SPTestRailReporter : NSObject
+ (instancetype)sharedReporter;
#pragma mark - Result CRUD
- (NSArray *)getAllResultsforTestId:(NSNumber *)testId Error:(NSError *__autoreleasing *)error;
- (NSArray *)getAllResultsforCaseId:(NSNumber *)caseId ForRunId:(NSNumber *)runId Error:(NSError *__autoreleasing *)error;
- (NSArray *)getAllResultsforRunId:(NSNumber *)runId Error:(NSError *__autoreleasing *)error;
- (SPTestRailResult *)addResult:(SPTestRailResult *)result ForTestId:(NSNumber *)testId Error:(NSError *__autoreleasing *)error;
- (SPTestRailResult *)addResult:(SPTestRailResult *)result ForRunId:(NSNumber *)runId ForCaseId:(NSNumber *)caseId Error:(NSError *__autoreleasing *)error;
- (NSArray *)addResults:(NSArray *)testResults ForRunId:(NSNumber *)runId Error:(NSError *__autoreleasing *)error;
- (NSArray *)addResultsForCases:(NSArray *)testResults ForRunId:(NSNumber *)runId Error:(NSError *__autoreleasing *)error;
#pragma mark - Test CRUD
- (SPTestRailTest *)getTestWithId:(NSNumber *)testId Error:(NSError *__autoreleasing *)error;
- (NSArray *)getAllTestsWithRunId:(NSNumber *)runId Error:(NSError *__autoreleasing *)error;
#pragma mark - Case CRUD
- (SPTestRailCase *)getCaseWithId:(NSNumber *)caseId Error:(NSError *__autoreleasing *)error;
- (NSArray *)getAllCasesForProjectId:(NSNumber *)projectId WithSectionId:(NSNumber *)sectionId WithSuiteId:(NSNumber *)suiteId Error:(NSError *__autoreleasing *)error;
- (SPTestRailCase *)addCase:(SPTestRailCase *)testCase WithSectionId:(NSNumber *)sectionId Error:(NSError *__autoreleasing *)error;
- (SPTestRailCase *)updateCase:(SPTestRailCase *)testCase Error:(NSError *__autoreleasing *)error;
- (BOOL)deleteCaseWithId:(NSNumber *)caseId Error:(NSError *__autoreleasing *)error;
#pragma mark - Configuration CRUD
- (NSArray *)getAllConfigGroupsForProjectId:(NSNumber *)projectId Error:(NSError *__autoreleasing *)error;
- (BOOL)deleteConfigWithId:(NSNumber *)configId Error:(NSError *__autoreleasing *)error;
- (BOOL)deleteConfigGroupWithId:(NSNumber *)configGroupId Error:(NSError *__autoreleasing *)error;
- (SPTestRailConfig *)addConfig:(SPTestRailConfig *)config InConfigGroupId:(NSNumber *)configGroupId Error:(NSError *__autoreleasing *)error;
- (SPTestRailConfigGroup *)addConfigGroup:(SPTestRailConfigGroup *)configGroup InProjectId:(NSNumber *)projectId Error:(NSError *__autoreleasing *)error;
- (SPTestRailConfig *)updateConfig:(SPTestRailConfig *)config Error:(NSError *__autoreleasing *)error;
- (SPTestRailConfigGroup *)updateConfigurationGroup:(SPTestRailConfigGroup *)configGroup Error:(NSError *__autoreleasing *)error;
#pragma mark - Plan CRUD
- (NSArray *)getAllPlansForProjectId:(NSNumber *)projectId Error:(NSError *__autoreleasing *)error;
- (SPTestRailPlan *)getPlanWithId:(NSNumber *)planId Error:(NSError *__autoreleasing *)error;
- (BOOL)closePlanWithId:(NSNumber *)planId Error:(NSError *__autoreleasing *)error;
- (BOOL)deletePlanWithId:(NSNumber *)planId Error:(NSError *__autoreleasing *)error;
- (SPTestRailPlan *)addPlan:(SPTestRailPlan *)plan ForProjectId:(NSNumber *)projectId Error:(NSError *__autoreleasing *)error;
- (SPTestRailPlan *)updatePlan:(SPTestRailPlan *)plan Error:(NSError *__autoreleasing *)error;
- (SPTestRailPlanEntry *)addPlanEntry:(SPTestRailPlanEntry *)entry InPlanId:(NSNumber *)planId Error:(NSError *__autoreleasing *)error;
- (SPTestRailPlanEntry *)updatePlanEntry:(SPTestRailPlanEntry *)entry InPlanId:(NSNumber *)planId Error:(NSError *__autoreleasing *)error;
- (BOOL)deletePLanEntryWithEntryId:(NSString *)entryId InPlanId:(NSNumber *)planId Error:(NSError *__autoreleasing *)error;
#pragma mark - Run CRUD
- (NSArray *)getAllRunsForProjectId:(NSNumber *)projectId Error:(NSError *__autoreleasing *)error;
- (SPTestRailRun *)getRunWithId:(NSNumber *)runId Error:(NSError *__autoreleasing *)error;
- (BOOL)closeRunWithId:(NSNumber *)runId Error:(NSError *__autoreleasing *)error;
- (BOOL)deleteRunWithId:(NSNumber *)runId Error:(NSError *__autoreleasing *)error;
- (SPTestRailRun *)addRun:(SPTestRailRun *)run ForProjectId:(NSNumber *)projectId Error:(NSError *__autoreleasing *)error;
- (SPTestRailRun *)updateRun:(SPTestRailRun *)run Error:(NSError *__autoreleasing *)error;
#pragma mark - Suite CRUD
- (SPTestRailSuite *)addSuite:(SPTestRailSuite *)suite ForProjectId:(NSNumber *)projectId Error:(NSError *__autoreleasing *)error;
- (SPTestRailSuite *)updateSuite:(SPTestRailSuite *)suite Error:(NSError *__autoreleasing *)error;
- (BOOL)deleteSuiteWithId:(NSNumber *)suiteId Error:(NSError *__autoreleasing *)error;
- (NSArray *)getAllSuitesForProject:(NSNumber *)projectId Error:(NSError *__autoreleasing *)error;
- (SPTestRailSuite *)getSuiteWithId:(NSNumber *)suiteId Error:(NSError *__autoreleasing *)error;
#pragma mark - Section CRUD
- (SPTestRailSection *)addSection:(SPTestRailSection *)section ForProjectId:(NSNumber *)projectId Error:(NSError *__autoreleasing *)error;
- (SPTestRailSection *)updateSection:(SPTestRailSection *)section Error:(NSError *__autoreleasing *)error;
- (BOOL)deleteSectionWithId:(NSNumber *)sectionId Error:(NSError *__autoreleasing *)error;
- (NSArray *)getAllSectionsForProjectWithId:(NSNumber *)projectId WithSuiteId:(NSNumber *)suiteId Error:(NSError *__autoreleasing *)error;
- (SPTestRailSection *)getSectionWithId:(NSNumber *)sectionId Error:(NSError *__autoreleasing *)error;
#pragma mark - Milestone CRUD
- (SPTestRailMileStone *)addMileStone:(SPTestRailMileStone *)mileStone ForProjectId:(NSNumber *)projectId Error:(NSError *__autoreleasing *)error;
- (SPTestRailMileStone *)updateMileStone:(SPTestRailMileStone *)mileStone Error:(NSError *__autoreleasing *)error;
- (BOOL)deleteMileStoneWithId:(NSNumber *)mileStoneId Error:(NSError *__autoreleasing *)error;
- (NSArray *)getAllMileStonesForProjectWithId:(NSNumber *)projectId Error:(NSError *__autoreleasing *)error;
- (SPTestRailMileStone *)getMileStoneWithId:(NSNumber *)mileStoneId Error:(NSError *__autoreleasing *)error;
#pragma mark - User CRUD
- (NSArray *)getAllUsersError:(NSError *__autoreleasing *)error;
- (SPTestRailUser *)getUserWithId:(NSNumber *)userId Error:(NSError *__autoreleasing *)error;
- (SPTestRailUser *)getUserWithEmail:(NSString *)email Error:(NSError *__autoreleasing *)error;
#pragma mark - Project CRUD
- (SPTestRailProject *)addProject:(SPTestRailProject *)project Error:(NSError *__autoreleasing *)error;
- (SPTestRailProject *)updateProject:(SPTestRailProject *)project Error:(NSError *__autoreleasing *)error;
- (BOOL)deleteProjectWithId:(NSNumber *)projectId Error:(NSError *__autoreleasing *)error;
- (NSArray *)getAllProjectsError:(NSError *__autoreleasing *)error;
- (SPTestRailProject *)getProjectWithId:(NSNumber *)projectId Error:(NSError *__autoreleasing *)error;
@end
| SiddarthaPolisetty/SPTestRailReporter | SPTestRailReporter/SPTestRailReporter.h | C | mit | 8,457 | [
30522,
1013,
1013,
1013,
1013,
11867,
22199,
15118,
2890,
6442,
2121,
1012,
1044,
1013,
1013,
9986,
16846,
6198,
1013,
1013,
1013,
1013,
2580,
2011,
15765,
7662,
8322,
14955,
5562,
15353,
2006,
1017,
1013,
2570,
1013,
2385,
1012,
1013,
1013... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<?php
namespace Veles\Tests\Exceptions\Http;
use PHPUnit\Framework\TestCase;
use Veles\Exceptions\Http\UnauthorizedException;
/**
* Generated by PHPUnit_SkeletonGenerator on 2015-09-13 at 14:56:42.
* @group exceptions
*/
class UnauthorizedExceptionTest extends TestCase
{
public function testConstruct()
{
new UnauthorizedException;
$msg = 'UnauthorizedException::__construct() wrong behavior!';
self::assertSame(401, http_response_code(), $msg);
//$expected = 'WWW-Authenticate: Basic realm="Application Name"';
//$result = '';
//
//foreach (headers_list() as $header) {
// if (strstr($header, 'WWW-Authenticate:')) {
// $result = $header;
// break;
// }
//}
//
//self::assertSame($expected, $result, $msg);
}
}
| nafigator/Veles-unit-tests | Exceptions/Http/UnauthorizedExceptionTest.php | PHP | bsd-3-clause | 754 | [
30522,
1026,
1029,
25718,
3415,
15327,
2310,
4244,
1032,
5852,
1032,
11790,
1032,
8299,
1025,
2224,
25718,
19496,
2102,
1032,
7705,
1032,
3231,
18382,
1025,
2224,
2310,
4244,
1032,
11790,
1032,
8299,
1032,
24641,
10288,
24422,
1025,
1013,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
module Azure::Network::Mgmt::V2018_11_01
module Models
#
# Frontend port of an application gateway.
#
class ApplicationGatewayFrontendPort < SubResource
include MsRestAzure
# @return [Integer] Frontend port
attr_accessor :port
# @return [String] Provisioning state of the frontend port resource.
# Possible values are: 'Updating', 'Deleting', and 'Failed'.
attr_accessor :provisioning_state
# @return [String] Name of the frontend port that is unique within an
# Application Gateway
attr_accessor :name
# @return [String] A unique read-only string that changes whenever the
# resource is updated.
attr_accessor :etag
# @return [String] Type of the resource.
attr_accessor :type
#
# Mapper for ApplicationGatewayFrontendPort class as Ruby Hash.
# This will be used for serialization/deserialization.
#
def self.mapper()
{
client_side_validation: true,
required: false,
serialized_name: 'ApplicationGatewayFrontendPort',
type: {
name: 'Composite',
class_name: 'ApplicationGatewayFrontendPort',
model_properties: {
id: {
client_side_validation: true,
required: false,
serialized_name: 'id',
type: {
name: 'String'
}
},
port: {
client_side_validation: true,
required: false,
serialized_name: 'properties.port',
type: {
name: 'Number'
}
},
provisioning_state: {
client_side_validation: true,
required: false,
serialized_name: 'properties.provisioningState',
type: {
name: 'String'
}
},
name: {
client_side_validation: true,
required: false,
serialized_name: 'name',
type: {
name: 'String'
}
},
etag: {
client_side_validation: true,
required: false,
serialized_name: 'etag',
type: {
name: 'String'
}
},
type: {
client_side_validation: true,
required: false,
serialized_name: 'type',
type: {
name: 'String'
}
}
}
}
}
end
end
end
end
| Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-11-01/generated/azure_mgmt_network/models/application_gateway_frontend_port.rb | Ruby | mit | 2,912 | [
30522,
1001,
17181,
1024,
21183,
2546,
1011,
1022,
1001,
3642,
7013,
2011,
7513,
1006,
1054,
1007,
8285,
28533,
3642,
13103,
1012,
1001,
3431,
2089,
3426,
16542,
5248,
1998,
2097,
2022,
2439,
2065,
1996,
3642,
2003,
1001,
19723,
24454,
4383... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<!-- THIS FILE IS GENERATED VIA '.template-helpers/generate-tag-details.pl' -->
# Tags of `ruby`
- [`ruby:2.0.0-p647`](#ruby200-p647)
- [`ruby:2.0.0`](#ruby200)
- [`ruby:2.0`](#ruby20)
- [`ruby:2.0.0-p647-onbuild`](#ruby200-p647-onbuild)
- [`ruby:2.0.0-onbuild`](#ruby200-onbuild)
- [`ruby:2.0-onbuild`](#ruby20-onbuild)
- [`ruby:2.0.0-p647-slim`](#ruby200-p647-slim)
- [`ruby:2.0.0-slim`](#ruby200-slim)
- [`ruby:2.0-slim`](#ruby20-slim)
- [`ruby:2.1.7`](#ruby217)
- [`ruby:2.1`](#ruby21)
- [`ruby:2.1.7-onbuild`](#ruby217-onbuild)
- [`ruby:2.1-onbuild`](#ruby21-onbuild)
- [`ruby:2.1.7-slim`](#ruby217-slim)
- [`ruby:2.1-slim`](#ruby21-slim)
- [`ruby:2.2.3`](#ruby223)
- [`ruby:2.2`](#ruby22)
- [`ruby:2`](#ruby2)
- [`ruby:latest`](#rubylatest)
- [`ruby:2.2.3-onbuild`](#ruby223-onbuild)
- [`ruby:2.2-onbuild`](#ruby22-onbuild)
- [`ruby:2-onbuild`](#ruby2-onbuild)
- [`ruby:onbuild`](#rubyonbuild)
- [`ruby:2.2.3-slim`](#ruby223-slim)
- [`ruby:2.2-slim`](#ruby22-slim)
- [`ruby:2-slim`](#ruby2-slim)
- [`ruby:slim`](#rubyslim)
## `ruby:2.0.0-p647`
- Total Virtual Size: 705.2 MB (705162696 bytes)
- Total v2 Content-Length: 269.4 MB (269376466 bytes)
### Layers (17)
#### `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
```dockerfile
ADD file:b770303e11edaa0ad0d8f43f6db4fa26673923912b5d5f7cb748ba025e6c4d3b in /
```
- Created: Thu, 20 Aug 2015 20:17:59 GMT
- Docker Version: 1.7.1
- Virtual Size: 125.2 MB (125174904 bytes)
- v2 Blob: `sha256:7ccc78f8af6db23a5013f7b90b5672b82d69dd2fb30d1e6736dba29209aceee7`
- v2 Content-Length: 51.4 MB (51368377 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:40:09 GMT
#### `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
```dockerfile
CMD ["/bin/bash"]
```
- Created: Thu, 20 Aug 2015 20:18:01 GMT
- Parent Layer: `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
wget \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:24:45 GMT
- Parent Layer: `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
- Docker Version: 1.7.1
- Virtual Size: 44.4 MB (44355942 bytes)
- v2 Blob: `sha256:eba087ca53a356384db448d54a51620cde9e91d4935e7cd134c3c571df8447c4`
- v2 Content-Length: 18.5 MB (18538916 bytes)
- v2 Last-Modified: Tue, 25 Aug 2015 22:15:52 GMT
#### `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
bzr \
git \
mercurial \
openssh-client \
subversion \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:25:45 GMT
- Parent Layer: `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
- Docker Version: 1.7.1
- Virtual Size: 122.3 MB (122318537 bytes)
- v2 Blob: `sha256:a068cb6fd68bb10bf1f97beedee2837c2b2a52109dbbb59ea25462d661006e0d`
- v2 Content-Length: 42.3 MB (42340018 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:59:13 GMT
#### `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
automake \
bzip2 \
file \
g++ \
gcc \
imagemagick \
libbz2-dev \
libc6-dev \
libcurl4-openssl-dev \
libevent-dev \
libffi-dev \
libglib2.0-dev \
libjpeg-dev \
liblzma-dev \
libmagickcore-dev \
libmagickwand-dev \
libmysqlclient-dev \
libncurses-dev \
libpng-dev \
libpq-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libtool \
libwebp-dev \
libxml2-dev \
libxslt-dev \
libyaml-dev \
make \
patch \
xz-utils \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Mon, 24 Aug 2015 16:11:35 GMT
- Parent Layer: `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
- Docker Version: 1.7.1
- Virtual Size: 313.7 MB (313666691 bytes)
- v2 Blob: `sha256:2ac01aa9d22a0c73405fe147734a6acf8929209620ca4a80fe8064449ab7d301`
- v2 Content-Length: 128.2 MB (128191020 bytes)
- v2 Last-Modified: Mon, 24 Aug 2015 16:55:37 GMT
#### `57172606478fe544e87cadf7ef98be1f8337fb9a8fbe4cb5d027f25c6eef0d0f`
```dockerfile
ENV RUBY_MAJOR=2.0
```
- Created: Tue, 25 Aug 2015 08:17:43 GMT
- Parent Layer: `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `5f77e63e5730321adf6bebebe309224cedda159839b903a8db252c9f016608c1`
```dockerfile
ENV RUBY_VERSION=2.0.0-p647
```
- Created: Tue, 25 Aug 2015 08:17:43 GMT
- Parent Layer: `57172606478fe544e87cadf7ef98be1f8337fb9a8fbe4cb5d027f25c6eef0d0f`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f6f3b171327c0c8862537d062b61cbd3cafcb18030390e871281a504070d4fe9`
```dockerfile
ENV RUBY_DOWNLOAD_SHA256=c88aaf5b4ec72e2cb7d290ff854f04d135939f6134f517002a9d65d5fc5e5bec
```
- Created: Tue, 25 Aug 2015 08:17:43 GMT
- Parent Layer: `5f77e63e5730321adf6bebebe309224cedda159839b903a8db252c9f016608c1`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `c5b051d2da18ec7ccf37b3523253d4e8c31363b75a493fc5457b85862fe8ff3f`
```dockerfile
ENV RUBYGEMS_VERSION=2.4.8
```
- Created: Tue, 25 Aug 2015 08:17:44 GMT
- Parent Layer: `f6f3b171327c0c8862537d062b61cbd3cafcb18030390e871281a504070d4fe9`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `cf475af3052e9fa149bf6686c85ffcb066ef6e523717aff0acb526f8cf8d420e`
```dockerfile
RUN echo 'install: --no-document\nupdate: --no-document' > "$HOME/.gemrc"
```
- Created: Tue, 25 Aug 2015 08:17:45 GMT
- Parent Layer: `c5b051d2da18ec7ccf37b3523253d4e8c31363b75a493fc5457b85862fe8ff3f`
- Docker Version: 1.7.1
- Virtual Size: 45.0 B
- v2 Blob: `sha256:bf6be5e09718d0c44661ae9835241ef4ea86fe5fc2905813585e7563b104b29f`
- v2 Content-Length: 161.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 05:47:04 GMT
#### `e197a3d883c8c0ad8f2a69140260f53b8e242631cda6dd9911f8afc525d7d4d4`
```dockerfile
RUN apt-get update \
&& apt-get install -y bison libgdbm-dev ruby \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/ruby \
&& curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
&& rm ruby.tar.gz \
&& cd /usr/src/ruby \
&& autoconf \
&& ./configure --disable-install-doc \
&& make -j"$(nproc)" \
&& make install \
&& apt-get purge -y --auto-remove bison libgdbm-dev ruby \
&& gem update --system $RUBYGEMS_VERSION \
&& rm -r /usr/src/ruby
```
- Created: Tue, 25 Aug 2015 08:21:46 GMT
- Parent Layer: `cf475af3052e9fa149bf6686c85ffcb066ef6e523717aff0acb526f8cf8d420e`
- Docker Version: 1.7.1
- Virtual Size: 98.5 MB (98522047 bytes)
- v2 Blob: `sha256:c2d1fdfcb4c55a98415b2304167a91d6946d10ea4662386a4d516a47afea9a72`
- v2 Content-Length: 28.4 MB (28437522 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:47:01 GMT
#### `682b7557535ccf234ddd723c34ce9d39d646cba9c37c388d894e64422cfa1fdd`
```dockerfile
ENV GEM_HOME=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:21:47 GMT
- Parent Layer: `e197a3d883c8c0ad8f2a69140260f53b8e242631cda6dd9911f8afc525d7d4d4`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `1a934001ef5e2b024acbd00b81d1363b956b07ad652ecf919da502ae1aff3584`
```dockerfile
ENV PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
```
- Created: Tue, 25 Aug 2015 08:21:47 GMT
- Parent Layer: `682b7557535ccf234ddd723c34ce9d39d646cba9c37c388d894e64422cfa1fdd`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `b2522c5019fd27ba60c909d85d4b8d6b350f2940dc481d187e26340a07cc135b`
```dockerfile
ENV BUNDLER_VERSION=1.10.6
```
- Created: Tue, 25 Aug 2015 08:21:48 GMT
- Parent Layer: `1a934001ef5e2b024acbd00b81d1363b956b07ad652ecf919da502ae1aff3584`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f9f99542a15e92be20bafa01620453c667fc5a7b4df79bb2b0d5f228110d38bf`
```dockerfile
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
```
- Created: Tue, 25 Aug 2015 08:21:51 GMT
- Parent Layer: `b2522c5019fd27ba60c909d85d4b8d6b350f2940dc481d187e26340a07cc135b`
- Docker Version: 1.7.1
- Virtual Size: 1.1 MB (1124530 bytes)
- v2 Blob: `sha256:4021d1190e5e92a1c97474c7f4f5a53fc8ac1ba3f582c60ebce10e1e6953d6c0`
- v2 Content-Length: 500.1 KB (500100 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:46:39 GMT
#### `4630d301b9afed4108cc30d900c9e109800361d2bede9b1bcc659715efd408a2`
```dockerfile
ENV BUNDLE_APP_CONFIG=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:21:52 GMT
- Parent Layer: `f9f99542a15e92be20bafa01620453c667fc5a7b4df79bb2b0d5f228110d38bf`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `041ca32db269c2c107351ac8028ad98ceeca1ed3cab9295d1e20d7cf1596cb99`
```dockerfile
CMD ["irb"]
```
- Created: Tue, 25 Aug 2015 08:21:52 GMT
- Parent Layer: `4630d301b9afed4108cc30d900c9e109800361d2bede9b1bcc659715efd408a2`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
## `ruby:2.0.0`
- Total Virtual Size: 705.2 MB (705162696 bytes)
- Total v2 Content-Length: 269.4 MB (269376466 bytes)
### Layers (17)
#### `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
```dockerfile
ADD file:b770303e11edaa0ad0d8f43f6db4fa26673923912b5d5f7cb748ba025e6c4d3b in /
```
- Created: Thu, 20 Aug 2015 20:17:59 GMT
- Docker Version: 1.7.1
- Virtual Size: 125.2 MB (125174904 bytes)
- v2 Blob: `sha256:7ccc78f8af6db23a5013f7b90b5672b82d69dd2fb30d1e6736dba29209aceee7`
- v2 Content-Length: 51.4 MB (51368377 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:40:09 GMT
#### `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
```dockerfile
CMD ["/bin/bash"]
```
- Created: Thu, 20 Aug 2015 20:18:01 GMT
- Parent Layer: `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
wget \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:24:45 GMT
- Parent Layer: `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
- Docker Version: 1.7.1
- Virtual Size: 44.4 MB (44355942 bytes)
- v2 Blob: `sha256:eba087ca53a356384db448d54a51620cde9e91d4935e7cd134c3c571df8447c4`
- v2 Content-Length: 18.5 MB (18538916 bytes)
- v2 Last-Modified: Tue, 25 Aug 2015 22:15:52 GMT
#### `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
bzr \
git \
mercurial \
openssh-client \
subversion \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:25:45 GMT
- Parent Layer: `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
- Docker Version: 1.7.1
- Virtual Size: 122.3 MB (122318537 bytes)
- v2 Blob: `sha256:a068cb6fd68bb10bf1f97beedee2837c2b2a52109dbbb59ea25462d661006e0d`
- v2 Content-Length: 42.3 MB (42340018 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:59:13 GMT
#### `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
automake \
bzip2 \
file \
g++ \
gcc \
imagemagick \
libbz2-dev \
libc6-dev \
libcurl4-openssl-dev \
libevent-dev \
libffi-dev \
libglib2.0-dev \
libjpeg-dev \
liblzma-dev \
libmagickcore-dev \
libmagickwand-dev \
libmysqlclient-dev \
libncurses-dev \
libpng-dev \
libpq-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libtool \
libwebp-dev \
libxml2-dev \
libxslt-dev \
libyaml-dev \
make \
patch \
xz-utils \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Mon, 24 Aug 2015 16:11:35 GMT
- Parent Layer: `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
- Docker Version: 1.7.1
- Virtual Size: 313.7 MB (313666691 bytes)
- v2 Blob: `sha256:2ac01aa9d22a0c73405fe147734a6acf8929209620ca4a80fe8064449ab7d301`
- v2 Content-Length: 128.2 MB (128191020 bytes)
- v2 Last-Modified: Mon, 24 Aug 2015 16:55:37 GMT
#### `57172606478fe544e87cadf7ef98be1f8337fb9a8fbe4cb5d027f25c6eef0d0f`
```dockerfile
ENV RUBY_MAJOR=2.0
```
- Created: Tue, 25 Aug 2015 08:17:43 GMT
- Parent Layer: `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `5f77e63e5730321adf6bebebe309224cedda159839b903a8db252c9f016608c1`
```dockerfile
ENV RUBY_VERSION=2.0.0-p647
```
- Created: Tue, 25 Aug 2015 08:17:43 GMT
- Parent Layer: `57172606478fe544e87cadf7ef98be1f8337fb9a8fbe4cb5d027f25c6eef0d0f`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f6f3b171327c0c8862537d062b61cbd3cafcb18030390e871281a504070d4fe9`
```dockerfile
ENV RUBY_DOWNLOAD_SHA256=c88aaf5b4ec72e2cb7d290ff854f04d135939f6134f517002a9d65d5fc5e5bec
```
- Created: Tue, 25 Aug 2015 08:17:43 GMT
- Parent Layer: `5f77e63e5730321adf6bebebe309224cedda159839b903a8db252c9f016608c1`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `c5b051d2da18ec7ccf37b3523253d4e8c31363b75a493fc5457b85862fe8ff3f`
```dockerfile
ENV RUBYGEMS_VERSION=2.4.8
```
- Created: Tue, 25 Aug 2015 08:17:44 GMT
- Parent Layer: `f6f3b171327c0c8862537d062b61cbd3cafcb18030390e871281a504070d4fe9`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `cf475af3052e9fa149bf6686c85ffcb066ef6e523717aff0acb526f8cf8d420e`
```dockerfile
RUN echo 'install: --no-document\nupdate: --no-document' > "$HOME/.gemrc"
```
- Created: Tue, 25 Aug 2015 08:17:45 GMT
- Parent Layer: `c5b051d2da18ec7ccf37b3523253d4e8c31363b75a493fc5457b85862fe8ff3f`
- Docker Version: 1.7.1
- Virtual Size: 45.0 B
- v2 Blob: `sha256:bf6be5e09718d0c44661ae9835241ef4ea86fe5fc2905813585e7563b104b29f`
- v2 Content-Length: 161.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 05:47:04 GMT
#### `e197a3d883c8c0ad8f2a69140260f53b8e242631cda6dd9911f8afc525d7d4d4`
```dockerfile
RUN apt-get update \
&& apt-get install -y bison libgdbm-dev ruby \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/ruby \
&& curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
&& rm ruby.tar.gz \
&& cd /usr/src/ruby \
&& autoconf \
&& ./configure --disable-install-doc \
&& make -j"$(nproc)" \
&& make install \
&& apt-get purge -y --auto-remove bison libgdbm-dev ruby \
&& gem update --system $RUBYGEMS_VERSION \
&& rm -r /usr/src/ruby
```
- Created: Tue, 25 Aug 2015 08:21:46 GMT
- Parent Layer: `cf475af3052e9fa149bf6686c85ffcb066ef6e523717aff0acb526f8cf8d420e`
- Docker Version: 1.7.1
- Virtual Size: 98.5 MB (98522047 bytes)
- v2 Blob: `sha256:c2d1fdfcb4c55a98415b2304167a91d6946d10ea4662386a4d516a47afea9a72`
- v2 Content-Length: 28.4 MB (28437522 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:47:01 GMT
#### `682b7557535ccf234ddd723c34ce9d39d646cba9c37c388d894e64422cfa1fdd`
```dockerfile
ENV GEM_HOME=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:21:47 GMT
- Parent Layer: `e197a3d883c8c0ad8f2a69140260f53b8e242631cda6dd9911f8afc525d7d4d4`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `1a934001ef5e2b024acbd00b81d1363b956b07ad652ecf919da502ae1aff3584`
```dockerfile
ENV PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
```
- Created: Tue, 25 Aug 2015 08:21:47 GMT
- Parent Layer: `682b7557535ccf234ddd723c34ce9d39d646cba9c37c388d894e64422cfa1fdd`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `b2522c5019fd27ba60c909d85d4b8d6b350f2940dc481d187e26340a07cc135b`
```dockerfile
ENV BUNDLER_VERSION=1.10.6
```
- Created: Tue, 25 Aug 2015 08:21:48 GMT
- Parent Layer: `1a934001ef5e2b024acbd00b81d1363b956b07ad652ecf919da502ae1aff3584`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f9f99542a15e92be20bafa01620453c667fc5a7b4df79bb2b0d5f228110d38bf`
```dockerfile
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
```
- Created: Tue, 25 Aug 2015 08:21:51 GMT
- Parent Layer: `b2522c5019fd27ba60c909d85d4b8d6b350f2940dc481d187e26340a07cc135b`
- Docker Version: 1.7.1
- Virtual Size: 1.1 MB (1124530 bytes)
- v2 Blob: `sha256:4021d1190e5e92a1c97474c7f4f5a53fc8ac1ba3f582c60ebce10e1e6953d6c0`
- v2 Content-Length: 500.1 KB (500100 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:46:39 GMT
#### `4630d301b9afed4108cc30d900c9e109800361d2bede9b1bcc659715efd408a2`
```dockerfile
ENV BUNDLE_APP_CONFIG=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:21:52 GMT
- Parent Layer: `f9f99542a15e92be20bafa01620453c667fc5a7b4df79bb2b0d5f228110d38bf`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `041ca32db269c2c107351ac8028ad98ceeca1ed3cab9295d1e20d7cf1596cb99`
```dockerfile
CMD ["irb"]
```
- Created: Tue, 25 Aug 2015 08:21:52 GMT
- Parent Layer: `4630d301b9afed4108cc30d900c9e109800361d2bede9b1bcc659715efd408a2`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
## `ruby:2.0`
- Total Virtual Size: 705.2 MB (705162696 bytes)
- Total v2 Content-Length: 269.4 MB (269376466 bytes)
### Layers (17)
#### `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
```dockerfile
ADD file:b770303e11edaa0ad0d8f43f6db4fa26673923912b5d5f7cb748ba025e6c4d3b in /
```
- Created: Thu, 20 Aug 2015 20:17:59 GMT
- Docker Version: 1.7.1
- Virtual Size: 125.2 MB (125174904 bytes)
- v2 Blob: `sha256:7ccc78f8af6db23a5013f7b90b5672b82d69dd2fb30d1e6736dba29209aceee7`
- v2 Content-Length: 51.4 MB (51368377 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:40:09 GMT
#### `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
```dockerfile
CMD ["/bin/bash"]
```
- Created: Thu, 20 Aug 2015 20:18:01 GMT
- Parent Layer: `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
wget \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:24:45 GMT
- Parent Layer: `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
- Docker Version: 1.7.1
- Virtual Size: 44.4 MB (44355942 bytes)
- v2 Blob: `sha256:eba087ca53a356384db448d54a51620cde9e91d4935e7cd134c3c571df8447c4`
- v2 Content-Length: 18.5 MB (18538916 bytes)
- v2 Last-Modified: Tue, 25 Aug 2015 22:15:52 GMT
#### `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
bzr \
git \
mercurial \
openssh-client \
subversion \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:25:45 GMT
- Parent Layer: `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
- Docker Version: 1.7.1
- Virtual Size: 122.3 MB (122318537 bytes)
- v2 Blob: `sha256:a068cb6fd68bb10bf1f97beedee2837c2b2a52109dbbb59ea25462d661006e0d`
- v2 Content-Length: 42.3 MB (42340018 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:59:13 GMT
#### `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
automake \
bzip2 \
file \
g++ \
gcc \
imagemagick \
libbz2-dev \
libc6-dev \
libcurl4-openssl-dev \
libevent-dev \
libffi-dev \
libglib2.0-dev \
libjpeg-dev \
liblzma-dev \
libmagickcore-dev \
libmagickwand-dev \
libmysqlclient-dev \
libncurses-dev \
libpng-dev \
libpq-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libtool \
libwebp-dev \
libxml2-dev \
libxslt-dev \
libyaml-dev \
make \
patch \
xz-utils \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Mon, 24 Aug 2015 16:11:35 GMT
- Parent Layer: `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
- Docker Version: 1.7.1
- Virtual Size: 313.7 MB (313666691 bytes)
- v2 Blob: `sha256:2ac01aa9d22a0c73405fe147734a6acf8929209620ca4a80fe8064449ab7d301`
- v2 Content-Length: 128.2 MB (128191020 bytes)
- v2 Last-Modified: Mon, 24 Aug 2015 16:55:37 GMT
#### `57172606478fe544e87cadf7ef98be1f8337fb9a8fbe4cb5d027f25c6eef0d0f`
```dockerfile
ENV RUBY_MAJOR=2.0
```
- Created: Tue, 25 Aug 2015 08:17:43 GMT
- Parent Layer: `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `5f77e63e5730321adf6bebebe309224cedda159839b903a8db252c9f016608c1`
```dockerfile
ENV RUBY_VERSION=2.0.0-p647
```
- Created: Tue, 25 Aug 2015 08:17:43 GMT
- Parent Layer: `57172606478fe544e87cadf7ef98be1f8337fb9a8fbe4cb5d027f25c6eef0d0f`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f6f3b171327c0c8862537d062b61cbd3cafcb18030390e871281a504070d4fe9`
```dockerfile
ENV RUBY_DOWNLOAD_SHA256=c88aaf5b4ec72e2cb7d290ff854f04d135939f6134f517002a9d65d5fc5e5bec
```
- Created: Tue, 25 Aug 2015 08:17:43 GMT
- Parent Layer: `5f77e63e5730321adf6bebebe309224cedda159839b903a8db252c9f016608c1`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `c5b051d2da18ec7ccf37b3523253d4e8c31363b75a493fc5457b85862fe8ff3f`
```dockerfile
ENV RUBYGEMS_VERSION=2.4.8
```
- Created: Tue, 25 Aug 2015 08:17:44 GMT
- Parent Layer: `f6f3b171327c0c8862537d062b61cbd3cafcb18030390e871281a504070d4fe9`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `cf475af3052e9fa149bf6686c85ffcb066ef6e523717aff0acb526f8cf8d420e`
```dockerfile
RUN echo 'install: --no-document\nupdate: --no-document' > "$HOME/.gemrc"
```
- Created: Tue, 25 Aug 2015 08:17:45 GMT
- Parent Layer: `c5b051d2da18ec7ccf37b3523253d4e8c31363b75a493fc5457b85862fe8ff3f`
- Docker Version: 1.7.1
- Virtual Size: 45.0 B
- v2 Blob: `sha256:bf6be5e09718d0c44661ae9835241ef4ea86fe5fc2905813585e7563b104b29f`
- v2 Content-Length: 161.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 05:47:04 GMT
#### `e197a3d883c8c0ad8f2a69140260f53b8e242631cda6dd9911f8afc525d7d4d4`
```dockerfile
RUN apt-get update \
&& apt-get install -y bison libgdbm-dev ruby \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/ruby \
&& curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
&& rm ruby.tar.gz \
&& cd /usr/src/ruby \
&& autoconf \
&& ./configure --disable-install-doc \
&& make -j"$(nproc)" \
&& make install \
&& apt-get purge -y --auto-remove bison libgdbm-dev ruby \
&& gem update --system $RUBYGEMS_VERSION \
&& rm -r /usr/src/ruby
```
- Created: Tue, 25 Aug 2015 08:21:46 GMT
- Parent Layer: `cf475af3052e9fa149bf6686c85ffcb066ef6e523717aff0acb526f8cf8d420e`
- Docker Version: 1.7.1
- Virtual Size: 98.5 MB (98522047 bytes)
- v2 Blob: `sha256:c2d1fdfcb4c55a98415b2304167a91d6946d10ea4662386a4d516a47afea9a72`
- v2 Content-Length: 28.4 MB (28437522 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:47:01 GMT
#### `682b7557535ccf234ddd723c34ce9d39d646cba9c37c388d894e64422cfa1fdd`
```dockerfile
ENV GEM_HOME=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:21:47 GMT
- Parent Layer: `e197a3d883c8c0ad8f2a69140260f53b8e242631cda6dd9911f8afc525d7d4d4`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `1a934001ef5e2b024acbd00b81d1363b956b07ad652ecf919da502ae1aff3584`
```dockerfile
ENV PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
```
- Created: Tue, 25 Aug 2015 08:21:47 GMT
- Parent Layer: `682b7557535ccf234ddd723c34ce9d39d646cba9c37c388d894e64422cfa1fdd`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `b2522c5019fd27ba60c909d85d4b8d6b350f2940dc481d187e26340a07cc135b`
```dockerfile
ENV BUNDLER_VERSION=1.10.6
```
- Created: Tue, 25 Aug 2015 08:21:48 GMT
- Parent Layer: `1a934001ef5e2b024acbd00b81d1363b956b07ad652ecf919da502ae1aff3584`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f9f99542a15e92be20bafa01620453c667fc5a7b4df79bb2b0d5f228110d38bf`
```dockerfile
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
```
- Created: Tue, 25 Aug 2015 08:21:51 GMT
- Parent Layer: `b2522c5019fd27ba60c909d85d4b8d6b350f2940dc481d187e26340a07cc135b`
- Docker Version: 1.7.1
- Virtual Size: 1.1 MB (1124530 bytes)
- v2 Blob: `sha256:4021d1190e5e92a1c97474c7f4f5a53fc8ac1ba3f582c60ebce10e1e6953d6c0`
- v2 Content-Length: 500.1 KB (500100 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:46:39 GMT
#### `4630d301b9afed4108cc30d900c9e109800361d2bede9b1bcc659715efd408a2`
```dockerfile
ENV BUNDLE_APP_CONFIG=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:21:52 GMT
- Parent Layer: `f9f99542a15e92be20bafa01620453c667fc5a7b4df79bb2b0d5f228110d38bf`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `041ca32db269c2c107351ac8028ad98ceeca1ed3cab9295d1e20d7cf1596cb99`
```dockerfile
CMD ["irb"]
```
- Created: Tue, 25 Aug 2015 08:21:52 GMT
- Parent Layer: `4630d301b9afed4108cc30d900c9e109800361d2bede9b1bcc659715efd408a2`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
## `ruby:2.0.0-p647-onbuild`
- Total Virtual Size: 705.2 MB (705162784 bytes)
- Total v2 Content-Length: 269.4 MB (269376968 bytes)
### Layers (24)
#### `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
```dockerfile
ADD file:b770303e11edaa0ad0d8f43f6db4fa26673923912b5d5f7cb748ba025e6c4d3b in /
```
- Created: Thu, 20 Aug 2015 20:17:59 GMT
- Docker Version: 1.7.1
- Virtual Size: 125.2 MB (125174904 bytes)
- v2 Blob: `sha256:7ccc78f8af6db23a5013f7b90b5672b82d69dd2fb30d1e6736dba29209aceee7`
- v2 Content-Length: 51.4 MB (51368377 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:40:09 GMT
#### `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
```dockerfile
CMD ["/bin/bash"]
```
- Created: Thu, 20 Aug 2015 20:18:01 GMT
- Parent Layer: `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
wget \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:24:45 GMT
- Parent Layer: `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
- Docker Version: 1.7.1
- Virtual Size: 44.4 MB (44355942 bytes)
- v2 Blob: `sha256:eba087ca53a356384db448d54a51620cde9e91d4935e7cd134c3c571df8447c4`
- v2 Content-Length: 18.5 MB (18538916 bytes)
- v2 Last-Modified: Tue, 25 Aug 2015 22:15:52 GMT
#### `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
bzr \
git \
mercurial \
openssh-client \
subversion \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:25:45 GMT
- Parent Layer: `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
- Docker Version: 1.7.1
- Virtual Size: 122.3 MB (122318537 bytes)
- v2 Blob: `sha256:a068cb6fd68bb10bf1f97beedee2837c2b2a52109dbbb59ea25462d661006e0d`
- v2 Content-Length: 42.3 MB (42340018 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:59:13 GMT
#### `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
automake \
bzip2 \
file \
g++ \
gcc \
imagemagick \
libbz2-dev \
libc6-dev \
libcurl4-openssl-dev \
libevent-dev \
libffi-dev \
libglib2.0-dev \
libjpeg-dev \
liblzma-dev \
libmagickcore-dev \
libmagickwand-dev \
libmysqlclient-dev \
libncurses-dev \
libpng-dev \
libpq-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libtool \
libwebp-dev \
libxml2-dev \
libxslt-dev \
libyaml-dev \
make \
patch \
xz-utils \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Mon, 24 Aug 2015 16:11:35 GMT
- Parent Layer: `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
- Docker Version: 1.7.1
- Virtual Size: 313.7 MB (313666691 bytes)
- v2 Blob: `sha256:2ac01aa9d22a0c73405fe147734a6acf8929209620ca4a80fe8064449ab7d301`
- v2 Content-Length: 128.2 MB (128191020 bytes)
- v2 Last-Modified: Mon, 24 Aug 2015 16:55:37 GMT
#### `57172606478fe544e87cadf7ef98be1f8337fb9a8fbe4cb5d027f25c6eef0d0f`
```dockerfile
ENV RUBY_MAJOR=2.0
```
- Created: Tue, 25 Aug 2015 08:17:43 GMT
- Parent Layer: `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `5f77e63e5730321adf6bebebe309224cedda159839b903a8db252c9f016608c1`
```dockerfile
ENV RUBY_VERSION=2.0.0-p647
```
- Created: Tue, 25 Aug 2015 08:17:43 GMT
- Parent Layer: `57172606478fe544e87cadf7ef98be1f8337fb9a8fbe4cb5d027f25c6eef0d0f`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f6f3b171327c0c8862537d062b61cbd3cafcb18030390e871281a504070d4fe9`
```dockerfile
ENV RUBY_DOWNLOAD_SHA256=c88aaf5b4ec72e2cb7d290ff854f04d135939f6134f517002a9d65d5fc5e5bec
```
- Created: Tue, 25 Aug 2015 08:17:43 GMT
- Parent Layer: `5f77e63e5730321adf6bebebe309224cedda159839b903a8db252c9f016608c1`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `c5b051d2da18ec7ccf37b3523253d4e8c31363b75a493fc5457b85862fe8ff3f`
```dockerfile
ENV RUBYGEMS_VERSION=2.4.8
```
- Created: Tue, 25 Aug 2015 08:17:44 GMT
- Parent Layer: `f6f3b171327c0c8862537d062b61cbd3cafcb18030390e871281a504070d4fe9`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `cf475af3052e9fa149bf6686c85ffcb066ef6e523717aff0acb526f8cf8d420e`
```dockerfile
RUN echo 'install: --no-document\nupdate: --no-document' > "$HOME/.gemrc"
```
- Created: Tue, 25 Aug 2015 08:17:45 GMT
- Parent Layer: `c5b051d2da18ec7ccf37b3523253d4e8c31363b75a493fc5457b85862fe8ff3f`
- Docker Version: 1.7.1
- Virtual Size: 45.0 B
- v2 Blob: `sha256:bf6be5e09718d0c44661ae9835241ef4ea86fe5fc2905813585e7563b104b29f`
- v2 Content-Length: 161.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 05:47:04 GMT
#### `e197a3d883c8c0ad8f2a69140260f53b8e242631cda6dd9911f8afc525d7d4d4`
```dockerfile
RUN apt-get update \
&& apt-get install -y bison libgdbm-dev ruby \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/ruby \
&& curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
&& rm ruby.tar.gz \
&& cd /usr/src/ruby \
&& autoconf \
&& ./configure --disable-install-doc \
&& make -j"$(nproc)" \
&& make install \
&& apt-get purge -y --auto-remove bison libgdbm-dev ruby \
&& gem update --system $RUBYGEMS_VERSION \
&& rm -r /usr/src/ruby
```
- Created: Tue, 25 Aug 2015 08:21:46 GMT
- Parent Layer: `cf475af3052e9fa149bf6686c85ffcb066ef6e523717aff0acb526f8cf8d420e`
- Docker Version: 1.7.1
- Virtual Size: 98.5 MB (98522047 bytes)
- v2 Blob: `sha256:c2d1fdfcb4c55a98415b2304167a91d6946d10ea4662386a4d516a47afea9a72`
- v2 Content-Length: 28.4 MB (28437522 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:47:01 GMT
#### `682b7557535ccf234ddd723c34ce9d39d646cba9c37c388d894e64422cfa1fdd`
```dockerfile
ENV GEM_HOME=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:21:47 GMT
- Parent Layer: `e197a3d883c8c0ad8f2a69140260f53b8e242631cda6dd9911f8afc525d7d4d4`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `1a934001ef5e2b024acbd00b81d1363b956b07ad652ecf919da502ae1aff3584`
```dockerfile
ENV PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
```
- Created: Tue, 25 Aug 2015 08:21:47 GMT
- Parent Layer: `682b7557535ccf234ddd723c34ce9d39d646cba9c37c388d894e64422cfa1fdd`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `b2522c5019fd27ba60c909d85d4b8d6b350f2940dc481d187e26340a07cc135b`
```dockerfile
ENV BUNDLER_VERSION=1.10.6
```
- Created: Tue, 25 Aug 2015 08:21:48 GMT
- Parent Layer: `1a934001ef5e2b024acbd00b81d1363b956b07ad652ecf919da502ae1aff3584`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f9f99542a15e92be20bafa01620453c667fc5a7b4df79bb2b0d5f228110d38bf`
```dockerfile
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
```
- Created: Tue, 25 Aug 2015 08:21:51 GMT
- Parent Layer: `b2522c5019fd27ba60c909d85d4b8d6b350f2940dc481d187e26340a07cc135b`
- Docker Version: 1.7.1
- Virtual Size: 1.1 MB (1124530 bytes)
- v2 Blob: `sha256:4021d1190e5e92a1c97474c7f4f5a53fc8ac1ba3f582c60ebce10e1e6953d6c0`
- v2 Content-Length: 500.1 KB (500100 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:46:39 GMT
#### `4630d301b9afed4108cc30d900c9e109800361d2bede9b1bcc659715efd408a2`
```dockerfile
ENV BUNDLE_APP_CONFIG=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:21:52 GMT
- Parent Layer: `f9f99542a15e92be20bafa01620453c667fc5a7b4df79bb2b0d5f228110d38bf`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `041ca32db269c2c107351ac8028ad98ceeca1ed3cab9295d1e20d7cf1596cb99`
```dockerfile
CMD ["irb"]
```
- Created: Tue, 25 Aug 2015 08:21:52 GMT
- Parent Layer: `4630d301b9afed4108cc30d900c9e109800361d2bede9b1bcc659715efd408a2`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `57c6e615af052d62541154701cab208d14b7ef96e08c3caa713337f944e85b44`
```dockerfile
RUN bundle config --global frozen 1
```
- Created: Tue, 25 Aug 2015 08:23:04 GMT
- Parent Layer: `041ca32db269c2c107351ac8028ad98ceeca1ed3cab9295d1e20d7cf1596cb99`
- Docker Version: 1.7.1
- Virtual Size: 88.0 B
- v2 Blob: `sha256:5df96711276bfc6747960854cb03957c98bc23edc32be0b71c58c3198ce9b38c`
- v2 Content-Length: 216.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 05:52:24 GMT
#### `a44b7a274375df94cd2c628890b61a140261f21b659202a0071c936833bec81f`
```dockerfile
RUN mkdir -p /usr/src/app
```
- Created: Tue, 25 Aug 2015 08:23:05 GMT
- Parent Layer: `57c6e615af052d62541154701cab208d14b7ef96e08c3caa713337f944e85b44`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:bee8e5a45910b114e7778b7f591bb95beb903d44eafd1726a943ab918bd45904`
- v2 Content-Length: 126.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 05:52:23 GMT
#### `15159a32521de2efc82e89f0a62b44d3a8c49f3c85018b38bbb886e874e7f1df`
```dockerfile
WORKDIR /usr/src/app
```
- Created: Tue, 25 Aug 2015 08:23:05 GMT
- Parent Layer: `a44b7a274375df94cd2c628890b61a140261f21b659202a0071c936833bec81f`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `1a468e5c6fdee54ad3dbfcfc359089679d3778e65c2b520b341d4f2008f61eca`
```dockerfile
ONBUILD COPY Gemfile /usr/src/app/
```
- Created: Tue, 25 Aug 2015 08:23:06 GMT
- Parent Layer: `15159a32521de2efc82e89f0a62b44d3a8c49f3c85018b38bbb886e874e7f1df`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `aae01a8d766a8e76af29864611778145bb6f0836c61a4eaca5d37ffceb5db4ce`
```dockerfile
ONBUILD COPY Gemfile.lock /usr/src/app/
```
- Created: Tue, 25 Aug 2015 08:23:06 GMT
- Parent Layer: `1a468e5c6fdee54ad3dbfcfc359089679d3778e65c2b520b341d4f2008f61eca`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `9e870ea37727dcd8092ae59d8f161f91c5a629962031e080173858e14fa738a1`
```dockerfile
ONBUILD RUN bundle install
```
- Created: Tue, 25 Aug 2015 08:23:06 GMT
- Parent Layer: `aae01a8d766a8e76af29864611778145bb6f0836c61a4eaca5d37ffceb5db4ce`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `5fdfcee3afdbd034cc58b769337ab7f5bf8e5ab2b3b6b6e0b4a5a10675b04b8e`
```dockerfile
ONBUILD COPY . /usr/src/app
```
- Created: Tue, 25 Aug 2015 08:23:07 GMT
- Parent Layer: `9e870ea37727dcd8092ae59d8f161f91c5a629962031e080173858e14fa738a1`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
## `ruby:2.0.0-onbuild`
- Total Virtual Size: 705.2 MB (705162784 bytes)
- Total v2 Content-Length: 269.4 MB (269376968 bytes)
### Layers (24)
#### `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
```dockerfile
ADD file:b770303e11edaa0ad0d8f43f6db4fa26673923912b5d5f7cb748ba025e6c4d3b in /
```
- Created: Thu, 20 Aug 2015 20:17:59 GMT
- Docker Version: 1.7.1
- Virtual Size: 125.2 MB (125174904 bytes)
- v2 Blob: `sha256:7ccc78f8af6db23a5013f7b90b5672b82d69dd2fb30d1e6736dba29209aceee7`
- v2 Content-Length: 51.4 MB (51368377 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:40:09 GMT
#### `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
```dockerfile
CMD ["/bin/bash"]
```
- Created: Thu, 20 Aug 2015 20:18:01 GMT
- Parent Layer: `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
wget \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:24:45 GMT
- Parent Layer: `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
- Docker Version: 1.7.1
- Virtual Size: 44.4 MB (44355942 bytes)
- v2 Blob: `sha256:eba087ca53a356384db448d54a51620cde9e91d4935e7cd134c3c571df8447c4`
- v2 Content-Length: 18.5 MB (18538916 bytes)
- v2 Last-Modified: Tue, 25 Aug 2015 22:15:52 GMT
#### `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
bzr \
git \
mercurial \
openssh-client \
subversion \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:25:45 GMT
- Parent Layer: `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
- Docker Version: 1.7.1
- Virtual Size: 122.3 MB (122318537 bytes)
- v2 Blob: `sha256:a068cb6fd68bb10bf1f97beedee2837c2b2a52109dbbb59ea25462d661006e0d`
- v2 Content-Length: 42.3 MB (42340018 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:59:13 GMT
#### `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
automake \
bzip2 \
file \
g++ \
gcc \
imagemagick \
libbz2-dev \
libc6-dev \
libcurl4-openssl-dev \
libevent-dev \
libffi-dev \
libglib2.0-dev \
libjpeg-dev \
liblzma-dev \
libmagickcore-dev \
libmagickwand-dev \
libmysqlclient-dev \
libncurses-dev \
libpng-dev \
libpq-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libtool \
libwebp-dev \
libxml2-dev \
libxslt-dev \
libyaml-dev \
make \
patch \
xz-utils \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Mon, 24 Aug 2015 16:11:35 GMT
- Parent Layer: `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
- Docker Version: 1.7.1
- Virtual Size: 313.7 MB (313666691 bytes)
- v2 Blob: `sha256:2ac01aa9d22a0c73405fe147734a6acf8929209620ca4a80fe8064449ab7d301`
- v2 Content-Length: 128.2 MB (128191020 bytes)
- v2 Last-Modified: Mon, 24 Aug 2015 16:55:37 GMT
#### `57172606478fe544e87cadf7ef98be1f8337fb9a8fbe4cb5d027f25c6eef0d0f`
```dockerfile
ENV RUBY_MAJOR=2.0
```
- Created: Tue, 25 Aug 2015 08:17:43 GMT
- Parent Layer: `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `5f77e63e5730321adf6bebebe309224cedda159839b903a8db252c9f016608c1`
```dockerfile
ENV RUBY_VERSION=2.0.0-p647
```
- Created: Tue, 25 Aug 2015 08:17:43 GMT
- Parent Layer: `57172606478fe544e87cadf7ef98be1f8337fb9a8fbe4cb5d027f25c6eef0d0f`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f6f3b171327c0c8862537d062b61cbd3cafcb18030390e871281a504070d4fe9`
```dockerfile
ENV RUBY_DOWNLOAD_SHA256=c88aaf5b4ec72e2cb7d290ff854f04d135939f6134f517002a9d65d5fc5e5bec
```
- Created: Tue, 25 Aug 2015 08:17:43 GMT
- Parent Layer: `5f77e63e5730321adf6bebebe309224cedda159839b903a8db252c9f016608c1`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `c5b051d2da18ec7ccf37b3523253d4e8c31363b75a493fc5457b85862fe8ff3f`
```dockerfile
ENV RUBYGEMS_VERSION=2.4.8
```
- Created: Tue, 25 Aug 2015 08:17:44 GMT
- Parent Layer: `f6f3b171327c0c8862537d062b61cbd3cafcb18030390e871281a504070d4fe9`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `cf475af3052e9fa149bf6686c85ffcb066ef6e523717aff0acb526f8cf8d420e`
```dockerfile
RUN echo 'install: --no-document\nupdate: --no-document' > "$HOME/.gemrc"
```
- Created: Tue, 25 Aug 2015 08:17:45 GMT
- Parent Layer: `c5b051d2da18ec7ccf37b3523253d4e8c31363b75a493fc5457b85862fe8ff3f`
- Docker Version: 1.7.1
- Virtual Size: 45.0 B
- v2 Blob: `sha256:bf6be5e09718d0c44661ae9835241ef4ea86fe5fc2905813585e7563b104b29f`
- v2 Content-Length: 161.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 05:47:04 GMT
#### `e197a3d883c8c0ad8f2a69140260f53b8e242631cda6dd9911f8afc525d7d4d4`
```dockerfile
RUN apt-get update \
&& apt-get install -y bison libgdbm-dev ruby \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/ruby \
&& curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
&& rm ruby.tar.gz \
&& cd /usr/src/ruby \
&& autoconf \
&& ./configure --disable-install-doc \
&& make -j"$(nproc)" \
&& make install \
&& apt-get purge -y --auto-remove bison libgdbm-dev ruby \
&& gem update --system $RUBYGEMS_VERSION \
&& rm -r /usr/src/ruby
```
- Created: Tue, 25 Aug 2015 08:21:46 GMT
- Parent Layer: `cf475af3052e9fa149bf6686c85ffcb066ef6e523717aff0acb526f8cf8d420e`
- Docker Version: 1.7.1
- Virtual Size: 98.5 MB (98522047 bytes)
- v2 Blob: `sha256:c2d1fdfcb4c55a98415b2304167a91d6946d10ea4662386a4d516a47afea9a72`
- v2 Content-Length: 28.4 MB (28437522 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:47:01 GMT
#### `682b7557535ccf234ddd723c34ce9d39d646cba9c37c388d894e64422cfa1fdd`
```dockerfile
ENV GEM_HOME=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:21:47 GMT
- Parent Layer: `e197a3d883c8c0ad8f2a69140260f53b8e242631cda6dd9911f8afc525d7d4d4`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `1a934001ef5e2b024acbd00b81d1363b956b07ad652ecf919da502ae1aff3584`
```dockerfile
ENV PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
```
- Created: Tue, 25 Aug 2015 08:21:47 GMT
- Parent Layer: `682b7557535ccf234ddd723c34ce9d39d646cba9c37c388d894e64422cfa1fdd`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `b2522c5019fd27ba60c909d85d4b8d6b350f2940dc481d187e26340a07cc135b`
```dockerfile
ENV BUNDLER_VERSION=1.10.6
```
- Created: Tue, 25 Aug 2015 08:21:48 GMT
- Parent Layer: `1a934001ef5e2b024acbd00b81d1363b956b07ad652ecf919da502ae1aff3584`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f9f99542a15e92be20bafa01620453c667fc5a7b4df79bb2b0d5f228110d38bf`
```dockerfile
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
```
- Created: Tue, 25 Aug 2015 08:21:51 GMT
- Parent Layer: `b2522c5019fd27ba60c909d85d4b8d6b350f2940dc481d187e26340a07cc135b`
- Docker Version: 1.7.1
- Virtual Size: 1.1 MB (1124530 bytes)
- v2 Blob: `sha256:4021d1190e5e92a1c97474c7f4f5a53fc8ac1ba3f582c60ebce10e1e6953d6c0`
- v2 Content-Length: 500.1 KB (500100 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:46:39 GMT
#### `4630d301b9afed4108cc30d900c9e109800361d2bede9b1bcc659715efd408a2`
```dockerfile
ENV BUNDLE_APP_CONFIG=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:21:52 GMT
- Parent Layer: `f9f99542a15e92be20bafa01620453c667fc5a7b4df79bb2b0d5f228110d38bf`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `041ca32db269c2c107351ac8028ad98ceeca1ed3cab9295d1e20d7cf1596cb99`
```dockerfile
CMD ["irb"]
```
- Created: Tue, 25 Aug 2015 08:21:52 GMT
- Parent Layer: `4630d301b9afed4108cc30d900c9e109800361d2bede9b1bcc659715efd408a2`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `57c6e615af052d62541154701cab208d14b7ef96e08c3caa713337f944e85b44`
```dockerfile
RUN bundle config --global frozen 1
```
- Created: Tue, 25 Aug 2015 08:23:04 GMT
- Parent Layer: `041ca32db269c2c107351ac8028ad98ceeca1ed3cab9295d1e20d7cf1596cb99`
- Docker Version: 1.7.1
- Virtual Size: 88.0 B
- v2 Blob: `sha256:5df96711276bfc6747960854cb03957c98bc23edc32be0b71c58c3198ce9b38c`
- v2 Content-Length: 216.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 05:52:24 GMT
#### `a44b7a274375df94cd2c628890b61a140261f21b659202a0071c936833bec81f`
```dockerfile
RUN mkdir -p /usr/src/app
```
- Created: Tue, 25 Aug 2015 08:23:05 GMT
- Parent Layer: `57c6e615af052d62541154701cab208d14b7ef96e08c3caa713337f944e85b44`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:bee8e5a45910b114e7778b7f591bb95beb903d44eafd1726a943ab918bd45904`
- v2 Content-Length: 126.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 05:52:23 GMT
#### `15159a32521de2efc82e89f0a62b44d3a8c49f3c85018b38bbb886e874e7f1df`
```dockerfile
WORKDIR /usr/src/app
```
- Created: Tue, 25 Aug 2015 08:23:05 GMT
- Parent Layer: `a44b7a274375df94cd2c628890b61a140261f21b659202a0071c936833bec81f`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `1a468e5c6fdee54ad3dbfcfc359089679d3778e65c2b520b341d4f2008f61eca`
```dockerfile
ONBUILD COPY Gemfile /usr/src/app/
```
- Created: Tue, 25 Aug 2015 08:23:06 GMT
- Parent Layer: `15159a32521de2efc82e89f0a62b44d3a8c49f3c85018b38bbb886e874e7f1df`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `aae01a8d766a8e76af29864611778145bb6f0836c61a4eaca5d37ffceb5db4ce`
```dockerfile
ONBUILD COPY Gemfile.lock /usr/src/app/
```
- Created: Tue, 25 Aug 2015 08:23:06 GMT
- Parent Layer: `1a468e5c6fdee54ad3dbfcfc359089679d3778e65c2b520b341d4f2008f61eca`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `9e870ea37727dcd8092ae59d8f161f91c5a629962031e080173858e14fa738a1`
```dockerfile
ONBUILD RUN bundle install
```
- Created: Tue, 25 Aug 2015 08:23:06 GMT
- Parent Layer: `aae01a8d766a8e76af29864611778145bb6f0836c61a4eaca5d37ffceb5db4ce`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `5fdfcee3afdbd034cc58b769337ab7f5bf8e5ab2b3b6b6e0b4a5a10675b04b8e`
```dockerfile
ONBUILD COPY . /usr/src/app
```
- Created: Tue, 25 Aug 2015 08:23:07 GMT
- Parent Layer: `9e870ea37727dcd8092ae59d8f161f91c5a629962031e080173858e14fa738a1`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
## `ruby:2.0-onbuild`
- Total Virtual Size: 705.2 MB (705162784 bytes)
- Total v2 Content-Length: 269.4 MB (269376968 bytes)
### Layers (24)
#### `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
```dockerfile
ADD file:b770303e11edaa0ad0d8f43f6db4fa26673923912b5d5f7cb748ba025e6c4d3b in /
```
- Created: Thu, 20 Aug 2015 20:17:59 GMT
- Docker Version: 1.7.1
- Virtual Size: 125.2 MB (125174904 bytes)
- v2 Blob: `sha256:7ccc78f8af6db23a5013f7b90b5672b82d69dd2fb30d1e6736dba29209aceee7`
- v2 Content-Length: 51.4 MB (51368377 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:40:09 GMT
#### `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
```dockerfile
CMD ["/bin/bash"]
```
- Created: Thu, 20 Aug 2015 20:18:01 GMT
- Parent Layer: `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
wget \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:24:45 GMT
- Parent Layer: `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
- Docker Version: 1.7.1
- Virtual Size: 44.4 MB (44355942 bytes)
- v2 Blob: `sha256:eba087ca53a356384db448d54a51620cde9e91d4935e7cd134c3c571df8447c4`
- v2 Content-Length: 18.5 MB (18538916 bytes)
- v2 Last-Modified: Tue, 25 Aug 2015 22:15:52 GMT
#### `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
bzr \
git \
mercurial \
openssh-client \
subversion \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:25:45 GMT
- Parent Layer: `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
- Docker Version: 1.7.1
- Virtual Size: 122.3 MB (122318537 bytes)
- v2 Blob: `sha256:a068cb6fd68bb10bf1f97beedee2837c2b2a52109dbbb59ea25462d661006e0d`
- v2 Content-Length: 42.3 MB (42340018 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:59:13 GMT
#### `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
automake \
bzip2 \
file \
g++ \
gcc \
imagemagick \
libbz2-dev \
libc6-dev \
libcurl4-openssl-dev \
libevent-dev \
libffi-dev \
libglib2.0-dev \
libjpeg-dev \
liblzma-dev \
libmagickcore-dev \
libmagickwand-dev \
libmysqlclient-dev \
libncurses-dev \
libpng-dev \
libpq-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libtool \
libwebp-dev \
libxml2-dev \
libxslt-dev \
libyaml-dev \
make \
patch \
xz-utils \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Mon, 24 Aug 2015 16:11:35 GMT
- Parent Layer: `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
- Docker Version: 1.7.1
- Virtual Size: 313.7 MB (313666691 bytes)
- v2 Blob: `sha256:2ac01aa9d22a0c73405fe147734a6acf8929209620ca4a80fe8064449ab7d301`
- v2 Content-Length: 128.2 MB (128191020 bytes)
- v2 Last-Modified: Mon, 24 Aug 2015 16:55:37 GMT
#### `57172606478fe544e87cadf7ef98be1f8337fb9a8fbe4cb5d027f25c6eef0d0f`
```dockerfile
ENV RUBY_MAJOR=2.0
```
- Created: Tue, 25 Aug 2015 08:17:43 GMT
- Parent Layer: `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `5f77e63e5730321adf6bebebe309224cedda159839b903a8db252c9f016608c1`
```dockerfile
ENV RUBY_VERSION=2.0.0-p647
```
- Created: Tue, 25 Aug 2015 08:17:43 GMT
- Parent Layer: `57172606478fe544e87cadf7ef98be1f8337fb9a8fbe4cb5d027f25c6eef0d0f`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f6f3b171327c0c8862537d062b61cbd3cafcb18030390e871281a504070d4fe9`
```dockerfile
ENV RUBY_DOWNLOAD_SHA256=c88aaf5b4ec72e2cb7d290ff854f04d135939f6134f517002a9d65d5fc5e5bec
```
- Created: Tue, 25 Aug 2015 08:17:43 GMT
- Parent Layer: `5f77e63e5730321adf6bebebe309224cedda159839b903a8db252c9f016608c1`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `c5b051d2da18ec7ccf37b3523253d4e8c31363b75a493fc5457b85862fe8ff3f`
```dockerfile
ENV RUBYGEMS_VERSION=2.4.8
```
- Created: Tue, 25 Aug 2015 08:17:44 GMT
- Parent Layer: `f6f3b171327c0c8862537d062b61cbd3cafcb18030390e871281a504070d4fe9`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `cf475af3052e9fa149bf6686c85ffcb066ef6e523717aff0acb526f8cf8d420e`
```dockerfile
RUN echo 'install: --no-document\nupdate: --no-document' > "$HOME/.gemrc"
```
- Created: Tue, 25 Aug 2015 08:17:45 GMT
- Parent Layer: `c5b051d2da18ec7ccf37b3523253d4e8c31363b75a493fc5457b85862fe8ff3f`
- Docker Version: 1.7.1
- Virtual Size: 45.0 B
- v2 Blob: `sha256:bf6be5e09718d0c44661ae9835241ef4ea86fe5fc2905813585e7563b104b29f`
- v2 Content-Length: 161.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 05:47:04 GMT
#### `e197a3d883c8c0ad8f2a69140260f53b8e242631cda6dd9911f8afc525d7d4d4`
```dockerfile
RUN apt-get update \
&& apt-get install -y bison libgdbm-dev ruby \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/ruby \
&& curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
&& rm ruby.tar.gz \
&& cd /usr/src/ruby \
&& autoconf \
&& ./configure --disable-install-doc \
&& make -j"$(nproc)" \
&& make install \
&& apt-get purge -y --auto-remove bison libgdbm-dev ruby \
&& gem update --system $RUBYGEMS_VERSION \
&& rm -r /usr/src/ruby
```
- Created: Tue, 25 Aug 2015 08:21:46 GMT
- Parent Layer: `cf475af3052e9fa149bf6686c85ffcb066ef6e523717aff0acb526f8cf8d420e`
- Docker Version: 1.7.1
- Virtual Size: 98.5 MB (98522047 bytes)
- v2 Blob: `sha256:c2d1fdfcb4c55a98415b2304167a91d6946d10ea4662386a4d516a47afea9a72`
- v2 Content-Length: 28.4 MB (28437522 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:47:01 GMT
#### `682b7557535ccf234ddd723c34ce9d39d646cba9c37c388d894e64422cfa1fdd`
```dockerfile
ENV GEM_HOME=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:21:47 GMT
- Parent Layer: `e197a3d883c8c0ad8f2a69140260f53b8e242631cda6dd9911f8afc525d7d4d4`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `1a934001ef5e2b024acbd00b81d1363b956b07ad652ecf919da502ae1aff3584`
```dockerfile
ENV PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
```
- Created: Tue, 25 Aug 2015 08:21:47 GMT
- Parent Layer: `682b7557535ccf234ddd723c34ce9d39d646cba9c37c388d894e64422cfa1fdd`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `b2522c5019fd27ba60c909d85d4b8d6b350f2940dc481d187e26340a07cc135b`
```dockerfile
ENV BUNDLER_VERSION=1.10.6
```
- Created: Tue, 25 Aug 2015 08:21:48 GMT
- Parent Layer: `1a934001ef5e2b024acbd00b81d1363b956b07ad652ecf919da502ae1aff3584`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f9f99542a15e92be20bafa01620453c667fc5a7b4df79bb2b0d5f228110d38bf`
```dockerfile
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
```
- Created: Tue, 25 Aug 2015 08:21:51 GMT
- Parent Layer: `b2522c5019fd27ba60c909d85d4b8d6b350f2940dc481d187e26340a07cc135b`
- Docker Version: 1.7.1
- Virtual Size: 1.1 MB (1124530 bytes)
- v2 Blob: `sha256:4021d1190e5e92a1c97474c7f4f5a53fc8ac1ba3f582c60ebce10e1e6953d6c0`
- v2 Content-Length: 500.1 KB (500100 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:46:39 GMT
#### `4630d301b9afed4108cc30d900c9e109800361d2bede9b1bcc659715efd408a2`
```dockerfile
ENV BUNDLE_APP_CONFIG=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:21:52 GMT
- Parent Layer: `f9f99542a15e92be20bafa01620453c667fc5a7b4df79bb2b0d5f228110d38bf`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `041ca32db269c2c107351ac8028ad98ceeca1ed3cab9295d1e20d7cf1596cb99`
```dockerfile
CMD ["irb"]
```
- Created: Tue, 25 Aug 2015 08:21:52 GMT
- Parent Layer: `4630d301b9afed4108cc30d900c9e109800361d2bede9b1bcc659715efd408a2`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `57c6e615af052d62541154701cab208d14b7ef96e08c3caa713337f944e85b44`
```dockerfile
RUN bundle config --global frozen 1
```
- Created: Tue, 25 Aug 2015 08:23:04 GMT
- Parent Layer: `041ca32db269c2c107351ac8028ad98ceeca1ed3cab9295d1e20d7cf1596cb99`
- Docker Version: 1.7.1
- Virtual Size: 88.0 B
- v2 Blob: `sha256:5df96711276bfc6747960854cb03957c98bc23edc32be0b71c58c3198ce9b38c`
- v2 Content-Length: 216.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 05:52:24 GMT
#### `a44b7a274375df94cd2c628890b61a140261f21b659202a0071c936833bec81f`
```dockerfile
RUN mkdir -p /usr/src/app
```
- Created: Tue, 25 Aug 2015 08:23:05 GMT
- Parent Layer: `57c6e615af052d62541154701cab208d14b7ef96e08c3caa713337f944e85b44`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:bee8e5a45910b114e7778b7f591bb95beb903d44eafd1726a943ab918bd45904`
- v2 Content-Length: 126.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 05:52:23 GMT
#### `15159a32521de2efc82e89f0a62b44d3a8c49f3c85018b38bbb886e874e7f1df`
```dockerfile
WORKDIR /usr/src/app
```
- Created: Tue, 25 Aug 2015 08:23:05 GMT
- Parent Layer: `a44b7a274375df94cd2c628890b61a140261f21b659202a0071c936833bec81f`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `1a468e5c6fdee54ad3dbfcfc359089679d3778e65c2b520b341d4f2008f61eca`
```dockerfile
ONBUILD COPY Gemfile /usr/src/app/
```
- Created: Tue, 25 Aug 2015 08:23:06 GMT
- Parent Layer: `15159a32521de2efc82e89f0a62b44d3a8c49f3c85018b38bbb886e874e7f1df`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `aae01a8d766a8e76af29864611778145bb6f0836c61a4eaca5d37ffceb5db4ce`
```dockerfile
ONBUILD COPY Gemfile.lock /usr/src/app/
```
- Created: Tue, 25 Aug 2015 08:23:06 GMT
- Parent Layer: `1a468e5c6fdee54ad3dbfcfc359089679d3778e65c2b520b341d4f2008f61eca`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `9e870ea37727dcd8092ae59d8f161f91c5a629962031e080173858e14fa738a1`
```dockerfile
ONBUILD RUN bundle install
```
- Created: Tue, 25 Aug 2015 08:23:06 GMT
- Parent Layer: `aae01a8d766a8e76af29864611778145bb6f0836c61a4eaca5d37ffceb5db4ce`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `5fdfcee3afdbd034cc58b769337ab7f5bf8e5ab2b3b6b6e0b4a5a10675b04b8e`
```dockerfile
ONBUILD COPY . /usr/src/app
```
- Created: Tue, 25 Aug 2015 08:23:07 GMT
- Parent Layer: `9e870ea37727dcd8092ae59d8f161f91c5a629962031e080173858e14fa738a1`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
## `ruby:2.0.0-p647-slim`
- Total Virtual Size: 263.4 MB (263420564 bytes)
- Total v2 Content-Length: 94.1 MB (94094688 bytes)
### Layers (14)
#### `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
```dockerfile
ADD file:b770303e11edaa0ad0d8f43f6db4fa26673923912b5d5f7cb748ba025e6c4d3b in /
```
- Created: Thu, 20 Aug 2015 20:17:59 GMT
- Docker Version: 1.7.1
- Virtual Size: 125.2 MB (125174904 bytes)
- v2 Blob: `sha256:7ccc78f8af6db23a5013f7b90b5672b82d69dd2fb30d1e6736dba29209aceee7`
- v2 Content-Length: 51.4 MB (51368377 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:40:09 GMT
#### `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
```dockerfile
CMD ["/bin/bash"]
```
- Created: Thu, 20 Aug 2015 20:18:01 GMT
- Parent Layer: `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `787f8f2047af77d883efef4fee3b2041f0722d1f311f1c174c461d7c7c7a6b0f`
```dockerfile
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
bzip2 \
ca-certificates \
curl \
libffi-dev \
libgdbm3 \
libssl-dev \
libyaml-dev \
procps \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Mon, 24 Aug 2015 22:21:08 GMT
- Parent Layer: `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
- Docker Version: 1.7.1
- Virtual Size: 37.8 MB (37752882 bytes)
- v2 Blob: `sha256:7a0c5412f04c16fded90f2746384d0bbe4c221734daddf521e148d3dd591abac`
- v2 Content-Length: 13.6 MB (13602537 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:54:54 GMT
#### `6e87852e6890247c4fec706ddb1a39712304723c373133414ed7051e9d3ff735`
```dockerfile
ENV RUBY_MAJOR=2.0
```
- Created: Mon, 24 Aug 2015 22:21:10 GMT
- Parent Layer: `787f8f2047af77d883efef4fee3b2041f0722d1f311f1c174c461d7c7c7a6b0f`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `8d48c48838f6849435f1f8f016e1d86a73a0cb7405dc6dd4bf2aea9f9a707c8b`
```dockerfile
ENV RUBY_VERSION=2.0.0-p647
```
- Created: Mon, 24 Aug 2015 22:21:10 GMT
- Parent Layer: `6e87852e6890247c4fec706ddb1a39712304723c373133414ed7051e9d3ff735`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `d3255ddd41d5064b86ab69f0ae490fabb2d2bdcd25578efc86f1acb79a35ef43`
```dockerfile
ENV RUBYGEMS_VERSION=2.4.8
```
- Created: Mon, 24 Aug 2015 22:21:11 GMT
- Parent Layer: `8d48c48838f6849435f1f8f016e1d86a73a0cb7405dc6dd4bf2aea9f9a707c8b`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `ecf0120833a0e1fd2d133e4277bf5c9c70ae774c6a707330547cfe8e5bdbe709`
```dockerfile
RUN echo 'install: --no-document\nupdate: --no-document' >> "$HOME/.gemrc"
```
- Created: Mon, 24 Aug 2015 22:21:13 GMT
- Parent Layer: `d3255ddd41d5064b86ab69f0ae490fabb2d2bdcd25578efc86f1acb79a35ef43`
- Docker Version: 1.7.1
- Virtual Size: 45.0 B
- v2 Blob: `sha256:f39e989b2b6fa6ff4083aa633c7c8212e5d12a4fb420b8a4514e5aa10cc3302c`
- v2 Content-Length: 161.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 05:54:39 GMT
#### `429a3bb6cacf025bec45441038462b7aba32be6c394c9b8c1bda10e6413d6715`
```dockerfile
RUN buildDeps=' \
autoconf \
bison \
gcc \
libbz2-dev \
libgdbm-dev \
libglib2.0-dev \
libncurses-dev \
libreadline-dev \
libxml2-dev \
libxslt-dev \
make \
ruby \
' \
&& set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends $buildDeps \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/ruby \
&& curl -SL "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.bz2" \
| tar -xjC /usr/src/ruby --strip-components=1 \
&& cd /usr/src/ruby \
&& autoconf \
&& ./configure --disable-install-doc \
&& make -j"$(nproc)" \
&& make install \
&& gem update --system $RUBYGEMS_VERSION \
&& rm -r /usr/src/ruby \
&& apt-get purge -y --auto-remove $buildDeps
```
- Created: Mon, 24 Aug 2015 22:26:21 GMT
- Parent Layer: `ecf0120833a0e1fd2d133e4277bf5c9c70ae774c6a707330547cfe8e5bdbe709`
- Docker Version: 1.7.1
- Virtual Size: 99.4 MB (99368203 bytes)
- v2 Blob: `sha256:1432b334d9298b27c8d899c5ae30a0e922b07a6e6ee8ae3f36ab3820dd6fbf31`
- v2 Content-Length: 28.6 MB (28623192 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:54:36 GMT
#### `df37e929d887e00cf6e49bf3157d2c2b3fcb4cbe9991ce7fbd3c5aa23ed21063`
```dockerfile
ENV GEM_HOME=/usr/local/bundle
```
- Created: Mon, 24 Aug 2015 22:26:23 GMT
- Parent Layer: `429a3bb6cacf025bec45441038462b7aba32be6c394c9b8c1bda10e6413d6715`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `92ff2cb87ab3e136fbf437886f32df786bee467b4a9170e853bb68cc0f26accf`
```dockerfile
ENV PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
```
- Created: Mon, 24 Aug 2015 22:26:24 GMT
- Parent Layer: `df37e929d887e00cf6e49bf3157d2c2b3fcb4cbe9991ce7fbd3c5aa23ed21063`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `38f7b182376a49a3def8296374682137306a31d9d0f33fc1837355d96f653403`
```dockerfile
ENV BUNDLER_VERSION=1.10.6
```
- Created: Mon, 24 Aug 2015 22:26:25 GMT
- Parent Layer: `92ff2cb87ab3e136fbf437886f32df786bee467b4a9170e853bb68cc0f26accf`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `0b69b083b2303c3c1f343e0f80b3393d652b12d97a8738c8547f54b4fb0c980e`
```dockerfile
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
```
- Created: Mon, 24 Aug 2015 22:26:28 GMT
- Parent Layer: `38f7b182376a49a3def8296374682137306a31d9d0f33fc1837355d96f653403`
- Docker Version: 1.7.1
- Virtual Size: 1.1 MB (1124530 bytes)
- v2 Blob: `sha256:7ad4c9116880b0a6a769a6b72ba3f87374147a5b68499367c211e55fe7642776`
- v2 Content-Length: 500.1 KB (500101 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:54:13 GMT
#### `80b9fe9ce430ab6f8e97cd46050b038d371aa5e61e4f29d7f19ada79cbe65bec`
```dockerfile
ENV BUNDLE_APP_CONFIG=/usr/local/bundle
```
- Created: Mon, 24 Aug 2015 22:26:29 GMT
- Parent Layer: `0b69b083b2303c3c1f343e0f80b3393d652b12d97a8738c8547f54b4fb0c980e`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `393515ee1ea760910f4a6edefc9830f8b717f694b3cfdd330b7f38a1d87638a9`
```dockerfile
CMD ["irb"]
```
- Created: Mon, 24 Aug 2015 22:26:30 GMT
- Parent Layer: `80b9fe9ce430ab6f8e97cd46050b038d371aa5e61e4f29d7f19ada79cbe65bec`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
## `ruby:2.0.0-slim`
- Total Virtual Size: 263.4 MB (263420564 bytes)
- Total v2 Content-Length: 94.1 MB (94094688 bytes)
### Layers (14)
#### `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
```dockerfile
ADD file:b770303e11edaa0ad0d8f43f6db4fa26673923912b5d5f7cb748ba025e6c4d3b in /
```
- Created: Thu, 20 Aug 2015 20:17:59 GMT
- Docker Version: 1.7.1
- Virtual Size: 125.2 MB (125174904 bytes)
- v2 Blob: `sha256:7ccc78f8af6db23a5013f7b90b5672b82d69dd2fb30d1e6736dba29209aceee7`
- v2 Content-Length: 51.4 MB (51368377 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:40:09 GMT
#### `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
```dockerfile
CMD ["/bin/bash"]
```
- Created: Thu, 20 Aug 2015 20:18:01 GMT
- Parent Layer: `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `787f8f2047af77d883efef4fee3b2041f0722d1f311f1c174c461d7c7c7a6b0f`
```dockerfile
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
bzip2 \
ca-certificates \
curl \
libffi-dev \
libgdbm3 \
libssl-dev \
libyaml-dev \
procps \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Mon, 24 Aug 2015 22:21:08 GMT
- Parent Layer: `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
- Docker Version: 1.7.1
- Virtual Size: 37.8 MB (37752882 bytes)
- v2 Blob: `sha256:7a0c5412f04c16fded90f2746384d0bbe4c221734daddf521e148d3dd591abac`
- v2 Content-Length: 13.6 MB (13602537 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:54:54 GMT
#### `6e87852e6890247c4fec706ddb1a39712304723c373133414ed7051e9d3ff735`
```dockerfile
ENV RUBY_MAJOR=2.0
```
- Created: Mon, 24 Aug 2015 22:21:10 GMT
- Parent Layer: `787f8f2047af77d883efef4fee3b2041f0722d1f311f1c174c461d7c7c7a6b0f`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `8d48c48838f6849435f1f8f016e1d86a73a0cb7405dc6dd4bf2aea9f9a707c8b`
```dockerfile
ENV RUBY_VERSION=2.0.0-p647
```
- Created: Mon, 24 Aug 2015 22:21:10 GMT
- Parent Layer: `6e87852e6890247c4fec706ddb1a39712304723c373133414ed7051e9d3ff735`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `d3255ddd41d5064b86ab69f0ae490fabb2d2bdcd25578efc86f1acb79a35ef43`
```dockerfile
ENV RUBYGEMS_VERSION=2.4.8
```
- Created: Mon, 24 Aug 2015 22:21:11 GMT
- Parent Layer: `8d48c48838f6849435f1f8f016e1d86a73a0cb7405dc6dd4bf2aea9f9a707c8b`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `ecf0120833a0e1fd2d133e4277bf5c9c70ae774c6a707330547cfe8e5bdbe709`
```dockerfile
RUN echo 'install: --no-document\nupdate: --no-document' >> "$HOME/.gemrc"
```
- Created: Mon, 24 Aug 2015 22:21:13 GMT
- Parent Layer: `d3255ddd41d5064b86ab69f0ae490fabb2d2bdcd25578efc86f1acb79a35ef43`
- Docker Version: 1.7.1
- Virtual Size: 45.0 B
- v2 Blob: `sha256:f39e989b2b6fa6ff4083aa633c7c8212e5d12a4fb420b8a4514e5aa10cc3302c`
- v2 Content-Length: 161.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 05:54:39 GMT
#### `429a3bb6cacf025bec45441038462b7aba32be6c394c9b8c1bda10e6413d6715`
```dockerfile
RUN buildDeps=' \
autoconf \
bison \
gcc \
libbz2-dev \
libgdbm-dev \
libglib2.0-dev \
libncurses-dev \
libreadline-dev \
libxml2-dev \
libxslt-dev \
make \
ruby \
' \
&& set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends $buildDeps \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/ruby \
&& curl -SL "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.bz2" \
| tar -xjC /usr/src/ruby --strip-components=1 \
&& cd /usr/src/ruby \
&& autoconf \
&& ./configure --disable-install-doc \
&& make -j"$(nproc)" \
&& make install \
&& gem update --system $RUBYGEMS_VERSION \
&& rm -r /usr/src/ruby \
&& apt-get purge -y --auto-remove $buildDeps
```
- Created: Mon, 24 Aug 2015 22:26:21 GMT
- Parent Layer: `ecf0120833a0e1fd2d133e4277bf5c9c70ae774c6a707330547cfe8e5bdbe709`
- Docker Version: 1.7.1
- Virtual Size: 99.4 MB (99368203 bytes)
- v2 Blob: `sha256:1432b334d9298b27c8d899c5ae30a0e922b07a6e6ee8ae3f36ab3820dd6fbf31`
- v2 Content-Length: 28.6 MB (28623192 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:54:36 GMT
#### `df37e929d887e00cf6e49bf3157d2c2b3fcb4cbe9991ce7fbd3c5aa23ed21063`
```dockerfile
ENV GEM_HOME=/usr/local/bundle
```
- Created: Mon, 24 Aug 2015 22:26:23 GMT
- Parent Layer: `429a3bb6cacf025bec45441038462b7aba32be6c394c9b8c1bda10e6413d6715`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `92ff2cb87ab3e136fbf437886f32df786bee467b4a9170e853bb68cc0f26accf`
```dockerfile
ENV PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
```
- Created: Mon, 24 Aug 2015 22:26:24 GMT
- Parent Layer: `df37e929d887e00cf6e49bf3157d2c2b3fcb4cbe9991ce7fbd3c5aa23ed21063`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `38f7b182376a49a3def8296374682137306a31d9d0f33fc1837355d96f653403`
```dockerfile
ENV BUNDLER_VERSION=1.10.6
```
- Created: Mon, 24 Aug 2015 22:26:25 GMT
- Parent Layer: `92ff2cb87ab3e136fbf437886f32df786bee467b4a9170e853bb68cc0f26accf`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `0b69b083b2303c3c1f343e0f80b3393d652b12d97a8738c8547f54b4fb0c980e`
```dockerfile
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
```
- Created: Mon, 24 Aug 2015 22:26:28 GMT
- Parent Layer: `38f7b182376a49a3def8296374682137306a31d9d0f33fc1837355d96f653403`
- Docker Version: 1.7.1
- Virtual Size: 1.1 MB (1124530 bytes)
- v2 Blob: `sha256:7ad4c9116880b0a6a769a6b72ba3f87374147a5b68499367c211e55fe7642776`
- v2 Content-Length: 500.1 KB (500101 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:54:13 GMT
#### `80b9fe9ce430ab6f8e97cd46050b038d371aa5e61e4f29d7f19ada79cbe65bec`
```dockerfile
ENV BUNDLE_APP_CONFIG=/usr/local/bundle
```
- Created: Mon, 24 Aug 2015 22:26:29 GMT
- Parent Layer: `0b69b083b2303c3c1f343e0f80b3393d652b12d97a8738c8547f54b4fb0c980e`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `393515ee1ea760910f4a6edefc9830f8b717f694b3cfdd330b7f38a1d87638a9`
```dockerfile
CMD ["irb"]
```
- Created: Mon, 24 Aug 2015 22:26:30 GMT
- Parent Layer: `80b9fe9ce430ab6f8e97cd46050b038d371aa5e61e4f29d7f19ada79cbe65bec`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
## `ruby:2.0-slim`
- Total Virtual Size: 263.4 MB (263420564 bytes)
- Total v2 Content-Length: 94.1 MB (94094688 bytes)
### Layers (14)
#### `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
```dockerfile
ADD file:b770303e11edaa0ad0d8f43f6db4fa26673923912b5d5f7cb748ba025e6c4d3b in /
```
- Created: Thu, 20 Aug 2015 20:17:59 GMT
- Docker Version: 1.7.1
- Virtual Size: 125.2 MB (125174904 bytes)
- v2 Blob: `sha256:7ccc78f8af6db23a5013f7b90b5672b82d69dd2fb30d1e6736dba29209aceee7`
- v2 Content-Length: 51.4 MB (51368377 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:40:09 GMT
#### `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
```dockerfile
CMD ["/bin/bash"]
```
- Created: Thu, 20 Aug 2015 20:18:01 GMT
- Parent Layer: `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `787f8f2047af77d883efef4fee3b2041f0722d1f311f1c174c461d7c7c7a6b0f`
```dockerfile
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
bzip2 \
ca-certificates \
curl \
libffi-dev \
libgdbm3 \
libssl-dev \
libyaml-dev \
procps \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Mon, 24 Aug 2015 22:21:08 GMT
- Parent Layer: `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
- Docker Version: 1.7.1
- Virtual Size: 37.8 MB (37752882 bytes)
- v2 Blob: `sha256:7a0c5412f04c16fded90f2746384d0bbe4c221734daddf521e148d3dd591abac`
- v2 Content-Length: 13.6 MB (13602537 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:54:54 GMT
#### `6e87852e6890247c4fec706ddb1a39712304723c373133414ed7051e9d3ff735`
```dockerfile
ENV RUBY_MAJOR=2.0
```
- Created: Mon, 24 Aug 2015 22:21:10 GMT
- Parent Layer: `787f8f2047af77d883efef4fee3b2041f0722d1f311f1c174c461d7c7c7a6b0f`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `8d48c48838f6849435f1f8f016e1d86a73a0cb7405dc6dd4bf2aea9f9a707c8b`
```dockerfile
ENV RUBY_VERSION=2.0.0-p647
```
- Created: Mon, 24 Aug 2015 22:21:10 GMT
- Parent Layer: `6e87852e6890247c4fec706ddb1a39712304723c373133414ed7051e9d3ff735`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `d3255ddd41d5064b86ab69f0ae490fabb2d2bdcd25578efc86f1acb79a35ef43`
```dockerfile
ENV RUBYGEMS_VERSION=2.4.8
```
- Created: Mon, 24 Aug 2015 22:21:11 GMT
- Parent Layer: `8d48c48838f6849435f1f8f016e1d86a73a0cb7405dc6dd4bf2aea9f9a707c8b`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `ecf0120833a0e1fd2d133e4277bf5c9c70ae774c6a707330547cfe8e5bdbe709`
```dockerfile
RUN echo 'install: --no-document\nupdate: --no-document' >> "$HOME/.gemrc"
```
- Created: Mon, 24 Aug 2015 22:21:13 GMT
- Parent Layer: `d3255ddd41d5064b86ab69f0ae490fabb2d2bdcd25578efc86f1acb79a35ef43`
- Docker Version: 1.7.1
- Virtual Size: 45.0 B
- v2 Blob: `sha256:f39e989b2b6fa6ff4083aa633c7c8212e5d12a4fb420b8a4514e5aa10cc3302c`
- v2 Content-Length: 161.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 05:54:39 GMT
#### `429a3bb6cacf025bec45441038462b7aba32be6c394c9b8c1bda10e6413d6715`
```dockerfile
RUN buildDeps=' \
autoconf \
bison \
gcc \
libbz2-dev \
libgdbm-dev \
libglib2.0-dev \
libncurses-dev \
libreadline-dev \
libxml2-dev \
libxslt-dev \
make \
ruby \
' \
&& set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends $buildDeps \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/ruby \
&& curl -SL "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.bz2" \
| tar -xjC /usr/src/ruby --strip-components=1 \
&& cd /usr/src/ruby \
&& autoconf \
&& ./configure --disable-install-doc \
&& make -j"$(nproc)" \
&& make install \
&& gem update --system $RUBYGEMS_VERSION \
&& rm -r /usr/src/ruby \
&& apt-get purge -y --auto-remove $buildDeps
```
- Created: Mon, 24 Aug 2015 22:26:21 GMT
- Parent Layer: `ecf0120833a0e1fd2d133e4277bf5c9c70ae774c6a707330547cfe8e5bdbe709`
- Docker Version: 1.7.1
- Virtual Size: 99.4 MB (99368203 bytes)
- v2 Blob: `sha256:1432b334d9298b27c8d899c5ae30a0e922b07a6e6ee8ae3f36ab3820dd6fbf31`
- v2 Content-Length: 28.6 MB (28623192 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:54:36 GMT
#### `df37e929d887e00cf6e49bf3157d2c2b3fcb4cbe9991ce7fbd3c5aa23ed21063`
```dockerfile
ENV GEM_HOME=/usr/local/bundle
```
- Created: Mon, 24 Aug 2015 22:26:23 GMT
- Parent Layer: `429a3bb6cacf025bec45441038462b7aba32be6c394c9b8c1bda10e6413d6715`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `92ff2cb87ab3e136fbf437886f32df786bee467b4a9170e853bb68cc0f26accf`
```dockerfile
ENV PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
```
- Created: Mon, 24 Aug 2015 22:26:24 GMT
- Parent Layer: `df37e929d887e00cf6e49bf3157d2c2b3fcb4cbe9991ce7fbd3c5aa23ed21063`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `38f7b182376a49a3def8296374682137306a31d9d0f33fc1837355d96f653403`
```dockerfile
ENV BUNDLER_VERSION=1.10.6
```
- Created: Mon, 24 Aug 2015 22:26:25 GMT
- Parent Layer: `92ff2cb87ab3e136fbf437886f32df786bee467b4a9170e853bb68cc0f26accf`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `0b69b083b2303c3c1f343e0f80b3393d652b12d97a8738c8547f54b4fb0c980e`
```dockerfile
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
```
- Created: Mon, 24 Aug 2015 22:26:28 GMT
- Parent Layer: `38f7b182376a49a3def8296374682137306a31d9d0f33fc1837355d96f653403`
- Docker Version: 1.7.1
- Virtual Size: 1.1 MB (1124530 bytes)
- v2 Blob: `sha256:7ad4c9116880b0a6a769a6b72ba3f87374147a5b68499367c211e55fe7642776`
- v2 Content-Length: 500.1 KB (500101 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:54:13 GMT
#### `80b9fe9ce430ab6f8e97cd46050b038d371aa5e61e4f29d7f19ada79cbe65bec`
```dockerfile
ENV BUNDLE_APP_CONFIG=/usr/local/bundle
```
- Created: Mon, 24 Aug 2015 22:26:29 GMT
- Parent Layer: `0b69b083b2303c3c1f343e0f80b3393d652b12d97a8738c8547f54b4fb0c980e`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `393515ee1ea760910f4a6edefc9830f8b717f694b3cfdd330b7f38a1d87638a9`
```dockerfile
CMD ["irb"]
```
- Created: Mon, 24 Aug 2015 22:26:30 GMT
- Parent Layer: `80b9fe9ce430ab6f8e97cd46050b038d371aa5e61e4f29d7f19ada79cbe65bec`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
## `ruby:2.1.7`
- Total Virtual Size: 716.8 MB (716838138 bytes)
- Total v2 Content-Length: 272.7 MB (272732699 bytes)
### Layers (17)
#### `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
```dockerfile
ADD file:b770303e11edaa0ad0d8f43f6db4fa26673923912b5d5f7cb748ba025e6c4d3b in /
```
- Created: Thu, 20 Aug 2015 20:17:59 GMT
- Docker Version: 1.7.1
- Virtual Size: 125.2 MB (125174904 bytes)
- v2 Blob: `sha256:7ccc78f8af6db23a5013f7b90b5672b82d69dd2fb30d1e6736dba29209aceee7`
- v2 Content-Length: 51.4 MB (51368377 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:40:09 GMT
#### `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
```dockerfile
CMD ["/bin/bash"]
```
- Created: Thu, 20 Aug 2015 20:18:01 GMT
- Parent Layer: `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
wget \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:24:45 GMT
- Parent Layer: `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
- Docker Version: 1.7.1
- Virtual Size: 44.4 MB (44355942 bytes)
- v2 Blob: `sha256:eba087ca53a356384db448d54a51620cde9e91d4935e7cd134c3c571df8447c4`
- v2 Content-Length: 18.5 MB (18538916 bytes)
- v2 Last-Modified: Tue, 25 Aug 2015 22:15:52 GMT
#### `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
bzr \
git \
mercurial \
openssh-client \
subversion \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:25:45 GMT
- Parent Layer: `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
- Docker Version: 1.7.1
- Virtual Size: 122.3 MB (122318537 bytes)
- v2 Blob: `sha256:a068cb6fd68bb10bf1f97beedee2837c2b2a52109dbbb59ea25462d661006e0d`
- v2 Content-Length: 42.3 MB (42340018 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:59:13 GMT
#### `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
automake \
bzip2 \
file \
g++ \
gcc \
imagemagick \
libbz2-dev \
libc6-dev \
libcurl4-openssl-dev \
libevent-dev \
libffi-dev \
libglib2.0-dev \
libjpeg-dev \
liblzma-dev \
libmagickcore-dev \
libmagickwand-dev \
libmysqlclient-dev \
libncurses-dev \
libpng-dev \
libpq-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libtool \
libwebp-dev \
libxml2-dev \
libxslt-dev \
libyaml-dev \
make \
patch \
xz-utils \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Mon, 24 Aug 2015 16:11:35 GMT
- Parent Layer: `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
- Docker Version: 1.7.1
- Virtual Size: 313.7 MB (313666691 bytes)
- v2 Blob: `sha256:2ac01aa9d22a0c73405fe147734a6acf8929209620ca4a80fe8064449ab7d301`
- v2 Content-Length: 128.2 MB (128191020 bytes)
- v2 Last-Modified: Mon, 24 Aug 2015 16:55:37 GMT
#### `c3f6fcd16bdd0b9cdd4d5b64e3c48edf8ad0105f80c8a45d876cb80700aba22e`
```dockerfile
ENV RUBY_MAJOR=2.1
```
- Created: Tue, 25 Aug 2015 08:23:50 GMT
- Parent Layer: `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `6f30b7ded6dd855984512fb60fb8e6d87e6925203d05e8ca9c83fdedb32dcd01`
```dockerfile
ENV RUBY_VERSION=2.1.7
```
- Created: Tue, 25 Aug 2015 08:23:51 GMT
- Parent Layer: `c3f6fcd16bdd0b9cdd4d5b64e3c48edf8ad0105f80c8a45d876cb80700aba22e`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `af2fab4c662df0120df1ce4ec08ca29a657af04842644eca52edc722d52002af`
```dockerfile
ENV RUBY_DOWNLOAD_SHA256=f59c1596ac39cc7e60126e7d3698c19f482f04060674fdfe0124e1752ba6dd81
```
- Created: Tue, 25 Aug 2015 08:23:51 GMT
- Parent Layer: `6f30b7ded6dd855984512fb60fb8e6d87e6925203d05e8ca9c83fdedb32dcd01`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `6cc30d208333c700fda0c6f9002756aec36586696fbbfd84fcf050a8faca59c4`
```dockerfile
ENV RUBYGEMS_VERSION=2.4.8
```
- Created: Tue, 25 Aug 2015 08:23:52 GMT
- Parent Layer: `af2fab4c662df0120df1ce4ec08ca29a657af04842644eca52edc722d52002af`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `e0fd6f8476b65b20df8617809873848c96db32a33f9b8eafdfb02c86f1afa646`
```dockerfile
RUN echo 'install: --no-document\nupdate: --no-document' >> "$HOME/.gemrc"
```
- Created: Tue, 25 Aug 2015 08:23:53 GMT
- Parent Layer: `6cc30d208333c700fda0c6f9002756aec36586696fbbfd84fcf050a8faca59c4`
- Docker Version: 1.7.1
- Virtual Size: 45.0 B
- v2 Blob: `sha256:9007d89172fd58849f841803a73262de0589d83d7a9b63c3ac0dce3ab091c642`
- v2 Content-Length: 162.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 05:57:01 GMT
#### `2171d2db4770b341c56b9ceb2831aa6703c9a692aff8efd5862424a8c082c845`
```dockerfile
RUN apt-get update \
&& apt-get install -y bison libgdbm-dev ruby \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/ruby \
&& curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
&& rm ruby.tar.gz \
&& cd /usr/src/ruby \
&& autoconf \
&& ./configure --disable-install-doc \
&& make -j"$(nproc)" \
&& make install \
&& apt-get purge -y --auto-remove bison libgdbm-dev ruby \
&& gem update --system $RUBYGEMS_VERSION \
&& rm -r /usr/src/ruby
```
- Created: Tue, 25 Aug 2015 08:27:59 GMT
- Parent Layer: `e0fd6f8476b65b20df8617809873848c96db32a33f9b8eafdfb02c86f1afa646`
- Docker Version: 1.7.1
- Virtual Size: 110.2 MB (110197485 bytes)
- v2 Blob: `sha256:035193dc6a3655fe2c2f1ead78c38593cba4049787a6f81724f48a815274128c`
- v2 Content-Length: 31.8 MB (31793751 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:56:58 GMT
#### `694ef7fc41df48f30328124d7a012ed6016bc2d0321b87a2b7dfaca79f92d653`
```dockerfile
ENV GEM_HOME=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:28:00 GMT
- Parent Layer: `2171d2db4770b341c56b9ceb2831aa6703c9a692aff8efd5862424a8c082c845`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `4cafcafe16c6a0bdbe256de5803d139cb991fa43b5c54ac4b70cb74e8f99deba`
```dockerfile
ENV PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
```
- Created: Tue, 25 Aug 2015 08:28:00 GMT
- Parent Layer: `694ef7fc41df48f30328124d7a012ed6016bc2d0321b87a2b7dfaca79f92d653`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `58cdb66ca394748e23991183b3d12f98ed216e63bc0a726583b47433f7765f61`
```dockerfile
ENV BUNDLER_VERSION=1.10.6
```
- Created: Tue, 25 Aug 2015 08:28:00 GMT
- Parent Layer: `4cafcafe16c6a0bdbe256de5803d139cb991fa43b5c54ac4b70cb74e8f99deba`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `51ef2697a3e69375dd4b42926e9a11c30c1fb94351cab390e3adf11e5ef6d746`
```dockerfile
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
```
- Created: Tue, 25 Aug 2015 08:28:04 GMT
- Parent Layer: `58cdb66ca394748e23991183b3d12f98ed216e63bc0a726583b47433f7765f61`
- Docker Version: 1.7.1
- Virtual Size: 1.1 MB (1124534 bytes)
- v2 Blob: `sha256:2a5c4075d0a765522ef9b9bb6c983bb6beb95b8e5fd9f121be7c7aedff457053`
- v2 Content-Length: 500.1 KB (500103 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:56:32 GMT
#### `f791b6ef593cb86ffecf0b0dc99637174730478889ed854bef420a6dcfd74ba4`
```dockerfile
ENV BUNDLE_APP_CONFIG=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:28:04 GMT
- Parent Layer: `51ef2697a3e69375dd4b42926e9a11c30c1fb94351cab390e3adf11e5ef6d746`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `68cf55cf7c1df75921de73f54a8b3724c2941c3b8ef03474416382f10f8979cb`
```dockerfile
CMD ["irb"]
```
- Created: Tue, 25 Aug 2015 08:28:05 GMT
- Parent Layer: `f791b6ef593cb86ffecf0b0dc99637174730478889ed854bef420a6dcfd74ba4`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
## `ruby:2.1`
- Total Virtual Size: 716.8 MB (716838138 bytes)
- Total v2 Content-Length: 272.7 MB (272732699 bytes)
### Layers (17)
#### `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
```dockerfile
ADD file:b770303e11edaa0ad0d8f43f6db4fa26673923912b5d5f7cb748ba025e6c4d3b in /
```
- Created: Thu, 20 Aug 2015 20:17:59 GMT
- Docker Version: 1.7.1
- Virtual Size: 125.2 MB (125174904 bytes)
- v2 Blob: `sha256:7ccc78f8af6db23a5013f7b90b5672b82d69dd2fb30d1e6736dba29209aceee7`
- v2 Content-Length: 51.4 MB (51368377 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:40:09 GMT
#### `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
```dockerfile
CMD ["/bin/bash"]
```
- Created: Thu, 20 Aug 2015 20:18:01 GMT
- Parent Layer: `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
wget \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:24:45 GMT
- Parent Layer: `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
- Docker Version: 1.7.1
- Virtual Size: 44.4 MB (44355942 bytes)
- v2 Blob: `sha256:eba087ca53a356384db448d54a51620cde9e91d4935e7cd134c3c571df8447c4`
- v2 Content-Length: 18.5 MB (18538916 bytes)
- v2 Last-Modified: Tue, 25 Aug 2015 22:15:52 GMT
#### `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
bzr \
git \
mercurial \
openssh-client \
subversion \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:25:45 GMT
- Parent Layer: `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
- Docker Version: 1.7.1
- Virtual Size: 122.3 MB (122318537 bytes)
- v2 Blob: `sha256:a068cb6fd68bb10bf1f97beedee2837c2b2a52109dbbb59ea25462d661006e0d`
- v2 Content-Length: 42.3 MB (42340018 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:59:13 GMT
#### `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
automake \
bzip2 \
file \
g++ \
gcc \
imagemagick \
libbz2-dev \
libc6-dev \
libcurl4-openssl-dev \
libevent-dev \
libffi-dev \
libglib2.0-dev \
libjpeg-dev \
liblzma-dev \
libmagickcore-dev \
libmagickwand-dev \
libmysqlclient-dev \
libncurses-dev \
libpng-dev \
libpq-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libtool \
libwebp-dev \
libxml2-dev \
libxslt-dev \
libyaml-dev \
make \
patch \
xz-utils \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Mon, 24 Aug 2015 16:11:35 GMT
- Parent Layer: `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
- Docker Version: 1.7.1
- Virtual Size: 313.7 MB (313666691 bytes)
- v2 Blob: `sha256:2ac01aa9d22a0c73405fe147734a6acf8929209620ca4a80fe8064449ab7d301`
- v2 Content-Length: 128.2 MB (128191020 bytes)
- v2 Last-Modified: Mon, 24 Aug 2015 16:55:37 GMT
#### `c3f6fcd16bdd0b9cdd4d5b64e3c48edf8ad0105f80c8a45d876cb80700aba22e`
```dockerfile
ENV RUBY_MAJOR=2.1
```
- Created: Tue, 25 Aug 2015 08:23:50 GMT
- Parent Layer: `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `6f30b7ded6dd855984512fb60fb8e6d87e6925203d05e8ca9c83fdedb32dcd01`
```dockerfile
ENV RUBY_VERSION=2.1.7
```
- Created: Tue, 25 Aug 2015 08:23:51 GMT
- Parent Layer: `c3f6fcd16bdd0b9cdd4d5b64e3c48edf8ad0105f80c8a45d876cb80700aba22e`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `af2fab4c662df0120df1ce4ec08ca29a657af04842644eca52edc722d52002af`
```dockerfile
ENV RUBY_DOWNLOAD_SHA256=f59c1596ac39cc7e60126e7d3698c19f482f04060674fdfe0124e1752ba6dd81
```
- Created: Tue, 25 Aug 2015 08:23:51 GMT
- Parent Layer: `6f30b7ded6dd855984512fb60fb8e6d87e6925203d05e8ca9c83fdedb32dcd01`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `6cc30d208333c700fda0c6f9002756aec36586696fbbfd84fcf050a8faca59c4`
```dockerfile
ENV RUBYGEMS_VERSION=2.4.8
```
- Created: Tue, 25 Aug 2015 08:23:52 GMT
- Parent Layer: `af2fab4c662df0120df1ce4ec08ca29a657af04842644eca52edc722d52002af`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `e0fd6f8476b65b20df8617809873848c96db32a33f9b8eafdfb02c86f1afa646`
```dockerfile
RUN echo 'install: --no-document\nupdate: --no-document' >> "$HOME/.gemrc"
```
- Created: Tue, 25 Aug 2015 08:23:53 GMT
- Parent Layer: `6cc30d208333c700fda0c6f9002756aec36586696fbbfd84fcf050a8faca59c4`
- Docker Version: 1.7.1
- Virtual Size: 45.0 B
- v2 Blob: `sha256:9007d89172fd58849f841803a73262de0589d83d7a9b63c3ac0dce3ab091c642`
- v2 Content-Length: 162.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 05:57:01 GMT
#### `2171d2db4770b341c56b9ceb2831aa6703c9a692aff8efd5862424a8c082c845`
```dockerfile
RUN apt-get update \
&& apt-get install -y bison libgdbm-dev ruby \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/ruby \
&& curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
&& rm ruby.tar.gz \
&& cd /usr/src/ruby \
&& autoconf \
&& ./configure --disable-install-doc \
&& make -j"$(nproc)" \
&& make install \
&& apt-get purge -y --auto-remove bison libgdbm-dev ruby \
&& gem update --system $RUBYGEMS_VERSION \
&& rm -r /usr/src/ruby
```
- Created: Tue, 25 Aug 2015 08:27:59 GMT
- Parent Layer: `e0fd6f8476b65b20df8617809873848c96db32a33f9b8eafdfb02c86f1afa646`
- Docker Version: 1.7.1
- Virtual Size: 110.2 MB (110197485 bytes)
- v2 Blob: `sha256:035193dc6a3655fe2c2f1ead78c38593cba4049787a6f81724f48a815274128c`
- v2 Content-Length: 31.8 MB (31793751 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:56:58 GMT
#### `694ef7fc41df48f30328124d7a012ed6016bc2d0321b87a2b7dfaca79f92d653`
```dockerfile
ENV GEM_HOME=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:28:00 GMT
- Parent Layer: `2171d2db4770b341c56b9ceb2831aa6703c9a692aff8efd5862424a8c082c845`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `4cafcafe16c6a0bdbe256de5803d139cb991fa43b5c54ac4b70cb74e8f99deba`
```dockerfile
ENV PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
```
- Created: Tue, 25 Aug 2015 08:28:00 GMT
- Parent Layer: `694ef7fc41df48f30328124d7a012ed6016bc2d0321b87a2b7dfaca79f92d653`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `58cdb66ca394748e23991183b3d12f98ed216e63bc0a726583b47433f7765f61`
```dockerfile
ENV BUNDLER_VERSION=1.10.6
```
- Created: Tue, 25 Aug 2015 08:28:00 GMT
- Parent Layer: `4cafcafe16c6a0bdbe256de5803d139cb991fa43b5c54ac4b70cb74e8f99deba`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `51ef2697a3e69375dd4b42926e9a11c30c1fb94351cab390e3adf11e5ef6d746`
```dockerfile
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
```
- Created: Tue, 25 Aug 2015 08:28:04 GMT
- Parent Layer: `58cdb66ca394748e23991183b3d12f98ed216e63bc0a726583b47433f7765f61`
- Docker Version: 1.7.1
- Virtual Size: 1.1 MB (1124534 bytes)
- v2 Blob: `sha256:2a5c4075d0a765522ef9b9bb6c983bb6beb95b8e5fd9f121be7c7aedff457053`
- v2 Content-Length: 500.1 KB (500103 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:56:32 GMT
#### `f791b6ef593cb86ffecf0b0dc99637174730478889ed854bef420a6dcfd74ba4`
```dockerfile
ENV BUNDLE_APP_CONFIG=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:28:04 GMT
- Parent Layer: `51ef2697a3e69375dd4b42926e9a11c30c1fb94351cab390e3adf11e5ef6d746`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `68cf55cf7c1df75921de73f54a8b3724c2941c3b8ef03474416382f10f8979cb`
```dockerfile
CMD ["irb"]
```
- Created: Tue, 25 Aug 2015 08:28:05 GMT
- Parent Layer: `f791b6ef593cb86ffecf0b0dc99637174730478889ed854bef420a6dcfd74ba4`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
## `ruby:2.1.7-onbuild`
- Total Virtual Size: 716.8 MB (716838230 bytes)
- Total v2 Content-Length: 272.7 MB (272733206 bytes)
### Layers (24)
#### `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
```dockerfile
ADD file:b770303e11edaa0ad0d8f43f6db4fa26673923912b5d5f7cb748ba025e6c4d3b in /
```
- Created: Thu, 20 Aug 2015 20:17:59 GMT
- Docker Version: 1.7.1
- Virtual Size: 125.2 MB (125174904 bytes)
- v2 Blob: `sha256:7ccc78f8af6db23a5013f7b90b5672b82d69dd2fb30d1e6736dba29209aceee7`
- v2 Content-Length: 51.4 MB (51368377 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:40:09 GMT
#### `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
```dockerfile
CMD ["/bin/bash"]
```
- Created: Thu, 20 Aug 2015 20:18:01 GMT
- Parent Layer: `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
wget \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:24:45 GMT
- Parent Layer: `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
- Docker Version: 1.7.1
- Virtual Size: 44.4 MB (44355942 bytes)
- v2 Blob: `sha256:eba087ca53a356384db448d54a51620cde9e91d4935e7cd134c3c571df8447c4`
- v2 Content-Length: 18.5 MB (18538916 bytes)
- v2 Last-Modified: Tue, 25 Aug 2015 22:15:52 GMT
#### `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
bzr \
git \
mercurial \
openssh-client \
subversion \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:25:45 GMT
- Parent Layer: `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
- Docker Version: 1.7.1
- Virtual Size: 122.3 MB (122318537 bytes)
- v2 Blob: `sha256:a068cb6fd68bb10bf1f97beedee2837c2b2a52109dbbb59ea25462d661006e0d`
- v2 Content-Length: 42.3 MB (42340018 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:59:13 GMT
#### `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
automake \
bzip2 \
file \
g++ \
gcc \
imagemagick \
libbz2-dev \
libc6-dev \
libcurl4-openssl-dev \
libevent-dev \
libffi-dev \
libglib2.0-dev \
libjpeg-dev \
liblzma-dev \
libmagickcore-dev \
libmagickwand-dev \
libmysqlclient-dev \
libncurses-dev \
libpng-dev \
libpq-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libtool \
libwebp-dev \
libxml2-dev \
libxslt-dev \
libyaml-dev \
make \
patch \
xz-utils \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Mon, 24 Aug 2015 16:11:35 GMT
- Parent Layer: `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
- Docker Version: 1.7.1
- Virtual Size: 313.7 MB (313666691 bytes)
- v2 Blob: `sha256:2ac01aa9d22a0c73405fe147734a6acf8929209620ca4a80fe8064449ab7d301`
- v2 Content-Length: 128.2 MB (128191020 bytes)
- v2 Last-Modified: Mon, 24 Aug 2015 16:55:37 GMT
#### `c3f6fcd16bdd0b9cdd4d5b64e3c48edf8ad0105f80c8a45d876cb80700aba22e`
```dockerfile
ENV RUBY_MAJOR=2.1
```
- Created: Tue, 25 Aug 2015 08:23:50 GMT
- Parent Layer: `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `6f30b7ded6dd855984512fb60fb8e6d87e6925203d05e8ca9c83fdedb32dcd01`
```dockerfile
ENV RUBY_VERSION=2.1.7
```
- Created: Tue, 25 Aug 2015 08:23:51 GMT
- Parent Layer: `c3f6fcd16bdd0b9cdd4d5b64e3c48edf8ad0105f80c8a45d876cb80700aba22e`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `af2fab4c662df0120df1ce4ec08ca29a657af04842644eca52edc722d52002af`
```dockerfile
ENV RUBY_DOWNLOAD_SHA256=f59c1596ac39cc7e60126e7d3698c19f482f04060674fdfe0124e1752ba6dd81
```
- Created: Tue, 25 Aug 2015 08:23:51 GMT
- Parent Layer: `6f30b7ded6dd855984512fb60fb8e6d87e6925203d05e8ca9c83fdedb32dcd01`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `6cc30d208333c700fda0c6f9002756aec36586696fbbfd84fcf050a8faca59c4`
```dockerfile
ENV RUBYGEMS_VERSION=2.4.8
```
- Created: Tue, 25 Aug 2015 08:23:52 GMT
- Parent Layer: `af2fab4c662df0120df1ce4ec08ca29a657af04842644eca52edc722d52002af`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `e0fd6f8476b65b20df8617809873848c96db32a33f9b8eafdfb02c86f1afa646`
```dockerfile
RUN echo 'install: --no-document\nupdate: --no-document' >> "$HOME/.gemrc"
```
- Created: Tue, 25 Aug 2015 08:23:53 GMT
- Parent Layer: `6cc30d208333c700fda0c6f9002756aec36586696fbbfd84fcf050a8faca59c4`
- Docker Version: 1.7.1
- Virtual Size: 45.0 B
- v2 Blob: `sha256:9007d89172fd58849f841803a73262de0589d83d7a9b63c3ac0dce3ab091c642`
- v2 Content-Length: 162.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 05:57:01 GMT
#### `2171d2db4770b341c56b9ceb2831aa6703c9a692aff8efd5862424a8c082c845`
```dockerfile
RUN apt-get update \
&& apt-get install -y bison libgdbm-dev ruby \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/ruby \
&& curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
&& rm ruby.tar.gz \
&& cd /usr/src/ruby \
&& autoconf \
&& ./configure --disable-install-doc \
&& make -j"$(nproc)" \
&& make install \
&& apt-get purge -y --auto-remove bison libgdbm-dev ruby \
&& gem update --system $RUBYGEMS_VERSION \
&& rm -r /usr/src/ruby
```
- Created: Tue, 25 Aug 2015 08:27:59 GMT
- Parent Layer: `e0fd6f8476b65b20df8617809873848c96db32a33f9b8eafdfb02c86f1afa646`
- Docker Version: 1.7.1
- Virtual Size: 110.2 MB (110197485 bytes)
- v2 Blob: `sha256:035193dc6a3655fe2c2f1ead78c38593cba4049787a6f81724f48a815274128c`
- v2 Content-Length: 31.8 MB (31793751 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:56:58 GMT
#### `694ef7fc41df48f30328124d7a012ed6016bc2d0321b87a2b7dfaca79f92d653`
```dockerfile
ENV GEM_HOME=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:28:00 GMT
- Parent Layer: `2171d2db4770b341c56b9ceb2831aa6703c9a692aff8efd5862424a8c082c845`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `4cafcafe16c6a0bdbe256de5803d139cb991fa43b5c54ac4b70cb74e8f99deba`
```dockerfile
ENV PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
```
- Created: Tue, 25 Aug 2015 08:28:00 GMT
- Parent Layer: `694ef7fc41df48f30328124d7a012ed6016bc2d0321b87a2b7dfaca79f92d653`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `58cdb66ca394748e23991183b3d12f98ed216e63bc0a726583b47433f7765f61`
```dockerfile
ENV BUNDLER_VERSION=1.10.6
```
- Created: Tue, 25 Aug 2015 08:28:00 GMT
- Parent Layer: `4cafcafe16c6a0bdbe256de5803d139cb991fa43b5c54ac4b70cb74e8f99deba`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `51ef2697a3e69375dd4b42926e9a11c30c1fb94351cab390e3adf11e5ef6d746`
```dockerfile
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
```
- Created: Tue, 25 Aug 2015 08:28:04 GMT
- Parent Layer: `58cdb66ca394748e23991183b3d12f98ed216e63bc0a726583b47433f7765f61`
- Docker Version: 1.7.1
- Virtual Size: 1.1 MB (1124534 bytes)
- v2 Blob: `sha256:2a5c4075d0a765522ef9b9bb6c983bb6beb95b8e5fd9f121be7c7aedff457053`
- v2 Content-Length: 500.1 KB (500103 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:56:32 GMT
#### `f791b6ef593cb86ffecf0b0dc99637174730478889ed854bef420a6dcfd74ba4`
```dockerfile
ENV BUNDLE_APP_CONFIG=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:28:04 GMT
- Parent Layer: `51ef2697a3e69375dd4b42926e9a11c30c1fb94351cab390e3adf11e5ef6d746`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `68cf55cf7c1df75921de73f54a8b3724c2941c3b8ef03474416382f10f8979cb`
```dockerfile
CMD ["irb"]
```
- Created: Tue, 25 Aug 2015 08:28:05 GMT
- Parent Layer: `f791b6ef593cb86ffecf0b0dc99637174730478889ed854bef420a6dcfd74ba4`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `70c3e9e3e3afa8e1634259e0610a15ac8dd42bc4a9dcbae75d8a028bfce6e793`
```dockerfile
RUN bundle config --global frozen 1
```
- Created: Tue, 25 Aug 2015 08:28:43 GMT
- Parent Layer: `68cf55cf7c1df75921de73f54a8b3724c2941c3b8ef03474416382f10f8979cb`
- Docker Version: 1.7.1
- Virtual Size: 92.0 B
- v2 Blob: `sha256:71a10371508ba8a10d35e82ac5816cddbea311d334bdc289e521fa05f339b8b0`
- v2 Content-Length: 219.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 05:58:26 GMT
#### `9db5dfd882affec1fc19613bd99b844a377c59db1b000328e9c7657ce165cf68`
```dockerfile
RUN mkdir -p /usr/src/app
```
- Created: Tue, 25 Aug 2015 08:28:44 GMT
- Parent Layer: `70c3e9e3e3afa8e1634259e0610a15ac8dd42bc4a9dcbae75d8a028bfce6e793`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a7824ee8f4efbff4f095f5d2818f2422c72490a6f0d6e183a5c688a35baac277`
- v2 Content-Length: 128.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 05:58:24 GMT
#### `df3cb5f1b0467dc3823a8a28ae5305e051215aecd99e9b28f7031f5f8dabf17d`
```dockerfile
WORKDIR /usr/src/app
```
- Created: Tue, 25 Aug 2015 08:28:45 GMT
- Parent Layer: `9db5dfd882affec1fc19613bd99b844a377c59db1b000328e9c7657ce165cf68`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `da096598f8834170eec9248c012489ab1466090d4673c66bda52eb4fe82f21fe`
```dockerfile
ONBUILD COPY Gemfile /usr/src/app/
```
- Created: Tue, 25 Aug 2015 08:28:45 GMT
- Parent Layer: `df3cb5f1b0467dc3823a8a28ae5305e051215aecd99e9b28f7031f5f8dabf17d`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `94669df62262baff9f01b193c12fb1b7806f58a8799c67a0113cd21534e95925`
```dockerfile
ONBUILD COPY Gemfile.lock /usr/src/app/
```
- Created: Tue, 25 Aug 2015 08:28:46 GMT
- Parent Layer: `da096598f8834170eec9248c012489ab1466090d4673c66bda52eb4fe82f21fe`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `d01d3e451892fed309b1de04f47e05956572749ff2543e5391861bfaccf8ce6b`
```dockerfile
ONBUILD RUN bundle install
```
- Created: Tue, 25 Aug 2015 08:28:46 GMT
- Parent Layer: `94669df62262baff9f01b193c12fb1b7806f58a8799c67a0113cd21534e95925`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `9baa615f97da9dcf7296b5bbcbdf0d3fd7f5f48790fda52202f077a96641d22e`
```dockerfile
ONBUILD COPY . /usr/src/app
```
- Created: Tue, 25 Aug 2015 08:28:47 GMT
- Parent Layer: `d01d3e451892fed309b1de04f47e05956572749ff2543e5391861bfaccf8ce6b`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
## `ruby:2.1-onbuild`
- Total Virtual Size: 716.8 MB (716838230 bytes)
- Total v2 Content-Length: 272.7 MB (272733206 bytes)
### Layers (24)
#### `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
```dockerfile
ADD file:b770303e11edaa0ad0d8f43f6db4fa26673923912b5d5f7cb748ba025e6c4d3b in /
```
- Created: Thu, 20 Aug 2015 20:17:59 GMT
- Docker Version: 1.7.1
- Virtual Size: 125.2 MB (125174904 bytes)
- v2 Blob: `sha256:7ccc78f8af6db23a5013f7b90b5672b82d69dd2fb30d1e6736dba29209aceee7`
- v2 Content-Length: 51.4 MB (51368377 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:40:09 GMT
#### `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
```dockerfile
CMD ["/bin/bash"]
```
- Created: Thu, 20 Aug 2015 20:18:01 GMT
- Parent Layer: `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
wget \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:24:45 GMT
- Parent Layer: `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
- Docker Version: 1.7.1
- Virtual Size: 44.4 MB (44355942 bytes)
- v2 Blob: `sha256:eba087ca53a356384db448d54a51620cde9e91d4935e7cd134c3c571df8447c4`
- v2 Content-Length: 18.5 MB (18538916 bytes)
- v2 Last-Modified: Tue, 25 Aug 2015 22:15:52 GMT
#### `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
bzr \
git \
mercurial \
openssh-client \
subversion \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:25:45 GMT
- Parent Layer: `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
- Docker Version: 1.7.1
- Virtual Size: 122.3 MB (122318537 bytes)
- v2 Blob: `sha256:a068cb6fd68bb10bf1f97beedee2837c2b2a52109dbbb59ea25462d661006e0d`
- v2 Content-Length: 42.3 MB (42340018 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:59:13 GMT
#### `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
automake \
bzip2 \
file \
g++ \
gcc \
imagemagick \
libbz2-dev \
libc6-dev \
libcurl4-openssl-dev \
libevent-dev \
libffi-dev \
libglib2.0-dev \
libjpeg-dev \
liblzma-dev \
libmagickcore-dev \
libmagickwand-dev \
libmysqlclient-dev \
libncurses-dev \
libpng-dev \
libpq-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libtool \
libwebp-dev \
libxml2-dev \
libxslt-dev \
libyaml-dev \
make \
patch \
xz-utils \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Mon, 24 Aug 2015 16:11:35 GMT
- Parent Layer: `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
- Docker Version: 1.7.1
- Virtual Size: 313.7 MB (313666691 bytes)
- v2 Blob: `sha256:2ac01aa9d22a0c73405fe147734a6acf8929209620ca4a80fe8064449ab7d301`
- v2 Content-Length: 128.2 MB (128191020 bytes)
- v2 Last-Modified: Mon, 24 Aug 2015 16:55:37 GMT
#### `c3f6fcd16bdd0b9cdd4d5b64e3c48edf8ad0105f80c8a45d876cb80700aba22e`
```dockerfile
ENV RUBY_MAJOR=2.1
```
- Created: Tue, 25 Aug 2015 08:23:50 GMT
- Parent Layer: `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `6f30b7ded6dd855984512fb60fb8e6d87e6925203d05e8ca9c83fdedb32dcd01`
```dockerfile
ENV RUBY_VERSION=2.1.7
```
- Created: Tue, 25 Aug 2015 08:23:51 GMT
- Parent Layer: `c3f6fcd16bdd0b9cdd4d5b64e3c48edf8ad0105f80c8a45d876cb80700aba22e`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `af2fab4c662df0120df1ce4ec08ca29a657af04842644eca52edc722d52002af`
```dockerfile
ENV RUBY_DOWNLOAD_SHA256=f59c1596ac39cc7e60126e7d3698c19f482f04060674fdfe0124e1752ba6dd81
```
- Created: Tue, 25 Aug 2015 08:23:51 GMT
- Parent Layer: `6f30b7ded6dd855984512fb60fb8e6d87e6925203d05e8ca9c83fdedb32dcd01`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `6cc30d208333c700fda0c6f9002756aec36586696fbbfd84fcf050a8faca59c4`
```dockerfile
ENV RUBYGEMS_VERSION=2.4.8
```
- Created: Tue, 25 Aug 2015 08:23:52 GMT
- Parent Layer: `af2fab4c662df0120df1ce4ec08ca29a657af04842644eca52edc722d52002af`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `e0fd6f8476b65b20df8617809873848c96db32a33f9b8eafdfb02c86f1afa646`
```dockerfile
RUN echo 'install: --no-document\nupdate: --no-document' >> "$HOME/.gemrc"
```
- Created: Tue, 25 Aug 2015 08:23:53 GMT
- Parent Layer: `6cc30d208333c700fda0c6f9002756aec36586696fbbfd84fcf050a8faca59c4`
- Docker Version: 1.7.1
- Virtual Size: 45.0 B
- v2 Blob: `sha256:9007d89172fd58849f841803a73262de0589d83d7a9b63c3ac0dce3ab091c642`
- v2 Content-Length: 162.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 05:57:01 GMT
#### `2171d2db4770b341c56b9ceb2831aa6703c9a692aff8efd5862424a8c082c845`
```dockerfile
RUN apt-get update \
&& apt-get install -y bison libgdbm-dev ruby \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/ruby \
&& curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
&& rm ruby.tar.gz \
&& cd /usr/src/ruby \
&& autoconf \
&& ./configure --disable-install-doc \
&& make -j"$(nproc)" \
&& make install \
&& apt-get purge -y --auto-remove bison libgdbm-dev ruby \
&& gem update --system $RUBYGEMS_VERSION \
&& rm -r /usr/src/ruby
```
- Created: Tue, 25 Aug 2015 08:27:59 GMT
- Parent Layer: `e0fd6f8476b65b20df8617809873848c96db32a33f9b8eafdfb02c86f1afa646`
- Docker Version: 1.7.1
- Virtual Size: 110.2 MB (110197485 bytes)
- v2 Blob: `sha256:035193dc6a3655fe2c2f1ead78c38593cba4049787a6f81724f48a815274128c`
- v2 Content-Length: 31.8 MB (31793751 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:56:58 GMT
#### `694ef7fc41df48f30328124d7a012ed6016bc2d0321b87a2b7dfaca79f92d653`
```dockerfile
ENV GEM_HOME=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:28:00 GMT
- Parent Layer: `2171d2db4770b341c56b9ceb2831aa6703c9a692aff8efd5862424a8c082c845`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `4cafcafe16c6a0bdbe256de5803d139cb991fa43b5c54ac4b70cb74e8f99deba`
```dockerfile
ENV PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
```
- Created: Tue, 25 Aug 2015 08:28:00 GMT
- Parent Layer: `694ef7fc41df48f30328124d7a012ed6016bc2d0321b87a2b7dfaca79f92d653`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `58cdb66ca394748e23991183b3d12f98ed216e63bc0a726583b47433f7765f61`
```dockerfile
ENV BUNDLER_VERSION=1.10.6
```
- Created: Tue, 25 Aug 2015 08:28:00 GMT
- Parent Layer: `4cafcafe16c6a0bdbe256de5803d139cb991fa43b5c54ac4b70cb74e8f99deba`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `51ef2697a3e69375dd4b42926e9a11c30c1fb94351cab390e3adf11e5ef6d746`
```dockerfile
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
```
- Created: Tue, 25 Aug 2015 08:28:04 GMT
- Parent Layer: `58cdb66ca394748e23991183b3d12f98ed216e63bc0a726583b47433f7765f61`
- Docker Version: 1.7.1
- Virtual Size: 1.1 MB (1124534 bytes)
- v2 Blob: `sha256:2a5c4075d0a765522ef9b9bb6c983bb6beb95b8e5fd9f121be7c7aedff457053`
- v2 Content-Length: 500.1 KB (500103 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:56:32 GMT
#### `f791b6ef593cb86ffecf0b0dc99637174730478889ed854bef420a6dcfd74ba4`
```dockerfile
ENV BUNDLE_APP_CONFIG=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:28:04 GMT
- Parent Layer: `51ef2697a3e69375dd4b42926e9a11c30c1fb94351cab390e3adf11e5ef6d746`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `68cf55cf7c1df75921de73f54a8b3724c2941c3b8ef03474416382f10f8979cb`
```dockerfile
CMD ["irb"]
```
- Created: Tue, 25 Aug 2015 08:28:05 GMT
- Parent Layer: `f791b6ef593cb86ffecf0b0dc99637174730478889ed854bef420a6dcfd74ba4`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `70c3e9e3e3afa8e1634259e0610a15ac8dd42bc4a9dcbae75d8a028bfce6e793`
```dockerfile
RUN bundle config --global frozen 1
```
- Created: Tue, 25 Aug 2015 08:28:43 GMT
- Parent Layer: `68cf55cf7c1df75921de73f54a8b3724c2941c3b8ef03474416382f10f8979cb`
- Docker Version: 1.7.1
- Virtual Size: 92.0 B
- v2 Blob: `sha256:71a10371508ba8a10d35e82ac5816cddbea311d334bdc289e521fa05f339b8b0`
- v2 Content-Length: 219.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 05:58:26 GMT
#### `9db5dfd882affec1fc19613bd99b844a377c59db1b000328e9c7657ce165cf68`
```dockerfile
RUN mkdir -p /usr/src/app
```
- Created: Tue, 25 Aug 2015 08:28:44 GMT
- Parent Layer: `70c3e9e3e3afa8e1634259e0610a15ac8dd42bc4a9dcbae75d8a028bfce6e793`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a7824ee8f4efbff4f095f5d2818f2422c72490a6f0d6e183a5c688a35baac277`
- v2 Content-Length: 128.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 05:58:24 GMT
#### `df3cb5f1b0467dc3823a8a28ae5305e051215aecd99e9b28f7031f5f8dabf17d`
```dockerfile
WORKDIR /usr/src/app
```
- Created: Tue, 25 Aug 2015 08:28:45 GMT
- Parent Layer: `9db5dfd882affec1fc19613bd99b844a377c59db1b000328e9c7657ce165cf68`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `da096598f8834170eec9248c012489ab1466090d4673c66bda52eb4fe82f21fe`
```dockerfile
ONBUILD COPY Gemfile /usr/src/app/
```
- Created: Tue, 25 Aug 2015 08:28:45 GMT
- Parent Layer: `df3cb5f1b0467dc3823a8a28ae5305e051215aecd99e9b28f7031f5f8dabf17d`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `94669df62262baff9f01b193c12fb1b7806f58a8799c67a0113cd21534e95925`
```dockerfile
ONBUILD COPY Gemfile.lock /usr/src/app/
```
- Created: Tue, 25 Aug 2015 08:28:46 GMT
- Parent Layer: `da096598f8834170eec9248c012489ab1466090d4673c66bda52eb4fe82f21fe`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `d01d3e451892fed309b1de04f47e05956572749ff2543e5391861bfaccf8ce6b`
```dockerfile
ONBUILD RUN bundle install
```
- Created: Tue, 25 Aug 2015 08:28:46 GMT
- Parent Layer: `94669df62262baff9f01b193c12fb1b7806f58a8799c67a0113cd21534e95925`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `9baa615f97da9dcf7296b5bbcbdf0d3fd7f5f48790fda52202f077a96641d22e`
```dockerfile
ONBUILD COPY . /usr/src/app
```
- Created: Tue, 25 Aug 2015 08:28:47 GMT
- Parent Layer: `d01d3e451892fed309b1de04f47e05956572749ff2543e5391861bfaccf8ce6b`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
## `ruby:2.1.7-slim`
- Total Virtual Size: 275.1 MB (275096102 bytes)
- Total v2 Content-Length: 97.5 MB (97474326 bytes)
### Layers (14)
#### `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
```dockerfile
ADD file:b770303e11edaa0ad0d8f43f6db4fa26673923912b5d5f7cb748ba025e6c4d3b in /
```
- Created: Thu, 20 Aug 2015 20:17:59 GMT
- Docker Version: 1.7.1
- Virtual Size: 125.2 MB (125174904 bytes)
- v2 Blob: `sha256:7ccc78f8af6db23a5013f7b90b5672b82d69dd2fb30d1e6736dba29209aceee7`
- v2 Content-Length: 51.4 MB (51368377 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:40:09 GMT
#### `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
```dockerfile
CMD ["/bin/bash"]
```
- Created: Thu, 20 Aug 2015 20:18:01 GMT
- Parent Layer: `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `787f8f2047af77d883efef4fee3b2041f0722d1f311f1c174c461d7c7c7a6b0f`
```dockerfile
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
bzip2 \
ca-certificates \
curl \
libffi-dev \
libgdbm3 \
libssl-dev \
libyaml-dev \
procps \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Mon, 24 Aug 2015 22:21:08 GMT
- Parent Layer: `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
- Docker Version: 1.7.1
- Virtual Size: 37.8 MB (37752882 bytes)
- v2 Blob: `sha256:7a0c5412f04c16fded90f2746384d0bbe4c221734daddf521e148d3dd591abac`
- v2 Content-Length: 13.6 MB (13602537 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:54:54 GMT
#### `ff276f454650c774fc07154672f66daca38da336377441b97c10653bce56d384`
```dockerfile
ENV RUBY_MAJOR=2.1
```
- Created: Mon, 24 Aug 2015 22:28:15 GMT
- Parent Layer: `787f8f2047af77d883efef4fee3b2041f0722d1f311f1c174c461d7c7c7a6b0f`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `c6298be18e07abf3c5c14d5e2e6f26a923de477c83917706c341e2a1b636fff7`
```dockerfile
ENV RUBY_VERSION=2.1.7
```
- Created: Mon, 24 Aug 2015 22:28:15 GMT
- Parent Layer: `ff276f454650c774fc07154672f66daca38da336377441b97c10653bce56d384`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `e3dd1078196e664c951a2c4101ae691b92c4c547cbe25a38305c76ae810cd853`
```dockerfile
ENV RUBYGEMS_VERSION=2.4.8
```
- Created: Mon, 24 Aug 2015 22:28:16 GMT
- Parent Layer: `c6298be18e07abf3c5c14d5e2e6f26a923de477c83917706c341e2a1b636fff7`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `c3054340778e5bcfb665aef2bae9accb593a86747c74a95a573b41516341e762`
```dockerfile
RUN echo 'install: --no-document\nupdate: --no-document' >> "$HOME/.gemrc"
```
- Created: Mon, 24 Aug 2015 22:28:18 GMT
- Parent Layer: `e3dd1078196e664c951a2c4101ae691b92c4c547cbe25a38305c76ae810cd853`
- Docker Version: 1.7.1
- Virtual Size: 45.0 B
- v2 Blob: `sha256:71127e78d00331fd6aa49b7c9c7db1feaca2151bc76c3f54c67dddd69fa07d59`
- v2 Content-Length: 162.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 06:00:06 GMT
#### `10ed5ecdc4404565cd8f2ba5377fe04d292fe1413bcf942fe111730c83505dd8`
```dockerfile
RUN buildDeps=' \
autoconf \
bison \
gcc \
libbz2-dev \
libgdbm-dev \
libglib2.0-dev \
libncurses-dev \
libreadline-dev \
libxml2-dev \
libxslt-dev \
make \
ruby \
' \
&& set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends $buildDeps \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/ruby \
&& curl -SL "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.bz2" \
| tar -xjC /usr/src/ruby --strip-components=1 \
&& cd /usr/src/ruby \
&& autoconf \
&& ./configure --disable-install-doc \
&& make -j"$(nproc)" \
&& make install \
&& gem update --system $RUBYGEMS_VERSION \
&& rm -r /usr/src/ruby \
&& apt-get purge -y --auto-remove $buildDeps
```
- Created: Mon, 24 Aug 2015 22:36:11 GMT
- Parent Layer: `c3054340778e5bcfb665aef2bae9accb593a86747c74a95a573b41516341e762`
- Docker Version: 1.7.1
- Virtual Size: 111.0 MB (111043737 bytes)
- v2 Blob: `sha256:034cd56236d37f12e77ead895770bd9c204cb7597b5316dbe60a54aab1c2875a`
- v2 Content-Length: 32.0 MB (32002823 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 06:00:02 GMT
#### `4c5d57b5960745fafe3085796699c158671d414e07ea2d85474de17deee30d7d`
```dockerfile
ENV GEM_HOME=/usr/local/bundle
```
- Created: Mon, 24 Aug 2015 22:36:14 GMT
- Parent Layer: `10ed5ecdc4404565cd8f2ba5377fe04d292fe1413bcf942fe111730c83505dd8`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `65f9e28996cc8717fd988569610f7cc972eafc80ef89b8190e43f083eb1c1153`
```dockerfile
ENV PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
```
- Created: Mon, 24 Aug 2015 22:36:15 GMT
- Parent Layer: `4c5d57b5960745fafe3085796699c158671d414e07ea2d85474de17deee30d7d`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `26226978c60f99ad5fdd71bceda088dfc6f5421dfb4b0e86d38f96fda497235c`
```dockerfile
ENV BUNDLER_VERSION=1.10.6
```
- Created: Mon, 24 Aug 2015 22:36:16 GMT
- Parent Layer: `65f9e28996cc8717fd988569610f7cc972eafc80ef89b8190e43f083eb1c1153`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `003e7e1f320311437922ac325a0b23b75ca83a0a5857e042777ddcc9648d8d6b`
```dockerfile
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
```
- Created: Mon, 24 Aug 2015 22:36:20 GMT
- Parent Layer: `26226978c60f99ad5fdd71bceda088dfc6f5421dfb4b0e86d38f96fda497235c`
- Docker Version: 1.7.1
- Virtual Size: 1.1 MB (1124534 bytes)
- v2 Blob: `sha256:02b9907763b4b4bae869335bd6bc6635d261e4b4fd425b1c6f4d226b7a160aa9`
- v2 Content-Length: 500.1 KB (500107 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:59:39 GMT
#### `249d6003544ae2da93d203fed581e4ca1e8011bed69950f62f2fc0d633b5a8fb`
```dockerfile
ENV BUNDLE_APP_CONFIG=/usr/local/bundle
```
- Created: Mon, 24 Aug 2015 22:36:21 GMT
- Parent Layer: `003e7e1f320311437922ac325a0b23b75ca83a0a5857e042777ddcc9648d8d6b`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `7285b84f6d9f512344cf12f2e960177a3f03ea7d0bc0c3559d7b5534afd251c7`
```dockerfile
CMD ["irb"]
```
- Created: Mon, 24 Aug 2015 22:36:22 GMT
- Parent Layer: `249d6003544ae2da93d203fed581e4ca1e8011bed69950f62f2fc0d633b5a8fb`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
## `ruby:2.1-slim`
- Total Virtual Size: 275.1 MB (275096102 bytes)
- Total v2 Content-Length: 97.5 MB (97474326 bytes)
### Layers (14)
#### `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
```dockerfile
ADD file:b770303e11edaa0ad0d8f43f6db4fa26673923912b5d5f7cb748ba025e6c4d3b in /
```
- Created: Thu, 20 Aug 2015 20:17:59 GMT
- Docker Version: 1.7.1
- Virtual Size: 125.2 MB (125174904 bytes)
- v2 Blob: `sha256:7ccc78f8af6db23a5013f7b90b5672b82d69dd2fb30d1e6736dba29209aceee7`
- v2 Content-Length: 51.4 MB (51368377 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:40:09 GMT
#### `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
```dockerfile
CMD ["/bin/bash"]
```
- Created: Thu, 20 Aug 2015 20:18:01 GMT
- Parent Layer: `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `787f8f2047af77d883efef4fee3b2041f0722d1f311f1c174c461d7c7c7a6b0f`
```dockerfile
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
bzip2 \
ca-certificates \
curl \
libffi-dev \
libgdbm3 \
libssl-dev \
libyaml-dev \
procps \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Mon, 24 Aug 2015 22:21:08 GMT
- Parent Layer: `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
- Docker Version: 1.7.1
- Virtual Size: 37.8 MB (37752882 bytes)
- v2 Blob: `sha256:7a0c5412f04c16fded90f2746384d0bbe4c221734daddf521e148d3dd591abac`
- v2 Content-Length: 13.6 MB (13602537 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:54:54 GMT
#### `ff276f454650c774fc07154672f66daca38da336377441b97c10653bce56d384`
```dockerfile
ENV RUBY_MAJOR=2.1
```
- Created: Mon, 24 Aug 2015 22:28:15 GMT
- Parent Layer: `787f8f2047af77d883efef4fee3b2041f0722d1f311f1c174c461d7c7c7a6b0f`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `c6298be18e07abf3c5c14d5e2e6f26a923de477c83917706c341e2a1b636fff7`
```dockerfile
ENV RUBY_VERSION=2.1.7
```
- Created: Mon, 24 Aug 2015 22:28:15 GMT
- Parent Layer: `ff276f454650c774fc07154672f66daca38da336377441b97c10653bce56d384`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `e3dd1078196e664c951a2c4101ae691b92c4c547cbe25a38305c76ae810cd853`
```dockerfile
ENV RUBYGEMS_VERSION=2.4.8
```
- Created: Mon, 24 Aug 2015 22:28:16 GMT
- Parent Layer: `c6298be18e07abf3c5c14d5e2e6f26a923de477c83917706c341e2a1b636fff7`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `c3054340778e5bcfb665aef2bae9accb593a86747c74a95a573b41516341e762`
```dockerfile
RUN echo 'install: --no-document\nupdate: --no-document' >> "$HOME/.gemrc"
```
- Created: Mon, 24 Aug 2015 22:28:18 GMT
- Parent Layer: `e3dd1078196e664c951a2c4101ae691b92c4c547cbe25a38305c76ae810cd853`
- Docker Version: 1.7.1
- Virtual Size: 45.0 B
- v2 Blob: `sha256:71127e78d00331fd6aa49b7c9c7db1feaca2151bc76c3f54c67dddd69fa07d59`
- v2 Content-Length: 162.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 06:00:06 GMT
#### `10ed5ecdc4404565cd8f2ba5377fe04d292fe1413bcf942fe111730c83505dd8`
```dockerfile
RUN buildDeps=' \
autoconf \
bison \
gcc \
libbz2-dev \
libgdbm-dev \
libglib2.0-dev \
libncurses-dev \
libreadline-dev \
libxml2-dev \
libxslt-dev \
make \
ruby \
' \
&& set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends $buildDeps \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/ruby \
&& curl -SL "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.bz2" \
| tar -xjC /usr/src/ruby --strip-components=1 \
&& cd /usr/src/ruby \
&& autoconf \
&& ./configure --disable-install-doc \
&& make -j"$(nproc)" \
&& make install \
&& gem update --system $RUBYGEMS_VERSION \
&& rm -r /usr/src/ruby \
&& apt-get purge -y --auto-remove $buildDeps
```
- Created: Mon, 24 Aug 2015 22:36:11 GMT
- Parent Layer: `c3054340778e5bcfb665aef2bae9accb593a86747c74a95a573b41516341e762`
- Docker Version: 1.7.1
- Virtual Size: 111.0 MB (111043737 bytes)
- v2 Blob: `sha256:034cd56236d37f12e77ead895770bd9c204cb7597b5316dbe60a54aab1c2875a`
- v2 Content-Length: 32.0 MB (32002823 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 06:00:02 GMT
#### `4c5d57b5960745fafe3085796699c158671d414e07ea2d85474de17deee30d7d`
```dockerfile
ENV GEM_HOME=/usr/local/bundle
```
- Created: Mon, 24 Aug 2015 22:36:14 GMT
- Parent Layer: `10ed5ecdc4404565cd8f2ba5377fe04d292fe1413bcf942fe111730c83505dd8`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `65f9e28996cc8717fd988569610f7cc972eafc80ef89b8190e43f083eb1c1153`
```dockerfile
ENV PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
```
- Created: Mon, 24 Aug 2015 22:36:15 GMT
- Parent Layer: `4c5d57b5960745fafe3085796699c158671d414e07ea2d85474de17deee30d7d`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `26226978c60f99ad5fdd71bceda088dfc6f5421dfb4b0e86d38f96fda497235c`
```dockerfile
ENV BUNDLER_VERSION=1.10.6
```
- Created: Mon, 24 Aug 2015 22:36:16 GMT
- Parent Layer: `65f9e28996cc8717fd988569610f7cc972eafc80ef89b8190e43f083eb1c1153`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `003e7e1f320311437922ac325a0b23b75ca83a0a5857e042777ddcc9648d8d6b`
```dockerfile
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
```
- Created: Mon, 24 Aug 2015 22:36:20 GMT
- Parent Layer: `26226978c60f99ad5fdd71bceda088dfc6f5421dfb4b0e86d38f96fda497235c`
- Docker Version: 1.7.1
- Virtual Size: 1.1 MB (1124534 bytes)
- v2 Blob: `sha256:02b9907763b4b4bae869335bd6bc6635d261e4b4fd425b1c6f4d226b7a160aa9`
- v2 Content-Length: 500.1 KB (500107 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:59:39 GMT
#### `249d6003544ae2da93d203fed581e4ca1e8011bed69950f62f2fc0d633b5a8fb`
```dockerfile
ENV BUNDLE_APP_CONFIG=/usr/local/bundle
```
- Created: Mon, 24 Aug 2015 22:36:21 GMT
- Parent Layer: `003e7e1f320311437922ac325a0b23b75ca83a0a5857e042777ddcc9648d8d6b`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `7285b84f6d9f512344cf12f2e960177a3f03ea7d0bc0c3559d7b5534afd251c7`
```dockerfile
CMD ["irb"]
```
- Created: Mon, 24 Aug 2015 22:36:22 GMT
- Parent Layer: `249d6003544ae2da93d203fed581e4ca1e8011bed69950f62f2fc0d633b5a8fb`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
## `ruby:2.2.3`
- Total Virtual Size: 716.8 MB (716832147 bytes)
- Total v2 Content-Length: 273.2 MB (273237799 bytes)
### Layers (17)
#### `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
```dockerfile
ADD file:b770303e11edaa0ad0d8f43f6db4fa26673923912b5d5f7cb748ba025e6c4d3b in /
```
- Created: Thu, 20 Aug 2015 20:17:59 GMT
- Docker Version: 1.7.1
- Virtual Size: 125.2 MB (125174904 bytes)
- v2 Blob: `sha256:7ccc78f8af6db23a5013f7b90b5672b82d69dd2fb30d1e6736dba29209aceee7`
- v2 Content-Length: 51.4 MB (51368377 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:40:09 GMT
#### `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
```dockerfile
CMD ["/bin/bash"]
```
- Created: Thu, 20 Aug 2015 20:18:01 GMT
- Parent Layer: `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
wget \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:24:45 GMT
- Parent Layer: `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
- Docker Version: 1.7.1
- Virtual Size: 44.4 MB (44355942 bytes)
- v2 Blob: `sha256:eba087ca53a356384db448d54a51620cde9e91d4935e7cd134c3c571df8447c4`
- v2 Content-Length: 18.5 MB (18538916 bytes)
- v2 Last-Modified: Tue, 25 Aug 2015 22:15:52 GMT
#### `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
bzr \
git \
mercurial \
openssh-client \
subversion \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:25:45 GMT
- Parent Layer: `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
- Docker Version: 1.7.1
- Virtual Size: 122.3 MB (122318537 bytes)
- v2 Blob: `sha256:a068cb6fd68bb10bf1f97beedee2837c2b2a52109dbbb59ea25462d661006e0d`
- v2 Content-Length: 42.3 MB (42340018 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:59:13 GMT
#### `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
automake \
bzip2 \
file \
g++ \
gcc \
imagemagick \
libbz2-dev \
libc6-dev \
libcurl4-openssl-dev \
libevent-dev \
libffi-dev \
libglib2.0-dev \
libjpeg-dev \
liblzma-dev \
libmagickcore-dev \
libmagickwand-dev \
libmysqlclient-dev \
libncurses-dev \
libpng-dev \
libpq-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libtool \
libwebp-dev \
libxml2-dev \
libxslt-dev \
libyaml-dev \
make \
patch \
xz-utils \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Mon, 24 Aug 2015 16:11:35 GMT
- Parent Layer: `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
- Docker Version: 1.7.1
- Virtual Size: 313.7 MB (313666691 bytes)
- v2 Blob: `sha256:2ac01aa9d22a0c73405fe147734a6acf8929209620ca4a80fe8064449ab7d301`
- v2 Content-Length: 128.2 MB (128191020 bytes)
- v2 Last-Modified: Mon, 24 Aug 2015 16:55:37 GMT
#### `289272cba3d53350c4caf940ee644847f756e2affcbf8395ef92d3957c7131c3`
```dockerfile
ENV RUBY_MAJOR=2.2
```
- Created: Tue, 25 Aug 2015 08:29:10 GMT
- Parent Layer: `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `8e840dd94b7840c0765d58f87059e6c16f5c2cb3702501e5ce2a2ea171e5e6e4`
```dockerfile
ENV RUBY_VERSION=2.2.3
```
- Created: Tue, 25 Aug 2015 08:29:11 GMT
- Parent Layer: `289272cba3d53350c4caf940ee644847f756e2affcbf8395ef92d3957c7131c3`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `bb92cab4f1d2c11eb4abe1aec0c0679bb8aab2e502571eb9a0e6831bca4aff6a`
```dockerfile
ENV RUBY_DOWNLOAD_SHA256=df795f2f99860745a416092a4004b016ccf77e8b82dec956b120f18bdc71edce
```
- Created: Tue, 25 Aug 2015 08:29:11 GMT
- Parent Layer: `8e840dd94b7840c0765d58f87059e6c16f5c2cb3702501e5ce2a2ea171e5e6e4`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `9492043fccad2045959a44f6369160ca1d0267ba56ef4f901f572d8d30f26d5d`
```dockerfile
ENV RUBYGEMS_VERSION=2.4.8
```
- Created: Tue, 25 Aug 2015 08:29:12 GMT
- Parent Layer: `bb92cab4f1d2c11eb4abe1aec0c0679bb8aab2e502571eb9a0e6831bca4aff6a`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `88c67bfdcf7beb31434239ecbcb4d01a485928b07dff2623497e658fee831058`
```dockerfile
RUN echo 'install: --no-document\nupdate: --no-document' >> "$HOME/.gemrc"
```
- Created: Tue, 25 Aug 2015 08:29:13 GMT
- Parent Layer: `9492043fccad2045959a44f6369160ca1d0267ba56ef4f901f572d8d30f26d5d`
- Docker Version: 1.7.1
- Virtual Size: 45.0 B
- v2 Blob: `sha256:5188b4571f63017808fb16c99b8a0d65877861ebd0ed012d40bfdca40bcb59c6`
- v2 Content-Length: 161.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 04:10:13 GMT
#### `6171e245fc5d75280f25a612ee2884baf062e6cd37ee9dc2549cc9355875f4f8`
```dockerfile
RUN apt-get update \
&& apt-get install -y bison libgdbm-dev ruby \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/ruby \
&& curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
&& rm ruby.tar.gz \
&& cd /usr/src/ruby \
&& autoconf \
&& ./configure --disable-install-doc \
&& make -j"$(nproc)" \
&& make install \
&& apt-get purge -y --auto-remove bison libgdbm-dev ruby \
&& gem update --system $RUBYGEMS_VERSION \
&& rm -r /usr/src/ruby
```
- Created: Tue, 25 Aug 2015 08:33:28 GMT
- Parent Layer: `88c67bfdcf7beb31434239ecbcb4d01a485928b07dff2623497e658fee831058`
- Docker Version: 1.7.1
- Virtual Size: 110.2 MB (110191494 bytes)
- v2 Blob: `sha256:9ae147d5c2ee8eb77098cf6758c9baa5326820e8b45bf8b1d6b881706d9a59b2`
- v2 Content-Length: 32.3 MB (32298846 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 04:10:10 GMT
#### `ab3e12de2e0b9081e6524e66f16c853470be61017a2aca12015d0ba4560f7569`
```dockerfile
ENV GEM_HOME=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:33:29 GMT
- Parent Layer: `6171e245fc5d75280f25a612ee2884baf062e6cd37ee9dc2549cc9355875f4f8`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f81328f6b62f5d3c425ca7788ba5bc498671f934a2cd3e493d1b7850582bb2e8`
```dockerfile
ENV PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
```
- Created: Tue, 25 Aug 2015 08:33:30 GMT
- Parent Layer: `ab3e12de2e0b9081e6524e66f16c853470be61017a2aca12015d0ba4560f7569`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `5f9e00ef48855e50512bc66a11195d5399cb25a0c40da0bc0117c6668ad2d8f2`
```dockerfile
ENV BUNDLER_VERSION=1.10.6
```
- Created: Tue, 25 Aug 2015 08:33:30 GMT
- Parent Layer: `f81328f6b62f5d3c425ca7788ba5bc498671f934a2cd3e493d1b7850582bb2e8`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `4d34bce3681fbe7d6e44dd64d64aec4bfba04be3d228ada179fe26a7cd8e0837`
```dockerfile
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
```
- Created: Tue, 25 Aug 2015 08:33:33 GMT
- Parent Layer: `5f9e00ef48855e50512bc66a11195d5399cb25a0c40da0bc0117c6668ad2d8f2`
- Docker Version: 1.7.1
- Virtual Size: 1.1 MB (1124534 bytes)
- v2 Blob: `sha256:6cbfd2ac0a2d5fd80e389be09a55e474a7c19d0ac075f5bdc4f6f800a897b57c`
- v2 Content-Length: 500.1 KB (500109 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 04:09:45 GMT
#### `f4e06c3e530e394004179c8e95d4ac63d2901ba3dee2899b5c6aecd593d3cf17`
```dockerfile
ENV BUNDLE_APP_CONFIG=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:33:34 GMT
- Parent Layer: `4d34bce3681fbe7d6e44dd64d64aec4bfba04be3d228ada179fe26a7cd8e0837`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `97e3c96f87f80b46f61a93599bec45fbf0600e3962d6e5cdf6abf37b563904a5`
```dockerfile
CMD ["irb"]
```
- Created: Tue, 25 Aug 2015 08:33:34 GMT
- Parent Layer: `f4e06c3e530e394004179c8e95d4ac63d2901ba3dee2899b5c6aecd593d3cf17`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
## `ruby:2.2`
- Total Virtual Size: 716.8 MB (716832147 bytes)
- Total v2 Content-Length: 273.2 MB (273237799 bytes)
### Layers (17)
#### `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
```dockerfile
ADD file:b770303e11edaa0ad0d8f43f6db4fa26673923912b5d5f7cb748ba025e6c4d3b in /
```
- Created: Thu, 20 Aug 2015 20:17:59 GMT
- Docker Version: 1.7.1
- Virtual Size: 125.2 MB (125174904 bytes)
- v2 Blob: `sha256:7ccc78f8af6db23a5013f7b90b5672b82d69dd2fb30d1e6736dba29209aceee7`
- v2 Content-Length: 51.4 MB (51368377 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:40:09 GMT
#### `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
```dockerfile
CMD ["/bin/bash"]
```
- Created: Thu, 20 Aug 2015 20:18:01 GMT
- Parent Layer: `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
wget \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:24:45 GMT
- Parent Layer: `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
- Docker Version: 1.7.1
- Virtual Size: 44.4 MB (44355942 bytes)
- v2 Blob: `sha256:eba087ca53a356384db448d54a51620cde9e91d4935e7cd134c3c571df8447c4`
- v2 Content-Length: 18.5 MB (18538916 bytes)
- v2 Last-Modified: Tue, 25 Aug 2015 22:15:52 GMT
#### `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
bzr \
git \
mercurial \
openssh-client \
subversion \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:25:45 GMT
- Parent Layer: `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
- Docker Version: 1.7.1
- Virtual Size: 122.3 MB (122318537 bytes)
- v2 Blob: `sha256:a068cb6fd68bb10bf1f97beedee2837c2b2a52109dbbb59ea25462d661006e0d`
- v2 Content-Length: 42.3 MB (42340018 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:59:13 GMT
#### `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
automake \
bzip2 \
file \
g++ \
gcc \
imagemagick \
libbz2-dev \
libc6-dev \
libcurl4-openssl-dev \
libevent-dev \
libffi-dev \
libglib2.0-dev \
libjpeg-dev \
liblzma-dev \
libmagickcore-dev \
libmagickwand-dev \
libmysqlclient-dev \
libncurses-dev \
libpng-dev \
libpq-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libtool \
libwebp-dev \
libxml2-dev \
libxslt-dev \
libyaml-dev \
make \
patch \
xz-utils \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Mon, 24 Aug 2015 16:11:35 GMT
- Parent Layer: `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
- Docker Version: 1.7.1
- Virtual Size: 313.7 MB (313666691 bytes)
- v2 Blob: `sha256:2ac01aa9d22a0c73405fe147734a6acf8929209620ca4a80fe8064449ab7d301`
- v2 Content-Length: 128.2 MB (128191020 bytes)
- v2 Last-Modified: Mon, 24 Aug 2015 16:55:37 GMT
#### `289272cba3d53350c4caf940ee644847f756e2affcbf8395ef92d3957c7131c3`
```dockerfile
ENV RUBY_MAJOR=2.2
```
- Created: Tue, 25 Aug 2015 08:29:10 GMT
- Parent Layer: `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `8e840dd94b7840c0765d58f87059e6c16f5c2cb3702501e5ce2a2ea171e5e6e4`
```dockerfile
ENV RUBY_VERSION=2.2.3
```
- Created: Tue, 25 Aug 2015 08:29:11 GMT
- Parent Layer: `289272cba3d53350c4caf940ee644847f756e2affcbf8395ef92d3957c7131c3`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `bb92cab4f1d2c11eb4abe1aec0c0679bb8aab2e502571eb9a0e6831bca4aff6a`
```dockerfile
ENV RUBY_DOWNLOAD_SHA256=df795f2f99860745a416092a4004b016ccf77e8b82dec956b120f18bdc71edce
```
- Created: Tue, 25 Aug 2015 08:29:11 GMT
- Parent Layer: `8e840dd94b7840c0765d58f87059e6c16f5c2cb3702501e5ce2a2ea171e5e6e4`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `9492043fccad2045959a44f6369160ca1d0267ba56ef4f901f572d8d30f26d5d`
```dockerfile
ENV RUBYGEMS_VERSION=2.4.8
```
- Created: Tue, 25 Aug 2015 08:29:12 GMT
- Parent Layer: `bb92cab4f1d2c11eb4abe1aec0c0679bb8aab2e502571eb9a0e6831bca4aff6a`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `88c67bfdcf7beb31434239ecbcb4d01a485928b07dff2623497e658fee831058`
```dockerfile
RUN echo 'install: --no-document\nupdate: --no-document' >> "$HOME/.gemrc"
```
- Created: Tue, 25 Aug 2015 08:29:13 GMT
- Parent Layer: `9492043fccad2045959a44f6369160ca1d0267ba56ef4f901f572d8d30f26d5d`
- Docker Version: 1.7.1
- Virtual Size: 45.0 B
- v2 Blob: `sha256:5188b4571f63017808fb16c99b8a0d65877861ebd0ed012d40bfdca40bcb59c6`
- v2 Content-Length: 161.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 04:10:13 GMT
#### `6171e245fc5d75280f25a612ee2884baf062e6cd37ee9dc2549cc9355875f4f8`
```dockerfile
RUN apt-get update \
&& apt-get install -y bison libgdbm-dev ruby \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/ruby \
&& curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
&& rm ruby.tar.gz \
&& cd /usr/src/ruby \
&& autoconf \
&& ./configure --disable-install-doc \
&& make -j"$(nproc)" \
&& make install \
&& apt-get purge -y --auto-remove bison libgdbm-dev ruby \
&& gem update --system $RUBYGEMS_VERSION \
&& rm -r /usr/src/ruby
```
- Created: Tue, 25 Aug 2015 08:33:28 GMT
- Parent Layer: `88c67bfdcf7beb31434239ecbcb4d01a485928b07dff2623497e658fee831058`
- Docker Version: 1.7.1
- Virtual Size: 110.2 MB (110191494 bytes)
- v2 Blob: `sha256:9ae147d5c2ee8eb77098cf6758c9baa5326820e8b45bf8b1d6b881706d9a59b2`
- v2 Content-Length: 32.3 MB (32298846 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 04:10:10 GMT
#### `ab3e12de2e0b9081e6524e66f16c853470be61017a2aca12015d0ba4560f7569`
```dockerfile
ENV GEM_HOME=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:33:29 GMT
- Parent Layer: `6171e245fc5d75280f25a612ee2884baf062e6cd37ee9dc2549cc9355875f4f8`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f81328f6b62f5d3c425ca7788ba5bc498671f934a2cd3e493d1b7850582bb2e8`
```dockerfile
ENV PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
```
- Created: Tue, 25 Aug 2015 08:33:30 GMT
- Parent Layer: `ab3e12de2e0b9081e6524e66f16c853470be61017a2aca12015d0ba4560f7569`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `5f9e00ef48855e50512bc66a11195d5399cb25a0c40da0bc0117c6668ad2d8f2`
```dockerfile
ENV BUNDLER_VERSION=1.10.6
```
- Created: Tue, 25 Aug 2015 08:33:30 GMT
- Parent Layer: `f81328f6b62f5d3c425ca7788ba5bc498671f934a2cd3e493d1b7850582bb2e8`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `4d34bce3681fbe7d6e44dd64d64aec4bfba04be3d228ada179fe26a7cd8e0837`
```dockerfile
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
```
- Created: Tue, 25 Aug 2015 08:33:33 GMT
- Parent Layer: `5f9e00ef48855e50512bc66a11195d5399cb25a0c40da0bc0117c6668ad2d8f2`
- Docker Version: 1.7.1
- Virtual Size: 1.1 MB (1124534 bytes)
- v2 Blob: `sha256:6cbfd2ac0a2d5fd80e389be09a55e474a7c19d0ac075f5bdc4f6f800a897b57c`
- v2 Content-Length: 500.1 KB (500109 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 04:09:45 GMT
#### `f4e06c3e530e394004179c8e95d4ac63d2901ba3dee2899b5c6aecd593d3cf17`
```dockerfile
ENV BUNDLE_APP_CONFIG=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:33:34 GMT
- Parent Layer: `4d34bce3681fbe7d6e44dd64d64aec4bfba04be3d228ada179fe26a7cd8e0837`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `97e3c96f87f80b46f61a93599bec45fbf0600e3962d6e5cdf6abf37b563904a5`
```dockerfile
CMD ["irb"]
```
- Created: Tue, 25 Aug 2015 08:33:34 GMT
- Parent Layer: `f4e06c3e530e394004179c8e95d4ac63d2901ba3dee2899b5c6aecd593d3cf17`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
## `ruby:2`
- Total Virtual Size: 716.8 MB (716832147 bytes)
- Total v2 Content-Length: 273.2 MB (273237799 bytes)
### Layers (17)
#### `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
```dockerfile
ADD file:b770303e11edaa0ad0d8f43f6db4fa26673923912b5d5f7cb748ba025e6c4d3b in /
```
- Created: Thu, 20 Aug 2015 20:17:59 GMT
- Docker Version: 1.7.1
- Virtual Size: 125.2 MB (125174904 bytes)
- v2 Blob: `sha256:7ccc78f8af6db23a5013f7b90b5672b82d69dd2fb30d1e6736dba29209aceee7`
- v2 Content-Length: 51.4 MB (51368377 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:40:09 GMT
#### `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
```dockerfile
CMD ["/bin/bash"]
```
- Created: Thu, 20 Aug 2015 20:18:01 GMT
- Parent Layer: `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
wget \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:24:45 GMT
- Parent Layer: `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
- Docker Version: 1.7.1
- Virtual Size: 44.4 MB (44355942 bytes)
- v2 Blob: `sha256:eba087ca53a356384db448d54a51620cde9e91d4935e7cd134c3c571df8447c4`
- v2 Content-Length: 18.5 MB (18538916 bytes)
- v2 Last-Modified: Tue, 25 Aug 2015 22:15:52 GMT
#### `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
bzr \
git \
mercurial \
openssh-client \
subversion \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:25:45 GMT
- Parent Layer: `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
- Docker Version: 1.7.1
- Virtual Size: 122.3 MB (122318537 bytes)
- v2 Blob: `sha256:a068cb6fd68bb10bf1f97beedee2837c2b2a52109dbbb59ea25462d661006e0d`
- v2 Content-Length: 42.3 MB (42340018 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:59:13 GMT
#### `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
automake \
bzip2 \
file \
g++ \
gcc \
imagemagick \
libbz2-dev \
libc6-dev \
libcurl4-openssl-dev \
libevent-dev \
libffi-dev \
libglib2.0-dev \
libjpeg-dev \
liblzma-dev \
libmagickcore-dev \
libmagickwand-dev \
libmysqlclient-dev \
libncurses-dev \
libpng-dev \
libpq-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libtool \
libwebp-dev \
libxml2-dev \
libxslt-dev \
libyaml-dev \
make \
patch \
xz-utils \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Mon, 24 Aug 2015 16:11:35 GMT
- Parent Layer: `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
- Docker Version: 1.7.1
- Virtual Size: 313.7 MB (313666691 bytes)
- v2 Blob: `sha256:2ac01aa9d22a0c73405fe147734a6acf8929209620ca4a80fe8064449ab7d301`
- v2 Content-Length: 128.2 MB (128191020 bytes)
- v2 Last-Modified: Mon, 24 Aug 2015 16:55:37 GMT
#### `289272cba3d53350c4caf940ee644847f756e2affcbf8395ef92d3957c7131c3`
```dockerfile
ENV RUBY_MAJOR=2.2
```
- Created: Tue, 25 Aug 2015 08:29:10 GMT
- Parent Layer: `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `8e840dd94b7840c0765d58f87059e6c16f5c2cb3702501e5ce2a2ea171e5e6e4`
```dockerfile
ENV RUBY_VERSION=2.2.3
```
- Created: Tue, 25 Aug 2015 08:29:11 GMT
- Parent Layer: `289272cba3d53350c4caf940ee644847f756e2affcbf8395ef92d3957c7131c3`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `bb92cab4f1d2c11eb4abe1aec0c0679bb8aab2e502571eb9a0e6831bca4aff6a`
```dockerfile
ENV RUBY_DOWNLOAD_SHA256=df795f2f99860745a416092a4004b016ccf77e8b82dec956b120f18bdc71edce
```
- Created: Tue, 25 Aug 2015 08:29:11 GMT
- Parent Layer: `8e840dd94b7840c0765d58f87059e6c16f5c2cb3702501e5ce2a2ea171e5e6e4`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `9492043fccad2045959a44f6369160ca1d0267ba56ef4f901f572d8d30f26d5d`
```dockerfile
ENV RUBYGEMS_VERSION=2.4.8
```
- Created: Tue, 25 Aug 2015 08:29:12 GMT
- Parent Layer: `bb92cab4f1d2c11eb4abe1aec0c0679bb8aab2e502571eb9a0e6831bca4aff6a`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `88c67bfdcf7beb31434239ecbcb4d01a485928b07dff2623497e658fee831058`
```dockerfile
RUN echo 'install: --no-document\nupdate: --no-document' >> "$HOME/.gemrc"
```
- Created: Tue, 25 Aug 2015 08:29:13 GMT
- Parent Layer: `9492043fccad2045959a44f6369160ca1d0267ba56ef4f901f572d8d30f26d5d`
- Docker Version: 1.7.1
- Virtual Size: 45.0 B
- v2 Blob: `sha256:5188b4571f63017808fb16c99b8a0d65877861ebd0ed012d40bfdca40bcb59c6`
- v2 Content-Length: 161.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 04:10:13 GMT
#### `6171e245fc5d75280f25a612ee2884baf062e6cd37ee9dc2549cc9355875f4f8`
```dockerfile
RUN apt-get update \
&& apt-get install -y bison libgdbm-dev ruby \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/ruby \
&& curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
&& rm ruby.tar.gz \
&& cd /usr/src/ruby \
&& autoconf \
&& ./configure --disable-install-doc \
&& make -j"$(nproc)" \
&& make install \
&& apt-get purge -y --auto-remove bison libgdbm-dev ruby \
&& gem update --system $RUBYGEMS_VERSION \
&& rm -r /usr/src/ruby
```
- Created: Tue, 25 Aug 2015 08:33:28 GMT
- Parent Layer: `88c67bfdcf7beb31434239ecbcb4d01a485928b07dff2623497e658fee831058`
- Docker Version: 1.7.1
- Virtual Size: 110.2 MB (110191494 bytes)
- v2 Blob: `sha256:9ae147d5c2ee8eb77098cf6758c9baa5326820e8b45bf8b1d6b881706d9a59b2`
- v2 Content-Length: 32.3 MB (32298846 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 04:10:10 GMT
#### `ab3e12de2e0b9081e6524e66f16c853470be61017a2aca12015d0ba4560f7569`
```dockerfile
ENV GEM_HOME=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:33:29 GMT
- Parent Layer: `6171e245fc5d75280f25a612ee2884baf062e6cd37ee9dc2549cc9355875f4f8`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f81328f6b62f5d3c425ca7788ba5bc498671f934a2cd3e493d1b7850582bb2e8`
```dockerfile
ENV PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
```
- Created: Tue, 25 Aug 2015 08:33:30 GMT
- Parent Layer: `ab3e12de2e0b9081e6524e66f16c853470be61017a2aca12015d0ba4560f7569`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `5f9e00ef48855e50512bc66a11195d5399cb25a0c40da0bc0117c6668ad2d8f2`
```dockerfile
ENV BUNDLER_VERSION=1.10.6
```
- Created: Tue, 25 Aug 2015 08:33:30 GMT
- Parent Layer: `f81328f6b62f5d3c425ca7788ba5bc498671f934a2cd3e493d1b7850582bb2e8`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `4d34bce3681fbe7d6e44dd64d64aec4bfba04be3d228ada179fe26a7cd8e0837`
```dockerfile
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
```
- Created: Tue, 25 Aug 2015 08:33:33 GMT
- Parent Layer: `5f9e00ef48855e50512bc66a11195d5399cb25a0c40da0bc0117c6668ad2d8f2`
- Docker Version: 1.7.1
- Virtual Size: 1.1 MB (1124534 bytes)
- v2 Blob: `sha256:6cbfd2ac0a2d5fd80e389be09a55e474a7c19d0ac075f5bdc4f6f800a897b57c`
- v2 Content-Length: 500.1 KB (500109 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 04:09:45 GMT
#### `f4e06c3e530e394004179c8e95d4ac63d2901ba3dee2899b5c6aecd593d3cf17`
```dockerfile
ENV BUNDLE_APP_CONFIG=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:33:34 GMT
- Parent Layer: `4d34bce3681fbe7d6e44dd64d64aec4bfba04be3d228ada179fe26a7cd8e0837`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `97e3c96f87f80b46f61a93599bec45fbf0600e3962d6e5cdf6abf37b563904a5`
```dockerfile
CMD ["irb"]
```
- Created: Tue, 25 Aug 2015 08:33:34 GMT
- Parent Layer: `f4e06c3e530e394004179c8e95d4ac63d2901ba3dee2899b5c6aecd593d3cf17`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
## `ruby:latest`
- Total Virtual Size: 716.8 MB (716832147 bytes)
- Total v2 Content-Length: 273.2 MB (273237799 bytes)
### Layers (17)
#### `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
```dockerfile
ADD file:b770303e11edaa0ad0d8f43f6db4fa26673923912b5d5f7cb748ba025e6c4d3b in /
```
- Created: Thu, 20 Aug 2015 20:17:59 GMT
- Docker Version: 1.7.1
- Virtual Size: 125.2 MB (125174904 bytes)
- v2 Blob: `sha256:7ccc78f8af6db23a5013f7b90b5672b82d69dd2fb30d1e6736dba29209aceee7`
- v2 Content-Length: 51.4 MB (51368377 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:40:09 GMT
#### `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
```dockerfile
CMD ["/bin/bash"]
```
- Created: Thu, 20 Aug 2015 20:18:01 GMT
- Parent Layer: `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
wget \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:24:45 GMT
- Parent Layer: `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
- Docker Version: 1.7.1
- Virtual Size: 44.4 MB (44355942 bytes)
- v2 Blob: `sha256:eba087ca53a356384db448d54a51620cde9e91d4935e7cd134c3c571df8447c4`
- v2 Content-Length: 18.5 MB (18538916 bytes)
- v2 Last-Modified: Tue, 25 Aug 2015 22:15:52 GMT
#### `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
bzr \
git \
mercurial \
openssh-client \
subversion \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:25:45 GMT
- Parent Layer: `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
- Docker Version: 1.7.1
- Virtual Size: 122.3 MB (122318537 bytes)
- v2 Blob: `sha256:a068cb6fd68bb10bf1f97beedee2837c2b2a52109dbbb59ea25462d661006e0d`
- v2 Content-Length: 42.3 MB (42340018 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:59:13 GMT
#### `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
automake \
bzip2 \
file \
g++ \
gcc \
imagemagick \
libbz2-dev \
libc6-dev \
libcurl4-openssl-dev \
libevent-dev \
libffi-dev \
libglib2.0-dev \
libjpeg-dev \
liblzma-dev \
libmagickcore-dev \
libmagickwand-dev \
libmysqlclient-dev \
libncurses-dev \
libpng-dev \
libpq-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libtool \
libwebp-dev \
libxml2-dev \
libxslt-dev \
libyaml-dev \
make \
patch \
xz-utils \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Mon, 24 Aug 2015 16:11:35 GMT
- Parent Layer: `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
- Docker Version: 1.7.1
- Virtual Size: 313.7 MB (313666691 bytes)
- v2 Blob: `sha256:2ac01aa9d22a0c73405fe147734a6acf8929209620ca4a80fe8064449ab7d301`
- v2 Content-Length: 128.2 MB (128191020 bytes)
- v2 Last-Modified: Mon, 24 Aug 2015 16:55:37 GMT
#### `289272cba3d53350c4caf940ee644847f756e2affcbf8395ef92d3957c7131c3`
```dockerfile
ENV RUBY_MAJOR=2.2
```
- Created: Tue, 25 Aug 2015 08:29:10 GMT
- Parent Layer: `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `8e840dd94b7840c0765d58f87059e6c16f5c2cb3702501e5ce2a2ea171e5e6e4`
```dockerfile
ENV RUBY_VERSION=2.2.3
```
- Created: Tue, 25 Aug 2015 08:29:11 GMT
- Parent Layer: `289272cba3d53350c4caf940ee644847f756e2affcbf8395ef92d3957c7131c3`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `bb92cab4f1d2c11eb4abe1aec0c0679bb8aab2e502571eb9a0e6831bca4aff6a`
```dockerfile
ENV RUBY_DOWNLOAD_SHA256=df795f2f99860745a416092a4004b016ccf77e8b82dec956b120f18bdc71edce
```
- Created: Tue, 25 Aug 2015 08:29:11 GMT
- Parent Layer: `8e840dd94b7840c0765d58f87059e6c16f5c2cb3702501e5ce2a2ea171e5e6e4`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `9492043fccad2045959a44f6369160ca1d0267ba56ef4f901f572d8d30f26d5d`
```dockerfile
ENV RUBYGEMS_VERSION=2.4.8
```
- Created: Tue, 25 Aug 2015 08:29:12 GMT
- Parent Layer: `bb92cab4f1d2c11eb4abe1aec0c0679bb8aab2e502571eb9a0e6831bca4aff6a`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `88c67bfdcf7beb31434239ecbcb4d01a485928b07dff2623497e658fee831058`
```dockerfile
RUN echo 'install: --no-document\nupdate: --no-document' >> "$HOME/.gemrc"
```
- Created: Tue, 25 Aug 2015 08:29:13 GMT
- Parent Layer: `9492043fccad2045959a44f6369160ca1d0267ba56ef4f901f572d8d30f26d5d`
- Docker Version: 1.7.1
- Virtual Size: 45.0 B
- v2 Blob: `sha256:5188b4571f63017808fb16c99b8a0d65877861ebd0ed012d40bfdca40bcb59c6`
- v2 Content-Length: 161.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 04:10:13 GMT
#### `6171e245fc5d75280f25a612ee2884baf062e6cd37ee9dc2549cc9355875f4f8`
```dockerfile
RUN apt-get update \
&& apt-get install -y bison libgdbm-dev ruby \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/ruby \
&& curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
&& rm ruby.tar.gz \
&& cd /usr/src/ruby \
&& autoconf \
&& ./configure --disable-install-doc \
&& make -j"$(nproc)" \
&& make install \
&& apt-get purge -y --auto-remove bison libgdbm-dev ruby \
&& gem update --system $RUBYGEMS_VERSION \
&& rm -r /usr/src/ruby
```
- Created: Tue, 25 Aug 2015 08:33:28 GMT
- Parent Layer: `88c67bfdcf7beb31434239ecbcb4d01a485928b07dff2623497e658fee831058`
- Docker Version: 1.7.1
- Virtual Size: 110.2 MB (110191494 bytes)
- v2 Blob: `sha256:9ae147d5c2ee8eb77098cf6758c9baa5326820e8b45bf8b1d6b881706d9a59b2`
- v2 Content-Length: 32.3 MB (32298846 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 04:10:10 GMT
#### `ab3e12de2e0b9081e6524e66f16c853470be61017a2aca12015d0ba4560f7569`
```dockerfile
ENV GEM_HOME=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:33:29 GMT
- Parent Layer: `6171e245fc5d75280f25a612ee2884baf062e6cd37ee9dc2549cc9355875f4f8`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f81328f6b62f5d3c425ca7788ba5bc498671f934a2cd3e493d1b7850582bb2e8`
```dockerfile
ENV PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
```
- Created: Tue, 25 Aug 2015 08:33:30 GMT
- Parent Layer: `ab3e12de2e0b9081e6524e66f16c853470be61017a2aca12015d0ba4560f7569`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `5f9e00ef48855e50512bc66a11195d5399cb25a0c40da0bc0117c6668ad2d8f2`
```dockerfile
ENV BUNDLER_VERSION=1.10.6
```
- Created: Tue, 25 Aug 2015 08:33:30 GMT
- Parent Layer: `f81328f6b62f5d3c425ca7788ba5bc498671f934a2cd3e493d1b7850582bb2e8`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `4d34bce3681fbe7d6e44dd64d64aec4bfba04be3d228ada179fe26a7cd8e0837`
```dockerfile
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
```
- Created: Tue, 25 Aug 2015 08:33:33 GMT
- Parent Layer: `5f9e00ef48855e50512bc66a11195d5399cb25a0c40da0bc0117c6668ad2d8f2`
- Docker Version: 1.7.1
- Virtual Size: 1.1 MB (1124534 bytes)
- v2 Blob: `sha256:6cbfd2ac0a2d5fd80e389be09a55e474a7c19d0ac075f5bdc4f6f800a897b57c`
- v2 Content-Length: 500.1 KB (500109 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 04:09:45 GMT
#### `f4e06c3e530e394004179c8e95d4ac63d2901ba3dee2899b5c6aecd593d3cf17`
```dockerfile
ENV BUNDLE_APP_CONFIG=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:33:34 GMT
- Parent Layer: `4d34bce3681fbe7d6e44dd64d64aec4bfba04be3d228ada179fe26a7cd8e0837`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `97e3c96f87f80b46f61a93599bec45fbf0600e3962d6e5cdf6abf37b563904a5`
```dockerfile
CMD ["irb"]
```
- Created: Tue, 25 Aug 2015 08:33:34 GMT
- Parent Layer: `f4e06c3e530e394004179c8e95d4ac63d2901ba3dee2899b5c6aecd593d3cf17`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
## `ruby:2.2.3-onbuild`
- Total Virtual Size: 716.8 MB (716832239 bytes)
- Total v2 Content-Length: 273.2 MB (273238305 bytes)
### Layers (24)
#### `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
```dockerfile
ADD file:b770303e11edaa0ad0d8f43f6db4fa26673923912b5d5f7cb748ba025e6c4d3b in /
```
- Created: Thu, 20 Aug 2015 20:17:59 GMT
- Docker Version: 1.7.1
- Virtual Size: 125.2 MB (125174904 bytes)
- v2 Blob: `sha256:7ccc78f8af6db23a5013f7b90b5672b82d69dd2fb30d1e6736dba29209aceee7`
- v2 Content-Length: 51.4 MB (51368377 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:40:09 GMT
#### `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
```dockerfile
CMD ["/bin/bash"]
```
- Created: Thu, 20 Aug 2015 20:18:01 GMT
- Parent Layer: `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
wget \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:24:45 GMT
- Parent Layer: `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
- Docker Version: 1.7.1
- Virtual Size: 44.4 MB (44355942 bytes)
- v2 Blob: `sha256:eba087ca53a356384db448d54a51620cde9e91d4935e7cd134c3c571df8447c4`
- v2 Content-Length: 18.5 MB (18538916 bytes)
- v2 Last-Modified: Tue, 25 Aug 2015 22:15:52 GMT
#### `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
bzr \
git \
mercurial \
openssh-client \
subversion \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:25:45 GMT
- Parent Layer: `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
- Docker Version: 1.7.1
- Virtual Size: 122.3 MB (122318537 bytes)
- v2 Blob: `sha256:a068cb6fd68bb10bf1f97beedee2837c2b2a52109dbbb59ea25462d661006e0d`
- v2 Content-Length: 42.3 MB (42340018 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:59:13 GMT
#### `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
automake \
bzip2 \
file \
g++ \
gcc \
imagemagick \
libbz2-dev \
libc6-dev \
libcurl4-openssl-dev \
libevent-dev \
libffi-dev \
libglib2.0-dev \
libjpeg-dev \
liblzma-dev \
libmagickcore-dev \
libmagickwand-dev \
libmysqlclient-dev \
libncurses-dev \
libpng-dev \
libpq-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libtool \
libwebp-dev \
libxml2-dev \
libxslt-dev \
libyaml-dev \
make \
patch \
xz-utils \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Mon, 24 Aug 2015 16:11:35 GMT
- Parent Layer: `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
- Docker Version: 1.7.1
- Virtual Size: 313.7 MB (313666691 bytes)
- v2 Blob: `sha256:2ac01aa9d22a0c73405fe147734a6acf8929209620ca4a80fe8064449ab7d301`
- v2 Content-Length: 128.2 MB (128191020 bytes)
- v2 Last-Modified: Mon, 24 Aug 2015 16:55:37 GMT
#### `289272cba3d53350c4caf940ee644847f756e2affcbf8395ef92d3957c7131c3`
```dockerfile
ENV RUBY_MAJOR=2.2
```
- Created: Tue, 25 Aug 2015 08:29:10 GMT
- Parent Layer: `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `8e840dd94b7840c0765d58f87059e6c16f5c2cb3702501e5ce2a2ea171e5e6e4`
```dockerfile
ENV RUBY_VERSION=2.2.3
```
- Created: Tue, 25 Aug 2015 08:29:11 GMT
- Parent Layer: `289272cba3d53350c4caf940ee644847f756e2affcbf8395ef92d3957c7131c3`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `bb92cab4f1d2c11eb4abe1aec0c0679bb8aab2e502571eb9a0e6831bca4aff6a`
```dockerfile
ENV RUBY_DOWNLOAD_SHA256=df795f2f99860745a416092a4004b016ccf77e8b82dec956b120f18bdc71edce
```
- Created: Tue, 25 Aug 2015 08:29:11 GMT
- Parent Layer: `8e840dd94b7840c0765d58f87059e6c16f5c2cb3702501e5ce2a2ea171e5e6e4`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `9492043fccad2045959a44f6369160ca1d0267ba56ef4f901f572d8d30f26d5d`
```dockerfile
ENV RUBYGEMS_VERSION=2.4.8
```
- Created: Tue, 25 Aug 2015 08:29:12 GMT
- Parent Layer: `bb92cab4f1d2c11eb4abe1aec0c0679bb8aab2e502571eb9a0e6831bca4aff6a`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `88c67bfdcf7beb31434239ecbcb4d01a485928b07dff2623497e658fee831058`
```dockerfile
RUN echo 'install: --no-document\nupdate: --no-document' >> "$HOME/.gemrc"
```
- Created: Tue, 25 Aug 2015 08:29:13 GMT
- Parent Layer: `9492043fccad2045959a44f6369160ca1d0267ba56ef4f901f572d8d30f26d5d`
- Docker Version: 1.7.1
- Virtual Size: 45.0 B
- v2 Blob: `sha256:5188b4571f63017808fb16c99b8a0d65877861ebd0ed012d40bfdca40bcb59c6`
- v2 Content-Length: 161.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 04:10:13 GMT
#### `6171e245fc5d75280f25a612ee2884baf062e6cd37ee9dc2549cc9355875f4f8`
```dockerfile
RUN apt-get update \
&& apt-get install -y bison libgdbm-dev ruby \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/ruby \
&& curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
&& rm ruby.tar.gz \
&& cd /usr/src/ruby \
&& autoconf \
&& ./configure --disable-install-doc \
&& make -j"$(nproc)" \
&& make install \
&& apt-get purge -y --auto-remove bison libgdbm-dev ruby \
&& gem update --system $RUBYGEMS_VERSION \
&& rm -r /usr/src/ruby
```
- Created: Tue, 25 Aug 2015 08:33:28 GMT
- Parent Layer: `88c67bfdcf7beb31434239ecbcb4d01a485928b07dff2623497e658fee831058`
- Docker Version: 1.7.1
- Virtual Size: 110.2 MB (110191494 bytes)
- v2 Blob: `sha256:9ae147d5c2ee8eb77098cf6758c9baa5326820e8b45bf8b1d6b881706d9a59b2`
- v2 Content-Length: 32.3 MB (32298846 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 04:10:10 GMT
#### `ab3e12de2e0b9081e6524e66f16c853470be61017a2aca12015d0ba4560f7569`
```dockerfile
ENV GEM_HOME=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:33:29 GMT
- Parent Layer: `6171e245fc5d75280f25a612ee2884baf062e6cd37ee9dc2549cc9355875f4f8`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f81328f6b62f5d3c425ca7788ba5bc498671f934a2cd3e493d1b7850582bb2e8`
```dockerfile
ENV PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
```
- Created: Tue, 25 Aug 2015 08:33:30 GMT
- Parent Layer: `ab3e12de2e0b9081e6524e66f16c853470be61017a2aca12015d0ba4560f7569`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `5f9e00ef48855e50512bc66a11195d5399cb25a0c40da0bc0117c6668ad2d8f2`
```dockerfile
ENV BUNDLER_VERSION=1.10.6
```
- Created: Tue, 25 Aug 2015 08:33:30 GMT
- Parent Layer: `f81328f6b62f5d3c425ca7788ba5bc498671f934a2cd3e493d1b7850582bb2e8`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `4d34bce3681fbe7d6e44dd64d64aec4bfba04be3d228ada179fe26a7cd8e0837`
```dockerfile
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
```
- Created: Tue, 25 Aug 2015 08:33:33 GMT
- Parent Layer: `5f9e00ef48855e50512bc66a11195d5399cb25a0c40da0bc0117c6668ad2d8f2`
- Docker Version: 1.7.1
- Virtual Size: 1.1 MB (1124534 bytes)
- v2 Blob: `sha256:6cbfd2ac0a2d5fd80e389be09a55e474a7c19d0ac075f5bdc4f6f800a897b57c`
- v2 Content-Length: 500.1 KB (500109 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 04:09:45 GMT
#### `f4e06c3e530e394004179c8e95d4ac63d2901ba3dee2899b5c6aecd593d3cf17`
```dockerfile
ENV BUNDLE_APP_CONFIG=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:33:34 GMT
- Parent Layer: `4d34bce3681fbe7d6e44dd64d64aec4bfba04be3d228ada179fe26a7cd8e0837`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `97e3c96f87f80b46f61a93599bec45fbf0600e3962d6e5cdf6abf37b563904a5`
```dockerfile
CMD ["irb"]
```
- Created: Tue, 25 Aug 2015 08:33:34 GMT
- Parent Layer: `f4e06c3e530e394004179c8e95d4ac63d2901ba3dee2899b5c6aecd593d3cf17`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `d8e0f924467616d8a3a488ce7dc887bbdaa2b6580d35dc8d07e7ea18e03cabe6`
```dockerfile
RUN bundle config --global frozen 1
```
- Created: Tue, 25 Aug 2015 08:35:20 GMT
- Parent Layer: `97e3c96f87f80b46f61a93599bec45fbf0600e3962d6e5cdf6abf37b563904a5`
- Docker Version: 1.7.1
- Virtual Size: 92.0 B
- v2 Blob: `sha256:b1bfa9837a997fb17786c0916a5086651334cebca75cfa1694226702394c1f6b`
- v2 Content-Length: 220.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 04:16:48 GMT
#### `c632b2a2fb60c1b15ca386b9b4812823fdeb3abc27dab785bfc517d08d9893d5`
```dockerfile
RUN mkdir -p /usr/src/app
```
- Created: Tue, 25 Aug 2015 08:35:21 GMT
- Parent Layer: `d8e0f924467616d8a3a488ce7dc887bbdaa2b6580d35dc8d07e7ea18e03cabe6`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:e4fa71525059ee3ecaea3ea63e422453c684cfe5b07b8eee07cf016e12e4f3ee`
- v2 Content-Length: 126.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 04:16:46 GMT
#### `b59fea84a8671a0f9970a5f42e02a0eca91be10d883a13a01be51526a0744b29`
```dockerfile
WORKDIR /usr/src/app
```
- Created: Tue, 25 Aug 2015 08:35:21 GMT
- Parent Layer: `c632b2a2fb60c1b15ca386b9b4812823fdeb3abc27dab785bfc517d08d9893d5`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `86747cd7cda492a86094ea378b0c6f8350f6437b23aab11ed3fba63c1e6410ca`
```dockerfile
ONBUILD COPY Gemfile /usr/src/app/
```
- Created: Tue, 25 Aug 2015 08:35:22 GMT
- Parent Layer: `b59fea84a8671a0f9970a5f42e02a0eca91be10d883a13a01be51526a0744b29`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `22fd69c6d4a0415870987586be71e41c81d7f8473362f3d3e83258c7e32e6cb1`
```dockerfile
ONBUILD COPY Gemfile.lock /usr/src/app/
```
- Created: Tue, 25 Aug 2015 08:35:22 GMT
- Parent Layer: `86747cd7cda492a86094ea378b0c6f8350f6437b23aab11ed3fba63c1e6410ca`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `b5412c834ff7b533a987151a66a0e9802d91bdb893a72acc9074e3e0a35476b2`
```dockerfile
ONBUILD RUN bundle install
```
- Created: Tue, 25 Aug 2015 08:35:23 GMT
- Parent Layer: `22fd69c6d4a0415870987586be71e41c81d7f8473362f3d3e83258c7e32e6cb1`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `38c58af3299b00966f51308111c4ad5a9840d94c5e2bde33b09eec80c4537068`
```dockerfile
ONBUILD COPY . /usr/src/app
```
- Created: Tue, 25 Aug 2015 08:35:23 GMT
- Parent Layer: `b5412c834ff7b533a987151a66a0e9802d91bdb893a72acc9074e3e0a35476b2`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
## `ruby:2.2-onbuild`
- Total Virtual Size: 716.8 MB (716832239 bytes)
- Total v2 Content-Length: 273.2 MB (273238305 bytes)
### Layers (24)
#### `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
```dockerfile
ADD file:b770303e11edaa0ad0d8f43f6db4fa26673923912b5d5f7cb748ba025e6c4d3b in /
```
- Created: Thu, 20 Aug 2015 20:17:59 GMT
- Docker Version: 1.7.1
- Virtual Size: 125.2 MB (125174904 bytes)
- v2 Blob: `sha256:7ccc78f8af6db23a5013f7b90b5672b82d69dd2fb30d1e6736dba29209aceee7`
- v2 Content-Length: 51.4 MB (51368377 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:40:09 GMT
#### `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
```dockerfile
CMD ["/bin/bash"]
```
- Created: Thu, 20 Aug 2015 20:18:01 GMT
- Parent Layer: `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
wget \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:24:45 GMT
- Parent Layer: `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
- Docker Version: 1.7.1
- Virtual Size: 44.4 MB (44355942 bytes)
- v2 Blob: `sha256:eba087ca53a356384db448d54a51620cde9e91d4935e7cd134c3c571df8447c4`
- v2 Content-Length: 18.5 MB (18538916 bytes)
- v2 Last-Modified: Tue, 25 Aug 2015 22:15:52 GMT
#### `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
bzr \
git \
mercurial \
openssh-client \
subversion \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:25:45 GMT
- Parent Layer: `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
- Docker Version: 1.7.1
- Virtual Size: 122.3 MB (122318537 bytes)
- v2 Blob: `sha256:a068cb6fd68bb10bf1f97beedee2837c2b2a52109dbbb59ea25462d661006e0d`
- v2 Content-Length: 42.3 MB (42340018 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:59:13 GMT
#### `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
automake \
bzip2 \
file \
g++ \
gcc \
imagemagick \
libbz2-dev \
libc6-dev \
libcurl4-openssl-dev \
libevent-dev \
libffi-dev \
libglib2.0-dev \
libjpeg-dev \
liblzma-dev \
libmagickcore-dev \
libmagickwand-dev \
libmysqlclient-dev \
libncurses-dev \
libpng-dev \
libpq-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libtool \
libwebp-dev \
libxml2-dev \
libxslt-dev \
libyaml-dev \
make \
patch \
xz-utils \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Mon, 24 Aug 2015 16:11:35 GMT
- Parent Layer: `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
- Docker Version: 1.7.1
- Virtual Size: 313.7 MB (313666691 bytes)
- v2 Blob: `sha256:2ac01aa9d22a0c73405fe147734a6acf8929209620ca4a80fe8064449ab7d301`
- v2 Content-Length: 128.2 MB (128191020 bytes)
- v2 Last-Modified: Mon, 24 Aug 2015 16:55:37 GMT
#### `289272cba3d53350c4caf940ee644847f756e2affcbf8395ef92d3957c7131c3`
```dockerfile
ENV RUBY_MAJOR=2.2
```
- Created: Tue, 25 Aug 2015 08:29:10 GMT
- Parent Layer: `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `8e840dd94b7840c0765d58f87059e6c16f5c2cb3702501e5ce2a2ea171e5e6e4`
```dockerfile
ENV RUBY_VERSION=2.2.3
```
- Created: Tue, 25 Aug 2015 08:29:11 GMT
- Parent Layer: `289272cba3d53350c4caf940ee644847f756e2affcbf8395ef92d3957c7131c3`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `bb92cab4f1d2c11eb4abe1aec0c0679bb8aab2e502571eb9a0e6831bca4aff6a`
```dockerfile
ENV RUBY_DOWNLOAD_SHA256=df795f2f99860745a416092a4004b016ccf77e8b82dec956b120f18bdc71edce
```
- Created: Tue, 25 Aug 2015 08:29:11 GMT
- Parent Layer: `8e840dd94b7840c0765d58f87059e6c16f5c2cb3702501e5ce2a2ea171e5e6e4`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `9492043fccad2045959a44f6369160ca1d0267ba56ef4f901f572d8d30f26d5d`
```dockerfile
ENV RUBYGEMS_VERSION=2.4.8
```
- Created: Tue, 25 Aug 2015 08:29:12 GMT
- Parent Layer: `bb92cab4f1d2c11eb4abe1aec0c0679bb8aab2e502571eb9a0e6831bca4aff6a`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `88c67bfdcf7beb31434239ecbcb4d01a485928b07dff2623497e658fee831058`
```dockerfile
RUN echo 'install: --no-document\nupdate: --no-document' >> "$HOME/.gemrc"
```
- Created: Tue, 25 Aug 2015 08:29:13 GMT
- Parent Layer: `9492043fccad2045959a44f6369160ca1d0267ba56ef4f901f572d8d30f26d5d`
- Docker Version: 1.7.1
- Virtual Size: 45.0 B
- v2 Blob: `sha256:5188b4571f63017808fb16c99b8a0d65877861ebd0ed012d40bfdca40bcb59c6`
- v2 Content-Length: 161.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 04:10:13 GMT
#### `6171e245fc5d75280f25a612ee2884baf062e6cd37ee9dc2549cc9355875f4f8`
```dockerfile
RUN apt-get update \
&& apt-get install -y bison libgdbm-dev ruby \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/ruby \
&& curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
&& rm ruby.tar.gz \
&& cd /usr/src/ruby \
&& autoconf \
&& ./configure --disable-install-doc \
&& make -j"$(nproc)" \
&& make install \
&& apt-get purge -y --auto-remove bison libgdbm-dev ruby \
&& gem update --system $RUBYGEMS_VERSION \
&& rm -r /usr/src/ruby
```
- Created: Tue, 25 Aug 2015 08:33:28 GMT
- Parent Layer: `88c67bfdcf7beb31434239ecbcb4d01a485928b07dff2623497e658fee831058`
- Docker Version: 1.7.1
- Virtual Size: 110.2 MB (110191494 bytes)
- v2 Blob: `sha256:9ae147d5c2ee8eb77098cf6758c9baa5326820e8b45bf8b1d6b881706d9a59b2`
- v2 Content-Length: 32.3 MB (32298846 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 04:10:10 GMT
#### `ab3e12de2e0b9081e6524e66f16c853470be61017a2aca12015d0ba4560f7569`
```dockerfile
ENV GEM_HOME=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:33:29 GMT
- Parent Layer: `6171e245fc5d75280f25a612ee2884baf062e6cd37ee9dc2549cc9355875f4f8`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f81328f6b62f5d3c425ca7788ba5bc498671f934a2cd3e493d1b7850582bb2e8`
```dockerfile
ENV PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
```
- Created: Tue, 25 Aug 2015 08:33:30 GMT
- Parent Layer: `ab3e12de2e0b9081e6524e66f16c853470be61017a2aca12015d0ba4560f7569`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `5f9e00ef48855e50512bc66a11195d5399cb25a0c40da0bc0117c6668ad2d8f2`
```dockerfile
ENV BUNDLER_VERSION=1.10.6
```
- Created: Tue, 25 Aug 2015 08:33:30 GMT
- Parent Layer: `f81328f6b62f5d3c425ca7788ba5bc498671f934a2cd3e493d1b7850582bb2e8`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `4d34bce3681fbe7d6e44dd64d64aec4bfba04be3d228ada179fe26a7cd8e0837`
```dockerfile
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
```
- Created: Tue, 25 Aug 2015 08:33:33 GMT
- Parent Layer: `5f9e00ef48855e50512bc66a11195d5399cb25a0c40da0bc0117c6668ad2d8f2`
- Docker Version: 1.7.1
- Virtual Size: 1.1 MB (1124534 bytes)
- v2 Blob: `sha256:6cbfd2ac0a2d5fd80e389be09a55e474a7c19d0ac075f5bdc4f6f800a897b57c`
- v2 Content-Length: 500.1 KB (500109 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 04:09:45 GMT
#### `f4e06c3e530e394004179c8e95d4ac63d2901ba3dee2899b5c6aecd593d3cf17`
```dockerfile
ENV BUNDLE_APP_CONFIG=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:33:34 GMT
- Parent Layer: `4d34bce3681fbe7d6e44dd64d64aec4bfba04be3d228ada179fe26a7cd8e0837`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `97e3c96f87f80b46f61a93599bec45fbf0600e3962d6e5cdf6abf37b563904a5`
```dockerfile
CMD ["irb"]
```
- Created: Tue, 25 Aug 2015 08:33:34 GMT
- Parent Layer: `f4e06c3e530e394004179c8e95d4ac63d2901ba3dee2899b5c6aecd593d3cf17`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `d8e0f924467616d8a3a488ce7dc887bbdaa2b6580d35dc8d07e7ea18e03cabe6`
```dockerfile
RUN bundle config --global frozen 1
```
- Created: Tue, 25 Aug 2015 08:35:20 GMT
- Parent Layer: `97e3c96f87f80b46f61a93599bec45fbf0600e3962d6e5cdf6abf37b563904a5`
- Docker Version: 1.7.1
- Virtual Size: 92.0 B
- v2 Blob: `sha256:b1bfa9837a997fb17786c0916a5086651334cebca75cfa1694226702394c1f6b`
- v2 Content-Length: 220.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 04:16:48 GMT
#### `c632b2a2fb60c1b15ca386b9b4812823fdeb3abc27dab785bfc517d08d9893d5`
```dockerfile
RUN mkdir -p /usr/src/app
```
- Created: Tue, 25 Aug 2015 08:35:21 GMT
- Parent Layer: `d8e0f924467616d8a3a488ce7dc887bbdaa2b6580d35dc8d07e7ea18e03cabe6`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:e4fa71525059ee3ecaea3ea63e422453c684cfe5b07b8eee07cf016e12e4f3ee`
- v2 Content-Length: 126.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 04:16:46 GMT
#### `b59fea84a8671a0f9970a5f42e02a0eca91be10d883a13a01be51526a0744b29`
```dockerfile
WORKDIR /usr/src/app
```
- Created: Tue, 25 Aug 2015 08:35:21 GMT
- Parent Layer: `c632b2a2fb60c1b15ca386b9b4812823fdeb3abc27dab785bfc517d08d9893d5`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `86747cd7cda492a86094ea378b0c6f8350f6437b23aab11ed3fba63c1e6410ca`
```dockerfile
ONBUILD COPY Gemfile /usr/src/app/
```
- Created: Tue, 25 Aug 2015 08:35:22 GMT
- Parent Layer: `b59fea84a8671a0f9970a5f42e02a0eca91be10d883a13a01be51526a0744b29`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `22fd69c6d4a0415870987586be71e41c81d7f8473362f3d3e83258c7e32e6cb1`
```dockerfile
ONBUILD COPY Gemfile.lock /usr/src/app/
```
- Created: Tue, 25 Aug 2015 08:35:22 GMT
- Parent Layer: `86747cd7cda492a86094ea378b0c6f8350f6437b23aab11ed3fba63c1e6410ca`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `b5412c834ff7b533a987151a66a0e9802d91bdb893a72acc9074e3e0a35476b2`
```dockerfile
ONBUILD RUN bundle install
```
- Created: Tue, 25 Aug 2015 08:35:23 GMT
- Parent Layer: `22fd69c6d4a0415870987586be71e41c81d7f8473362f3d3e83258c7e32e6cb1`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `38c58af3299b00966f51308111c4ad5a9840d94c5e2bde33b09eec80c4537068`
```dockerfile
ONBUILD COPY . /usr/src/app
```
- Created: Tue, 25 Aug 2015 08:35:23 GMT
- Parent Layer: `b5412c834ff7b533a987151a66a0e9802d91bdb893a72acc9074e3e0a35476b2`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
## `ruby:2-onbuild`
- Total Virtual Size: 716.8 MB (716832239 bytes)
- Total v2 Content-Length: 273.2 MB (273238305 bytes)
### Layers (24)
#### `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
```dockerfile
ADD file:b770303e11edaa0ad0d8f43f6db4fa26673923912b5d5f7cb748ba025e6c4d3b in /
```
- Created: Thu, 20 Aug 2015 20:17:59 GMT
- Docker Version: 1.7.1
- Virtual Size: 125.2 MB (125174904 bytes)
- v2 Blob: `sha256:7ccc78f8af6db23a5013f7b90b5672b82d69dd2fb30d1e6736dba29209aceee7`
- v2 Content-Length: 51.4 MB (51368377 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:40:09 GMT
#### `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
```dockerfile
CMD ["/bin/bash"]
```
- Created: Thu, 20 Aug 2015 20:18:01 GMT
- Parent Layer: `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
wget \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:24:45 GMT
- Parent Layer: `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
- Docker Version: 1.7.1
- Virtual Size: 44.4 MB (44355942 bytes)
- v2 Blob: `sha256:eba087ca53a356384db448d54a51620cde9e91d4935e7cd134c3c571df8447c4`
- v2 Content-Length: 18.5 MB (18538916 bytes)
- v2 Last-Modified: Tue, 25 Aug 2015 22:15:52 GMT
#### `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
bzr \
git \
mercurial \
openssh-client \
subversion \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:25:45 GMT
- Parent Layer: `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
- Docker Version: 1.7.1
- Virtual Size: 122.3 MB (122318537 bytes)
- v2 Blob: `sha256:a068cb6fd68bb10bf1f97beedee2837c2b2a52109dbbb59ea25462d661006e0d`
- v2 Content-Length: 42.3 MB (42340018 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:59:13 GMT
#### `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
automake \
bzip2 \
file \
g++ \
gcc \
imagemagick \
libbz2-dev \
libc6-dev \
libcurl4-openssl-dev \
libevent-dev \
libffi-dev \
libglib2.0-dev \
libjpeg-dev \
liblzma-dev \
libmagickcore-dev \
libmagickwand-dev \
libmysqlclient-dev \
libncurses-dev \
libpng-dev \
libpq-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libtool \
libwebp-dev \
libxml2-dev \
libxslt-dev \
libyaml-dev \
make \
patch \
xz-utils \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Mon, 24 Aug 2015 16:11:35 GMT
- Parent Layer: `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
- Docker Version: 1.7.1
- Virtual Size: 313.7 MB (313666691 bytes)
- v2 Blob: `sha256:2ac01aa9d22a0c73405fe147734a6acf8929209620ca4a80fe8064449ab7d301`
- v2 Content-Length: 128.2 MB (128191020 bytes)
- v2 Last-Modified: Mon, 24 Aug 2015 16:55:37 GMT
#### `289272cba3d53350c4caf940ee644847f756e2affcbf8395ef92d3957c7131c3`
```dockerfile
ENV RUBY_MAJOR=2.2
```
- Created: Tue, 25 Aug 2015 08:29:10 GMT
- Parent Layer: `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `8e840dd94b7840c0765d58f87059e6c16f5c2cb3702501e5ce2a2ea171e5e6e4`
```dockerfile
ENV RUBY_VERSION=2.2.3
```
- Created: Tue, 25 Aug 2015 08:29:11 GMT
- Parent Layer: `289272cba3d53350c4caf940ee644847f756e2affcbf8395ef92d3957c7131c3`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `bb92cab4f1d2c11eb4abe1aec0c0679bb8aab2e502571eb9a0e6831bca4aff6a`
```dockerfile
ENV RUBY_DOWNLOAD_SHA256=df795f2f99860745a416092a4004b016ccf77e8b82dec956b120f18bdc71edce
```
- Created: Tue, 25 Aug 2015 08:29:11 GMT
- Parent Layer: `8e840dd94b7840c0765d58f87059e6c16f5c2cb3702501e5ce2a2ea171e5e6e4`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `9492043fccad2045959a44f6369160ca1d0267ba56ef4f901f572d8d30f26d5d`
```dockerfile
ENV RUBYGEMS_VERSION=2.4.8
```
- Created: Tue, 25 Aug 2015 08:29:12 GMT
- Parent Layer: `bb92cab4f1d2c11eb4abe1aec0c0679bb8aab2e502571eb9a0e6831bca4aff6a`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `88c67bfdcf7beb31434239ecbcb4d01a485928b07dff2623497e658fee831058`
```dockerfile
RUN echo 'install: --no-document\nupdate: --no-document' >> "$HOME/.gemrc"
```
- Created: Tue, 25 Aug 2015 08:29:13 GMT
- Parent Layer: `9492043fccad2045959a44f6369160ca1d0267ba56ef4f901f572d8d30f26d5d`
- Docker Version: 1.7.1
- Virtual Size: 45.0 B
- v2 Blob: `sha256:5188b4571f63017808fb16c99b8a0d65877861ebd0ed012d40bfdca40bcb59c6`
- v2 Content-Length: 161.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 04:10:13 GMT
#### `6171e245fc5d75280f25a612ee2884baf062e6cd37ee9dc2549cc9355875f4f8`
```dockerfile
RUN apt-get update \
&& apt-get install -y bison libgdbm-dev ruby \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/ruby \
&& curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
&& rm ruby.tar.gz \
&& cd /usr/src/ruby \
&& autoconf \
&& ./configure --disable-install-doc \
&& make -j"$(nproc)" \
&& make install \
&& apt-get purge -y --auto-remove bison libgdbm-dev ruby \
&& gem update --system $RUBYGEMS_VERSION \
&& rm -r /usr/src/ruby
```
- Created: Tue, 25 Aug 2015 08:33:28 GMT
- Parent Layer: `88c67bfdcf7beb31434239ecbcb4d01a485928b07dff2623497e658fee831058`
- Docker Version: 1.7.1
- Virtual Size: 110.2 MB (110191494 bytes)
- v2 Blob: `sha256:9ae147d5c2ee8eb77098cf6758c9baa5326820e8b45bf8b1d6b881706d9a59b2`
- v2 Content-Length: 32.3 MB (32298846 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 04:10:10 GMT
#### `ab3e12de2e0b9081e6524e66f16c853470be61017a2aca12015d0ba4560f7569`
```dockerfile
ENV GEM_HOME=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:33:29 GMT
- Parent Layer: `6171e245fc5d75280f25a612ee2884baf062e6cd37ee9dc2549cc9355875f4f8`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f81328f6b62f5d3c425ca7788ba5bc498671f934a2cd3e493d1b7850582bb2e8`
```dockerfile
ENV PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
```
- Created: Tue, 25 Aug 2015 08:33:30 GMT
- Parent Layer: `ab3e12de2e0b9081e6524e66f16c853470be61017a2aca12015d0ba4560f7569`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `5f9e00ef48855e50512bc66a11195d5399cb25a0c40da0bc0117c6668ad2d8f2`
```dockerfile
ENV BUNDLER_VERSION=1.10.6
```
- Created: Tue, 25 Aug 2015 08:33:30 GMT
- Parent Layer: `f81328f6b62f5d3c425ca7788ba5bc498671f934a2cd3e493d1b7850582bb2e8`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `4d34bce3681fbe7d6e44dd64d64aec4bfba04be3d228ada179fe26a7cd8e0837`
```dockerfile
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
```
- Created: Tue, 25 Aug 2015 08:33:33 GMT
- Parent Layer: `5f9e00ef48855e50512bc66a11195d5399cb25a0c40da0bc0117c6668ad2d8f2`
- Docker Version: 1.7.1
- Virtual Size: 1.1 MB (1124534 bytes)
- v2 Blob: `sha256:6cbfd2ac0a2d5fd80e389be09a55e474a7c19d0ac075f5bdc4f6f800a897b57c`
- v2 Content-Length: 500.1 KB (500109 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 04:09:45 GMT
#### `f4e06c3e530e394004179c8e95d4ac63d2901ba3dee2899b5c6aecd593d3cf17`
```dockerfile
ENV BUNDLE_APP_CONFIG=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:33:34 GMT
- Parent Layer: `4d34bce3681fbe7d6e44dd64d64aec4bfba04be3d228ada179fe26a7cd8e0837`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `97e3c96f87f80b46f61a93599bec45fbf0600e3962d6e5cdf6abf37b563904a5`
```dockerfile
CMD ["irb"]
```
- Created: Tue, 25 Aug 2015 08:33:34 GMT
- Parent Layer: `f4e06c3e530e394004179c8e95d4ac63d2901ba3dee2899b5c6aecd593d3cf17`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `d8e0f924467616d8a3a488ce7dc887bbdaa2b6580d35dc8d07e7ea18e03cabe6`
```dockerfile
RUN bundle config --global frozen 1
```
- Created: Tue, 25 Aug 2015 08:35:20 GMT
- Parent Layer: `97e3c96f87f80b46f61a93599bec45fbf0600e3962d6e5cdf6abf37b563904a5`
- Docker Version: 1.7.1
- Virtual Size: 92.0 B
- v2 Blob: `sha256:b1bfa9837a997fb17786c0916a5086651334cebca75cfa1694226702394c1f6b`
- v2 Content-Length: 220.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 04:16:48 GMT
#### `c632b2a2fb60c1b15ca386b9b4812823fdeb3abc27dab785bfc517d08d9893d5`
```dockerfile
RUN mkdir -p /usr/src/app
```
- Created: Tue, 25 Aug 2015 08:35:21 GMT
- Parent Layer: `d8e0f924467616d8a3a488ce7dc887bbdaa2b6580d35dc8d07e7ea18e03cabe6`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:e4fa71525059ee3ecaea3ea63e422453c684cfe5b07b8eee07cf016e12e4f3ee`
- v2 Content-Length: 126.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 04:16:46 GMT
#### `b59fea84a8671a0f9970a5f42e02a0eca91be10d883a13a01be51526a0744b29`
```dockerfile
WORKDIR /usr/src/app
```
- Created: Tue, 25 Aug 2015 08:35:21 GMT
- Parent Layer: `c632b2a2fb60c1b15ca386b9b4812823fdeb3abc27dab785bfc517d08d9893d5`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `86747cd7cda492a86094ea378b0c6f8350f6437b23aab11ed3fba63c1e6410ca`
```dockerfile
ONBUILD COPY Gemfile /usr/src/app/
```
- Created: Tue, 25 Aug 2015 08:35:22 GMT
- Parent Layer: `b59fea84a8671a0f9970a5f42e02a0eca91be10d883a13a01be51526a0744b29`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `22fd69c6d4a0415870987586be71e41c81d7f8473362f3d3e83258c7e32e6cb1`
```dockerfile
ONBUILD COPY Gemfile.lock /usr/src/app/
```
- Created: Tue, 25 Aug 2015 08:35:22 GMT
- Parent Layer: `86747cd7cda492a86094ea378b0c6f8350f6437b23aab11ed3fba63c1e6410ca`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `b5412c834ff7b533a987151a66a0e9802d91bdb893a72acc9074e3e0a35476b2`
```dockerfile
ONBUILD RUN bundle install
```
- Created: Tue, 25 Aug 2015 08:35:23 GMT
- Parent Layer: `22fd69c6d4a0415870987586be71e41c81d7f8473362f3d3e83258c7e32e6cb1`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `38c58af3299b00966f51308111c4ad5a9840d94c5e2bde33b09eec80c4537068`
```dockerfile
ONBUILD COPY . /usr/src/app
```
- Created: Tue, 25 Aug 2015 08:35:23 GMT
- Parent Layer: `b5412c834ff7b533a987151a66a0e9802d91bdb893a72acc9074e3e0a35476b2`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
## `ruby:onbuild`
- Total Virtual Size: 716.8 MB (716832239 bytes)
- Total v2 Content-Length: 273.2 MB (273238305 bytes)
### Layers (24)
#### `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
```dockerfile
ADD file:b770303e11edaa0ad0d8f43f6db4fa26673923912b5d5f7cb748ba025e6c4d3b in /
```
- Created: Thu, 20 Aug 2015 20:17:59 GMT
- Docker Version: 1.7.1
- Virtual Size: 125.2 MB (125174904 bytes)
- v2 Blob: `sha256:7ccc78f8af6db23a5013f7b90b5672b82d69dd2fb30d1e6736dba29209aceee7`
- v2 Content-Length: 51.4 MB (51368377 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:40:09 GMT
#### `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
```dockerfile
CMD ["/bin/bash"]
```
- Created: Thu, 20 Aug 2015 20:18:01 GMT
- Parent Layer: `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
wget \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:24:45 GMT
- Parent Layer: `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
- Docker Version: 1.7.1
- Virtual Size: 44.4 MB (44355942 bytes)
- v2 Blob: `sha256:eba087ca53a356384db448d54a51620cde9e91d4935e7cd134c3c571df8447c4`
- v2 Content-Length: 18.5 MB (18538916 bytes)
- v2 Last-Modified: Tue, 25 Aug 2015 22:15:52 GMT
#### `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
bzr \
git \
mercurial \
openssh-client \
subversion \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Thu, 20 Aug 2015 20:25:45 GMT
- Parent Layer: `f972ade4c9d5f9863b782ee685c8ec80da9bdb8e43834919214dd68d501687f0`
- Docker Version: 1.7.1
- Virtual Size: 122.3 MB (122318537 bytes)
- v2 Blob: `sha256:a068cb6fd68bb10bf1f97beedee2837c2b2a52109dbbb59ea25462d661006e0d`
- v2 Content-Length: 42.3 MB (42340018 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:59:13 GMT
#### `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
automake \
bzip2 \
file \
g++ \
gcc \
imagemagick \
libbz2-dev \
libc6-dev \
libcurl4-openssl-dev \
libevent-dev \
libffi-dev \
libglib2.0-dev \
libjpeg-dev \
liblzma-dev \
libmagickcore-dev \
libmagickwand-dev \
libmysqlclient-dev \
libncurses-dev \
libpng-dev \
libpq-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libtool \
libwebp-dev \
libxml2-dev \
libxslt-dev \
libyaml-dev \
make \
patch \
xz-utils \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Mon, 24 Aug 2015 16:11:35 GMT
- Parent Layer: `a0b6d62d8b494ada2b9a303ccf398021b2ca2838234f8d5f735743be77ab2726`
- Docker Version: 1.7.1
- Virtual Size: 313.7 MB (313666691 bytes)
- v2 Blob: `sha256:2ac01aa9d22a0c73405fe147734a6acf8929209620ca4a80fe8064449ab7d301`
- v2 Content-Length: 128.2 MB (128191020 bytes)
- v2 Last-Modified: Mon, 24 Aug 2015 16:55:37 GMT
#### `289272cba3d53350c4caf940ee644847f756e2affcbf8395ef92d3957c7131c3`
```dockerfile
ENV RUBY_MAJOR=2.2
```
- Created: Tue, 25 Aug 2015 08:29:10 GMT
- Parent Layer: `8f45ce3be01ef6cf47621675c4a75cfdb5b951fb495b9c72394038ac2097c975`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `8e840dd94b7840c0765d58f87059e6c16f5c2cb3702501e5ce2a2ea171e5e6e4`
```dockerfile
ENV RUBY_VERSION=2.2.3
```
- Created: Tue, 25 Aug 2015 08:29:11 GMT
- Parent Layer: `289272cba3d53350c4caf940ee644847f756e2affcbf8395ef92d3957c7131c3`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `bb92cab4f1d2c11eb4abe1aec0c0679bb8aab2e502571eb9a0e6831bca4aff6a`
```dockerfile
ENV RUBY_DOWNLOAD_SHA256=df795f2f99860745a416092a4004b016ccf77e8b82dec956b120f18bdc71edce
```
- Created: Tue, 25 Aug 2015 08:29:11 GMT
- Parent Layer: `8e840dd94b7840c0765d58f87059e6c16f5c2cb3702501e5ce2a2ea171e5e6e4`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `9492043fccad2045959a44f6369160ca1d0267ba56ef4f901f572d8d30f26d5d`
```dockerfile
ENV RUBYGEMS_VERSION=2.4.8
```
- Created: Tue, 25 Aug 2015 08:29:12 GMT
- Parent Layer: `bb92cab4f1d2c11eb4abe1aec0c0679bb8aab2e502571eb9a0e6831bca4aff6a`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `88c67bfdcf7beb31434239ecbcb4d01a485928b07dff2623497e658fee831058`
```dockerfile
RUN echo 'install: --no-document\nupdate: --no-document' >> "$HOME/.gemrc"
```
- Created: Tue, 25 Aug 2015 08:29:13 GMT
- Parent Layer: `9492043fccad2045959a44f6369160ca1d0267ba56ef4f901f572d8d30f26d5d`
- Docker Version: 1.7.1
- Virtual Size: 45.0 B
- v2 Blob: `sha256:5188b4571f63017808fb16c99b8a0d65877861ebd0ed012d40bfdca40bcb59c6`
- v2 Content-Length: 161.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 04:10:13 GMT
#### `6171e245fc5d75280f25a612ee2884baf062e6cd37ee9dc2549cc9355875f4f8`
```dockerfile
RUN apt-get update \
&& apt-get install -y bison libgdbm-dev ruby \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/ruby \
&& curl -fSL -o ruby.tar.gz "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.gz" \
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.gz" | sha256sum -c - \
&& tar -xzf ruby.tar.gz -C /usr/src/ruby --strip-components=1 \
&& rm ruby.tar.gz \
&& cd /usr/src/ruby \
&& autoconf \
&& ./configure --disable-install-doc \
&& make -j"$(nproc)" \
&& make install \
&& apt-get purge -y --auto-remove bison libgdbm-dev ruby \
&& gem update --system $RUBYGEMS_VERSION \
&& rm -r /usr/src/ruby
```
- Created: Tue, 25 Aug 2015 08:33:28 GMT
- Parent Layer: `88c67bfdcf7beb31434239ecbcb4d01a485928b07dff2623497e658fee831058`
- Docker Version: 1.7.1
- Virtual Size: 110.2 MB (110191494 bytes)
- v2 Blob: `sha256:9ae147d5c2ee8eb77098cf6758c9baa5326820e8b45bf8b1d6b881706d9a59b2`
- v2 Content-Length: 32.3 MB (32298846 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 04:10:10 GMT
#### `ab3e12de2e0b9081e6524e66f16c853470be61017a2aca12015d0ba4560f7569`
```dockerfile
ENV GEM_HOME=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:33:29 GMT
- Parent Layer: `6171e245fc5d75280f25a612ee2884baf062e6cd37ee9dc2549cc9355875f4f8`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `f81328f6b62f5d3c425ca7788ba5bc498671f934a2cd3e493d1b7850582bb2e8`
```dockerfile
ENV PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
```
- Created: Tue, 25 Aug 2015 08:33:30 GMT
- Parent Layer: `ab3e12de2e0b9081e6524e66f16c853470be61017a2aca12015d0ba4560f7569`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `5f9e00ef48855e50512bc66a11195d5399cb25a0c40da0bc0117c6668ad2d8f2`
```dockerfile
ENV BUNDLER_VERSION=1.10.6
```
- Created: Tue, 25 Aug 2015 08:33:30 GMT
- Parent Layer: `f81328f6b62f5d3c425ca7788ba5bc498671f934a2cd3e493d1b7850582bb2e8`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `4d34bce3681fbe7d6e44dd64d64aec4bfba04be3d228ada179fe26a7cd8e0837`
```dockerfile
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
```
- Created: Tue, 25 Aug 2015 08:33:33 GMT
- Parent Layer: `5f9e00ef48855e50512bc66a11195d5399cb25a0c40da0bc0117c6668ad2d8f2`
- Docker Version: 1.7.1
- Virtual Size: 1.1 MB (1124534 bytes)
- v2 Blob: `sha256:6cbfd2ac0a2d5fd80e389be09a55e474a7c19d0ac075f5bdc4f6f800a897b57c`
- v2 Content-Length: 500.1 KB (500109 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 04:09:45 GMT
#### `f4e06c3e530e394004179c8e95d4ac63d2901ba3dee2899b5c6aecd593d3cf17`
```dockerfile
ENV BUNDLE_APP_CONFIG=/usr/local/bundle
```
- Created: Tue, 25 Aug 2015 08:33:34 GMT
- Parent Layer: `4d34bce3681fbe7d6e44dd64d64aec4bfba04be3d228ada179fe26a7cd8e0837`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `97e3c96f87f80b46f61a93599bec45fbf0600e3962d6e5cdf6abf37b563904a5`
```dockerfile
CMD ["irb"]
```
- Created: Tue, 25 Aug 2015 08:33:34 GMT
- Parent Layer: `f4e06c3e530e394004179c8e95d4ac63d2901ba3dee2899b5c6aecd593d3cf17`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `d8e0f924467616d8a3a488ce7dc887bbdaa2b6580d35dc8d07e7ea18e03cabe6`
```dockerfile
RUN bundle config --global frozen 1
```
- Created: Tue, 25 Aug 2015 08:35:20 GMT
- Parent Layer: `97e3c96f87f80b46f61a93599bec45fbf0600e3962d6e5cdf6abf37b563904a5`
- Docker Version: 1.7.1
- Virtual Size: 92.0 B
- v2 Blob: `sha256:b1bfa9837a997fb17786c0916a5086651334cebca75cfa1694226702394c1f6b`
- v2 Content-Length: 220.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 04:16:48 GMT
#### `c632b2a2fb60c1b15ca386b9b4812823fdeb3abc27dab785bfc517d08d9893d5`
```dockerfile
RUN mkdir -p /usr/src/app
```
- Created: Tue, 25 Aug 2015 08:35:21 GMT
- Parent Layer: `d8e0f924467616d8a3a488ce7dc887bbdaa2b6580d35dc8d07e7ea18e03cabe6`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:e4fa71525059ee3ecaea3ea63e422453c684cfe5b07b8eee07cf016e12e4f3ee`
- v2 Content-Length: 126.0 B
- v2 Last-Modified: Thu, 27 Aug 2015 04:16:46 GMT
#### `b59fea84a8671a0f9970a5f42e02a0eca91be10d883a13a01be51526a0744b29`
```dockerfile
WORKDIR /usr/src/app
```
- Created: Tue, 25 Aug 2015 08:35:21 GMT
- Parent Layer: `c632b2a2fb60c1b15ca386b9b4812823fdeb3abc27dab785bfc517d08d9893d5`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `86747cd7cda492a86094ea378b0c6f8350f6437b23aab11ed3fba63c1e6410ca`
```dockerfile
ONBUILD COPY Gemfile /usr/src/app/
```
- Created: Tue, 25 Aug 2015 08:35:22 GMT
- Parent Layer: `b59fea84a8671a0f9970a5f42e02a0eca91be10d883a13a01be51526a0744b29`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `22fd69c6d4a0415870987586be71e41c81d7f8473362f3d3e83258c7e32e6cb1`
```dockerfile
ONBUILD COPY Gemfile.lock /usr/src/app/
```
- Created: Tue, 25 Aug 2015 08:35:22 GMT
- Parent Layer: `86747cd7cda492a86094ea378b0c6f8350f6437b23aab11ed3fba63c1e6410ca`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `b5412c834ff7b533a987151a66a0e9802d91bdb893a72acc9074e3e0a35476b2`
```dockerfile
ONBUILD RUN bundle install
```
- Created: Tue, 25 Aug 2015 08:35:23 GMT
- Parent Layer: `22fd69c6d4a0415870987586be71e41c81d7f8473362f3d3e83258c7e32e6cb1`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `38c58af3299b00966f51308111c4ad5a9840d94c5e2bde33b09eec80c4537068`
```dockerfile
ONBUILD COPY . /usr/src/app
```
- Created: Tue, 25 Aug 2015 08:35:23 GMT
- Parent Layer: `b5412c834ff7b533a987151a66a0e9802d91bdb893a72acc9074e3e0a35476b2`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
## `ruby:2.2.3-slim`
- Total Virtual Size: 275.1 MB (275090124 bytes)
- Total v2 Content-Length: 98.0 MB (97978418 bytes)
### Layers (14)
#### `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
```dockerfile
ADD file:b770303e11edaa0ad0d8f43f6db4fa26673923912b5d5f7cb748ba025e6c4d3b in /
```
- Created: Thu, 20 Aug 2015 20:17:59 GMT
- Docker Version: 1.7.1
- Virtual Size: 125.2 MB (125174904 bytes)
- v2 Blob: `sha256:7ccc78f8af6db23a5013f7b90b5672b82d69dd2fb30d1e6736dba29209aceee7`
- v2 Content-Length: 51.4 MB (51368377 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:40:09 GMT
#### `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
```dockerfile
CMD ["/bin/bash"]
```
- Created: Thu, 20 Aug 2015 20:18:01 GMT
- Parent Layer: `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `787f8f2047af77d883efef4fee3b2041f0722d1f311f1c174c461d7c7c7a6b0f`
```dockerfile
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
bzip2 \
ca-certificates \
curl \
libffi-dev \
libgdbm3 \
libssl-dev \
libyaml-dev \
procps \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Mon, 24 Aug 2015 22:21:08 GMT
- Parent Layer: `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
- Docker Version: 1.7.1
- Virtual Size: 37.8 MB (37752882 bytes)
- v2 Blob: `sha256:7a0c5412f04c16fded90f2746384d0bbe4c221734daddf521e148d3dd591abac`
- v2 Content-Length: 13.6 MB (13602537 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:54:54 GMT
#### `18204466700b87b24b7eca6b44fbf71a7a8789d1a95b9da853dfbab985f52924`
```dockerfile
ENV RUBY_MAJOR=2.2
```
- Created: Mon, 24 Aug 2015 22:38:16 GMT
- Parent Layer: `787f8f2047af77d883efef4fee3b2041f0722d1f311f1c174c461d7c7c7a6b0f`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `3c2287fb1a19c752f5351286c773ccad9e1bef2e3d03ef95c7fd248623115b4f`
```dockerfile
ENV RUBY_VERSION=2.2.3
```
- Created: Mon, 24 Aug 2015 22:38:16 GMT
- Parent Layer: `18204466700b87b24b7eca6b44fbf71a7a8789d1a95b9da853dfbab985f52924`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `09254ebefe0fb89295c31cb36b74ef85127ed21e87d7a0c691ee7823cabf0ffb`
```dockerfile
ENV RUBYGEMS_VERSION=2.4.8
```
- Created: Mon, 24 Aug 2015 22:38:17 GMT
- Parent Layer: `3c2287fb1a19c752f5351286c773ccad9e1bef2e3d03ef95c7fd248623115b4f`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `9573825b63f008a8aee81b269c0fedfb694d930de9a600b03e53469d4685874c`
```dockerfile
RUN echo 'install: --no-document\nupdate: --no-document' >> "$HOME/.gemrc"
```
- Created: Mon, 24 Aug 2015 22:38:19 GMT
- Parent Layer: `09254ebefe0fb89295c31cb36b74ef85127ed21e87d7a0c691ee7823cabf0ffb`
- Docker Version: 1.7.1
- Virtual Size: 45.0 B
- v2 Blob: `sha256:dc5f86b37acc5f9915dc99872437cd2e2fd5d9d3e2f701f3c0b259c9d967e699`
- v2 Content-Length: 162.0 B
- v2 Last-Modified: Tue, 25 Aug 2015 03:19:21 GMT
#### `bd00463fec325edfa318965b4d292474b1315d317fe12e2afb4840165124eb35`
```dockerfile
RUN buildDeps=' \
autoconf \
bison \
gcc \
libbz2-dev \
libgdbm-dev \
libglib2.0-dev \
libncurses-dev \
libreadline-dev \
libxml2-dev \
libxslt-dev \
make \
ruby \
' \
&& set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends $buildDeps \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/ruby \
&& curl -SL "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.bz2" \
| tar -xjC /usr/src/ruby --strip-components=1 \
&& cd /usr/src/ruby \
&& autoconf \
&& ./configure --disable-install-doc \
&& make -j"$(nproc)" \
&& make install \
&& gem update --system $RUBYGEMS_VERSION \
&& rm -r /usr/src/ruby \
&& apt-get purge -y --auto-remove $buildDeps
```
- Created: Mon, 24 Aug 2015 22:44:08 GMT
- Parent Layer: `9573825b63f008a8aee81b269c0fedfb694d930de9a600b03e53469d4685874c`
- Docker Version: 1.7.1
- Virtual Size: 111.0 MB (111037759 bytes)
- v2 Blob: `sha256:9feda6914fac5a52a06edba0a5704d91007d876ac4c9bd5d26c92a0fb303f276`
- v2 Content-Length: 32.5 MB (32506887 bytes)
- v2 Last-Modified: Tue, 25 Aug 2015 03:19:17 GMT
#### `a5d28b49de754dcea0dcf48eb97ad9a02bbf59571ae32a7ab5602cf259baf43c`
```dockerfile
ENV GEM_HOME=/usr/local/bundle
```
- Created: Mon, 24 Aug 2015 22:44:10 GMT
- Parent Layer: `bd00463fec325edfa318965b4d292474b1315d317fe12e2afb4840165124eb35`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `743c29cf2dab1a1b0e9bbda35ce809014f12b74d82ee7f79ba3d49b4a6039f03`
```dockerfile
ENV PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
```
- Created: Mon, 24 Aug 2015 22:44:11 GMT
- Parent Layer: `a5d28b49de754dcea0dcf48eb97ad9a02bbf59571ae32a7ab5602cf259baf43c`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `58756bf05dac55723ef781d33bac7abf2ec4c5c7c781410e89886e3a38d2c95b`
```dockerfile
ENV BUNDLER_VERSION=1.10.6
```
- Created: Mon, 24 Aug 2015 22:44:12 GMT
- Parent Layer: `743c29cf2dab1a1b0e9bbda35ce809014f12b74d82ee7f79ba3d49b4a6039f03`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `ba9a7583be6d65a43ab1f14750b977aadf69bf6ecd5d720978ad623877042ea6`
```dockerfile
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
```
- Created: Mon, 24 Aug 2015 22:44:16 GMT
- Parent Layer: `58756bf05dac55723ef781d33bac7abf2ec4c5c7c781410e89886e3a38d2c95b`
- Docker Version: 1.7.1
- Virtual Size: 1.1 MB (1124534 bytes)
- v2 Blob: `sha256:4d0258f448812a5258a41ae85d22e3b9f23ff360c8c52918b7a5ccdd018d14e4`
- v2 Content-Length: 500.1 KB (500135 bytes)
- v2 Last-Modified: Tue, 25 Aug 2015 03:18:45 GMT
#### `1616eb4a729e54b52b9b6268fd9b77df9354b3ceb6f1e4a1dc81c9b9aa4d3011`
```dockerfile
ENV BUNDLE_APP_CONFIG=/usr/local/bundle
```
- Created: Mon, 24 Aug 2015 22:44:17 GMT
- Parent Layer: `ba9a7583be6d65a43ab1f14750b977aadf69bf6ecd5d720978ad623877042ea6`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `4519114432f55ae8eeb1ae042ea5e22386a5296b754aa95108ceab2bf82fa396`
```dockerfile
CMD ["irb"]
```
- Created: Mon, 24 Aug 2015 22:44:17 GMT
- Parent Layer: `1616eb4a729e54b52b9b6268fd9b77df9354b3ceb6f1e4a1dc81c9b9aa4d3011`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
## `ruby:2.2-slim`
- Total Virtual Size: 275.1 MB (275090124 bytes)
- Total v2 Content-Length: 98.0 MB (97978418 bytes)
### Layers (14)
#### `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
```dockerfile
ADD file:b770303e11edaa0ad0d8f43f6db4fa26673923912b5d5f7cb748ba025e6c4d3b in /
```
- Created: Thu, 20 Aug 2015 20:17:59 GMT
- Docker Version: 1.7.1
- Virtual Size: 125.2 MB (125174904 bytes)
- v2 Blob: `sha256:7ccc78f8af6db23a5013f7b90b5672b82d69dd2fb30d1e6736dba29209aceee7`
- v2 Content-Length: 51.4 MB (51368377 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:40:09 GMT
#### `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
```dockerfile
CMD ["/bin/bash"]
```
- Created: Thu, 20 Aug 2015 20:18:01 GMT
- Parent Layer: `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `787f8f2047af77d883efef4fee3b2041f0722d1f311f1c174c461d7c7c7a6b0f`
```dockerfile
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
bzip2 \
ca-certificates \
curl \
libffi-dev \
libgdbm3 \
libssl-dev \
libyaml-dev \
procps \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Mon, 24 Aug 2015 22:21:08 GMT
- Parent Layer: `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
- Docker Version: 1.7.1
- Virtual Size: 37.8 MB (37752882 bytes)
- v2 Blob: `sha256:7a0c5412f04c16fded90f2746384d0bbe4c221734daddf521e148d3dd591abac`
- v2 Content-Length: 13.6 MB (13602537 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:54:54 GMT
#### `18204466700b87b24b7eca6b44fbf71a7a8789d1a95b9da853dfbab985f52924`
```dockerfile
ENV RUBY_MAJOR=2.2
```
- Created: Mon, 24 Aug 2015 22:38:16 GMT
- Parent Layer: `787f8f2047af77d883efef4fee3b2041f0722d1f311f1c174c461d7c7c7a6b0f`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `3c2287fb1a19c752f5351286c773ccad9e1bef2e3d03ef95c7fd248623115b4f`
```dockerfile
ENV RUBY_VERSION=2.2.3
```
- Created: Mon, 24 Aug 2015 22:38:16 GMT
- Parent Layer: `18204466700b87b24b7eca6b44fbf71a7a8789d1a95b9da853dfbab985f52924`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `09254ebefe0fb89295c31cb36b74ef85127ed21e87d7a0c691ee7823cabf0ffb`
```dockerfile
ENV RUBYGEMS_VERSION=2.4.8
```
- Created: Mon, 24 Aug 2015 22:38:17 GMT
- Parent Layer: `3c2287fb1a19c752f5351286c773ccad9e1bef2e3d03ef95c7fd248623115b4f`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `9573825b63f008a8aee81b269c0fedfb694d930de9a600b03e53469d4685874c`
```dockerfile
RUN echo 'install: --no-document\nupdate: --no-document' >> "$HOME/.gemrc"
```
- Created: Mon, 24 Aug 2015 22:38:19 GMT
- Parent Layer: `09254ebefe0fb89295c31cb36b74ef85127ed21e87d7a0c691ee7823cabf0ffb`
- Docker Version: 1.7.1
- Virtual Size: 45.0 B
- v2 Blob: `sha256:dc5f86b37acc5f9915dc99872437cd2e2fd5d9d3e2f701f3c0b259c9d967e699`
- v2 Content-Length: 162.0 B
- v2 Last-Modified: Tue, 25 Aug 2015 03:19:21 GMT
#### `bd00463fec325edfa318965b4d292474b1315d317fe12e2afb4840165124eb35`
```dockerfile
RUN buildDeps=' \
autoconf \
bison \
gcc \
libbz2-dev \
libgdbm-dev \
libglib2.0-dev \
libncurses-dev \
libreadline-dev \
libxml2-dev \
libxslt-dev \
make \
ruby \
' \
&& set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends $buildDeps \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/ruby \
&& curl -SL "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.bz2" \
| tar -xjC /usr/src/ruby --strip-components=1 \
&& cd /usr/src/ruby \
&& autoconf \
&& ./configure --disable-install-doc \
&& make -j"$(nproc)" \
&& make install \
&& gem update --system $RUBYGEMS_VERSION \
&& rm -r /usr/src/ruby \
&& apt-get purge -y --auto-remove $buildDeps
```
- Created: Mon, 24 Aug 2015 22:44:08 GMT
- Parent Layer: `9573825b63f008a8aee81b269c0fedfb694d930de9a600b03e53469d4685874c`
- Docker Version: 1.7.1
- Virtual Size: 111.0 MB (111037759 bytes)
- v2 Blob: `sha256:9feda6914fac5a52a06edba0a5704d91007d876ac4c9bd5d26c92a0fb303f276`
- v2 Content-Length: 32.5 MB (32506887 bytes)
- v2 Last-Modified: Tue, 25 Aug 2015 03:19:17 GMT
#### `a5d28b49de754dcea0dcf48eb97ad9a02bbf59571ae32a7ab5602cf259baf43c`
```dockerfile
ENV GEM_HOME=/usr/local/bundle
```
- Created: Mon, 24 Aug 2015 22:44:10 GMT
- Parent Layer: `bd00463fec325edfa318965b4d292474b1315d317fe12e2afb4840165124eb35`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `743c29cf2dab1a1b0e9bbda35ce809014f12b74d82ee7f79ba3d49b4a6039f03`
```dockerfile
ENV PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
```
- Created: Mon, 24 Aug 2015 22:44:11 GMT
- Parent Layer: `a5d28b49de754dcea0dcf48eb97ad9a02bbf59571ae32a7ab5602cf259baf43c`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `58756bf05dac55723ef781d33bac7abf2ec4c5c7c781410e89886e3a38d2c95b`
```dockerfile
ENV BUNDLER_VERSION=1.10.6
```
- Created: Mon, 24 Aug 2015 22:44:12 GMT
- Parent Layer: `743c29cf2dab1a1b0e9bbda35ce809014f12b74d82ee7f79ba3d49b4a6039f03`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `ba9a7583be6d65a43ab1f14750b977aadf69bf6ecd5d720978ad623877042ea6`
```dockerfile
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
```
- Created: Mon, 24 Aug 2015 22:44:16 GMT
- Parent Layer: `58756bf05dac55723ef781d33bac7abf2ec4c5c7c781410e89886e3a38d2c95b`
- Docker Version: 1.7.1
- Virtual Size: 1.1 MB (1124534 bytes)
- v2 Blob: `sha256:4d0258f448812a5258a41ae85d22e3b9f23ff360c8c52918b7a5ccdd018d14e4`
- v2 Content-Length: 500.1 KB (500135 bytes)
- v2 Last-Modified: Tue, 25 Aug 2015 03:18:45 GMT
#### `1616eb4a729e54b52b9b6268fd9b77df9354b3ceb6f1e4a1dc81c9b9aa4d3011`
```dockerfile
ENV BUNDLE_APP_CONFIG=/usr/local/bundle
```
- Created: Mon, 24 Aug 2015 22:44:17 GMT
- Parent Layer: `ba9a7583be6d65a43ab1f14750b977aadf69bf6ecd5d720978ad623877042ea6`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `4519114432f55ae8eeb1ae042ea5e22386a5296b754aa95108ceab2bf82fa396`
```dockerfile
CMD ["irb"]
```
- Created: Mon, 24 Aug 2015 22:44:17 GMT
- Parent Layer: `1616eb4a729e54b52b9b6268fd9b77df9354b3ceb6f1e4a1dc81c9b9aa4d3011`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
## `ruby:2-slim`
- Total Virtual Size: 275.1 MB (275090124 bytes)
- Total v2 Content-Length: 98.0 MB (97978418 bytes)
### Layers (14)
#### `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
```dockerfile
ADD file:b770303e11edaa0ad0d8f43f6db4fa26673923912b5d5f7cb748ba025e6c4d3b in /
```
- Created: Thu, 20 Aug 2015 20:17:59 GMT
- Docker Version: 1.7.1
- Virtual Size: 125.2 MB (125174904 bytes)
- v2 Blob: `sha256:7ccc78f8af6db23a5013f7b90b5672b82d69dd2fb30d1e6736dba29209aceee7`
- v2 Content-Length: 51.4 MB (51368377 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:40:09 GMT
#### `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
```dockerfile
CMD ["/bin/bash"]
```
- Created: Thu, 20 Aug 2015 20:18:01 GMT
- Parent Layer: `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `787f8f2047af77d883efef4fee3b2041f0722d1f311f1c174c461d7c7c7a6b0f`
```dockerfile
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
bzip2 \
ca-certificates \
curl \
libffi-dev \
libgdbm3 \
libssl-dev \
libyaml-dev \
procps \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Mon, 24 Aug 2015 22:21:08 GMT
- Parent Layer: `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
- Docker Version: 1.7.1
- Virtual Size: 37.8 MB (37752882 bytes)
- v2 Blob: `sha256:7a0c5412f04c16fded90f2746384d0bbe4c221734daddf521e148d3dd591abac`
- v2 Content-Length: 13.6 MB (13602537 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:54:54 GMT
#### `18204466700b87b24b7eca6b44fbf71a7a8789d1a95b9da853dfbab985f52924`
```dockerfile
ENV RUBY_MAJOR=2.2
```
- Created: Mon, 24 Aug 2015 22:38:16 GMT
- Parent Layer: `787f8f2047af77d883efef4fee3b2041f0722d1f311f1c174c461d7c7c7a6b0f`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `3c2287fb1a19c752f5351286c773ccad9e1bef2e3d03ef95c7fd248623115b4f`
```dockerfile
ENV RUBY_VERSION=2.2.3
```
- Created: Mon, 24 Aug 2015 22:38:16 GMT
- Parent Layer: `18204466700b87b24b7eca6b44fbf71a7a8789d1a95b9da853dfbab985f52924`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `09254ebefe0fb89295c31cb36b74ef85127ed21e87d7a0c691ee7823cabf0ffb`
```dockerfile
ENV RUBYGEMS_VERSION=2.4.8
```
- Created: Mon, 24 Aug 2015 22:38:17 GMT
- Parent Layer: `3c2287fb1a19c752f5351286c773ccad9e1bef2e3d03ef95c7fd248623115b4f`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `9573825b63f008a8aee81b269c0fedfb694d930de9a600b03e53469d4685874c`
```dockerfile
RUN echo 'install: --no-document\nupdate: --no-document' >> "$HOME/.gemrc"
```
- Created: Mon, 24 Aug 2015 22:38:19 GMT
- Parent Layer: `09254ebefe0fb89295c31cb36b74ef85127ed21e87d7a0c691ee7823cabf0ffb`
- Docker Version: 1.7.1
- Virtual Size: 45.0 B
- v2 Blob: `sha256:dc5f86b37acc5f9915dc99872437cd2e2fd5d9d3e2f701f3c0b259c9d967e699`
- v2 Content-Length: 162.0 B
- v2 Last-Modified: Tue, 25 Aug 2015 03:19:21 GMT
#### `bd00463fec325edfa318965b4d292474b1315d317fe12e2afb4840165124eb35`
```dockerfile
RUN buildDeps=' \
autoconf \
bison \
gcc \
libbz2-dev \
libgdbm-dev \
libglib2.0-dev \
libncurses-dev \
libreadline-dev \
libxml2-dev \
libxslt-dev \
make \
ruby \
' \
&& set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends $buildDeps \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/ruby \
&& curl -SL "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.bz2" \
| tar -xjC /usr/src/ruby --strip-components=1 \
&& cd /usr/src/ruby \
&& autoconf \
&& ./configure --disable-install-doc \
&& make -j"$(nproc)" \
&& make install \
&& gem update --system $RUBYGEMS_VERSION \
&& rm -r /usr/src/ruby \
&& apt-get purge -y --auto-remove $buildDeps
```
- Created: Mon, 24 Aug 2015 22:44:08 GMT
- Parent Layer: `9573825b63f008a8aee81b269c0fedfb694d930de9a600b03e53469d4685874c`
- Docker Version: 1.7.1
- Virtual Size: 111.0 MB (111037759 bytes)
- v2 Blob: `sha256:9feda6914fac5a52a06edba0a5704d91007d876ac4c9bd5d26c92a0fb303f276`
- v2 Content-Length: 32.5 MB (32506887 bytes)
- v2 Last-Modified: Tue, 25 Aug 2015 03:19:17 GMT
#### `a5d28b49de754dcea0dcf48eb97ad9a02bbf59571ae32a7ab5602cf259baf43c`
```dockerfile
ENV GEM_HOME=/usr/local/bundle
```
- Created: Mon, 24 Aug 2015 22:44:10 GMT
- Parent Layer: `bd00463fec325edfa318965b4d292474b1315d317fe12e2afb4840165124eb35`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `743c29cf2dab1a1b0e9bbda35ce809014f12b74d82ee7f79ba3d49b4a6039f03`
```dockerfile
ENV PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
```
- Created: Mon, 24 Aug 2015 22:44:11 GMT
- Parent Layer: `a5d28b49de754dcea0dcf48eb97ad9a02bbf59571ae32a7ab5602cf259baf43c`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `58756bf05dac55723ef781d33bac7abf2ec4c5c7c781410e89886e3a38d2c95b`
```dockerfile
ENV BUNDLER_VERSION=1.10.6
```
- Created: Mon, 24 Aug 2015 22:44:12 GMT
- Parent Layer: `743c29cf2dab1a1b0e9bbda35ce809014f12b74d82ee7f79ba3d49b4a6039f03`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `ba9a7583be6d65a43ab1f14750b977aadf69bf6ecd5d720978ad623877042ea6`
```dockerfile
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
```
- Created: Mon, 24 Aug 2015 22:44:16 GMT
- Parent Layer: `58756bf05dac55723ef781d33bac7abf2ec4c5c7c781410e89886e3a38d2c95b`
- Docker Version: 1.7.1
- Virtual Size: 1.1 MB (1124534 bytes)
- v2 Blob: `sha256:4d0258f448812a5258a41ae85d22e3b9f23ff360c8c52918b7a5ccdd018d14e4`
- v2 Content-Length: 500.1 KB (500135 bytes)
- v2 Last-Modified: Tue, 25 Aug 2015 03:18:45 GMT
#### `1616eb4a729e54b52b9b6268fd9b77df9354b3ceb6f1e4a1dc81c9b9aa4d3011`
```dockerfile
ENV BUNDLE_APP_CONFIG=/usr/local/bundle
```
- Created: Mon, 24 Aug 2015 22:44:17 GMT
- Parent Layer: `ba9a7583be6d65a43ab1f14750b977aadf69bf6ecd5d720978ad623877042ea6`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `4519114432f55ae8eeb1ae042ea5e22386a5296b754aa95108ceab2bf82fa396`
```dockerfile
CMD ["irb"]
```
- Created: Mon, 24 Aug 2015 22:44:17 GMT
- Parent Layer: `1616eb4a729e54b52b9b6268fd9b77df9354b3ceb6f1e4a1dc81c9b9aa4d3011`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
## `ruby:slim`
- Total Virtual Size: 275.1 MB (275090124 bytes)
- Total v2 Content-Length: 98.0 MB (97978418 bytes)
### Layers (14)
#### `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
```dockerfile
ADD file:b770303e11edaa0ad0d8f43f6db4fa26673923912b5d5f7cb748ba025e6c4d3b in /
```
- Created: Thu, 20 Aug 2015 20:17:59 GMT
- Docker Version: 1.7.1
- Virtual Size: 125.2 MB (125174904 bytes)
- v2 Blob: `sha256:7ccc78f8af6db23a5013f7b90b5672b82d69dd2fb30d1e6736dba29209aceee7`
- v2 Content-Length: 51.4 MB (51368377 bytes)
- v2 Last-Modified: Thu, 20 Aug 2015 20:40:09 GMT
#### `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
```dockerfile
CMD ["/bin/bash"]
```
- Created: Thu, 20 Aug 2015 20:18:01 GMT
- Parent Layer: `2c49f83e0b13f73bf3d276c9fe26ba9aa94d2a1614e866642b95cb0245d0cdab`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `787f8f2047af77d883efef4fee3b2041f0722d1f311f1c174c461d7c7c7a6b0f`
```dockerfile
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
bzip2 \
ca-certificates \
curl \
libffi-dev \
libgdbm3 \
libssl-dev \
libyaml-dev \
procps \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
```
- Created: Mon, 24 Aug 2015 22:21:08 GMT
- Parent Layer: `4a5e6db8c0693a16de88b7559ded7c1cb804018571b137e13abb1713ce6a71cf`
- Docker Version: 1.7.1
- Virtual Size: 37.8 MB (37752882 bytes)
- v2 Blob: `sha256:7a0c5412f04c16fded90f2746384d0bbe4c221734daddf521e148d3dd591abac`
- v2 Content-Length: 13.6 MB (13602537 bytes)
- v2 Last-Modified: Thu, 27 Aug 2015 05:54:54 GMT
#### `18204466700b87b24b7eca6b44fbf71a7a8789d1a95b9da853dfbab985f52924`
```dockerfile
ENV RUBY_MAJOR=2.2
```
- Created: Mon, 24 Aug 2015 22:38:16 GMT
- Parent Layer: `787f8f2047af77d883efef4fee3b2041f0722d1f311f1c174c461d7c7c7a6b0f`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `3c2287fb1a19c752f5351286c773ccad9e1bef2e3d03ef95c7fd248623115b4f`
```dockerfile
ENV RUBY_VERSION=2.2.3
```
- Created: Mon, 24 Aug 2015 22:38:16 GMT
- Parent Layer: `18204466700b87b24b7eca6b44fbf71a7a8789d1a95b9da853dfbab985f52924`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `09254ebefe0fb89295c31cb36b74ef85127ed21e87d7a0c691ee7823cabf0ffb`
```dockerfile
ENV RUBYGEMS_VERSION=2.4.8
```
- Created: Mon, 24 Aug 2015 22:38:17 GMT
- Parent Layer: `3c2287fb1a19c752f5351286c773ccad9e1bef2e3d03ef95c7fd248623115b4f`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `9573825b63f008a8aee81b269c0fedfb694d930de9a600b03e53469d4685874c`
```dockerfile
RUN echo 'install: --no-document\nupdate: --no-document' >> "$HOME/.gemrc"
```
- Created: Mon, 24 Aug 2015 22:38:19 GMT
- Parent Layer: `09254ebefe0fb89295c31cb36b74ef85127ed21e87d7a0c691ee7823cabf0ffb`
- Docker Version: 1.7.1
- Virtual Size: 45.0 B
- v2 Blob: `sha256:dc5f86b37acc5f9915dc99872437cd2e2fd5d9d3e2f701f3c0b259c9d967e699`
- v2 Content-Length: 162.0 B
- v2 Last-Modified: Tue, 25 Aug 2015 03:19:21 GMT
#### `bd00463fec325edfa318965b4d292474b1315d317fe12e2afb4840165124eb35`
```dockerfile
RUN buildDeps=' \
autoconf \
bison \
gcc \
libbz2-dev \
libgdbm-dev \
libglib2.0-dev \
libncurses-dev \
libreadline-dev \
libxml2-dev \
libxslt-dev \
make \
ruby \
' \
&& set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends $buildDeps \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/src/ruby \
&& curl -SL "http://cache.ruby-lang.org/pub/ruby/$RUBY_MAJOR/ruby-$RUBY_VERSION.tar.bz2" \
| tar -xjC /usr/src/ruby --strip-components=1 \
&& cd /usr/src/ruby \
&& autoconf \
&& ./configure --disable-install-doc \
&& make -j"$(nproc)" \
&& make install \
&& gem update --system $RUBYGEMS_VERSION \
&& rm -r /usr/src/ruby \
&& apt-get purge -y --auto-remove $buildDeps
```
- Created: Mon, 24 Aug 2015 22:44:08 GMT
- Parent Layer: `9573825b63f008a8aee81b269c0fedfb694d930de9a600b03e53469d4685874c`
- Docker Version: 1.7.1
- Virtual Size: 111.0 MB (111037759 bytes)
- v2 Blob: `sha256:9feda6914fac5a52a06edba0a5704d91007d876ac4c9bd5d26c92a0fb303f276`
- v2 Content-Length: 32.5 MB (32506887 bytes)
- v2 Last-Modified: Tue, 25 Aug 2015 03:19:17 GMT
#### `a5d28b49de754dcea0dcf48eb97ad9a02bbf59571ae32a7ab5602cf259baf43c`
```dockerfile
ENV GEM_HOME=/usr/local/bundle
```
- Created: Mon, 24 Aug 2015 22:44:10 GMT
- Parent Layer: `bd00463fec325edfa318965b4d292474b1315d317fe12e2afb4840165124eb35`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `743c29cf2dab1a1b0e9bbda35ce809014f12b74d82ee7f79ba3d49b4a6039f03`
```dockerfile
ENV PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
```
- Created: Mon, 24 Aug 2015 22:44:11 GMT
- Parent Layer: `a5d28b49de754dcea0dcf48eb97ad9a02bbf59571ae32a7ab5602cf259baf43c`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `58756bf05dac55723ef781d33bac7abf2ec4c5c7c781410e89886e3a38d2c95b`
```dockerfile
ENV BUNDLER_VERSION=1.10.6
```
- Created: Mon, 24 Aug 2015 22:44:12 GMT
- Parent Layer: `743c29cf2dab1a1b0e9bbda35ce809014f12b74d82ee7f79ba3d49b4a6039f03`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `ba9a7583be6d65a43ab1f14750b977aadf69bf6ecd5d720978ad623877042ea6`
```dockerfile
RUN gem install bundler --version "$BUNDLER_VERSION" \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
```
- Created: Mon, 24 Aug 2015 22:44:16 GMT
- Parent Layer: `58756bf05dac55723ef781d33bac7abf2ec4c5c7c781410e89886e3a38d2c95b`
- Docker Version: 1.7.1
- Virtual Size: 1.1 MB (1124534 bytes)
- v2 Blob: `sha256:4d0258f448812a5258a41ae85d22e3b9f23ff360c8c52918b7a5ccdd018d14e4`
- v2 Content-Length: 500.1 KB (500135 bytes)
- v2 Last-Modified: Tue, 25 Aug 2015 03:18:45 GMT
#### `1616eb4a729e54b52b9b6268fd9b77df9354b3ceb6f1e4a1dc81c9b9aa4d3011`
```dockerfile
ENV BUNDLE_APP_CONFIG=/usr/local/bundle
```
- Created: Mon, 24 Aug 2015 22:44:17 GMT
- Parent Layer: `ba9a7583be6d65a43ab1f14750b977aadf69bf6ecd5d720978ad623877042ea6`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
#### `4519114432f55ae8eeb1ae042ea5e22386a5296b754aa95108ceab2bf82fa396`
```dockerfile
CMD ["irb"]
```
- Created: Mon, 24 Aug 2015 22:44:17 GMT
- Parent Layer: `1616eb4a729e54b52b9b6268fd9b77df9354b3ceb6f1e4a1dc81c9b9aa4d3011`
- Docker Version: 1.7.1
- Virtual Size: 0.0 B
- v2 Blob: `sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4`
- v2 Content-Length: 32.0 B
- v2 Last-Modified: Fri, 27 Mar 2015 17:18:47 GMT
| mattrobenolt/docs | ruby/tag-details.md | Markdown | mit | 274,905 | [
30522,
1026,
999,
1011,
1011,
2023,
5371,
2003,
7013,
3081,
1005,
1012,
23561,
1011,
2393,
2545,
1013,
9699,
1011,
6415,
1011,
4751,
1012,
20228,
1005,
1011,
1011,
1028,
1001,
22073,
1997,
1036,
10090,
1036,
1011,
1031,
1036,
10090,
1024,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="ja">
<head>
<!-- Generated by javadoc (1.8.0_242) on Fri Aug 21 11:53:10 JST 2020 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>クラス jp.cafebabe.pochi.core.config.Valueの使用 (pochi: extensible birthmark toolkit 1.0.0 API)</title>
<meta name="date" content="2020-08-21">
<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="\u30AF\u30E9\u30B9 jp.cafebabe.pochi.core.config.Value\u306E\u4F7F\u7528 (pochi: extensible birthmark toolkit 1.0.0 API)";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>ブラウザのJavaScriptが無効になっています。</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="ナビゲーション・リンクをスキップ">ナビゲーション・リンクをスキップ</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="ナビゲーション">
<li><a href="../../../../../../overview-summary.html">概要</a></li>
<li><a href="../package-summary.html">パッケージ</a></li>
<li><a href="../../../../../../jp/cafebabe/pochi/birthmarks/config/Value.html" title="jp.cafebabe.pochi.core.config内のクラス">クラス</a></li>
<li class="navBarCell1Rev">使用</li>
<li><a href="../package-tree.html">階層ツリー</a></li>
<li><a href="../../../../../../deprecated-list.html">非推奨</a></li>
<li><a href="../../../../../../index-all.html">索引</a></li>
<li><a href="../../../../../../help-doc.html">ヘルプ</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>前</li>
<li>次</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?jp/cafebabe/pochi/birthmarks/config/class-use/Value.html" target="_top">フレーム</a></li>
<li><a href="Value.html" target="_top">フレームなし</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses-noframe.html">すべてのクラス</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">
<h2 title="クラスの使用 jp.cafebabe.pochi.core.config.Value" class="title">クラスの使用<br>jp.cafebabe.pochi.birthmarks.config.Value</h2>
</div>
<div class="classUseContainer">
<ul class="blockList">
<li class="blockList">
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="表、パッケージのリストおよび説明の使用">
<caption><span><a href="../../../../../../jp/cafebabe/pochi/birthmarks/config/Value.html" title="jp.cafebabe.pochi.core.config内のクラス">Value</a>を使用しているパッケージ</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">パッケージ</th>
<th class="colLast" scope="col">説明</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="#jp.cafebabe.pochi.core.config">jp.cafebabe.pochi.core.config</a></td>
<td class="colLast"> </td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="jp.cafebabe.pochi.core.config">
<!-- -->
</a>
<h3><a href="../../../../../../jp/cafebabe/pochi/birthmarks/config/package-summary.html">jp.cafebabe.pochi.core.config</a>での<a href="../../../../../../jp/cafebabe/pochi/birthmarks/config/Value.html" title="jp.cafebabe.pochi.core.config内のクラス">Value</a>の使用</h3>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="表、サブクラスのリストおよび説明の使用">
<caption><span><a href="../../../../../../jp/cafebabe/pochi/birthmarks/config/package-summary.html">jp.cafebabe.pochi.core.config</a>での<a href="../../../../../../jp/cafebabe/pochi/birthmarks/config/Value.html" title="jp.cafebabe.pochi.core.config内のクラス">Value</a>のサブクラス</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">修飾子とタイプ</th>
<th class="colLast" scope="col">クラスと説明</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code>class </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../jp/cafebabe/pochi/birthmarks/config/ItemKey.html" title="jp.cafebabe.pochi.core.config内のクラス">ItemKey</a></span></code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>class </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../jp/cafebabe/pochi/birthmarks/config/ItemValue.html" title="jp.cafebabe.pochi.core.config内のクラス">ItemValue</a></span></code> </td>
</tr>
</tbody>
</table>
</li>
</ul>
</li>
</ul>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="ナビゲーション・リンクをスキップ">ナビゲーション・リンクをスキップ</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="ナビゲーション">
<li><a href="../../../../../../overview-summary.html">概要</a></li>
<li><a href="../package-summary.html">パッケージ</a></li>
<li><a href="../../../../../../jp/cafebabe/pochi/birthmarks/config/Value.html" title="jp.cafebabe.pochi.core.config内のクラス">クラス</a></li>
<li class="navBarCell1Rev">使用</li>
<li><a href="../package-tree.html">階層ツリー</a></li>
<li><a href="../../../../../../deprecated-list.html">非推奨</a></li>
<li><a href="../../../../../../index-all.html">索引</a></li>
<li><a href="../../../../../../help-doc.html">ヘルプ</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>前</li>
<li>次</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?jp/cafebabe/pochi/birthmarks/config/class-use/Value.html" target="_top">フレーム</a></li>
<li><a href="Value.html" target="_top">フレームなし</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses-noframe.html">すべてのクラス</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 ======= -->
<p class="legalCopy"><small>Copyright © 2020. All rights reserved.</small></p>
</body>
</html>
| tamada/pochi | v1.0.0/apidocs/jp/cafebabe/pochi/birthmarks/config/class-use/Value.html | HTML | apache-2.0 | 7,307 | [
30522,
1026,
999,
9986,
13874,
16129,
2270,
1000,
1011,
1013,
1013,
1059,
2509,
2278,
1013,
1013,
26718,
2094,
16129,
1018,
1012,
5890,
17459,
1013,
1013,
4372,
1000,
1000,
8299,
1024,
1013,
1013,
7479,
1012,
1059,
2509,
1012,
8917,
1013,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Designer of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
** contained in the Technology Preview License Agreement accompanying
** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
**
**
**
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qdesigner_formwindow.h"
#include "qdesigner_workbench.h"
#include "formwindowbase_p.h"
// sdk
#include <QtDesigner/QDesignerFormWindowInterface>
#include <QtDesigner/QDesignerFormEditorInterface>
#include <QtDesigner/QDesignerPropertySheetExtension>
#include <QtDesigner/QDesignerPropertyEditorInterface>
#include <QtDesigner/QDesignerFormWindowManagerInterface>
#include <QtDesigner/QDesignerTaskMenuExtension>
#include <QtDesigner/QExtensionManager>
#include <QtCore/QEvent>
#include <QtCore/QFile>
#include <QtGui/QAction>
#include <QtGui/QCloseEvent>
#include <QtGui/QFileDialog>
#include <QtGui/QMessageBox>
#include <QtGui/QPushButton>
#include <QtGui/QVBoxLayout>
#include <QtGui/QUndoCommand>
#include <QtGui/QWindowStateChangeEvent>
QT_BEGIN_NAMESPACE
QDesignerFormWindow::QDesignerFormWindow(QDesignerFormWindowInterface *editor, QDesignerWorkbench *workbench, QWidget *parent, Qt::WindowFlags flags)
: QWidget(parent, flags),
m_editor(editor),
m_workbench(workbench),
m_action(new QAction(this)),
m_initialized(false),
m_windowTitleInitialized(false)
{
Q_ASSERT(workbench);
setMaximumSize(0xFFF, 0xFFF);
QDesignerFormEditorInterface *core = workbench->core();
if (m_editor) {
m_editor->setParent(this);
} else {
m_editor = core->formWindowManager()->createFormWindow(this);
}
QVBoxLayout *l = new QVBoxLayout(this);
l->setMargin(0);
l->addWidget(m_editor);
m_action->setCheckable(true);
connect(m_editor->commandHistory(), SIGNAL(indexChanged(int)), this, SLOT(updateChanged()));
connect(m_editor, SIGNAL(geometryChanged()), this, SLOT(geometryChanged()));
qdesigner_internal::FormWindowBase::setupDefaultAction(m_editor);
}
QDesignerFormWindow::~QDesignerFormWindow()
{
if (workbench())
workbench()->removeFormWindow(this);
}
QAction *QDesignerFormWindow::action() const
{
return m_action;
}
void QDesignerFormWindow::changeEvent(QEvent *e)
{
switch (e->type()) {
case QEvent::WindowTitleChange:
m_action->setText(windowTitle().remove(QLatin1String("[*]")));
break;
case QEvent::WindowIconChange:
m_action->setIcon(windowIcon());
break;
case QEvent::WindowStateChange: {
const QWindowStateChangeEvent *wsce = static_cast<const QWindowStateChangeEvent *>(e);
const bool wasMinimized = Qt::WindowMinimized & wsce->oldState();
const bool isMinimizedNow = isMinimized();
if (wasMinimized != isMinimizedNow )
emit minimizationStateChanged(m_editor, isMinimizedNow);
}
break;
default:
break;
}
QWidget::changeEvent(e);
}
QRect QDesignerFormWindow::geometryHint() const
{
const QPoint point(0, 0);
// If we have a container, we want to be just as big.
// QMdiSubWindow attempts to resize its children to sizeHint() when switching user interface modes.
if (QWidget *mainContainer = m_editor->mainContainer())
return QRect(point, mainContainer->size());
return QRect(point, sizeHint());
}
QDesignerFormWindowInterface *QDesignerFormWindow::editor() const
{
return m_editor;
}
QDesignerWorkbench *QDesignerFormWindow::workbench() const
{
return m_workbench;
}
void QDesignerFormWindow::firstShow()
{
// Set up handling of file name changes and set initial title.
if (!m_windowTitleInitialized) {
m_windowTitleInitialized = true;
if (m_editor) {
connect(m_editor, SIGNAL(fileNameChanged(QString)), this, SLOT(updateWindowTitle(QString)));
updateWindowTitle(m_editor->fileName());
}
}
show();
}
int QDesignerFormWindow::getNumberOfUntitledWindows() const
{
const int totalWindows = m_workbench->formWindowCount();
if (!totalWindows)
return 0;
int maxUntitled = 0;
// Find the number of untitled windows excluding ourselves.
// Do not fall for 'untitled.ui', match with modified place holder.
// This will cause some problems with i18n, but for now I need the string to be "static"
QRegExp rx(QLatin1String("untitled( (\\d+))?\\[\\*\\]"));
for (int i = 0; i < totalWindows; ++i) {
QDesignerFormWindow *fw = m_workbench->formWindow(i);
if (fw != this) {
const QString title = m_workbench->formWindow(i)->windowTitle();
if (rx.indexIn(title) != -1) {
if (maxUntitled == 0)
++maxUntitled;
if (rx.captureCount() > 1) {
const QString numberCapture = rx.cap(2);
if (!numberCapture.isEmpty())
maxUntitled = qMax(numberCapture.toInt(), maxUntitled);
}
}
}
}
return maxUntitled;
}
void QDesignerFormWindow::updateWindowTitle(const QString &fileName)
{
if (!m_windowTitleInitialized) {
m_windowTitleInitialized = true;
if (m_editor)
connect(m_editor, SIGNAL(fileNameChanged(QString)), this, SLOT(updateWindowTitle(QString)));
}
QString fileNameTitle;
if (fileName.isEmpty()) {
fileNameTitle = QLatin1String("untitled");
if (const int maxUntitled = getNumberOfUntitledWindows()) {
fileNameTitle += QLatin1Char(' ');
fileNameTitle += QString::number(maxUntitled + 1);
}
} else {
fileNameTitle = QFileInfo(fileName).fileName();
}
if (const QWidget *mc = m_editor->mainContainer()) {
setWindowIcon(mc->windowIcon());
setWindowTitle(tr("%1 - %2[*]").arg(mc->windowTitle()).arg(fileNameTitle));
} else {
setWindowTitle(fileNameTitle);
}
}
void QDesignerFormWindow::closeEvent(QCloseEvent *ev)
{
if (m_editor->isDirty()) {
raise();
QMessageBox box(QMessageBox::Information, tr("Save Form?"),
tr("Do you want to save the changes to this document before closing?"),
QMessageBox::Discard | QMessageBox::Cancel | QMessageBox::Save, m_editor);
box.setInformativeText(tr("If you don't save, your changes will be lost."));
box.setWindowModality(Qt::WindowModal);
static_cast<QPushButton *>(box.button(QMessageBox::Save))->setDefault(true);
switch (box.exec()) {
case QMessageBox::Save: {
bool ok = workbench()->saveForm(m_editor);
ev->setAccepted(ok);
m_editor->setDirty(!ok);
break;
}
case QMessageBox::Discard:
m_editor->setDirty(false); // Not really necessary, but stops problems if we get close again.
ev->accept();
break;
case QMessageBox::Cancel:
ev->ignore();
break;
}
}
}
void QDesignerFormWindow::updateChanged()
{
// Sometimes called after form window destruction.
if (m_editor) {
setWindowModified(m_editor->isDirty());
updateWindowTitle(m_editor->fileName());
}
}
void QDesignerFormWindow::resizeEvent(QResizeEvent *rev)
{
if(m_initialized) {
m_editor->setDirty(true);
setWindowModified(true);
}
m_initialized = true;
QWidget::resizeEvent(rev);
}
void QDesignerFormWindow::geometryChanged()
{
// If the form window changes, re-update the geometry of the current widget in the property editor.
// Note that in the case of layouts, non-maincontainer widgets must also be updated,
// so, do not do it for the main container only
const QDesignerFormEditorInterface *core = m_editor->core();
QObject *object = core->propertyEditor()->object();
if (object == 0 || !object->isWidgetType())
return;
static const QString geometryProperty = QLatin1String("geometry");
const QDesignerPropertySheetExtension *sheet = qt_extension<QDesignerPropertySheetExtension*>(core->extensionManager(), object);
const int geometryIndex = sheet->indexOf(geometryProperty);
if (geometryIndex == -1)
return;
core->propertyEditor()->setPropertyValue(geometryProperty, sheet->property(geometryIndex));
}
QT_END_NAMESPACE
| igor-sfdc/qt-wk | tools/designer/src/designer/qdesigner_formwindow.cpp | C++ | lgpl-2.1 | 9,680 | [
30522,
1013,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
30524,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
10... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="lang:clipboard.copy" content="Copy to clipboard">
<meta name="lang:clipboard.copied" content="Copied to clipboard">
<meta name="lang:search.language" content="en">
<meta name="lang:search.pipeline.stopwords" content="True">
<meta name="lang:search.pipeline.trimmer" content="True">
<meta name="lang:search.result.none" content="No matching documents">
<meta name="lang:search.result.one" content="1 matching document">
<meta name="lang:search.result.other" content="# matching documents">
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link href="https://fonts.gstatic.com/" rel="preconnect" crossorigin>
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,500,700|Roboto:300,400,400i,700&display=fallback" rel="stylesheet">
<style>
body,
input {
font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif
}
code,
kbd,
pre {
font-family: "Roboto Mono", "Courier New", Courier, monospace
}
</style>
<link rel="stylesheet" href="../_static/stylesheets/application.css"/>
<link rel="stylesheet" href="../_static/stylesheets/application-palette.css"/>
<link rel="stylesheet" href="../_static/stylesheets/application-fixes.css"/>
<link rel="stylesheet" href="../_static/fonts/material-icons.css"/>
<meta name="theme-color" content="#3f51b5">
<script src="../_static/javascripts/modernizr.js"></script>
<title>Release 0.11.1 — statsmodels</title>
<link rel="icon" type="image/png" sizes="32x32" href="../_static/icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="../_static/icons/favicon-16x16.png">
<link rel="manifest" href="../_static/icons/site.webmanifest">
<link rel="mask-icon" href="../_static/icons/safari-pinned-tab.svg" color="#919191">
<meta name="msapplication-TileColor" content="#2b5797">
<meta name="msapplication-config" content="../_static/icons/browserconfig.xml">
<link rel="stylesheet" href="../_static/stylesheets/examples.css">
<link rel="stylesheet" href="../_static/stylesheets/deprecation.css">
<link rel="stylesheet" href="../_static/material.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
<script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<link rel="author" title="About these documents" href="../about.html" />
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Release 0.11.0" href="version0.11.html" />
<link rel="prev" title="Release 0.12.0" href="version0.12.html" />
</head>
<body dir=ltr
data-md-color-primary=indigo data-md-color-accent=blue>
<svg class="md-svg">
<defs data-children-count="0">
<svg xmlns="http://www.w3.org/2000/svg" width="416" height="448" viewBox="0 0 416 448" id="__github"><path fill="currentColor" d="M160 304q0 10-3.125 20.5t-10.75 19T128 352t-18.125-8.5-10.75-19T96 304t3.125-20.5 10.75-19T128 256t18.125 8.5 10.75 19T160 304zm160 0q0 10-3.125 20.5t-10.75 19T288 352t-18.125-8.5-10.75-19T256 304t3.125-20.5 10.75-19T288 256t18.125 8.5 10.75 19T320 304zm40 0q0-30-17.25-51T296 232q-10.25 0-48.75 5.25Q229.5 240 208 240t-39.25-2.75Q130.75 232 120 232q-29.5 0-46.75 21T56 304q0 22 8 38.375t20.25 25.75 30.5 15 35 7.375 37.25 1.75h42q20.5 0 37.25-1.75t35-7.375 30.5-15 20.25-25.75T360 304zm56-44q0 51.75-15.25 82.75-9.5 19.25-26.375 33.25t-35.25 21.5-42.5 11.875-42.875 5.5T212 416q-19.5 0-35.5-.75t-36.875-3.125-38.125-7.5-34.25-12.875T37 371.5t-21.5-28.75Q0 312 0 260q0-59.25 34-99-6.75-20.5-6.75-42.5 0-29 12.75-54.5 27 0 47.5 9.875t47.25 30.875Q171.5 96 212 96q37 0 70 8 26.25-20.5 46.75-30.25T376 64q12.75 25.5 12.75 54.5 0 21.75-6.75 42 34 40 34 99.5z"/></svg>
</defs>
</svg>
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search">
<label class="md-overlay" data-md-component="overlay" for="__drawer"></label>
<a href="#release/version0.11.1" tabindex="1" class="md-skip"> Skip to content </a>
<header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid">
<div class="md-flex navheader">
<div class="md-flex__cell md-flex__cell--shrink">
<a href="../index.html" title="statsmodels"
class="md-header-nav__button md-logo">
<img src="../_static/statsmodels-logo-v2-bw.svg" height="26"
alt="statsmodels logo">
</a>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label>
</div>
<div class="md-flex__cell md-flex__cell--stretch">
<div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
<span class="md-header-nav__topic">statsmodels v0.12.0</span>
<span class="md-header-nav__topic"> Release 0.11.1 </span>
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--search md-header-nav__button" for="__search"></label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" action="../search.html" method="GET" name="search">
<input type="text" class="md-search__input" name="q" placeholder="Search"
autocapitalize="off" autocomplete="off" spellcheck="false"
data-md-component="query" data-md-state="active">
<label class="md-icon md-search__icon" for="__search"></label>
<button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1">

</button>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" data-md-scrollfix>
<div class="md-search-result" data-md-component="result">
<div class="md-search-result__meta">
Type to start searching
</div>
<ol class="md-search-result__list"></ol>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<div class="md-header-nav__source">
<a href="https://github.com/statsmodels/statsmodels" title="Go to repository" class="md-source" data-md-source="github">
<div class="md-source__icon">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24" width="28" height="28">
<use xlink:href="#__github" width="24" height="24"></use>
</svg>
</div>
<div class="md-source__repository">
statsmodels
</div>
</a>
</div>
</div>
<script src="../_static/javascripts/version_dropdown.js"></script>
<script>
var json_loc = "../_static/versions.json",
target_loc = "../../",
text = "Versions";
$( document ).ready( add_version_dropdown(json_loc, target_loc, text));
</script>
</div>
</nav>
</header>
<div class="md-container">
<nav class="md-tabs" data-md-component="tabs">
<div class="md-tabs__inner md-grid">
<ul class="md-tabs__list">
<li class="md-tabs__item"><a href="index.html" class="md-tabs__link">Release Notes</a></li>
</ul>
</div>
</nav>
<main class="md-main">
<div class="md-main__inner md-grid" data-md-component="container">
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" data-md-level="0">
<label class="md-nav__title md-nav__title--site" for="__drawer">
<a href="../index.html" title="statsmodels" class="md-nav__button md-logo">
<img src="../_static/statsmodels-logo-v2-bw.svg" alt=" logo" width="48" height="48">
</a>
<a href="../index.html"
title="statsmodels">statsmodels v0.12.0</a>
</label>
<div class="md-nav__source">
<a href="https://github.com/statsmodels/statsmodels" title="Go to repository" class="md-source" data-md-source="github">
<div class="md-source__icon">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24" width="28" height="28">
<use xlink:href="#__github" width="24" height="24"></use>
</svg>
</div>
<div class="md-source__repository">
statsmodels
</div>
</a>
</div>
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="../install.html" class="md-nav__link">Installing statsmodels</a>
</li>
<li class="md-nav__item">
<a href="../gettingstarted.html" class="md-nav__link">Getting started</a>
</li>
<li class="md-nav__item">
<a href="../user-guide.html" class="md-nav__link">User Guide</a>
</li>
<li class="md-nav__item">
<a href="../examples/index.html" class="md-nav__link">Examples</a>
</li>
<li class="md-nav__item">
<a href="../api.html" class="md-nav__link">API Reference</a>
</li>
<li class="md-nav__item">
<a href="../about.html" class="md-nav__link">About statsmodels</a>
</li>
<li class="md-nav__item">
<a href="../dev/index.html" class="md-nav__link">Developer Page</a>
</li>
<li class="md-nav__item">
<a href="index.html" class="md-nav__link">Release Notes</a>
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="version0.12.html" class="md-nav__link">Release 0.12.0</a>
</li>
<li class="md-nav__item">
<input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="__toc">
<label class="md-nav__link md-nav__link--active" for="__toc"> Release 0.11.1 </label>
<a href="#" class="md-nav__link md-nav__link--active">Release 0.11.1</a>
<nav class="md-nav md-nav--secondary">
<label class="md-nav__title" for="__toc">Contents</label>
<ul class="md-nav__list" data-md-scrollfix="">
<li class="md-nav__item"><a href="#release-version0-11-1--page-root" class="md-nav__link">Release 0.11.1</a><nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item"><a href="#release-summary" class="md-nav__link">Release summary</a>
</li>
<li class="md-nav__item"><a href="#development-summary-and-credits" class="md-nav__link">Development summary and credits</a><nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item"><a href="#merged-pull-requests" class="md-nav__link">Merged Pull Requests</a>
</li></ul>
</nav>
</li></ul>
</nav>
</li>
<li class="md-nav__item"><a class="md-nav__extra_link" href="../_sources/release/version0.11.1.rst.txt">Show Source</a> </li>
</ul>
</nav>
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#release-summary" class="md-nav__link">Release summary</a>
</li>
<li class="md-nav__item">
<a href="#development-summary-and-credits" class="md-nav__link">Development summary and credits</a>
</li></ul>
</li>
<li class="md-nav__item">
<a href="version0.11.html" class="md-nav__link">Release 0.11.0</a>
</li>
<li class="md-nav__item">
<a href="version0.10.2.html" class="md-nav__link">Release 0.10.2</a>
</li>
<li class="md-nav__item">
<a href="version0.10.1.html" class="md-nav__link">Release 0.10.1</a>
</li>
<li class="md-nav__item">
<a href="version0.10.html" class="md-nav__link">Release 0.10.0</a>
</li>
<li class="md-nav__item">
<a href="version0.9.html" class="md-nav__link">Release 0.9.0</a>
</li>
<li class="md-nav__item">
<a href="version0.8.html" class="md-nav__link">Release 0.8.0</a>
</li>
<li class="md-nav__item">
<a href="version0.7.html" class="md-nav__link">Release 0.7.0</a>
</li>
<li class="md-nav__item">
<a href="version0.6.html" class="md-nav__link">Release 0.6.1</a>
</li>
<li class="md-nav__item">
<a href="version0.6.html#release-0-6-0" class="md-nav__link">Release 0.6.0</a>
</li>
<li class="md-nav__item">
<a href="version0.5.html" class="md-nav__link">Release 0.5.0</a>
</li></ul>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary">
<label class="md-nav__title" for="__toc">Contents</label>
<ul class="md-nav__list" data-md-scrollfix="">
<li class="md-nav__item"><a href="#release-version0-11-1--page-root" class="md-nav__link">Release 0.11.1</a><nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item"><a href="#release-summary" class="md-nav__link">Release summary</a>
</li>
<li class="md-nav__item"><a href="#development-summary-and-credits" class="md-nav__link">Development summary and credits</a><nav class="md-nav">
<ul class="md-nav__list">
<li class="md-nav__item"><a href="#merged-pull-requests" class="md-nav__link">Merged Pull Requests</a>
</li></ul>
</nav>
</li></ul>
</nav>
</li>
<li class="md-nav__item"><a class="md-nav__extra_link" href="../_sources/release/version0.11.1.rst.txt">Show Source</a> </li>
<li id="searchbox" class="md-nav__item"></li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content">
<article class="md-content__inner md-typeset" role="main">
<h1 id="release-version0-11-1--page-root">Release 0.11.1<a class="headerlink" href="#release-version0-11-1--page-root" title="Permalink to this headline">¶</a></h1>
<h2 id="release-summary">Release summary<a class="headerlink" href="#release-summary" title="Permalink to this headline">¶</a></h2>
<p>This is a bug release.</p>
<h2 id="development-summary-and-credits">Development summary and credits<a class="headerlink" href="#development-summary-and-credits" title="Permalink to this headline">¶</a></h2>
<p>Besides receiving contributions for new and improved features and for bugfixes,
important contributions to general maintenance for this release came from</p>
<ul class="simple">
<li><p>Kerby Shedden</p></li>
<li><p>Josef Perktold</p></li>
<li><p>Alex Lyttle</p></li>
<li><p>Chad Fulton</p></li>
<li><p>Kevin Sheppard</p></li>
<li><p>Wouter De Coster</p></li>
</ul>
<h3 id="merged-pull-requests">Merged Pull Requests<a class="headerlink" href="#merged-pull-requests" title="Permalink to this headline">¶</a></h3>
<p>The following Pull Requests were merged since the last release:</p>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/statsmodels/statsmodels/pull/6433">PR #6433</a>: TST/BUG: use reset_randomstate</p></li>
<li><p><a class="reference external" href="https://github.com/statsmodels/statsmodels/pull/6438">PR #6438</a>: BUG: Change default optimizer for glm/ridge and make it user-settable</p></li>
<li><p><a class="reference external" href="https://github.com/statsmodels/statsmodels/pull/6453">PR #6453</a>: DOC: Fix the version that appears in the documentation</p></li>
<li><p><a class="reference external" href="https://github.com/statsmodels/statsmodels/pull/6456">PR #6456</a>: DOC: Send log to dev/null/</p></li>
<li><p><a class="reference external" href="https://github.com/statsmodels/statsmodels/pull/6461">PR #6461</a>: MAINT: correcting typo</p></li>
<li><p><a class="reference external" href="https://github.com/statsmodels/statsmodels/pull/6465">PR #6465</a>: MAINT: Avoid noise in f-pvalue</p></li>
<li><p><a class="reference external" href="https://github.com/statsmodels/statsmodels/pull/6469">PR #6469</a>: MAINT: Fix future warnings</p></li>
<li><p><a class="reference external" href="https://github.com/statsmodels/statsmodels/pull/6470">PR #6470</a>: BUG: fix tukey-hsd for 1 pvalue</p></li>
<li><p><a class="reference external" href="https://github.com/statsmodels/statsmodels/pull/6471">PR #6471</a>: MAINT: Fix issue with ragged array</p></li>
<li><p><a class="reference external" href="https://github.com/statsmodels/statsmodels/pull/6474">PR #6474</a>: BLD: Use pip on Azure</p></li>
<li><p><a class="reference external" href="https://github.com/statsmodels/statsmodels/pull/6515">PR #6515</a>: BUG: fix #6511</p></li>
<li><p><a class="reference external" href="https://github.com/statsmodels/statsmodels/pull/6520">PR #6520</a>: BUG: fix GAM for 1-dim exog_linear</p></li>
<li><p><a class="reference external" href="https://github.com/statsmodels/statsmodels/pull/6534">PR #6534</a>: MAINT: Relax tolerance on test that occasionally fails</p></li>
<li><p><a class="reference external" href="https://github.com/statsmodels/statsmodels/pull/6535">PR #6535</a>: MAINT: Restrict to Python 3.5+</p></li>
</ul>
</article>
</div>
</div>
</main>
</div>
<footer class="md-footer">
<div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid">
<a href="version0.12.html" title="Release 0.12.0"
class="md-flex md-footer-nav__link md-footer-nav__link--prev"
rel="prev">
<div class="md-flex__cell md-flex__cell--shrink">
<i class="md-icon md-icon--arrow-back md-footer-nav__button"></i>
</div>
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
<span
class="md-footer-nav__direction"> Previous </span> Release 0.12.0 </span>
</div>
</a>
<a href="version0.11.html" title="Release 0.11.0"
class="md-flex md-footer-nav__link md-footer-nav__link--next"
rel="next">
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title"><span
class="md-flex__ellipsis"> <span
class="md-footer-nav__direction"> Next </span> Release 0.11.0 </span>
</div>
<div class="md-flex__cell md-flex__cell--shrink"><i
class="md-icon md-icon--arrow-forward md-footer-nav__button"></i>
</div>
</a>
</nav>
</div>
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-footer-copyright">
<div class="md-footer-copyright__highlight">
© Copyright 2009-2019, Josef Perktold, Skipper Seabold, Jonathan Taylor, statsmodels-developers.
</div>
Last updated on
Aug 27, 2020.
<br/>
Created using
<a href="http://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
and
<a href="https://github.com/bashtage/sphinx-material/">Material for
Sphinx</a>
</div>
</div>
</div>
</footer>
<script src="../_static/javascripts/application.js"></script>
<script>app.initialize({version: "1.0.4", url: {base: ".."}})</script>
</body>
</html> | statsmodels/statsmodels.github.io | v0.12.0/release/version0.11.1.html | HTML | bsd-3-clause | 21,439 | [
30522,
1026,
999,
9986,
13874,
16129,
1028,
1026,
16129,
11374,
1027,
1000,
4372,
1000,
1028,
1026,
2132,
1028,
1026,
18804,
25869,
13462,
1027,
1000,
21183,
30524,
1000,
4180,
1027,
1000,
9381,
1027,
5080,
1011,
9381,
1010,
3988,
1011,
409... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
.updatePage{
margin-left: 300px;
}
.top-buffer{
margin-top: 40px;
}
.heavy-top-buffer{
margin-top: 100px;
} | sw8a/ISE_8a | modules/auxthera/client/css/Updates.css | CSS | mit | 114 | [
30522,
1012,
10651,
13704,
1063,
7785,
1011,
2187,
1024,
3998,
2361,
2595,
1025,
1065,
1012,
2327,
1011,
17698,
1063,
7785,
1011,
2327,
1024,
2871,
2361,
2595,
1025,
1065,
1012,
3082,
1011,
2327,
1011,
17698,
1063,
7785,
1011,
2327,
1024,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
# ember-promise-block
This is an Ember Addon that exposes a component `promise-block` which shows a loader while a given promise is being resolved.
## Installing
Install as an Ember-CLI addon:
ember install ember-promise-block
## Usage
// templates/posts.hbs
{{#promise-block promise=postsPromise loaderTemplate='helpers/loader'}}
{{#each posts as |post|}}
{{post.title}}
{{/each}}
{{/promise-block}}
The component will show the partial in `loaderTemplate` while `promise` is not resolved. It then shows the block when it resolves. The default value for `loaderTemplate` is `helpers/loader`.
Example controller:
// controllers/posts.js
import Ember from 'ember';
export default Ember.Controller.extend({
postsPromise: function() {
return this.get('store').query('post');
}.property(),
posts: Ember.computed.reads('postsPromise.content')
});
Example model:
// models/post.js
import DS from 'ember-data';
export default DS.Model.extend({
title: DS.attr('string')
});
## Example
Below is a (fast) example of what the addon does. The loader is displayed until the data is loaded, i.e. the Promise gets resolved.

## Building yourself
* `git clone` this repository
* `npm install`
* `bower install`
## Running Tests
* `npm test` (Runs `ember try:testall` to test your addon against multiple Ember versions)
* `ember test`
* `ember test --server`
| Hstry/ember-promise-block | README.md | Markdown | mit | 1,597 | [
30522,
1001,
7861,
5677,
1011,
4872,
1011,
3796,
2023,
2003,
2019,
7861,
5677,
5587,
2239,
2008,
14451,
2015,
1037,
6922,
1036,
4872,
1011,
3796,
1036,
2029,
3065,
1037,
7170,
2121,
2096,
1037,
2445,
4872,
2003,
2108,
10395,
1012,
1001,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* pubsub2storage: service which transfers between pubsub and storage
*
* Copyright (C) 1998 - 2020. Dinand Vanvelzen
*
* 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.
*/
/*-------------------------------------------------------------------------//
// //
// INCLUDES //
// //
//-------------------------------------------------------------------------*/
#include <string.h>
#ifndef GUCEF_CORE_DVOSWRAP_H
#include "DVOSWRAP.h"
#define GUCEF_CORE_DVOSWRAP_H
#endif /* GUCEF_CORE_DVOSWRAP_H */
#ifndef GUCEF_CORE_CTASKMANAGER_H
#include "gucefCORE_CTaskManager.h"
#define GUCEF_CORE_CTASKMANAGER_H
#endif /* GUCEF_CORE_CTASKMANAGER_H */
#ifndef GUCEF_COMCORE_CCOMCOREGLOBAL_H
#include "gucefCOMCORE_CComCoreGlobal.h"
#define GUCEF_COMCORE_CCOMCOREGLOBAL_H
#endif /* GUCEF_COMCORE_CCOMCOREGLOBAL_H ? */
#ifndef GUCEF_COMCORE_CBASICPUBSUBMSG_H
#include "gucefCOMCORE_CBasicPubSubMsg.h"
#define GUCEF_COMCORE_CBASICPUBSUBMSG_H
#endif /* GUCEF_COMCORE_CBASICPUBSUBMSG_H ? */
#ifndef GUCEF_WEB_CDUMMYHTTPSERVERRESOURCE_H
#include "gucefWEB_CDummyHTTPServerResource.h"
#define GUCEF_WEB_CDUMMYHTTPSERVERRESOURCE_H
#endif /* GUCEF_WEB_CDUMMYHTTPSERVERRESOURCE_H ? */
#ifndef GUCEF_VFS_CVFSGLOBAL_H
#include "gucefVFS_CVfsGlobal.h"
#define GUCEF_VFS_CVFSGLOBAL_H
#endif /* GUCEF_VFS_CVFSGLOBAL_H ? */
#ifndef GUCEF_VFS_CVFS_H
#include "gucefVFS_CVFS.h"
#define GUCEF_VFS_CVFS_H
#endif /* GUCEF_VFS_CVFS_H ? */
#include "pubsub2storage.h"
#if ( GUCEF_PLATFORM == GUCEF_PLATFORM_MSWIN )
#include <winsock2.h>
#endif
#ifndef GUCEF_CORE_METRICSMACROS_H
#include "gucefCORE_MetricsMacros.h"
#define GUCEF_CORE_METRICSMACROS_H
#endif /* GUCEF_CORE_METRICSMACROS_H ? */
/*-------------------------------------------------------------------------//
// //
// GLOBAL VARS //
// //
//-------------------------------------------------------------------------*/
#define GUCEF_DEFAULT_TICKET_REFILLS_ON_BUSY_CYCLE 10000
#define GUCEF_DEFAULT_PUBSUB_RECONNECT_DELAY_IN_MS 100
#define GUCEF_DEFAULT_MINIMAL_PUBSUB_BLOCK_STORAGE_SIZE_IN_BYTES (1024*1024*50)// 50MB
#define GUCEF_DEFAULT_MAXIMAL_PUBSUB_BLOCK_STORE_GROW_DELAY_IN_MS (1000*60*5) // 5mins
#define GUCEF_DEFAULT_DECODE_GROWTH_RATIO_EXPECTATION 6.0f
/*-------------------------------------------------------------------------//
// //
// IMPLEMENTATION //
// //
//-------------------------------------------------------------------------*/
ChannelSettings::ChannelSettings( void )
: CORE::CIConfigurable()
, pubsubClientConfig()
, pubsubBinarySerializerOptions()
, desiredMinimalSerializedBlockSize( GUCEF_DEFAULT_MINIMAL_PUBSUB_BLOCK_STORAGE_SIZE_IN_BYTES )
, desiredMaxTimeToWaitToGrowSerializedBlockSizeInMs( GUCEF_DEFAULT_MAXIMAL_PUBSUB_BLOCK_STORE_GROW_DELAY_IN_MS )
, vfsStorageRootPath()
, vfsFileExtention()
, encodeCodecFamily()
, encodeCodecName()
, decodeCodecFamily()
, decodeCodecName()
, channelId( -1 )
, ticketRefillOnBusyCycle( GUCEF_DEFAULT_TICKET_REFILLS_ON_BUSY_CYCLE )
, performPubSubInDedicatedThread( true )
, applyThreadCpuAffinity( false )
, cpuAffinityForDedicatedPubSubThread( 0 )
, cpuAffinityForMainChannelThread( 0 )
, collectMetrics( true )
, mode( CHANNELMODE_PUBSUB_TO_STORAGE )
, subscribeWithoutBookmarkIfNoneIsPersisted( true )
, autoPushAfterStartupIfStorageToPubSub( true )
, youngestStoragePubSubMsgFileToLoad( CORE::CDateTime::FutureMax )
, oldestStoragePubSubMsgFileToLoad( CORE::CDateTime::PastMax )
{GUCEF_TRACE;
}
/*-------------------------------------------------------------------------*/
ChannelSettings::ChannelSettings( const ChannelSettings& src )
: pubsubClientConfig( src.pubsubClientConfig )
, pubsubBinarySerializerOptions( src.pubsubBinarySerializerOptions )
, desiredMinimalSerializedBlockSize( src.desiredMinimalSerializedBlockSize )
, desiredMaxTimeToWaitToGrowSerializedBlockSizeInMs( src.desiredMaxTimeToWaitToGrowSerializedBlockSizeInMs )
, vfsStorageRootPath( src.vfsStorageRootPath )
, vfsFileExtention( src.vfsFileExtention )
, encodeCodecFamily( src.encodeCodecFamily )
, encodeCodecName( src.encodeCodecName )
, decodeCodecFamily( src.decodeCodecFamily )
, decodeCodecName( src.decodeCodecName )
, channelId( src.channelId )
, ticketRefillOnBusyCycle( src.ticketRefillOnBusyCycle )
, performPubSubInDedicatedThread( src.performPubSubInDedicatedThread )
, applyThreadCpuAffinity( src.applyThreadCpuAffinity )
, cpuAffinityForDedicatedPubSubThread( src.cpuAffinityForDedicatedPubSubThread )
, cpuAffinityForMainChannelThread( src.cpuAffinityForMainChannelThread )
, collectMetrics( src.collectMetrics )
, mode( src.mode )
, subscribeWithoutBookmarkIfNoneIsPersisted( src.subscribeWithoutBookmarkIfNoneIsPersisted )
, autoPushAfterStartupIfStorageToPubSub( src.autoPushAfterStartupIfStorageToPubSub )
, youngestStoragePubSubMsgFileToLoad( src.youngestStoragePubSubMsgFileToLoad )
, oldestStoragePubSubMsgFileToLoad( src.oldestStoragePubSubMsgFileToLoad )
{GUCEF_TRACE;
}
/*-------------------------------------------------------------------------*/
ChannelSettings&
ChannelSettings::operator=( const ChannelSettings& src )
{GUCEF_TRACE;
if ( this != &src )
{
pubsubClientConfig = src.pubsubClientConfig;
pubsubBinarySerializerOptions = src.pubsubBinarySerializerOptions;
desiredMinimalSerializedBlockSize = src.desiredMinimalSerializedBlockSize;
desiredMaxTimeToWaitToGrowSerializedBlockSizeInMs = src.desiredMaxTimeToWaitToGrowSerializedBlockSizeInMs;
vfsStorageRootPath = src.vfsStorageRootPath;
vfsFileExtention = src.vfsFileExtention;
encodeCodecFamily = src.encodeCodecFamily;
encodeCodecName = src.encodeCodecName;
decodeCodecFamily = src.decodeCodecFamily;
decodeCodecName = src.decodeCodecName;
channelId = src.channelId;
ticketRefillOnBusyCycle = src.ticketRefillOnBusyCycle;
performPubSubInDedicatedThread = src.performPubSubInDedicatedThread;
applyThreadCpuAffinity = src.applyThreadCpuAffinity;
cpuAffinityForDedicatedPubSubThread = src.cpuAffinityForDedicatedPubSubThread;
cpuAffinityForMainChannelThread = src.cpuAffinityForMainChannelThread;
collectMetrics = src.collectMetrics;
mode = src.mode;
subscribeWithoutBookmarkIfNoneIsPersisted = src.subscribeWithoutBookmarkIfNoneIsPersisted;
autoPushAfterStartupIfStorageToPubSub = src.autoPushAfterStartupIfStorageToPubSub;
youngestStoragePubSubMsgFileToLoad = src.youngestStoragePubSubMsgFileToLoad;
oldestStoragePubSubMsgFileToLoad = src.oldestStoragePubSubMsgFileToLoad;
}
return *this;
}
/*-------------------------------------------------------------------------*/
bool
ChannelSettings::SaveConfig( CORE::CDataNode& tree ) const
{GUCEF_TRACE;
tree.SetAttribute( "desiredMinimalSerializedBlockSize", desiredMinimalSerializedBlockSize );
tree.SetAttribute( "desiredMaxTimeToWaitToGrowSerializedBlockSizeInMs", desiredMaxTimeToWaitToGrowSerializedBlockSizeInMs );
tree.SetAttribute( "vfsStorageRootPath", vfsStorageRootPath );
tree.SetAttribute( "vfsFileExtention", vfsFileExtention );
tree.SetAttribute( "encodeCodecFamily", encodeCodecFamily );
tree.SetAttribute( "encodeCodecName", encodeCodecName );
tree.SetAttribute( "decodeCodecFamily", decodeCodecFamily );
tree.SetAttribute( "decodeCodecName", decodeCodecName );
tree.SetAttribute( "channelId", channelId );
tree.SetAttribute( "ticketRefillOnBusyCycle", ticketRefillOnBusyCycle );
tree.SetAttribute( "performPubSubInDedicatedThread", performPubSubInDedicatedThread );
tree.SetAttribute( "applyThreadCpuAffinity", applyThreadCpuAffinity );
tree.SetAttribute( "cpuAffinityForDedicatedPubSubThread", cpuAffinityForDedicatedPubSubThread );
tree.SetAttribute( "cpuAffinityForMainChannelThread", cpuAffinityForMainChannelThread );
tree.SetAttribute( "collectMetrics", collectMetrics );
tree.SetAttribute( "mode", mode );
tree.SetAttribute( "subscribeWithoutBookmarkIfNoneIsPersisted", subscribeWithoutBookmarkIfNoneIsPersisted );
tree.SetAttribute( "autoPushAfterStartupIfStorageToPubSub", autoPushAfterStartupIfStorageToPubSub );
tree.SetAttribute( "youngestStoragePubSubMsgFileToLoad", youngestStoragePubSubMsgFileToLoad.ToIso8601DateTimeString( true, true ) );
tree.SetAttribute( "oldestStoragePubSubMsgFileToLoad", oldestStoragePubSubMsgFileToLoad.ToIso8601DateTimeString( true, true ) );
CORE::CDataNode* psClientConfig = tree.Structure( "PubSubClientConfig", '/' );
if ( !pubsubClientConfig.SaveConfig( *psClientConfig ) )
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_NORMAL, "ChannelSettings:SaveConfig: config is malformed, failed to save a mandatory PubSubClientConfig section" );
return false;
}
return true;
}
/*-------------------------------------------------------------------------*/
bool
ChannelSettings::LoadConfig( const CORE::CDataNode& tree )
{GUCEF_TRACE;
const CORE::CDataNode* psClientConfig = tree.Find( "PubSubClientConfig" );
if ( GUCEF_NULL != psClientConfig )
{
if ( !pubsubClientConfig.LoadConfig( *psClientConfig ) )
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_NORMAL, "ChannelSettings:LoadConfig: config is unacceptable, failed to load mandatory PubSubClientConfig section" );
return false;
}
// There is no sane default of pubsubClientType since it depends on the clients loaded into the application
// as such this is a mandatory setting to provide
if ( pubsubClientConfig.pubsubClientType.IsNULLOrEmpty() )
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_NORMAL, "ChannelSettings:LoadConfig: config is malformed, \"pubsubClientType\" was not provided" );
return false;
}
// We are fully config driven with no programatically defined topics
// As such the config must have yielded at least 1 topic
if ( pubsubClientConfig.topics.empty() )
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_NORMAL, "ChannelSettings:LoadConfig: config is malformed, having at least one topic configured for the client section is mandatory" );
return false;
}
}
else
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_NORMAL, "ChannelSettings:LoadConfig: config is malformed, a PubSubClientConfig section is mandatory" );
return false;
}
desiredMinimalSerializedBlockSize = tree.GetAttributeValueOrChildValueByName( "desiredMinimalSerializedBlockSize" ).AsUInt32( desiredMinimalSerializedBlockSize, true );
desiredMaxTimeToWaitToGrowSerializedBlockSizeInMs = tree.GetAttributeValueOrChildValueByName( "desiredMaxTimeToWaitToGrowSerializedBlockSizeInMs" ).AsUInt32( desiredMaxTimeToWaitToGrowSerializedBlockSizeInMs, true );
vfsStorageRootPath = tree.GetAttributeValueOrChildValueByName( "vfsStorageRootPath" ).AsString( vfsStorageRootPath, true );
vfsFileExtention = tree.GetAttributeValueOrChildValueByName( "vfsFileExtention" ).AsString( vfsFileExtention, true );
encodeCodecFamily = tree.GetAttributeValueOrChildValueByName( "encodeCodecFamily" ).AsString( encodeCodecFamily, true );
encodeCodecName = tree.GetAttributeValueOrChildValueByName( "encodeCodecName" ).AsString( encodeCodecName, true );
decodeCodecFamily = tree.GetAttributeValueOrChildValueByName( "decodeCodecFamily" ).AsString( decodeCodecFamily, true );
decodeCodecName = tree.GetAttributeValueOrChildValueByName( "decodeCodecName" ).AsString( decodeCodecName, true );
channelId = tree.GetAttributeValueOrChildValueByName( "channelId" ).AsInt32( channelId, true );
ticketRefillOnBusyCycle = tree.GetAttributeValueOrChildValueByName( "ticketRefillOnBusyCycle" ).AsUInt32( ticketRefillOnBusyCycle, true );
performPubSubInDedicatedThread = tree.GetAttributeValueOrChildValueByName( "performPubSubInDedicatedThread" ).AsBool( performPubSubInDedicatedThread, true );
applyThreadCpuAffinity = tree.GetAttributeValueOrChildValueByName( "applyThreadCpuAffinity" ).AsBool( applyThreadCpuAffinity, true );
cpuAffinityForDedicatedPubSubThread = tree.GetAttributeValueOrChildValueByName( "cpuAffinityForDedicatedPubSubThread" ).AsUInt32( cpuAffinityForDedicatedPubSubThread, true );
cpuAffinityForMainChannelThread = tree.GetAttributeValueOrChildValueByName( "cpuAffinityForMainChannelThread" ).AsUInt32( cpuAffinityForMainChannelThread, true );
collectMetrics = tree.GetAttributeValueOrChildValueByName( "collectMetrics" ).AsBool( collectMetrics, true );
mode = (TChannelMode) tree.GetAttributeValueOrChildValueByName( "mode" ).AsInt32( mode, true );
subscribeWithoutBookmarkIfNoneIsPersisted = tree.GetAttributeValueOrChildValueByName( "subscribeWithoutBookmarkIfNoneIsPersisted" ).AsBool( subscribeWithoutBookmarkIfNoneIsPersisted, true );
autoPushAfterStartupIfStorageToPubSub = tree.GetAttributeValueOrChildValueByName( "autoPushAfterStartupIfStorageToPubSub" ).AsBool( autoPushAfterStartupIfStorageToPubSub, true );
youngestStoragePubSubMsgFileToLoad.FromIso8601DateTimeString( tree.GetAttributeValueOrChildValueByName( "youngestStoragePubSubMsgFileToLoad" ).AsString( youngestStoragePubSubMsgFileToLoad.ToIso8601DateTimeString( true, true ), true ) );
oldestStoragePubSubMsgFileToLoad.FromIso8601DateTimeString( tree.GetAttributeValueOrChildValueByName( "oldestStoragePubSubMsgFileToLoad" ).AsString( oldestStoragePubSubMsgFileToLoad.ToIso8601DateTimeString( true, true ), true ) );
return true;
}
/*-------------------------------------------------------------------------*/
const CORE::CString&
ChannelSettings::GetClassTypeName( void ) const
{GUCEF_TRACE;
static CORE::CString classTypeName = "pubsub2storage::ChannelSettings";
return classTypeName;
}
/*-------------------------------------------------------------------------*/
COMCORE::CPubSubClientTopicConfig*
ChannelSettings::GetTopicConfig( const CORE::CString& topicName )
{GUCEF_TRACE;
TTopicConfigVector::iterator i = pubsubClientConfig.topics.begin();
while ( i != pubsubClientConfig.topics.end() )
{
if ( topicName == (*i).topicName )
return &(*i);
}
return GUCEF_NULL;
}
/*-------------------------------------------------------------------------*/
CPubSubClientChannel::CPubSubClientChannel( CIPubSubBookmarkPersistance* persistance )
: CORE::CTaskConsumer()
, m_pubsubClient()
, m_topics()
, m_channelSettings()
, m_mailbox()
, m_bulkMail()
, m_metricsTimer( GUCEF_NULL )
, m_pubsubClientReconnectTimer( GUCEF_NULL )
, m_buffers( 2 )
, m_msgReceiveBuffer( GUCEF_NULL )
, m_lastWriteBlockCompletion()
, m_msgOffsetIndex()
, m_persistance( persistance )
{GUCEF_TRACE;
}
/*-------------------------------------------------------------------------*/
CPubSubClientChannel::~CPubSubClientChannel()
{GUCEF_TRACE;
}
/*-------------------------------------------------------------------------*/
CPubSubClientChannel::TopicLink::TopicLink( void )
: topic( GUCEF_NULL )
, currentPublishActionIds()
, inFlightMsgs()
{GUCEF_TRACE;
}
/*-------------------------------------------------------------------------*/
CPubSubClientChannel::TopicLink::TopicLink( COMCORE::CPubSubClientTopic* t )
: topic( t )
, currentPublishActionIds()
, inFlightMsgs()
{GUCEF_TRACE;
}
/*-------------------------------------------------------------------------*/
void
CPubSubClientChannel::TopicLink::AddInFlightMsgs( const COMCORE::CPubSubClientTopic::TPublishActionIdVector& publishActionIds ,
const COMCORE::CPubSubClientTopic::TIPubSubMsgSPtrVector& msgs )
{GUCEF_TRACE;
size_t max = SMALLEST( publishActionIds.size(), msgs.size() );
for ( size_t i=0; i<max; ++i )
inFlightMsgs[ publishActionIds[ i ] ] = msgs[ i ];
}
/*-------------------------------------------------------------------------*/
void
CPubSubClientChannel::TopicLink::AddInFlightMsgs( const COMCORE::CPubSubClientTopic::TPublishActionIdVector& publishActionIds ,
const COMCORE::CPubSubClientTopic::TPubSubMsgsRefVector& msgs )
{GUCEF_TRACE;
size_t max = SMALLEST( publishActionIds.size(), msgs.size() );
for ( size_t i=0; i<max; ++i )
{
COMCORE::CIPubSubMsg::TNoLockSharedPtr ptr( static_cast< COMCORE::CIPubSubMsg* >( msgs[ i ]->Clone() ) );
inFlightMsgs[ publishActionIds[ i ] ] = ptr;
}
}
/*-------------------------------------------------------------------------*/
void
CPubSubClientChannel::RegisterEventHandlers( void )
{GUCEF_TRACE;
TEventCallback callback( this, &CPubSubClientChannel::OnMetricsTimerCycle );
SubscribeTo( m_metricsTimer ,
CORE::CTimer::TimerUpdateEvent ,
callback );
if ( GUCEF_NULL != m_pubsubClientReconnectTimer )
{
TEventCallback callback( this, &CPubSubClientChannel::OnPubSubClientReconnectTimerCycle );
SubscribeTo( m_pubsubClientReconnectTimer ,
CORE::CTimer::TimerUpdateEvent ,
callback );
}
}
/*-------------------------------------------------------------------------*/
void
CPubSubClientChannel::RegisterTopicEventHandlers( COMCORE::CPubSubClientTopic& topic )
{GUCEF_TRACE;
if ( m_channelSettings.mode == TChannelMode::CHANNELMODE_PUBSUB_TO_STORAGE )
{
TEventCallback callback( this, &CPubSubClientChannel::OnPubSubTopicMsgsReceived );
SubscribeTo( &topic ,
COMCORE::CPubSubClientTopic::MsgsRecievedEvent ,
callback );
}
}
/*-------------------------------------------------------------------------*/
CORE::CString
CPubSubClientChannel::GetType( void ) const
{GUCEF_TRACE;
return "PubSubClientChannel";
}
/*-------------------------------------------------------------------------*/
void
CPubSubClientChannel::OnMetricsTimerCycle( CORE::CNotifier* notifier ,
const CORE::CEvent& eventId ,
CORE::CICloneable* eventData )
{GUCEF_TRACE;
}
/*-------------------------------------------------------------------------*/
void
CPubSubClientChannel::OnPubSubClientReconnectTimerCycle( CORE::CNotifier* notifier ,
const CORE::CEvent& eventId ,
CORE::CICloneable* eventData )
{GUCEF_TRACE;
// stop the timer, reconnect time itself should not count towards the reconnect interval
m_pubsubClientReconnectTimer->SetEnabled( false );
// Since the client does not support reconnects we will destructively reconnnect
// Meaning we wipe out any previous client as we cannot rely on the client implementation
// properly handling the state transition
if ( DisconnectPubSubClient( true ) )
{
if ( ConnectPubSubClient() )
return; // no need to resume the timer
}
// no joy, start the timer again
m_pubsubClientReconnectTimer->SetEnabled( false );
}
/*-------------------------------------------------------------------------*/
CORE::CDynamicBufferSwap&
CPubSubClientChannel::GetSerializedMsgBuffers( void )
{GUCEF_TRACE;
return m_buffers;
}
/*-------------------------------------------------------------------------*/
void
CPubSubClientChannel::OnPubSubTopicMsgsReceived( CORE::CNotifier* notifier ,
const CORE::CEvent& eventId ,
CORE::CICloneable* eventData )
{GUCEF_TRACE;
if ( GUCEF_NULL == eventData )
return;
try
{
const COMCORE::CPubSubClientTopic::TMsgsRecievedEventData& receiveAction = ( *static_cast< COMCORE::CPubSubClientTopic::TMsgsRecievedEventData* >( eventData ) );
if ( !receiveAction.empty() )
{
COMCORE::CPubSubClientTopic::TPubSubMsgsRefVector::const_iterator i = receiveAction.begin();
const CORE::CDateTime& firstMsgDt = (*i)->GetMsgDateTime();
bool firstBlock = m_lastWriteBlockCompletion == CORE::CDateTime::Empty;
if ( firstBlock )
{
m_lastWriteBlockCompletion = CORE::CDateTime::NowUTCDateTime();
}
if ( GUCEF_NULL == m_msgReceiveBuffer )
{
m_msgReceiveBuffer = m_buffers.GetNextWriterBuffer( firstMsgDt, true, GUCEF_MT_INFINITE_LOCK_TIMEOUT );
CORE::UInt32 newBytesWritten = 0;
if ( !COMCORE::CPubSubMsgContainerBinarySerializer::SerializeHeader( m_channelSettings.pubsubBinarySerializerOptions, 0, *m_msgReceiveBuffer, newBytesWritten ) )
{
// We carry on best effort but this is really bad
GUCEF_ERROR_LOG( CORE::LOGLEVEL_CRITICAL, "PubSubClientChannel(" + CORE::PointerToString( this ) +
"):OnPubSubTopicMsgsReceived: Failed to write container header at start of new pub-sub msg container" );
}
m_msgOffsetIndex.clear();
}
CORE::UInt32 bufferOffset = m_msgReceiveBuffer->GetDataSize();
while ( i != receiveAction.end() )
{
CORE::UInt32 ticks = CORE::GUCEFGetTickCount();
CORE::UInt32 msgBytesWritten = 0;
if ( COMCORE::CPubSubMsgBinarySerializer::Serialize( m_channelSettings.pubsubBinarySerializerOptions, *(*i), bufferOffset, *m_msgReceiveBuffer, msgBytesWritten ) )
{
m_msgOffsetIndex.push_back( bufferOffset );
ticks = CORE::GUCEFGetTickCount() - ticks;
bufferOffset += msgBytesWritten;
m_msgReceiveBuffer->SetDataSize( bufferOffset );
GUCEF_DEBUG_LOG( CORE::LOGLEVEL_BELOW_NORMAL, "PubSubClientChannel(" + CORE::PointerToString( this ) +
"):OnPubSubTopicMsgsReceived: Serialized a message with serialized size " + CORE::ToString( msgBytesWritten ) + ". This took " + CORE::ToString( ticks ) + "ms" );
}
else
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_BELOW_NORMAL, "PubSubClientChannel(" + CORE::PointerToString( this ) +
"):OnPubSubTopicMsgsReceived: Failed to serialize a message" );
}
++i;
}
// Check to see if we have gathered enough data or enough time has passed to consider the current container complete
if ( m_msgReceiveBuffer->GetDataSize() >= m_channelSettings.desiredMinimalSerializedBlockSize ||
( !firstBlock && m_lastWriteBlockCompletion.GetTimeDifferenceInMillisecondsToNow() >= m_channelSettings.desiredMaxTimeToWaitToGrowSerializedBlockSizeInMs ) )
{
// The current container is now considered to have enough content.
// Let's wrap things up...
CORE::UInt32 newBytesWritten = 0;
if ( !COMCORE::CPubSubMsgContainerBinarySerializer::SerializeFooter( m_msgOffsetIndex, bufferOffset, *m_msgReceiveBuffer, newBytesWritten ) )
{
// We carry on best effort but this is really bad
GUCEF_ERROR_LOG( CORE::LOGLEVEL_CRITICAL, "PubSubClientChannel(" + CORE::PointerToString( this ) +
"):OnPubSubTopicMsgsReceived: Failed to write container footer at end of current pub-sub msg container" );
}
GUCEF_DEBUG_LOG( CORE::LOGLEVEL_NORMAL, "PubSubClientChannel(" + CORE::PointerToString( this ) +
"):OnPubSubTopicMsgsReceived: Completed a serialized msg data block of size " + CORE::ToString( bufferOffset ) );
m_msgReceiveBuffer = GUCEF_NULL;
m_lastWriteBlockCompletion = CORE::CDateTime::NowUTCDateTime();
}
}
}
catch ( const std::exception& e )
{
GUCEF_EXCEPTION_LOG( CORE::LOGLEVEL_NORMAL, "PubSubClientChannel(" + CORE::PointerToString( this ) + "):OnPubSubTopicMsgsReceived: exception: " + CORE::CString( e.what() ) );
}
}
/*-------------------------------------------------------------------------*/
bool
CPubSubClientChannel::DisconnectPubSubClient( bool destroyClient )
{GUCEF_TRACE;
if ( m_pubsubClient.IsNULL() )
return true;
if ( !m_pubsubClient->Disconnect() )
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_NORMAL, "PubSubClientChannel(" + CORE::PointerToString( this ) +
"):ConnectPubSubClient: Failed to disconnect the pub-sub client" );
return false;
}
COMCORE::CPubSubClientFeatures clientFeatures;
m_pubsubClient->GetSupportedFeatures( clientFeatures );
if ( destroyClient || !clientFeatures.supportsAutoReconnect )
{
m_pubsubClient.Unlink();
}
return true;
}
/*-------------------------------------------------------------------------*/
bool
CPubSubClientChannel::ConnectPubSubClient( void )
{GUCEF_TRACE;
if ( !DisconnectPubSubClient() )
return false;
if ( m_pubsubClient.IsNULL() )
{
// Create and configure the pub-sub client
m_channelSettings.pubsubClientConfig.pulseGenerator = GetPulseGenerator();
m_pubsubClient = COMCORE::CComCoreGlobal::Instance()->GetPubSubClientFactory().Create( m_channelSettings.pubsubClientConfig.pubsubClientType, m_channelSettings.pubsubClientConfig );
if ( m_pubsubClient.IsNULL() )
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_CRITICAL, "PubSubClientChannel(" + CORE::PointerToString( this ) +
"):OnTaskStart: Failed to create a pub-sub client of type \"" + m_channelSettings.pubsubClientConfig.pubsubClientType + "\". Cannot proceed" );
return false;
}
}
COMCORE::CPubSubClientFeatures clientFeatures;
m_pubsubClient->GetSupportedFeatures( clientFeatures );
if ( !clientFeatures.supportsAutoReconnect )
{
if ( GUCEF_NULL != m_pubsubClientReconnectTimer )
m_pubsubClientReconnectTimer = new CORE::CTimer( *GetPulseGenerator(), m_channelSettings.pubsubClientConfig.reconnectDelayInMs );
}
SubscribeTo( m_pubsubClient.GetPointerAlways() );
if ( !m_pubsubClient->Connect() )
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_NORMAL, "PubSubClientChannel(" + CORE::PointerToString( this ) +
"):ConnectPubSubClient: Failed to connect the pub-sub client" );
return false;
}
// Create and configure the pub-sub client's topics
m_topics.clear();
m_topics.reserve( m_channelSettings.pubsubClientConfig.topics.size() );
ChannelSettings::TTopicConfigVector::iterator i = m_channelSettings.pubsubClientConfig.topics.begin();
while ( i != m_channelSettings.pubsubClientConfig.topics.end() )
{
COMCORE::CPubSubClientTopic* topic = m_pubsubClient->CreateTopicAccess( (*i) );
if ( GUCEF_NULL == topic )
{
if ( !(*i).isOptional )
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_NORMAL, "PubSubClientChannel(" + CORE::PointerToString( this ) +
"):ConnectPubSubClient: Failed to create a pub-sub client topic access for topic \"" + (*i).topicName + "\". Cannot proceed" );
return false;
}
else
{
GUCEF_LOG( CORE::LOGLEVEL_NORMAL, "PubSubClientChannel(" + CORE::PointerToString( this ) +
"):ConnectPubSubClient: Unable to create a pub-sub client topic access for optional topic \"" + (*i).topicName + "\". Proceeding" );
}
}
RegisterTopicEventHandlers( *topic );
m_topics.push_back( TopicLink( topic ) );
++i;
}
TopicVector::iterator t = m_topics.begin();
while ( t != m_topics.end() )
{
TopicLink& topicLink = (*t);
COMCORE::CPubSubClientTopic* topic = topicLink.topic;
if ( topic->InitializeConnectivity() )
{
GUCEF_LOG( CORE::LOGLEVEL_NORMAL, "PubSubClientChannel(" + CORE::PointerToString( this ) +
"):ConnectPubSubClient: Successfully requested connectivity initialization for topic \"" + topic->GetTopicName() + "\". Proceeding" );
// We use the 'desired' feature to also drive whether we actually subscribe at this point
// saves us an extra setting
COMCORE::CPubSubClientTopicConfig* topicConfig = m_channelSettings.GetTopicConfig( topic->GetTopicName() );
if ( GUCEF_NULL != topicConfig && topicConfig->needSubscribeSupport )
{
// The method of subscription depends on the supported feature set
bool subscribeSuccess = false;
if ( !clientFeatures.supportsBookmarkingConcept ) // We have no control bookmark wise with this backend, just subscribe and hope for the best
{
GUCEF_LOG( CORE::LOGLEVEL_NORMAL, "PubSubClientChannel(" + CORE::PointerToString( this ) +
"):ConnectPubSubClient: Bookmarking concept is not supported by the backend, we will attempt to subscribe as-is" );
subscribeSuccess = topic->Subscribe();
}
else
if ( clientFeatures.supportsServerSideBookmarkPersistance ) // first preference is always backend managed bookmarking if available
{
GUCEF_LOG( CORE::LOGLEVEL_NORMAL, "PubSubClientChannel(" + CORE::PointerToString( this ) +
"):ConnectPubSubClient: Bookmarking concept is natively supported and managed by the backend independently and we will attempt to subscribe as such" );
subscribeSuccess = topic->Subscribe();
}
else
{
// bookmarks are supported but they rely on client-side persistance
// we will need to obtain said bookmark
COMCORE::CPubSubBookmark bookmark;
if ( !m_persistance->GetPersistedBookmark( m_channelSettings.channelId, topic->GetTopicName(), bookmark ) )
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_NORMAL, "PubSubClientChannel(" + CORE::PointerToString( this ) +
"):ConnectPubSubClient: Bookmarking concept is supported by the backend via a client-side message index marker but we failed at obtaining the last used message index" );
if ( m_channelSettings.subscribeWithoutBookmarkIfNoneIsPersisted )
{
subscribeSuccess = topic->Subscribe();
if ( !subscribeSuccess )
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_NORMAL, "CPubSubClientSide(" + CORE::PointerToString( this ) +
"):ConnectPubSubClient: Also unable to subscribe using the default bookmark as a fallback" );
return false;
}
}
else
return false;
}
else
{
GUCEF_LOG( CORE::LOGLEVEL_NORMAL, "CPubSubClientSide(" + CORE::PointerToString( this ) +
"):ConnectPubSubClient: Bookmarking concept is supported by the backend via a client-side bookmark. Bookmark type=" + CORE::ToString( bookmark.GetBookmarkType() ) + ". Bookmark=" + bookmark.GetBookmarkData().AsString() );
subscribeSuccess = topic->SubscribeStartingAtBookmark( bookmark );
}
}
if ( !subscribeSuccess )
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_NORMAL, "PubSubClientChannel(" + CORE::PointerToString( this ) +
"):ConnectPubSubClient: Failed to subscribe to topic: " + topic->GetTopicName() );
return false;
}
}
}
++t;
}
return true;
}
/*-------------------------------------------------------------------------*/
bool
CPubSubClientChannel::OnTaskStart( CORE::CICloneable* taskData )
{GUCEF_TRACE;
m_metricsTimer = new CORE::CTimer( *GetPulseGenerator(), 1000 );
m_metricsTimer->SetEnabled( m_channelSettings.pubsubClientConfig.desiredFeatures.supportsMetrics );
m_buffers.SetMinimalBufferSize( m_channelSettings.desiredMinimalSerializedBlockSize );
m_msgOffsetIndex.clear();
m_msgOffsetIndex.reserve( 1000 );
if ( m_channelSettings.performPubSubInDedicatedThread )
{
// Set the minimum number of cycles we will go full speed if a single cycle was not enough to handle
// all the processing. This will cause a bypass of CPU yielding if/when the situation arises.
// In such a case the thread will run at max speed for a least the below set nr of cycles.
GetPulseGenerator()->RequestPulsesPerImmediatePulseRequest( m_channelSettings.ticketRefillOnBusyCycle );
// Default smallest pulse delta at 25ms
GetPulseGenerator()->RequestPeriodicPulses( this, 25 );
if ( m_channelSettings.applyThreadCpuAffinity )
{
if ( SetCpuAffinityByCpuId( m_channelSettings.cpuAffinityForDedicatedPubSubThread ) )
{
GUCEF_LOG( CORE::LOGLEVEL_NORMAL, "PubSubClientChannel(" + CORE::PointerToString( this ) +
"):OnTaskStart: Successfully set a CPU affinity for logical CPU " + CORE::UInt32ToString( m_channelSettings.cpuAffinityForDedicatedPubSubThread ) );
}
else
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_NORMAL, "PubSubClientChannel(" + CORE::PointerToString( this ) +
"):OnTaskStart: Failed to set a CPU affinity for logical CPU " + CORE::UInt32ToString( m_channelSettings.cpuAffinityForDedicatedPubSubThread ) +
". Proceeding without affinity");
}
}
}
if ( !ConnectPubSubClient() )
{
GUCEF_WARNING_LOG( CORE::LOGLEVEL_NORMAL, "PubSubClientChannel(" + CORE::PointerToString( this ) +
"):OnTaskStart: Failed initial connection attempt on task start, will rely on auto-reconnect" );
}
RegisterEventHandlers();
return true;
}
/*-------------------------------------------------------------------------*/
void
CPubSubClientChannel::OnStoredPubSubMsgTransmissionFailure( const CORE::CDateTime& firstMsgDt )
{GUCEF_TRACE;
}
/*-------------------------------------------------------------------------*/
bool
CPubSubClientChannel::TransmitNextPubSubMsgBuffer( void )
{GUCEF_TRACE;
CORE::CDateTime firstMsgDt;
m_msgReceiveBuffer = m_buffers.GetNextReaderBuffer( firstMsgDt, true, 25 );
if ( GUCEF_NULL == m_msgReceiveBuffer )
return true; // nothing to do
GUCEF_DEBUG_LOG( CORE::LOGLEVEL_NORMAL, "PubSubClientChannel(" + CORE::PointerToString( this ) +
"):TransmitNextPubSubMsgBuffer: New buffer is available of " + CORE::ToString( m_msgReceiveBuffer->GetDataSize() ) + " bytes" );
CORE::UInt32 bytesRead = 0;
COMCORE::CPubSubMsgContainerBinarySerializer::TMsgOffsetIndex originalOffsetIndex;
if ( !COMCORE::CPubSubMsgContainerBinarySerializer::DeserializeFooter( originalOffsetIndex, *m_msgReceiveBuffer, bytesRead ) )
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_NORMAL, "PubSubClientChannel(" + CORE::PointerToString( this ) +
"):TransmitNextPubSubMsgBuffer: Failed to read container footer" );
OnStoredPubSubMsgTransmissionFailure( firstMsgDt );
return false;
}
GUCEF_DEBUG_LOG( CORE::LOGLEVEL_NORMAL, "PubSubClientChannel(" + CORE::PointerToString( this ) +
"):TransmitNextPubSubMsgBuffer: Per footer the buffer contains " + CORE::ToString( originalOffsetIndex.size() ) + " messages to publish" );
// We now link logical message objects to the data in the buffer
CORE::UInt32 startIndexOffset = 0;
CORE::UInt32 endIndexOffset = 0;
bool isCorrupted = false;
COMCORE::CPubSubMsgContainerBinarySerializer::TBasicPubSubMsgVector msgs;
if ( !COMCORE::CPubSubMsgContainerBinarySerializer::Deserialize( msgs, true, originalOffsetIndex, *m_msgReceiveBuffer, isCorrupted ) )
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_NORMAL, "PubSubClientChannel(" + CORE::PointerToString( this ) +
"):TransmitNextPubSubMsgBuffer: Failed to deserialize messages from container. According to the footer the container had " +
CORE::ToString( originalOffsetIndex.size() ) + " entries. isCorrupted=" + CORE::BoolToString( isCorrupted ) );
OnStoredPubSubMsgTransmissionFailure( firstMsgDt );
return false;
}
// We now have the messages in a format that allows interpretation by the pub-sub backend
// We can now proceed with publishing all the messages to the relevant topics
CORE::UInt32 topicsToPublishOn = 0;
CORE::UInt32 topicsPublishedOn = 0;
bool publishSuccess = true;
TopicVector::iterator i = m_topics.begin();
while ( i != m_topics.end() )
{
TopicLink& topicLink = (*i);
COMCORE::CPubSubClientTopic* topic = topicLink.topic;
if ( GUCEF_NULL != topic )
{
if ( topic->IsPublishingSupported() )
{
++topicsToPublishOn;
if ( topic->Publish( topicLink.currentPublishActionIds, msgs, true ) )
{
++topicsPublishedOn;
}
else
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_NORMAL, "PubSubClientChannel(" + CORE::PointerToString( this ) +
"):TransmitNextPubSubMsgBuffer: Failed to publish messages to topic" );
OnStoredPubSubMsgTransmissionFailure( firstMsgDt );
publishSuccess = false;
}
}
}
++i;
}
GUCEF_DEBUG_LOG( CORE::LOGLEVEL_NORMAL, "PubSubClientChannel(" + CORE::PointerToString( this ) +
"):TransmitNextPubSubMsgBuffer: Successfully published messages to " + CORE::ToString( topicsPublishedOn ) + " topics, " +
CORE::ToString( topicsToPublishOn ) + " topics available for publishing" );
return publishSuccess;
}
/*-------------------------------------------------------------------------*/
bool
CPubSubClientChannel::OnTaskCycle( CORE::CICloneable* taskData )
{GUCEF_TRACE;
if ( m_channelSettings.mode == TChannelMode::CHANNELMODE_STORAGE_TO_PUBSUB )
{
TransmitNextPubSubMsgBuffer();
}
// We are never 'done' so return false
return false;
}
/*-------------------------------------------------------------------------*/
void
CPubSubClientChannel::OnTaskEnding( CORE::CICloneable* taskdata ,
bool willBeForced )
{GUCEF_TRACE;
m_buffers.SignalEndOfWriting();
}
/*-------------------------------------------------------------------------*/
void
CPubSubClientChannel::OnTaskEnded( CORE::CICloneable* taskData ,
bool wasForced )
{GUCEF_TRACE;
delete m_metricsTimer;
m_metricsTimer = GUCEF_NULL;
delete m_pubsubClientReconnectTimer;
m_pubsubClientReconnectTimer = GUCEF_NULL;
CORE::CTaskConsumer::OnTaskEnded( taskData, wasForced );
}
/*-------------------------------------------------------------------------*/
bool
CPubSubClientChannel::LoadConfig( const ChannelSettings& channelSettings )
{GUCEF_TRACE;
m_channelSettings = channelSettings;
return true;
}
/*-------------------------------------------------------------------------*/
const ChannelSettings&
CPubSubClientChannel::GetChannelSettings( void ) const
{GUCEF_TRACE;
return m_channelSettings;
}
/*-------------------------------------------------------------------------*/
CStorageChannel::CStorageChannel()
: CORE::CTaskConsumer()
, m_channelSettings()
, m_metricsTimer( GUCEF_NULL )
, m_metrics()
, m_pubsubClient( new CPubSubClientChannel( this ) )
, m_msgReceiveBuffer( GUCEF_NULL )
, m_vfsFilePostfix( ".vUNKNOWN.bin" )
, m_lastPersistedMsgId()
, m_lastPersistedMsgDt()
, m_encodeSizeRatio( -1 )
{GUCEF_TRACE;
}
/*-------------------------------------------------------------------------*/
CStorageChannel::CStorageChannel( const CStorageChannel& src )
: CORE::CTaskConsumer()
, m_channelSettings( src.m_channelSettings )
, m_metricsTimer( GUCEF_NULL )
, m_metrics()
, m_pubsubClient( new CPubSubClientChannel( this ) )
, m_vfsFilePostfix( src.m_vfsFilePostfix )
, m_lastPersistedMsgId()
, m_lastPersistedMsgDt()
, m_encodeSizeRatio( src.m_encodeSizeRatio )
{GUCEF_TRACE;
}
/*-------------------------------------------------------------------------*/
CStorageChannel::~CStorageChannel()
{GUCEF_TRACE;
delete m_metricsTimer;
m_metricsTimer = GUCEF_NULL;
}
/*-------------------------------------------------------------------------*/
void
CStorageChannel::RegisterEventHandlers( void )
{GUCEF_TRACE;
TEventCallback callback6( this, &CStorageChannel::OnMetricsTimerCycle );
SubscribeTo( m_metricsTimer ,
CORE::CTimer::TimerUpdateEvent ,
callback6 );
}
/*-------------------------------------------------------------------------*/
CStorageChannel::StorageToPubSubRequest::StorageToPubSubRequest( void )
: startDt()
, endDt()
, vfsPubSubMsgContainersToPush()
{GUCEF_TRACE;
}
/*-------------------------------------------------------------------------*/
CStorageChannel::StorageToPubSubRequest::StorageToPubSubRequest( const CORE::CDateTime& startDt, const CORE::CDateTime& endDt )
: startDt( startDt )
, endDt( endDt )
, vfsPubSubMsgContainersToPush()
{GUCEF_TRACE;
}
/*-------------------------------------------------------------------------*/
CStorageChannel::StorageToPubSubRequest::StorageToPubSubRequest( const StorageToPubSubRequest& src )
: startDt( src.startDt )
, endDt( src.endDt )
, vfsPubSubMsgContainersToPush( src.vfsPubSubMsgContainersToPush )
{GUCEF_TRACE;
}
/*-------------------------------------------------------------------------*/
const CORE::CString&
CStorageChannel::StorageToPubSubRequest::GetClassTypeName( void ) const
{GUCEF_TRACE;
static const CORE::CString classTypeName = "StorageToPubSubRequest";
return classTypeName;
}
/*-------------------------------------------------------------------------*/
bool
CStorageChannel::StorageToPubSubRequest::SaveConfig( CORE::CDataNode & tree ) const
{
return false;
}
/*-------------------------------------------------------------------------*/
bool
CStorageChannel::StorageToPubSubRequest::LoadConfig( const CORE::CDataNode & treeroot )
{
return false;
}
/*-------------------------------------------------------------------------*/
bool
CStorageChannel::AddStorageToPubSubRequest( const StorageToPubSubRequest& request )
{GUCEF_TRACE;
m_storageToPubSubRequests.push_back( request );
return true;
}
/*-------------------------------------------------------------------------*/
bool
CStorageChannel::LoadConfig( const ChannelSettings& channelSettings )
{GUCEF_TRACE;
m_channelSettings = channelSettings;
m_channelSettings.vfsStorageRootPath = CORE::ResolveVars( m_channelSettings.vfsStorageRootPath ).ReplaceSubstr( "{channelId}", CORE::ToString( m_channelSettings.channelId ) );
if ( m_channelSettings.vfsFileExtention.IsNULLOrEmpty() )
{
if ( m_channelSettings.encodeCodecFamily.IsNULLOrEmpty() || m_channelSettings.encodeCodecName.IsNULLOrEmpty() )
m_channelSettings.vfsFileExtention = "bin";
else
{
if ( "deflate" == m_channelSettings.encodeCodecName )
m_channelSettings.vfsFileExtention = "bin.gz";
else
m_channelSettings.vfsFileExtention = "bin.encoded";
}
}
// the encoder and decoder almost always belong to the same codec family so we can make that the default
if ( m_channelSettings.decodeCodecFamily.IsNULLOrEmpty() )
{
m_channelSettings.decodeCodecFamily = m_channelSettings.encodeCodecFamily;
}
if ( m_channelSettings.decodeCodecName.IsNULLOrEmpty() )
{
if ( "deflate" == m_channelSettings.encodeCodecName )
m_channelSettings.decodeCodecName = "inflate";
}
m_vfsFilePostfix = ".v" + CORE::ToString( COMCORE::CPubSubMsgContainerBinarySerializer::CurrentFormatVersion ) + '.' + m_channelSettings.vfsFileExtention;
return m_pubsubClient->LoadConfig( channelSettings );
}
/*-------------------------------------------------------------------------*/
const ChannelSettings&
CStorageChannel::GetChannelSettings( void ) const
{GUCEF_TRACE;
return m_channelSettings;
}
/*-------------------------------------------------------------------------*/
CORE::CString
CStorageChannel::GetType( void ) const
{GUCEF_TRACE;
return "StorageChannel";
}
/*-------------------------------------------------------------------------*/
bool
CStorageChannel::WaitForTaskToFinish( CORE::Int32 timeoutInMs )
{GUCEF_TRACE;
// Overriding the base class implementation because this consumer can start its own
// consumer based on settings transparent to the caller.
if ( CTaskConsumer::WaitForTaskToFinish( timeoutInMs ) )
{
GUCEF_LOG( CORE::LOGLEVEL_IMPORTANT, "StorageChannel:WaitForTaskToFinish: Successfully waited for channel " + CORE::Int32ToString( m_channelSettings.channelId ) + "'s task to stop" );
if ( m_channelSettings.performPubSubInDedicatedThread )
{
if ( m_pubsubClient->WaitForTaskToFinish( timeoutInMs ) )
{
GUCEF_LOG( CORE::LOGLEVEL_IMPORTANT, "StorageChannel:WaitForTaskToFinish: Successfully waited for channel " + CORE::Int32ToString( m_channelSettings.channelId ) + "'s dedicated pub sub task to stop" );
return true;
}
else
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_IMPORTANT, "StorageChannel:WaitForTaskToFinish: Failed waiting for dedicated pub sub task to stop for channel " + CORE::Int32ToString( m_channelSettings.channelId ) );
}
}
return true;
}
GUCEF_ERROR_LOG( CORE::LOGLEVEL_IMPORTANT, "StorageChannel:WaitForTaskToFinish: Failed waiting for task to stop for channel " + CORE::Int32ToString( m_channelSettings.channelId ) );
return false;
}
/*-------------------------------------------------------------------------*/
CStorageChannel::ChannelMetrics::ChannelMetrics( void )
//: udpBytesReceived( 0 )
//, udpPacketsReceived( 0 )
//, redisMessagesTransmitted( 0 )
//, redisPacketsInMsgsTransmitted( 0 )
//, redisPacketsInMsgsRatio( 0 )
//, redisTransmitQueueSize( 0 )
//, redisErrorReplies( 0 )
{GUCEF_TRACE;
}
/*-------------------------------------------------------------------------*/
void
CStorageChannel::OnMetricsTimerCycle( CORE::CNotifier* notifier ,
const CORE::CEvent& eventId ,
CORE::CICloneable* eventData )
{GUCEF_TRACE;
//m_metrics.udpBytesReceived = m_udpSocket->GetBytesReceived( true );
//m_metrics.udpPacketsReceived = m_udpSocket->GetNrOfDataReceivedEvents( true );
//m_metrics.redisTransmitQueueSize = m_redisWriter->GetRedisTransmitQueueSize();
//m_metrics.redisMessagesTransmitted = m_redisWriter->GetRedisMsgsTransmittedCounter( true );
//m_metrics.redisPacketsInMsgsTransmitted = m_redisWriter->GetRedisPacketsInMsgsTransmittedCounter( true );
//m_metrics.redisPacketsInMsgsRatio = m_redisWriter->GetRedisPacketsInMsgsRatio();
//m_metrics.redisErrorReplies = m_redisWriter->GetRedisErrorRepliesCounter( true );
}
/*-------------------------------------------------------------------------*/
const CStorageChannel::ChannelMetrics&
CStorageChannel::GetMetrics( void ) const
{GUCEF_TRACE;
return m_metrics;
}
/*-------------------------------------------------------------------------*/
bool
CStorageChannel::OnTaskStart( CORE::CICloneable* taskData )
{GUCEF_TRACE;
if ( m_channelSettings.performPubSubInDedicatedThread )
{
CORE::ThreadPoolPtr threadPool = CORE::CCoreGlobal::Instance()->GetTaskManager().GetThreadPool();
if ( !threadPool->StartTask( m_pubsubClient ) )
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_CRITICAL, "StorageChannel:OnTaskStart: Failed to start dedicated task (dedicated thread) for pub-sub. Falling back to a single thread" );
m_channelSettings.performPubSubInDedicatedThread = false;
}
else
{
GUCEF_LOG( CORE::LOGLEVEL_NORMAL, "StorageChannel:OnTaskStart: Successfully requested the launch of a dedicated task (dedicated thread) for pub-sub" );
}
}
if ( !m_channelSettings.performPubSubInDedicatedThread )
{
if ( !m_pubsubClient->OnTaskStart( taskData ) )
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_CRITICAL, "StorageChannel:OnTaskStart: Failed startup of pub-sub client logic" );
return false;
}
}
if ( ( m_channelSettings.mode == TChannelMode::CHANNELMODE_STORAGE_TO_PUBSUB ) && ( m_channelSettings.autoPushAfterStartupIfStorageToPubSub ) )
{
AddStorageToPubSubRequest( StorageToPubSubRequest( m_channelSettings.oldestStoragePubSubMsgFileToLoad, m_channelSettings.youngestStoragePubSubMsgFileToLoad ) );
}
return true;
}
/*-------------------------------------------------------------------------*/
CORE::CString
CStorageChannel::GetPathToLastWrittenPubSubStorageFile( CORE::UInt32 lastOffset ) const
{GUCEF_TRACE;
VFS::CVFS& vfs = VFS::CVfsGlobal::Instance()->GetVfs();
CORE::CString fileFilter = '*' + m_vfsFilePostfix;
VFS::CVFS::TStringSet index;
vfs.GetList( index, m_channelSettings.vfsStorageRootPath, false, true, fileFilter, true, false );
// The index is already alphabetically ordered and since we use the datetime as the part of filename we can leverage that
// to get the last produced file
if ( !index.empty() )
{
VFS::CVFS::TStringSet::reverse_iterator f = index.rbegin();
CORE::UInt32 n=0;
while ( n<lastOffset && f != index.rend() )
{
++f; ++n;
}
if ( f != index.rend() )
{
const CORE::CString& lastFilename = (*f);
return lastFilename;
}
}
return CORE::CString::Empty;
}
/*-------------------------------------------------------------------------*/
bool
CStorageChannel::GetLastPersistedMsgAttributes( CORE::Int32 channelId ,
const CORE::CString& topicName ,
CORE::CVariant& msgId ,
CORE::CDateTime& msgDt )
{GUCEF_TRACE;
bool success = true;
CORE::UInt32 lastFileOffset = 0;
bool fileExistedButHasIssue = false;
do
{
success = GetLastPersistedMsgAttributesWithOffset( channelId ,
topicName ,
msgId ,
msgDt ,
lastFileOffset ,
fileExistedButHasIssue );
++lastFileOffset;
}
while ( !success && fileExistedButHasIssue );
return success;
}
/*-------------------------------------------------------------------------*/
bool
CStorageChannel::GetPersistedBookmark( CORE::Int32 channelId ,
const CORE::CString& topicName ,
COMCORE::CPubSubBookmark& bookmark )
{GUCEF_TRACE;
// @TODO: Update to use dedicated bookmark persistance
CORE::CVariant msgId;
CORE::CDateTime msgDt;
if ( GetLastPersistedMsgAttributes( channelId, topicName, msgId, msgDt ) )
{
if ( msgId.IsInitialized() )
{
bookmark.SetBookmarkData( msgId );
bookmark.SetBookmarkType( COMCORE::CPubSubBookmark::BOOKMARK_TYPE_MSG_ID );
}
else
{
CORE::CVariant dtStrVar = msgDt.ToIso8601DateTimeString( true, true );
bookmark.SetBookmarkData( dtStrVar );
bookmark.SetBookmarkType( COMCORE::CPubSubBookmark::BOOKMARK_TYPE_MSG_DATETIME );
}
return true;
}
bookmark.SetBookmarkType( COMCORE::CPubSubBookmark::BOOKMARK_TYPE_NOT_AVAILABLE );
return false;
}
/*-------------------------------------------------------------------------*/
bool
CStorageChannel::LoadStorageFile( const CORE::CString& vfsPath ,
CORE::CDynamicBuffer& targetBuffer )
{GUCEF_TRACE;
VFS::CVFS& vfs = VFS::CVfsGlobal::Instance()->GetVfs();
if ( !m_channelSettings.decodeCodecFamily.IsNULLOrEmpty() && !m_channelSettings.decodeCodecName.IsNULLOrEmpty() )
{
CORE::Float32 encodeRatio = m_encodeSizeRatio < 0 ? GUCEF_DEFAULT_DECODE_GROWTH_RATIO_EXPECTATION : m_encodeSizeRatio;
CORE::UInt32 estimatedApproxDecodedSize = (CORE::UInt32) ( vfs.GetFileSize( vfsPath ) * encodeRatio );
targetBuffer.SetBufferSize( estimatedApproxDecodedSize, false );
if ( !vfs.DecodeAsFile( targetBuffer, 0, vfsPath, m_channelSettings.decodeCodecFamily, m_channelSettings.decodeCodecName ) )
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_NORMAL, "StorageChannel:LoadStorageFile: Cannot decode and load persisted file. CodeFamily:" + m_channelSettings.decodeCodecFamily +
" CodecName: " + m_channelSettings.decodeCodecName + ". VFS File: " + vfsPath );
return false;
}
if ( targetBuffer.GetDataSize() > 0 )
m_encodeSizeRatio = (CORE::Float32) ( targetBuffer.GetDataSize() / vfs.GetFileSize( vfsPath ) );
}
else
{
// Not using any encoding, load the file as-is
if ( !vfs.LoadFile( targetBuffer, vfsPath, "rb" ) )
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_NORMAL, "StorageChannel:LoadStorageFile: Cannot load last persisted file. VFS File: " + vfsPath );
return false;
}
}
return true;
}
/*-------------------------------------------------------------------------*/
bool
CStorageChannel::GetLastPersistedMsgAttributesWithOffset( CORE::Int32 channelId ,
const CORE::CString& topicName ,
CORE::CVariant& msgId ,
CORE::CDateTime& msgDt ,
CORE::UInt32 lastFileOffset ,
bool& fileExistedButHasIssue )
{GUCEF_TRACE;
// @TODO: topic name segregation
if ( channelId != m_channelSettings.channelId )
{
fileExistedButHasIssue = false;
return false; // this should never happen
}
if ( m_lastPersistedMsgId.IsNULLOrEmpty() && m_lastPersistedMsgDt == CORE::CDateTime::Empty )
{
CORE::CString lastWrittenFilePath = GetPathToLastWrittenPubSubStorageFile( lastFileOffset );
if ( lastWrittenFilePath.IsNULLOrEmpty() )
{
fileExistedButHasIssue = false;
GUCEF_ERROR_LOG( CORE::LOGLEVEL_NORMAL, "StorageChannel:GetLastWrittenPubSubMsgId: Cannot obtain path to last written file with offset " + CORE::ToString( lastFileOffset ) );
return false;
}
CORE::CDynamicBuffer lastStorageFileContent;
if ( !LoadStorageFile( lastWrittenFilePath, lastStorageFileContent ) )
{
fileExistedButHasIssue = false;
GUCEF_ERROR_LOG( CORE::LOGLEVEL_NORMAL, "StorageChannel:GetLastWrittenPubSubMsgId: Unable to load file from storage. Loading using last offset " + CORE::ToString( lastFileOffset ) );
return false;
}
if ( 0 == lastStorageFileContent.GetDataSize() )
{
fileExistedButHasIssue = true;
GUCEF_ERROR_LOG( CORE::LOGLEVEL_NORMAL, "StorageChannel:GetLastPersistedMsgAttributes: last persisted file is empty. VFS File: " + lastWrittenFilePath );
return false;
}
bool isCorrupted = false;
COMCORE::CBasicPubSubMsg msg;
if ( !COMCORE::CPubSubMsgContainerBinarySerializer::DeserializeMsgAtIndex( msg, true, lastStorageFileContent, 0, false, isCorrupted ) )
{
if ( isCorrupted )
{
// Attempt to recover what we can with an index rebuild
// This could effectively move the "last" message received to the actually non-corrupt persisted message as the new "last"
GUCEF_WARNING_LOG( CORE::LOGLEVEL_NORMAL, "StorageChannel:GetLastPersistedMsgAttributes: Failed to deserialize the last message, will attempt an index rebuild of the corrupt container" );
CORE::UInt32 bytesRead = 0;
COMCORE::CPubSubMsgContainerBinarySerializer::TMsgOffsetIndex newRecoveredIndex;
if ( COMCORE::CPubSubMsgContainerBinarySerializer::IndexRebuildScan( newRecoveredIndex, lastStorageFileContent, bytesRead ) )
{
GUCEF_LOG( CORE::LOGLEVEL_NORMAL, "StorageChannel:GetLastPersistedMsgAttributes: Successfully performed an index rebuild of the corrupt container, discovered " + CORE::ToString( newRecoveredIndex.size() ) + " messages. Will attempt to add a new footer" );
CORE::UInt32 bytesWritten = 0;
if ( COMCORE::CPubSubMsgContainerBinarySerializer::SerializeFooter( newRecoveredIndex, lastStorageFileContent.GetDataSize()-1, lastStorageFileContent, bytesWritten ) )
{
GUCEF_LOG( CORE::LOGLEVEL_NORMAL, "StorageChannel:GetLastPersistedMsgAttributes: Successfully serialized a new footer to the previously corrupt container. Will attempt to persist the amended container" );
VFS::CVFS& vfs = VFS::CVfsGlobal::Instance()->GetVfs();
if ( m_channelSettings.encodeCodecFamily.IsNULLOrEmpty() || m_channelSettings.encodeCodecName.IsNULLOrEmpty() )
{
if ( vfs.StoreAsFile( lastWrittenFilePath, lastStorageFileContent, 0, true ) )
{
GUCEF_LOG( CORE::LOGLEVEL_NORMAL, "StorageChannel:GetLastPersistedMsgAttributes: Successfully stored rebuild pub-sub message container at: " + lastWrittenFilePath );
}
else
{
fileExistedButHasIssue = true;
GUCEF_ERROR_LOG( CORE::LOGLEVEL_CRITICAL, "StorageChannel:GetLastPersistedMsgAttributes: StoreAsFile() Failed for rebuild message container" );
return false;
}
}
else
{
if ( vfs.EncodeAsFile( lastStorageFileContent, 0, lastWrittenFilePath, true, m_channelSettings.encodeCodecFamily, m_channelSettings.encodeCodecName ) )
{
m_encodeSizeRatio = (CORE::Float32) ( lastStorageFileContent.GetDataSize() / vfs.GetFileSize( lastWrittenFilePath ) );
GUCEF_LOG( CORE::LOGLEVEL_NORMAL, "StorageChannel:GetLastPersistedMsgAttributes: Successfully encoded and stored rebuild pub-sub message container resource at: \"" + lastWrittenFilePath + "\" with a encoded size ratio of " + CORE::ToString( m_encodeSizeRatio ) );
}
else
{
fileExistedButHasIssue = true;
GUCEF_ERROR_LOG( CORE::LOGLEVEL_CRITICAL, "StorageChannel:GetLastPersistedMsgAttributes: EncodeAsFile() Failed for rebuild message container" );
return false;
}
}
}
}
// Lets try again, hopefully its fixed now best effort...
if ( !COMCORE::CPubSubMsgContainerBinarySerializer::DeserializeMsgAtIndex( msg, true, lastStorageFileContent, 0, false, isCorrupted ) )
{
// This should not happen, something is seriously wrong here.
fileExistedButHasIssue = true;
GUCEF_ERROR_LOG( CORE::LOGLEVEL_CRITICAL, "StorageChannel:GetLastPersistedMsgAttributes: Failed to load last message even after a successfull rebuild. isCorrupted=" + CORE::ToString( isCorrupted ) );
return false;
}
}
}
m_lastPersistedMsgId = msg.GetMsgId();
m_lastPersistedMsgDt = msg.GetMsgDateTime();
}
msgId = m_lastPersistedMsgId;
msgDt = m_lastPersistedMsgDt;
return true;
}
/*-------------------------------------------------------------------------*/
bool
CStorageChannel::GetStartAndEndFromContainerFilename( const CORE::CString& fullPath ,
CORE::CDateTime& startDt ,
CORE::CDateTime& endDt ) const
{GUCEF_TRACE;
// first strip the extra stuff from the full path to get the string form timestamps
CORE::CString segment = CORE::ExtractFilename( fullPath );
segment = segment.CutChars( m_vfsFilePostfix.Length(), false, 0 );
CORE::CString startDtSegment = segment.SubstrToChar( '_', true );
CORE::CString endDtSegment = segment.SubstrToChar( '_', false );
// Try to parse what is left as a valid ISO 8601 DateTime
if ( startDt.FromIso8601DateTimeString( startDtSegment ) && endDt.FromIso8601DateTimeString( endDtSegment ) )
return true;
return false;
}
/*-------------------------------------------------------------------------*/
bool
CStorageChannel::GetPathsToPubSubStorageFiles( const CORE::CDateTime& startDt ,
const CORE::CDateTime& endDt ,
CORE::CString::StringSet& files ) const
{GUCEF_TRACE;
VFS::CVFS& vfs = VFS::CVfsGlobal::Instance()->GetVfs();
CORE::CString fileFilter = '*' + m_vfsFilePostfix;
VFS::CVFS::TStringSet index;
vfs.GetList( index, m_channelSettings.vfsStorageRootPath, false, true, fileFilter, true, false );
VFS::CVFS::TStringSet::iterator i = index.begin();
while ( i != index.end() )
{
CORE::CDateTime containerFileFirstMsgDt;
CORE::CDateTime containerFileLastMsgDt;
if ( GetStartAndEndFromContainerFilename( (*i), containerFileFirstMsgDt, containerFileLastMsgDt ) )
{
// Check the container first messgage dt against the our time range
// It is assumed here that the containers have messages chronologically ordered
if ( containerFileFirstMsgDt.IsWithinRange( startDt, endDt ) || containerFileLastMsgDt.IsWithinRange( startDt, endDt ) )
{
files.insert( (*i) );
}
}
++i;
}
return true;
}
/*-------------------------------------------------------------------------*/
bool
CStorageChannel::StoreNextReceivedPubSubBuffer( void )
{GUCEF_TRACE;
CORE::CDynamicBufferSwap& buffers = m_pubsubClient->GetSerializedMsgBuffers();
CORE::CDateTime msgBatchDt;
m_msgReceiveBuffer = buffers.GetNextReaderBuffer( msgBatchDt, false, 25 );
if ( GUCEF_NULL != m_msgReceiveBuffer )
{
// Get the timestamp of the last message in the buffer.
// This is not as expensive an operation as it would appear because we just link to the bytes in the buffer we dont copy them
bool isCorrupted = false;
COMCORE::CBasicPubSubMsg lastMsg;
COMCORE::CPubSubMsgContainerBinarySerializer::DeserializeMsgAtIndex( lastMsg, true, *m_msgReceiveBuffer, 0, false, isCorrupted );
CORE::CString vfsFilename = msgBatchDt.ToIso8601DateTimeString( false, true ) + '_' + lastMsg.GetMsgDateTime().ToIso8601DateTimeString( false, true ) + m_vfsFilePostfix;
CORE::CString vfsStoragePath = CORE::CombinePath( m_channelSettings.vfsStorageRootPath, vfsFilename );
VFS::CVFS& vfs = VFS::CVfsGlobal::Instance()->GetVfs();
if ( m_channelSettings.encodeCodecFamily.IsNULLOrEmpty() || m_channelSettings.encodeCodecName.IsNULLOrEmpty() )
{
if ( vfs.StoreAsFile( vfsStoragePath, *m_msgReceiveBuffer, 0, true ) )
{
GUCEF_LOG( CORE::LOGLEVEL_NORMAL, "StorageChannel:OnTaskCycle: Successfully stored pub-sub mesage block at: " + vfsStoragePath );
}
else
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_CRITICAL, "StorageChannel:OnTaskCycle: StoreAsFile() Failed" );
}
}
else
{
if ( vfs.EncodeAsFile( *m_msgReceiveBuffer, 0, vfsStoragePath, true, m_channelSettings.encodeCodecFamily, m_channelSettings.encodeCodecName ) )
{
m_encodeSizeRatio = (CORE::Float32) ( m_msgReceiveBuffer->GetDataSize() / ( 1.0f * vfs.GetFileSize( vfsStoragePath ) ) );
GUCEF_LOG( CORE::LOGLEVEL_NORMAL, "StorageChannel:OnTaskCycle: Successfully encoded and stored pub-sub mesage block at: \"" + vfsStoragePath + "\" with a encoded size ratio of " + CORE::ToString( m_encodeSizeRatio ) );
}
else
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_CRITICAL, "StorageChannel:OnTaskCycle: EncodeAsFile() Failed" );
}
}
}
return true;
}
/*-------------------------------------------------------------------------*/
void
CStorageChannel::OnUnableToFullFillStorageToPubSubRequest( const StorageToPubSubRequest& failedRequest )
{GUCEF_TRACE;
}
/*-------------------------------------------------------------------------*/
bool
CStorageChannel::ProcessNextStorageToPubSubRequest( void )
{GUCEF_TRACE;
StorageToPubSubRequestDeque::iterator i = m_storageToPubSubRequests.begin();
if ( i != m_storageToPubSubRequests.end() )
{
StorageToPubSubRequest& queuedRequest = (*i);
GUCEF_DEBUG_LOG( CORE::LOGLEVEL_NORMAL, "StorageChannel:ProcessNextStorageToPubSubRequest: Request for messages in range " +
CORE::ToString( queuedRequest.startDt ) + " to " + CORE::ToString( queuedRequest.endDt ) );
if ( queuedRequest.vfsPubSubMsgContainersToPush.empty() )
{
if ( !GetPathsToPubSubStorageFiles( queuedRequest.startDt ,
queuedRequest.endDt ,
queuedRequest.vfsPubSubMsgContainersToPush ) )
{
GUCEF_WARNING_LOG( CORE::LOGLEVEL_NORMAL, "StorageChannel:ProcessNextStorageToPubSubRequest: Did not obtain any storage paths for time range " +
queuedRequest.startDt.ToIso8601DateTimeString( true, true ) + " to " + queuedRequest.endDt.ToIso8601DateTimeString( true, true ) );
OnUnableToFullFillStorageToPubSubRequest( queuedRequest );
m_storageToPubSubRequests.pop_back();
return false;
}
}
GUCEF_DEBUG_LOG( CORE::LOGLEVEL_NORMAL, "StorageChannel:ProcessNextStorageToPubSubRequest: Available data in the request range spans " +
CORE::ToString( queuedRequest.vfsPubSubMsgContainersToPush.size() ) + " containers" );
size_t containersProcessed = 0;
CORE::CString::StringSet::iterator n = queuedRequest.vfsPubSubMsgContainersToPush.begin();
while ( n != queuedRequest.vfsPubSubMsgContainersToPush.end() )
{
bool needContainerSubsetOnly = false;
bool containerStartIsInRange = true;
bool containerEndIsInRange = true;
CORE::CDateTime containerFileFirstMsgDt;
CORE::CDateTime containerFileLastMsgDt;
if ( GetStartAndEndFromContainerFilename( (*n), containerFileFirstMsgDt, containerFileLastMsgDt ) )
{
containerStartIsInRange = containerFileFirstMsgDt.IsWithinRange( queuedRequest.startDt, queuedRequest.endDt );
containerEndIsInRange = containerFileLastMsgDt.IsWithinRange( queuedRequest.startDt, queuedRequest.endDt );
needContainerSubsetOnly = !( containerStartIsInRange && containerEndIsInRange );
GUCEF_DEBUG_LOG( CORE::LOGLEVEL_NORMAL, "StorageChannel:ProcessNextStorageToPubSubRequest: Parsed file path container start and end DateTimes. Start=" +
CORE::ToString( containerFileFirstMsgDt ) + ", End=" + CORE::ToString( containerFileLastMsgDt ) + ". containerStartIsInRange=" + CORE::ToString( containerStartIsInRange ) +
", containerEndIsInRange=" + CORE::ToString( containerEndIsInRange ) + ", needContainerSubsetOnly=" + CORE::ToString( needContainerSubsetOnly ) );
}
else
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_NORMAL, "StorageChannel:ProcessNextStorageToPubSubRequest: Failed to parse start and/or end DateTime from file path: " + (*n) );
}
if ( needContainerSubsetOnly )
{
if ( GUCEF_NULL == m_msgReceiveBuffer )
m_msgReceiveBuffer = m_pubsubClient->GetSerializedMsgBuffers().GetNextWriterBuffer( containerStartIsInRange ? containerFileFirstMsgDt : queuedRequest.startDt, true, GUCEF_MT_INFINITE_LOCK_TIMEOUT );
if ( GUCEF_NULL != m_msgReceiveBuffer )
{
if ( LoadStorageFile( (*n), *m_msgReceiveBuffer ) )
{
CORE::UInt32 bytesRead = 0;
COMCORE::CPubSubMsgContainerBinarySerializer::TMsgOffsetIndex originalOffsetIndex;
COMCORE::CPubSubMsgContainerBinarySerializer::DeserializeFooter( originalOffsetIndex, *m_msgReceiveBuffer, bytesRead );
// Since we loaded the entire container we need to now efficiently make sure only the subset gets processed
// The way we can do that is by editing the footer in the buffer to logically eliminate entries we do not need
// This will make it appear as if only the needed entries are in the container to the reader when reading the footer
CORE::UInt32 startIndexOffset = 0;
CORE::UInt32 endIndexOffset = 0;
bool isCorrupted = false;
COMCORE::CPubSubMsgContainerBinarySerializer::TBasicPubSubMsgVector msgs;
if ( COMCORE::CPubSubMsgContainerBinarySerializer::Deserialize( msgs, true, originalOffsetIndex, *m_msgReceiveBuffer, isCorrupted ) )
{
// Check to see how many we need to trim from the start
if ( !containerStartIsInRange )
{
COMCORE::CPubSubMsgContainerBinarySerializer::TBasicPubSubMsgVector::iterator m = msgs.begin();
while ( m != msgs.end() )
{
if ( (*m).GetMsgDateTime() >= queuedRequest.startDt )
break;
++m; ++startIndexOffset;
}
}
if ( !containerEndIsInRange )
{
COMCORE::CPubSubMsgContainerBinarySerializer::TBasicPubSubMsgVector::reverse_iterator m = msgs.rbegin();
while ( m != msgs.rend() )
{
if ( (*m).GetMsgDateTime() <= queuedRequest.endDt )
break;
++m; ++endIndexOffset;
}
}
CORE::UInt32 o2=0;
std::size_t newIndexSize = originalOffsetIndex.size() - ( startIndexOffset + endIndexOffset );
endIndexOffset = (CORE::UInt32) originalOffsetIndex.size() - endIndexOffset;
COMCORE::CPubSubMsgContainerBinarySerializer::TMsgOffsetIndex newOffsetIndex( newIndexSize );
for ( CORE::UInt32 o=startIndexOffset; o<endIndexOffset; ++o )
{
newOffsetIndex[ o2 ] = originalOffsetIndex[ o ];
++o2;
}
// Now we overwrite the footer in the in-memory container to only have the subset of messages we care about referenced
CORE::UInt32 bytesWritten = 0;
if ( COMCORE::CPubSubMsgContainerBinarySerializer::SerializeFooter( newOffsetIndex, m_msgReceiveBuffer->GetDataSize()-1, *m_msgReceiveBuffer, bytesWritten ) )
{
// We are done with this container
++containersProcessed;
m_msgReceiveBuffer = GUCEF_NULL;
}
}
}
}
else
{
// No write buffer available, we need to wait before processing more requests
return false;
}
}
else
{
if ( GUCEF_NULL == m_msgReceiveBuffer )
m_msgReceiveBuffer = m_pubsubClient->GetSerializedMsgBuffers().GetNextWriterBuffer( containerFileFirstMsgDt, true, GUCEF_MT_INFINITE_LOCK_TIMEOUT );
if ( GUCEF_NULL != m_msgReceiveBuffer )
{
GUCEF_DEBUG_LOG( CORE::LOGLEVEL_NORMAL, "StorageChannel:ProcessNextStorageToPubSubRequest: Loading the entire container as-is to serve (part of) the request" );
if ( LoadStorageFile( (*n), *m_msgReceiveBuffer ) )
{
// Since we loaded the entire container and we dont need a subset we are done
++containersProcessed;
m_msgReceiveBuffer = GUCEF_NULL;
}
}
else
{
// No write buffer available, we need to wait before processing more requests
return false;
}
}
++n;
}
if ( containersProcessed != queuedRequest.vfsPubSubMsgContainersToPush.size() )
{
OnUnableToFullFillStorageToPubSubRequest( queuedRequest );
}
m_storageToPubSubRequests.pop_front();
m_pubsubClient->GetSerializedMsgBuffers().SignalEndOfWriting();
}
return true;
}
/*-------------------------------------------------------------------------*/
bool
CStorageChannel::OnTaskCycle( CORE::CICloneable* taskData )
{GUCEF_TRACE;
if ( !m_channelSettings.performPubSubInDedicatedThread )
{
m_pubsubClient->OnTaskCycle( taskData );
}
switch ( m_channelSettings.mode )
{
case TChannelMode::CHANNELMODE_PUBSUB_TO_STORAGE:
{
StoreNextReceivedPubSubBuffer();
break;
}
case TChannelMode::CHANNELMODE_STORAGE_TO_PUBSUB:
{
ProcessNextStorageToPubSubRequest();
break;
}
}
// We are never 'done' so return false
return false;
}
/*-------------------------------------------------------------------------*/
void
CStorageChannel::OnTaskEnding( CORE::CICloneable* taskdata ,
bool willBeForced )
{GUCEF_TRACE;
if ( !m_channelSettings.performPubSubInDedicatedThread )
{
m_pubsubClient->OnTaskEnding( taskdata, willBeForced );
}
else
{
// Since we are the ones that launched the dedicated Redis write thread we should also ask
// to have it cleaned up when we are shutting down this thread
CORE::ThreadPoolPtr threadPool = CORE::CCoreGlobal::Instance()->GetTaskManager().GetThreadPool();
if ( !threadPool->RequestTaskToStop( m_pubsubClient.StaticCast< CORE::CTaskConsumer >(), false ) )
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_CRITICAL, "StorageChannel:OnTaskEnding: Failed to request the dedicated task (dedicated thread) for pub-sub to stop" );
}
else
{
GUCEF_LOG( CORE::LOGLEVEL_NORMAL, "StorageChannel:OnTaskEnding: Successfully requested the dedicated task (dedicated thread) for pub-sub to stop" );
}
}
}
/*-------------------------------------------------------------------------*/
void
CStorageChannel::OnTaskEnded( CORE::CICloneable* taskData ,
bool wasForced )
{GUCEF_TRACE;
delete m_metricsTimer;
m_metricsTimer = GUCEF_NULL;
if ( !m_channelSettings.performPubSubInDedicatedThread )
{
m_pubsubClient->OnTaskEnded( taskData, wasForced );
}
CORE::CTaskConsumer::OnTaskEnded( taskData, wasForced );
}
/*-------------------------------------------------------------------------*/
RestApiPubSub2StorageInfoResource::RestApiPubSub2StorageInfoResource( PubSub2Storage* app )
: WEB::CCodecBasedHTTPServerResource()
, m_app( app )
{GUCEF_TRACE;
m_allowSerialize = true;
}
/*-------------------------------------------------------------------------*/
RestApiPubSub2StorageInfoResource::~RestApiPubSub2StorageInfoResource()
{GUCEF_TRACE;
}
/*-------------------------------------------------------------------------*/
bool
RestApiPubSub2StorageInfoResource::Serialize( const CORE::CString& resourcePath ,
CORE::CDataNode& output ,
const CORE::CString& representation ,
const CORE::CString& params )
{GUCEF_TRACE;
output.SetName( "info" );
output.SetAttribute( "application", "pubsub2storage" );
output.SetAttribute( "appBuildDateTime", PubSub2Storage::GetAppCompileDateTime().ToIso8601DateTimeString( true, true ) );
output.SetAttribute( "platformBuildDateTime", CORE::CDateTime::CompileDateTime().ToIso8601DateTimeString( true, true ) );
#ifdef GUCEF_DEBUG_MODE
output.SetAttribute( "isReleaseBuild", "false" );
#else
output.SetAttribute( "isReleaseBuild", "true" );
#endif
return true;
}
/*-------------------------------------------------------------------------*/
RestApiPubSub2StorageConfigResource::RestApiPubSub2StorageConfigResource( PubSub2Storage* app, bool appConfig )
: WEB::CCodecBasedHTTPServerResource()
, m_app( app )
, m_appConfig( appConfig )
{GUCEF_TRACE;
m_allowSerialize = true;
m_allowDeserialize = true;
}
/*-------------------------------------------------------------------------*/
RestApiPubSub2StorageConfigResource::~RestApiPubSub2StorageConfigResource()
{GUCEF_TRACE;
}
/*-------------------------------------------------------------------------*/
bool
RestApiPubSub2StorageConfigResource::Serialize( const CORE::CString& resourcePath ,
CORE::CDataNode& output ,
const CORE::CString& representation ,
const CORE::CString& params )
{GUCEF_TRACE;
if ( m_appConfig )
{
const CORE::CValueList& loadedConfig = m_app->GetAppConfig();
return loadedConfig.SaveConfig( output );
}
else
{
const CORE::CDataNode& globalConfig = m_app->GetGlobalConfig();
output.Copy( globalConfig );
return true;
}
}
/*-------------------------------------------------------------------------*/
RestApiPubSub2StorageConfigResource::TDeserializeState
RestApiPubSub2StorageConfigResource::Deserialize( const CORE::CString& resourcePath ,
const CORE::CDataNode& input ,
const CORE::CString& representation ,
bool isDeltaUpdateOnly )
{GUCEF_TRACE;
if ( m_appConfig )
{
CORE::CValueList loadedAppConfig;
if ( isDeltaUpdateOnly )
{
// Grab a copy of the current app config
loadedAppConfig = m_app->GetAppConfig();
loadedAppConfig.SetAllowMultipleValues( false );
loadedAppConfig.SetAllowDuplicates( false );
}
else
{
loadedAppConfig.CopySettingsFrom( m_app->GetAppConfig() );
}
if ( loadedAppConfig.LoadConfig( input ) )
{
if ( isDeltaUpdateOnly )
{
loadedAppConfig.SetAllowMultipleValues( m_app->GetAppConfig().GetAllowMultipleValues() );
loadedAppConfig.SetAllowDuplicates( m_app->GetAppConfig().GetAllowDuplicates() );
}
// First put the app in standby mode before we mess with the settings
if ( !m_app->SetStandbyMode( true ) )
return TDeserializeState::DESERIALIZESTATE_UNABLETOUPDATE;
const CORE::CDataNode& globalConfig = m_app->GetGlobalConfig();
if ( m_app->LoadConfig( loadedAppConfig ) )
{
if ( !m_app->IsGlobalStandbyEnabled() )
{
if ( m_app->SetStandbyMode( false ) )
return TDeserializeState::DESERIALIZESTATE_SUCCEEDED;
else
return TDeserializeState::DESERIALIZESTATE_UNABLETOUPDATE;
}
else
{
GUCEF_LOG( CORE::LOGLEVEL_IMPORTANT, "RestApiUdp2RedisConfigResource: IsGlobalStandbyEnabled is true. We will leave the app in standby mode" );
return TDeserializeState::DESERIALIZESTATE_SUCCEEDED;
}
}
else
{
return TDeserializeState::DESERIALIZESTATE_UNABLETOUPDATE;
}
}
return TDeserializeState::DESERIALIZESTATE_CORRUPTEDINPUT;
}
else
{
if ( isDeltaUpdateOnly )
{
//// Grab a copy of the current global config
//CORE::CDataNode globalConfigCopy = m_app->GetGlobalConfig();
//if ( globalConfigCopy.Merge( input ) )
//{
// const CORE::CValueList& loadedAppConfig = m_app->GetAppConfig();
// if ( m_app->LoadConfig( loadedAppConfig, globalConfigCopy ) )
// {
// return TDeserializeState::DESERIALIZESTATE_SUCCEEDED;
// }
// else
// {
// return TDeserializeState::DESERIALIZESTATE_UNABLETOUPDATE;
// }
//}
return TDeserializeState::DESERIALIZESTATE_CORRUPTEDINPUT;
}
else
{
const CORE::CValueList& loadedAppConfig = m_app->GetAppConfig();
if ( m_app->LoadConfig( input ) )
{
return TDeserializeState::DESERIALIZESTATE_SUCCEEDED;
}
else
{
return TDeserializeState::DESERIALIZESTATE_UNABLETOUPDATE;
}
}
}
}
/*-------------------------------------------------------------------------*/
PubSub2Storage::PubSub2Storage( void )
: CORE::CObserver()
, CORE::CIConfigurable()
, m_isInStandby( false )
, m_globalStandbyEnabled( false )
, m_udpStartPort()
, m_channelCount()
, m_storageStartChannelID()
, m_redisStreamName()
, m_redisHost()
, m_redisPort()
, m_channels()
, m_channelSettings()
, m_templateChannelSettings()
, m_httpServer()
, m_httpRouter()
, m_appConfig()
, m_globalConfig()
, m_metricsTimer()
, m_transmitMetrics( true )
{GUCEF_TRACE;
TEventCallback callback1( this, &PubSub2Storage::OnMetricsTimerCycle );
SubscribeTo( &m_metricsTimer ,
CORE::CTimer::TimerUpdateEvent ,
callback1 );
}
/*-------------------------------------------------------------------------*/
PubSub2Storage::~PubSub2Storage()
{GUCEF_TRACE;
m_httpServer.Close();
}
/*-------------------------------------------------------------------------*/
bool
PubSub2Storage::IsGlobalStandbyEnabled( void ) const
{GUCEF_TRACE;
return m_globalStandbyEnabled;
}
/*-------------------------------------------------------------------------*/
bool
PubSub2Storage::Start( void )
{GUCEF_TRACE;
m_isInStandby = true;
bool errorOccured = !SetStandbyMode( m_globalStandbyEnabled );
if ( !errorOccured )
{
GUCEF_LOG( CORE::LOGLEVEL_IMPORTANT, "PubSub2Storage: Opening REST API" );
return m_httpServer.Listen();
}
return !errorOccured;
}
/*-------------------------------------------------------------------------*/
bool
PubSub2Storage::SetStandbyMode( bool putInStandbyMode )
{GUCEF_TRACE;
// Check if we need to do anything
if ( m_isInStandby == putInStandbyMode )
{
GUCEF_LOG( CORE::LOGLEVEL_IMPORTANT, "PubSub2Storage:SetStandbyMode( " + CORE::BoolToString( putInStandbyMode ) + " ): Already in the desired mode (" + CORE::BoolToString( m_isInStandby ) + "), nothing to do" );
return true;
}
if ( putInStandbyMode )
{
bool totalSuccess = true;
CORE::ThreadPoolPtr threadPool = CORE::CCoreGlobal::Instance()->GetTaskManager().GetThreadPool();
// Signal all channel threads to stop gracefully
// Since this standby operation is global not per channel we signal all to stop before
// we starting any waiting operation
StorageChannelMap::iterator i = m_channels.begin();
while ( i != m_channels.end() )
{
CStorageChannelPtr channel = (*i).second;
if ( !threadPool->RequestTaskToStop( channel.StaticCast< CORE::CTaskConsumer >(), false ) )
{
totalSuccess = false;
GUCEF_ERROR_LOG( CORE::LOGLEVEL_IMPORTANT, "PubSub2Storage:SetStandbyMode( true ): Failed to signal task to stop for channel " + CORE::Int32ToString( channel->GetChannelSettings().channelId ) )
}
else
{
GUCEF_LOG( CORE::LOGLEVEL_IMPORTANT, "PubSub2Storage:SetStandbyMode( true ): Requested channel " + CORE::Int32ToString( channel->GetChannelSettings().channelId ) + "'s task to stop" );
}
++i;
}
// Now actually wait for the threads to be finished
i = m_channels.begin();
while ( i != m_channels.end() )
{
CStorageChannelPtr channel = (*i).second;
if ( !channel->WaitForTaskToFinish( 30000 ) )
{
totalSuccess = false;
GUCEF_ERROR_LOG( CORE::LOGLEVEL_IMPORTANT, "PubSub2Storage:SetStandbyMode( true ): Failed to signal task to stop for channel " + CORE::Int32ToString( channel->GetChannelSettings().channelId ) )
}
else
{
GUCEF_LOG( CORE::LOGLEVEL_IMPORTANT, "PubSub2Storage:SetStandbyMode( true ): Successfully waited for channel " + CORE::Int32ToString( channel->GetChannelSettings().channelId ) + "'s task to stop" );
}
++i;
}
m_metricsTimer.SetEnabled( false );
m_isInStandby = totalSuccess;
return totalSuccess;
}
else
{
bool totalSuccess = true;
// Channel config could have changed such that we need to remove channels that should no longer exist
StorageChannelMap::iterator i = m_channels.begin();
while ( i != m_channels.end() )
{
CORE::Int32 channelId = (*i).first;
ChannelSettingsMap::iterator n = m_channelSettings.find( channelId );
if ( n == m_channelSettings.end() )
{
GUCEF_LOG( CORE::LOGLEVEL_IMPORTANT, "PubSub2Storage:SetStandbyMode( false ): Found channel which no longer has corresponding channel settings, deleting channel with ID " + CORE::Int32ToString( channelId ) );
m_channels.erase( i );
i = m_channels.begin();
break;
}
++i;
}
// Alternatively channel config could have changed such that we have new channels
ChannelSettingsMap::iterator n = m_channelSettings.begin();
while ( n != m_channelSettings.end() )
{
CORE::Int32 channelId = (*n).first;
StorageChannelMap::iterator i = m_channels.find( channelId );
if ( i == m_channels.end() )
{
// This is a brand new channel. Lets add the channel object for it
GUCEF_LOG( CORE::LOGLEVEL_IMPORTANT, "PubSub2Storage:SetStandbyMode( false ): Found channel settings whith no corresponding channel object, creating new channel with ID " + CORE::Int32ToString( channelId ) );
m_channels[ channelId ] = CStorageChannelPtr( new CStorageChannel() );
}
++n;
}
CORE::ThreadPoolPtr threadPool = CORE::CCoreGlobal::Instance()->GetTaskManager().GetThreadPool();
n = m_channelSettings.begin();
while ( n != m_channelSettings.end() )
{
CORE::Int32 channelId = (*n).first;
StorageChannelMap::iterator i = m_channels.find( channelId );
if ( i != m_channels.end() )
{
const ChannelSettings& channelSettings = (*n).second;
CStorageChannelPtr channel = (*i).second;
if ( !channel->LoadConfig( channelSettings ) )
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_IMPORTANT, "PubSub2Storage::SetStandbyMode( false ): Failed to set channel settings on channel " + CORE::Int32ToString( channelId ) );
totalSuccess = false;
break;
}
if ( !threadPool->StartTask( channel ) )
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_IMPORTANT, "PubSub2Storage::SetStandbyMode( false ): Failed to start task (dedicated thread) for channel " + CORE::Int32ToString( channelId ) );
totalSuccess = false;
break;
}
}
++n;
}
if ( totalSuccess && m_transmitMetrics )
{
m_metricsTimer.SetInterval( 1000 );
m_metricsTimer.SetEnabled( true );
}
m_isInStandby = !totalSuccess;
return totalSuccess;
}
}
/*-------------------------------------------------------------------------*/
bool
PubSub2Storage::LoadConfig( const CORE::CValueList& appConfig )
{GUCEF_TRACE;
m_globalStandbyEnabled = CORE::StringToBool( appConfig.GetValueAlways( "GlobalStandbyEnabled" ), false );
m_channelCount = CORE::StringToUInt16( CORE::ResolveVars( appConfig.GetValueAlways( "ChannelCount", "1" ) ) );
m_storageStartChannelID = CORE::StringToInt32( CORE::ResolveVars( appConfig.GetValueAlways( "StorageStartChannelID", "1" ) ) );
bool applyCpuThreadAffinityByDefault = CORE::StringToBool( CORE::ResolveVars( appConfig.GetValueAlways( "ApplyCpuThreadAffinityByDefault" ) ), false );
CORE::UInt32 logicalCpuCount = CORE::GetLogicalCPUCount();
CORE::UInt32 currentCpu = 0;
CORE::Int32 maxChannelId = m_storageStartChannelID + m_channelCount;
for ( CORE::Int32 channelId = m_storageStartChannelID; channelId < maxChannelId; ++channelId )
{
ChannelSettings* channelSettings = GUCEF_NULL;
ChannelSettingsMap::iterator s = m_channelSettings.find( channelId );
if ( s == m_channelSettings.end() )
{
channelSettings = &m_channelSettings[ channelId ];
*channelSettings = m_templateChannelSettings;
if ( -1 == channelSettings->channelId )
channelSettings->channelId = channelId;
}
else
{
channelSettings = &m_channelSettings[ channelId ];
}
if ( channelSettings->applyThreadCpuAffinity || applyCpuThreadAffinityByDefault )
{
channelSettings->cpuAffinityForMainChannelThread = currentCpu;
++currentCpu;
if ( currentCpu >= logicalCpuCount ) // Wrap around if we run out of CPUs
currentCpu = 0;
if ( channelSettings->performPubSubInDedicatedThread )
{
channelSettings->cpuAffinityForDedicatedPubSubThread = currentCpu;
++currentCpu;
if ( currentCpu >= logicalCpuCount ) // Wrap around if we run out of CPUs
currentCpu = 0;
}
}
}
m_appConfig = appConfig;
m_httpServer.SetPort( CORE::StringToUInt16( CORE::ResolveVars( appConfig.GetValueAlways( "RestApiPort" ) ), 10000 ) );
m_httpRouter.SetResourceMapping( "/info", RestApiPubSub2StorageInfoResource::THTTPServerResourcePtr( new RestApiPubSub2StorageInfoResource( this ) ) );
m_httpRouter.SetResourceMapping( "/config/appargs", RestApiPubSub2StorageConfigResource::THTTPServerResourcePtr( new RestApiPubSub2StorageConfigResource( this, true ) ) );
m_httpRouter.SetResourceMapping( "/config", RestApiPubSub2StorageConfigResource::THTTPServerResourcePtr( new RestApiPubSub2StorageConfigResource( this, false ) ) );
m_httpRouter.SetResourceMapping( CORE::ResolveVars( appConfig.GetValueAlways( "RestBasicHealthUri", "/health/basic" ) ), RestApiPubSub2StorageConfigResource::THTTPServerResourcePtr( new WEB::CDummyHTTPServerResource() ) );
m_httpServer.GetRouterController()->AddRouterMapping( &m_httpRouter, "", "" );
return true;
}
/*-------------------------------------------------------------------------*/
bool
PubSub2Storage::SaveConfig( CORE::CDataNode& tree ) const
{GUCEF_TRACE;
// not fully supported right now
tree.Copy( m_globalConfig );
return true;
}
/*-------------------------------------------------------------------------*/
bool
PubSub2Storage::LoadConfig( const CORE::CDataNode& cfg )
{GUCEF_TRACE;
TChannelCfgMap channelMap;
CORE::CDataNode::TConstDataNodeSet channelParentCfgs = cfg.FindChildrenOfType( "Channels", true );
CORE::CDataNode::TConstDataNodeSet::iterator i = channelParentCfgs.begin();
while ( i != channelParentCfgs.end() )
{
CORE::CDataNode::const_iterator n = (*i)->ConstBegin();
while ( n != (*i)->ConstEnd() )
{
const CORE::CString& channelIndex = (*n)->GetName();
channelMap[ channelIndex ] = (*n)->FindChildrenOfType( "StorageChannel" );
++n;
}
++i;
}
GUCEF_LOG( CORE::LOGLEVEL_NORMAL, "PubSub2Storage:LoadConfig: Found " + CORE::ToString( channelMap.size() ) + " configuration entries for storage channels" );
// load the template if any
TChannelCfgMap::iterator m = channelMap.find( "*" );
if ( m != channelMap.end() )
{
CORE::CDataNode::TConstDataNodeSet& matches = (*m).second;
if ( !matches.empty() )
{
if ( m_templateChannelSettings.LoadConfig( *(*matches.begin()) ) )
{
GUCEF_LOG( CORE::LOGLEVEL_NORMAL, "PubSub2Storage:LoadConfig: Successfully loaded template config for storage channels" );
}
else
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_CRITICAL, "PubSub2Storage:LoadConfig: Failed to correctly load template config for storage channels" );
return false;
}
}
}
// load the specifically configured channels if any
m = channelMap.begin();
while ( m != channelMap.end() )
{
const CORE::CString& channelIndexStr = (*m).first;
if ( channelIndexStr != '*' )
{
CORE::CDataNode::TConstDataNodeSet& matches = (*m).second;
if ( !matches.empty() )
{
CORE::Int32 channelIndex = CORE::StringToInt32( channelIndexStr );
ChannelSettings& channelSettings = m_channelSettings[ channelIndex ];
if ( channelSettings.LoadConfig( *(*matches.begin()) ) )
{
GUCEF_LOG( CORE::LOGLEVEL_NORMAL, "PubSub2Storage:LoadConfig: Successfully loaded explicit config for storage channels " + channelIndexStr );
}
else
{
GUCEF_ERROR_LOG( CORE::LOGLEVEL_CRITICAL, "PubSub2Storage:LoadConfig: Failed to correctly load explicit config for storage channels " + channelIndexStr );
return false;
}
}
}
++m;
}
m_globalConfig.Copy( cfg );
return true;
}
/*-------------------------------------------------------------------------*/
const CORE::CDateTime&
PubSub2Storage::GetAppCompileDateTime( void )
{GUCEF_TRACE;
static CORE::CDateTime compileDt = CORE::CDateTime::CompileDateTime( __DATE__, __TIME__ );
return compileDt;
}
/*-------------------------------------------------------------------------*/
const CORE::CString&
PubSub2Storage::GetClassTypeName( void ) const
{GUCEF_TRACE;
static const CORE::CString classTypeName = "PubSub2Storage";
return classTypeName;
}
/*-------------------------------------------------------------------------*/
void
PubSub2Storage::OnMetricsTimerCycle( CORE::CNotifier* notifier ,
const CORE::CEvent& eventId ,
CORE::CICloneable* eventData )
{GUCEF_TRACE;
CORE::Int32 channelId = m_storageStartChannelID;
StorageChannelMap::iterator i = m_channels.begin();
while ( i != m_channels.end() )
{
const CStorageChannel::ChannelMetrics& metrics = (*i).second->GetMetrics();
CORE::CString metricPrefix = "pubsub2storage.ch" + CORE::Int32ToString( channelId ) + ".";
//GUCEF_METRIC_TIMING( metricPrefix + "redisErrorReplies", metrics.redisErrorReplies, 1.0f );
//GUCEF_METRIC_TIMING( metricPrefix + "redisMessagesTransmitted", metrics.redisMessagesTransmitted, 1.0f );
//GUCEF_METRIC_TIMING( metricPrefix + "redisPacketsInMessagesTransmitted", metrics.redisPacketsInMsgsTransmitted, 1.0f );
//GUCEF_METRIC_GAUGE( metricPrefix + "redisPacketsInMessagesRatio", metrics.redisPacketsInMsgsRatio, 1.0f );
//GUCEF_METRIC_GAUGE( metricPrefix + "redisTransmitQueueSize", metrics.redisTransmitQueueSize, 1.0f );
//GUCEF_METRIC_TIMING( metricPrefix + "udpBytesReceived", metrics.udpBytesReceived, 1.0f );
//GUCEF_METRIC_TIMING( metricPrefix + "udpPacketsReceived", metrics.udpPacketsReceived, 1.0f );
++i; ++channelId;
}
}
/*-------------------------------------------------------------------------*/
const CORE::CValueList&
PubSub2Storage::GetAppConfig( void ) const
{
return m_appConfig;
}
/*-------------------------------------------------------------------------*/
const CORE::CDataNode&
PubSub2Storage::GetGlobalConfig( void ) const
{
return m_globalConfig;
}
/*-------------------------------------------------------------------------*/
| LiberatorUSA/GUCEF | tools/pubsub2storage/src/pubsub2storage.cpp | C++ | apache-2.0 | 105,495 | [
30522,
1013,
1008,
1008,
23598,
12083,
2475,
23809,
4270,
1024,
2326,
2029,
15210,
2090,
23598,
12083,
1998,
5527,
1008,
1008,
9385,
1006,
1039,
1007,
2687,
1011,
12609,
1012,
26146,
4859,
3158,
15985,
10431,
1008,
1008,
7000,
2104,
1996,
1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
/*
* Qt4 bitcoin GUI.
*
* W.J. van der Laan 2011-2012
* The Bitcoin Developers 2011-2013
*/
#include "walletview.h"
#include "bitcoingui.h"
#include "transactiontablemodel.h"
#include "addressbookpage.h"
#include "sendcoinsdialog.h"
#include "signverifymessagedialog.h"
#include "clientmodel.h"
#include "walletmodel.h"
#include "optionsmodel.h"
#include "transactionview.h"
#include "overviewpage.h"
#include "askpassphrasedialog.h"
#include "ui_interface.h"
#include "blockbrowser.h"
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QAction>
#include <QDesktopServices>
#include <QFileDialog>
#include <QPushButton>
WalletView::WalletView(QWidget *parent, BitcoinGUI *_gui):
QStackedWidget(parent),
gui(_gui),
clientModel(0),
walletModel(0)
{
// Create tabs
overviewPage = new OverviewPage();
blockBrowser = new BlockBrowser(this);
transactionsPage = new QWidget(this);
QVBoxLayout *vbox = new QVBoxLayout();
QHBoxLayout *hbox_buttons = new QHBoxLayout();
transactionView = new TransactionView(this);
vbox->addWidget(transactionView);
QPushButton *exportButton = new QPushButton(tr("&Export"), this);
exportButton->setToolTip(tr("Export the data in the current tab to a file"));
#ifndef Q_OS_MAC // Icons on push buttons are very uncommon on Mac
exportButton->setIcon(QIcon(":/icons/export"));
#endif
hbox_buttons->addStretch();
hbox_buttons->addWidget(exportButton);
vbox->addLayout(hbox_buttons);
transactionsPage->setLayout(vbox);
addressBookPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::SendingTab);
receiveCoinsPage = new AddressBookPage(AddressBookPage::ForEditing, AddressBookPage::ReceivingTab);
sendCoinsPage = new SendCoinsDialog(gui);
signVerifyMessageDialog = new SignVerifyMessageDialog(gui);
addWidget(overviewPage);
addWidget(transactionsPage);
addWidget(addressBookPage);
addWidget(receiveCoinsPage);
addWidget(sendCoinsPage);
addWidget(blockBrowser);
// Clicking on a transaction on the overview page simply sends you to transaction history page
connect(overviewPage, SIGNAL(transactionClicked(QModelIndex)), this, SLOT(gotoHistoryPage()));
connect(overviewPage, SIGNAL(transactionClicked(QModelIndex)), transactionView, SLOT(focusTransaction(QModelIndex)));
// Double-clicking on a transaction on the transaction history page shows details
connect(transactionView, SIGNAL(doubleClicked(QModelIndex)), transactionView, SLOT(showDetails()));
// Clicking on "Send Coins" in the address book sends you to the send coins tab
connect(addressBookPage, SIGNAL(sendCoins(QString)), this, SLOT(gotoSendCoinsPage(QString)));
// Clicking on "Verify Message" in the address book opens the verify message tab in the Sign/Verify Message dialog
connect(addressBookPage, SIGNAL(verifyMessage(QString)), this, SLOT(gotoVerifyMessageTab(QString)));
// Clicking on "Sign Message" in the receive coins page opens the sign message tab in the Sign/Verify Message dialog
connect(receiveCoinsPage, SIGNAL(signMessage(QString)), this, SLOT(gotoSignMessageTab(QString)));
// Clicking on "Export" allows to export the transaction list
connect(exportButton, SIGNAL(clicked()), transactionView, SLOT(exportClicked()));
gotoOverviewPage();
}
WalletView::~WalletView()
{
}
void WalletView::setBitcoinGUI(BitcoinGUI *gui)
{
this->gui = gui;
}
void WalletView::setClientModel(ClientModel *clientModel)
{
this->clientModel = clientModel;
if (clientModel)
{
overviewPage->setClientModel(clientModel);
addressBookPage->setOptionsModel(clientModel->getOptionsModel());
receiveCoinsPage->setOptionsModel(clientModel->getOptionsModel());
}
}
void WalletView::setWalletModel(WalletModel *walletModel)
{
this->walletModel = walletModel;
if (walletModel)
{
// Receive and report messages from wallet thread
connect(walletModel, SIGNAL(message(QString,QString,unsigned int)), gui, SLOT(message(QString,QString,unsigned int)));
// Put transaction list in tabs
transactionView->setModel(walletModel);
overviewPage->setWalletModel(walletModel);
addressBookPage->setModel(walletModel->getAddressTableModel());
receiveCoinsPage->setModel(walletModel->getAddressTableModel());
sendCoinsPage->setModel(walletModel);
signVerifyMessageDialog->setModel(walletModel);
setEncryptionStatus();
connect(walletModel, SIGNAL(encryptionStatusChanged(int)), gui, SLOT(setEncryptionStatus(int)));
// Balloon pop-up for new transaction
connect(walletModel->getTransactionTableModel(), SIGNAL(rowsInserted(QModelIndex,int,int)),
this, SLOT(incomingTransaction(QModelIndex,int,int)));
// Ask for passphrase if needed
connect(walletModel, SIGNAL(requireUnlock()), this, SLOT(unlockWallet()));
}
}
void WalletView::incomingTransaction(const QModelIndex& parent, int start, int /*end*/)
{
// Prevent balloon-spam when initial block download is in progress
if(!walletModel || !clientModel || clientModel->inInitialBlockDownload())
return;
TransactionTableModel *ttm = walletModel->getTransactionTableModel();
QString date = ttm->index(start, TransactionTableModel::Date, parent).data().toString();
qint64 amount = ttm->index(start, TransactionTableModel::Amount, parent).data(Qt::EditRole).toULongLong();
QString type = ttm->index(start, TransactionTableModel::Type, parent).data().toString();
QString address = ttm->index(start, TransactionTableModel::ToAddress, parent).data().toString();
gui->incomingTransaction(date, walletModel->getOptionsModel()->getDisplayUnit(), amount, type, address);
}
void WalletView::gotoOverviewPage()
{
gui->getOverviewAction()->setChecked(true);
setCurrentWidget(overviewPage);
}
void WalletView::gotoHistoryPage()
{
gui->getHistoryAction()->setChecked(true);
setCurrentWidget(transactionsPage);
}
void WalletView::gotoAddressBookPage()
{
gui->getAddressBookAction()->setChecked(true);
setCurrentWidget(addressBookPage);
}
void WalletView::gotoReceiveCoinsPage()
{
gui->getReceiveCoinsAction()->setChecked(true);
setCurrentWidget(receiveCoinsPage);
}
void WalletView::gotoSendCoinsPage(QString addr)
{
gui->getSendCoinsAction()->setChecked(true);
setCurrentWidget(sendCoinsPage);
if (!addr.isEmpty())
sendCoinsPage->setAddress(addr);
}
void WalletView::gotoSignMessageTab(QString addr)
{
// call show() in showTab_SM()
signVerifyMessageDialog->showTab_SM(true);
if (!addr.isEmpty())
signVerifyMessageDialog->setAddress_SM(addr);
}
void WalletView::gotoVerifyMessageTab(QString addr)
{
// call show() in showTab_VM()
signVerifyMessageDialog->showTab_VM(true);
if (!addr.isEmpty())
signVerifyMessageDialog->setAddress_VM(addr);
}
void WalletView::gotoBlockBrowser()
{
gui->getBlockAction()->setChecked(true);
setCurrentWidget(blockBrowser);
}
bool WalletView::handleURI(const QString& strURI)
{
// URI has to be valid
if (sendCoinsPage->handleURI(strURI))
{
gotoSendCoinsPage();
emit showNormalIfMinimized();
return true;
}
else
return false;
}
void WalletView::showOutOfSyncWarning(bool fShow)
{
overviewPage->showOutOfSyncWarning(fShow);
}
void WalletView::setEncryptionStatus()
{
gui->setEncryptionStatus(walletModel->getEncryptionStatus());
}
void WalletView::encryptWallet(bool status)
{
if(!walletModel)
return;
AskPassphraseDialog dlg(status ? AskPassphraseDialog::Encrypt : AskPassphraseDialog::Decrypt, this);
dlg.setModel(walletModel);
dlg.exec();
setEncryptionStatus();
}
void WalletView::backupWallet()
{
QString saveDir = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation);
QString filename = QFileDialog::getSaveFileName(this, tr("Backup Wallet"), saveDir, tr("Wallet Data (*.dat)"));
if (!filename.isEmpty()) {
if (!walletModel->backupWallet(filename)) {
gui->message(tr("Backup Failed"), tr("There was an error trying to save the wallet data to the new location."),
CClientUIInterface::MSG_ERROR);
}
else
gui->message(tr("Backup Successful"), tr("The wallet data was successfully saved to the new location."),
CClientUIInterface::MSG_INFORMATION);
}
}
void WalletView::changePassphrase()
{
AskPassphraseDialog dlg(AskPassphraseDialog::ChangePass, this);
dlg.setModel(walletModel);
dlg.exec();
}
void WalletView::unlockWallet()
{
if(!walletModel)
return;
// Unlock wallet when requested by wallet model
if (walletModel->getEncryptionStatus() == WalletModel::Locked)
{
AskPassphraseDialog dlg(AskPassphraseDialog::Unlock, this);
dlg.setModel(walletModel);
dlg.exec();
}
}
| CryptopiaNZ/DOT | src/qt/walletview.cpp | C++ | mit | 9,034 | [
30522,
1013,
1008,
1008,
1053,
2102,
2549,
2978,
3597,
2378,
26458,
1012,
1008,
1008,
1059,
1012,
1046,
1012,
3158,
4315,
2474,
2319,
2249,
1011,
2262,
1008,
1996,
2978,
3597,
2378,
9797,
2249,
1011,
2286,
1008,
1013,
1001,
2421,
1000,
15... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
#!/usr/bin/python3
import _thread
import RPi.GPIO as GPIO
import socket
import time
from time import sleep
from sys import exit
import datetime
#import MySQLdb
# Start task command
# sleep 30 && python /home/pi/Scripts/Sprinkler/Sprinkler.py > /home/pi/Scripts/Sprinkler/log.txt 2>&1
# Set GPIO output points
Zones = [5, 6, 13, 19]
StatusLED = 16
# Set GPIO input points
CancelButton = 18
WaterSensor = 10
# Water Sensor Enabled?
Sensor = False
#Is it currently raining
isRaining = False
defaultWaitDuration = 0
def setup():
global serversocket,t
# Setup GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(True)
# Input Cancel Button
GPIO.setup(CancelButton, GPIO.IN, pull_up_down=GPIO.PUD_UP)
# Input Rain Sensor
if Sensor:
GPIO.setup(WaterSensor, GPIO.IN, pull_up_down=GPIO.PUD_UP)
# Setup 4 zones on GPIO
# Turn all Zones "OFF"
for i in Zones:
GPIO.setup(i, GPIO.OUT)
GPIO.output(i, GPIO.HIGH)
# Setup status LED
GPIO.setup(StatusLED, GPIO.OUT)
# Setup Sockets
serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
host = socket.gethostname()
port = 9999
serversocket.bind((host, port))
serversocket.listen(5)
addLog("System", "Setup complete")
def mainRun():
global isRaining
addLog("System", "Main Thread started")
# Always check the switch
_thread.start_new_thread(checkSwitch, ((),))
while True:
global serversocket
clientsocket,addr = serversocket.accept()
fromClient = clientsocket.recv(1024)
clientsocket.close()
strFromClient = str(fromClient.decode("ascii"))
addLog("Recived", strFromClient)
# Split incoming message
requestType = strFromClient.split(":")
# Do something with that message
# What was the command?
if(requestType[0] == "WATER"):
# Is it raining
if(isRaining == False):
# Turn off LED if it was raining
statusLED("off")
# Start watering
_thread.start_new_thread(water, (requestType[1], requestType[2], ) )
elif(requestType[0] == "ZONE"):
if(requestType[1] == "ON"):
zone(int(requestType[2]), "ON")
else:
zone(int(requestType[2]), "OFF")
elif(requestType[0] == "RainStatus"):
# Some day we will send something back
print("nothing")
elif(requestType[0] == "QUIT"):
destroy()
# Check switch
def checkSwitch(self):
global isRaining
while True:
state = GPIO.input(CancelButton)
if(state):
if(state != isRaining):
addLog("System", "Switch TRUE")
statusLED("solid")
isRaining = True
else:
if(state != isRaining):
addLog("System", "Switch FALSE")
statusLED("off")
isRaining = False
sleep(2)
# Water the lawn
def water(zoneNum, duration):
# Turn on zone
zone(int(zoneNum), "ON")
statusLED("on")
# Sleep for that amount
sleep(int(duration) * 60)
# Turn off zone
zone(int(zoneNum), "OFF")
statusLED("off")
# Zone Control Setup
def zone(zoneSelect, onoff):
if(onoff == "ON"):
GPIO.output(Zones[zoneSelect], 0)
addLog('Zone ' + str(zoneSelect), 'ON')
else:
GPIO.output(Zones[zoneSelect], 1)
addLog('Zone ' + str(zoneSelect), 'OFF')
def rain():
global isRaining
# Check if it's raining
if Sensor:
if GPIO.input(WaterSensor):
isRaining = True
else:
isRaining = False
def statusLED(status):
if status == "blink":
GPIO.output(StatusLED, GPIO.HIGH)
sleep(0.5)
GPIO.output(StatusLED, GPIO.LOW)
sleep(0.5)
elif status == "solid":
GPIO.output(StatusLED, GPIO.HIGH)
elif status == "off":
GPIO.output(StatusLED, GPIO.LOW)
def addLog(currentZone, addedText):
now = datetime.datetime.now()
print ("{0}: {1}: {2}".format(now, currentZone, addedText))
def destroy():
global serversocket
serversocket.shutdown(socket.SHUT_RDWR)
for i in Zones:
GPIO.output(i, GPIO.LOW)
GPIO.output(StatusLED, GPIO.LOW)
addLog('System', 'Sprinkler Script OFF')
exit()
if __name__ == '__main__':
setup()
try:
mainRun()
except KeyboardInterrupt:
destroy()
finally:
GPIO.cleanup()
exit()
else:
destroy()
| Makerblaker/Sprinkler | server.py | Python | gpl-3.0 | 4,160 | [
30522,
1001,
999,
1013,
2149,
2099,
1013,
8026,
1013,
18750,
2509,
12324,
1035,
11689,
12324,
1054,
8197,
1012,
14246,
3695,
2004,
14246,
30524,
1013,
14255,
1013,
14546,
1013,
11867,
6657,
19099,
2099,
1013,
11867,
6657,
19099,
2099,
1012,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
## lib/PrologEngineWrapper/Makefile -----------------------------*- Makefile -*-
#
# Relative path to the top of the source tree.
#
LEVEL=../..
#
# List all of the subdirectories that we will compile.
#
DIRS=
NO_INSTALL=1
LIBRARYNAME=PrologEngineWrapper
BUILD_ARCHIVE=1
include $(LEVEL)/Makefile.common
LDFLAGS += ${SWIPL_LDFLAGS}
LIBS += ${SWIPL_LIBS}
CPPFLAGS += ${SWIPL_CPPFLAGS}
CXXFLAGS += ${CLANG_OBJ_CXXFLAGS}
CXXFLAGS += ${CLANG_SRC_CXXFLAGS}
CPPFLAGS += ${BOOST_CPPFLAGS}
| gmarpons/Crisp | lib/PrologEngineWrapper/Makefile | Makefile | gpl-3.0 | 486 | [
30522,
1001,
1001,
5622,
2497,
1013,
4013,
21197,
13159,
3170,
13088,
29098,
2121,
1013,
2191,
8873,
2571,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
from ..tools import add_bias, confirm
from ..activation_functions import softmax_function
from ..cost_functions import softmax_neg_loss
import numpy as np
def resilient_backpropagation(network, trainingset, testset, cost_function, ERROR_LIMIT=1e-3, max_iterations = (), weight_step_max = 50., weight_step_min = 0., start_step = 0.5, learn_max = 1.2, learn_min = 0.5, print_rate = 1000, save_trained_network = False ):
# Implemented according to iRprop+
# http://sci2s.ugr.es/keel/pdf/algorithm/articulo/2003-Neuro-Igel-IRprop+.pdf
assert softmax_function != network.layers[-1][1] or cost_function == softmax_neg_loss,\
"When using the `softmax` activation function, the cost function MUST be `softmax_neg_loss`."
assert cost_function != softmax_neg_loss or softmax_function == network.layers[-1][1],\
"When using the `softmax_neg_loss` cost function, the activation function in the final layer MUST be `softmax`."
assert trainingset[0].features.shape[0] == network.n_inputs, \
"ERROR: input size varies from the defined input setting"
assert trainingset[0].targets.shape[0] == network.layers[-1][0], \
"ERROR: output size varies from the defined output setting"
training_data = np.array( [instance.features for instance in trainingset ] )
training_targets = np.array( [instance.targets for instance in trainingset ] )
test_data = np.array( [instance.features for instance in testset ] )
test_targets = np.array( [instance.targets for instance in testset ] )
# Storing the current / previous weight step size
weight_step = [ np.full( weight_layer.shape, start_step ) for weight_layer in network.weights ]
# Storing the current / previous weight update
dW = [ np.ones(shape=weight_layer.shape) for weight_layer in network.weights ]
# Storing the previous derivative
previous_dEdW = [ 1 ] * len( network.weights )
# Storing the previous error measurement
prev_error = ( ) # inf
input_signals, derivatives = network.update( training_data, trace=True )
out = input_signals[-1]
cost_derivative = cost_function(out, training_targets, derivative=True).T
delta = cost_derivative * derivatives[-1]
error = cost_function(network.update( test_data ), test_targets )
n_samples = float(training_data.shape[0])
layer_indexes = range( len(network.layers) )[::-1] # reversed
epoch = 0
while error > ERROR_LIMIT and epoch < max_iterations:
epoch += 1
for i in layer_indexes:
# Loop over the weight layers in reversed order to calculate the deltas
# Calculate the delta with respect to the weights
dEdW = (np.dot( delta, add_bias(input_signals[i]) )/n_samples).T
if i != 0:
"""Do not calculate the delta unnecessarily."""
# Skip the bias weight
weight_delta = np.dot( network.weights[ i ][1:,:], delta )
# Calculate the delta for the subsequent layer
delta = weight_delta * derivatives[i-1]
# Calculate sign changes and note where they have changed
diffs = np.multiply( dEdW, previous_dEdW[i] )
pos_indexes = np.where( diffs > 0 )
neg_indexes = np.where( diffs < 0 )
zero_indexes = np.where( diffs == 0 )
# positive
if np.any(pos_indexes):
# Calculate the weight step size
weight_step[i][pos_indexes] = np.minimum( weight_step[i][pos_indexes] * learn_max, weight_step_max )
# Calculate the weight step direction
dW[i][pos_indexes] = np.multiply( -np.sign( dEdW[pos_indexes] ), weight_step[i][pos_indexes] )
# Apply the weight deltas
network.weights[i][ pos_indexes ] += dW[i][pos_indexes]
# negative
if np.any(neg_indexes):
weight_step[i][neg_indexes] = np.maximum( weight_step[i][neg_indexes] * learn_min, weight_step_min )
if error > prev_error:
# iRprop+ version of resilient backpropagation
network.weights[i][ neg_indexes ] -= dW[i][neg_indexes] # backtrack
dEdW[ neg_indexes ] = 0
# zeros
if np.any(zero_indexes):
dW[i][zero_indexes] = np.multiply( -np.sign( dEdW[zero_indexes] ), weight_step[i][zero_indexes] )
network.weights[i][ zero_indexes ] += dW[i][zero_indexes]
# Store the previous weight step
previous_dEdW[i] = dEdW
#end weight adjustment loop
prev_error = error
input_signals, derivatives = network.update( training_data, trace=True )
out = input_signals[-1]
cost_derivative = cost_function(out, training_targets, derivative=True).T
delta = cost_derivative * derivatives[-1]
error = cost_function(network.update( test_data ), test_targets )
if epoch%print_rate==0:
# Show the current training status
print "[training] Current error:", error, "\tEpoch:", epoch
print "[training] Finished:"
print "[training] Converged to error bound (%.4g) with error %.4g." % ( ERROR_LIMIT, error )
print "[training] Measured quality: %.4g" % network.measure_quality( training_data, training_targets, cost_function )
print "[training] Trained for %d epochs." % epoch
if save_trained_network and confirm( promt = "Do you wish to store the trained network?" ):
network.save_network_to_file()
# end backprop | jorgenkg/python-neural-network | nimblenet/learning_algorithms/resilient_backpropagation.py | Python | bsd-2-clause | 6,265 | [
30522,
2013,
1012,
1012,
5906,
12324,
5587,
1035,
13827,
1010,
12210,
2013,
1012,
1012,
13791,
1035,
4972,
12324,
3730,
17848,
1035,
3853,
2013,
1012,
1012,
3465,
1035,
4972,
12324,
3730,
17848,
1035,
11265,
2290,
1035,
3279,
12324,
16371,
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.