text:
<?php
// *********************************************************************************************************************************
//
// fmResult.class.php
//
// *********************************************************************************************************************************
//
// Copyright (c) 2017 Mark DeNyse
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// *********************************************************************************************************************************

class fmResult
{
   public $data;
   public $layout;
   public $fm;

   function __construct($fm, $layout, $data = array())
   {
      $this->fm = $fm;
      $this->layout = $layout;
      $this->data = $data;
}

   function getLayout()
   {
      $result = null;

      $record = $this->getFirstRecord();
      if (! is_null($record)) {
         $result = new fmLayout($this->fm, $this->layout, $record->data);
      }
      else {
         $result = new fmLayout($this->fm, $this->layout);                    // No records in result, no data to pass except layout name
      }

      return $result;
   }

   function getRecords()
   {
      $records = array();
      foreach($this->data as $data) {
         $records[] = new fmRecord($this->fm, $this->layout, $data);
      }

      return $records;
   }

   function getFields()
   {
      $fields = array();

      if ((count($this->data) > 0)) {
         $allfields = array_keys($this->data[0][FM_FIELD_DATA]);

         $fields = array();
         foreach ($allfields as $field) {
            if (substr($field, -1, 1) == ')') {                            // If it's a repeating field, remove (nnn)
               $pieces = explode('(', $field);
               $field = $pieces[0];
            }
            $fields[$field] = $field;                                      // Using the field as a key will overwrite for repeating fields
         }
         $fields = array_keys($fields);                                    // Now we'll have a unique list of field names
      }
      return $fields;
   }

   function getRelatedSets()
   {
      $relatedSets = array();

      $recordData = $this->data[0];
      if (! is_null($recordData) && array_key_exists(FM_PORTAL_DATA, $recordData)) {
         $relatedSets = array_keys($recordData[FM_PORTAL_DATA]);
      }

      return $relatedSets;
   }

   function getTableRecordCount()
   {
      fmLogger(__METHOD__ .'(): is not supported by the Data API. Returning getFetchCount('. $this->getFetchCount() .')');
      return $this->getFetchCount();
   }

   function getFoundSetCount()
   {
      fmLogger(__METHOD__ .'(): is not supported by the Data API. Returning getFetchCount('. $this->getFetchCount() .')');
      return $this->getFetchCount();
   }

   function getFetchCount()
   {
      return count($this->data);
   }

   function getFirstRecord()
   {
      if (count($this->data) > 0) {
         return new fmRecord($this->fm, $this->layout, $this->data[0]);
      }
      else {
         return null;                                                         // This is what the old API returns
      }
   }

   function getLastRecord()
   {
      if (count($this->data) > 0) {
         return new fmRecord($this->fm, $this->layout, $this->data[count($this->data) - 1]);
      }
      else {
         return null;                                                         // This is what the old API returns
      }
   }

}

?>


text:
namespace filesystem
{
	bool exists(const std::string& path);
	bool is_directory(const std::string& path);
	bool is_file(const std::string& path);

	inline bool directory_exists(const std::string& path)
	{
		return exists(path) && is_directory(path);
	}
	inline bool file_exists(const std::string& path)
	{
		return exists(path) && is_file(path);
	}

	std::string get_directory(const std::string& path);
	bool create_directory(const std::string& path);
	bool remove_all(const std::string& path);
	bool remove(const std::string& path);
	std::string get_base_name(const std::string& path);
	void strip_extension(std::string& path);
	std::string get_extension(const std::string& path, bool include_dot = false);
	std::string get_working_directory();
	std::string combine_path(const std::string& path_a, const std::string& path_b);
}

redpajama_set_name: RedPajamaGithub


text:
using System.Reflection;

[assembly: AssemblyTitle("Correspondence")]
[assembly: AssemblyDescription("")]


text:
package com.mongodb.client.model;

import com.mongodb.lang.Nullable;
import org.bson.BsonString;
import org.bson.BsonValue;
import org.bson.conversions.Bson;

import java.util.List;
import java.util.concurrent.TimeUnit;

import static com.mongodb.assertions.Assertions.notNull;
import static java.util.concurrent.TimeUnit.MILLISECONDS;

/**
 * The options to apply to an operation that atomically finds a document and updates it.
 *
 * @since 3.0
 * @mongodb.driver.manual reference/command/findAndModify/
 */
public class FindOneAndUpdateOptions {
    private Bson projection;
    private Bson sort;
    private boolean upsert;
    private ReturnDocument returnDocument = ReturnDocument.BEFORE;
    private long maxTimeMS;
    private Boolean bypassDocumentValidation;
    private Collation collation;
    private List<? extends Bson> arrayFilters;
    private Bson hint;
    private String hintString;
    private BsonValue comment;
    private Bson variables;

    /**
     * Gets a document describing the fields to return for all matching documents.
     *
     * @return the project document, which may be null
     * @mongodb.driver.manual tutorial/project-fields-from-query-results Projection
     */
    @Nullable
    public Bson getProjection() {
        return projection;
    }

    /**
     * Sets a document describing the fields to return for all matching documents.
     *
     * @param projection the project document, which may be null.
     * @return this
     * @mongodb.driver.manual tutorial/project-fields-from-query-results Projection
     */
    public FindOneAndUpdateOptions projection(@Nullable final Bson projection) {
        this.projection = projection;
        return this;
    }

    /**
     * Gets the sort criteria to apply to the query. The default is null, which means that the documents will be returned in an undefined
     * order.
     *
     * @return a document describing the sort criteria
     * @mongodb.driver.manual reference/method/cursor.sort/ Sort
     */
    @Nullable
    public Bson getSort() {
        return sort;
    }

    /**
     * Sets the sort criteria to apply to the query.
     *
     * @param sort the sort criteria, which may be null.
     * @return this
     * @mongodb.driver.manual reference/method/cursor.sort/ Sort
     */
    public FindOneAndUpdateOptions sort(@Nullable final Bson sort) {
        this.sort = sort;
        return this;
    }

    /**
     * Returns true if a new document should be inserted if there are no matches to the query filter.  The default is false.
     *
     * @return true if a new document should be inserted if there are no matches to the query filter
     */
    public boolean isUpsert() {
        return upsert;
    }

    /**
     * Set to true if a new document should be inserted if there are no matches to the query filter.
     *
     * @param upsert true if a new document should be inserted if there are no matches to the query filter
     * @return this
     */
    public FindOneAndUpdateOptions upsert(final boolean upsert) {
        this.upsert = upsert;
        return this;
    }

    /**
     * Gets the {@link ReturnDocument} value indicating whether to return the document before it was updated / inserted or after
     *
     * @return {@link ReturnDocument#BEFORE} if returning the document before it was updated or inserted otherwise
     * returns {@link ReturnDocument#AFTER}
     */
    public ReturnDocument getReturnDocument() {
        return returnDocument;
    }

    /**
     * Set whether to return the document before it was updated / inserted or after
     *
     * @param returnDocument set whether to return the document before it was updated / inserted or after
     * @return this
     */
    public FindOneAndUpdateOptions returnDocument(final ReturnDocument returnDocument) {
        this.returnDocument = notNull("returnDocument", returnDocument);
        return this;
    }

    /**
     * Sets the maximum execution time on the server for this operation.
     *
     * @param maxTime  the max time
     * @param timeUnit the time unit, which may not be null
     * @return this
     */
    public FindOneAndUpdateOptions maxTime(final long maxTime, final TimeUnit timeUnit) {
        notNull("timeUnit", timeUnit);
        this.maxTimeMS = MILLISECONDS.convert(maxTime, timeUnit);
        return this;
    }

    /**
     * Gets the maximum execution time for the find one and update operation.
     *
     * @param timeUnit the time unit for the result
     * @return the max time
     */
    public long getMaxTime(final TimeUnit timeUnit) {
        return timeUnit.convert(maxTimeMS, MILLISECONDS);
    }

    /**
     * Gets the bypass document level validation flag
     *
     * @return the bypass document level validation flag
     * @since 3.2
     * @mongodb.server.release 3.2
     */
    @Nullable
    public Boolean getBypassDocumentValidation() {
        return bypassDocumentValidation;
    }

    /**
     * Sets the bypass document level validation flag.
     *
     * @param bypassDocumentValidation If true, allows the write to opt-out of document level validation.
     * @return this
     * @since 3.2
     * @mongodb.server.release 3.2
     */
    public FindOneAndUpdateOptions bypassDocumentValidation(@Nullable final Boolean bypassDocumentValidation) {
        this.bypassDocumentValidation = bypassDocumentValidation;
        return this;
    }

    /**
     * Returns the collation options
     *
     * @return the collation options
     * @since 3.4
     * @mongodb.server.release 3.4
     */
    @Nullable
    public Collation getCollation() {
        return collation;
    }

    /**
     * Sets the collation options
     *
     *
A null value represents the server default.

     * @param collation the collation options to use
     * @return this
     * @since 3.4
     * @mongodb.server.release 3.4
     */
    public FindOneAndUpdateOptions collation(@Nullable final Collation collation) {
        this.collation = collation;
        return this;
    }
    /**
     * Sets the array filters option
     *
     * @param arrayFilters the array filters, which may be null
     * @return this
     * @since 3.6
     * @mongodb.server.release 3.6
     */
    public FindOneAndUpdateOptions arrayFilters(@Nullable final List<? extends Bson> arrayFilters) {
        this.arrayFilters = arrayFilters;
        return this;
    }

