text:
import org.apache.hadoop.io.BytesWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.io.Writable;
import org.apache.hadoop.mapred.lib.db.DBWritable;
import com.cloudera.sqoop.lib.JdbcWritableBridge;
import com.cloudera.sqoop.lib.DelimiterSet;
import com.cloudera.sqoop.lib.FieldFormatter;
import com.cloudera.sqoop.lib.RecordParser;
import com.cloudera.sqoop.lib.BooleanParser;
import com.cloudera.sqoop.lib.BlobRef;
import com.cloudera.sqoop.lib.ClobRef;
import com.cloudera.sqoop.lib.LargeObjectLoader;
import com.cloudera.sqoop.lib.SqoopRecord;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.sql.Date;
import java.sql.Time;
import java.sql.Timestamp;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;

public class customers extends SqoopRecord  implements DBWritable, Writable {
  private final int PROTOCOL_VERSION = 3;
  public int getClassFormatVersion() { return PROTOCOL_VERSION; }
  protected ResultSet __cur_result_set;
  private Integer customer_id;
  public Integer get_customer_id() {
    return customer_id;
  }
  public void set_customer_id(Integer customer_id) {
    this.customer_id = customer_id;
  }
  public customers with_customer_id(Integer customer_id) {
    this.customer_id = customer_id;
    return this;
  }
  private String customer_fname;
  public String get_customer_fname() {
    return customer_fname;
  }
  public void set_customer_fname(String customer_fname) {
    this.customer_fname = customer_fname;
  }
  public customers with_customer_fname(String customer_fname) {
    this.customer_fname = customer_fname;
    return this;
  }
  private String customer_lname;
  public String get_customer_lname() {
    return customer_lname;
  }
  public void set_customer_lname(String customer_lname) {
    this.customer_lname = customer_lname;
  }
  public customers with_customer_lname(String customer_lname) {
    this.customer_lname = customer_lname;
    return this;
  }
  private String customer_email;
  public String get_customer_email() {
    return customer_email;
  }
  public void set_customer_email(String customer_email) {
    this.customer_email = customer_email;
  }
  public customers with_customer_email(String customer_email) {
    this.customer_email = customer_email;
    return this;
  }
  private String customer_password;
  public String get_customer_password() {
    return customer_password;
  }
  public void set_customer_password(String customer_password) {
    this.customer_password = customer_password;
  }
  public customers with_customer_password(String customer_password) {
    this.customer_password = customer_password;
    return this;
  }
  private String customer_street;
  public String get_customer_street() {
    return customer_street;
  }
  public void set_customer_street(String customer_street) {
    this.customer_street = customer_street;
  }
  public customers with_customer_street(String customer_street) {
    this.customer_street = customer_street;
    return this;
  }
  private String customer_city;
  public String get_customer_city() {
    return customer_city;
  }
  public void set_customer_city(String customer_city) {
    this.customer_city = customer_city;
  }
  public customers with_customer_city(String customer_city) {
    this.customer_city = customer_city;
    return this;
  }
  private String customer_state;
  public String get_customer_state() {
    return customer_state;
  }
  public void set_customer_state(String customer_state) {
    this.customer_state = customer_state;
  }
  public customers with_customer_state(String customer_state) {
    this.customer_state = customer_state;
    return this;
  }
  private String customer_zipcode;
  public String get_customer_zipcode() {
    return customer_zipcode;
  }
  public void set_customer_zipcode(String customer_zipcode) {
    this.customer_zipcode = customer_zipcode;
  }
  public customers with_customer_zipcode(String customer_zipcode) {
    this.customer_zipcode = customer_zipcode;
    return this;
  }
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (!(o instanceof customers)) {
      return false;
    }
    customers that = (customers) o;
    boolean equal = true;
    equal = equal && (this.customer_id == null ? that.customer_id == null : this.customer_id.equals(that.customer_id));
    equal = equal && (this.customer_fname == null ? that.customer_fname == null : this.customer_fname.equals(that.customer_fname));
    equal = equal && (this.customer_lname == null ? that.customer_lname == null : this.customer_lname.equals(that.customer_lname));
    equal = equal && (this.customer_email == null ? that.customer_email == null : this.customer_email.equals(that.customer_email));
    equal = equal && (this.customer_password == null ? that.customer_password == null : this.customer_password.equals(that.customer_password));
    equal = equal && (this.customer_street == null ? that.customer_street == null : this.customer_street.equals(that.customer_street));
    equal = equal && (this.customer_city == null ? that.customer_city == null : this.customer_city.equals(that.customer_city));
    equal = equal && (this.customer_state == null ? that.customer_state == null : this.customer_state.equals(that.customer_state));
    equal = equal && (this.customer_zipcode == null ? that.customer_zipcode == null : this.customer_zipcode.equals(that.customer_zipcode));
    return equal;
  }
  public boolean equals0(Object o) {
    if (this == o) {
      return true;
    }
    if (!(o instanceof customers)) {
      return false;
    }
    customers that = (customers) o;
    boolean equal = true;
    equal = equal && (this.customer_id == null ? that.customer_id == null : this.customer_id.equals(that.customer_id));
    equal = equal && (this.customer_fname == null ? that.customer_fname == null : this.customer_fname.equals(that.customer_fname));
    equal = equal && (this.customer_lname == null ? that.customer_lname == null : this.customer_lname.equals(that.customer_lname));
    equal = equal && (this.customer_email == null ? that.customer_email == null : this.customer_email.equals(that.customer_email));
    equal = equal && (this.customer_password == null ? that.customer_password == null : this.customer_password.equals(that.customer_password));
    equal = equal && (this.customer_street == null ? that.customer_street == null : this.customer_street.equals(that.customer_street));
    equal = equal && (this.customer_city == null ? that.customer_city == null : this.customer_city.equals(that.customer_city));
    equal = equal && (this.customer_state == null ? that.customer_state == null : this.customer_state.equals(that.customer_state));
    equal = equal && (this.customer_zipcode == null ? that.customer_zipcode == null : this.customer_zipcode.equals(that.customer_zipcode));
    return equal;
  }
  public void readFields(ResultSet __dbResults) throws SQLException {
    this.__cur_result_set = __dbResults;
    this.customer_id = JdbcWritableBridge.readInteger(1, __dbResults);
    this.customer_fname = JdbcWritableBridge.readString(2, __dbResults);
    this.customer_lname = JdbcWritableBridge.readString(3, __dbResults);
    this.customer_email = JdbcWritableBridge.readString(4, __dbResults);
    this.customer_password = JdbcWritableBridge.readString(5, __dbResults);
    this.customer_street = JdbcWritableBridge.readString(6, __dbResults);
    this.customer_city = JdbcWritableBridge.readString(7, __dbResults);
    this.customer_state = JdbcWritableBridge.readString(8, __dbResults);
    this.customer_zipcode = JdbcWritableBridge.readString(9, __dbResults);
  }
  public void readFields0(ResultSet __dbResults) throws SQLException {
    this.customer_id = JdbcWritableBridge.readInteger(1, __dbResults);
    this.customer_fname = JdbcWritableBridge.readString(2, __dbResults);
    this.customer_lname = JdbcWritableBridge.readString(3, __dbResults);
    this.customer_email = JdbcWritableBridge.readString(4, __dbResults);
    this.customer_password = JdbcWritableBridge.readString(5, __dbResults);
    this.customer_street = JdbcWritableBridge.readString(6, __dbResults);
    this.customer_city = JdbcWritableBridge.readString(7, __dbResults);
    this.customer_state = JdbcWritableBridge.readString(8, __dbResults);
    this.customer_zipcode = JdbcWritableBridge.readString(9, __dbResults);
  }
  public void loadLargeObjects(LargeObjectLoader __loader)
      throws SQLException, IOException, InterruptedException {
  }
  public void loadLargeObjects0(LargeObjectLoader __loader)
      throws SQLException, IOException, InterruptedException {
  }
  public void write(PreparedStatement __dbStmt) throws SQLException {
    write(__dbStmt, 0);
  }

  public int write(PreparedStatement __dbStmt, int __off) throws SQLException {
    JdbcWritableBridge.writeInteger(customer_id, 1 + __off, 4, __dbStmt);
    JdbcWritableBridge.writeString(customer_fname, 2 + __off, 12, __dbStmt);
    JdbcWritableBridge.writeString(customer_lname, 3 + __off, 12, __dbStmt);
    JdbcWritableBridge.writeString(customer_email, 4 + __off, 12, __dbStmt);
    JdbcWritableBridge.writeString(customer_password, 5 + __off, 12, __dbStmt);
    JdbcWritableBridge.writeString(customer_street, 6 + __off, 12, __dbStmt);
    JdbcWritableBridge.writeString(customer_city, 7 + __off, 12, __dbStmt);
    JdbcWritableBridge.writeString(customer_state, 8 + __off, 12, __dbStmt);
    JdbcWritableBridge.writeString(customer_zipcode, 9 + __off, 12, __dbStmt);
    return 9;
  }
  public void write0(PreparedStatement __dbStmt, int __off) throws SQLException {
    JdbcWritableBridge.writeInteger(customer_id, 1 + __off, 4, __dbStmt);
    JdbcWritableBridge.writeString(customer_fname, 2 + __off, 12, __dbStmt);
    JdbcWritableBridge.writeString(customer_lname, 3 + __off, 12, __dbStmt);
    JdbcWritableBridge.writeString(customer_email, 4 + __off, 12, __dbStmt);
    JdbcWritableBridge.writeString(customer_password, 5 + __off, 12, __dbStmt);
    JdbcWritableBridge.writeString(customer_street, 6 + __off, 12, __dbStmt);
    JdbcWritableBridge.writeString(customer_city, 7 + __off, 12, __dbStmt);
    JdbcWritableBridge.writeString(customer_state, 8 + __off, 12, __dbStmt);
    JdbcWritableBridge.writeString(customer_zipcode, 9 + __off, 12, __dbStmt);
  }
  public void readFields(DataInput __dataIn) throws IOException {
this.readFields0(__dataIn);  }
  public void readFields0(DataInput __dataIn) throws IOException {
    if (__dataIn.readBoolean()) {
        this.customer_id = null;
    } else {
    this.customer_id = Integer.valueOf(__dataIn.readInt());
    }
    if (__dataIn.readBoolean()) {
        this.customer_fname = null;
    } else {
    this.customer_fname = Text.readString(__dataIn);
    }
    if (__dataIn.readBoolean()) {
        this.customer_lname = null;
    } else {
    this.customer_lname = Text.readString(__dataIn);
    }
    if (__dataIn.readBoolean()) {
        this.customer_email = null;
    } else {
    this.customer_email = Text.readString(__dataIn);
    }
    if (__dataIn.readBoolean()) {
        this.customer_password = null;
    } else {
    this.customer_password = Text.readString(__dataIn);
    }
    if (__dataIn.readBoolean()) {
        this.customer_street = null;
    } else {
    this.customer_street = Text.readString(__dataIn);
    }
    if (__dataIn.readBoolean()) {
        this.customer_city = null;
    } else {
    this.customer_city = Text.readString(__dataIn);
    }
    if (__dataIn.readBoolean()) {
        this.customer_state = null;
    } else {
    this.customer_state = Text.readString(__dataIn);
    }
    if (__dataIn.readBoolean()) {
        this.customer_zipcode = null;
    } else {
    this.customer_zipcode = Text.readString(__dataIn);
    }
  }
  public void write(DataOutput __dataOut) throws IOException {
    if (null == this.customer_id) {
        __dataOut.writeBoolean(true);
    } else {
        __dataOut.writeBoolean(false);
    __dataOut.writeInt(this.customer_id);
    }
    if (null == this.customer_fname) {
        __dataOut.writeBoolean(true);
    } else {
        __dataOut.writeBoolean(false);
    Text.writeString(__dataOut, customer_fname);
    }
    if (null == this.customer_lname) {
        __dataOut.writeBoolean(true);
    } else {
        __dataOut.writeBoolean(false);
    Text.writeString(__dataOut, customer_lname);
    }
    if (null == this.customer_email) {
        __dataOut.writeBoolean(true);
    } else {
        __dataOut.writeBoolean(false);
    Text.writeString(__dataOut, customer_email);
    }
    if (null == this.customer_password) {
        __dataOut.writeBoolean(true);
    } else {
        __dataOut.writeBoolean(false);
    Text.writeString(__dataOut, customer_password);
    }
    if (null == this.customer_street) {
        __dataOut.writeBoolean(true);
    } else {
        __dataOut.writeBoolean(false);
    Text.writeString(__dataOut, customer_street);
    }
    if (null == this.customer_city) {
        __dataOut.writeBoolean(true);
    } else {
        __dataOut.writeBoolean(false);
    Text.writeString(__dataOut, customer_city);
    }
    if (null == this.customer_state) {
        __dataOut.writeBoolean(true);
    } else {
        __dataOut.writeBoolean(false);
    Text.writeString(__dataOut, customer_state);
    }
    if (null == this.customer_zipcode) {
        __dataOut.writeBoolean(true);
    } else {
        __dataOut.writeBoolean(false);
    Text.writeString(__dataOut, customer_zipcode);
    }
  }
  public void write0(DataOutput __dataOut) throws IOException {
    if (null == this.customer_id) {
        __dataOut.writeBoolean(true);
    } else {
        __dataOut.writeBoolean(false);
    __dataOut.writeInt(this.customer_id);
    }
    if (null == this.customer_fname) {
        __dataOut.writeBoolean(true);
    } else {
        __dataOut.writeBoolean(false);
    Text.writeString(__dataOut, customer_fname);
    }
    if (null == this.customer_lname) {
        __dataOut.writeBoolean(true);
    } else {
        __dataOut.writeBoolean(false);
    Text.writeString(__dataOut, customer_lname);
    }
    if (null == this.customer_email) {
        __dataOut.writeBoolean(true);
    } else {
        __dataOut.writeBoolean(false);
    Text.writeString(__dataOut, customer_email);
    }
    if (null == this.customer_password) {
        __dataOut.writeBoolean(true);
    } else {
        __dataOut.writeBoolean(false);
    Text.writeString(__dataOut, customer_password);
    }
    if (null == this.customer_street) {
        __dataOut.writeBoolean(true);
    } else {
        __dataOut.writeBoolean(false);
    Text.writeString(__dataOut, customer_street);
    }
    if (null == this.customer_city) {
        __dataOut.writeBoolean(true);
    } else {
        __dataOut.writeBoolean(false);
    Text.writeString(__dataOut, customer_city);
    }
    if (null == this.customer_state) {
        __dataOut.writeBoolean(true);
    } else {
        __dataOut.writeBoolean(false);
    Text.writeString(__dataOut, customer_state);
    }
    if (null == this.customer_zipcode) {
        __dataOut.writeBoolean(true);
    } else {
        __dataOut.writeBoolean(false);
    Text.writeString(__dataOut, customer_zipcode);
    }
  }
  private static final DelimiterSet __outputDelimiters = new DelimiterSet((char) 44, (char) 10, (char) 0, (char) 0, false);
  public String toString() {
    return toString(__outputDelimiters, true);
  }
  public String toString(DelimiterSet delimiters) {
    return toString(delimiters, true);
  }
  public String toString(boolean useRecordDelim) {
    return toString(__outputDelimiters, useRecordDelim);
  }
  public String toString(DelimiterSet delimiters, boolean useRecordDelim) {
    StringBuilder __sb = new StringBuilder();
    char fieldDelim = delimiters.getFieldsTerminatedBy();
    __sb.append(FieldFormatter.escapeAndEnclose(customer_id==null?"null":"" + customer_id, delimiters));
    __sb.append(fieldDelim);
    __sb.append(FieldFormatter.escapeAndEnclose(customer_fname==null?"null":customer_fname, delimiters));
    __sb.append(fieldDelim);
    __sb.append(FieldFormatter.escapeAndEnclose(customer_lname==null?"null":customer_lname, delimiters));
    __sb.append(fieldDelim);
    __sb.append(FieldFormatter.escapeAndEnclose(customer_email==null?"null":customer_email, delimiters));
    __sb.append(fieldDelim);
    __sb.append(FieldFormatter.escapeAndEnclose(customer_password==null?"null":customer_password, delimiters));
    __sb.append(fieldDelim);
    __sb.append(FieldFormatter.escapeAndEnclose(customer_street==null?"null":customer_street, delimiters));
    __sb.append(fieldDelim);
    __sb.append(FieldFormatter.escapeAndEnclose(customer_city==null?"null":customer_city, delimiters));
    __sb.append(fieldDelim);
    __sb.append(FieldFormatter.escapeAndEnclose(customer_state==null?"null":customer_state, delimiters));
    __sb.append(fieldDelim);
    __sb.append(FieldFormatter.escapeAndEnclose(customer_zipcode==null?"null":customer_zipcode, delimiters));
    if (useRecordDelim) {
      __sb.append(delimiters.getLinesTerminatedBy());
    }
    return __sb.toString();
  }
  public void toString0(DelimiterSet delimiters, StringBuilder __sb, char fieldDelim) {
    __sb.append(FieldFormatter.escapeAndEnclose(customer_id==null?"null":"" + customer_id, delimiters));
    __sb.append(fieldDelim);
    __sb.append(FieldFormatter.escapeAndEnclose(customer_fname==null?"null":customer_fname, delimiters));
    __sb.append(fieldDelim);
    __sb.append(FieldFormatter.escapeAndEnclose(customer_lname==null?"null":customer_lname, delimiters));
    __sb.append(fieldDelim);
    __sb.append(FieldFormatter.escapeAndEnclose(customer_email==null?"null":customer_email, delimiters));
    __sb.append(fieldDelim);
    __sb.append(FieldFormatter.escapeAndEnclose(customer_password==null?"null":customer_password, delimiters));
    __sb.append(fieldDelim);
    __sb.append(FieldFormatter.escapeAndEnclose(customer_street==null?"null":customer_street, delimiters));
    __sb.append(fieldDelim);
    __sb.append(FieldFormatter.escapeAndEnclose(customer_city==null?"null":customer_city, delimiters));
    __sb.append(fieldDelim);
    __sb.append(FieldFormatter.escapeAndEnclose(customer_state==null?"null":customer_state, delimiters));
    __sb.append(fieldDelim);
    __sb.append(FieldFormatter.escapeAndEnclose(customer_zipcode==null?"null":customer_zipcode, delimiters));
  }
  private static final DelimiterSet __inputDelimiters = new DelimiterSet((char) 44, (char) 10, (char) 0, (char) 0, false);
  private RecordParser __parser;
  public void parse(Text __record) throws RecordParser.ParseError {
    if (null == this.__parser) {
      this.__parser = new RecordParser(__inputDelimiters);
    }
    List<String> __fields = this.__parser.parseRecord(__record);
    __loadFromFields(__fields);
  }

  public void parse(CharSequence __record) throws RecordParser.ParseError {
    if (null == this.__parser) {
      this.__parser = new RecordParser(__inputDelimiters);
    }
    List<String> __fields = this.__parser.parseRecord(__record);
    __loadFromFields(__fields);
  }

  public void parse(byte [] __record) throws RecordParser.ParseError {
    if (null == this.__parser) {
      this.__parser = new RecordParser(__inputDelimiters);
    }
    List<String> __fields = this.__parser.parseRecord(__record);
    __loadFromFields(__fields);
  }

  public void parse(char [] __record) throws RecordParser.ParseError {
    if (null == this.__parser) {
      this.__parser = new RecordParser(__inputDelimiters);
    }
    List<String> __fields = this.__parser.parseRecord(__record);
    __loadFromFields(__fields);
  }

  public void parse(ByteBuffer __record) throws RecordParser.ParseError {
    if (null == this.__parser) {
      this.__parser = new RecordParser(__inputDelimiters);
    }
    List<String> __fields = this.__parser.parseRecord(__record);
    __loadFromFields(__fields);
  }

  public void parse(CharBuffer __record) throws RecordParser.ParseError {
    if (null == this.__parser) {
      this.__parser = new RecordParser(__inputDelimiters);
    }
    List<String> __fields = this.__parser.parseRecord(__record);
    __loadFromFields(__fields);
  }

  private void __loadFromFields(List<String> fields) {
    Iterator<String> __it = fields.listIterator();
    String __cur_str = null;
    try {
    __cur_str = __it.next();
    if (__cur_str.equals("null") || __cur_str.length() == 0) { this.customer_id = null; } else {
      this.customer_id = Integer.valueOf(__cur_str);
    }

    __cur_str = __it.next();
    if (__cur_str.equals("null")) { this.customer_fname = null; } else {
      this.customer_fname = __cur_str;
    }

    __cur_str = __it.next();
    if (__cur_str.equals("null")) { this.customer_lname = null; } else {
      this.customer_lname = __cur_str;
    }

    __cur_str = __it.next();
    if (__cur_str.equals("null")) { this.customer_email = null; } else {
      this.customer_email = __cur_str;
    }

    __cur_str = __it.next();
    if (__cur_str.equals("null")) { this.customer_password = null; } else {
      this.customer_password = __cur_str;
    }

    __cur_str = __it.next();
    if (__cur_str.equals("null")) { this.customer_street = null; } else {
      this.customer_street = __cur_str;
    }

    __cur_str = __it.next();
    if (__cur_str.equals("null")) { this.customer_city = null; } else {
      this.customer_city = __cur_str;
    }

    __cur_str = __it.next();
    if (__cur_str.equals("null")) { this.customer_state = null; } else {
      this.customer_state = __cur_str;
    }

    __cur_str = __it.next();
    if (__cur_str.equals("null")) { this.customer_zipcode = null; } else {
      this.customer_zipcode = __cur_str;
    }

    } catch (RuntimeException e) {    throw new RuntimeException("Can't parse input data: '" + __cur_str + "'", e);    }  }

  private void __loadFromFields0(Iterator<String> __it) {
    String __cur_str = null;
    try {
    __cur_str = __it.next();
    if (__cur_str.equals("null") || __cur_str.length() == 0) { this.customer_id = null; } else {
      this.customer_id = Integer.valueOf(__cur_str);
    }

    __cur_str = __it.next();
    if (__cur_str.equals("null")) { this.customer_fname = null; } else {
      this.customer_fname = __cur_str;
    }

    __cur_str = __it.next();
    if (__cur_str.equals("null")) { this.customer_lname = null; } else {
      this.customer_lname = __cur_str;
    }

    __cur_str = __it.next();
    if (__cur_str.equals("null")) { this.customer_email = null; } else {
      this.customer_email = __cur_str;
    }

    __cur_str = __it.next();
    if (__cur_str.equals("null")) { this.customer_password = null; } else {
      this.customer_password = __cur_str;
    }

    __cur_str = __it.next();
    if (__cur_str.equals("null")) { this.customer_street = null; } else {
      this.customer_street = __cur_str;
    }

    __cur_str = __it.next();
    if (__cur_str.equals("null")) { this.customer_city = null; } else {
      this.customer_city = __cur_str;
    }

    __cur_str = __it.next();
    if (__cur_str.equals("null")) { this.customer_state = null; } else {
      this.customer_state = __cur_str;
    }

    __cur_str = __it.next();
    if (__cur_str.equals("null")) { this.customer_zipcode = null; } else {
      this.customer_zipcode = __cur_str;
    }

    } catch (RuntimeException e) {    throw new RuntimeException("Can't parse input data: '" + __cur_str + "'", e);    }  }

  public Object clone() throws CloneNotSupportedException {
    customers o = (customers) super.clone();
    return o;
  }

  public void clone0(customers o) throws CloneNotSupportedException {
  }

  public Map<String, Object> getFieldMap() {
    Map<String, Object> __sqoop$field_map = new TreeMap<String, Object>();
    __sqoop$field_map.put("customer_id", this.customer_id);
    __sqoop$field_map.put("customer_fname", this.customer_fname);
    __sqoop$field_map.put("customer_lname", this.customer_lname);
    __sqoop$field_map.put("customer_email", this.customer_email);
    __sqoop$field_map.put("customer_password", this.customer_password);
    __sqoop$field_map.put("customer_street", this.customer_street);
    __sqoop$field_map.put("customer_city", this.customer_city);
    __sqoop$field_map.put("customer_state", this.customer_state);
    __sqoop$field_map.put("customer_zipcode", this.customer_zipcode);
    return __sqoop$field_map;
  }

  public void getFieldMap0(Map<String, Object> __sqoop$field_map) {
    __sqoop$field_map.put("customer_id", this.customer_id);
    __sqoop$field_map.put("customer_fname", this.customer_fname);
    __sqoop$field_map.put("customer_lname", this.customer_lname);
    __sqoop$field_map.put("customer_email", this.customer_email);
    __sqoop$field_map.put("customer_password", this.customer_password);
    __sqoop$field_map.put("customer_street", this.customer_street);
    __sqoop$field_map.put("customer_city", this.customer_city);
    __sqoop$field_map.put("customer_state", this.customer_state);
    __sqoop$field_map.put("customer_zipcode", this.customer_zipcode);
  }

  public void setField(String __fieldName, Object __fieldVal) {
    if ("customer_id".equals(__fieldName)) {
      this.customer_id = (Integer) __fieldVal;
    }
    else    if ("customer_fname".equals(__fieldName)) {
      this.customer_fname = (String) __fieldVal;
    }
    else    if ("customer_lname".equals(__fieldName)) {
      this.customer_lname = (String) __fieldVal;
    }
    else    if ("customer_email".equals(__fieldName)) {
      this.customer_email = (String) __fieldVal;
    }
    else    if ("customer_password".equals(__fieldName)) {
      this.customer_password = (String) __fieldVal;
    }
    else    if ("customer_street".equals(__fieldName)) {
      this.customer_street = (String) __fieldVal;
    }
    else    if ("customer_city".equals(__fieldName)) {
      this.customer_city = (String) __fieldVal;
    }
    else    if ("customer_state".equals(__fieldName)) {
      this.customer_state = (String) __fieldVal;
    }
    else    if ("customer_zipcode".equals(__fieldName)) {
      this.customer_zipcode = (String) __fieldVal;
    }
    else {
      throw new RuntimeException("No such field: " + __fieldName);
    }
  }
  public boolean setField0(String __fieldName, Object __fieldVal) {
    if ("customer_id".equals(__fieldName)) {
      this.customer_id = (Integer) __fieldVal;
      return true;
    }
    else    if ("customer_fname".equals(__fieldName)) {
      this.customer_fname = (String) __fieldVal;
      return true;
    }
    else    if ("customer_lname".equals(__fieldName)) {
      this.customer_lname = (String) __fieldVal;
      return true;
    }
    else    if ("customer_email".equals(__fieldName)) {
      this.customer_email = (String) __fieldVal;
      return true;
    }
    else    if ("customer_password".equals(__fieldName)) {
      this.customer_password = (String) __fieldVal;
      return true;
    }
    else    if ("customer_street".equals(__fieldName)) {
      this.customer_street = (String) __fieldVal;
      return true;
    }
    else    if ("customer_city".equals(__fieldName)) {
      this.customer_city = (String) __fieldVal;
      return true;
    }
    else    if ("customer_state".equals(__fieldName)) {
      this.customer_state = (String) __fieldVal;
      return true;
    }
    else    if ("customer_zipcode".equals(__fieldName)) {
      this.customer_zipcode = (String) __fieldVal;
      return true;
    }
    else {
      return false;    }
  }
}


