text:
package com.google.gerrit.client.change;

import static com.google.gwt.event.dom.client.KeyCodes.KEY_ENTER;
import static com.google.gwt.event.dom.client.KeyCodes.KEY_MAC_ENTER;

import com.google.gerrit.client.Gerrit;
import com.google.gerrit.client.changes.ChangeApi;
import com.google.gerrit.client.changes.CommentInfo;
import com.google.gerrit.client.changes.ReviewInput;
import com.google.gerrit.client.changes.ReviewInput.DraftHandling;
import com.google.gerrit.client.changes.Util;
import com.google.gerrit.client.info.ChangeInfo.ApprovalInfo;
import com.google.gerrit.client.info.ChangeInfo.LabelInfo;
import com.google.gerrit.client.info.ChangeInfo.MessageInfo;
import com.google.gerrit.client.rpc.GerritCallback;
import com.google.gerrit.client.rpc.NativeMap;
import com.google.gerrit.client.rpc.Natives;
import com.google.gerrit.client.rpc.RestApi;
import com.google.gerrit.client.ui.CommentLinkProcessor;
import com.google.gerrit.common.PageLinks;
import com.google.gerrit.common.data.LabelValue;
import com.google.gerrit.reviewdb.client.Patch;
import com.google.gerrit.reviewdb.client.PatchSet;
import com.google.gerrit.reviewdb.client.Project;
import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.JsArray;
import com.google.gwt.core.client.JsArrayString;
import com.google.gwt.core.client.Scheduler;
import com.google.gwt.core.client.Scheduler.RepeatingCommand;
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
import com.google.gwt.dom.client.Element;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.KeyDownEvent;
import com.google.gwt.event.dom.client.KeyDownHandler;
import com.google.gwt.event.dom.client.KeyPressEvent;
import com.google.gwt.event.dom.client.KeyPressHandler;
import com.google.gwt.event.dom.client.MouseOutEvent;
import com.google.gwt.event.dom.client.MouseOutHandler;
import com.google.gwt.event.dom.client.MouseOverEvent;
import com.google.gwt.event.dom.client.MouseOverHandler;
import com.google.gwt.event.logical.shared.ValueChangeEvent;
import com.google.gwt.event.logical.shared.ValueChangeHandler;
import com.google.gwt.resources.client.CssResource;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.CheckBox;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.Grid;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.HTMLTable.CellFormatter;
import com.google.gwt.user.client.ui.PopupPanel;
import com.google.gwt.user.client.ui.RadioButton;
import com.google.gwt.user.client.ui.ScrollPanel;
import com.google.gwt.user.client.ui.TextArea;
import com.google.gwt.user.client.ui.UIObject;
import com.google.gwt.user.client.ui.Widget;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;

public class ReplyBox extends Composite {
  interface Binder extends UiBinder<HTMLPanel, ReplyBox> {}

  private static final Binder uiBinder = GWT.create(Binder.class);

  interface Styles extends CssResource {
    String label_name();

    String label_value();

    String label_help();
  }

  private final CommentLinkProcessor clp;
  private final Project.NameKey project;
  private final PatchSet.Id psId;
  private final String revision;
  private ReviewInput in = ReviewInput.create();
  private int labelHelpColumn;
  private LocalComments lc;

  @UiField Styles style;
  @UiField TextArea message;
  @UiField Element labelsParent;
  @UiField Grid labelsTable;
  @UiField Button post;
  @UiField Button cancel;
  @UiField ScrollPanel commentsPanel;
  @UiField FlowPanel comments;

  ReplyBox(
      CommentLinkProcessor clp,
      Project.NameKey project,
      PatchSet.Id psId,
      String revision,
      NativeMap<LabelInfo> all,
      NativeMap<JsArrayString> permitted) {
    this.clp = clp;
    this.project = project;
    this.psId = psId;
    this.revision = revision;
    this.lc = new LocalComments(project, psId.getParentKey());
    initWidget(uiBinder.createAndBindUi(this));

    List<String> names = new ArrayList<>(permitted.keySet());
    if (names.isEmpty()) {
      UIObject.setVisible(labelsParent, false);
    } else {
      Collections.sort(names);
      renderLabels(names, all, permitted);
    }

    addDomHandler(
        new KeyDownHandler() {
          @Override
          public void onKeyDown(KeyDownEvent e) {
            e.stopPropagation();
            if ((e.getNativeKeyCode() == KEY_ENTER || e.getNativeKeyCode() == KEY_MAC_ENTER)
                && (e.isControlKeyDown() || e.isMetaKeyDown())) {
              e.preventDefault();
              if (post.isEnabled()) {
                onPost(null);
              }
            }
          }
        },
        KeyDownEvent.getType());
    addDomHandler(
        new KeyPressHandler() {
          @Override
          public void onKeyPress(KeyPressEvent e) {
            e.stopPropagation();
          }
        },
        KeyPressEvent.getType());
  }

  @Override
  protected void onLoad() {
    commentsPanel.setVisible(false);
    post.setEnabled(false);
    if (lc.hasReplyComment()) {
      message.setText(lc.getReplyComment());
      lc.removeReplyComment();
    }
    ChangeApi.drafts(project.get(), psId.getParentKey().get())
        .get(
            new AsyncCallback<NativeMap<JsArray<CommentInfo>>>() {
              @Override
              public void onSuccess(NativeMap<JsArray<CommentInfo>> result) {
                displayComments(result);
                post.setEnabled(true);
              }

              @Override
              public void onFailure(Throwable caught) {
                post.setEnabled(true);
              }
            });

    Scheduler.get()
        .scheduleDeferred(
            new ScheduledCommand() {
              @Override
              public void execute() {
                message.setFocus(true);
              }
            });
    Scheduler.get()
        .scheduleFixedDelay(
            new RepeatingCommand() {
              @Override
              public boolean execute() {
                String t = message.getText();
                if (t != null) {
                  message.setCursorPos(t.length());
                }
                return false;
              }
            },
            0);
  }

  @UiHandler("post")
  void onPost(@SuppressWarnings("unused") ClickEvent e) {
    postReview();
  }

  void quickApprove(ReviewInput quickApproveInput) {
    in.mergeLabels(quickApproveInput);
    postReview();
  }

  boolean hasMessage() {
    return !message.getText().trim().isEmpty();
  }

  private void postReview() {
    in.message(message.getText().trim());
    // Don't send any comments in the request; just publish everything, even if
    // e.g. a draft was modified in another tab since we last looked it up.
    in.drafts(DraftHandling.PUBLISH_ALL_REVISIONS);
    in.prePost();
    ChangeApi.revision(project.get(), psId.getParentKey().get(), revision)
        .view("review")
        .post(
            in,
            new GerritCallback<ReviewInput>() {
              @Override
              public void onSuccess(ReviewInput result) {
                Gerrit.display(PageLinks.toChange(project, psId));
              }

              @Override
              public void onFailure(Throwable caught) {
                if (RestApi.isNotSignedIn(caught)) {
                  lc.setReplyComment(message.getText());
                }
                super.onFailure(caught);
              }
            });
    hide();
  }

  @UiHandler("cancel")
  void onCancel(@SuppressWarnings("unused") ClickEvent e) {
    message.setText("");
    hide();
  }

  void replyTo(MessageInfo msg) {
    if (msg.message() != null) {
      String t = message.getText();
      String m = quote(removePatchSetHeaderLine(msg.message()));
      if (t == null || t.isEmpty()) {
        t = m;
      } else if (t.endsWith("\n\n")) {
        t += m;
      } else if (t.endsWith("\n")) {
        t += "\n" + m;
      } else {
        t += "\n\n" + m;
      }
      message.setText(t);
    }
  }

  private static String removePatchSetHeaderLine(String msg) {
    msg = msg.trim();
    if (msg.startsWith("Patch Set ")) {
      int i = msg.indexOf('\n');
      if (i > 0) {
        msg = msg.substring(i + 1).trim();
      }
    }
    return msg;
  }

  public static String quote(String msg) {
    msg = msg.trim();
    StringBuilder quotedMsg = new StringBuilder();
    for (String line : msg.split("\\n")) {
      line = line.trim();
      while (line.length() > 67) {
        int i = line.lastIndexOf(' ', 67);
        if (i < 50) {
          i = line.indexOf(' ', 67);
        }
        if (i > 0) {
          quotedMsg.append(" > ").append(line.substring(0, i)).append("\n");
          line = line.substring(i + 1);
        } else {
          break;
        }
      }
      quotedMsg.append(" > ").append(line).append("\n");
    }
    quotedMsg.append("\n");
    return quotedMsg.toString();
  }

  private void hide() {
    for (Widget w = getParent(); w != null; w = w.getParent()) {
      if (w instanceof PopupPanel) {
        ((PopupPanel) w).hide();
        break;
      }
    }
  }

  private void renderLabels(
      List<String> names, NativeMap<LabelInfo> all, NativeMap<JsArrayString> permitted) {
    TreeSet<Short> values = new TreeSet<>();
    List<LabelAndValues> labels = new ArrayList<>(permitted.size());
    for (String id : names) {
      JsArrayString p = permitted.get(id);
      if (p != null) {
        if (!all.containsKey(id)) {
          continue;
        }
        Set<Short> a = new TreeSet<>();
        for (int i = 0; i < p.length(); i++) {
          a.add(LabelInfo.parseValue(p.get(i)));
        }
        labels.add(new LabelAndValues(all.get(id), a));
        values.addAll(a);
      }
    }
    List<Short> columns = new ArrayList<>(values);

    labelsTable.resize(1 + labels.size(), 2 + values.size());
    for (int c = 0; c < columns.size(); c++) {
      labelsTable.setText(0, 1 + c, LabelValue.formatValue(columns.get(c)));
      labelsTable.getCellFormatter().setStyleName(0, 1 + c, style.label_value());
    }

    List<LabelAndValues> checkboxes = new ArrayList<>(labels.size());
    int row = 1;
    for (LabelAndValues lv : labels) {
      if (isCheckBox(lv.info.valueSet())) {
        checkboxes.add(lv);
      } else {
        renderRadio(row++, columns, lv);
      }
    }
    for (LabelAndValues lv : checkboxes) {
      renderCheckBox(row++, lv);
    }
  }

  private Short normalizeDefaultValue(Short defaultValue, Set<Short> permittedValues) {
    Short pmin = Collections.min(permittedValues);
    Short pmax = Collections.max(permittedValues);
    Short dv = defaultValue;
    if (dv > pmax) {
      dv = pmax;
    } else if (dv < pmin) {
      dv = pmin;
    }
    return dv;
  }

  private void renderRadio(int row, List<Short> columns, LabelAndValues lv) {
    String id = lv.info.name();
    Short dv = normalizeDefaultValue(lv.info.defaultValue(), lv.permitted);

    labelHelpColumn = 1 + columns.size();
    labelsTable.setText(row, 0, id);

    CellFormatter fmt = labelsTable.getCellFormatter();
    fmt.setStyleName(row, 0, style.label_name());
    fmt.setStyleName(row, labelHelpColumn, style.label_help());

    ApprovalInfo self =
        Gerrit.isSignedIn() ? lv.info.forUser(Gerrit.getUserAccount().getId().get()) : null;

    final LabelRadioGroup group = new LabelRadioGroup(row, id, lv.permitted.size());
    for (int i = 0; i < columns.size(); i++) {
      Short v = columns.get(i);
      if (lv.permitted.contains(v)) {
        String text = lv.info.valueText(LabelValue.formatValue(v));
        LabelRadioButton b = new LabelRadioButton(group, text, v);
        if ((self != null && v == self.value()) || (self == null && v.equals(dv))) {
          b.setValue(true);
          group.select(b);
          in.label(group.label, v);
          labelsTable.setText(row, labelHelpColumn, b.text);
        }
        group.buttons.add(b);
        labelsTable.setWidget(row, 1 + i, b);
      }
    }
  }