    /**
     * Returns the array filters option
     *
     * @return the array filters, which may be null
     * @since 3.6
     * @mongodb.server.release 3.6
     */
    @Nullable
    public List<? extends Bson> getArrayFilters() {
        return arrayFilters;
    }

    /**
     * Returns the hint for which index to use. The default is not to set a hint.
     *
     * @return the hint
     * @since 4.1
     */
    @Nullable
    public Bson getHint() {
        return hint;
    }

    /**
     * Sets the hint for which index to use. A null value means no hint is set.
     *
     * @param hint the hint
     * @return this
     * @since 4.1
     */
    public FindOneAndUpdateOptions hint(@Nullable final Bson hint) {
        this.hint = hint;
        return this;
    }

    /**
     * Gets the hint string to apply.
     *
     * @return the hint string, which should be the name of an existing index
     * @since 4.1
     */
    @Nullable
    public String getHintString() {
        return hintString;
    }

    /**
     * Sets the hint to apply.
     *
     * @param hint the name of the index which should be used for the operation
     * @return this
     * @since 4.1
     */
    public FindOneAndUpdateOptions hintString(@Nullable final String hint) {
        this.hintString = hint;
        return this;
    }

    /**
     * @return the comment for this operation. A null value means no comment is set.
     * @since 4.6
     * @mongodb.server.release 4.4
     */
    @Nullable
    public BsonValue getComment() {
        return comment;
    }

    /**
     * Sets the comment for this operation. A null value means no comment is set.
     *
     * @param comment the comment
     * @return this
     * @since 4.6
     * @mongodb.server.release 4.4
     */
    public FindOneAndUpdateOptions comment(@Nullable final String comment) {
        this.comment = comment != null ? new BsonString(comment) : null;
        return this;
    }

    /**
     * Sets the comment for this operation. A null value means no comment is set.
     *
     * @param comment the comment
     * @return this
     * @since 4.6
     * @mongodb.server.release 4.4
     */
    public FindOneAndUpdateOptions comment(@Nullable final BsonValue comment) {
        this.comment = comment;
        return this;
    }

    /**
     * Add top-level variables to the operation
     *
     * @return the top level variables if set or null.
     * @mongodb.server.release 5.0
     * @since 4.6
     */
    @Nullable
    public Bson getLet() {
        return variables;
    }

    /**
     * Add top-level variables for the operation
     *
     *
Allows for improved command readability by separating the variables from the query text.
     *
     * @param variables for the operation or null
     * @return this
     * @mongodb.server.release 5.0
     * @since 4.6
     */
    public FindOneAndUpdateOptions let(final Bson variables) {
        this.variables = variables;
        return this;
    }

    @Override
    public String toString() {
        return "FindOneAndUpdateOptions{"
                + "projection=" + projection
                + ", sort=" + sort
                + ", upsert=" + upsert
                + ", returnDocument=" + returnDocument
                + ", maxTimeMS=" + maxTimeMS
                + ", bypassDocumentValidation=" + bypassDocumentValidation
                + ", collation=" + collation
                + ", arrayFilters=" + arrayFilters
                + ", hint=" + hint
                + ", hintString=" + hintString
                + ", comment=" + comment
                + ", let=" + variables
                + '}';
    }
}


text:
<?php

final class PhabricatorCountdownEditor
  extends PhabricatorApplicationTransactionEditor {

  public function getEditorApplicationClass() {
    return 'PhabricatorCountdownApplication';
  }

  public function getEditorObjectsDescription() {
    return pht('Countdown');
  }

  public function getTransactionTypes() {
    $types = parent::getTransactionTypes();

    $types[] = PhabricatorTransactions::TYPE_EDGE;
    $types[] = PhabricatorTransactions::TYPE_SPACE;
    $types[] = PhabricatorTransactions::TYPE_VIEW_POLICY;
    $types[] = PhabricatorTransactions::TYPE_EDIT_POLICY;
    $types[] = PhabricatorTransactions::TYPE_COMMENT;

    return $types;
  }

  protected function shouldSendMail(
    PhabricatorLiskDAO $object,
    array $xactions) {
    return true;
  }

  public function getMailTagsMap() {
    return array(
      PhabricatorCountdownTransaction::MAILTAG_DETAILS =>
        pht('Someone changes the countdown details.'),
      PhabricatorCountdownTransaction::MAILTAG_COMMENT =>
        pht('Someone comments on a countdown.'),
      PhabricatorCountdownTransaction::MAILTAG_OTHER =>
        pht('Other countdown activity not listed above occurs.'),
    );
  }

  protected function buildMailTemplate(PhabricatorLiskDAO $object) {
    $monogram = $object->getMonogram();
    $name = $object->getTitle();

    return id(new PhabricatorMetaMTAMail())
      ->setSubject("{$monogram}: {$name}")
      ->addHeader('Thread-Topic', $monogram);
  }

  protected function buildMailBody(
    PhabricatorLiskDAO $object,
    array $xactions) {

    $body = parent::buildMailBody($object, $xactions);
    $description = $object->getDescription();

    if (strlen($description)) {
      $body->addRemarkupSection(
        pht('COUNTDOWN DESCRIPTION'),
        $object->getDescription());
    }

    $body->addLinkSection(
      pht('COUNTDOWN DETAIL'),
      PhabricatorEnv::getProductionURI('/'.$object->getMonogram()));

    return $body;
  }

  protected function getMailTo(PhabricatorLiskDAO $object) {
    return array(
      $object->getAuthorPHID(),
      $this->requireActor()->getPHID(),
    );
  }
  protected function getMailSubjectPrefix() {
    return '[Countdown]';
  }

  protected function buildReplyHandler(PhabricatorLiskDAO $object) {
    return id(new PhabricatorCountdownReplyHandler())
      ->setMailReceiver($object);
  }

  protected function shouldPublishFeedStory(
    PhabricatorLiskDAO $object,
    array $xactions) {
    return true;
  }

  protected function supportsSearch() {
    return true;
  }

}


text:
import getObject from '../../../utils/get-object';
import { module, test } from 'qunit';

module('Unit | Utility | get object');

// Replace this with your real tests.
test('it works', function(assert) {
  var result = getObject();
  assert.ok(result);
});


text:
/* primitive.h */
/* Copyright (C) 2008 Atsushi Togo */

#ifndef __primitive_H__
#define __primitive_H__

#include "symmetry.h"
#include "cell.h"
#include "mathfunc.h"

typedef struct {
  Cell *cell;
  VecDBL *pure_trans;
  int * mapping_table;
  int size;
  double tolerance;
} Primitive;

Primitive * prm_alloc_primitive(const int size);
void prm_free_primitive(Primitive * primitive);
Cell * prm_get_primitive_cell(SPGCONST Cell * cell, const double symprec);
Primitive * prm_get_primitive(SPGCONST Cell * cell, const double symprec);
#endif


text:
package com.bakerframework.baker.play;

import com.bakerframework.baker.settings.Configuration;
import com.google.gson.Gson;

import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.util.EntityUtils;
import org.solovyev.android.checkout.BasePurchaseVerifier;
import org.solovyev.android.checkout.Purchase;
import org.solovyev.android.checkout.RequestListener;

import java.io.IOException;
import java.util.List;

public class ApiPurchaseVerifier extends BasePurchaseVerifier {

    public ApiPurchaseVerifier() {

    }

    @Override
    protected void doVerify(List<Purchase> purchases, RequestListener<List<Purchase>> listRequestListener) {
        HttpClient httpclient = new DefaultHttpClient();
        HttpPost request = new HttpPost(Configuration.getPurchaseConfirmationUrl());

        try {
            // Build parameters
            Gson gson = new Gson();
            String payload = "{\"payload\":" + gson.toJson(purchases) + ",\"payload_user_id\":\"" + Configuration.getUserId() + "\",\"source\":\"android-" + Configuration.getAppVersion() + "\"}";

            StringEntity params = new StringEntity(payload);
            request.addHeader("content-type", "application/json;charset=UTF-8");
            request.setEntity(params);

            // Execute HTTP Post Request
            HttpResponse response = httpclient.execute(request);
            int statusCode = response.getStatusLine().getStatusCode();
            if (statusCode == 204) {
                // Server validated all purchases: trigger success
                listRequestListener.onSuccess(purchases);
            }else{
                // Server throws an error: trigger error
                String errorMessage = EntityUtils.toString(response.getEntity(), "UTF-8");
                listRequestListener.onError(statusCode, new PurchaseVerificationException(errorMessage));
            }
        } catch (ClientProtocolException e) {
            listRequestListener.onError(400, e);
        } catch (IOException e) {
            listRequestListener.onError(400, e);
        }

    }

    private class PurchaseVerificationException extends Exception {
        public PurchaseVerificationException() { super(); }
        public PurchaseVerificationException(String message) { super(message); }
        public PurchaseVerificationException(String message, Throwable cause) { super(message, cause); }
        public PurchaseVerificationException(Throwable cause) { super(cause); }
    }

}


text: homebrew_cask 'firefox'


text:
#include <aws/resiliencehub/model/LogicalResourceId.h>
#include <aws/core/utils/json/JsonSerializer.h>

#include <utility>

using namespace Aws::Utils::Json;
using namespace Aws::Utils;