text:
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { CreateOrderPresalePage } from './create-order-presale';

@NgModule({
  declarations: [
    CreateOrderPresalePage,
  ],
  imports: [
    IonicPageModule.forChild(CreateOrderPresalePage),
  ],
  exports: [
    CreateOrderPresalePage
  ]
})
export class CreateOrderPresalePageModule {}

redpajama_set_name: RedPajamaGithub


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

/**
 * MetadataCache is a map from url to an object containing properties.
 * Properties are divided by types, and all properties of one type are accessed
 * at once.
 * Some of the properties:
 * {
 *   filesystem: size, modificationTime, icon
 *   internal: presence
 *   gdata: pinned, present, hosted, editUrl, contentUrl, availableOffline
 *   thumbnail: url, transform
 *   media: artist, album, title
 * }
 *
 * Typical usages:
 * {
 *   cache.get([entry1, entry2], 'gdata', function(gdata) {
 *     if (gdata[0].pinned && gdata[1].pinned) alert("They are both pinned!");
 *   });
 *
 *   cache.set(entry, 'internal', {presence: 'deleted'});
 *
 *   cache.clear([fileUrl1, fileUrl2], 'filesystem');
 *
 *   // Getting fresh value.
 *   cache.clear(entry, 'thumbnail');
 *   cache.get(entry, 'thumbnail', function(thumbnail) {
 *     img.src = thumbnail.url;
 *   });
 * }
 *
 * TODO(dgozman): eviction.
 * @constructor
 */