  private void renderCheckBox(int row, LabelAndValues lv) {
    ApprovalInfo self =
        Gerrit.isSignedIn() ? lv.info.forUser(Gerrit.getUserAccount().getId().get()) : null;

    final String id = lv.info.name();
    final CheckBox b = new CheckBox();
    b.setText(id);
    b.setEnabled(lv.permitted.contains((short) 1));
    if (self != null && self.value() == 1) {
      b.setValue(true);
    }
    b.addValueChangeHandler(
        new ValueChangeHandler<Boolean>() {
          @Override
          public void onValueChange(ValueChangeEvent<Boolean> event) {
            in.label(id, event.getValue() ? (short) 1 : (short) 0);
          }
        });
    b.setStyleName(style.label_name());
    labelsTable.setWidget(row, 0, b);

    CellFormatter fmt = labelsTable.getCellFormatter();
    fmt.setStyleName(row, labelHelpColumn, style.label_help());
    labelsTable.setText(row, labelHelpColumn, lv.info.valueText("+1"));
  }

  private static boolean isCheckBox(Set<Short> values) {
    return values.size() == 2 && values.contains((short) 0) && values.contains((short) 1);
  }

  private void displayComments(NativeMap<JsArray<CommentInfo>> m) {
    comments.clear();

    JsArray<CommentInfo> l = m.get(Patch.COMMIT_MSG);
    if (l != null) {
      comments.add(
          new FileComments(
              clp, project, psId, Util.C.commitMessage(), copyPath(Patch.COMMIT_MSG, l)));
    }
    l = m.get(Patch.MERGE_LIST);
    if (l != null) {
      comments.add(
          new FileComments(
              clp, project, psId, Util.C.commitMessage(), copyPath(Patch.MERGE_LIST, l)));
    }

    List<String> paths = new ArrayList<>(m.keySet());
    Collections.sort(paths);

    for (String path : paths) {
      if (!Patch.isMagic(path)) {
        comments.add(new FileComments(clp, project, psId, path, copyPath(path, m.get(path))));
      }
    }

    commentsPanel.setVisible(comments.getWidgetCount() > 0);
  }

  private static List<CommentInfo> copyPath(String path, JsArray<CommentInfo> l) {
    for (int i = 0; i < l.length(); i++) {
      l.get(i).path(path);
    }
    return Natives.asList(l);
  }

  private static class LabelAndValues {
    final LabelInfo info;
    final Set<Short> permitted;

    LabelAndValues(LabelInfo info, Set<Short> permitted) {
      this.info = info;
      this.permitted = permitted;
    }
  }

  private class LabelRadioGroup {
    final int row;
    final String label;
    final List<LabelRadioButton> buttons;
    LabelRadioButton selected;

    LabelRadioGroup(int row, String label, int cnt) {
      this.row = row;
      this.label = label;
      this.buttons = new ArrayList<>(cnt);
    }

    void select(LabelRadioButton b) {
      selected = b;
      labelsTable.setText(row, labelHelpColumn, b.text);
    }
  }

  private class LabelRadioButton extends RadioButton
      implements ValueChangeHandler<Boolean>, ClickHandler, MouseOverHandler, MouseOutHandler {
    private final LabelRadioGroup group;
    private final String text;
    private final short value;

    LabelRadioButton(LabelRadioGroup group, String text, short value) {
      super(group.label);
      this.group = group;
      this.text = text;
      this.value = value;
      addValueChangeHandler(this);
      addClickHandler(this);
      addMouseOverHandler(this);
      addMouseOutHandler(this);
    }

    @Override
    public void onValueChange(ValueChangeEvent<Boolean> event) {
      if (event.getValue()) {
        select();
      }
    }

    @Override
    public void onClick(ClickEvent event) {
      select();
    }

    void select() {
      group.select(this);
      in.label(group.label, value);
    }

    @Override
    public void onMouseOver(MouseOverEvent event) {
      labelsTable.setText(group.row, labelHelpColumn, text);
    }

    @Override
    public void onMouseOut(MouseOutEvent event) {
      LabelRadioButton b = group.selected;
      String s = b != null ? b.text : "";
      labelsTable.setText(group.row, labelHelpColumn, s);
    }
  }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<Form xmlns="http://v8.1c.ru/8.3/xcf/logform" xmlns:app="http://v8.1c.ru/8.2/managed-application/core" xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:dcscor="http://v8.1c.ru/8.1/data-composition-system/core" xmlns:dcsset="http://v8.1c.ru/8.1/data-composition-system/settings" xmlns:ent="http://v8.1c.ru/8.1/data/enterprise" xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.1">
	<WindowOpeningMode>LockOwnerWindow</WindowOpeningMode>
	<AutoCommandBar name="ФормаКоманднаяПанель" id="-1"/>
	<ChildItems>
		<LabelField name="УникальныйИдентификаторОперации" id="4">
			<DataPath>Запись.ИдентификаторОперации</DataPath>
			<ContextMenu name="УникальныйИдентификаторОперацииКонтекстноеМеню" id="5"/>
			<ExtendedTooltip name="УникальныйИдентификаторОперацииРасширеннаяПодсказка" id="6"/>
		</LabelField>
		<InputField name="Наименование" id="7">
			<DataPath>Запись.Наименование</DataPath>
			<ContextMenu name="НаименованиеКонтекстноеМеню" id="8"/>
			<ExtendedTooltip name="НаименованиеРасширеннаяПодсказка" id="9"/>
		</InputField>
		<InputField name="КоличествоУникальныхКомментариев" id="10">
			<DataPath>Запись.КоличествоУникальныхКомментариев</DataPath>
			<ContextMenu name="КоличествоУникальныхКомментариевКонтекстноеМеню" id="11"/>
			<ExtendedTooltip name="КоличествоУникальныхКомментариевРасширеннаяПодсказка" id="12"/>
		</InputField>
		<InputField name="ХешНаименования" id="1">
			<DataPath>Запись.ХешНаименования</DataPath>
			<ContextMenu name="ХешНаименованияКонтекстноеМеню" id="2"/>
			<ExtendedTooltip name="ХешНаименованияРасширеннаяПодсказка" id="3"/>
		</InputField>
	</ChildItems>
	<Attributes>
		<Attribute name="Запись" id="1">
			<Type>
				<v8:Type>cfg:InformationRegisterRecordManager.ОперацииСтатистики</v8:Type>
			</Type>
			<MainAttribute>true</MainAttribute>
			<SavedData>true</SavedData>
		</Attribute>
	</Attributes>
</Form>

redpajama_set_name: RedPajamaGithub


text:
<?php
/**
 * Created by PhpStorm.
 * User: Lahiru
 * Date: 26/12/2015
 * Time: 5:11 PM
 */

namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
 * @ORM\Entity
 * @ORM\Table(name="slave_payment")
 * @ORM\Entity(repositoryClass="AppBundle\Entity\SlavePaymentRepository")
 */
class slave_payment
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;
    /**
     * @ORM\ManyToOne(targetEntity="slave_user", inversedBy="slave_payments")
     * @ORM\JoinColumn(name="slave_user", referencedColumnName="sid", onDelete="CASCADE")
     */
    protected $slave_user;
    /**
     * @ORM\Column(type="datetime")
     */
    protected $date;
    /**
     * @ORM\Column(type="integer")
     */
    protected $fee;

    /**
     * slave_payment constructor.
     * @param $slave_user
     * @param $date
     * @param $fee
     */
    public function __construct()
    {
        $this->date = new \DateTime('now');
    }

    /**
     * @return mixed
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set date
     *
     * @param \DateTime $date
     *
     * @return slave_payment
     */
    private function setDate($date)
    {
        $this->date = $date;

        return $this;
    }

    /**
     * Get date
     *
     * @return \DateTime
     */
    public function getDate()
    {
        return $this->date;
    }

    /**
     * Get fee
     *
     * @return integer
     */
    public function getFee()
    {
        return $this->fee;
    }

    /**
     * @return mixed
     */
    public function getSlaveUser()
    {
        return $this->slave_user;
    }

    /**
     * @param mixed $slave_user
     */
    public function setSlaveUser($slave_user)
    {
        $this->slave_user = $slave_user;
    }

    /**
     * @param mixed $fee
     */
    public function setFee($fee)
    {
        $this->fee = $fee;
    }

}


text:
using Microsoft.SharePoint.Client;
using System;
using System.Text;

namespace OfficeDevPnP.Core.Utilities {
    /// <summary>
    /// Use this class to build your CAML xml and avoid XML issues.
    /// </summary>
    /// <example>
    /// CAML.ViewQuery(
    ///     CAML.Where(
    ///         CAML.And(
    ///             CAML.Eq(CAML.FieldValue("Project", "Integer", "{0}")),
    ///             CAML.Geq(CAML.FieldValue("StartDate","DateTime", CAML.Today()))
    ///         )
    ///     ),
    ///     CAML.OrderBy(
    ///         new OrderByField("StartDate", false),
    ///         new OrderByField("Title")
    ///     ),
    ///     rowLimit: 5
    /// );
    /// </example>
    public static class CAML {
        const string VIEW_XML_WRAPPER = "<View Scope=\"{0}\"><Query>{1}{2}</Query>{3}<RowLimit>{4}</RowLimit></View>";
        const string FIELD_VALUE = "<FieldRef Name='{0}' {1}/><Value Type='{2}'>{3}</Value>";
        const string FIELD_VALUE_ID = "<FieldRef ID='{0}' {1} /><Value Type='{2}'>{3}</Value>";
        const string WHERE_CLAUSE = "<Where>{0}</Where>";
        const string GENERIC_CLAUSE = "<{0}>{1}</{0}>";
        const string CONDITION_CLAUSE = "<{0}>{1}{2}</{0}>";

        const string VIEW_FIELDS_CLAUSE = "<ViewFields>{0}</ViewFields>";
        const string FIELD_REF_CLAUSE = "<FieldRef Name='{0}'/>";

        public static readonly string Me = "<UserId />";
        public static readonly string Month = "<Month />";
        public static readonly string Now = "<Now />";

        /// <summary>
        /// Creates the <Today /> node.
        /// </summary>
        /// <param name="offset">Time offset from today (+5 days or -5 days, for example).</param>
        /// <returns></returns>
        public static string Today(int? offset = null) {
            if (offset.HasValue)
                return $"<Today Offset='{offset.Value}' />";
            return "<Today />";
        }

        /// <summary>
        /// Root <View> and <Query> nodes.
        /// </summary>
        /// <param name="whereClause"><Where> node.</param>
        /// <param name="orderByClause"><OrderBy> node.</param>
        /// <param name="rowLimit"><RowLimit> node.</param>
        /// <returns>String to be used in CAML queries</returns>
        public static string ViewQuery(string whereClause = "", string orderByClause = "", int rowLimit = 100) {
            return CAML.ViewQuery(ViewScope.DefaultValue, whereClause, orderByClause, string.Empty, rowLimit);
        }