namespace Aws
{
namespace ResilienceHub
{
namespace Model
{

LogicalResourceId::LogicalResourceId() :
    m_identifierHasBeenSet(false),
    m_logicalStackNameHasBeenSet(false),
    m_resourceGroupNameHasBeenSet(false),
    m_terraformSourceNameHasBeenSet(false)
{
}

LogicalResourceId::LogicalResourceId(JsonView jsonValue) :
    m_identifierHasBeenSet(false),
    m_logicalStackNameHasBeenSet(false),
    m_resourceGroupNameHasBeenSet(false),
    m_terraformSourceNameHasBeenSet(false)
{
  *this = jsonValue;
}

LogicalResourceId& LogicalResourceId::operator =(JsonView jsonValue)
{
  if(jsonValue.ValueExists("identifier"))
  {
    m_identifier = jsonValue.GetString("identifier");

    m_identifierHasBeenSet = true;
  }

  if(jsonValue.ValueExists("logicalStackName"))
  {
    m_logicalStackName = jsonValue.GetString("logicalStackName");

    m_logicalStackNameHasBeenSet = true;
  }

  if(jsonValue.ValueExists("resourceGroupName"))
  {
    m_resourceGroupName = jsonValue.GetString("resourceGroupName");

    m_resourceGroupNameHasBeenSet = true;
  }

  if(jsonValue.ValueExists("terraformSourceName"))
  {
    m_terraformSourceName = jsonValue.GetString("terraformSourceName");

    m_terraformSourceNameHasBeenSet = true;
  }

  return *this;
}

JsonValue LogicalResourceId::Jsonize() const
{
  JsonValue payload;

  if(m_identifierHasBeenSet)
  {
   payload.WithString("identifier", m_identifier);

  }

  if(m_logicalStackNameHasBeenSet)
  {
   payload.WithString("logicalStackName", m_logicalStackName);

  }

  if(m_resourceGroupNameHasBeenSet)
  {
   payload.WithString("resourceGroupName", m_resourceGroupName);

  }

  if(m_terraformSourceNameHasBeenSet)
  {
   payload.WithString("terraformSourceName", m_terraformSourceName);

  }

  return payload;
}

} // namespace Model
} // namespace ResilienceHub
} // namespace Aws


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Univ. Calif. Publ. Bot. 20:267. 1955

#### Original name
null

### Remarks
null


text:
<!doctype html>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <title>SfB time convertor</title>
  <meta name="description" content="Struggle for Balance time convertors">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="apple-touch-icon" href="apple-touch-icon.png">

  <link rel="stylesheet" href="css/foundation.min.css" />
  <link rel="stylesheet" href="css/normalize.css">
  <link rel="stylesheet" href="css/font-awesome.min.css">

  <link rel="stylesheet" href="css/foundation-datepicker.css">
  <link rel="stylesheet" href="css/main.css">

SfB time converters

            More about this

Github

About the universe

Clocks

Converters

Background

Create your own time

Load your time

Struggle for Balance time clocks converters

        There are many times in the galaxy. In order for better communication and coordination the Standard Universal Time was established.

Today

GMT / Earth Standard time

Local time

Countdown to Standard Universal Time

SUT will be established

Some SUT clocks

Curent SUT

This might be a little bit confusing. In SUT the only denomination for before SUT time is the minus before years, but as you can see this is not a countdown. The only thing that counts down are the years, everything else goes up as it would normally.

SUT time past since this page was opened

Converters

      <form id="eyToSUTY">
        <fieldset>
          <legend>Earth Years to SUT Years</legend>

                  <input id="eyToSUTYInput" type="number" placeholder="Earth Years" maxlength="8" step="any" min=0 required>

                  <button type="submit" class="button postfix cogs">Calculate </button>

        </fieldset>
      </form>

      <form id="sutToEY">
        <fieldset>
          <legend>SUT Years to Earth Years</legend>

                  <input id="sutToEYInput" type="number" placeholder="SUT Years" step="any" maxlength="8" required>

                  <button type="submit" class="button postfix cogs">Calculate </button>

        </fieldset>
      </form>

      <form id="eDToSUT">
        <fieldset>
          <legend>Earth day to SUT</legend>

                  <input id="eDToSUTInput" type="date" placeholder="yyyy-mm-dd" required>

                  <button type="submit" class="button postfix cogs">Calculate </button>

        </fieldset>
      </form>

      <form id="sutToED">
        <fieldset>
          <legend>SUT date to Earth date</legend>

                  <input id="sutToEDInput" type="text" placeholder="yyy.ddd" maxlength="8" required>

                  <button type="submit" class="button postfix cogs">Calculate </button>

        </fieldset>
      </form>

Background

About SfB universe

        Stuggle for Balance universe is a fictional universe created by Jan Dvorak IV. and the main events are set in a distant future, when the lost of colony ship Redeemer in SUT 273 set Adwin Trave to look for survivors, but instead he finds himself on a new route that lead him discover dark secrets that powerful Sentients would rather remained hidden. Very soon Adwin finds himself at the center of events that threaten to destroy the balance of the known universe.

        The story material, at the moment of this writing, is established from SUT -10260 till somewhere around SUT 500, with the main story taking place between SUT 287 and SUT 430. Due to the expansive universe and complexity of the story Jan is currently working on creating a platform that will support the storytelling and experience of the universe, this tool will be part of that platform.

About SUT

        SUT was established on new years eve of Earth Year 2400 to celebrate a new era in the human development and in the galactic community as well. Also the joining of Earth Confederacy gave enough votes to push the proposal through. It were the Grimnaar and Iyat'ktal who were pro and the Tro'ael and Axxonians who were against it, or to be more precise the Axxonians were indifferent. The Grimnaar and Iyat'ktal wanted order in times as previously it meant that every outpost had its own time and that made time synchronization very difficult. When humans joined in they joined the Grimnaar and Iyat'ktal as they already had similar experiences with their own outposts and colonies. The Tro'ael saw independent times as expressions of identity and the Axxoni were still on old Alliance time from thousands of years ago.

About EST (Earth Standard Time)

        EST is very similar to how we know it today. The only change, from the Gregorian calendar, occured in 2400 with a calendar reform that made February 29th not a transition year anomaly, but a standard day to be part of the calendar every year. This was to account for the changes in Earths orbit due to previous events that lead to such change.

About IST (Imperial Standard Time)

        Imperial Standard Time is a time unit that was used by the Grimnaar and begins dating from the establishment of the united empire. Often times Grimnaar still refer to event in "before empire" (BE) and "during empire" (DE).


text:
package com.thoughtworks.go.helper;

import com.thoughtworks.go.domain.User;

public class UsersMother {
    public static User withName(String username) {
        User user = new User(username);

        user.setEmail(String.format("%s@no-reply.com", username));
        user.setEmailMe(true);
        user.setMatcher(String.format("awesome, %s", username));
        user.setDisplayName(username);

        return user;
    }
}


text:
#include "client/client.h"
#include <vector>
#include "node_prog/node_prog_type.h"
#include "node_prog/dijkstra_program.h"

#define TREE_HEIGHT 15 // dont set to 1

inline
uint64_t path_cost(uint64_t start_node_idx, int tree_height)
{
    uint64_t max = 1 << tree_height;
    uint64_t height = 0;
    while ((max | start_node_idx) > start_node_idx) // finds height difference (distance of MSBs)
    {
        max >>= 1;
        height++;
    }
    return ((1 << height)-2)* start_node_idx;
}

void
dijkstra_tree_test(bool to_exit)
{
    client c(CLIENT_ID);
    auto edge_props = std::make_shared<std::vector<common::property>>();
    const uint32_t weight_label = 0xACC;

    uint64_t total_nodes = (1 << TREE_HEIGHT); // I want to 1-index nodes
    uint64_t nodes[total_nodes+1];
    uint64_t edges[total_nodes+1];
    uint64_t i;
    for (i = 1; i < total_nodes; i++) {
        nodes[i] = c.create_node();
        WDEBUG << "added node " << i << std::endl;
    }

    for (i = 1; i < (total_nodes >> 1); i++) {
        edges[2*i] = c.create_edge(nodes[i], nodes[2*i]);
        c.add_edge_prop(nodes[i], edges[2*i], weight_label, 2*i);
        WDEBUG << "added edge " << edges[2*i] << " of weight " << 2*i<< std::endl;

        edges[2*i+1] = c.create_edge(nodes[i], nodes[2*i + 1]);
        c.add_edge_prop(nodes[i], edges[2*i + 1], weight_label, 2*i + 1);

        WDEBUG << "added edge " << edges[2*i + 1] << " of weight " << 2*i+1<< std::endl;
    }
    uint64_t super_sink = c.create_node();
    WDEBUG << "added super sink "<< std::endl;
    uint64_t sink_edges[(total_nodes >> 1)];
    for (i = (total_nodes >> 1); i < total_nodes; i++) {
        sink_edges[i] = c.create_edge(nodes[i], super_sink);
        c.add_edge_prop(nodes[i], sink_edges[i], weight_label, 0);
        WDEBUG << "added sink edge from node " << i << std::endl;
    }

    WDEBUG << "about to start dijkstra tests" << std::endl;
    std::vector<std::pair<uint64_t, node_prog::dijkstra_params>> initial_args;
    // run starting at all nodes but bottom row
    for (i = 1; i < (total_nodes >> 1); i++) {
        initial_args.emplace_back(std::make_pair(nodes[i], node_prog::dijkstra_params()));
        initial_args[0].second.adding_nodes = false;
        initial_args[0].second.is_widest_path = false;
        initial_args[0].second.src_handle = nodes[i];
        initial_args[0].second.dst_handle = super_sink;
        initial_args[0].second.edge_weight_key = weight_label;
        WDEBUG << "about to run dijkstra for source " << i << std::endl;
        std::unique_ptr<node_prog::dijkstra_params> res = c.run_node_program(node_prog::DIJKSTRA, initial_args);

        WDEBUG << "path of cost " << res->cost <<" wanted" << path_cost(i, TREE_HEIGHT) << std::endl;
        assert(res->cost == path_cost(i, TREE_HEIGHT));
        initial_args.clear();
    }

    WDEBUG << "about to test dijkstra after deleting some nodes" << std::endl;
    // delete nodes up from the bottom left, then test from top node
    for (int height = TREE_HEIGHT; height > 1; height--) {
        uint64_t delete_idx = 1 << (height - 1);
        c.delete_node(nodes[delete_idx]);

        initial_args.emplace_back(std::make_pair(nodes[1], node_prog::dijkstra_params()));
        initial_args[0].second.adding_nodes = false;
        initial_args[0].second.is_widest_path = false;
        initial_args[0].second.src_handle = nodes[1];
        initial_args[0].second.dst_handle = super_sink;
        initial_args[0].second.edge_weight_key = weight_label;
        std::unique_ptr<node_prog::dijkstra_params> res = c.run_node_program(node_prog::DIJKSTRA, initial_args);

        uint64_t alternate_route_node = (1 << (height - 1))+1;
        uint64_t expected_cost = path_cost(1, height-1) + alternate_route_node + path_cost(alternate_route_node, TREE_HEIGHT);
        WDEBUG << "path of cost " << res->cost <<" wanted " << expected_cost << " though node " << alternate_route_node << std::endl;
        assert(res->cost == expected_cost);
        initial_args.clear();
    }
    if (to_exit)
        c.exit_weaver();
}