function MetadataCache() {
  /**
   * Map from urls to entries. Entry contains |properties| - an hierarchical
   * object of values, and an object for each metadata provider:
   * <prodiver-id>: { time, callbacks }
   * @private
   */
  this.cache_ = {};

  /**
   * List of metadata providers.
   * @private
   */
  this.providers_ = [];

  /**
   * List of observers added. Each one is an object with fields:
   *   re - regexp of urls;
   *   type - metadata type;
   *   callback - the callback.
   * TODO(dgozman): pass entries to observer if present.
   * @private
   */
  this.observers_ = [];
  this.observerId_ = 0;

  this.batchCount_ = 0;
}

/**
 * Observer type: it will be notified if the url changed is exactlt the same
 * as the url passed.
 */
MetadataCache.EXACT = 0;

/**
 * Observer type: it will be notified if the url changed is an immediate child
 * of the url passed.
 */
MetadataCache.CHILDREN = 1;

/**
 * Observer type: it will be notified if the url changed is any descendant
 * of the url passed.
 */
MetadataCache.DESCENDANTS = 2;

/**
 * @return {MetadataCache!} The cache with all providers.
 */
MetadataCache.createFull = function() {
  var cache = new MetadataCache();
  cache.providers_.push(new FilesystemProvider());
  cache.providers_.push(new GDataProvider());
  return cache;
};

/**
 * Fetches the metadata, puts it in the cache, and passes to callback.
 * If required metadata is already in the cache, does not fetch it again.
 * @param {string|Entry|Array.<string|Entry>} items The list of entries or
 *     file urls. May be just a single item.
 * @param {string} type The metadata type.
 * @param {Function(Object)} callback The metadata is passed to callback.
 */
MetadataCache.prototype.get = function(items, type, callback) {
  if (!(items instanceof Array)) {
    this.getOne(items, type, callback);
    return;
  }

  if (items.length == 0) {
    if (callback) callback([]);
    return;
  }

  var result = [];
  var remaining = items.length;
  this.startBatchUpdates();

  function onOneItem(index, value) {
    result[index] = value;
    remaining--;
    if (remaining == 0) {
      this.endBatchUpdates();
      if (callback) setTimeout(callback, 0, result);
    }
  }

  for (var index = 0; index < items.length; index++) {
    result.push(null);
    this.getOne(items[index], type, onOneItem.bind(this, index));
  }
};

/**
 * Fetches the metadata for one Entry/FileUrl. See comments to |get|.
 * @param {Entry|string} item The entry or url.
 * @param {string} type Metadata type.
 * @param {Function(Object)} callback The callback.
 */
MetadataCache.prototype.getOne = function(item, type, callback) {
  var url = this.itemToUrl_(item);

  // Passing entry to fetchers may save one round-trip to APIs.
  var fsEntry = item === url ? null : item;
  callback = callback || function() {};

  if (!(url in this.cache_))
    this.cache_[url] = this.createEmptyEntry_();

  var entry = this.cache_[url];

  if (type in entry.properties) {
    callback(entry.properties[type]);
    return;
  }

  this.startBatchUpdates();
  var providers = this.providers_.slice();
  var currentProvider;
  var self = this;

  function onFetched() {
    if (type in entry.properties) {
      self.endBatchUpdates();
      // Got properties from provider.
      callback(entry.properties[type]);
    } else {
      tryNextProvider();
    }
  }

  function onProviderProperties(properties) {
    var id = currentProvider.getId();
    var fetchedCallbacks = entry[id].callbacks;
    delete entry[id].callbacks;
    entry[id].time = new Date();
    self.mergeProperties_(url, properties);

    for (var index = 0; index < fetchedCallbacks.length; index++) {
      fetchedCallbacks[index]();
    }
  }

  function queryProvider() {
    var id = currentProvider.getId();
    if ('callbacks' in entry[id]) {
      // We are querying this provider now.
      entry[id].callbacks.push(onFetched);
    } else {
      entry[id].callbacks = [onFetched];
      currentProvider.fetch(url, type, onProviderProperties, fsEntry);
    }
  }

  function tryNextProvider() {
    if (providers.length == 0) {
      self.endBatchUpdates();
      callback(entry.properties[type] || null);
      return;
    }

    currentProvider = providers.shift();
    if (currentProvider.supportsUrl(url) &&
        currentProvider.providesType(type)) {
      queryProvider();
    } else {
      tryNextProvider();
    }
  }

  tryNextProvider();
};

/**
 * Returns the cached metadata value, or |null| if not present.
 * @param {string|Entry|Array.<string|Entry>} items The list of entries or
 *     file urls. May be just a single item.
 * @param {string} type The metadata type.
 * @return {Object} The metadata or null.
 */
MetadataCache.prototype.getCached = function(items, type) {
  var single = false;
  if (!(items instanceof Array)) {
    single = true;
    items = [items];
  }

  var result = [];
  for (var index = 0; index < items.length; index++) {
    var url = this.itemToUrl_(items[index]);
    result.push(url in this.cache_ ?
        (this.cache_[url].properties[type] || null) : null);
  }

  return single ? result[0] : result;
};

/**
 * Puts the metadata into cache
 * @param {string|Entry|Array.<string|Entry>} items The list of entries or
 *     file urls. May be just a single item.
 * @param {string} type The metadata type.
 * @param {Array.<Object>} values List of corresponding metadata values.
 */
MetadataCache.prototype.set = function(items, type, values) {
  if (!(items instanceof Array))
    items = [items];

  this.startBatchUpdates();
  for (var index = 0; index < items.length; index++) {
    var url = this.itemToUrl_(items[index]);
    if (!(url in this.cache_))
      this.cache_[url] = this.createEmptyEntry_();
    this.cache_[url].properties[type] = values[index];
    this.notifyObservers_(url, type);
  }
  this.endBatchUpdates();
};

/**
 * Clears the cached metadata values.
 * @param {string|Entry|Array.<string|Entry>} items The list of entries or
 *     file urls. May be just a single item.
 * @param {string} type The metadata type.
 */
MetadataCache.prototype.clear = function(items, type) {
  if (!(items instanceof Array))
    items = [items];

  for (var index = 0; index < items.length; index++) {
    var url = this.itemToUrl_(items[index]);
    if (url in this.cache_)
      delete this.cache_[url].properties[type];
  }
};

/**
 * Adds an observer, which will be notified when metadata changes.
 * @param {string|Entry} item The root item to look at.
 * @param {number} relation This defines, which items will trigger the observer.
 *     See comments to |MetadataCache.EXACT| and others.
 * @param {string} type The metadata type.
 * @param {Function(Array.<string>, Array.<Object>)} observer List of file urls
 *     and corresponding metadata values are passed to this callback.
 * @return {number} The observer id, which can be used to remove it.
 */
MetadataCache.prototype.addObserver = function(item, relation, type, observer) {
  var url = this.itemToUrl_(item);
  var re = url;
  if (relation == MetadataCache.CHILDREN) {
    re += '(/[^/]*)?';
  } else if (relation == MetadataCache.DESCENDANTS) {
    re += '(/.*)?';
  }
  var id = ++this.observerId_;
  this.observers_.push({
    re: new RegExp('^' + re + '$'),
    type: type,
    callback: observer,
    id: id,
    pending: {}
  });
  return id;
};

/**
 * Removes the observer.
 * @param {number} id Observer id.
 * @return {boolean} Whether observer was removed or not.
 */
MetadataCache.prototype.removeObserver = function(id) {
  for (var index = 0; index < this.observers_.length; index++) {
    if (this.observers_[index].id == id) {
      this.observers_.splice(index, 1);
      return true;
    }
  }
  return false;
};

/**
 * Start batch updates.
 */
MetadataCache.prototype.startBatchUpdates = function() {
  this.batchCount_++;
};

/**
 * End batch updates. Notifies observers if all nested updates are finished.
 */
MetadataCache.prototype.endBatchUpdates = function() {
  this.batchCount_--;
  if (this.batchCount_ != 0) return;
  for (var index = 0; index < this.observers_.length; index++) {
    var observer = this.observers_[index];
    var urls = [];
    var properties = [];
    for (var url in observer.pending) {
      if (observer.pending.hasOwnProperty(url) && url in this.cache_) {
        urls.push(url);
        properties.push(this.cache_[url].properties[observer.type] || null);
      }
    }
    observer.pending = {};
    if (urls.length > 0) {
      observer.callback(urls, properties);
    }
  }
};

/**
 * Notifies observers or puts the data to pending list.
 * @param {string} url Url of entry changed.
 * @param {string} type Metadata type.
 * @private
 */
MetadataCache.prototype.notifyObservers_ = function(url, type) {
  for (var index = 0; index < this.observers_.length; index++) {
    var observer = this.observers_[index];
    if (observer.type == type && observer.re.test(url)) {
      if (this.batchCount_ == 0) {
        // Observer expects array of urls and array of properties.
        observer.callback([url], [this.cache_[url].properties[type] || null]);
      } else {
        observer.pending[url] = true;
      }
    }
  }
};

/**
 * Converts Entry or file url to url.
 * @param {string|Entry} item Item to convert.
 * @return {string} File url.
 * @private
 */
MetadataCache.prototype.itemToUrl_ = function(item) {
  if (typeof(item) == 'string')
    return item;
  else
    return item.toURL();
};

/**
 * @return {Object} Empty cache entry.
 * @private
 */