        /// <summary>
        /// Root <View> and <Query> nodes.
        /// </summary>
        /// <param name="scope">View scope</param>
        /// <param name="whereClause"><Where> node.</param>
        /// <param name="viewFields"><ViewFields> node.</param>
        /// <param name="orderByClause"><OrderBy> node.</param>
        /// <param name="rowLimit"><RowLimit> node.</param>
        /// <returns>String to be used in CAML queries</returns>
        public static string ViewQuery(ViewScope scope, string whereClause = "", string orderByClause = "", string viewFields = "", int rowLimit = 100) {
            string viewScopeStr = scope == ViewScope.DefaultValue ? string.Empty : scope.ToString();
            return string.Format(VIEW_XML_WRAPPER, viewScopeStr, whereClause, orderByClause, viewFields, rowLimit);
        }

        /// <summary>
        /// Creates both a <FieldRef> and <Value> nodes combination for Where clauses.
        /// </summary>
        /// <param name="fieldName"></param>
        /// <param name="fieldValueType"></param>
        /// <param name="value"></param>
        /// <param name="additionalFieldRefParams"></param>
        /// <returns></returns>
        public static string FieldValue(string fieldName, string fieldValueType, string value, string additionalFieldRefParams = "") {
            return string.Format(FIELD_VALUE, fieldName, additionalFieldRefParams, fieldValueType, value);
        }

        /// <summary>
        /// Creates both a <FieldRef> and <Value> nodes combination for Where clauses.
        /// </summary>
        /// <param name="fieldId"></param>
        /// <param name="fieldValueType"></param>
        /// <param name="value"></param>
        /// <param name="additionalFieldRefParams"></param>
        /// <returns></returns>
        public static string FieldValue(Guid fieldId, string fieldValueType, string value, string additionalFieldRefParams = "") {
            return string.Format(FIELD_VALUE_ID, fieldId.ToString(), additionalFieldRefParams, fieldValueType, value);
        }

        /// <summary>
        /// Creates a <FieldRef> node for ViewFields clause
        /// </summary>
        /// <param name="fieldName"></param>
        /// <returns></returns>
        public static string FieldRef(string fieldName) {
            return string.Format(FIELD_REF_CLAUSE, fieldName);
        }

        public static string OrderBy(params OrderByField[] fieldRefs) {
            var sb = new StringBuilder();
            foreach (var field in fieldRefs){
                sb.Append(field.ToString());
            }
            return string.Format(GENERIC_CLAUSE, CamlClauses.OrderBy, sb.ToString());
        }

        public static string Where(string conditionClause) {
            return string.Format(GENERIC_CLAUSE, CamlClauses.Where, conditionClause);
        }

        public static string ViewFields(params string[] fieldRefs) {
            string refs = string.Empty;

            foreach (var refField in fieldRefs) {
                refs += refField;
            }
            return string.Format(VIEW_FIELDS_CLAUSE, refs);
        }

        #region Conditions
        public static string And(string clause1, params string[] conditionClauses) {
            return Condition(CamlConditions.And, clause1, conditionClauses);
        }

        public static string Or(string clause1, params string[] conditionClauses) {
            return Condition(CamlConditions.Or, clause1, conditionClauses);
        }
        #endregion

        #region Comparisons
        public static string BeginsWith(string fieldValue) {
            return Comparison(CamlComparisions.BeginsWith, fieldValue);
        }
        public static string Contains(string fieldValue) {
            return Comparison(CamlComparisions.Contains, fieldValue);
        }
        public static string DateRangesOverlap(string fieldValue) {
            return Comparison(CamlComparisions.DateRangesOverlap, fieldValue);
        }
        public static string Eq(string fieldValue) {
            return Comparison(CamlComparisions.Eq, fieldValue);
        }
        public static string Geq(string fieldValue) {
            return Comparison(CamlComparisions.Geq, fieldValue);
        }
        public static string Gt(string fieldValue) {
            return Comparison(CamlComparisions.Gt, fieldValue);
        }
        public static string In(string fieldValue) {
            return Comparison(CamlComparisions.In, fieldValue);
        }
        public static string Includes(string fieldValue) {
            return Comparison(CamlComparisions.Includes, fieldValue);
        }
        public static string IsNotNull(string fieldValue) {
            return Comparison(CamlComparisions.IsNotNull, fieldValue);
        }
        public static string IsNull(string fieldValue) {
            return Comparison(CamlComparisions.IsNull, fieldValue);
        }
        public static string Leq(string fieldValue) {
            return Comparison(CamlComparisions.Leq, fieldValue);
        }
        public static string Lt(string fieldValue) {
            return Comparison(CamlComparisions.Lt, fieldValue);
        }
        public static string Neq(string fieldValue) {
            return Comparison(CamlComparisions.Neq, fieldValue);
        }
        public static string NotIncludes(string fieldValue) {
            return Comparison(CamlComparisions.NotIncludes, fieldValue);
        }
        #endregion

        static string Comparison(CamlComparisions comparison, string fieldValue) {
            return string.Format(GENERIC_CLAUSE, comparison, fieldValue);
        }

        static string Condition(CamlConditions condition, string clause1, params string[] comparisonClauses) {
            var formattedString = clause1;

            foreach (var clause in comparisonClauses) {
                formattedString = string.Format(CONDITION_CLAUSE, condition, formattedString, clause);
            }

            return formattedString;
        }

        enum CamlComparisions {
            BeginsWith, Contains, DateRangesOverlap,
            Eq, Geq, Gt, In, Includes, IsNotNull, IsNull,
            Leq, Lt, Neq, NotIncludes
        }
        enum CamlConditions { And, Or }
        enum CamlClauses { Where, OrderBy, GroupBy }

    }

    public class OrderByField {
        const string ORDERBY_FIELD = "<FieldRef Name='{0}' Ascending='{1}' />";
        public OrderByField(string name) : this(name, true) { }
        public OrderByField(string name, bool ascending) {
            Name = name;
            Ascending = ascending;
        }
        public string Name { get; set; }
        public bool Ascending { get; set; }
        public override string ToString() {
            return string.Format(ORDERBY_FIELD, Name, Ascending.ToString().ToUpper());
        }
    }
}


text:
namespace chrono {
namespace vehicle {

/// @addtogroup vehicle_tracked
/// @{

/// Tracked vehicle model constructed from a JSON specification file.
class CH_VEHICLE_API TrackedVehicle : public ChTrackedVehicle {
  public:
    TrackedVehicle(const std::string& filename, ChContactMethod contact_method = ChContactMethod::NSC);

    TrackedVehicle(ChSystem* system, const std::string& filename);

    ~TrackedVehicle() {}

    virtual void Initialize(const ChCoordsys<>& chassisPos, double chassisFwdVel = 0) override;

  private:
    void Create(const std::string& filename);

  private:
    double m_track_offset[2];  ///< offsets for the left and right track assemblies
};

/// @} vehicle_tracked

}  // end namespace vehicle
}  // end namespace chrono

#endif


text:
<?php

declare(strict_types=1);

namespace Admin\Factory\Controller;

use Admin\Controller\AuthController;
use Admin\Service\AdminUserService;
use Interop\Container\ContainerInterface;
use Zend\Expressive\Router\RouterInterface;
use Zend\Expressive\Template\TemplateRendererInterface;

/**
 * Class AuthFactory.
 */
final class AuthFactory
{
    /**
     * Factory method.
     *
     * @param ContainerInterface $container container
     *
     * @return AuthController
     */
    public function __invoke(ContainerInterface $container) : AuthController
    {
        return new AuthController(
            $container->get(RouterInterface::class),
            $container->get(TemplateRendererInterface::class),
            $container->get('session'),
            $container->get(AdminUserService::class)
        );
    }
}


text:
package nilgiri.math.autodiff;

import nilgiri.math.AbstractIdentityFactory;
import nilgiri.math.Field;

/** A constant in X forms a field.
 * Computations are done correctly
 * while objects of this class and those values are immutable.
 * @author uniker9
 *
 * @param <X> A set forms a field.
 */
public class Constant<X extends Field<X>> extends DifferentialFunction<X> {

	private X m_x;
	private AbstractIdentityFactory<X> m_factory;

	protected Constant(X i_v, AbstractIdentityFactory<X> i_factory) {
		if (i_v != null && i_factory != null) {
			m_x = i_v;
			m_factory = i_factory;
		} else {
			throw new IllegalArgumentException("Input not null value.");
		}
	}

	protected AbstractIdentityFactory<X> factory() {
		return m_factory;
	}

	@Override
	public boolean isConstant() {
		return true;
	}

	@Override
	public X getValue() {
		return m_x;
	}

	@Override
	public DifferentialFunction<X> diff(Variable<X> i_v) {
		return new Zero<X>(m_factory);
	}

	@Override
	public String toString() {
		return getValue().toString();
	}

	@Override
	protected DifferentialFunction<X> plused(DifferentialFunction<X> i_v) {
		return i_v.isConstant() ? new Constant<X>(i_v.getValue().plus(this.m_x), m_factory) : super.plused(i_v);
	}

	@Override
	protected DifferentialFunction<X> muled(DifferentialFunction<X> i_v) {
		return i_v.isConstant() ? new Constant<X>(i_v.getValue().mul(this.m_x), m_factory) : super.muled(i_v);
	}

	//public DifferentialFunction<X> inverse() {
	public Constant<X> inverse() {
		return new Constant<X>(m_x.inverse(), m_factory);
	}

	//public DifferentialFunction<X> negate() {
	public Constant<X> negate() {
		return new Constant<X>(m_x.negate(), m_factory);
	}

	//This class must be immutable.
	//set and assign must not be implemented.
	@SuppressWarnings("unused")
	private final void set(X i_x){
	}
	@SuppressWarnings("unused")
	private final void assign(X i_x){
	}

}


text:
"""GCI specific views for Student.
"""

__authors__ = [
    '"Madhusudan.C.S" <madhusudancs@gmail.com>',
    '"Daniel Hans" <daniel.m.hans@gmail.com>',
    '"Sverre Rabbelier" <sverre@rabbelier.nl>'
    '"Lennard de Rijk" <ljvderijk@gmail.com>',
  ]

import logging

from google.appengine.ext import blobstore

from django import forms
from django import http
from django.forms import fields as django_fields
from django.template import defaultfilters
from django.utils.translation import ugettext

from soc.logic import dicts
from soc.views.helper import decorators
from soc.views.helper import dynaform
from soc.views.helper import lists
from soc.views.helper import params as params_helper
from soc.views.helper import redirects
from soc.views.helper import responses
from soc.views.helper import widgets
from soc.views.models import student

from soc.modules.gci.logic.models import mentor as gci_mentor_logic
from soc.modules.gci.logic.models import org_admin as gci_org_admin_logic
from soc.modules.gci.logic.models import program as gci_program_logic
from soc.modules.gci.logic.models.student  import logic as gci_student_logic
from soc.modules.gci.views.helper import access as gci_access
from soc.modules.gci.views.helper import redirects as gci_redirects
from soc.modules.gci.views.models import program as gci_program_view

import soc.modules.gci.logic.models.student