text:
/* gopt.h version 8.1: tom.viza@gmail.com PUBLIC DOMAIN 2003-8 */
/*
I, Tom Vajzovic, am the author of this software and its documentation and
permanently abandon all copyright and other intellectual property rights in
them, including the right to be identified as the author.

I am fairly certain that this software does what the documentation says it
does, but I cannot guarantee that it does, or that it does what you think it
should, and I cannot guarantee that it will not have undesirable side effects.

You are free to use, modify and distribute this software as you please, but
you do so at your own risk.  If you remove or hide this warning then you are
responsible for any problems encountered by people that you make the software
available to.

Before modifying or distributing this software I ask that you would please
read http://www.purposeful.co.uk/tfl/
*/

#ifndef GOPT_H_INCLUDED
#define GOPT_H_INCLUDED

#define GOPT_ONCE   0
#define GOPT_REPEAT 1
#define GOPT_NOARG  0
#define GOPT_ARG    2

#define gopt_start(...)  (const void*)( const struct { int k; int f; const char *s; const char*const*l; }[]){ __VA_ARGS__, {0}}
#define gopt_option(k,f,s,l)    { k, f, s, l }
#define gopt_shorts( ... )      (const char*)(const char[]){ __VA_ARGS__, 0 }
#define gopt_longs( ... )       (const char**)(const char*[]){ __VA_ARGS__, NULL }

void *gopt_sort( int *argc, const char **argv, const void *opt_specs );
/* returns a pointer for use in the following calls
 * prints to stderr and call exit() on error
 */
size_t gopt( const void *opts, int key );
/* returns the number of times the option was specified
 * which will be 0 or 1 unless GOPT_REPEAT was used
 */
size_t gopt_arg( const void *opts, int key, const char **arg );
/* returns the number of times the option was specified
 * writes a pointer to the option argument from the first (or only) occurance to *arg
 */
const char *gopt_arg_i( const void *opts, int key, size_t i );
/* returns a pointer to the ith (starting at zero) occurance
 * of the option, or NULL if it was not specified that many times
 */
size_t gopt_args( const void *opts, int key, const char **args, size_t args_len );
/* returns the number of times the option was specified
 * writes pointers to the option arguments in the order of occurance to args[].
 * writes at most args_len pointers
 * if the return value is less than args_len, also writes a null pointer
 */
void gopt_free( void *opts );
/* releases memory allocated in the corresponding call to gopt_sort()
 * opts can no longer be used
 */
#endif /* GOPT_H_INCLUDED */


text:
package org.powlab.jeye.tests.strings;

public class StringBufferTest1a {
    public String test1(int a, int b, int c) {
        return new StringBuffer().append("this ").append(a).append("is").append(b).append(" c? ").append(c).toString();
    }

    public String test2(int a, int b, int c) {
        return new StringBuffer("this ").append(a).append("is").append(b).append(" c? ").append(c).toString();
    }

}


text:
"""Hyperparameters for the object detection model in TF.learn.

This file consolidates and documents the hyperparameters used by the model.
"""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

# pylint: disable=g-import-not-at-top
try:
  from tensorflow.contrib import training as contrib_training
except ImportError:
  # TF 2.0 doesn't ship with contrib.
  pass
# pylint: enable=g-import-not-at-top

def create_hparams(hparams_overrides=None):
  """Returns hyperparameters, including any flag value overrides.

  Args:
    hparams_overrides: Optional hparams overrides, represented as a
      string containing comma-separated hparam_name=value pairs.

  Returns:
    The hyperparameters as a tf.HParams object.
  """
  hparams = contrib_training.HParams(
      # Whether a fine tuning checkpoint (provided in the pipeline config)
      # should be loaded for training.
      load_pretrained=True)
  # Override any of the preceding hyperparameter values.
  if hparams_overrides:
    hparams = hparams.parse(hparams_overrides)
  return hparams


text:
<metadata>
  <groupId>test</groupId>
  <artifactId>v3artifact</artifactId>
  <version>1.0.0-SNAPSHOT</version>
  <versioning />
</metadata>


text:
package demo
package components
package materialui

import chandu0101.macros.tojs.GhPagesMacros
import chandu0101.scalajs.react.components.materialui._
import japgolly.scalajs.react.ScalaComponent
import japgolly.scalajs.react.vdom.html_<^._

object MuiProgressDemo {

  val code = GhPagesMacros.exampleSource

  // EXAMPLE:START
  val component = ScalaComponent
    .builder[Unit]("MuiProgressDemo")
    .render(P => {
      <.div(
        CodeExample(code, "Progress Bars")(
          MuiCircularProgress(mode = DeterminateIndeterminate.determinate, value = 50.0)(),
          MuiCircularProgress(mode = DeterminateIndeterminate.indeterminate, size = 0.5)(),
          MuiCircularProgress(mode = DeterminateIndeterminate.indeterminate)(),
          MuiCircularProgress(mode = DeterminateIndeterminate.indeterminate, size = 2.0)(),
          MuiLinearProgress(mode = DeterminateIndeterminate.indeterminate)()
        )
      )
    })
    .build
  // EXAMPLE:END

  def apply() = component()
}


text:
var path = require('path');
var express = require('express');
var compression = require('compression');
var favicon = require('serve-favicon');
var health = require('./routes/health');
var baseUrl = '/todo'
var app = express();

app.use(baseUrl + '/health', health);
app.use(baseUrl, compression());
app.use(baseUrl, favicon(path.join(__dirname, '/../../static/favicon.ico')));
app.use(baseUrl, express['static']('static'));

module.exports = app;


text:
using System;
using Vlc.DotNet.Core.Interops.Signatures;

namespace Vlc.DotNet.Core
{
    public sealed partial class VlcMediaPlayer
    {
        private EventCallback myOnMediaPlayerEncounteredErrorInternalEventCallback;
        public event EventHandler<VlcMediaPlayerEncounteredErrorEventArgs> EncounteredError;

        private void OnMediaPlayerEncounteredErrorInternal(IntPtr ptr)
        {
            OnMediaPlayerEncounteredError();
        }

        public void OnMediaPlayerEncounteredError()
        {
            var del = EncounteredError;
            if (del != null)
                del(this, new VlcMediaPlayerEncounteredErrorEventArgs());
        }
    }
}


text:
package opennlp.tools.postag;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Map;

import opennlp.tools.dictionary.Dictionary;
import opennlp.tools.util.InvalidFormatException;
import opennlp.tools.util.SequenceValidator;
import opennlp.tools.util.model.ArtifactSerializer;
import opennlp.tools.util.model.UncloseableInputStream;

public class DummyPOSTaggerFactory extends POSTaggerFactory {

  private static final String DUMMY_POSDICT = "DUMMY_POSDICT";
  private DummyPOSDictionary dict;

  public DummyPOSTaggerFactory() {
  }

  public DummyPOSTaggerFactory(Dictionary ngramDictionary, DummyPOSDictionary posDictionary) {
    super(ngramDictionary, null);
    this.dict = posDictionary;
  }

  @Override
  public SequenceValidator<String> getSequenceValidator() {
    return new DummyPOSSequenceValidator();
  }

  @Override
  public DummyPOSDictionary getTagDictionary() {
    return (DummyPOSDictionary) artifactProvider.getArtifact(DUMMY_POSDICT);
  }

  @Override
  public POSContextGenerator getPOSContextGenerator() {
    return new DummyPOSContextGenerator(this.ngramDictionary);
  }

  @Override
  @SuppressWarnings("rawtypes")
  public Map<String, ArtifactSerializer> createArtifactSerializersMap() {
    Map<String, ArtifactSerializer> serializers = super.createArtifactSerializersMap();

    serializers.put(DUMMY_POSDICT, new DummyPOSDictionarySerializer());
    return serializers;
  }

  @Override
  public Map<String, Object> createArtifactMap() {
    Map<String, Object> artifactMap = super.createArtifactMap();
    if(this.dict != null)
      artifactMap.put(DUMMY_POSDICT, this.dict);
    return artifactMap;
  }