MetadataCache.prototype.createEmptyEntry_ = function() {
  var entry = {properties: {}};
  for (var index = 0; index < this.providers_.length; index++) {
    entry[this.providers_[index].getId()] = {};
  }
  return entry;
};

/**
 * Caches all the properties from data to cache entry for url.
 * @param {string} url The url.
 * @param {Object} data The properties.
 * @private
 */
MetadataCache.prototype.mergeProperties_ = function(url, data) {
  if (data == null) return;
  var properties = this.cache_[url].properties;
  for (var type in data) {
    if (data.hasOwnProperty(type)) {
      properties[type] = data[type];
      this.notifyObservers_(url, type);
    }
  }
};

/**
 * Base class for metadata providers.
 * @constructor
 * TODO(dgozman): rename to MetadataProvider (now it conflicts with another
 *     entity).
 */
function MetadataProvider2() {
}

/**
 * @param {string} url The url.
 * @return {boolean} Whether this provider supports the url.
 */
MetadataProvider2.prototype.supportsUrl = function(url) { return false; };

/**
 * @param {string} type The metadata type.
 * @return {boolean} Whether this provider provides this metadata.
 */
MetadataProvider2.prototype.providesType = function(type) { return false; };

/**
 * @return {string} Unique provider id.
 */
MetadataProvider2.prototype.getId = function() { return ''; };

/**
 * Fetches the metadata. It's suggested to return all the metadata this provider
 * can fetch at once.
 * @param {string} url File url.
 * @param {string} type Requested metadata type.
 * @param {Function(Object)} callback Callback expects a map from metadata type
 *     to metadata value.
 * @param {Entry=} opt_entry The file entry if present.
 */
MetadataProvider2.prototype.fetch = function(url, type, callback, opt_entry) {
  throw new Error('Default metadata provider cannot fetch.');
};

/**
 * Provider of filesystem metadata.
 * This provider returns the following objects:
 * filesystem: {
 *   size;
 *   modificationTime;
 *   icon - string describing icon type;
 * }
 * @constructor
 */
function FilesystemProvider() {
  MetadataProvider2.call(this, 'filesystem');
}

FilesystemProvider.prototype = {
  __proto__: MetadataProvider2.prototype
};

/**
 * @param {string} url The url.
 * @return {boolean} Whether this provider supports the url.
 */
FilesystemProvider.prototype.supportsUrl = function(url) {
  return true;
};

/**
 * @param {string} type The metadata type.
 * @return {boolean} Whether this provider provides this metadata.
 */
FilesystemProvider.prototype.providesType = function(type) {
  return type == 'filesystem';
};

/**
 * @return {string} Unique provider id.
 */
FilesystemProvider.prototype.getId = function() { return 'filesystem'; };

/**
 * Fetches the metadata.
 * @param {string} url File url.
 * @param {string} type Requested metadata type.
 * @param {Function(Object)} callback Callback expects a map from metadata type
 *     to metadata value.
 * @param {Entry=} opt_entry The file entry if present.
 */
FilesystemProvider.prototype.fetch = function(url, type, callback, opt_entry) {
  function onError(error) {
    callback(null);
  }

  function onMetadata(entry, metadata) {
    callback({
      filesystem: {
        size: entry.isFile ? (metadata.size || 0) : -1,
        modificationTime: metadata.modificationTime
      }
    });
  }

  function onEntry(entry) {
    entry.getMetadata(onMetadata.bind(null, entry), onError);
  }

  if (opt_entry)
    onEntry(opt_entry);
  else
    webkitResolveLocalFileSystemURL(url, onEntry, onError);
};

/**
 * Provider of gdata metadata.
 * This provider returns the following objects:
 *     gdata: { pinned, hosted, present, dirty, editUrl, contentUrl }
 *     thumbnail: { url, transform }
 * @constructor
 */
function GDataProvider() {
  MetadataProvider2.call(this, 'gdata');

  // We batch metadata fetches into single API call.
  this.urls_ = [];
  this.callbacks_ = [];
  this.scheduled_ = false;

  this.callApiBound_ = this.callApi_.bind(this);
}

GDataProvider.prototype = {
  __proto__: MetadataProvider2.prototype
};

/**
 * Pattern for urls supported by GDataProvider.
 */
GDataProvider.URL_PATTERN =
    new RegExp('^filesystem:[^/]*://[^/]*/[^/]*/drive/(.*)');

/**
 * @param {string} url The url.
 * @return {boolean} Whether this provider supports the url.
 */
GDataProvider.prototype.supportsUrl = function(url) {
  return GDataProvider.URL_PATTERN.test(url);
};

/**
 * @param {string} type The metadata type.
 * @return {boolean} Whether this provider provides this metadata.
 */
GDataProvider.prototype.providesType = function(type) {
  return type == 'gdata' || type == 'thumbnail';
};

/**
 * @return {string} Unique provider id.
 */
GDataProvider.prototype.getId = function() { return 'gdata'; };

/**
 * Fetches the metadata.
 * @param {string} url File url.
 * @param {string} type Requested metadata type.
 * @param {Function(Object)} callback Callback expects a map from metadata type
 *     to metadata value.
 * @param {Entry=} opt_entry The file entry if present.
 */
GDataProvider.prototype.fetch = function(url, type, callback, opt_entry) {
  this.urls_.push(url);
  this.callbacks_.push(callback);
  if (!this.scheduled_) {
    this.scheduled_ = true;
    setTimeout(this.callApiBound_, 0);
  }
};

/**
 * Schedules the API call.
 * @private
 */
GDataProvider.prototype.callApi_ = function() {
  this.scheduled_ = false;

  var urls = this.urls_;
  var callbacks = this.callbacks_;
  this.urls_ = [];
  this.callbacks_ = [];
  var self = this;

  chrome.fileBrowserPrivate.getGDataFileProperties(urls, function(props) {
    for (var index = 0; index < urls.length; index++) {
      callbacks[index](self.convert_(props[index]));
    }
  });
};

/**
 * Pattern for Docs urls that are available in the offline mode.
 */
GDataProvider.OFFLINE_DOCS_REGEXP = /\/(document|spreadsheet)\//;

/**
 * @param {GDataFileProperties} data GData file properties.
 * @return {boolean} True if the file is available offline.
 */
GDataProvider.isAvailableOffline = function(data) {
  return data.isPresent ||
      (data.isHosted && GDataProvider.OFFLINE_DOCS_REGEXP.test(data.editUrl));
};

/**
 * @param {GDataFileProperties} data GData file properties.
 * @return {boolean} True if opening the file does not require downloading it
 *    via a metered connection.
 */
GDataProvider.isAvailableWhenMetered = function(data) {
  return data.isPresent || data.isHosted;
};

/**
 * Converts API metadata to internal format.
 * @param {Object} data Metadata from API call.
 * @return {Object} Metadata in internal format.
 * @private
 */
GDataProvider.prototype.convert_ = function(data) {
  var result = {};
  result.gdata = {
    present: data.isPresent,
    pinned: data.isPinned,
    hosted: data.isHosted,
    dirty: data.isDirty,
    availableOffline: GDataProvider.isAvailableOffline(data),
    availableWhenMetered: GDataProvider.isAvailableWhenMetered(data),
    contentUrl: (data.contentUrl || '').replace(/\?.*$/gi, ''),
    editUrl: data.editUrl || ''
  };
  if ('thumbnailUrl' in data) {
    result.thumbnail = {
      url: data.thumbnailUrl,
      transform: ''
    };
  }
  return result;
};


text:
/**
 * Created by ameyapandilwar on 3/7/16.
 */

module.exports = function(app, db, mongoose, aUser, cUser, passport) {
    var formModel = require("./models/form.model.js")(db, mongoose);
    var fieldModel = require("./models/field.model.js")(formModel);

    var userService = require("./services/user.service.server.js")(app, aUser);
    var formService = require("./services/form.service.server.js")(app, formModel);
    var fieldService = require("./services/field.service.server.js")(app, fieldModel);
    var securityService = require("./../../security/security.js")(app, aUser, cUser, passport);
};


text:
@interface JLCycleScrollCell : UICollectionViewCell
@property (nonatomic, strong) UIImage *placeholderImg;
@property (nonatomic, copy) NSString *imageURLStr;

@end


text:
! { dg-do compile }
!
! This is a check for error recovery: we used to ICE in various places, or
! emit bogus error messages (PR 25252)
!
module foo
  interface bar
    module procedure X, Y, ! { dg-error "Syntax error in MODULE PROCEDURE statement" }
  end interface bar
end module

module g
  interface i
    module procedure sint => sreal ! { dg-error "Syntax error in MODULE PROCEDURE statement" }
  end interface i
end module g

module gswap
  type points
    real :: x, y
  end type points
  interface swap
    module procedure sreal, schar, sint => sreal ! { dg-error "Syntax error in MODULE PROCEDURE statement" }
  end interface swap
end module gswap

! { dg-final { cleanup-modules "foo g gswap" } }


text:
<?php defined('C5_EXECUTE') or die('Access Denied.'); ?>

            <?php echo t('Attach a %s account', 'WorldSkills'); ?>

    <a href="<?php echo \URL::to('/ccm/system/authentication/oauth2/worldskills/attempt_attach'); ?>" class="btn btn-primary">

        <?php echo t('Attach a %s account', 'WorldSkills'); ?>


text:
Entity::Entity(sf::Vector2f position)
{
    setPosition(position);
    mSprite.setFillColor(sf::Color::Red);
}

void Entity::update(sf::Time const& dt)
{
    move(mVelocity * dt.asSeconds());
}

void Entity::setVelocity(sf::Vector2f v)
{
    mVelocity = std::move(v);
}

sf::Vector2f const& Entity::getVelocity() const
{
    return mVelocity;
}

void Entity::setColor(sf::Color color)
{
    mSprite.setFillColor(color);
}

sf::FloatRect Entity::getGlobalBounds() const noexcept
{
    return getTransform().transformRect(mSprite.getLocalBounds());
}

void Entity::draw(sf::RenderTarget& target, sf::RenderStates states) const noexcept
{
    states.transform.combine(getTransform());

    target.draw(mSprite, states);
}


text:
package org.hisp.dhis.android.core.option;

import org.hisp.dhis.android.core.arch.db.stores.internal.IdentifiableObjectStore;
import org.hisp.dhis.android.core.arch.repositories.children.internal.ChildrenAppender;
import org.hisp.dhis.android.core.arch.repositories.collection.internal.ReadOnlyIdentifiableCollectionRepositoryImpl;
import org.hisp.dhis.android.core.arch.repositories.filters.internal.FilterConnectorFactory;
import org.hisp.dhis.android.core.arch.repositories.filters.internal.StringFilterConnector;
import org.hisp.dhis.android.core.arch.repositories.scope.RepositoryScope;
import org.hisp.dhis.android.core.option.OptionGroupTableInfo.Columns;
import org.hisp.dhis.android.core.option.internal.OptionGroupFields;

import java.util.Map;

import javax.inject.Inject;

import dagger.Reusable;

@Reusable
public final class OptionGroupCollectionRepository
        extends ReadOnlyIdentifiableCollectionRepositoryImpl<OptionGroup, OptionGroupCollectionRepository> {

    @Inject
    OptionGroupCollectionRepository(final IdentifiableObjectStore<OptionGroup> store,
                                    final Map<String, ChildrenAppender<OptionGroup>> childrenAppenders,
                                    final RepositoryScope scope) {
        super(store, childrenAppenders, scope, new FilterConnectorFactory<>(scope,
                s -> new OptionGroupCollectionRepository(store, childrenAppenders, s)));
    }

    public StringFilterConnector<OptionGroupCollectionRepository> byOptionSetUid() {
        return cf.string(Columns.OPTION_SET);
    }

    public OptionGroupCollectionRepository withOptions() {
        return cf.withChild(OptionGroupFields.OPTIONS);
    }
}


text:
goog.module('goog.editor.plugins.LinkBubbleTest');
goog.setTestOnly();

const BrowserEvent = goog.require('goog.events.BrowserEvent');
const Command = goog.require('goog.editor.Command');
const EventType = goog.require('goog.events.EventType');
const FieldMock = goog.require('goog.testing.editor.FieldMock');
const FunctionMock = goog.require('goog.testing.FunctionMock');
const GoogEvent = goog.require('goog.events.Event');
const KeyCodes = goog.require('goog.events.KeyCodes');
const Link = goog.require('goog.editor.Link');
const LinkBubble = goog.require('goog.editor.plugins.LinkBubble');
const LivePriority = goog.require('goog.a11y.aria.LivePriority');
const PropertyReplacer = goog.require('goog.testing.PropertyReplacer');
const Range = goog.require('goog.dom.Range');
const TagName = goog.require('goog.dom.TagName');
const TestHelper = goog.require('goog.testing.editor.TestHelper');
const dom = goog.require('goog.dom');
const events = goog.require('goog.testing.events');
const googArray = goog.require('goog.array');
const googString = goog.require('goog.string');
const googWindow = goog.require('goog.window');
const recordFunction = goog.require('goog.testing.recordFunction');
const style = goog.require('goog.style');
const testSuite = goog.require('goog.testing.testSuite');
const userAgent = goog.require('goog.userAgent');