class View(student.View):
  """View methods for the GCI Student model.
  """

  DEF_NO_TASKS_MSG = ugettext(
      'There are no tasks affiliated to you.')

  DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S'     # '2006-10-25 14:30:59'

  def __init__(self, params=None):
    """Defines the fields and methods required for the student View class
    to provide the user with list, public, create, edit and delete views.

    Params:
      params: a dict with params for this View
    """

    patterns = []
    patterns += [
        (r'^%(url_name)s/(?P<access_type>submit_forms)/%(key_fields)s$',
        '%(module_package)s.%(module_name)s.submit_forms',
        'Submit forms'),
        (r'^%(url_name)s/(?P<access_type>download_blob)/%(key_fields)s$',
        '%(module_package)s.%(module_name)s.download_blob',
        'Download the blob'),
    ]

    rights = gci_access.GCIChecker(params)
    rights['edit'] = [('checkIsMyActiveRole', gci_student_logic)]
    rights['apply'] = [
        'checkIsUser',
        ('checkIsActivePeriod', ['student_signup', 'scope_path',
            gci_program_logic.logic]),
        ('checkIsNotParticipatingInProgramInScope',
            [gci_program_logic.logic, gci_student_logic,
            gci_org_admin_logic.logic, gci_mentor_logic.logic]),
        'checkCanApply']
    rights['manage'] = [('checkIsMyActiveRole', gci_student_logic)]
    rights['submit_forms'] = [
        ('checkIsActivePeriod', ['program', 'scope_path',
            gci_program_logic.logic]),
        ('checkIsMyActiveRole', gci_student_logic)]
    rights['download_blob'] = [
        ('checkCanDownloadConsentForms', [gci_student_logic,
        {'consent_form_upload_form': 'consent_form',
         'consent_form_two_upload_form': 'consent_form_two',
         'student_id_form_upload_form': 'student_id_form'
         }])]

    new_params = {}
    new_params['logic'] = gci_student_logic
    new_params['rights'] = rights

    new_params['group_logic'] = gci_program_logic.logic
    new_params['group_view'] = gci_program_view.view

    new_params['scope_view'] = gci_program_view

    new_params['name'] = "GCI Student"
    new_params['module_name'] = "student"
    new_params['sidebar_grouping'] = 'Students'

    new_params['module_package'] = 'soc.modules.gci.views.models'
    new_params['url_name'] = 'gci/student'

    new_params['extra_dynaexclude'] = [
        'agreed_to_tos', 'school', 'parental_form_mail',
        'consent_form', 'consent_form_two', 'student_id_form',
    ]

    new_params['extra_django_patterns'] = patterns

    params = dicts.merge(params, new_params, sub_merge=True)

    super(View, self).__init__(params=params)

    base_form = self._params['dynabase']
    gci_student_model = gci_student_logic.getModel()

    def getUploadForms(name, label, help_text):
      dynafields = [
          {'name': name,
           'base': forms.FileField,
           'label': label,
           'required': False,
           'help_text': help_text,
          }
      ]

      dynaproperties = params_helper.getDynaFields(dynafields)

      add_form = dynaform.newDynaForm(dynabase=base_form,
                                      dynaproperties=dynaproperties)

      dynaproperties = {
          'name': django_fields.CharField(
              label='Name', required=False,
              widget=widgets.HTMLTextWidget),
          'uploaded': django_fields.CharField(
              label='Uploaded on', required=False,
              widget=widgets.PlainTextWidget),
          'size': django_fields.CharField(
              label='Size', required=False,
              widget=widgets.PlainTextWidget),
      }
      edit_form = dynaform.extendDynaForm(
          add_form, dynaproperties=dynaproperties,
          dynainclude=['name', 'size', 'uploaded', name])

      return add_form, edit_form

    self._params['consent_form_upload_form'] = getUploadForms(
        'consent_form_upload', 'Consent Form',
        gci_student_model.consent_form.help_text)

    self._params['consent_form_two_upload_form'] = getUploadForms(
        'consent_form_two_upload', 'Consent Form (page two)',
        gci_student_model.consent_form_two.help_text)

    self._params['student_id_form_upload_form'] = getUploadForms(
        'student_id_form_upload', 'Student ID Form',
         gci_student_model.student_id_form.help_text)

  @decorators.merge_params
  @decorators.check_access
  def submitForms(self, request, access_type, page_name=None,
                  params=None, **kwargs):
    """Form upload page for a given student.

    See base.View.public() for more details.
    """

    template = 'modules/gci/student/submit_forms.html'
    context = responses.getUniversalContext(request)
    context['page_name'] = page_name

    logic = params['logic']

    entity = logic.getFromKeyFieldsOr404(kwargs)

    if request.method == 'POST':
      return self.submitFormsPost(request, params, context, entity)
    else:
      return self.submitFormsGet(request, params, template, context, entity)

  def submitFormsGet(self, request, params, template, context, entity):
    if lists.isJsonRequest(request):
      url = blobstore.create_upload_url(
          gci_redirects.getSubmitFormsRedirect(entity, params))
      return responses.jsonResponse(request, url)

    def setForm(param_name, blob_info):
      add_form, edit_form = params[param_name]

      if blob_info:
        form = edit_form(initial={
            'name': '%(name)s' % {
                'name': blob_info.filename,
                'url': redirects.getDownloadBlobRedirectWithGet(
                    blob_info, params, scope_path=entity.key().id_or_name(),
                    type=param_name)},
            'size': defaultfilters.filesizeformat(blob_info.size),
            'uploaded': blob_info.creation.strftime(self.DATETIME_FORMAT),
            })
      else:
        form = add_form()

      context[param_name] = form

    setForm('consent_form_upload_form', entity.consent_form)
    setForm('consent_form_two_upload_form', entity.consent_form_two)
    setForm('student_id_form_upload_form', entity.student_id_form)

    return responses.respond(request, template, context)

  def submitFormsPost(self, request, params, context, entity):
    form = request.POST.get('form')

    if not (request.file_uploads and form):
      # no file uploaded
      logging.error("No file_uploads valid form value")
      return http.HttpResponseRedirect(
          gci_redirects.getSubmitFormsRedirect(entity, params))

    # TODO(SRabbelier): handle multiple file uploads
    upload = request.file_uploads[0]

    if form == 'consent':
      entity.consent_form = upload
    elif form == 'consent_two':
      entity.consent_form_two = upload
    elif form=='student_id':
      entity.student_id_form = upload
    else:
      logging.warning("Invalid value for form '%s'" % form)

    entity.put()

    return http.HttpResponseRedirect(
        gci_redirects.getSubmitFormsRedirect(entity, params))

view = View()

apply = decorators.view(view.apply)
create = decorators.view(view.create)
delete = decorators.view(view.delete)
edit = decorators.view(view.edit)
list = decorators.view(view.list)
public = decorators.view(view.public)
export = decorators.view(view.export)
submit_forms = decorators.view(view.submitForms)
download_blob = decorators.view(view.downloadBlob)


text:
/* ---------------------------------------------------------------------------------- */
/*                                                                                */
/*                                      STRUCTS.C                                     */
/*                                                                                */
/* ---------------------------------------------------------------------------------- */

/* ---------------------------------------------------------------------------------- */
/*                                 STRUCTURE DEFINITIONS                              */
/* ---------------------------------------------------------------------------------- */

struct Component
{
  int orientation;
  double coord[3], dim[3], dim_initial[3], half_area, volume, mass;
  double temp, tempcrit, q, k;
  char comp_name[MAX_NAME_LENGTH], shape_type[5];
  struct Component *next_comp, *prev_comp;
};

struct Temperature_field
{
/* A matrix of such structures mark each node of the temperature field.  There will   */
/* be a total of COMP_NUM squared of these components.  A zero in the comp variable   */
/* means that the node does not refer to the center of a component but merely to a    */
/* a resistor junction.  A non-zero number refers to that component in the list of    */
/* components.                                                                        */
  struct Component *comp, *xcomp, *ycomp;
  double x_coord, y_coord, prev_temp, old_temp, temp;
};

struct Design
{
/* Box_min and box_max are the x, y, z bounds for the bounding box.  Overlap is a     */
/* matrix which contains the overlap between the ith and the jth components.  Note    */
/* that only the top half of the overlap matrix is used.  half_area is half of the    */
/* total of all the surface areas of the components.                                  */

  int old_orientation;
  double box_min[3], box_max[3], overlap[COMP_NUM][COMP_NUM], old_coord[3], old_dim[3];
  double half_area, c_grav[3], container[3], volume, mass;

/* First comp is a pointer to the first component in the component list.  Min_comp    */
/* and max_comp are pointers to the components which contribute to the x, y, z max    */
/* and min bounds (i.e. box_min and box_max). Backup is a pointer to a component that */
/* contains backup information in case we reject a step and need to revert to a       */
/* previous design.                                                                   */

  struct Component *first_comp, *min_comp[3], *max_comp[3];

/* THESE HAVE BEEN ADDED FOR BALANCING THE COMPONENTS OF THE OBJECTIVE FUNCTION       */
/* new_obj_values are the latest values of the components of the objective function.  */
/* They are copied to a column of old_obj_values matrix (only on improvement steps).  */
/* old_obj_values keeps track of past values of the components of the objective       */
/* function.  Currently, the 0th line in the matrix are values of the area ratio and  */
/* the 1st line in the matrix are values of the overlap, coef is an array of          */
/* coefficients which the components of the objective function get multiplied by to   */
/* balance it.  (The 0th coefficient is ignored.).  The weights are also multiplied   */
/* with the components of the objective function, to specify relative importance of   */
/* the different components.  Backup_obj_values is used to back up the array of       */
/* new_obj_values before taking a step.  When a step is rejected, the revert function */
/* copies the backed up values to new_obj_values to restore the previous state.       */

  double new_obj_values[OBJ_NUM], old_obj_values[OBJ_NUM][BALANCE_AVG];
  double backup_obj_values[OBJ_NUM], coef[OBJ_NUM], weight[OBJ_NUM];

/* These variables have been added for the thermal analysis.                          */
/* kb is the conductivity of the board.                                               */
/* h(x,y,z) is the heat transfer coefficient for the convective boundary conditions.  */
/* tamb is the ambient temperature of the boundary.                                   */
/* tolerance is the adjustable tolerance of which the temperatures are solved to.     */

  struct Temperature_field tfield[NODE_NUM*NODE_NUM];
  double kb, hx, hy, hz, tamb, tolerance;
};

struct Schedule
{
  int mgl, within_target, max_tolerance, in_count, out_count, equilibrium, problem_size;
  double t_initial, sigma, c_avg, delta, c_min, c_max, max_delta_c, delta_c;
};

struct Hustin
{
/* attemts is the number of attempts made for each move, which_move is the move taken */
/* so we know which move to attribute a cost change to, delta_c is the cumulative     */
/* change in cost (absolute value) due to each move, quality is the quality factor    */
/* for each move, probability is the probability if selecting each move, and move_    */
/* size is the distance for each of the translate moves, usable_prob is the "usable"  */
/* portion of the probability.  The "unusable" portion (i.e. MIN_PROB * MOVE_NUM) is  */
/* set aside to give each move a minimum probability.                                 */
  int attempts[MOVE_NUM], which_move;
  double delta_c[MOVE_NUM], quality[MOVE_NUM], prob[MOVE_NUM], move_size[TRANS_NUM];
  double usable_prob;
};


text:
using System;
using System.Collections.Generic;
using System.Text;

namespace net.silverfoxserver.core.protocol
{