  static class DummyPOSContextGenerator extends DefaultPOSContextGenerator {

    public DummyPOSContextGenerator(Dictionary dict) {
      super(dict);
    }

  }

  static class DummyPOSDictionarySerializer implements ArtifactSerializer<DummyPOSDictionary> {

    public DummyPOSDictionary create(InputStream in) throws IOException,
        InvalidFormatException {
      return DummyPOSDictionary.create(new UncloseableInputStream(in));
    }

    public void serialize(DummyPOSDictionary artifact, OutputStream out)
        throws IOException {
      artifact.serialize(out);
    }
  }

  static class DummyPOSSequenceValidator implements SequenceValidator<String> {

    public boolean validSequence(int i, String[] inputSequence,
        String[] outcomesSequence, String outcome) {
      return true;
    }

  }

  static class DummyPOSDictionary extends POSDictionary {

    private POSDictionary dict;

    public DummyPOSDictionary(POSDictionary dict) {
      this.dict = dict;
    }

    public static DummyPOSDictionary create(
        UncloseableInputStream uncloseableInputStream) throws InvalidFormatException, IOException {
      return new DummyPOSDictionary(POSDictionary.create(uncloseableInputStream));
    }

    public void serialize(OutputStream out) throws IOException {
      dict.serialize(out);
    }

    public String[] getTags(String word) {
      return dict.getTags(word);
    }

  }

}


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Mail;
using SendGrid.SmtpApi;

namespace SendGrid
{
	/// <summary>
	///     Represents the basic set of functions that will be called by the user
	///     includes basic message data manipulation and filter settings
	/// </summary>
	public interface ISendGrid
	{
		#region Properties

		MailAddress From { get; set; }
		MailAddress[] To { get; set; }
        MailAddress[] Cc { get; set; }
        MailAddress[] Bcc { get; set; }
		MailAddress[] ReplyTo { get; set; }
		Dictionary<String, MemoryStream> StreamedAttachments { get; set; }
		String[] Attachments { get; set; }
		String Subject { get; set; }
		Dictionary<String, String> Headers { get; set; }
		IHeader Header { get; set; }
		String Html { get; set; }
		String Text { get; set; }

		#endregion

		#region Interface for ITransport

		/// <summary>
		///     Used by the Transport object to create a MIME for SMTP
		/// </summary>
		/// <returns>MIME to be sent</returns>
		MailMessage CreateMimeMessage();

		#endregion

		#region Methods for setting data

		/// <summary>
		///     Add to the 'To' address.
		/// </summary>
		/// <param name="address">single string eg. 'you@company.com'</param>
		void AddTo(String address);

		/// <summary>
		///     Add to the 'To' address.
		/// </summary>
		/// <param name="addresses">list of email addresses as strings</param>
		void AddTo(IEnumerable<String> addresses);

		/// <summary>
		///     Add to the 'To' address.
		/// </summary>
		/// <param name="addresssInfo">
		///     the dictionary keys are the email addresses, which points to a dictionary of
		///     key substitutionValues pairs mapping to other address codes, such as { foo@bar.com => { 'DisplayName' => 'Mr Foo' }
		///     }
		/// </param>
		void AddTo(IDictionary<String, IDictionary<String, String>> addresssInfo);

        /// <summary>
        ///     Defines a mapping between a replacement string in the text of the message to a section of
        ///     substitution values to be used
        /// </summary>
        /// <param name="replacementTag">the string in the email that you'll replace eg. '-itemsOrdered-'</param>
        /// <param name="sectionValue">
        ///     The content that will be substituted in for the replacementTag
        /// </param>
	    void AddSection(String replacementTag, String sectionValue);

		/// <summary>
		///     Defines a mapping between a replacement string in the text of the message to a list of
		///     substitution values to be used, one per each recipient, in the same order as the recipients were added.
		/// </summary>
		/// <param name="replacementTag">the string in the email that you'll replace eg. '-name-'</param>
		/// <param name="substitutionValues">
		///     a list of values that will be substituted in for the replacementTag, one for each
		///     recipient
		/// </param>
		void AddSubstitution(String replacementTag, List<String> substitutionValues);

		/// <summary>
		///     This adds parameters and values that will be bassed back through SendGrid's
		///     Event API if an event notification is triggered by this email.
		/// </summary>
		/// <param name="identifiers">parameter substitutionValues pairs to be passed back on event notification</param>
		void AddUniqueArgs(IDictionary<String, String> identifiers);

        /// <summary>
        ///     This sets the suppression group id for this email.
        /// </summary>
        /// <param name="id">the id of the suppression group</param>
        void SetAsmGroupId(int id);

		/// <summary>
		///     This sets the category for this email.  Statistics are stored on a per category
		///     basis, so this can be useful for tracking on a per group basis.
		/// </summary>
		/// <param name="category">categories applied to the message</param>
		void SetCategory(String category);

		/// <summary>
		///     This sets the categories for this email.  Statistics are stored on a per category
		///     basis, so this can be useful for tracking on a per group basis.
		/// </summary>
		/// <param name="categories">categories applied to the message</param>
		void SetCategories(IEnumerable<String> categories);

        /// <summary>
        ///     This sets the IP Pool for this email.
        /// </summary>
        /// <param name="pool">The name of the pool with which to send the message.</param>
        void SetIpPool(String pool);

        /// <summary>
        ///     Define a send_at timestamp to schedule this send for the future.
        /// </summary>
        /// <param name="sendTime">The time at which to send the email</param>
        void SetSendAt(DateTime sendTime);

        /// <summary>
        ///     Define a send_each_at timestamp to schedule individual send times per message
        /// </summary>
        /// <param name="sendTimes">The times at which to send the emails</param>
        void SetSendEachAt(IEnumerable<DateTime> sendTimes);

		/// <summary>
		///     Add an attachment to the message.
		/// </summary>
		/// <param name="filePath">a fully qualified file path as a string</param>
		void AddAttachment(String filePath);

		/// <summary>
		///     Add a stream as an attachment to the message
		/// </summary>
		/// <param name="stream">Stream of file to be attached</param>
		/// <param name="name">Name of file to be attached</param>
		void AddAttachment(Stream stream, String name);

	    void EmbedStreamImage(Stream stream, String name);

		/// <summary>
		///     GetRecipients returns a list of all the recepients by retrieving the to, cc, and bcc lists.
		/// </summary>
		/// <returns></returns>
		IEnumerable<String> GetRecipients();

		/// <summary>
		///     Add custom headers to the message
		/// </summary>
		/// <param name="headers">key substitutionValues pairs</param>
		void AddHeaders(IDictionary<String, String> headers);

		/// <summary>
		///     Gets the list of embedded images
		/// </summary>
		/// <returns></returns>
		IDictionary<string, string> GetEmbeddedImages();

		#endregion

		#region SMTP API Functions

		/// <summary>
		///     Disable the gravatar app
		/// </summary>
		void DisableGravatar();

		/// <summary>
		///     Disable the open tracking app
		/// </summary>
		void DisableOpenTracking();

		/// <summary>
		///     Disable the click tracking app
		/// </summary>
		void DisableClickTracking();

		/// <summary>
		///     Disable the spam check
		/// </summary>
		void DisableSpamCheck();

		/// <summary>
		///     Disable the unsubscribe app
		/// </summary>
		void DisableUnsubscribe();

		/// <summary>
		///     Disable the footer app
		/// </summary>
		void DisableFooter();

		/// <summary>
		///     Disable the Google Analytics app
		/// </summary>
		void DisableGoogleAnalytics();

		/// <summary>
		///     Disable the templates app
		/// </summary>
		void DisableTemplate();

		/// <summary>
		///     Disable Bcc app
		/// </summary>
		void DisableBcc();

		/// <summary>
		///     Disable the Bypass List Management app
		/// </summary>
		void DisableBypassListManagement();

		/// <summary>
		///     Inserts the gravatar image of the sender to the bottom of the message
		/// </summary>
		void EnableGravatar();

		/// <summary>
		///     Adds an invisible image to the end of the email which can track e-mail opens.
		/// </summary>
		void EnableOpenTracking();

		/// <summary>
		///     Causes all links to be overwritten, shortened, and pointed to SendGrid's servers so clicks will be tracked.
		/// </summary>
		/// <param name="includePlainText">true if links found in plain text portions of the message are to be overwritten</param>
		void EnableClickTracking(bool includePlainText = false);

		/// <summary>
		///     Provides notification when emails are deteched that exceed a predefined spam threshold.
		/// </summary>
		/// <param name="score">
		///     Emails with a SpamAssassin score over this substitutionValues will be considered spam and not be
		///     delivered.
		/// </param>
		/// <param name="url">SendGridMessage will send an HTTP POST request to this url when a message is detected as spam</param>
		void EnableSpamCheck(int score = 5, String url = null);

		/// <summary>
		///     Allow's SendGridMessage to manage unsubscribes and ensure these users don't get future emails from the sender
		/// </summary>
		/// <param name="text">String for the plain text email body showing what you want the message to look like.</param>
		/// <param name="html">String for the HTML email body showing what you want the message to look like.</param>
		void EnableUnsubscribe(String text, String html);

		/// <summary>
		///     Allow's SendGridMessage to manage unsubscribes and ensure these users don't get future emails from the sender
		/// </summary>
		/// <param name="replace">Tag in the message body to be replaced with the unsubscribe link and message</param>
		void EnableUnsubscribe(String replace);

		/// <summary>
		///     Attaches a message at the footer of the email
		/// </summary>
		/// <param name="text">Message for the plain text body of the email</param>
		/// <param name="html">Message for the HTML body of the email</param>
		void EnableFooter(String text = null, String html = null);