let fieldDiv;
let FIELDMOCK;
let linkBubble;
let link;
let linkChild;
let mockWindowOpen;
let stubs;
let testHelper;

function closeBox() {
  const closeBox =
      dom.getElementsByTagNameAndClass(TagName.DIV, 'tr_bubble_closebox');
  assertEquals('Should find only one close box', 1, closeBox.length);
  assertNotNull('Found close box', closeBox[0]);
  events.fireClickSequence(closeBox[0]);
}

/** @suppress {visibility} suppression added to enable type checking */
function assertBubble() {
  assertTrue('Link bubble visible', linkBubble.isVisible());
  assertNotNull('Link bubble created', dom.$(LinkBubble.LINK_DIV_ID_));
}

/** @suppress {visibility} suppression added to enable type checking */
function assertNoBubble() {
  assertFalse('Link bubble not visible', linkBubble.isVisible());
  assertNull('Link bubble not created', dom.$(LinkBubble.LINK_DIV_ID_));
}

/** @suppress {checkTypes} suppression added to enable type checking */
function createMouseEvent(target) {
  const eventObj = new GoogEvent(EventType.MOUSEUP, target);
  /**
   * @suppress {strictMissingProperties} suppression added to enable type
   * checking
   */
  eventObj.button = BrowserEvent.MouseButton.LEFT;

  return new BrowserEvent(eventObj, target);
}

testSuite({
  setUpPage() {
    fieldDiv = dom.$('field');
    stubs = new PropertyReplacer();
    testHelper = new TestHelper(dom.getElement('field'));
  },

  setUp() {
    testHelper.setUpEditableElement();
    FIELDMOCK = new FieldMock();

    linkBubble = new LinkBubble();
    /**
     * @suppress {visibility,checkTypes} suppression added to enable type
     * checking
     */
    linkBubble.fieldObject = FIELDMOCK;

    link = fieldDiv.firstChild;
    linkChild = link.lastChild;

    /** @suppress {checkTypes} suppression added to enable type checking */
    mockWindowOpen = new FunctionMock('open');
    stubs.set(googWindow, 'open', mockWindowOpen);
  },

  tearDown() {
    link.removeAttribute('data-dlb');
    linkBubble.closeBubble();
    testHelper.tearDownEditableElement();
    stubs.reset();
  },

  testLinkSelected() {
    FIELDMOCK.$replay();
    linkBubble.enable(FIELDMOCK);
    Range.createFromNodeContents(link).select();
    linkBubble.handleSelectionChange();
    assertBubble();
    FIELDMOCK.$verify();
  },

  testLinkClicked() {
    FIELDMOCK.$replay();
    linkBubble.enable(FIELDMOCK);
    linkBubble.handleSelectionChange(createMouseEvent(link));
    assertBubble();
    FIELDMOCK.$verify();
  },

  testDisabledLinkClicked() {
    FIELDMOCK.$replay();
    linkBubble.enable(FIELDMOCK);
    link.setAttribute('data-dlb', '');
    linkBubble.handleSelectionChange(createMouseEvent(link));
    assertNoBubble();
    link.removeAttribute('data-dlb');
    linkBubble.handleSelectionChange(createMouseEvent(link));
    assertBubble();
    FIELDMOCK.$verify();
  },

  testImageLink() {
    FIELDMOCK.$replay();
    linkBubble.enable(FIELDMOCK);
    link.setAttribute('imageanchor', 1);
    linkBubble.handleSelectionChange(createMouseEvent(link));
    assertBubble();
    FIELDMOCK.$verify();
  },

  testCloseBox() {
    this.testLinkClicked();
    closeBox();
    assertNoBubble();
    FIELDMOCK.$verify();
  },

  /**
     @suppress {missingProperties,visibility} suppression added to enable type
     checking
   */
  testChangeClicked() {
    FIELDMOCK.execCommand(Command.MODAL_LINK_EDITOR, new Link(link, false));
    FIELDMOCK.$registerArgumentListVerifier(
        'execCommand',
        (arr1, arr2) => arr1.length == arr2.length && arr1.length == 2 &&
            arr1[0] == Command.MODAL_LINK_EDITOR &&
            arr2[0] == Command.MODAL_LINK_EDITOR && arr1[1] instanceof Link &&
            arr2[1] instanceof Link);
    FIELDMOCK.$times(1);
    FIELDMOCK.$returns(true);
    FIELDMOCK.$replay();
    linkBubble.enable(FIELDMOCK);

    linkBubble.handleSelectionChange(createMouseEvent(link));
    assertBubble();

    events.fireClickSequence(dom.$(LinkBubble.CHANGE_LINK_ID_));
    assertNoBubble();
    FIELDMOCK.$verify();
  },

  /** @suppress {missingProperties} suppression added to enable type checking */
  testChangePressed() {
    FIELDMOCK.execCommand(Command.MODAL_LINK_EDITOR, new Link(link, false));
    FIELDMOCK.$registerArgumentListVerifier(
        'execCommand',
        (arr1, arr2) => arr1.length == arr2.length && arr1.length == 2 &&
            arr1[0] == Command.MODAL_LINK_EDITOR &&
            arr2[0] == Command.MODAL_LINK_EDITOR && arr1[1] instanceof Link &&
            arr2[1] instanceof Link);
    FIELDMOCK.$times(1);
    FIELDMOCK.$returns(true);
    FIELDMOCK.$replay();
    linkBubble.enable(FIELDMOCK);

    linkBubble.handleSelectionChange(createMouseEvent(link));
    assertBubble();

    /** @suppress {visibility} suppression added to enable type checking */
    const defaultPrevented = !events.fireKeySequence(
        dom.$(LinkBubble.CHANGE_LINK_ID_), KeyCodes.ENTER);
    assertTrue(defaultPrevented);
    assertNoBubble();
    FIELDMOCK.$verify();
  },

  /**
     @suppress {missingProperties,visibility} suppression added to enable type
     checking
   */
  testDeleteClicked() {
    FIELDMOCK.dispatchBeforeChange();
    FIELDMOCK.$times(1);
    FIELDMOCK.dispatchChange();
    FIELDMOCK.$times(1);
    FIELDMOCK.focus();
    FIELDMOCK.$times(1);
    FIELDMOCK.$replay();

    linkBubble.enable(FIELDMOCK);

    linkBubble.handleSelectionChange(createMouseEvent(link));
    assertBubble();

    events.fireClickSequence(dom.$(LinkBubble.DELETE_LINK_ID_));
    const element = userAgent.GECKO ? document.body : fieldDiv;
    assertNotEquals(
        'Link removed', element.firstChild.nodeName, String(TagName.A));
    assertNoBubble();
    const range = Range.createFromWindow();
    assertEquals('Link selection on link text', linkChild, range.getEndNode());
    assertEquals(
        'Link selection on link text end',
        dom.getRawTextContent(linkChild).length, range.getEndOffset());
    FIELDMOCK.$verify();
  },

  /** @suppress {missingProperties} suppression added to enable type checking */
  testDeletePressed() {
    FIELDMOCK.dispatchBeforeChange();
    FIELDMOCK.$times(1);
    FIELDMOCK.dispatchChange();
    FIELDMOCK.$times(1);
    FIELDMOCK.focus();
    FIELDMOCK.$times(1);
    FIELDMOCK.$replay();

    linkBubble.enable(FIELDMOCK);

    linkBubble.handleSelectionChange(createMouseEvent(link));
    assertBubble();

    /** @suppress {visibility} suppression added to enable type checking */
    const defaultPrevented = !events.fireKeySequence(
        dom.$(LinkBubble.DELETE_LINK_ID_), KeyCodes.ENTER);
    assertTrue(defaultPrevented);
    const element = userAgent.GECKO ? document.body : fieldDiv;
    assertNotEquals(
        'Link removed', element.firstChild.nodeName, String(TagName.A));
    assertNoBubble();
    const range = Range.createFromWindow();
    assertEquals('Link selection on link text', linkChild, range.getEndNode());
    assertEquals(
        'Link selection on link text end',
        dom.getRawTextContent(linkChild).length, range.getEndOffset());
    FIELDMOCK.$verify();
  },

  /**
     @suppress {missingProperties,visibility} suppression added to enable type
     checking
   */
  testDeleteAnnounced() {
    FIELDMOCK.dispatchBeforeChange();
    FIELDMOCK.$times(1);
    FIELDMOCK.dispatchChange();
    FIELDMOCK.$times(1);
    FIELDMOCK.focus();
    FIELDMOCK.$times(1);
    FIELDMOCK.$replay();

    linkBubble.enable(FIELDMOCK);

    linkBubble.handleSelectionChange(createMouseEvent(link));
    assertBubble();

    const sayFunction = recordFunction();
    /** @suppress {visibility} suppression added to enable type checking */
    linkBubble.announcer_.say = sayFunction;

    events.fireClickSequence(dom.$(LinkBubble.DELETE_LINK_ID_));

    assertEquals(1, sayFunction.getCallCount());

    assertTrue(googArray.equals(
        ['Removed link.', LivePriority.ASSERTIVE],
        sayFunction.getLastCall().getArguments()));
    FIELDMOCK.$verify();
  },

  /** @suppress {checkTypes} suppression added to enable type checking */
  testActionClicked() {
    const SPAN = 'actionSpanId';
    const LINK = 'actionLinkId';
    let toShowCount = 0;
    let actionCount = 0;

    const linkAction = new LinkBubble.Action(
        SPAN, LINK, 'message',
        () => {
          toShowCount++;
          return toShowCount == 1;  // Show it the first time.
        },
        () => {
          actionCount++;
        });

    linkBubble = new LinkBubble(linkAction);
    /**
     * @suppress {visibility,checkTypes} suppression added to enable type
     * checking
     */
    linkBubble.fieldObject = FIELDMOCK;
    FIELDMOCK.$replay();
    linkBubble.enable(FIELDMOCK);

    // The first time the bubble is shown, show our custom action.
    linkBubble.handleSelectionChange(createMouseEvent(link));
    assertBubble();
    assertEquals('Should check showing the action', 1, toShowCount);
    assertEquals('Action should not have fired yet', 0, actionCount);

    assertTrue(
        'Action should be visible 1st time', style.isElementShown(dom.$(SPAN)));
    events.fireClickSequence(dom.$(LINK));

    assertEquals('Should not check showing again yet', 1, toShowCount);
    assertEquals('Action should be fired', 1, actionCount);

    closeBox();
    assertNoBubble();

    // The action won't be shown the second time around.
    linkBubble.handleSelectionChange(createMouseEvent(link));
    assertBubble();
    assertEquals('Should check showing again', 2, toShowCount);
    assertEquals('Action should not fire again', 1, actionCount);
    assertFalse(
        'Action should not be shown 2nd time',
        style.isElementShown(dom.$(SPAN)));

    FIELDMOCK.$verify();
  },

  /** @suppress {visibility} suppression added to enable type checking */
  testLinkTextClicked() {
    mockWindowOpen(
        'http://www.google.com/', {'target': '_blank', 'noreferrer': false},
        window);
    mockWindowOpen.$replay();
    FIELDMOCK.$replay();
    linkBubble.enable(FIELDMOCK);

    linkBubble.handleSelectionChange(createMouseEvent(link));
    assertBubble();

    events.fireClickSequence(dom.$(LinkBubble.TEST_LINK_ID_));

    assertBubble();
    mockWindowOpen.$verify();
    FIELDMOCK.$verify();
  },

  /** @suppress {visibility} suppression added to enable type checking */
  testLinkTextClickedCustomUrlFn() {
    mockWindowOpen(
        'http://images.google.com/', {'target': '_blank', 'noreferrer': false},
        window);
    mockWindowOpen.$replay();
    FIELDMOCK.$replay();
    linkBubble.enable(FIELDMOCK);

    linkBubble.setTestLinkUrlFn((url) => url.replace('www', 'images'));

    linkBubble.handleSelectionChange(createMouseEvent(link));
    assertBubble();

    events.fireClickSequence(dom.$(LinkBubble.TEST_LINK_ID_));

    assertBubble();
    mockWindowOpen.$verify();
    FIELDMOCK.$verify();
  },

  /**
   * Urls with invalid schemes shouldn't be linkified.
   * @bug 2585360
   * @suppress {visibility} suppression added to enable type checking
   */
  testDontLinkifyInvalidScheme() {
    mockWindowOpen.$replay();
    FIELDMOCK.$replay();
    linkBubble.enable(FIELDMOCK);

    const badLink = dom.createElement(TagName.A);
    badLink.href = 'javascript:alert(1)';
    dom.setTextContent(badLink, 'bad link');

    linkBubble.handleSelectionChange(createMouseEvent(badLink));
    assertBubble();

    // The link shouldn't exist at all
    assertNull(dom.$(LinkBubble.TEST_LINK_ID_));

    assertBubble();
    mockWindowOpen.$verify();
    FIELDMOCK.$verify();
  },

  /** @suppress {visibility} suppression added to enable type checking */
  testIsSafeSchemeToOpen() {
    // Urls with no scheme at all are ok too since 'http://' will be prepended.
    const good = [
      'http://google.com',
      'http://google.com/',
      'https://google.com',
      'null@google.com',
      'http://www.google.com',
      'http://site.com',
      'google.com',
      'google',
      'http://google',
      'HTTP://GOOGLE.COM',
      'HtTp://www.google.com',
    ];

    const bad = [
      'javascript:google.com',
      'httpp://google.com',
      'data:foo',
      'javascript:alert(\'hi\');',
      'abc:def',
    ];

    let i;
    for (i = 0; i < good.length; i++) {
      assertTrue(
          good[i] + ' should have a safe scheme',
          linkBubble.isSafeSchemeToOpen_(good[i]));
    }

    for (i = 0; i < bad.length; i++) {
      assertFalse(
          bad[i] + ' should have an unsafe scheme',
          linkBubble.isSafeSchemeToOpen_(bad[i]));
    }
  },

  /** @suppress {visibility} suppression added to enable type checking */
  testShouldOpenWithWhitelist() {
    linkBubble.setSafeToOpenSchemes(['abc']);

    assertTrue(
        'Scheme should be safe', linkBubble.shouldOpenUrl('abc://google.com'));
    assertFalse(
        'Scheme should be unsafe',
        linkBubble.shouldOpenUrl('http://google.com'));

    linkBubble.setBlockOpeningUnsafeSchemes(false);
    assertTrue(
        'Non-whitelisted should now be safe after disabling blocking',
        linkBubble.shouldOpenUrl('http://google.com'));
  },

  /**
   * @bug 763211
   * @bug 2182147
   */
  testLongUrlTestLinkAnchorTextCorrect() {
    FIELDMOCK.$replay();
    linkBubble.enable(FIELDMOCK);

    const longUrl = 'http://www.reallylonglinkthatshouldbetruncated' +
        'becauseitistoolong.com';
    const truncatedLongUrl = googString.truncateMiddle(longUrl, 48);

    const longLink = dom.createElement(TagName.A);
    longLink.href = longUrl;
    dom.setTextContent(longLink, 'Google');
    fieldDiv.appendChild(longLink);

    linkBubble.handleSelectionChange(createMouseEvent(longLink));
    assertBubble();

    /** @suppress {visibility} suppression added to enable type checking */
    const testLinkEl = dom.$(LinkBubble.TEST_LINK_ID_);
    assertEquals(
        'The test link\'s anchor text should be the truncated URL.',
        truncatedLongUrl, testLinkEl.innerHTML);

    fieldDiv.removeChild(longLink);
    FIELDMOCK.$verify();
  },

  /** @bug 2416024 */
  testOverridingCreateBubbleContentsDoesntNpeGetTargetUrl() {
    FIELDMOCK.$replay();
    linkBubble.enable(FIELDMOCK);

    stubs.set(
        linkBubble,
        'createBubbleContents', /**
                                   @suppress {visibility} suppression added to
                                   enable type checking
                                 */
        (elem) => {
          // getTargetUrl would cause an NPE if urlUtil_ wasn't defined yet.
          linkBubble.getTargetUrl();
        });
    assertNotThrows(
        'Accessing this.urlUtil_ should not NPE',
        goog.bind(
            linkBubble.handleSelectionChange, linkBubble,
            createMouseEvent(link)));

    FIELDMOCK.$verify();
  },

  /**
   * @bug 15379294
   * @suppress {visibility} suppression added to enable type
   *      checking
   */
  testUpdateLinkCommandDoesNotTriggerAnException() {
    FIELDMOCK.$replay();
    linkBubble.enable(FIELDMOCK);

    // At this point, the bubble was not created yet using its createBubble
    // public method.
    assertNotThrows(
        'Executing goog.editor.Command.UPDATE_LINK_BUBBLE should not trigger ' +
            'an exception even if the bubble was not created yet using its ' +
            'createBubble method.',
        goog.bind(
            linkBubble.execCommandInternal, linkBubble,
            Command.UPDATE_LINK_BUBBLE));

    FIELDMOCK.$verify();
  },
});


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

          <?php
          $attributes = array("class" => "form-horizontal", "id" => "loginform", "name" => "loginform");
          echo form_open("User/login", $attributes);?>
          <fieldset>
               <legend>Login</legend>

                    Username

                    <input class="form-control" id="txt_username" name="txt_username" placeholder="Username" type="text" value="<?php echo set_value('txt_username'); ?>" />
                    <?php echo form_error('txt_username'); ?>

               Password

                    <input class="form-control" id="txt_password" name="txt_password" placeholder="Password" type="password" value="<?php echo set_value('txt_password'); ?>" />
                    <?php echo form_error('txt_password'); ?>

                    <input id="btn_login" name="post_login" type="hidden" class="btn btn-default" value="1" />
                    <input id="btn_login" name="btn_login" type="submit" class="btn btn-default" value="Login" />
                    <input id="btn_cancel" name="btn_cancel" type="reset" class="btn btn-default" value="Cancel" />

          </fieldset>
          <?php echo form_close(); ?>
          <?php echo $this->session->flashdata('msg'); ?>