    /// <summary>
    /// 与客户端的 Syshandler 函数字符串相对应
    /// </summary>
    public  class ServerAction
    {
        /**
	     证书检查
	    */
	    public static readonly String needProof = "needProof";

            /**
             * 我有证书
             */
	    public static readonly String hasProof = "hasProof";

	    public static readonly String proofOK = "proofOK";
	    public static readonly String proofKO = "proofKO";

            /**
             *
             *
             */
	    public static readonly String apiOK = "apiOK";
	    public static readonly String apiKO = "apiKO";

        public static readonly String hasRegOK = "hasRegOK";
	    public static readonly String hasRegKO = "hasRegKO";

	    public static readonly String regOK = "regOK";
	    public static readonly String regKO = "regKO";

	    public static readonly String logOK = "logOK";
	    public static readonly String logKO = "logKO";

	    public static readonly String logout = "logout";

	    public static readonly String listHallRoom = "listHallRoom";
	    public static readonly String listModule = "listModule";

	    public static readonly String pubMsg = "pubMsg";
	    public static readonly String pubAuMsg = "pubAuMsg";

	    public static readonly String alertMsg = "alertMsg";

	    public static readonly String joinOK = "joinOK";
	    public static readonly String joinKO = "joinKO";

	    public static readonly String betOK = "betOK";
	    public static readonly String betKO = "betKO";

	    public static readonly String joinReconnectionOK = "joinReconnectionOK";
	    public static readonly String joinReconnectionKO = "joinReconnectionKO";

	    //userEnterRoom
	    public static readonly String uER = "uER";

	    //UserLeaveRoom
	    public static readonly String userGone = "userGone";

	    //userWaitReconnectionRoom
	    public static readonly String userWaitReconnectionRoomStart = "userWaitReconnectionRoomStart";
	    public static readonly String userWaitReconnectionRoomEnd = "userWaitReconnectionRoomEnd";

	    //BuddyList
	    public static readonly String bList = "bList";

	    //IdleUserList
	    public static readonly String dList = "dList";

            /**
             * 排行榜
             */
            public static readonly String topList = "topList";

	    //loadG
	    public static readonly String gOK = "gOK";

	    //loadChart
	    public static readonly String chartOK = "chartOK";

	    //本人离开房间
	    public static readonly String leaveRoom = "leaveRoom";
	    public static readonly String leaveRoomAndGoHallAutoMatch = "leaveRoomAndGoHallAutoMatch";

	    //
	    public static readonly String readyOK = "readyOK";
	    public static readonly String readyKO = "readyKO";

	    //gST = game start
	    public static readonly String gST = "gST";

	    /**
	     游戏动作,走棋
	     主要为房间里的转发
	    */
	    public static readonly String rVarsUpdate = "rVarsUpdate";

            /**
             * 是否发送成功
             */
            public static readonly String rVarsUpdateOK = "rVarsUpdateOK";
	    public static readonly String rVarsUpdateKO = "rVarsUpdateKO";

	    /**
	     邮件信息
	     适用在不在同一个场景里,或对方短时间下线或刷新网页
	     再登录也可接收到
	    */
	    public static readonly String mVarsUpdate = "mVarsUpdate";

	    /**
	     日常活动 - 每日登陆
	    */
	    public static readonly String everyDayLoginVarsUpdate = "everyDayLoginVarsUpdate";

	    /**

	    */
	    public static readonly String moduleVarsUpdate = "moduleVarsUpdate";

	    public static readonly String moduleVarsUpdateKO = "moduleVarsUpdateKO";

	    /**
	     gOV = game over
	     room game over
	    */
	    public static readonly String gOV = "gOV";

	    /**
	     hall game over
	    */
	    public static readonly String gOV2 = "gOV2";

            //--------------------- Record Server begin ----------------------------

            public static readonly String loadDBTypeOK = "loadDBTypeOK";

            /**
             *
             *
             *
             */
            public static readonly String loadGOK = "loadGOK";

	    public static readonly String updGOK = "updGOK";

            /**
             * 报表
             */
	    public static readonly String loadChartOK = "loadChartOK";

            public static readonly String loadTopListOK = "loadTopListOK";

	    /**

	    */
	    public static readonly String betGOK = "betGOK";
	    public static readonly String betGKO = "betGKO";

	    //public static readonly String chkUpAndGoDBRegOK = "chkUpAndGoDBRegOK";
	    //public static readonly String chkUpAndGoDBRegKO = "chkUpAndGoDBRegKO";

	    public static readonly String chkSidOK = "chkSidOK";
	    public static readonly String chkSidKO = "chkSidKO";

	    public static readonly String chkEveryDayLoginAndGetOK = "chkEveryDayLoginAndGetOK";

        //--------------------- Record Server end ----------------------------
    }
}


text:
__author__  = 'Martin Galpin'
__contact__ = 'm@66laps.com'
__version__ = '1.0'
__license__ = 'Apache License, Version 2.0'

def lap_difference(session, lap):
  '''Gets the time difference between this lap and the previous lap.'''
  index = lap.index
  return None if not index else lap.length - session.laps[index - 1].length

def is_fastest_lap(session, lap):
  '''Returns True if the given lap is the fastest in the given session.'''
  return lap == fastest_lap(session)

def fastest_lap_time(session):
  '''Gets the fastest lap time in a given session.'''
  if not _has_at_least_one_lap(session): return None
  return min([lap.length for lap in session.laps if lap.length is not None])

def fastest_lap(session):
  '''Gets the fastest lap in a given session.'''
  if not _has_at_least_one_lap(session): return None
  f = lambda x, lap: lap.length == fastest_lap_time(session) and lap or x
  return reduce(f, session.laps)

def fastest_sector(session, sector):
  '''
  Returns the fastest time for a given sector in a given lap. `sector`
  should be a index, starting at 0 for the first sector. If `sector`
  is out of bounds or there is not at least one lap, this function
  will return None.

  For example:

  >>> session = openmotorsport.Session()
  >>> session.num_sectors = 2
  >>> session.add_markers([10, 20, 30, 35, 39, 45])
  >>> fastest_sector(session, 0)
  5
  >>> fastest_sector(session, 1)
  4
  >>> fastest_sector(session, 3)
  None
  '''
  if not _has_at_least_one_lap(session): return None
  if len(session.markers) <= sector: return None
  return min([lap.sectors[sector] for lap in session.laps])

def is_fastest_sector(session, sector, time):
  '''Returns True if a given time is the fastest for a given in a session.'''
  return time == fastest_sector(session, sector)

def fastest_or_next_fastest_lap(lap):
  '''
  Gets the fastest lap for a given lap. If this already is the fastest lap,
  get the next fastest lap instead. Finally, if there is no other lap, None
  will be returned.
  '''
  the_fastest_lap = fastest_lap(lap.session)
  if lap != the_fastest_lap: return the_fastest_lap
  laps = [x for x in lap.session.laps if x.length >= lap.length and x != lap]
  laps = sorted(laps, key=lambda lap: lap.length)
  return laps[0] if laps else None

def slowest_lap_time(session):
  '''Gets the slowest lap time in a given session.'''
  if not _has_at_least_one_lap(session): return None
  return max([lap.length for lap in session.laps if lap.length is not None])

def slowest_lap(session):
  '''Gets the slowest Lap in a given session. Currently include outliners.'''
  if not _has_at_least_one_lap(session): return None
  f = lambda x, lap: lap.length == slowest_lap_time(session) and lap or x
  return reduce(f, session.laps)

def slowest_or_next_slowest_lap(lap):
  '''
  Gets the slowest Lap for a given session. If this is already the slowest Lap,
  get the next slowest Lap instead. Finally, if there is no other Lap, None will
  be returned.
  '''
  the_slowest_lap = slowest_lap(lap.session)
  if lap != the_slowest_lap: return the_slowest_lap
  laps = [x for x in lap.session.laps if x.length <= lap.length and x != lap]
  laps = sorted(laps, key=lambda lap: lap.length, reverse=True)
  return laps[0] if laps else None

def next_lap(lap):
  '''Get the next Lap sequentially. Returns None if this is the last lap.'''
  return lap.session.laps[lap.index + 1] \
    if lap.index < (len(lap.session.laps) - 1) else None

def previous_lap(lap):
  ''' Gets the previous Lap. Returns None if this is the first lap.'''
  return lap.session.laps[lap.index - 1] if lap.index > 0 else None

def _has_at_least_one_lap(session):
  '''Private method.
  Gets whether a session has no laps or if it has a lap, that the lap is
  complete (and that they didn't crash on their outlap - it happens!)
  '''
  return not(not session.laps or session.laps[0].length is None)


text:
"use strict";
var mongoose = require('mongoose');
var dbConst = require('../constants/db.json');
var DBConfig = (function () {
    function DBConfig() {
    }
    DBConfig.init = function () {
        var URL = (process.env.NODE_ENV === 'production') ? process.env.MONGOHQ_URL
            : dbConst.localhost;
        mongoose.connect(URL);
        mongoose.connection.on('error', console.error.bind(console, 'An error ocurred with the DB connection: '));
    };
    return DBConfig;
}());
exports.DBConfig = DBConfig;
;
//# sourceMappingURL=db.conf.js.map


text:
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'rspec'
require 'thor'
require 'gator'
require File.dirname(__FILE__) + '/../lib/gator/as3/generators'

# Requires supporting files with custom matchers and macros, etc,
# in ./support/ and its subdirectories.
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f }

RSpec.configure do |config|

end


text:
/* jshint node: true */
'use strict';

const GoogleCloudDeployPlugin = require('./lib/google-cloud-deploy-plugin');

module.exports = {
  name: 'ember-cli-deploy-gcloud',

  createDeployPlugin: function(options) {
    return new GoogleCloudDeployPlugin({
      name: options.name
    });
  }
};


text:
import bNavbar from './navbar'
import bNavbarNav from './navbar-nav'
import bNavbarBrand from './navbar-brand'
import bNavbarToggle from './navbar-toggle'
import navPlugin from '../nav'
import collapsePlugin from '../collapse'
import dropdownPlugin from '../dropdown'
import { registerComponents, vueUse } from '../../utils/plugins'

const components = {
  bNavbar,
  bNavbarNav,
  bNavbarBrand,
  bNavbarToggle,
  bNavToggle: bNavbarToggle
}

const VuePlugin = {
  install (Vue) {
    registerComponents(Vue, components)
    Vue.use(navPlugin)
    Vue.use(collapsePlugin)
    Vue.use(dropdownPlugin)
  }
}

vueUse(VuePlugin)

export default VuePlugin


text:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.IO;
using System.Text;
using System.Windows;
using System.Windows.Data;
using System.Windows.Markup;
using System.Xml;

namespace Esthar.UI
{
    public abstract class TemplateFactoryBase : IValueConverter
    {
        private readonly TemplateFactoryType _type;

        protected TemplateFactoryBase(TemplateFactoryType type)
        {
            _type = type;
        }

        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (DesignerProperties.GetIsInDesignMode(Dummy.DependencyObject))
                return null;

            string propertyName = parameter as string;
            if (string.IsNullOrEmpty(propertyName))
                return null;

            string key = _type + "TemplateBy" + propertyName;
            DataTemplate result = (DataTemplate)Application.Current.TryFindResource(key);
            if (result != null)
                return result;