		/// <summary>
		///     Re-writes links to integrate with Google Analytics
		/// </summary>
		/// <param name="source">Name of the referrer source (e.g. Google, SomeDomain.com, NewsletterA)</param>
		/// <param name="medium">Name of the marketing medium (e.g. Email)</param>
		/// <param name="term">Identify paid keywords</param>
		/// <param name="content">Use to differentiate ads</param>
		/// <param name="campaign">Name of the campaign</param>
		void EnableGoogleAnalytics(String source, String medium, String term, String content = null, String campaign = null);

		/// <summary>
		///     Wraps an HTML template around your email content.
		/// </summary>
		/// <param name="html">HTML that your emails will be wrapped in, containing a body replacementTag.</param>
		void EnableTemplate(String html = null);

        /// <summary>
        ///     Enable a Template Engine template via the template ID
        /// </summary>
        /// <param name="template_id">The ID of the Template Engine template to use.</param>
        void EnableTemplateEngine(String templateId);

		/// <summary>
		///     Automatically sends a blind carbon copy to an address for every e-mail sent, without
		///     adding that address to the header.
		/// </summary>
		/// <param name="email">A single email recipient</param>
		void EnableBcc(String email = null);

		/// <summary>
		///     Enabing this app will bypass the normal unsubscribe / bounce / spam report checks
		///     and queue the e-mail for delivery.
		/// </summary>
		void EnableBypassListManagement();

		#endregion
	}
}


text:
import { ContextManager, Context } from '@opentelemetry/api';
import { EventEmitter } from 'events';

type Func<T> = (...args: unknown[]) => T;

/**
 * Store a map for each event of all original listeners and their "patched"
 * version. So when a listener is removed by the user, the corresponding
 * patched function will be also removed.
 */
interface PatchMap {
  [name: string]: WeakMap<Func<void>, Func<void>>;
}

const ADD_LISTENER_METHODS = [
  'addListener' as const,
  'on' as const,
  'once' as const,
  'prependListener' as const,
  'prependOnceListener' as const,
];

export abstract class AbstractAsyncHooksContextManager
implements ContextManager {
  abstract active(): Context;

  abstract with<A extends unknown[], F extends (...args: A) => ReturnType<F>>(
    context: Context,
    fn: F,
    thisArg?: ThisParameterType<F>,
    ...args: A
  ): ReturnType<F>;

  abstract enable(): this;

  abstract disable(): this;

  /**
   * Binds a the certain context or the active one to the target function and then returns the target
   * @param context A context (span) to be bind to target
   * @param target a function or event emitter. When target or one of its callbacks is called,
   *  the provided context will be used as the active context for the duration of the call.
   */
  bind<T>(context: Context, target: T): T {
    if (target instanceof EventEmitter) {
      return this._bindEventEmitter(context, target);
    }

    if (typeof target === 'function') {
      return this._bindFunction(context, target);
    }
    return target;
  }

  private _bindFunction<T extends Function>(context: Context, target: T): T {
    const manager = this;
    const contextWrapper = function (this: never, ...args: unknown[]) {
      return manager.with(context, () => target.apply(this, args));
    };
    Object.defineProperty(contextWrapper, 'length', {
      enumerable: false,
      configurable: true,
      writable: false,
      value: target.length,
    });
    /**
     * It isn't possible to tell Typescript that contextWrapper is the same as T
     * so we forced to cast as any here.
     */
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    return contextWrapper as any;
  }

  /**
   * By default, EventEmitter call their callback with their context, which we do
   * not want, instead we will bind a specific context to all callbacks that
   * go through it.
   * @param context the context we want to bind
   * @param ee EventEmitter an instance of EventEmitter to patch
   */
  private _bindEventEmitter<T extends EventEmitter>(
    context: Context,
    ee: T
  ): T {
    const map = this._getPatchMap(ee);
    if (map !== undefined) return ee;
    this._createPatchMap(ee);

    // patch methods that add a listener to propagate context
    ADD_LISTENER_METHODS.forEach(methodName => {
      if (ee[methodName] === undefined) return;
      ee[methodName] = this._patchAddListener(ee, ee[methodName], context);
    });
    // patch methods that remove a listener
    if (typeof ee.removeListener === 'function') {
      ee.removeListener = this._patchRemoveListener(ee, ee.removeListener);
    }
    if (typeof ee.off === 'function') {
      ee.off = this._patchRemoveListener(ee, ee.off);
    }
    // patch method that remove all listeners
    if (typeof ee.removeAllListeners === 'function') {
      ee.removeAllListeners = this._patchRemoveAllListeners(
        ee,
        ee.removeAllListeners
      );
    }
    return ee;
  }

  /**
   * Patch methods that remove a given listener so that we match the "patched"
   * version of that listener (the one that propagate context).
   * @param ee EventEmitter instance
   * @param original reference to the patched method
   */
  private _patchRemoveListener(ee: EventEmitter, original: Function) {
    const contextManager = this;
    return function (this: never, event: string, listener: Func<void>) {
      const events = contextManager._getPatchMap(ee)?.[event];
      if (events === undefined) {
        return original.call(this, event, listener);
      }
      const patchedListener = events.get(listener);
      return original.call(this, event, patchedListener || listener);
    };
  }

  /**
   * Patch methods that remove all listeners so we remove our
   * internal references for a given event.
   * @param ee EventEmitter instance
   * @param original reference to the patched method
   */
  private _patchRemoveAllListeners(ee: EventEmitter, original: Function) {
    const contextManager = this;
    return function (this: never, event: string) {
      const map = contextManager._getPatchMap(ee);
      if (map !== undefined) {
        if (arguments.length === 0) {
          contextManager._createPatchMap(ee);
        } else if (map[event] !== undefined) {
          delete map[event];
        }
      }
      return original.apply(this, arguments);
    };
  }

  /**
   * Patch methods on an event emitter instance that can add listeners so we
   * can force them to propagate a given context.
   * @param ee EventEmitter instance
   * @param original reference to the patched method
   * @param [context] context to propagate when calling listeners
   */
  private _patchAddListener(
    ee: EventEmitter,
    original: Function,
    context: Context
  ) {
    const contextManager = this;
    return function (this: never, event: string, listener: Func<void>) {
      /**
       * This check is required to prevent double-wrapping the listener.
       * The implementation for ee.once wraps the listener and calls ee.on.
       * Without this check, we would wrap that wrapped listener.
       * This causes an issue because ee.removeListener depends on the onceWrapper
       * to properly remove the listener. If we wrap their wrapper, we break
       * that detection.
       */
      if (contextManager._wrapped) {
        return original.call(this, event, listener);
      }
      let map = contextManager._getPatchMap(ee);
      if (map === undefined) {
        map = contextManager._createPatchMap(ee);
      }
      let listeners = map[event];
      if (listeners === undefined) {
        listeners = new WeakMap();
        map[event] = listeners;
      }
      const patchedListener = contextManager.bind(context, listener);
      // store a weak reference of the user listener to ours
      listeners.set(listener, patchedListener);

      /**
       * See comment at the start of this function for the explanation of this property.
       */
      contextManager._wrapped = true;
      try {
        return original.call(this, event, patchedListener);
      } finally {
        contextManager._wrapped = false;
      }
    };
  }

  private _createPatchMap(ee: EventEmitter): PatchMap {
    const map = Object.create(null);
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    (ee as any)[this._kOtListeners] = map;
    return map;
  }
  private _getPatchMap(ee: EventEmitter): PatchMap | undefined {
    return (ee as never)[this._kOtListeners];
  }

  private readonly _kOtListeners = Symbol('OtListeners');
  private _wrapped = false;
}


text:
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../paper-spinner/paper-spinner.html">
<link rel="import" href="../carbo-highlighter/carbo-highlighter.html">
<link rel="import" href="carbo-inspector-styles.html">

<dom-module id="carbo-inspector">

    <template>

        <template is="dom-repeat" items="{{ _highlighters }}">
            <carbo-highlighter
                id$="{{ item.id }}"
                state="{{ item.state }}"
                target="{{ item.target }}"
                surface-style="{{ item.surfaceStyle }}"
            >

{{ item.elementLabel }}

{{ item.owner }}

            </carbo-highlighter>
        </template>

        <carbo-highlighter id="loading" state="inactive">

                <paper-spinner alt="Loading contacts list" active></paper-spinner>

        </carbo-highlighter>
    </template>

</dom-module>


text:
@interface TDOrderTeacherSuccessViewController () <UITableViewDelegate,UITableViewDataSource,UIGestureRecognizerDelegate>

@property (nonatomic,strong) UITableView *tableView;
@property (nonatomic,strong) UIView *headerView;
@property (nonatomic,strong) UILabel *imageLabel;
@property (nonatomic,strong) UIButton *topButton;
@property (nonatomic,strong) UILabel *messageLabel;
@property (nonatomic,strong) UIView *footerView;
@property (nonatomic,strong) UIButton *moreOrderButton;
@property (nonatomic,strong) UIButton *rechargeButton;

@property (nonatomic,strong) NSString *failStr;

@property (nonatomic,strong) UIButton *leftButton;
@property (nonatomic,strong) TDBaseToolModel *toolModel;

@end

@implementation TDOrderTeacherSuccessViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    self.title = self.isSuccess ? @"预约成功" : @"预约失败";
    self.view.backgroundColor = [UIColor colorWithHexString:colorHexStr5];
    self.toolModel = [[TDBaseToolModel alloc] init];
    [self setLeftNavigationBar];
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];

    if (self.failType == 401) {
        self.failStr = @"预约失败,不能预约自己。";

    }  else if (self.failType == 402) {
        self.failStr = @"预约失败,请先购买该课程。";

    }  else if (self.failType == 403) {
        self.failStr = @"预约失败,预约时间不能比当前时间早";

    }  else if (self.failType == 406) {
        self.failStr = @"预约失败,您的学习宝典余额不足,请先充值。";

    }  else if (self.failType == 407) {
        self.failStr = @"预约失败,助教未安排此时间段服务。";

    }  else if (self.failType == 408) {
        self.failStr = @"预约失败,此时间段已被预约,请选择其他时间段。";

    }  else {
        self.failStr = @"预约助教服务失败。";
        NSLog(@"预约失败 -- %ld",(long)self.failType);
    }

    [self setviewConstraint];
}

#pragma mark - 导航栏左边按钮
- (void)setLeftNavigationBar {

    self.leftButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 48, 48)];
    [self.leftButton setImage:[UIImage imageNamed:@"backImagee"] forState:UIControlStateNormal];
    self.leftButton.imageEdgeInsets = UIEdgeInsetsMake(0, -23, 0, 23);

    if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) {
        self.navigationController.interactivePopGestureRecognizer.enabled = YES;
        self.navigationController.interactivePopGestureRecognizer.delegate = self;
    }

    [self.leftButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [self.leftButton addTarget:self action:@selector(backButtonAction:) forControlEvents:UIControlEventTouchUpInside];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:self.leftButton];

}

- (void)backButtonAction:(UIButton *)sender {
    NSInteger index = self.whereFrom == 1 ? 2 : 1;
    [self.navigationController popToViewController:self.navigationController.childViewControllers[index] animated:YES];
}

#pragma mark - 按钮
- (void)moreOrderButtonAction:(UIButton *)sender {//重新预约
    NSInteger index = self.whereFrom == 1 ? 3 : 2;
    [self.navigationController popToViewController:self.navigationController.childViewControllers[index] animated:YES];
}

- (void)rechargeButtonAction:(UIButton *)sender {
    if (self.failType == 402) {//加入课程
        NSInteger index = self.whereFrom == 1 ? 2 : 1;
        [self.navigationController popToViewController:self.navigationController.childViewControllers[index] animated:YES];

    } else {//充值
        TDRechargeViewController *rechargeVC = [[TDRechargeViewController alloc] init];
        rechargeVC.username = self.username;
        [self.navigationController pushViewController:rechargeVC animated:YES];
    }
}

#pragma mark - tableview delegate
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return self.isSuccess ? 1 : 0;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 3;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"TDCreateOrderResultCell"];
    if (!cell) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"TDCreateOrderResultCell"];
    }
    cell.userInteractionEnabled = NO;
    cell.textLabel.font = [UIFont fontWithName:@"OpenSans" size:14];
    cell.textLabel.textColor = [UIColor colorWithHexString:colorHexStr10];
    cell.textLabel.numberOfLines = 0;
    cell.detailTextLabel.font = [UIFont fontWithName:@"OpenSans" size:14];
    cell.detailTextLabel.textColor = [UIColor colorWithHexString:colorHexStr9];

    switch (indexPath.row) {
        case 0:
            cell.textLabel.text = @"预定时间";
            cell.detailTextLabel.text = [NSString stringWithFormat:@"%@",self.timeStr];

            break;
        case 1:
            cell.textLabel.text = @"预付宝典";
            cell.detailTextLabel.attributedText = [self.toolModel setDetailString:[NSString stringWithFormat:@"%@宝典",self.iconStr] withFont:14 withColorStr:colorHexStr9];
            break;
        case 2:
        {
            NSMutableAttributedString *str1 = [[NSMutableAttributedString alloc] initWithString:@"咨询问题\n" attributes:@{NSForegroundColorAttributeName : [UIColor colorWithHexString:colorHexStr10]}];
            NSMutableAttributedString *str2 = [[NSMutableAttributedString alloc] initWithString:self.quetionStr attributes:@{NSForegroundColorAttributeName : [UIColor colorWithHexString:colorHexStr9]}];
            [str1 appendAttributedString:str2];
            cell.textLabel.attributedText = str1;
        }
            break;

        default:
            break;
    }
    return cell;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    if (indexPath.row == 2) {
        CGSize size = [self.toolModel getSringSize:self.quetionStr withFont:14];
        return 58 + size.height;
    } else {
        return 48;
    }
}

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
    UIView *view = [[UIView alloc] init];
    view.backgroundColor = [UIColor colorWithHexString:colorHexStr5];

    if (self.isSuccess) {
        UIView *leftLine = [[UIView alloc] init];
        leftLine.backgroundColor = [UIColor colorWithHexString:colorHexStr6];
        [view addSubview:leftLine];

        UIView *rightLine = [[UIView alloc] init];
        rightLine.backgroundColor = [UIColor colorWithHexString:colorHexStr6];
        [view addSubview:rightLine];

        UILabel *titleLabel = [[UILabel alloc] init];
        titleLabel.font = [UIFont fontWithName:@"OpenSans" size:14];
        titleLabel.textColor = [UIColor colorWithHexString:colorHexStr8];
        titleLabel.text = @"预约信息";
        [view addSubview:titleLabel];

        [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.mas_equalTo(view.mas_centerY);
            make.centerX.mas_equalTo(view.mas_centerX);
            make.height.mas_equalTo(28);
        }];

        [leftLine mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(view.mas_left).offset(28);
            make.right.mas_equalTo(titleLabel.mas_left).offset(-18);
            make.centerY.mas_equalTo(view.mas_centerY);
            make.height.mas_equalTo(1);
        }];

        [rightLine mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.mas_equalTo(view.mas_right).offset(-28);
            make.left.mas_equalTo(titleLabel.mas_right).offset(18);
            make.centerY.mas_equalTo(view.mas_centerY);
            make.height.mas_equalTo(1);
        }];
    }

    return view;
}

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
    return self.isSuccess ? 58 : 0;
}

#pragma mark - UI
- (void)setviewConstraint {

    self.tableView = [[UITableView alloc] init];
    self.tableView.delegate = self;
    self.tableView.dataSource = self;
    self.tableView.backgroundColor = [UIColor colorWithHexString:colorHexStr5];
    [self.view addSubview:self.tableView];

    [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.top.mas_equalTo(self.view);
    }];

    self.tableView.tableHeaderView = [self setTableViewHeaderView];
    self.tableView.tableFooterView  = [self settableViewFooterView];

}

- (UIView *)setTableViewHeaderView {
    self.headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, TDWidth, 98)];
    self.headerView.backgroundColor = [UIColor whiteColor];

    self.topButton = [[UIButton alloc] init];
    self.topButton.titleLabel.font = [UIFont fontWithName:@"OpenSans" size:14];
    [self.topButton setTitleColor:[UIColor colorWithHexString:colorHexStr10] forState:UIControlStateNormal];
    [self.topButton setTitle:self.isSuccess? @"预约成功!" : @"预约失败!" forState:UIControlStateNormal];
    [self.headerView addSubview:self.topButton];

    self.imageLabel = [[UILabel alloc] init];
    self.imageLabel.font = [UIFont fontWithName:@"FontAwesome" size:20];
    self.imageLabel.text = self.isSuccess ? @"\U0000f058" : @"\U0000f06a";
    self.imageLabel.textColor = [UIColor colorWithHexString:colorHexStr1];
    [self.headerView addSubview:self.imageLabel];

    self.messageLabel = [[UILabel alloc] init];
    self.messageLabel.numberOfLines = 0;
    self.messageLabel.textAlignment = NSTextAlignmentCenter;
    self.messageLabel.font = [UIFont fontWithName:@"OpenSans" size:14];
    self.messageLabel.textColor = [UIColor colorWithHexString:colorHexStr8];
    self.messageLabel.text = self.isSuccess ? @"请留言服务进行前的邮件或短信提醒" : self.failStr;
    [self.headerView addSubview:self.messageLabel];

    [self.topButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(self.headerView.mas_centerX).offset(6);
        make.bottom.mas_equalTo(self.headerView.mas_centerY).offset(-5);
    }];

    [self.imageLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(self.topButton.mas_left).offset(-6);
        make.centerY.mas_equalTo(self.topButton.mas_centerY);
    }];

    [self.messageLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.headerView.mas_left).offset(8);
        make.right.mas_equalTo(self.headerView.mas_right).offset(-8);
        make.top.mas_equalTo(self.headerView.mas_centerY).offset(5);
    }];

    return self.headerView;
}
- (UILabel *)setLabelConstraint:(NSString *)title {
    UILabel *label = [[UILabel alloc] init];
    label.font = [UIFont fontWithName:@"OpenSans" size:14];
    label.textColor = [UIColor colorWithHexString:colorHexStr10];
    label.text = title;
    return label;
}