text:
#include <hwloc.h>

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>

int main(void)
{
  hwloc_topology_t topology;
  hwloc_obj_t obj;
  unsigned indexes[5];
  float distances[5*5];
  unsigned depth;
  unsigned width;

  /* group 3 numa nodes as 1 group of 2 and 1 on the side */
  hwloc_topology_init(&topology);
  hwloc_topology_set_synthetic(topology, "node:3 pu:1");
  indexes[0] = 0; indexes[1] = 1; indexes[2] = 2;
  distances[0] = 1; distances[1] = 4; distances[2] = 4;
  distances[3] = 4; distances[4] = 1; distances[5] = 2;
  distances[6] = 4; distances[7] = 2; distances[8] = 1;
  hwloc_topology_set_distance_matrix(topology, HWLOC_OBJ_PU, 3, indexes, distances);
  hwloc_topology_load(topology);
  /* 2 groups at depth 1 */
  depth = hwloc_get_type_depth(topology, HWLOC_OBJ_GROUP);
  assert(depth == 1);
  width = hwloc_get_nbobjs_by_depth(topology, depth);
  assert(width == 1);
  /* 3 node at depth 2 */
  depth = hwloc_get_type_depth(topology, HWLOC_OBJ_NODE);
  assert(depth == 2);
  width = hwloc_get_nbobjs_by_depth(topology, depth);
  assert(width == 3);
  /* find the root obj */
  obj = hwloc_get_root_obj(topology);
  assert(obj->arity == 2);
  /* check its children */
  assert(obj->children[0]->type == HWLOC_OBJ_NODE);
  assert(obj->children[0]->depth == 2);
  assert(obj->children[0]->arity == 1);
  assert(obj->children[1]->type == HWLOC_OBJ_GROUP);
  assert(obj->children[1]->depth == 1);
  assert(obj->children[1]->arity == 2);
  hwloc_topology_destroy(topology);

  /* group 5 sockets as 2 group of 2 and 1 on the side, all of them below a common node object */
  hwloc_topology_init(&topology);
  hwloc_topology_set_synthetic(topology, "node:1 socket:5 pu:1");
  indexes[0] = 0; indexes[1] = 1; indexes[2] = 2; indexes[3] = 3; indexes[4] = 4;
  distances[ 0] = 1; distances[ 1] = 2; distances[ 2] = 4; distances[ 3] = 4; distances[ 4] = 4;
  distances[ 5] = 2; distances[ 6] = 1; distances[ 7] = 4; distances[ 8] = 4; distances[ 9] = 4;
  distances[10] = 4; distances[11] = 4; distances[12] = 1; distances[13] = 4; distances[14] = 4;
  distances[15] = 4; distances[16] = 4; distances[17] = 4; distances[18] = 1; distances[19] = 2;
  distances[20] = 4; distances[21] = 4; distances[22] = 4; distances[23] = 2; distances[24] = 1;
  hwloc_topology_set_distance_matrix(topology, HWLOC_OBJ_SOCKET, 5, indexes, distances);
  hwloc_topology_load(topology);
  /* 1 node at depth 1 */
  depth = hwloc_get_type_depth(topology, HWLOC_OBJ_NODE);
  assert(depth == 1);
  width = hwloc_get_nbobjs_by_depth(topology, depth);
  assert(width == 1);
  /* 2 groups at depth 2 */
  depth = hwloc_get_type_depth(topology, HWLOC_OBJ_GROUP);
  assert(depth == 2);
  width = hwloc_get_nbobjs_by_depth(topology, depth);
  assert(width == 2);
  /* 5 sockets at depth 3 */
  depth = hwloc_get_type_depth(topology, HWLOC_OBJ_SOCKET);
  assert(depth == 3);
  width = hwloc_get_nbobjs_by_depth(topology, depth);
  assert(width == 5);
  /* find the node obj */
  obj = hwloc_get_root_obj(topology);
  assert(obj->arity == 1);
  obj = obj->children[0];
  assert(obj->type == HWLOC_OBJ_NODE);
  assert(obj->arity == 3);
  /* check its children */
  assert(obj->children[0]->type == HWLOC_OBJ_GROUP);
  assert(obj->children[0]->depth == 2);
  assert(obj->children[0]->arity == 2);
  assert(obj->children[1]->type == HWLOC_OBJ_SOCKET);
  assert(obj->children[1]->depth == 3);
  assert(obj->children[1]->arity == 1);
  assert(obj->children[2]->type == HWLOC_OBJ_GROUP);
  assert(obj->children[2]->depth == 2);
  assert(obj->children[2]->arity == 2);
  hwloc_topology_destroy(topology);

  return 0;
}


text:
'use strict';

const path = require("path");

module.exports = () => {

    /* Add Function To Global Namespace */
    global.rootRequire = (filename) => {

        const module_path = path.join(__dirname, "..", filename);

        return require(path.normalize(module_path));
    };
};


text:
.carousel.carousel-fit {
  position: relative;
  /* When sliding, use the maximum height we have */
  /* Center horizontally the content of the slides */
  /* To be centered, the images of the slides need to be inline */
  /* Maximize the captions in the wrapper */
}
.carousel.carousel-fit.slide {
  /* Hide the content outside the carousel when sliding */
  overflow: hidden;
}
.carousel.carousel-fit .carousel-inner > .next,
.carousel.carousel-fit .carousel-inner > .prev {
  bottom: 0;
}
.carousel.carousel-fit .carousel-inner > .item {
  text-align: center;
}
.carousel.carousel-fit .carousel-inner > .item > img {
  display: inline-block;
}
.carousel.carousel-fit .carousel-inner > .item > .carousel-caption {
  bottom: 0;
  left: 0;
  right: 0;
}

.modal.modal-fullscreen {
  /* Maximize the main wrappers on the screen */
  /* Make the parent wrapper of the modal box a full-width block */
  /* Remove borders and effects on the content */
  /**
	 * /!\ By using this feature, you force the header and footer to be placed
	 * in an absolute position. You must handle by yourself the margin of the
	 * content.
	 */
}
.modal.modal-fullscreen .modal-dialog,
.modal.modal-fullscreen .modal-content {
  bottom: 0;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}
.modal.modal-fullscreen .modal-dialog {
  margin: 0;
  width: 100%;
}
.modal.modal-fullscreen .modal-content {
  border: none;
  -moz-border-radius: 0;
  border-radius: 0;
  -webkit-box-shadow: inherit;
  -moz-box-shadow: inherit;
  -o-box-shadow: inherit;
  box-shadow: inherit;
}
.modal.modal-fullscreen.force-fullscreen {
  /* Remove the padding inside the body */
}
.modal.modal-fullscreen.force-fullscreen .modal-body {
  padding: 0;
}
.modal.modal-fullscreen.force-fullscreen .modal-header,
.modal.modal-fullscreen.force-fullscreen .modal-footer {
  left: 0;
  position: absolute;
  right: 0;
}
.modal.modal-fullscreen.force-fullscreen .modal-header {
  top: 0;
}
.modal.modal-fullscreen.force-fullscreen .modal-footer {
  bottom: 0;
}