            StringBuilder templateXaml = new StringBuilder();
            templateXaml.Append("<DataTemplate ");
            templateXaml.Append("xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' ");
            templateXaml.Append("xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml' ");
            foreach (string str in GetNamespaces())
            {
                templateXaml.Append(str);
                templateXaml.Append(' ');
            }
            templateXaml.Append("x:Key='").Append(key).Append("'>");
            templateXaml.Append(GetTemplateContent(propertyName));
            templateXaml.Append("</DataTemplate>");

            using (StringReader stringReader = new StringReader(templateXaml.ToString()))
            using (XmlReader xmlReader = XmlReader.Create(stringReader))
                result = (DataTemplate)XamlReader.Load(xmlReader);

            PostProcess(result);
            Application.Current.Resources.Add(key, result);
            return result;
        }

        protected virtual void PostProcess(DataTemplate result)
        {
        }

        protected virtual IEnumerable<string> GetNamespaces()
        {
            return new string[0];
        }

        protected abstract string GetTemplateContent(string propertyName);

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotSupportedException();
        }
    }
}


text:
#include <alloc_mk_page_pool.h>
#include <debug.h>
#include <mutable_span_t.h>
#include <platform.h>
#include <types.h>

/**
 * <!-- description -->
 *   @brief Allocates a chunk of memory for the page pool used by the
 *     microkernel. Note that the "size" parameter is in total pages and
 *     not in bytes. Finally, if the provided size is 0, this function
 *     will allocate a default number of pages.
 *
 * <!-- inputs/outputs -->
 *   @param size the total number of pages (not bytes) to allocate
 *   @param pmut_page_pool the mutable_span_t to store the page pool addr/size.
 *   @return LOADER_SUCCESS on success, LOADER_FAILURE on failure.
 */
NODISCARD int64_t
alloc_mk_page_pool(uint32_t const size, struct mutable_span_t *const pmut_page_pool) NOEXCEPT
{
    if (0U == size) {
        pmut_page_pool->size = HYPERVISOR_MK_PAGE_POOL_SIZE;
    }
    else {
        pmut_page_pool->size = HYPERVISOR_PAGE_SIZE * (uint64_t)size;
    }

    pmut_page_pool->addr = platform_alloc(pmut_page_pool->size);
    if (NULLPTR == pmut_page_pool->addr) {
        bferror("platform_alloc failed");
        goto platform_alloc_failed;
    }

    return LOADER_SUCCESS;

platform_alloc_failed:

    platform_memset(pmut_page_pool, ((uint8_t)0), sizeof(struct mutable_span_t));
    return LOADER_FAILURE;
}


text:
abstract class C {
    abstract void <caret>method();
}

class C1 extends C {
    void method() {
    }
}


text:
import sys
from distutils.core import setup, Extension

sys.stdout.write('-------------------------------------------\n')
sys.stdout.write('easysvm - A front end to the shogun toolbox\n')
sys.stdout.write('-------------------------------------------\n\n')

try:
    import numpy
except:
    sys.stderr.write("WARNING: did not find 'numpy'\n")

try:
    import pylab
except:
    sys.stderr.write("WARNING: did not find 'pylab'\n")

try:
    import shogun
except:
    sys.stderr.write("WARNING: did not find 'shogun'\n")
    sys.stderr.write("         shogun is a required back end.\n")
    sys.stderr.write("         See shogun website: http://www.shogun-toolbox.org)\n")

try:
    import arff
except:
    sys.stderr.write("WARNING: did not find 'arff'\n")
    sys.stderr.write("         arff is required for reading and writing ARFF data files\n")
    sys.stderr.write("         See arff website: http://www.mit.edu/~sav/arff/\n\n")
    sys.stderr.write("         All other functionality should be ok.\n\n")

setup (name = 'easysvm',
       version = '0.3.3',
       description = 'easysvm - A front end to the shogun toolbox',
       author = ['Cheng Soon Ong', 'Gunnar Raetsch' ],
       author_email = ['chengsoon.ong@tuebingen.mpg.de','gunnar.raetsch@tuebingen.mpg.de'],
       license='GPLv3',
       url = 'http://www.fml.tuebingen.mpg.de/raetsch/projects/easysvm',
       py_modules=['esvm.datafuncs','esvm.mldata','esvm.mldata_arff','esvm.experiment','esvm.parse',\
                   'esvm.plots','esvm.poim','esvm.utils','splicesites.utils'],
       packages=['esvm','splicesites'],
       scripts=['scripts/easysvm.py','scripts/datagen.py'],
       long_description="""
       easysvm is a front end to the shogun toolbox. It aims to be a
       'quick start' tutorial for users interested in shogun. As such,
       it covers only the absolute basics of machine learning.
       More advanced users should directly use the interfaces provided
       by shogun.

       This setup.py installs two modules:
       - esvm (which contains some basic tools for machine learning with SVMs)
       - splicesites (which contains tools for splice site prediction)

       It also installs two scripts (easysvm.py and datagen.py) in the relevant binary directory.
       The two scripts provide a command line interface to the toolkit.
       """
       )


text:
package com.datastax.spark.connector.streaming

import com.datastax.spark.connector.cql.CassandraConnector
import com.datastax.spark.connector.rdd.reader._
import com.datastax.spark.connector.rdd.{CassandraTableScanRDD, ClusteringOrder, CqlWhereClause, ReadConf}
import com.datastax.spark.connector.{AllColumns, ColumnSelector}
import org.apache.spark.streaming.StreamingContext

import scala.reflect.ClassTag

/** RDD representing a Cassandra table for Spark Streaming.
  * @see [[com.datastax.spark.connector.rdd.CassandraTableScanRDD]]*/
class CassandraStreamingRDD[R] private[connector] (
    sctx: StreamingContext,
    connector: CassandraConnector,
    keyspace: String,
    table: String,
    columns: ColumnSelector = AllColumns,
    where: CqlWhereClause = CqlWhereClause.empty,
    empty: Boolean = false,
    limit: Option[Long] = None,
    clusteringOrder: Option[ClusteringOrder] = None,
    readConf: ReadConf = ReadConf())(
  implicit
    ct : ClassTag[R],
    @transient val rrf: RowReaderFactory[R])
  extends CassandraTableScanRDD[R](
    sc = sctx.sparkContext,
    connector = connector,
    keyspaceName = keyspace,
    tableName = table,
    columnNames = columns,
    where = where,
    limit = limit,
    clusteringOrder = clusteringOrder,
    readConf = readConf)


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Portulaca oleracea subsp. nitida Danin & H.G. Baker

### Remarks
null


text:
package org.jsonschema2pojo.rules;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.sun.codemodel.*;
import org.jsonschema2pojo.GenerationConfig;
import org.junit.Test;

import javax.validation.constraints.NotNull;
import java.util.Collection;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

public class RequiredArrayRuleTest {

    private static final String TARGET_CLASS_NAME = RequiredArrayRuleTest.class.getName() + ".DummyClass";

    private RequiredArrayRule rule = new RequiredArrayRule(new RuleFactory());

    @Test
    public void shouldUpdateJavaDoc() throws JClassAlreadyExistsException {
        JDefinedClass jclass = new JCodeModel()._class(TARGET_CLASS_NAME);

        jclass.field(JMod.PRIVATE, jclass.owner().ref(String.class), "fooBar");
        jclass.field(JMod.PRIVATE, jclass.owner().ref(String.class), "foo");

        ObjectMapper mapper = new ObjectMapper();
        ArrayNode requiredNode = mapper.createArrayNode().add("fooBar");

        rule.apply("Class", requiredNode, jclass, null);

        JDocComment fooBarJavaDoc = jclass.fields().get("fooBar").javadoc();
        JDocComment fooJavaDoc = jclass.fields().get("foo").javadoc();

        assertThat(fooBarJavaDoc.size(), is(1));
        assertThat((String) fooBarJavaDoc.get(0), is(RequiredRule.REQUIRED_COMMENT_TEXT));

        assertThat(fooJavaDoc.size(), is(0));
    }

    @Test
    public void shouldUpdateAnnotations() throws JClassAlreadyExistsException {
        setupRuleFactoryToIncludeJsr303();

        JDefinedClass jclass = new JCodeModel()._class(TARGET_CLASS_NAME);

        jclass.field(JMod.PRIVATE, jclass.owner().ref(String.class), "fooBar");
        jclass.field(JMod.PRIVATE, jclass.owner().ref(String.class), "foo");

        ObjectMapper mapper = new ObjectMapper();
        ArrayNode requiredNode = mapper.createArrayNode().add("fooBar");

        rule.apply("Class", requiredNode, jclass, null);

        Collection<JAnnotationUse> fooBarAnnotations = jclass.fields().get("fooBar").annotations();
        Collection<JAnnotationUse> fooAnnotations = jclass.fields().get("foo").annotations();

        assertThat(fooBarAnnotations.size(), is(1));
        assertThat(fooBarAnnotations.iterator().next().getAnnotationClass().name(), is(NotNull.class.getSimpleName()));

        assertThat(fooAnnotations.size(), is(0));
    }

    private void setupRuleFactoryToIncludeJsr303() {
        GenerationConfig config = mock(GenerationConfig.class);
        RuleFactory ruleFactory = new RuleFactory();
        ruleFactory.setGenerationConfig(config);
        rule = new RequiredArrayRule(ruleFactory);
        when(config.isIncludeJsr303Annotations()).thenReturn(true);
    }
}


text:
require('../index.js');
var webdriver = require('selenium-webdriver');

/**
 * Tests for the WebDriverJS Jasmine-Node Adapter. These tests use
 * WebDriverJS's control flow and promises without setting up the whole
 * webdriver.
 */

var getFakeDriver = function() {
  var flow = webdriver.promise.controlFlow();
  return {
    sleep: function(ms) {
      return flow.timeout(ms);
    },
    setUp: function() {
      return flow.execute(function() {
        return webdriver.promise.fulfilled('setup done');
      });
    },
    getValueA: function() {
      return flow.execute(function() {
        return webdriver.promise.delayed(500).then(function() {
          return webdriver.promise.fulfilled('a');
        });
      });
    },
    getOtherValueA: function() {
      return flow.execute(function() {
        return webdriver.promise.fulfilled('a');
      });
    },
    getValueB: function() {
      return flow.execute(function() {
        return webdriver.promise.fulfilled('b');
      });
    }
  };
};

var fakeDriver = getFakeDriver();

describe('webdriverJS Jasmine adapter', function() {
  // Shorten this and you should see tests timing out.
  jasmine.getEnv().defaultTimeoutInterval = 2000;

  beforeEach(function() {
    // 'this' should work properly to add matchers.
    this.addMatchers({
      toBeLotsMoreThan: function(expected) {
        return this.actual > expected + 100;
      }
    });
  });

  beforeEach(function() {
    fakeDriver.setUp().then(function(value) {
      console.log('This should print before each test: ' + value);
    });
  });

  it('should pass normal synchronous tests', function() {
    expect(true).toEqual(true);
  });

  it('should compare a promise to a primitive', function() {
    expect(fakeDriver.getValueA()).toEqual('a');
    expect(fakeDriver.getValueB()).toEqual('b');
  });

  it('should wait till the expect to run the flow', function() {
    var promiseA = fakeDriver.getValueA();
    expect(promiseA.isPending()).toBe(true);
    expect(promiseA).toEqual('a');
    expect(promiseA.isPending()).toBe(true);
  })

  it('should compare a promise to a promise', function() {
    expect(fakeDriver.getValueA()).toEqual(fakeDriver.getOtherValueA());
  });

  it('should still allow use of the underlying promise', function() {
    var promiseA = fakeDriver.getValueA();
    promiseA.then(function(value) {
      expect(value).toEqual('a');
    });
  });

  it('should allow scheduling of tasks', function() {
    fakeDriver.sleep(300);
    expect(fakeDriver.getValueB()).toEqual('b');
  })

  // Uncomment to see timeout failures.
  // it('should timeout after 200ms', function() {
  //   expect(fakeDriver.getValueA()).toEqual('a');
  // }, 200);

  // it('should timeout after 300ms', function() {
  //   fakeDriver.sleep(999);
  //   expect(fakeDriver.getValueB()).toEqual('b');
  // }, 300);
});