- (UIView *)settableViewFooterView {
    self.footerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, TDWidth, 88)];
    self.footerView.backgroundColor = [UIColor colorWithHexString:colorHexStr5];

    if (self.isSuccess) {
        self.moreOrderButton = [self setButton:@"继续预约"];
        [self.moreOrderButton addTarget:self action:@selector(moreOrderButtonAction:) forControlEvents:UIControlEventTouchUpInside];
        [self.footerView addSubview:self.moreOrderButton];

        [self.moreOrderButton mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(self.footerView.mas_left).offset(18);
            make.right.mas_equalTo(self.footerView.mas_right).offset(-18);
            make.centerY.mas_equalTo(self.footerView.mas_centerY);
            make.height.mas_equalTo(42);
        }];

    } else {
        self.moreOrderButton = [self setButton:@"重新预约"];
        [self.moreOrderButton addTarget:self action:@selector(moreOrderButtonAction:) forControlEvents:UIControlEventTouchUpInside];
        [self.footerView addSubview:self.moreOrderButton];

        [self.moreOrderButton mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(self.footerView.mas_left).offset(18);
            make.centerY.mas_equalTo(self.footerView.mas_centerY);
            make.size.mas_equalTo(CGSizeMake((TDWidth - 58) / 2, 39));
        }];

        self.rechargeButton = [self setButton:self.failType == 402 ? @"加入课程" : @"充值"];
        [self.rechargeButton addTarget:self action:@selector(rechargeButtonAction:) forControlEvents:UIControlEventTouchUpInside];
        [self.footerView addSubview:self.rechargeButton];

        [self.rechargeButton mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.mas_equalTo(self.footerView.mas_right).offset(-18);
            make.centerY.mas_equalTo(self.footerView.mas_centerY);
            make.size.mas_equalTo(CGSizeMake((TDWidth - 58) / 2, 39));
        }];
    }

    return self.footerView;
}

- (UIButton *)setButton:(NSString *)title {

    UIButton *button = [[UIButton alloc] init];
    button.backgroundColor = [UIColor colorWithHexString:colorHexStr1];
    button.layer.cornerRadius = 4.0;
    button.titleLabel.font = [UIFont fontWithName:@"OpenSans" size:16];
    [button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [button setTitle:title forState:UIControlStateNormal];
    return button;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end


text:
<?php

namespace BrainExe\Core\EventDispatcher\Events;

use BrainExe\Core\EventDispatcher\AbstractEvent;
use BrainExe\Core\EventDispatcher\PushViaWebsocket;
use BrainExe\Core\Traits\JsonSerializableTrait;

class ClearCacheEvent extends AbstractEvent implements PushViaWebsocket
{
    use JsonSerializableTrait;

    const NAME = 'cache.clear';

    public function __construct()
    {
        parent::__construct(self::NAME);
    }
}


text:
import math
from textwrap import dedent
from kivy3dgui.node import Node
from kivy.lang import Builder
from textwrap import dedent
from kivy.properties import ObjectProperty, ListProperty

MAX_QUEUE = 20

class Command:
    obj = None
    def __init__(self, *args):
        pass
    def restore(self):
        pass

class Move(Command):
    obj = None
    pos = [0, 0, 0]

    def __init__(self, *args):
        self.obj = args[0]
        self.pos = args[1]

    def restore(self):
        self.obj.translate = self.pos[:]

class Rotate(Command):
    obj = None
    rot = [0, 0, 0]

    def __init__(self, *args):
        self.obj = args[0]
        self.rot = args[1]

    def restore(self):
        self.obj.pitch = self.rot[0]
        self.obj.yaw = self.rot[1]
        self.obj.roll = self.rot[2]

class Scale(Command):
    obj = None
    scale = [0.01, 0.01, 0.01]

    def __init__(self, *args):
        self.obj = args[0]
        self.scale = args[1]

    def restore(self):
        self.obj.scale = self.scale[:]

class Create(Command):
    obj = None
    layout = None

    def __init__(self, *args):
        self.obj = args[0]
        self.layout = args[1]

    def restore(self):
        self.layout.remove_widget(self.obj)

class Remove(Command):
    obj = None
    c_dict = None
    layout = None
    callback = None

    def __init__(self, *args):
        self.obj = args[0]
        self.c_dict = {
            "translate": args[0].translate,
            "rotate": args[0].rotate,
            "pitch": args[0].pitch,
            "yaw": args[0].yaw,
            "roll": args[0].roll,
            "scale": args[0].scale,
            "meshes": args[0].meshes,
            "anims": args[0]._anims,
            "effect": args[0].effect,
            "current_anim_index": args[0].current_anim_index,
            "axis_type": args[0].axis_type,
            "light_intensity": args[0].light_intensity,
            "normal_map": args[0].normal_map,
            "alpha": args[0].alpha,
            "shadows_bias": args[0].shadows_bias
        }
        self.layout = args[1]
        self.callback = args[2]

    def restore(self, *args):

        node = Node(**self.c_dict)
        float = dedent("""
                FloatLayout:
                    Button:
                        size_hint: (1., 1.)
                        id: a_button""")
        selector = Builder.load_string(float)
        node.add_widget( selector )
        for e in args[0][:-1]:
            if e.obj == self.obj:
                e.obj = node
        self.callback(node, node.translate, node.scale, selector.ids.a_button, [node.pitch, node.yaw, node.roll])
        #self.layout.add_widget(node)

class EditorManager:
    commands = []
    editor = None
    def __init__(self, editor):
        self.editor = editor
        self.commands = []
        pass

    def add_command(self, command):
        self.commands.append(command)

    def restore(self):
        if self.commands:

            self.editor.space_editor.node_helper.current_mesh = None
            self.editor.space_editor.node_helper.move_to([100000, 100000, 100000])
            if isinstance(self.commands[-1], Remove):
                self.commands[-1].restore(self.commands)
            else:
                self.commands[-1].restore()
            if len(self.commands) == 1:
                self.commands = []
            else:
                self.commands = self.commands[0: -1]

            #print(self.commands)


text:
#ifndef test_nodegetownerdocumentnull
#define test_nodegetownerdocumentnull

/**
 *     The "getOwnerDocument()" method returns null if the target
 *     node itself is a document.
* @author NIST
* @author Mary Brady
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#node-ownerDoc
*/

template<class string_type, class string_adaptor>
class nodegetownerdocumentnull : public DOMTestCase<string_type, string_adaptor>
{
    typedef DOMTestCase<string_type, string_adaptor> baseT;
   public:
     nodegetownerdocumentnull(std::string name) : baseT(name)
     {

       //   check if loaded documents are supported for content type
       const std::string contentType = baseT::getContentType();
    baseT::preload(contentType, "staff", false);
    }

  typedef typename Arabica::DOM::DOMImplementation<string_type, string_adaptor>  DOMImplementation;
  typedef typename Arabica::DOM::Document<string_type, string_adaptor> Document;
  typedef typename Arabica::DOM::DocumentType<string_type, string_adaptor> DocumentType;
  typedef typename Arabica::DOM::DocumentFragment<string_type, string_adaptor> DocumentFragment;
  typedef typename Arabica::DOM::Node<string_type, string_adaptor> Node;
  typedef typename Arabica::DOM::Element<string_type, string_adaptor> Element;
  typedef typename Arabica::DOM::Attr<string_type, string_adaptor> Attr;
  typedef typename Arabica::DOM::NodeList<string_type, string_adaptor> NodeList;
  typedef typename Arabica::DOM::NamedNodeMap<string_type, string_adaptor> NamedNodeMap;
  typedef typename Arabica::DOM::Entity<string_type, string_adaptor> Entity;
  typedef typename Arabica::DOM::EntityReference<string_type, string_adaptor> EntityReference;
  typedef typename Arabica::DOM::CharacterData<string_type, string_adaptor> CharacterData;
  typedef typename Arabica::DOM::CDATASection<string_type, string_adaptor> CDATASection;
  typedef typename Arabica::DOM::Text<string_type, string_adaptor> Text;
  typedef typename Arabica::DOM::Comment<string_type, string_adaptor> Comment;
  typedef typename Arabica::DOM::ProcessingInstruction<string_type, string_adaptor> ProcessingInstruction;
  typedef typename Arabica::DOM::Notation<string_type, string_adaptor> Notation;

  typedef typename Arabica::DOM::DOMException DOMException;
  typedef string_type String;
  typedef string_adaptor SA;
  typedef bool boolean;

   /*
    * Runs the test case.
    */
   void runTest()
   {
      Document doc;
      Document ownerDocument;
      doc = (Document) baseT::load("staff", false);
      ownerDocument = doc.getOwnerDocument();
      baseT::assertNull(ownerDocument, __LINE__, __FILE__);

   }

   /*
    *  Gets URI that identifies the test.
    */
   std::string getTargetURI() const
   {
      return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/nodegetownerdocumentnull";
   }
};

#endif


text:
package daemon

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"net/http"

	"github.com/go-openapi/runtime"

	"github.com/cilium/cilium/api/v1/models"
)

// GetConfigOKCode is the HTTP code returned for type GetConfigOK
const GetConfigOKCode int = 200

/*GetConfigOK Success

swagger:response getConfigOK
*/
type GetConfigOK struct {

	/*
	  In: Body
	*/
	Payload *models.DaemonConfigurationResponse `json:"body,omitempty"`
}

// NewGetConfigOK creates GetConfigOK with default headers values
func NewGetConfigOK() *GetConfigOK {
	return &GetConfigOK{}
}

// WithPayload adds the payload to the get config o k response
func (o *GetConfigOK) WithPayload(payload *models.DaemonConfigurationResponse) *GetConfigOK {
	o.Payload = payload
	return o
}

// SetPayload sets the payload to the get config o k response
func (o *GetConfigOK) SetPayload(payload *models.DaemonConfigurationResponse) {
	o.Payload = payload
}

// WriteResponse to the client
func (o *GetConfigOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {

	rw.WriteHeader(200)
	if o.Payload != nil {
		payload := o.Payload
		if err := producer.Produce(rw, payload); err != nil {
			panic(err) // let the recovery middleware deal with this
		}
	}
}