.modal.modal-fullscreen .modal-content {
  background: rgba(0, 0, 0, .5);
}
.modal.modal-fullscreen .modal-header {
  border: 0;
  color: #fff;
}
.modal.modal-fullscreen .modal-footer {
  border-color: rgba(0, 0, 0, .5);
}
#previous-events .carousel-caption {
  background-color: rgba(0, 0, 0, .5);
  bottom: -100%;
  -webkit-transition: bottom 1s;
  transition: bottom 1s;
}
#previous-events .item.active >.carousel-caption {
  bottom: 0;
}

#events-carousel {
  display: none;
}


text:
<?php
namespace WeatherBundle\Struct;

class Location
{
    protected $longitude;
    protected $latitude;

    /**
     * @param float $latitude
     * @param float $longitude
     */
    public function __construct($latitude, $longitude)
    {
        $this->latitude = $latitude;
        $this->longitude = $longitude;
    }

    /**
     * Get Longitude
     *
     * @return float
     */
    public function getLongitude()
    {
        return $this->longitude;
    }

    /**
     * Get Latitude
     *
     * @return float
     */
    public function getLatitude()
    {
        return $this->latitude;
    }
}


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

// props.h : movie properties dialog
// TODO(fbarchard): Remove hungarian notation.

#ifndef MEDIA_PLAYER_PROPS_H_
#define MEDIA_PLAYER_PROPS_H_

class CFileName : public CWindowImpl<CFileName> {
 public:

  CFileName() : file_name_(NULL) {
  }

  void Init(HWND hwnd, wchar_t* lpstrName) {
    ATLASSERT(::IsWindow(hwnd));
    SubclassWindow(hwnd);

    // Set tooltip.
    tooltip_.Create(m_hWnd);
    ATLASSERT(tooltip_.IsWindow());
    RECT rect;
    GetClientRect(&rect);
    CToolInfo ti(0, m_hWnd, tooltip_id_, &rect, NULL);
    tooltip_.AddTool(&ti);

    // Set text.
    file_name_ = lpstrName;
    if (file_name_ == NULL)
      return;

    CClientDC dc(m_hWnd);  // will not really paint
    HFONT hFontOld = dc.SelectFont(AtlGetDefaultGuiFont());

    RECT rcText = rect;
    dc.DrawText(file_name_, -1, &rcText,
                DT_SINGLELINE | DT_LEFT | DT_VCENTER | DT_NOPREFIX |
                DT_CALCRECT);
    BOOL bTooLong = (rcText.right > rect.right);
    if (bTooLong)
      tooltip_.UpdateTipText(file_name_, m_hWnd, tooltip_id_);
    tooltip_.Activate(bTooLong);

    dc.SelectFont(hFontOld);

    Invalidate();
    UpdateWindow();
  }

  BEGIN_MSG_MAP(CFileName)
    MESSAGE_RANGE_HANDLER(WM_MOUSEFIRST, WM_MOUSELAST, OnMouseMessage)
    MESSAGE_HANDLER(WM_PAINT, OnPaint)
  END_MSG_MAP()

  LRESULT OnMouseMessage(UINT uMsg, WPARAM wParam, LPARAM lParam,
                         BOOL& bHandled) {
    if (tooltip_.IsWindow()) {
      MSG msg = { m_hWnd, uMsg, wParam, lParam };
      tooltip_.RelayEvent(&msg);
    }
    bHandled = FALSE;
    return 1;
  }

  LRESULT OnPaint(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/,
                  BOOL& /*bHandled*/) {
    CPaintDC dc(m_hWnd);
    if (file_name_ != NULL) {
      RECT rect;
      GetClientRect(&rect);

      dc.SetTextColor(::GetSysColor(COLOR_WINDOWTEXT));
      dc.SetBkMode(TRANSPARENT);
      HFONT hFontOld = dc.SelectFont(AtlGetDefaultGuiFont());

      dc.DrawText(file_name_, -1, &rect, DT_SINGLELINE | DT_LEFT |
                  DT_VCENTER | DT_NOPREFIX | DT_PATH_ELLIPSIS);

      dc.SelectFont(hFontOld);
    }
    return 0;
  }

  DECLARE_WND_CLASS_EX(NULL, 0, COLOR_3DFACE)

  wchar_t* file_name_;

  enum { tooltip_id_ = 1313 };
  CToolTipCtrl tooltip_;
};

// Movie properties.
// TODO(fbarchard): Add movie duration in seconds.
class CPageOne : public CPropertyPageImpl<CPageOne> {
 public:
  enum { IDD = IDD_PROP_PAGE1 };

  CPageOne() : file_name_(NULL) {
  }

  BEGIN_MSG_MAP(CPageOne)
    MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
    CHAIN_MSG_MAP(CPropertyPageImpl<CPageOne>)
  END_MSG_MAP()

  LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/,
                       BOOL& /*bHandled*/) {
    if (file_name_ != NULL) {
      file_location_.Init(GetDlgItem(IDC_FILELOCATION), file_name_);

      WIN32_FIND_DATA find_data;
      HANDLE hFind = ::FindFirstFile(file_name_, &find_data);
      if (hFind != INVALID_HANDLE_VALUE) {
        // TODO(fbarchard): Support files larger than 2 GB
        int nSizeK = (find_data.nFileSizeLow / 1024);
        if (nSizeK == 0 && find_data.nFileSizeLow != 0)
          nSizeK = 1;
        wchar_t szBuff[100];
        wsprintf(szBuff, L"%i KB", nSizeK);
        SetDlgItemText(IDC_FILESIZE, szBuff);

        // TODO(fbarchard): We need a pipeline property for frame rate.
        float duration = media::Movie::get()->GetDuration();
        float fps = 29.97f;
        wsprintf(szBuff, L"%i.%2i Seconds, %i Frames",
                 static_cast<int>(duration),
                 static_cast<int>(duration * 100) % 100,
                 static_cast<int>(duration * fps));
        SetDlgItemText(IDC_FILEDURATION, szBuff);

        SYSTEMTIME st;
        ::FileTimeToSystemTime(&find_data.ftCreationTime, &st);
        ::GetDateFormat(LOCALE_USER_DEFAULT, 0, &st,
                        L"dddd, MMMM dd',' yyyy',' ",
                        szBuff, sizeof(szBuff) / sizeof(szBuff[0]));
        wchar_t szBuff1[50];
        ::GetTimeFormat(LOCALE_USER_DEFAULT, 0, &st,
                        L"hh':'mm':'ss tt", szBuff1,
                        sizeof(szBuff1) / sizeof(szBuff1[0]));
        lstrcat(szBuff, szBuff1);
        SetDlgItemText(IDC_FILEDATE, szBuff);

        szBuff[0] = 0;
        if ((find_data.dwFileAttributes & FILE_ATTRIBUTE_ARCHIVE) != 0)
          lstrcat(szBuff, L"Archive, ");
        if ((find_data.dwFileAttributes & FILE_ATTRIBUTE_READONLY) != 0)
          lstrcat(szBuff, L"Read-only, ");
        if ((find_data.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) != 0)
          lstrcat(szBuff, L"Hidden, ");
        if ((find_data.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM) != 0)
          lstrcat(szBuff, L"System");
        int nLen = lstrlen(szBuff);
        if (nLen >= 2 && szBuff[nLen - 2] == L',')
          szBuff[nLen - 2] = 0;
        SetDlgItemText(IDC_FILEATTRIB, szBuff);

        ::FindClose(hFind);
      }
    } else {
      SetDlgItemText(IDC_FILELOCATION, L"(Clipboard)");
      SetDlgItemText(IDC_FILESIZE, L"N/A");
      SetDlgItemText(IDC_FILEDATE, L"N/A");
      SetDlgItemText(IDC_FILEATTRIB, L"N/A");
    }
    return TRUE;
  }

  CFileName file_location_;
  wchar_t* file_name_;
};

// Frame properties.
// TODO(fbarchard): This is not implemented for movies yet.
class CPageTwo : public CPropertyPageImpl<CPageTwo> {
 public:
  enum { IDD = IDD_PROP_PAGE2 };

  CPageTwo() : file_name_(NULL) {
  }

  BEGIN_MSG_MAP(CPageTwo)
    MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
    CHAIN_MSG_MAP(CPropertyPageImpl<CPageTwo>)
  END_MSG_MAP()

  LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/,
                       BOOL& /*bHandled*/) {
    // Special - remove unused buttons, move Close button, center wizard
    CPropertySheetWindow sheet = GetPropertySheet();
#if !defined(_AYGSHELL_H_) && !defined(__AYGSHELL_H__)  // PPC specific.
    sheet.CancelToClose();
    RECT rect;
    CButton btnCancel = sheet.GetDlgItem(IDCANCEL);
    btnCancel.GetWindowRect(&rect);
    sheet.ScreenToClient(&rect);
    btnCancel.ShowWindow(SW_HIDE);
    CButton btnClose = sheet.GetDlgItem(IDOK);
    btnClose.SetWindowPos(NULL, &rect, SWP_NOZORDER | SWP_NOSIZE);
    sheet.CenterWindow(GetPropertySheet().GetParent());

    sheet.ModifyStyleEx(WS_EX_CONTEXTHELP, 0);
#endif  // (_AYGSHELL_H_) || defined(__AYGSHELL_H__)  // PPC specific.

    // Get and display movie prperties.
    SetDlgItemText(IDC_TYPE, L"MP4 Movie");
    wchar_t* lpstrCompression = L"H.264";

    if (file_name_ != NULL) {
      HANDLE hFile = ::CreateFile(file_name_, GENERIC_READ,
                                  FILE_SHARE_READ, NULL, OPEN_EXISTING,
                                  FILE_ATTRIBUTE_NORMAL |
                                  FILE_FLAG_SEQUENTIAL_SCAN, NULL);
      ATLASSERT(hFile != INVALID_HANDLE_VALUE);
      if (hFile != INVALID_HANDLE_VALUE) {
        DWORD dwRead = 0;
        BITMAPFILEHEADER bfh;
        ::ReadFile(hFile, &bfh, sizeof(bfh), &dwRead, NULL);
        BITMAPINFOHEADER bih;
        ::ReadFile(hFile, &bih, sizeof(bih), &dwRead, NULL);
        ::CloseHandle(hFile);

        SetDlgItemInt(IDC_WIDTH, bih.biWidth);
        SetDlgItemInt(IDC_HEIGHT, bih.biHeight);
        SetDlgItemInt(IDC_HORRES, ::MulDiv(bih.biXPelsPerMeter, 254, 10000));
        SetDlgItemInt(IDC_VERTRES, ::MulDiv(bih.biYPelsPerMeter, 254, 10000));
        SetDlgItemInt(IDC_BITDEPTH, bih.biBitCount);

        switch (bih.biCompression) {
        case BI_RLE4:
        case BI_RLE8:
          lpstrCompression = L"RLE";
          break;
        case BI_BITFIELDS:
          lpstrCompression = L"Uncompressed with bitfields";
          break;
        case BI_JPEG:
        case BI_PNG:
          lpstrCompression = L"Unknown";
          break;
        }
        SetDlgItemText(IDC_COMPRESSION, lpstrCompression);
      }
    } else {   // Must be pasted from the clipboard.
      ATLASSERT(!bmp_.IsNull());
      BITMAP bitmap = { 0 };
      bool result = bmp_.GetBitmap(bitmap);
      ATLASSERT(result);
      if (result) {
        CClientDC dc(NULL);
        SetDlgItemInt(IDC_WIDTH, bitmap.bmWidth);
        SetDlgItemInt(IDC_HEIGHT, bitmap.bmHeight);
        // Should we use screen resolution here???
        SetDlgItemInt(IDC_HORRES, dc.GetDeviceCaps(LOGPIXELSX));
        SetDlgItemInt(IDC_VERTRES, dc.GetDeviceCaps(LOGPIXELSX));
        SetDlgItemInt(IDC_BITDEPTH, bitmap.bmBitsPixel);
        SetDlgItemText(IDC_COMPRESSION, lpstrCompression);
      }
    }
    return TRUE;
  }

  CBitmapHandle bmp_;
  wchar_t* file_name_;
};

// Screen properties.
class CPageThree : public CPropertyPageImpl<CPageThree> {
 public:
  enum { IDD = IDD_PROP_PAGE3 };

  BEGIN_MSG_MAP(CPageThree)
    MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
    CHAIN_MSG_MAP(CPropertyPageImpl<CPageThree>)
  END_MSG_MAP()

  LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/,
                       BOOL& /*bHandled*/) {
    // Get and set screen properties.
    CClientDC dc(NULL);
    SetDlgItemInt(IDC_WIDTH, dc.GetDeviceCaps(HORZRES));
    SetDlgItemInt(IDC_HEIGHT, dc.GetDeviceCaps(VERTRES));
    SetDlgItemInt(IDC_HORRES, dc.GetDeviceCaps(LOGPIXELSX));
    SetDlgItemInt(IDC_VERTRES, dc.GetDeviceCaps(LOGPIXELSY));
    SetDlgItemInt(IDC_BITDEPTH, dc.GetDeviceCaps(BITSPIXEL));

    return TRUE;
  }
};