text:
//
//  HFFullMemoryByteArray.h
//  HexFiend_2
//
//  Copyright 2007 ridiculous_fish. All rights reserved.
//

#import <HexFiend/HFByteArray.h>

/*!
  @class HFFullMemoryByteArray
  @brief A naive subclass of HFByteArray suitable mainly for testing.  Use HFBTreeByteArray instead.

  HFFullMemoryByteArray is a simple subclass of HFByteArray that does not store any byte slices.  Because it stores all data in an NSMutableData, it is not efficient.  It is mainly useful as a naive implementation for testing.  Use HFBTreeByteArray instead.
*/
@interface HFFullMemoryByteArray : HFByteArray {
    NSMutableData *data;
}

@end


text:
layout: page
title: How to Git
tagline:
description:
---

# Introduction
This document explains minimum requirements needed for participating to FCCI. A lot of additional features are detailed in the following on the documentation \url{https://git-scm.com/book/fr/v2}. It is assumed here the reader has already a github account.

## FCCI2017 group settings

### Setup to Contribute to the FCCI
This assume that you already have a GitHub account, if you don't please visit
and follow the instruction.

1. **Fork the repository**

    Click on the bouton [ADD IMG] form the https://github.com/fcci2017/FCCI.git, and select
    your account.

    This will create a copy to the fcci repository owned by the fcci organisation,
    allowing you to modify a copy of the fcci repository whitout applying any
    change ont he main repository before your change are ready to be added.

    Whne you believe your improvement idea/suggestion/work are ready to be
    added, you an submit a pull request. A pull request is a change propostion
    that will be reviewed by (all) the other members of the organisation. During
    the review proccess everyone will comment/critic you change proposal allowing
    it to reach a consensual form. Once each comment/critics have been adressed
    through modification or discussion the Pull Request will be merged.

    While a Pull Request can be summited by anyone who is willing to contribute, a
    Pull Request can only be merged by an FCCI member. It is not allowed to merge
    your own PR even if you have the authority.

2. **Clone your fork locally**

    On you have forked the fcci repository on your own github account you will be
    able to clone your own fork (copy) of the repository on (each of) your computer.

    ```
    git clone https://github.com/git_username/FCCI.git
    ```

3. **Remote set up**

    Once you have clone your repository into your computer, you can add a remote
    (link to the main repository -- the link to you own fork of the repository is
    automatically done when cloning it. -- you can access the list/name of remote
    you have set up by using the `git remote -v` command)

    ```
    cd FCCI
    git remote add upstream https://github.com/fcci2017/FCCI.git
    ```

This will allow you to pull the last version of the repository from the main
repository. Usually the link to the remote are used in only one direction:

  - from the main repository to you computer, -- `git rebase upstrean/master`
  - from your computer to you own fork (copy of the repository) -- `git push origin branch`
  - from you own fork -- Pull Request (done on github website)

*more detail instruction are provided in the section below*
*all the folowing instruction supposed that you are located in the repository
folder*

### Branch Gymnastics
Git allow you to have different branches. Each branch can contain different
version of you sources. For example, if you are developing a software, you can
imagine have a `develop` which contain the fastest version of the software
including all the fastest feature, a `master` branch containing the last stable
version, a different branches for each features you are developing.
you can switch between different branch using:
```
git checkout my_branch
```
you can create a new branch using:
```
git checkout -b my_new_branch
```
In this case a new branch will be create from the branch you are in.

Grab a single file from an other branch:
```
git checkout source_branch my_file
```

### Update your computer repository
Before working on some improvement/addition to the project make sure you have
the last version of it locally:

``` sh
git fetch --all # This will download all the information \
                # about news commit from all the different remote \
                # you have setted up
git rebase upstream master # add the last commit to your actual branch
```

### Work with your local git clone
Each time you have made a set of modification you can commit those changes. Each
commit corresponds to a all modifications since the last commit, allowing you to
jump back to a certain status of your work. To do a commit, you need first to
add some modified file to the next commit and then commit. To each commit, a
message is associated to allow to inform about the change you have made:
```
 git add my_file1 my_file2...
```

```
git commit -m "my messgae"
```
It is possible if many file have been modified, to commit them together,
separated or grouped as required.

### Working with you fork
As you have done many different modification of your file, which corresponds to
some number, you need to synchronise your cloud clone (fork) of this work:
```
git push remote branch
```
where *remote* correspond to the name you have give to your cloud clone (remote)
-- usually *origin*.

### Submitting you modification to the Organisation repository
To submit a set a change, that you considerer as finalise you have to issue a
Pull Request (PR). TO do it, you need to go on GitHub using your favorite
browser, go into you cloud clone of the repository, switch to the branch and
then click on pull request.
The pull request will be on the Organisation repository from you cloud copy of
the repository. You may want to add some comment to explain you change. Then
your collaborator will review your modification, discuss them, and when every
body get to agree on them they will be merged into the `master` branch of the
organisation repository.

As long as a Pull Request from one of your cloud clone branch is not merge, all
new commits push from you local copy to your cloud copy will be automatically
added to the PR, allowing you to improve you set of modification accordingly to
the ongoing review (that you can follow on you Pull request thread).


text:
package org.basex.core.cmd;

import static org.basex.core.Text.*;

import java.io.*;

import org.basex.core.*;
import org.basex.io.*;
import org.basex.util.*;
import org.basex.util.list.*;

/**
 * Evaluates the 'restore' command and restores a backup of a database.
 *
 * @author BaseX Team 2005-20, BSD License
 * @author Christian Gruen
 */
public final class Restore extends ABackup {
  /** States if current database was closed. */
  private boolean closed;

  /**
   * Default constructor.
   * @param arg optional argument
   */
  public Restore(final String arg) {
    super(arg);
  }

  @Override
  protected boolean run() {
    final String name = args[0];
    if(!Databases.validName(name)) return error(NAME_INVALID_X, name);

    // find backup with or without date suffix
    final StringList backups = context.databases.backups(name);
    if(backups.isEmpty()) return error(BACKUP_NOT_FOUND_X, name);

    final String backup = backups.get(0);
    final String db = Databases.name(backup);

    // close database if it's currently opened and not opened by others
    if(!closed) closed = close(context, db);
    // check if database is still pinned
    if(context.pinned(db)) return error(DB_PINNED_X, db);

    // try to restore database
    try {
      restore(db, backup, soptions, this);
      return !closed || new Open(db).run(context) ? info(DB_RESTORED_X, backup, jc().performance) :
        error(DB_NOT_RESTORED_X, db);
    } catch(final IOException ex) {
      Util.debug(ex);
      return error(DB_NOT_RESTORED_X, db);
    }
  }

  @Override
  public void addLocks() {
    super.addLocks();
    // Not sure whether database or name of backup file is provided: lock both
    final String backup = args[0];
    jc().locks.writes.add(backup).add(Databases.name(backup));
  }

  /**
   * Restores the specified database.
   * @param db name of database
   * @param backup name of backup
   * @param sopts static options
   * @param cmd calling command instance
   * @throws IOException I/O exception
   */
  public static void restore(final String db, final String backup, final StaticOptions sopts,
      final Restore cmd) throws IOException {

    // drop target database
    DropDB.drop(db, sopts);

    final IOFile dbPath = sopts.dbPath();
    final Zip zip = new Zip(new IOFile(dbPath, backup + IO.ZIPSUFFIX));
    try {
      if(cmd != null) cmd.pushJob(zip);
      zip.unzip(dbPath);
    } finally {
      if(cmd != null) cmd.popJob();
    }
  }

  @Override
  public String shortInfo() {
    return RESTORE;
  }

  @Override
  public boolean newData(final Context ctx) {
    closed = close(ctx, args[0]);
    return closed;
  }

  @Override
  public boolean supportsProg() {
    return true;
  }
}


text:
#ifndef	__MPEG2_TS_TYPES_H
#define __MPEG2_TS_TYPES_H

#include <stdio.h>
#include <stdint.h>

// Section version number take 5 bits [0, 0x1F],
// We can regard 0xFF as invalid version number.
#define INVALID_VN      ((uint8_t)0xFF)
// Program number value 0 in PAT is used to specify NIT PID,
// We can regard 0 as invalid program number.
#define INVALID_PN      ((prog_num_t)0)
// Packet Identifier take 13 bits [0x0000, 0x1FFF],
// 0x1FFF is used to specify the empty packets,
// We can regard 0x1FFF as invalid PID.
#define INVALID_PID     ((ts_pid_t)0x1FFF)

// Types definition
typedef uint16_t        ts_pid_t;      // packet identifier
typedef uint8_t         table_id_t;    // table id
typedef uint16_t        prog_num_t;    // program number

#endif /* __MPEG2_TS_TYPES_H */


text:
<?php
/*
 * Common configuration that can be used throughout the application
 * Please refer to DooConfig class in the API doc for a complete list of configurations
 * Access via Singleton, eg. Doo::conf()->BASE_PATH;
 */
error_reporting(E_ALL | E_STRICT);
date_default_timezone_set('Asia/Kuala_Lumpur');

/**
 * for benchmark purpose, call Doo::benchmark() for time used.
 */
//$config['START_TIME'] = microtime(true);

//For framework use. Must be defined. Use full absolute paths and end them with '/'      eg. /var/www/project/
$config['SITE_PATH'] = realpath('..').'/app/';
//$config['PROTECTED_FOLDER'] = 'protected/';
$config['BASE_PATH'] = realpath('..').'/dooframework/';

//for production mode use 'prod'
$config['APP_MODE'] = 'dev';

//----------------- optional, if not defined, default settings are optimized for production mode ----------------
//if your root directory is /var/www/ and you place this in a subfolder eg. 'app', define SUBFOLDER = '/app/'

$config['SUBFOLDER'] = str_replace($_SERVER['DOCUMENT_ROOT'], '', str_replace('\\','/',$config['SITE_PATH']));
if(strpos($config['SUBFOLDER'], '/')!==0){
	$config['SUBFOLDER'] = '/'.$config['SUBFOLDER'];
}

$config['APP_URL'] = 'http://'.$_SERVER['HTTP_HOST'].$config['SUBFOLDER'];
//$config['AUTOROUTE'] = TRUE;
$config['DEBUG_ENABLED'] = TRUE;

//$config['TEMPLATE_COMPILE_ALWAYS'] = TRUE;

//register functions to be used with your template files
//$config['TEMPLATE_GLOBAL_TAGS'] = array('url', 'url2', 'time', 'isset', 'empty');

/**
 * Path to store logs/profiles when using with the logger tool. This is needed for writing log files and using the log viewer tool
 */
//$config['LOG_PATH'] = '/var/logs/';

/**
 * defined either Document or Route to be loaded/executed when requested page is not found
 * A 404 route must be one of the routes defined in routes.conf.php (if autoroute on, make sure the controller and method exist)
 * Error document must be more than 512 bytes as IE sees it as a normal 404 sent if < 512b
 */
//$config['ERROR_404_DOCUMENT'] = 'error.php';
$config['ERROR_404_ROUTE'] = '/error';

/**
 * Settings for memcache server connections, you don't have to set if using localhost only.
 * host, port, persistent, weight
 * $config['MEMCACHE'] = array(
 *                       array('192.168.1.31', '11211', true, 40),
 *                       array('192.168.1.23', '11211', true, 80)
 *                     );
 */

/**
 * Defines modules that are allowed to be accessed from an auto route URI.
 * Example, we have a module in SITE_PATH/PROTECTED_FOLDER/module/example
 * It can be accessed via http://localhost/example/controller/method/parameters
 *
 * $config['MODULES'] = array('example');
 *
 */

/**
 * Unique string ID of the application to be used with PHP 5.3 namespace and auto loading of namespaced classes
 * If you wish to use namespace with the framework, your classes must have a namespace starting with this ID.
 * Example below is located at /var/www/app/protected/controller/test and can be access via autoroute http://localhost/test/my/method
 * <?php
 * namespace myapp\controller\test;
 * class MyController extends \DooController {
 *     .....
 * } ?>
 *
 * You would need to enable autoload to use Namespace classes in index.php
 * spl_autoload_register('Doo::autoload');
 *
 * $config['APP_NAMESPACE_ID'] = 'myapp';
 *
 */

/**
 * To enable autoloading, add directories which consist of the classes needed in your application.
 *
 * $config['AUTOLOAD'] = array(
                            //internal directories, live in the app
                            'class', 'model', 'module/example/controller',
                            //external directories, live outside the app
                            '/var/php/library/classes'
                        );
*/

/**
 * you can include self defined config, retrieved via Doo::conf()->variable
 * Use lower case for you own settings for future Compability with DooPHP
 */
//$config['pagesize'] = 10;


text:
<?php
// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4:
/**
 * Center rule end renderer for Xhtml
 *
 * PHP versions 4 and 5
 *
 * @category   Text
 * @package    Text_Wiki
 * @author     Paul M. Jones <pmjones@php.net>
 * @license    http://www.gnu.org/copyleft/lesser.html  LGPL License 2.1
 * @version    CVS: $Id: Center.php,v 1.8 2007/02/19 08:51:19 mic Exp $
 * @link       http://pear.php.net/package/Text_Wiki
 */

/**
 * This class renders centered content in XHTML.
 *
 * @category   Text
 * @package    Text_Wiki
 * @author     Paul M. Jones <pmjones@php.net>
 * @license    http://www.gnu.org/copyleft/lesser.html  LGPL License 2.1
 * @version    Release: @package_version@
 * @link       http://pear.php.net/package/Text_Wiki
 */
class Text_Wiki_Render_Xhtml_Center extends Text_Wiki_Render {

    var $conf = array(
        'css' => null
    );

    /**
    *
    * Renders a token into text matching the requested format.
    *
    * @access public
    *
    * @param array $options The "options" portion of the token (second
    * element).
    *
    * @return string The text rendered from the token options.
    *
    */

    function token($options)
    {
        if ($options['type'] == 'start') {
            $css = $this->getConf('css');
            if ($css) {
                return "
";
            }
            else {
                return '
';
            }
        }

        if ($options['type'] == 'end') {
            return '
';
        }
    }
}
?>


text:
Test eval()'d deprecation is not considered as self
--FILE--
<?php

$k = 'SYMFONY_DEPRECATIONS_HELPER';
putenv($k.'='.$_SERVER[$k] = $_ENV[$k] = 'max[self]=0');
putenv('ANSICON');
putenv('ConEmuANSI');
putenv('TERM');

$vendor = __DIR__;
while (!file_exists($vendor.'/vendor')) {
    $vendor = dirname($vendor);
}
define('PHPUNIT_COMPOSER_INSTALL', $vendor.'/vendor/autoload.php');
require PHPUNIT_COMPOSER_INSTALL;
require_once __DIR__.'/../../bootstrap.php';
eval("@trigger_error('who knows where I come from?', E_USER_DEPRECATED);");

?>
--EXPECTF--
Other deprecation notices (1)

  1x: who knows where I come from?


text:
/* eslint-disable max-nested-callbacks */
import configureMockStore from 'redux-mock-store';
import thunk from 'redux-thunk';

const middlewares = [thunk];
const mockStore = configureMockStore(middlewares);

import {initialState} from './reducer';
import * as actions from './actions';

let mockSpark, store;

describe(`redux-module-mercury actions `, () => {
  beforeEach(() => {
    store = mockStore(initialState);

    mockSpark = {
      canAuthorize: true,
      listenToAndRun: jest.fn((mercury, eventName, callback) => ({mercury, eventName, callback})),
      internal: {
        mercury: {
          connect: jest.fn(() => Promise.resolve()),
          connected: false,
          connecting: false
        },
        device: {
          registered: true
        }
      }
    };

  });

  it(`has exported actions`, () => {
    expect(actions.connectToMercury).toBeDefined();
  });

  describe(`#connectToMercury`, () => {
    it(`can successfully connect to Mercury`, () => {
      store.dispatch(actions.connectToMercury(mockSpark))
        .then(() => {
          expect(mockSpark.listenToAndRun.mock.calls[0][1]).toBe(`change:connected`);
          expect(store.getActions()).toMatchSnapshot();
        });
    });

    it(`fails to connect if device is not registered`, () => {
      mockSpark.internal.device.registered = false;
      store.dispatch(actions.connectToMercury(mockSpark))
        .then(() => {
          expect(store.getActions()).toMatchSnapshot();
        });
    });

    it(`does not connect if already connected`, () => {
      mockSpark.internal.mercury.connected = true;
      store.dispatch(actions.connectToMercury(mockSpark));
      expect(store.getActions()).toMatchSnapshot();
    });

  });

});


text:
d3.csv("data/SatandSurveydata.csv", function (survey_data) {

    var volumeChartSurveyA = dc.barChart("#dc-volume-chart-survey-a");
    var volumeChartSurveyB = dc.barChart("#dc-volume-chart-survey-b");
    var volumeChartSurveyC = dc.barChart("#dc-volume-chart-survey-c");
    var volumeChartSurveyD = dc.barChart("#dc-volume-chart-survey-d");
    var volumeChartSurveyE = dc.barChart("#dc-volume-chart-survey-e");
    var volumeChartSurveyF = dc.barChart("#dc-volume-chart-survey-f");

    var volumeChartSAT = dc.barChart("#dc-volume-chart-sat");

    var surveyData = crossfilter(survey_data),
        scoreA = surveyData.dimension(function(d) { return Math.round(d.s_q11e * 10) / 10}),
        scoresA = scoreA.group(function(d) { return Math.round(d * 5) / 5; }),
        scoreB = surveyData.dimension(function(d) { return Math.round(d.s_q2a * 10) / 10}),
        scoresB = scoreB.group(function(d) { return Math.round(d * 5) / 5; }),
        scoreC = surveyData.dimension(function(d) { return Math.round(d.s_q11a * 10) / 10}),
        scoresC = scoreC.group(function(d) { return Math.round(d * 5) / 5; }),
        scoreD = surveyData.dimension(function(d) { return Math.round(d.s_q1g * 10) / 10}),
        scoresD = scoreD.group(function(d) { return Math.round(d * 5) / 5; }),
        scoreE = surveyData.dimension(function(d) { return Math.round(d.s_q5a * 10) / 10}),
        scoresE = scoreE.group(function(d) { return Math.round(d * 5) / 5; }),
        scoreF = surveyData.dimension(function(d) { return Math.round(d.s_q4f * 10) / 10}),
        scoresF = scoreF.group(function(d) { return Math.round(d * 5) / 5; }),

        sat = surveyData.dimension(function(d) { return d.math; }),
        sats = sat.group(function(d) { return Math.round(d / 10) * 10; });

        volumeChartSurveyA.width(320)
            .height(150)
            .dimension(scoreA)
            .group(scoresA)
            .transitionDuration(1500)
            .centerBar(true)
            .gap(3)
            .x(d3.scale.linear().domain([4.5, 10.5]))
            .elasticY(true)
            .xAxis().tickFormat(function(v) {return v;});

        volumeChartSurveyA.xUnits(function(){return 25;});

        volumeChartSurveyB.width(320)
            .height(150)
            .dimension(scoreB)
            .group(scoresB)
            .transitionDuration(1500)
            .centerBar(true)
            .gap(3)
            .x(d3.scale.linear().domain([5.1, 10.5]))
            .elasticY(true)
            .xAxis().tickFormat(function(v) {return v;});

        volumeChartSurveyB.xUnits(function(){return 24;});

        volumeChartSurveyC.width(320)
            .height(150)
            .dimension(scoreC)
            .group(scoresC)
            .transitionDuration(1500)
            .centerBar(true)
            .gap(3)
            .x(d3.scale.linear().domain([4.5, 10.5]))
            .elasticY(true)
            .xAxis().tickFormat(function(v) {return v;});

        volumeChartSurveyC.xUnits(function(){return 25;});

        volumeChartSurveyD.width(320)
            .height(150)
            .dimension(scoreD)
            .group(scoresD)
            .transitionDuration(1500)
            .centerBar(true)
            .gap(3)
            .x(d3.scale.linear().domain([6.7, 10.5]))
            .elasticY(true)
            .xAxis().tickFormat(function(v) {return v;});

        volumeChartSurveyD.xUnits(function(){return 18;});

        volumeChartSurveyE.width(320)
            .height(150)
            .dimension(scoreE)
            .group(scoresE)
            .transitionDuration(1500)
            .centerBar(true)
            .gap(3)
            .x(d3.scale.linear().domain([5.7, 10.5]))
            .elasticY(true)
            .xAxis().tickFormat(function(v) {return v;});

        volumeChartSurveyE.xUnits(function(){return 21;});

        volumeChartSurveyF.width(320)
            .height(150)
            .dimension(scoreF)
            .group(scoresF)
            .transitionDuration(1500)
            .centerBar(true)
            .gap(3)
            .x(d3.scale.linear().domain([5.1, 10.5]))
            .elasticY(true)
            .xAxis().tickFormat(function(v) {return v;});

        volumeChartSurveyF.xUnits(function(){return 25;});

        volumeChartSAT.width(650)
                .height(180)
                .dimension(sat)
                .group(sats)
                .transitionDuration(1500)
                .centerBar(true)
                .gap(3)
                .x(d3.scale.linear().domain([300, 760]))
                .elasticY(true)
                .xAxis().tickFormat(function(v) {return v;});

        volumeChartSAT.xUnits(function(){return 40;});

    dc.renderAll();
});


text:
package com.amazonaws.services.s3control.model;

import javax.annotation.Generated;

/**
 * <p/>
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class InvalidNextTokenException extends com.amazonaws.services.s3control.model.AWSS3ControlException {
    private static final long serialVersionUID = 1L;

    /**
     * Constructs a new InvalidNextTokenException with the specified error message.
     *
     * @param message
     *        Describes the error encountered.
     */
    public InvalidNextTokenException(String message) {
        super(message);
    }

}