// TODO(fbachard): Frame properties only work for images, so
// this tab is removed until movie frame properties can be
// added.
class CBmpProperties : public CPropertySheetImpl<CBmpProperties> {
 public:

  CBmpProperties() {
    m_psh.dwFlags |= PSH_NOAPPLYNOW;

    AddPage(page1_);
    // AddPage(page2_);  // Not implemented for movies yet.
    AddPage(page3_);
    SetActivePage(0);
    SetTitle(L"Movie Properties");
  }

  void SetFileInfo(wchar_t* file_path, HBITMAP hBitmap) {
    page1_.file_name_ = file_path;
    page2_.file_name_ = file_path;
    page2_.bmp_ = hBitmap;
  }

  BEGIN_MSG_MAP(CBmpProperties)
    CHAIN_MSG_MAP(CPropertySheetImpl<CBmpProperties>)
  END_MSG_MAP()

  CPageOne page1_;
  CPageTwo page2_;
  CPageThree page3_;
};

#endif  // MEDIA_PLAYER_PROPS_H_


text:
<?php
/**
 * Generated by Protobuf protoc plugin.
 *
 * File descriptor : POGOProtos/Enums/EncounterType.proto
 */

namespace POGOProtos\Enums;

/**
 * Protobuf enum : POGOProtos.Enums.EncounterType
 */
class EncounterType extends \Protobuf\Enum
{

    /**
     * SPAWN_POINT = 0
     */
    const SPAWN_POINT_VALUE = 0;

    /**
     * INCENSE = 1
     */
    const INCENSE_VALUE = 1;

    /**
     * DISK = 2
     */
    const DISK_VALUE = 2;

    /**
     * POST_RAID = 3
     */
    const POST_RAID_VALUE = 3;

    /**
     * @var \POGOProtos\Enums\EncounterType
     */
    protected static $SPAWN_POINT = null;

    /**
     * @var \POGOProtos\Enums\EncounterType
     */
    protected static $INCENSE = null;

    /**
     * @var \POGOProtos\Enums\EncounterType
     */
    protected static $DISK = null;

    /**
     * @var \POGOProtos\Enums\EncounterType
     */
    protected static $POST_RAID = null;

    /**
     * @return \POGOProtos\Enums\EncounterType
     */
    public static function SPAWN_POINT()
    {
        if (self::$SPAWN_POINT !== null) {
            return self::$SPAWN_POINT;
        }

        return self::$SPAWN_POINT = new self('SPAWN_POINT', self::SPAWN_POINT_VALUE);
    }

    /**
     * @return \POGOProtos\Enums\EncounterType
     */
    public static function INCENSE()
    {
        if (self::$INCENSE !== null) {
            return self::$INCENSE;
        }

        return self::$INCENSE = new self('INCENSE', self::INCENSE_VALUE);
    }

    /**
     * @return \POGOProtos\Enums\EncounterType
     */
    public static function DISK()
    {
        if (self::$DISK !== null) {
            return self::$DISK;
        }

        return self::$DISK = new self('DISK', self::DISK_VALUE);
    }

    /**
     * @return \POGOProtos\Enums\EncounterType
     */
    public static function POST_RAID()
    {
        if (self::$POST_RAID !== null) {
            return self::$POST_RAID;
        }

        return self::$POST_RAID = new self('POST_RAID', self::POST_RAID_VALUE);
    }

    /**
     * @param int $value
     * @return \POGOProtos\Enums\EncounterType
     */
    public static function valueOf($value)
    {
        switch ($value) {
            case 0: return self::SPAWN_POINT();
            case 1: return self::INCENSE();
            case 2: return self::DISK();
            case 3: return self::POST_RAID();
            default: return null;
        }
    }

}


text:
package me.sniggle.security.digest;

import me.sniggle.security.digest.config.PasswordMatchResult;

/**
 * The basic interface to create a password digester
 *
 * @author iulius
 * @since 0.0.1
 *
 */
public interface PasswordDigester {

  /**
   * hashes the given plain text with the algorithm used by the implementing
   * class
   *
   * @param plainText
   *          the plain text to be hashed
   * @return the hash value
   */
  public abstract String hashPassword(String plainText);

  /**
   * verifies whether the provided plain text matches the formatted hash
   *
   * @param plainText
   *          the plain text to be verified
   * @param formattedHash
   *          the formatted hash to be used for verification
   * @return a {@link PasswordMatchResult} instance
   */
  public abstract PasswordMatchResult matchesPassword(String plainText, String formattedHash);

}


text:
var falafel = require('falafel')

module.exports = function removeCheck () {
  return {
    transform (code, id) {
      try {
        var result = falafel(code, { ecmaVersion: 6, sourceType: 'module' }, function (node) {
          switch (node.type) {
            case 'CallExpression':
              if (isCheckCall(node.callee)) {
                node.update('')
                return
              }
              break
            case 'ImportDeclaration':
              if (node.specifiers.length === 1 &&
                  isCheckImport(node.specifiers[0])) {
                node.update('')
                return
              }
              break
          }
        })
        return { code: result.toString(), map: { mappings: '' } } // TODO sourcemap support?
      } catch (e) {
        console.log(e.message)
        return null
      }
    }
  }
}

function isCheckCall (node) {
  if (node.type === 'Identifier' && node.name === 'check') {
    return true
  }
  return (
    node.type === 'MemberExpression' &&
    node.object.type === 'Identifier' &&
    node.object.name === 'check')
}

function isCheckImport (node) {
  return node.local.name === 'check'
}


text:
package org.apache.camel.component.aws.s3;

import com.amazonaws.services.s3.AmazonS3;
import org.apache.camel.spi.Metadata;
import org.apache.camel.spi.UriParam;
import org.apache.camel.spi.UriParams;
import org.apache.camel.spi.UriPath;

@UriParams
public class S3Configuration implements Cloneable {

    @UriPath @Metadata(required = "true")
    private String bucketName;
    @UriParam
    private AmazonS3 amazonS3Client;
    @UriParam
    private String accessKey;
    @UriParam
    private String secretKey;
    @UriParam
    private String fileName;
    @UriParam
    private String prefix;
    @UriParam
    private String region;
    @UriParam(defaultValue = "true")
    private boolean deleteAfterRead = true;
    @UriParam(defaultValue = "false")
    private boolean deleteAfterWrite;
    @UriParam(defaultValue = "false")
    private boolean multiPartUpload;
    @UriParam(defaultValue = "" + 25 * 1024 * 1024)
    private long partSize = 25 * 1024 * 1024;
    @UriParam
    private String amazonS3Endpoint;
    @UriParam
    private String policy;
    @UriParam
    private String storageClass;

    public long getPartSize() {
        return partSize;
    }

    public void setPartSize(long partSize) {
        this.partSize = partSize;
    }

    public boolean isMultiPartUpload() {
        return multiPartUpload;
    }

    public void setMultiPartUpload(boolean multiPartUpload) {
        this.multiPartUpload = multiPartUpload;
    }

    public void setAmazonS3Endpoint(String amazonS3Endpoint) {
        this.amazonS3Endpoint = amazonS3Endpoint;
    }

    public String getAmazonS3Endpoint() {
        return amazonS3Endpoint;
    }

    public String getAccessKey() {
        return accessKey;
    }

    public void setAccessKey(String accessKey) {
        this.accessKey = accessKey;
    }

    public String getSecretKey() {
        return secretKey;
    }

    public void setSecretKey(String secretKey) {
        this.secretKey = secretKey;
    }

    public AmazonS3 getAmazonS3Client() {
        return amazonS3Client;
    }

    public void setAmazonS3Client(AmazonS3 amazonS3Client) {
        this.amazonS3Client = amazonS3Client;
    }

    public String getPrefix() {
        return prefix;
    }

    public void setPrefix(String prefix) {
        this.prefix = prefix;
    }

    public String getBucketName() {
        return bucketName;
    }

    public void setBucketName(String bucketName) {
        this.bucketName = bucketName;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getRegion() {
        return region;
    }

    public void setRegion(String region) {
        this.region = region;
    }

    public boolean isDeleteAfterRead() {
        return deleteAfterRead;
    }

    public void setDeleteAfterRead(boolean deleteAfterRead) {
        this.deleteAfterRead = deleteAfterRead;
    }

    public boolean isDeleteAfterWrite() {
        return deleteAfterWrite;
    }

    public void setDeleteAfterWrite(boolean deleteAfterWrite) {
        this.deleteAfterWrite = deleteAfterWrite;
    }

    public String getPolicy() {
        return policy;
    }

    public void setPolicy(String policy) {
        this.policy = policy;
    }

    public String getStorageClass() {
        return storageClass;
    }

    public void setStorageClass(String storageClass) {
        this.storageClass = storageClass;
    }
}


text:
Python Demo App
===============

A trivial Flask web app that can be used to demo performance monitoring features. The app has routes that do things like:

1. Sleep in a way that draws a pretty response time graph.
2. Raise uncaught exceptions in application code.
3. Simulate slow database calls in MySQL and PostgreSQL.
4. Make external HTTP calls.
5. Return HTTP errors (5xx and 4xx).

NOTE: To use the AppDynamics Python Agent, you must have a compatible (4.0+) AppDynamics controller in SAAS or On Premise and a license provisioned for Python agents.

## Installation

Python 2.6 or 2.7 are required. MacOS X and recent Linux distributions should have these preinstalled. Older Linux distributions (like CentOS 5) may come with a version of Python is too old, but you should be able to easily find packages for Python 2.7.

You must have `pip` and `virtualenv` installed. These may already be installed for you. If not, install `pip` with:

```
sudo easy_install pip
```

And then use `pip` to install `virtualenv`:

```
sudo pip install virtualenv
```

Create a virtualenv:

```
virtualenv env
env/bin/pip install -r requirements.txt
```

Install and configure MySQL and/or PostgreSQL. They both are configured in `demo/config.py` to be running on localhost with the default port, a user named `test`, with password `test`, and a database named `test`. There do not need to be any tables or anything in the `test` database.

The web server runs on port 9000.

To run the development server:

```
env/bin/python demo/app.py
```

To run in production:

```
env/bin/gunicorn -w 4 -b 0.0.0.0:9000 demo.app:app
```

## Running with the agent

If your version of pip is older than 1.5, upgrade pip with:

```
pip install -U pip
```

Then install the agent into your virtualenv:

```
env/bin/pip install --pre appdynamics
```

Run the agent with the `pyagent` command and a configuration file (there's a sample configuration file included in this repository, `appdynamics.cfg`):

```
env/bin/pyagent run -c appdynamics.cfg - env/bin/gunicorn -w 4 -b 0.0.0.0:9000 demo.app:app
```

## Generating load

Install siege through your package manager (`yum install siege` on Red Hat, `apt-get install siege` on Debian, or `brew install siege` on Mac). Edit the siege.txt (or copy it and edit the copy) and edit the variables defined at the top to specify the exit calls you wish to make, then run:

```
siege -d 1 -f siege.txt
```

## Run with Docker

In Docker directory, add configuration value to CONTR_HOST, ACCOUNT_NAME, ACCESS_KEY, APP_NAME, TIER_NAME, NODE_NAME in startPython.sh.

Run docker with

```
./startPython.sh
```

## HTTP Exit Call / Distributed Correlation Testing

The AppDynamics Python agent supports distributed correlation across tiers. The agent supports both being the originating tier and the continuing tier. To demonstrate this and test it out, you can use the `/http` endpoint to cause an HTTP exit call with a correlation header. This is useful for testing cross-tier correlation (as of 4.0.0, the Python agent does not support cross-app correlation). For example, if you have a .NET instrumented tier at 192.168.0.1, you can cause correlation by going to `http://127.0.0.1/http?url=http://192.168.0.1/`.


text:
package de.predic8.n_avro;

import org.apache.avro.file.DataFileWriter;
import org.apache.avro.io.DatumWriter;
import org.apache.avro.specific.SpecificDatumWriter;

import java.io.File;
import java.io.IOException;

public class Schreiben {

    public static void main(String[] args) throws IOException {
        Article a = Article.newBuilder()
                .setName("Beef")
                .setPrice(5)
                .setOrigin("Argentina")
                .build();

        DatumWriter<Article> userDatumWriter = new SpecificDatumWriter<>(Article.class);
        DataFileWriter<Article> dataFileWriter = new DataFileWriter<>(userDatumWriter);
        dataFileWriter.create(a.getSchema(), new File("article.avro"));
        dataFileWriter.append(a);
        dataFileWriter.close();
    }
}