text:
package gnu.java.text;

import java.text.AttributedCharacterIterator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.Vector;

/**
 * This class should not be put public and it is only intended to the
 * classes of the java.text package. Its aim is to build a segmented
 * character iterator by appending strings and adding attributes to
 * portions of strings. The code intends to do some optimization
 * concerning memory consumption and attribute access but at the
 * end it is only an AttributedCharacterIterator.
 *
 * @author Guilhem Lavaux <guilhem@kaffe.org>
 * @date November 22, 2003
 */
public class FormatCharacterIterator implements AttributedCharacterIterator
{
  private String formattedString;
  private int charIndex;
  private int attributeIndex;
  private int[] ranges;
  private HashMap[] attributes;
  private static final boolean DEBUG = false;

  /**
   * This constructor builds an empty iterated strings. The attributes
   * are empty and so is the string. However you may append strings
   * and attributes to this iterator.
   */
  public FormatCharacterIterator()
  {
    formattedString = "";
    ranges = new int[0];
    attributes = new HashMap[0];
  }

  /**
   * This constructor take a string s, a set of ranges
   * and the corresponding attributes. This is used to build an iterator.
   * The array ranges should be formatted as follow:
   * each element of ranges specifies the index in the string
   * until which the corresponding map of attributes at the same position
   * is applied. For example, if you have:
   *

   *   s = "hello";
   *   ranges = new int[] { 2, 6 };
   *   attributes = new HashMap[2];
   *

   * "he" will have the attributes attributes[0],
   * "llo" the attributes[1].
   */
  public FormatCharacterIterator (String s, int[] ranges, HashMap[] attributes)
  {
    formattedString = s;
    this.ranges = ranges;
    this.attributes = attributes;
  }

  /*
   * The following methods are inherited from AttributedCharacterIterator,
   * and thus are already documented.
   */

  public Set getAllAttributeKeys()
  {
    if (attributes != null && attributes[attributeIndex] != null)
      return attributes[attributeIndex].keySet();
    else
      return new HashSet();
  }

  public Map getAttributes()
  {
    if (attributes != null && attributes[attributeIndex] != null)
      return attributes[attributeIndex];
    else
      return new HashMap();
  }

  public Object getAttribute (AttributedCharacterIterator.Attribute attrib)
  {
    if (attributes != null && attributes[attributeIndex] != null)
      return attributes[attributeIndex].get (attrib);
    else
      return null;
  }

  public int getRunLimit(Set reqAttrs)
  {
    if (attributes == null)
      return formattedString.length();

    int currentAttrIndex = attributeIndex;
    Set newKeys;

    do
      {
	currentAttrIndex++;
	if (currentAttrIndex == attributes.length)
	  return formattedString.length();
	if (attributes[currentAttrIndex] == null)
	  break;
	newKeys = attributes[currentAttrIndex].keySet();
      }
    while (newKeys.containsAll (reqAttrs));

    return ranges[currentAttrIndex-1];
  }

  public int getRunLimit (AttributedCharacterIterator.Attribute attribute)
  {
    Set s = new HashSet();

    s.add (attribute);
    return getRunLimit (s);
  }

  public int getRunLimit()
  {
    if (attributes == null)
      return formattedString.length();
    if (attributes[attributeIndex] == null)
      {
	for (int i=attributeIndex+1;i<attributes.length;i++)
	  if (attributes[i] != null)
	    return ranges[i-1];
	return formattedString.length();
      }

    return getRunLimit (attributes[attributeIndex].keySet());
  }

  public int getRunStart (Set reqAttrs)
  {
    if (attributes == null)
      return formattedString.length();

    int currentAttrIndex = attributeIndex;
    Set newKeys = null;

    do
      {
	if (currentAttrIndex == 0)
	  return 0;

	currentAttrIndex--;
	if (attributes[currentAttrIndex] == null)
	  break;
	newKeys = attributes[currentAttrIndex].keySet();
      }
    while (newKeys.containsAll (reqAttrs));

    return (currentAttrIndex > 0) ? ranges[currentAttrIndex-1] : 0;
  }

  public int getRunStart()
  {
    if (attributes == null)
      return 0;

    if (attributes[attributeIndex] == null)
      {
	for (int i=attributeIndex;i>0;i--)
	  if (attributes[i] != null)
	    return ranges[attributeIndex-1];
	return 0;
      }

    return getRunStart (attributes[attributeIndex].keySet());
  }

  public int getRunStart (AttributedCharacterIterator.Attribute attribute)
  {
    Set s = new HashSet();

    s.add (attribute);
    return getRunStart (s);
  }

  public Object clone()
  {
    return new FormatCharacterIterator (formattedString, ranges, attributes);
  }

  /*
   * The following methods are inherited from CharacterIterator and thus
   * are already documented.
   */

  public char current()
  {
    return formattedString.charAt (charIndex);
  }

  public char first()
  {
    charIndex = 0;
    attributeIndex = 0;
    return formattedString.charAt (0);
  }

  public int getBeginIndex()
  {
    return 0;
  }

  public int getEndIndex()
  {
    return formattedString.length();
  }

  public int getIndex()
  {
    return charIndex;
  }

  public char last()
  {
    charIndex = formattedString.length()-1;
    if (attributes != null)
      attributeIndex = attributes.length-1;
    return formattedString.charAt (charIndex);
  }

  public char next()
  {
    charIndex++;
    if (charIndex >= formattedString.length())
      {
	charIndex = getEndIndex();
	return DONE;
      }
    if (attributes != null)
      {
	if (charIndex >= ranges[attributeIndex])
	  attributeIndex++;
      }
    return formattedString.charAt (charIndex);
  }

  public char previous()
  {
    charIndex--;
    if (charIndex < 0)
      {
	charIndex = 0;
	return DONE;
      }

    if (attributes != null)
      {
	if (charIndex < ranges[attributeIndex])
	  attributeIndex--;
      }
    return formattedString.charAt (charIndex);
  }

  public char setIndex (int position)
  {
    if (position < 0 || position > formattedString.length())
      throw new IllegalArgumentException ("position is out of range");

    charIndex = position;
    if (attributes != null)
      {
	for (attributeIndex=0;attributeIndex<attributes.length;
	     attributeIndex++)
	  if (ranges[attributeIndex] > charIndex)
	    break;
	attributeIndex--;
      }
    if (charIndex == formattedString.length())
      return DONE;
    else
      return formattedString.charAt (charIndex);
  }

  /**
   * This method merge the specified attributes and ranges with the
   * internal tables. This method is in charge of the optimization
   * of tables. Two following sets of attributes are never the same.
   *
   * @see #FormatCharacterIterator()
   *
   * @param attributes the new array attributes to apply to the string.
   */
  public void mergeAttributes (HashMap[] attributes, int[] ranges)
  {
    Vector new_ranges = new Vector();
    Vector new_attributes = new Vector();
    int i = 0, j = 0;

    debug("merging " + attributes.length + " attrs");

    while (i < this.ranges.length && j < ranges.length)
      {
	if (this.attributes[i] != null)
	  {
	    new_attributes.add (this.attributes[i]);
	    if (attributes[j] != null)
	      this.attributes[i].putAll (attributes[j]);
	  }
	else
	  {
	    new_attributes.add (attributes[j]);
	  }
	if (this.ranges[i] == ranges[j])
	  {
	    new_ranges.add (new Integer (ranges[j]));
	    i++;
	    j++;
	  }
	else if (this.ranges[i] < ranges[j])
	  {
	    new_ranges.add (new Integer (this.ranges[i]));
	    i++;
	  }
	else
	  {
	    new_ranges.add (new Integer (ranges[j]));
	    j++;
	  }
     }

    if (i != this.ranges.length)
      {
	for (;i<this.ranges.length;i++)
	  {
	    new_attributes.add (this.attributes[i]);
	    new_ranges.add (new Integer (this.ranges[i]));
	  }
      }
    if (j != ranges.length)
      {
	for (;j<ranges.length;j++)
	  {
	    new_attributes.add (attributes[j]);
	    new_ranges.add (new Integer (ranges[j]));
	  }
      }

    this.attributes = new HashMap[new_attributes.size()];
    this.ranges = new int[new_ranges.size()];
    System.arraycopy (new_attributes.toArray(), 0, this.attributes,
		      0, this.attributes.length);

    for (i=0;i<new_ranges.size();i++)
      {
	this.ranges[i] = ((Integer)new_ranges.elementAt (i)).intValue();
      }

    dumpTable();
  }

  /**
   * This method appends to the internal attributed string the attributed
   * string contained in the specified iterator.
   *
   * @param iterator the iterator which contains the attributed string to
   * append to this iterator.
   */
  public void append (AttributedCharacterIterator iterator)
  {
    char c = iterator.first();
    Vector more_ranges = new Vector();
    Vector more_attributes = new Vector();

    do
      {
	formattedString = formattedString + String.valueOf (c);
	// TODO: Reduce the size of the output array.
	more_attributes.add (iterator.getAttributes());
	more_ranges.add (new Integer (formattedString.length()));
	// END TOOD
	c = iterator.next();
      }
    while (c != DONE);

    HashMap[] new_attributes = new HashMap[attributes.length
					   + more_attributes.size()];
    int[] new_ranges = new int[ranges.length + more_ranges.size()];

    System.arraycopy (attributes, 0, new_attributes, 0, attributes.length);
    System.arraycopy (more_attributes.toArray(), 0, new_attributes,
		      attributes.length, more_attributes.size());

    System.arraycopy (ranges, 0, new_ranges, 0, ranges.length);
    Object[] new_ranges_array = more_ranges.toArray();
    for (int i = 0; i < more_ranges.size();i++)
      new_ranges[i+ranges.length] = ((Integer) new_ranges_array[i]).intValue();

    attributes = new_attributes;
    ranges = new_ranges;
  }

  /**
   * This method appends an attributed string which attributes are specified
   * directly in the calling parameters.
   *
   * @param text The string to append.
   * @param local_attributes The attributes to put on this string in the
   * iterator. If it is null the string will simply have no
   * attributes.
   */
  public void append (String text, HashMap local_attributes)
  {
    int[] new_ranges = new int[ranges.length+1];
    HashMap[] new_attributes = new HashMap[attributes.length+1];

    formattedString += text;
    System.arraycopy (attributes, 0, new_attributes, 0, attributes.length);
    System.arraycopy (ranges, 0, new_ranges, 0, ranges.length);
    new_ranges[ranges.length] = formattedString.length();
    new_attributes[attributes.length] = local_attributes;

    ranges = new_ranges;
    attributes = new_attributes;
  }

  /**
   * This method appends a string without attributes. It is completely
   * equivalent to call {@link #append(String,HashMap)} with local_attributes
   * equal to null.
   *
   * @param text The string to append to the iterator.
   */
  public void append (String text)
  {
    append (text, null);
  }

  /**
   * This method adds a set of attributes to a range of character. The
   * bounds are always inclusive. In the case many attributes have to
   * be added it is advised to directly use {@link #mergeAttributes([Ljava.util.HashMap;[I}
   *
   * @param attributes Attributes to merge into the iterator.
   * @param range_start Lower bound of the range of characters which will receive the
   * attribute.
   * @param range_end Upper bound of the range of characters which will receive the
   * attribute.
   *
   * @throws IllegalArgumentException if ranges are out of bounds.
   */
  public void addAttributes(HashMap attributes, int range_start, int range_end)
  {
    if (range_start == 0)
      mergeAttributes(new HashMap[] { attributes }, new int[] { range_end });
    else
      mergeAttributes(new HashMap[] { null, attributes }, new int[] { range_start, range_end });
  }

  private void debug(String s)
  {
    if (DEBUG)
      System.out.println(s);
  }

  private void dumpTable()
  {
    int start_range = 0;

    if (!DEBUG)
      return;

    System.out.println("Dumping internal table:");
    for (int i = 0; i < ranges.length; i++)
      {
	System.out.print("\t" + start_range + " => " + ranges[i] + ":");
	if (attributes[i] == null)
	  System.out.println("null");
	else
	  {
	    Set keyset = attributes[i].keySet();
	    if (keyset != null)
	      {
		Iterator keys = keyset.iterator();

		while (keys.hasNext())
		  System.out.print(" " + keys.next());
	      }
	    else
	      System.out.println("keySet null");
	    System.out.println();
	  }
      }
    System.out.println();
    System.out.flush();
  }
}


text:
// ==++==
//
//   Copyright (c) Microsoft Corporation.  All rights reserved.
//
// ==--==
/*============================================================
**
** Class:  PropertyToken
**
** <OWNER>[....]</OWNER>
**
**
** Propertybuilder is for client to define properties for a class
**
**
===========================================================*/
namespace System.Reflection.Emit {

    using System;
    using System.Reflection;
    using System.Security.Permissions;

    [Serializable]
    [System.Runtime.InteropServices.ComVisible(true)]
    public struct PropertyToken {

        public static readonly PropertyToken Empty = new PropertyToken();

        internal int m_property;

        internal PropertyToken(int str) {
            m_property=str;
        }

        public int Token {
            get { return m_property; }
        }

        // Satisfy value class requirements
        public override int GetHashCode()
        {
            return m_property;
        }

        // Satisfy value class requirements
        public override bool Equals(Object obj)
        {
            if (obj is PropertyToken)
                return Equals((PropertyToken)obj);
            else
                return false;
        }

        public bool Equals(PropertyToken obj)
        {
            return obj.m_property == m_property;
        }

        public static bool operator ==(PropertyToken a, PropertyToken b)
        {
            return a.Equals(b);
        }

        public static bool operator !=(PropertyToken a, PropertyToken b)
        {
            return !(a == b);
        }

    }

}

redpajama_set_name: RedPajamaGithub


text:
'use strict';

var React = require('react');
var Row = require('./row');
var ms = require('minesweeper');

module.exports = React.createClass({
  render: function () {
    var that = this;

    var getRows = function () {
      return that.props.grid.map(function (row, idx) {
        return (
          <Row key={idx}
               cells={row}
               openCell={that.props.openCell}
               flagCell={that.props.flagCell} />
        );
      });
    };

    return (
      <div className="ms-grid">
        {getRows()}
      </div>
    );
  }
});


text:
"""Rebuild README.rst from README.template.rst."""

import re
from os import sys, path

script_dir = path.dirname(path.abspath(__file__))
if __name__ == "__main__" and __package__ is None:
    sys.path.append(path.dirname(script_dir))

import fslit.docutils4fstar
from codecs import open

README_DIRECTIVES_MARKER = "[DIRECTIVES]"
README_ROLES_MARKER = "[ROLES]"

FIRST_LINE_BLANKS = re.compile("^(.*)\n *\n")
def format_docstring(template, key, obj):
    docstring = obj.__doc__.strip()
    return template.format(key, FIRST_LINE_BLANKS.sub(r"\1\n", docstring))

def regen_readme():
    roles_docs = [format_docstring("``:{}:`` {}", r.role, r)
                  for r in fslit.docutils4fstar.ROLES]
    directives_docs = [format_docstring("``.. {}::`` {}", d.directive, d)
                       for d in fslit.docutils4fstar.DIRECTIVES]
    with open(path.join(script_dir, "README.template.rst"), encoding="utf-8") as readme:
        contents = readme.read()
    with open(path.join(script_dir, "README.rst"), mode="w", encoding="utf-8") as readme:
        readme.write(contents
                     .replace(README_ROLES_MARKER, "\n\n".join(roles_docs))
                     .replace(README_DIRECTIVES_MARKER, "\n\n".join(directives_docs)))

if __name__ == '__main__':
    regen_readme()


text:
package org.wso2.carbon.esb.proxyservice.test.loggingProxy;

import org.apache.axiom.om.OMElement;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException;
import org.wso2.esb.integration.common.clients.registry.ResourceAdminServiceClient;
import org.wso2.esb.integration.common.utils.ESBIntegrationTest;

import javax.activation.DataHandler;
import javax.xml.namespace.QName;
import javax.xml.xpath.XPathExpressionException;
import java.net.URL;
import java.rmi.RemoteException;

import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull;

public class PickEndPointFromRegistryTestCase extends ESBIntegrationTest {
    @BeforeClass(alwaysRun = true)
    public void setEnvironment() throws Exception {
        log.info("Initializing environment");
        super.init();
        log.info("Uploading registry resources");
        uploadResourcesToConfigRegistry();
        log.info("Loading ESB configuration from classpath");
        loadESBConfigurationFromClasspath(
                "/artifacts/ESB/proxyconfig/proxy/loggingProxy/pick_end_point_from_registry.xml");
        log.info("Assert isProxyDeployed");
        isProxyDeployed("pickEndpointFromRegLoggingProxy");
        log.info("Initializing environment completed");
    }

    @Test(groups = "wso2.esb", description = "- Logging proxy" +
                                             "- Create a proxy service and pick the endpoint from registry (config)")
    public void testLoggingProxy() throws Exception {

        OMElement response = axis2Client.sendSimpleStockQuoteRequest(getProxyServiceURLHttp("pickEndpointFromRegLoggingProxy"), null, "WSO2");

        String lastPrice = response.getFirstElement().getFirstChildWithName(new QName("http://services.samples/xsd", "last"))
                .getText();
        assertNotNull(lastPrice, "Fault: response message 'last' price null");

        String symbol = response.getFirstElement().getFirstChildWithName(new QName("http://services.samples/xsd", "symbol"))
                .getText();
        assertEquals(symbol, "WSO2", "Fault: value 'symbol' mismatched");

    }

    @Test(groups = "wso2.esb", description = "- Logging proxy" +
                                             "- Create a proxy service and pick the endpoint from registry (config) -" +
                                             " Log", enabled = false)
    public void testLoggingProxyLogging() throws Exception {
        //ToDo Assert Logs
    }

    @AfterClass(alwaysRun = true)
    public void destroy() throws Exception {
        clearUploadedResource();
        super.cleanup();
    }

    private void uploadResourcesToConfigRegistry() throws Exception {

        ResourceAdminServiceClient resourceAdminServiceStub =
                new ResourceAdminServiceClient(context.getContextUrls().getBackEndUrl(), getSessionCookie());

        resourceAdminServiceStub.deleteResource("/_system/config/proxy");
        resourceAdminServiceStub.addCollection("/_system/config/", "proxy", "",
                                               "Contains test proxy tests files");

        resourceAdminServiceStub.addResource(
                "/_system/config/proxy/registry_endpoint.xml", "application/xml", "xml files",
                setEndpoints(new DataHandler(new URL("file:///" + getESBResourceLocation() +
                                                     "/proxyconfig/proxy/utils/registry_endpoint.xml"))));

    }

    private void clearUploadedResource()
            throws InterruptedException, ResourceAdminServiceExceptionException, RemoteException, XPathExpressionException {

        ResourceAdminServiceClient resourceAdminServiceStub =
                new ResourceAdminServiceClient(context.getContextUrls().getBackEndUrl(), getSessionCookie());

        resourceAdminServiceStub.deleteResource("/_system/config/proxy");

    }
}


text:
var assert = exports

assert.isTrue = function(assertion, message) {
    if (assertion !== true) {
        message = message ? " : " + message : ""
        throw new AssertionError("Expected true, actually '" + assertion + "'" + message)
    }
}

assert.isEqual = function(expected, actual, message) {
    if (expected !== actual) {
        message = message ? " : " + message : ""
        throw new AssertionError("Expected '" + expected + "', actually '" + actual + "'" + message)
    }
}

assert.throwsError = function(block, type, message) {
    var threw     = false
    var exception = null

    try {
        block()
    }
    catch (e) {
        threw     = true
        exception = e
    }

    message = message ? " : " + message : ""

    if (!threw) {
        throw new AssertionError("Expected exception" + message)
    }

    if (type !== undefined && !(exception instanceof type)) {
        throw new AssertionError("Expected exception type '" + type + "', actually '" + exception + "'" + message)
    }
}

assert.AssertionError = function(message) {
    this.name    = "AssertionError"
    this.message = message
}

assert.AssertionError.prototype = new Error()

var AssertionError = assert.AssertionError


text:
export default function setRef(ref, value) {
  if (typeof ref === 'function') {
    ref(value);
  } else if (ref) {
    ref.current = value;
  }
}


text:
#include <common.h>
#include <usb.h>
#include <asm/io.h>

#include "ehci.h"

/*
 * Create the appropriate control structures to manage
 * a new EHCI host controller.
 */
int ehci_hcd_init(int index, enum usb_init_type init,
		struct ehci_hccr **hccr, struct ehci_hcor **hcor)
{
	*hccr = (struct ehci_hccr *)(CONFIG_SYS_PPC4XX_USB_ADDR);
	*hcor = (struct ehci_hcor *)((uint32_t) *hccr +
		HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase)));
	return 0;
}

/*
 * Destroy the appropriate control structures corresponding
 * the the EHCI host controller.
 */
int ehci_hcd_stop(int index)
{
	return 0;
}


text:
template<typename T>
static T* npc(T* t)
{
    if(!t) throw new ::java::lang::NullPointerException();
    return t;
}

poi::hssf::record::pivottable::StreamIDRecord::StreamIDRecord(const ::default_init_tag&)
    : super(*static_cast< ::default_init_tag* >(0))
{
    clinit();
}

poi::hssf::record::pivottable::StreamIDRecord::StreamIDRecord(::poi::hssf::record::RecordInputStream* in)
    : StreamIDRecord(*static_cast< ::default_init_tag* >(0))
{
    ctor(in);
}

constexpr int16_t poi::hssf::record::pivottable::StreamIDRecord::sid;

void poi::hssf::record::pivottable::StreamIDRecord::ctor(::poi::hssf::record::RecordInputStream* in)
{
    super::ctor();
    idstm = npc(in)->readShort();
}

void poi::hssf::record::pivottable::StreamIDRecord::serialize(::poi::util::LittleEndianOutput* out)
{
    npc(out)->writeShort(idstm);
}

int32_t poi::hssf::record::pivottable::StreamIDRecord::getDataSize()
{
    return 2;
}

int16_t poi::hssf::record::pivottable::StreamIDRecord::getSid()
{
    return sid;
}

java::lang::String* poi::hssf::record::pivottable::StreamIDRecord::toString()
{
    auto buffer = new ::java::lang::StringBuffer();
    npc(buffer)->append(u"[SXIDSTM]\n"_j);
    npc(npc(npc(buffer)->append(u"    .idstm      ="_j))->append(::poi::util::HexDump::shortToHex(idstm)))->append(u'\u000a');
    npc(buffer)->append(u"[/SXIDSTM]\n"_j);
    return npc(buffer)->toString();
}

extern java::lang::Class *class_(const char16_t *c, int n);

java::lang::Class* poi::hssf::record::pivottable::StreamIDRecord::class_()
{
    static ::java::lang::Class* c = ::class_(u"org.apache.poi.hssf.record.pivottable.StreamIDRecord", 52);
    return c;
}

int32_t poi::hssf::record::pivottable::StreamIDRecord::serialize(int32_t offset, ::int8_tArray* data)
{
    return super::serialize(offset, data);
}

int8_tArray* poi::hssf::record::pivottable::StreamIDRecord::serialize()
{
    return super::serialize();
}

java::lang::Class* poi::hssf::record::pivottable::StreamIDRecord::getClass0()
{
    return class_();
}


text:
/***************************************************************************/
/*                                                                         */
/*  t1gload.c                                                              */
/*                                                                         */
/*    Type 1 Glyph Loader (body).                                          */
/*                                                                         */
/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2008 by             */
/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
/*                                                                         */
/*  This file is part of the FreeType project, and may only be used,       */
/*  modified, and distributed under the terms of the FreeType project      */
/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
/*  this file you indicate that you have read the license and              */
/*  understand and accept it fully.                                        */
/*                                                                         */
/***************************************************************************/

#include <ft2build.h>
#include "t1gload.h"
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
#include FT_OUTLINE_H
#include FT_INTERNAL_POSTSCRIPT_AUX_H

#include "t1errors.h"

  /*************************************************************************/
  /*                                                                       */
  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */
  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */
  /* messages during execution.                                            */
  /*                                                                       */
#undef  FT_COMPONENT
#define FT_COMPONENT  trace_t1gload

  /*************************************************************************/
  /*************************************************************************/
  /*************************************************************************/
  /**********                                                      *********/
  /**********            COMPUTE THE MAXIMUM ADVANCE WIDTH         *********/
  /**********                                                      *********/
  /**********    The following code is in charge of computing      *********/
  /**********    the maximum advance width of the font.  It        *********/
  /**********    quickly processes each glyph charstring to        *********/
  /**********    extract the value from either a `sbw' or `seac'   *********/
  /**********    operator.                                         *********/
  /**********                                                      *********/
  /*************************************************************************/
  /*************************************************************************/
  /*************************************************************************/

  FT_LOCAL_DEF( FT_Error )
  T1_Parse_Glyph_And_Get_Char_String( T1_Decoder  decoder,
                                      FT_UInt     glyph_index,
                                      FT_Data*    char_string )
  {
    T1_Face   face  = (T1_Face)decoder->builder.face;
    T1_Font   type1 = &face->type1;
    FT_Error  error = T1_Err_Ok;

    decoder->font_matrix = type1->font_matrix;
    decoder->font_offset = type1->font_offset;

#ifdef FT_CONFIG_OPTION_INCREMENTAL

    /* For incremental fonts get the character data using the */
    /* callback function.                                     */
    if ( face->root.internal->incremental_interface )
      error = face->root.internal->incremental_interface->funcs->get_glyph_data(
                face->root.internal->incremental_interface->object,
                glyph_index, char_string );
    else

#endif /* FT_CONFIG_OPTION_INCREMENTAL */

    /* For ordinary fonts get the character data stored in the face record. */
    {
      char_string->pointer = type1->charstrings[glyph_index];
      char_string->length  = (FT_Int)type1->charstrings_len[glyph_index];
    }

    if ( !error )
      error = decoder->funcs.parse_charstrings(
                decoder, (FT_Byte*)char_string->pointer,
                char_string->length );

#ifdef FT_CONFIG_OPTION_INCREMENTAL

    /* Incremental fonts can optionally override the metrics. */
    if ( !error && face->root.internal->incremental_interface                 &&
         face->root.internal->incremental_interface->funcs->get_glyph_metrics )
    {
      FT_Incremental_MetricsRec  metrics;

      metrics.bearing_x = decoder->builder.left_bearing.x;
      metrics.bearing_y = decoder->builder.left_bearing.y;
      metrics.advance   = decoder->builder.advance.x;
      error = face->root.internal->incremental_interface->funcs->get_glyph_metrics(
                face->root.internal->incremental_interface->object,
                glyph_index, FALSE, &metrics );
      decoder->builder.left_bearing.x = metrics.bearing_x;
      decoder->builder.left_bearing.y = metrics.bearing_y;
      decoder->builder.advance.x      = metrics.advance;
      decoder->builder.advance.y      = 0;
    }

#endif /* FT_CONFIG_OPTION_INCREMENTAL */

    return error;
  }

  FT_CALLBACK_DEF( FT_Error )
  T1_Parse_Glyph( T1_Decoder  decoder,
                  FT_UInt     glyph_index )
  {
    FT_Data   glyph_data;
    FT_Error  error = T1_Parse_Glyph_And_Get_Char_String(
                        decoder, glyph_index, &glyph_data );

#ifdef FT_CONFIG_OPTION_INCREMENTAL

    if ( !error )
    {
      T1_Face  face = (T1_Face)decoder->builder.face;

      if ( face->root.internal->incremental_interface )
        face->root.internal->incremental_interface->funcs->free_glyph_data(
          face->root.internal->incremental_interface->object,
          &glyph_data );
    }

#endif /* FT_CONFIG_OPTION_INCREMENTAL */

    return error;
  }

  FT_LOCAL_DEF( FT_Error )
  T1_Compute_Max_Advance( T1_Face  face,
                          FT_Pos*  max_advance )
  {
    FT_Error       error;
    T1_DecoderRec  decoder;
    FT_Int         glyph_index;
    T1_Font        type1 = &face->type1;
    PSAux_Service  psaux = (PSAux_Service)face->psaux;

    FT_ASSERT( ( face->len_buildchar == 0 ) == ( face->buildchar == NULL ) );

    *max_advance = 0;

    /* initialize load decoder */
    error = psaux->t1_decoder_funcs->init( &decoder,
                                           (FT_Face)face,
                                           0, /* size       */
                                           0, /* glyph slot */
                                           (FT_Byte**)type1->glyph_names,
                                           face->blend,
                                           0,
                                           FT_RENDER_MODE_NORMAL,
                                           T1_Parse_Glyph );
    if ( error )
      return error;

    decoder.builder.metrics_only = 1;
    decoder.builder.load_points  = 0;

    decoder.num_subrs     = type1->num_subrs;
    decoder.subrs         = type1->subrs;
    decoder.subrs_len     = type1->subrs_len;

    decoder.buildchar     = face->buildchar;
    decoder.len_buildchar = face->len_buildchar;

    *max_advance = 0;

    /* for each glyph, parse the glyph charstring and extract */
    /* the advance width                                      */
    for ( glyph_index = 0; glyph_index < type1->num_glyphs; glyph_index++ )
    {
      /* now get load the unscaled outline */
      error = T1_Parse_Glyph( &decoder, glyph_index );
      if ( glyph_index == 0 || decoder.builder.advance.x > *max_advance )
        *max_advance = decoder.builder.advance.x;

      /* ignore the error if one occurred - skip to next glyph */
    }

    psaux->t1_decoder_funcs->done( &decoder );

    return T1_Err_Ok;
  }

  FT_LOCAL_DEF( FT_Error )
  T1_Get_Advances( T1_Face    face,
                   FT_UInt    first,
                   FT_UInt    count,
                   FT_ULong   load_flags,
                   FT_Fixed*  advances )
  {
    T1_DecoderRec  decoder;
    T1_Font        type1 = &face->type1;
    PSAux_Service  psaux = (PSAux_Service)face->psaux;
    FT_UInt        nn;
    FT_Error       error;

    FT_UNUSED( load_flags );

    if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )
    {
      for ( nn = 0; nn < count; nn++ )
        advances[nn] = 0;

      return T1_Err_Ok;
    }

    error = psaux->t1_decoder_funcs->init( &decoder,
                                           (FT_Face)face,
                                           0, /* size       */
                                           0, /* glyph slot */
                                           (FT_Byte**)type1->glyph_names,
                                           face->blend,
                                           0,
                                           FT_RENDER_MODE_NORMAL,
                                           T1_Parse_Glyph );
    if ( error )
      return error;

    decoder.builder.metrics_only = 1;
    decoder.builder.load_points  = 0;

    decoder.num_subrs = type1->num_subrs;
    decoder.subrs     = type1->subrs;
    decoder.subrs_len = type1->subrs_len;

    decoder.buildchar     = face->buildchar;
    decoder.len_buildchar = face->len_buildchar;

    for ( nn = 0; nn < count; nn++ )
    {
      error = T1_Parse_Glyph( &decoder, first + nn );
      if ( !error )
        advances[nn] = decoder.builder.advance.x;
      else
        advances[nn] = 0;
    }

    return T1_Err_Ok;
  }

  FT_LOCAL_DEF( FT_Error )
  T1_Load_Glyph( T1_GlyphSlot  glyph,
                 T1_Size       size,
                 FT_UInt       glyph_index,
                 FT_Int32      load_flags )
  {
    FT_Error                error;
    T1_DecoderRec           decoder;
    T1_Face                 face = (T1_Face)glyph->root.face;
    FT_Bool                 hinting;
    T1_Font                 type1         = &face->type1;
    PSAux_Service           psaux         = (PSAux_Service)face->psaux;
    const T1_Decoder_Funcs  decoder_funcs = psaux->t1_decoder_funcs;

    FT_Matrix               font_matrix;
    FT_Vector               font_offset;
    FT_Data                 glyph_data;
    FT_Bool                 must_finish_decoder = FALSE;
#ifdef FT_CONFIG_OPTION_INCREMENTAL
    FT_Bool                 glyph_data_loaded = 0;
#endif

    if ( glyph_index >= (FT_UInt)face->root.num_glyphs )
    {
      error = T1_Err_Invalid_Argument;
      goto Exit;
    }

    FT_ASSERT( ( face->len_buildchar == 0 ) == ( face->buildchar == NULL ) );

    if ( load_flags & FT_LOAD_NO_RECURSE )
      load_flags |= FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING;

    glyph->x_scale = size->root.metrics.x_scale;
    glyph->y_scale = size->root.metrics.y_scale;

    glyph->root.outline.n_points   = 0;
    glyph->root.outline.n_contours = 0;

    hinting = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE   ) == 0 &&
                       ( load_flags & FT_LOAD_NO_HINTING ) == 0 );

    glyph->root.format = FT_GLYPH_FORMAT_OUTLINE;

    error = decoder_funcs->init( &decoder,
                                 (FT_Face)face,
                                 (FT_Size)size,
                                 (FT_GlyphSlot)glyph,
                                 (FT_Byte**)type1->glyph_names,
                                 face->blend,
                                 FT_BOOL( hinting ),
                                 FT_LOAD_TARGET_MODE( load_flags ),
                                 T1_Parse_Glyph );
    if ( error )
      goto Exit;

    must_finish_decoder = TRUE;

    decoder.builder.no_recurse = FT_BOOL(
                                   ( load_flags & FT_LOAD_NO_RECURSE ) != 0 );

    decoder.num_subrs     = type1->num_subrs;
    decoder.subrs         = type1->subrs;
    decoder.subrs_len     = type1->subrs_len;

    decoder.buildchar     = face->buildchar;
    decoder.len_buildchar = face->len_buildchar;

    /* now load the unscaled outline */
    error = T1_Parse_Glyph_And_Get_Char_String( &decoder, glyph_index,
                                                &glyph_data );
    if ( error )
      goto Exit;
#ifdef FT_CONFIG_OPTION_INCREMENTAL
    glyph_data_loaded = 1;
#endif

    font_matrix = decoder.font_matrix;
    font_offset = decoder.font_offset;

    /* save new glyph tables */
    decoder_funcs->done( &decoder );

    must_finish_decoder = FALSE;

    /* now, set the metrics -- this is rather simple, as   */
    /* the left side bearing is the xMin, and the top side */
    /* bearing the yMax                                    */
    if ( !error )
    {
      glyph->root.outline.flags &= FT_OUTLINE_OWNER;
      glyph->root.outline.flags |= FT_OUTLINE_REVERSE_FILL;

      /* for composite glyphs, return only left side bearing and */
      /* advance width                                           */
      if ( load_flags & FT_LOAD_NO_RECURSE )
      {
        FT_Slot_Internal  internal = glyph->root.internal;

        glyph->root.metrics.horiBearingX = decoder.builder.left_bearing.x;
        glyph->root.metrics.horiAdvance  = decoder.builder.advance.x;
        internal->glyph_matrix           = font_matrix;
        internal->glyph_delta            = font_offset;
        internal->glyph_transformed      = 1;
      }
      else
      {
        FT_BBox            cbox;
        FT_Glyph_Metrics*  metrics = &glyph->root.metrics;
        FT_Vector          advance;

        /* copy the _unscaled_ advance width */
        metrics->horiAdvance                    = decoder.builder.advance.x;
        glyph->root.linearHoriAdvance           = decoder.builder.advance.x;
        glyph->root.internal->glyph_transformed = 0;

        /* make up vertical ones */
        metrics->vertAdvance = ( face->type1.font_bbox.yMax -
                                 face->type1.font_bbox.yMin ) >> 16;
        glyph->root.linearVertAdvance = metrics->vertAdvance;

        glyph->root.format = FT_GLYPH_FORMAT_OUTLINE;

        if ( size && size->root.metrics.y_ppem < 24 )
          glyph->root.outline.flags |= FT_OUTLINE_HIGH_PRECISION;

#if 1
        /* apply the font matrix, if any */
        if ( font_matrix.xx != 0x10000L || font_matrix.yy != font_matrix.xx ||
             font_matrix.xy != 0        || font_matrix.yx != 0              )
          FT_Outline_Transform( &glyph->root.outline, &font_matrix );

        if ( font_offset.x || font_offset.y )
          FT_Outline_Translate( &glyph->root.outline,
                                font_offset.x,
                                font_offset.y );

        advance.x = metrics->horiAdvance;
        advance.y = 0;
        FT_Vector_Transform( &advance, &font_matrix );
        metrics->horiAdvance = advance.x + font_offset.x;
        advance.x = 0;
        advance.y = metrics->vertAdvance;
        FT_Vector_Transform( &advance, &font_matrix );
        metrics->vertAdvance = advance.y + font_offset.y;
#endif

        if ( ( load_flags & FT_LOAD_NO_SCALE ) == 0 )
        {
          /* scale the outline and the metrics */
          FT_Int       n;
          FT_Outline*  cur = decoder.builder.base;
          FT_Vector*   vec = cur->points;
          FT_Fixed     x_scale = glyph->x_scale;
          FT_Fixed     y_scale = glyph->y_scale;

          /* First of all, scale the points, if we are not hinting */
          if ( !hinting || ! decoder.builder.hints_funcs )
            for ( n = cur->n_points; n > 0; n--, vec++ )
            {
              vec->x = FT_MulFix( vec->x, x_scale );
              vec->y = FT_MulFix( vec->y, y_scale );
            }

          /* Then scale the metrics */
          metrics->horiAdvance  = FT_MulFix( metrics->horiAdvance,  x_scale );
          metrics->vertAdvance  = FT_MulFix( metrics->vertAdvance,  y_scale );
        }

        /* compute the other metrics */
        FT_Outline_Get_CBox( &glyph->root.outline, &cbox );

        metrics->width  = cbox.xMax - cbox.xMin;
        metrics->height = cbox.yMax - cbox.yMin;

        metrics->horiBearingX = cbox.xMin;
        metrics->horiBearingY = cbox.yMax;

        /* make up vertical ones */
        ft_synthesize_vertical_metrics( metrics,
                                        metrics->vertAdvance );
      }

      /* Set control data to the glyph charstrings.  Note that this is */
      /* _not_ zero-terminated.                                        */
      glyph->root.control_data = (FT_Byte*)glyph_data.pointer;
      glyph->root.control_len  = glyph_data.length;
    }

  Exit:

#ifdef FT_CONFIG_OPTION_INCREMENTAL
    if ( glyph_data_loaded && face->root.internal->incremental_interface )
    {
      face->root.internal->incremental_interface->funcs->free_glyph_data(
        face->root.internal->incremental_interface->object,
        &glyph_data );

      /* Set the control data to null - it is no longer available if   */
      /* loaded incrementally.                                         */
      glyph->root.control_data = 0;
      glyph->root.control_len  = 0;
    }
#endif

    if ( must_finish_decoder )
      decoder_funcs->done( &decoder );

    return error;
  }

/* END */


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.Security.Cryptography.Asn1;
using Xunit;

namespace System.Security.Cryptography.Tests.Asn1
{
    public class WriteOctetString : Asn1WriterTests
    {
        [Theory]
        [InlineData(PublicEncodingRules.BER)]
        [InlineData(PublicEncodingRules.CER)]
        [InlineData(PublicEncodingRules.DER)]
        public void WriteEmpty(PublicEncodingRules ruleSet)
        {
            using (AsnWriter writer = new AsnWriter((AsnEncodingRules)ruleSet))
            {
                writer.WriteOctetString(ReadOnlySpan<byte>.Empty);

                Verify(writer, "0400");
            }
        }

        [Theory]
        [InlineData(PublicEncodingRules.BER, 1, "0401")]
        [InlineData(PublicEncodingRules.CER, 2, "0402")]
        [InlineData(PublicEncodingRules.DER, 3, "0403")]
        [InlineData(PublicEncodingRules.BER, 126, "047E")]
        [InlineData(PublicEncodingRules.CER, 127, "047F")]
        [InlineData(PublicEncodingRules.DER, 128, "048180")]
        [InlineData(PublicEncodingRules.BER, 1000, "048203E8")]
        [InlineData(PublicEncodingRules.CER, 1000, "048203E8")]
        [InlineData(PublicEncodingRules.DER, 1000, "048203E8")]
        [InlineData(PublicEncodingRules.BER, 1001, "048203E9")]
        [InlineData(PublicEncodingRules.DER, 1001, "048203E9")]
        [InlineData(PublicEncodingRules.BER, 2001, "048207D1")]
        [InlineData(PublicEncodingRules.DER, 2001, "048207D1")]
        public void WritePrimitive(PublicEncodingRules ruleSet, int length, string hexStart)
        {
            string payloadHex = new string('0', 2 * length);
            string expectedHex = hexStart + payloadHex;
            byte[] data = new byte[length];

            using (AsnWriter writer = new AsnWriter((AsnEncodingRules)ruleSet))
            {
                writer.WriteOctetString(data);

                Verify(writer, expectedHex);
            }
        }

        [Theory]
        [InlineData(1001, "2480048203E8", "0401")]
        [InlineData(1999, "2480048203E8", "048203E7")]
        [InlineData(2000, "2480048203E8", "048203E8")]
        public void WriteSegmentedCER(int length, string hexStart, string hexStart2)
        {
            string payload1Hex = new string('8', 2000);
            string payload2Hex = new string('8', (length - 1000) * 2);
            string expectedHex = hexStart + payload1Hex + hexStart2 + payload2Hex + "0000";
            byte[] data = new byte[length];

            for (int i = 0; i < data.Length; i++)
            {
                data[i] = 0x88;
            }

            using (AsnWriter writer = new AsnWriter(AsnEncodingRules.CER))
            {
                writer.WriteOctetString(data);

                Verify(writer, expectedHex);
            }
        }

        [Theory]
        [InlineData(PublicEncodingRules.BER, 0, false)]
        [InlineData(PublicEncodingRules.CER, 0, false)]
        [InlineData(PublicEncodingRules.DER, 0, false)]
        [InlineData(PublicEncodingRules.BER, 999, false)]
        [InlineData(PublicEncodingRules.CER, 999, false)]
        [InlineData(PublicEncodingRules.DER, 999, false)]
        [InlineData(PublicEncodingRules.BER, 1000, false)]
        [InlineData(PublicEncodingRules.CER, 1000, false)]
        [InlineData(PublicEncodingRules.DER, 1000, false)]
        [InlineData(PublicEncodingRules.BER, 1001, false)]
        [InlineData(PublicEncodingRules.CER, 1001, true)]
        [InlineData(PublicEncodingRules.DER, 1001, false)]
        [InlineData(PublicEncodingRules.BER, 1998, false)]
        [InlineData(PublicEncodingRules.CER, 1998, true)]
        [InlineData(PublicEncodingRules.DER, 1998, false)]
        [InlineData(PublicEncodingRules.BER, 1999, false)]
        [InlineData(PublicEncodingRules.CER, 1999, true)]
        [InlineData(PublicEncodingRules.DER, 1999, false)]
        [InlineData(PublicEncodingRules.BER, 2000, false)]
        [InlineData(PublicEncodingRules.CER, 2000, true)]
        [InlineData(PublicEncodingRules.DER, 2000, false)]
        [InlineData(PublicEncodingRules.BER, 2001, false)]
        [InlineData(PublicEncodingRules.CER, 2001, true)]
        [InlineData(PublicEncodingRules.DER, 2001, false)]
        [InlineData(PublicEncodingRules.BER, 4096, false)]
        [InlineData(PublicEncodingRules.CER, 4096, true)]
        [InlineData(PublicEncodingRules.DER, 4096, false)]
        public void VerifyWriteOctetString_PrimitiveOrConstructed(
            PublicEncodingRules ruleSet,
            int payloadLength,
            bool expectConstructed)
        {
            byte[] data = new byte[payloadLength];

            Asn1Tag[] tagsToTry =
            {
                new Asn1Tag(UniversalTagNumber.OctetString),
                new Asn1Tag(UniversalTagNumber.OctetString, isConstructed: true),
                new Asn1Tag(TagClass.Private, 87),
                new Asn1Tag(TagClass.ContextSpecific, 13, isConstructed: true),
            };

            byte[] answerBuf = new byte[payloadLength + 100];

            foreach (Asn1Tag toTry in tagsToTry)
            {
                using (AsnWriter writer = new AsnWriter((AsnEncodingRules)ruleSet))
                {
                    writer.WriteOctetString(toTry, data);

                    Assert.True(writer.TryEncode(answerBuf, out _));
                }
                Assert.True(Asn1Tag.TryParse(answerBuf, out Asn1Tag writtenTag, out _));

                if (expectConstructed)
                {
                    Assert.True(writtenTag.IsConstructed, $"writtenTag.IsConstructed ({toTry})");
                }
                else
                {
                    Assert.False(writtenTag.IsConstructed, $"writtenTag.IsConstructed ({toTry})");
                }

                Assert.Equal(toTry.TagClass, writtenTag.TagClass);
                Assert.Equal(toTry.TagValue, writtenTag.TagValue);
            }
        }

        [Theory]
        [InlineData(PublicEncodingRules.BER)]
        [InlineData(PublicEncodingRules.CER)]
        [InlineData(PublicEncodingRules.DER)]
        public void VerifyWriteOctetString_EndOfContents(PublicEncodingRules ruleSet)
        {
            using (AsnWriter writer = new AsnWriter((AsnEncodingRules)ruleSet))
            {
                AssertExtensions.Throws<ArgumentException>(
                    "tag",
                    () => writer.WriteOctetString(Asn1Tag.EndOfContents, ReadOnlySpan<byte>.Empty));

                AssertExtensions.Throws<ArgumentException>(
                    "tag",
                    () => writer.WriteOctetString(Asn1Tag.EndOfContents, new byte[1]));
            }
        }
    }
}


text:
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Link } from 'react-router';
import { Row, Col, Menu, Breadcrumb, Icon } from 'antd';
import { changeTab } from './action';

import './style.less';

let TAB_MAP = {
    baseInfo: '基本信息',
    dataDic: '数据字典',
    codeGen: '代码生成',
    note: '通知设置',
    role: '角色设置',
    domain: '域设置'
};

class SysConfig extends Component {
    constructor(props) {
        super(props);
        this.tabChange = this.tabChange.bind(this);
    }
    tabChange(key) {
        let { dispatch } = this.props;
        dispatch(changeTab(key));
    }
    routerWillLeave(nextLocation) {
        if (!this.state.isSaved){
            return 'Your work is not saved! Are you sure you want to leave?';
        }
    }
    componentDidMount() {
        let route = this.props.routes[this.props.routes.length - 1];
        let path = route.path;
        this.tabChange(path);
    }
    componentWillUnmount() {
        //let { dispatch } = this.props;
        //dispatch(changeTab('baseInfo'));
    }
    render() {
        return (

                <Row gutter={24}>
                    <Col span={6}>
                        <Menu mode="inline" selectedKeys={[this.props.tab]} defaultSelectedKeys={['baseInfo']} className="sys-container">
                            <Menu.Item key="baseInfo">
                                <Link to="/sys/baseInfo" className="sys-item">基本信息</Link>
                                <Icon className="env-icon" type="right"></Icon>
                            </Menu.Item>
                            <Menu.Item key="dataDic">
                                <Link to="/sys/dataDic" className="sys-item">数据字典</Link>
                                <Icon className="env-icon" type="right"></Icon>
                            </Menu.Item>
                            <Menu.Item key="codeGen">
                                <Link to="/sys/codeGen" className="sys-item">代码生成</Link>
                                <Icon className="env-icon" type="right"></Icon>
                            </Menu.Item>
                            <Menu.Item key="note">
                                <Link to="/sys/note" className="sys-item">通知设置</Link>
                                <Icon className="env-icon" type="right"></Icon>
                            </Menu.Item>
                            <Menu.Item key="role">
                                <Link to="/sys/role" className="sys-item">角色设置</Link>
                                <Icon className="env-icon" type="right"></Icon>
                            </Menu.Item>
                            <Menu.Item key="domain">
                                <Link to="/sys/domain" className="sys-item">域设置</Link>
                                <Icon className="env-icon" type="right"></Icon>
                            </Menu.Item>
                        </Menu>
                    </Col>
                    <Col span={18}>
                        <Breadcrumb>
                            <Breadcrumb.Item href="">
                                <Icon type="home" />
                            </Breadcrumb.Item>
                            <Breadcrumb.Item href="">
                                系统设置
                            </Breadcrumb.Item>
                            <Breadcrumb.Item>{TAB_MAP[this.props.tab]}</Breadcrumb.Item>
                        </Breadcrumb>

                        {React.cloneElement(this.props.children, {
                            key: this.props.location.pathname
                        })}
                    </Col>
                </Row>

        );
    }
}

function mapStateToProps(state) {
    return {
        tab: state.sysConfigReducer.tab
    };
}

SysConfig.propTypes = {
    tab: PropTypes.string.isRequired
};

SysConfig.defaultProps = {
    tab: 'baseInfo'
};

export default connect(mapStateToProps)(SysConfig);


text:
"use strict";

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");

exports.__esModule = true;
exports.appendPreloadHeaders = appendPreloadHeaders;

var path = _interopRequireWildcard(require("path"));

var _findPageByPath = require("./find-page-by-path");

var _pageData = require("./page-data");

var _redux = require("../redux");

/**
 * Add preload link headers to responses for .html files. This allows browser to schedule fetching critical resources
 * to render a page faster. Without them it would result in network waterfall (fetch js script -> parse and execute -> start downloading data)
 * With them we can start downloading data before JS executes.
 */
async function appendPreloadHeaders(requestPath, res) {
  // add common.js and socket.io.js preload headers
  // TODO: make socket.io part not blocking - we don't need it anymore to render the page
  res.append(`Link`, `</commons.js>; rel=preload; as=script`);
  res.append(`Link`, `</socket.io/socket.io.js>; rel=preload; as=script`);
  const page = (0, _findPageByPath.findPageByPath)(_redux.store.getState(), requestPath, true); // we fallback to 404 pages - so there should always be a page (at worst dev-404)
  // this is just sanity check to not crash server in case it doesn't find anything

  if (page) {
    // add app-data.json preload
    res.append(`Link`, `</page-data/app-data.json>; rel=preload; as=fetch ; crossorigin`); // add page-data.json preload
    // our runtime also demands 404 and dev-404 page-data to be fetched to even render (see cache-dir/app.js)

    const pagePathsToPreload = [`/404.html`, `/dev-404-page/`];

    if (!pagePathsToPreload.includes(page.path)) {
      // let's make sure page path is first one (order shouldn't matter, just for reasonable order)
      pagePathsToPreload.unshift(page.path);
    }

    const staticQueriesToPreload = new Set();

    for (const pagePath of pagePathsToPreload) {
      res.append(`Link`, `</${path.join(`page-data`, encodeURI((0, _pageData.fixedPagePath)(pagePath)), `page-data.json`)}>; rel=preload; as=fetch ; crossorigin`);

      try {
        const pageData = await (0, _pageData.readPageData)(path.join(_redux.store.getState().program.directory, `public`), pagePath); // iterate over needed static queries and add them to Set of static queries to preload
        // Set will guarantee uniqueness in case queries are shared by requested page and 404 page.

        for (const staticQueryHash of pageData.staticQueryHashes) {
          staticQueriesToPreload.add(staticQueryHash);
        }
      } catch (e) {// there might be timing reasons why this fails - page-data file is not created yet
        // as page was just recently added (so page exists already but page-data doesn't yet)
        // in those cases we just do nothing
      }
    } // append accumulated static queries from pages we load

    for (const staticQueryHash of staticQueriesToPreload) {
      res.append(`Link`, `</page-data/sq/d/${staticQueryHash}.json>; rel=preload; as=fetch ; crossorigin`);
    }
  } else {// should we track cases when there is actually nothing returned to find cases
    // where we don't add preload headers if above assumption turns out to be wrong?
  }
}
//# sourceMappingURL=develop-preload-headers.js.map


text:
var core_1 = require("@angular/core");
exports.RenderDebugInfo = core_1.__core_private__.RenderDebugInfo;
exports.ReflectionCapabilities = core_1.__core_private__.ReflectionCapabilities;
exports.DebugDomRootRenderer = core_1.__core_private__.DebugDomRootRenderer;
exports.reflector = core_1.__core_private__.reflector;
exports.NoOpAnimationPlayer = core_1.__core_private__.NoOpAnimationPlayer;
exports.AnimationPlayer = core_1.__core_private__.AnimationPlayer;
exports.AnimationSequencePlayer = core_1.__core_private__.AnimationSequencePlayer;
exports.AnimationGroupPlayer = core_1.__core_private__.AnimationGroupPlayer;
exports.AnimationKeyframe = core_1.__core_private__.AnimationKeyframe;
exports.AnimationStyles = core_1.__core_private__.AnimationStyles;
exports.prepareFinalAnimationStyles = core_1.__core_private__.prepareFinalAnimationStyles;
exports.balanceAnimationKeyframes = core_1.__core_private__.balanceAnimationKeyframes;
exports.clearStyles = core_1.__core_private__.clearStyles;
exports.collectAndResolveStyles = core_1.__core_private__.collectAndResolveStyles;
//# sourceMappingURL=private_import_core.js.map


text:
<?php
	if(isset($rest_id) && $rest_id !=""){
	$restInfo 	    = $restObj->fun_getRestaurantInfo($rest_id);
	$manager_id     = $restObj->fun_getRestaurantManagerId($rest_id);
	$rest_manager 	= $usersObj->fun_getUserNameById($manager_id);
	$restPhotoArr 	= $restObj->fun_getRestPhotosGallary($rest_id);
	$reviewArr 		= $restObj->fun_getPendingApprovalRestaurantReviewsArr(" WHERE A.rest_id='".$rest_id."' ");
?>
<form name="frmRestaurant" id="frmRestaurant" method="post" action="admin-restaurant.php?sec=edit&rest_id=<?php echo $rest_id;?>" enctype="multipart/form-data">
    <input type="hidden" name="securityKey" id="securityKey" value="<?php echo md5("EDITRESTAURANTDETAILS"); ?>">
    <input type="hidden" name="rest_id" id="rest_id" value="<?php echo $rest_id; ?>">
    <input type="hidden" name="photo_id" id="photo_id" value="">
    <fieldset>
    <legend>Edit Restaurant</legend>

        <?php
		if(isset($manager_id) && $manager_id != "") {
			/*
			echo '';
			echo ' ';
			echo '';
			echo ' ';
			echo '';
			echo ' ';
			echo '';
			echo ' ';
			echo '';
			echo ' ';
			echo '';
			*/

			echo 'Coupons';
			echo ' ';
			echo 'Restaurant Info';
			echo ' ';
			echo 'Menus';
			echo ' ';
		    echo 'Edit Manager';
			echo ' ';
		    echo 'Back to list';
		} else {
		    echo 'Add Manager';
		}
		?>

Restaurant Details

			<?php
            if(isset($manager_id) && $manager_id != "") {
            ?>

                Restaurant Manager
                <input type="text" name="rest_manager" id="rest_manager_id" value="<?php echo $rest_manager;?>" disabled="disabled" />

			<?php
            }
            ?>

                Restaurant name
                <input type="text" name="rest_name" id="rest_name_id" value="<?php if(isset($_POST['rest_name'])){echo $_POST['rest_name'];} else {echo $restInfo['rest_name'];}?>" onkeydown="chkblnkTxtError('rest_name_id', 'rest_name_errorid');" onkeyup="chkblnkTxtError('rest_name_id', 'rest_name_errorid');" />
                 <?php if(array_key_exists('rest_name_error', $form_array)) echo $form_array['rest_name_error'];?>

                Country
                <select name="rest_country_id" id="rest_country_id_id" class="select310" onchange="chkSelectCountry();">
                    <option value="0" selected>Select ... </option>
                    <?php
				    	$locationObj->fun_getCountryOptionsList(((isset($_POST['rest_country_id']) && ($_POST['rest_country_id'] != "" || $_POST['rest_country_id'] != "0"))?$_POST['rest_country_id']:((isset($restInfo['rest_country_id']) && ($restInfo['rest_country_id'] != "" || $restInfo['rest_country_id'] != "0"))?$restInfo['rest_country_id']:223)), '');
					?>
                </select>
                <?php if(array_key_exists('rest_country_id_error', $form_array)) echo $form_array['rest_country_id_error'];?>

                State / Province
                <select name="rest_state_id" id="rest_state_id_id" class="select310" onchange="chkSelectState();">
                    <option value="0" selected>Select ... </option>
                    <?php
					   $locationObj->fun_getStateOptionsListByCountryId(((isset($_POST['rest_state_id']) && ($_POST['rest_state_id'] != "" || $_POST['rest_state_id'] != "0"))?$_POST['rest_state_id']:$restInfo['rest_state_id']), ((isset($_POST['rest_country_id']) && ($_POST['rest_country_id'] != "" || $_POST['rest_country_id'] != "0"))?$_POST['rest_country_id']:((isset($restInfo['rest_country_id']) && ($restInfo['rest_country_id'] != "" || $restInfo['rest_country_id'] != "0"))?$restInfo['rest_country_id']:223)));
					?>
                </select>

                <?php if(array_key_exists('rest_state_id_error', $form_array)) echo $form_array['rest_state_id_error'];?>

                City
                <select name="rest_city_id" id="rest_city_id_id" class="select310" >
                    <option value="0" selected>Select ... </option>
                    <?php
					   $locationObj->fun_getCityOptionsListByStateId($restInfo['rest_city_id'], $restInfo['rest_state_id']);
					?>
                </select>

                <?php if(array_key_exists('rest_city_id_error', $form_array)) echo $form_array['rest_city_id_error'];?>

                Street address
                <input type="text" name="rest_address1" id="rest_address1_id" value="<?php if(isset($_POST['rest_address1'])){echo $_POST['rest_address1'];}else{echo $restInfo['rest_address1'];}?>" onkeydown="chkblnkTxtError('rest_address1_id', 'rest_address1_errorid');" onkeyup="chkblnkTxtError('rest_address1_id', 'rest_address1_errorid');" />
                 <?php if(array_key_exists('rest_address1_error', $form_array)) echo $form_array['rest_address1_error'];?>

                <input type="text" name="rest_address2" id="rest_address2_id" value="<?php if(isset($_POST['rest_address2'])){echo $_POST['rest_address2'];}else{echo $restInfo['rest_address2'];}?>" />

                Zip / Postal code
                <input type="text" name="rest_zip" id="rest_zip_id" value="<?php if(isset($_POST['rest_zip'])){echo $_POST['rest_zip'];}else{echo $restInfo['rest_zip'];}?>" onkeydown="chkblnkTxtError('rest_zip_id', 'rest_zip_errorid');" onkeyup="chkblnkTxtError('rest_zip_id', 'rest_zip_errorid');" />

                <?php if(array_key_exists('rest_zip_error', $form_array)) echo $form_array['rest_zip_error'];?>

            	Active
                <select name="active" id="active_id" class="select216">
                    <option value="0" <?php if($restInfo['active'] == 0) {echo "selected=\"selected\"";} ?> >No</option>
                    <option value="1" <?php if($restInfo['active'] == 1) {echo "selected=\"selected\"";} ?> >Yes</option>
                </select>

 <?php if(array_key_exists('active_error', $form_array)) echo $form_array['active_error'];?>

                Edit Now

Welcome Message

                Title
                <input type="text" name="rest_title" id="rest_title_id" value="<?php if(isset($_POST['rest_title'])){echo $_POST['rest_title'];} else {echo $restInfo['rest_title'];}?>" onkeydown="chkblnkTxtError('rest_title_id', 'rest_title_errorid');" onkeyup="chkblnkTxtError('rest_title_id', 'rest_title_errorid');" />
                 <?php if(array_key_exists('rest_title_error', $form_array)) echo $form_array['rest_title_error'];?>

                Welcome Message
                <textarea name="rest_short_desc" id="rest_short_desc_id" cols="" rows="" style="width:440px; height:150px;"><?php echo $restInfo['rest_short_desc']; ?></textarea>
                 <?php if(array_key_exists('rest_short_desc_error', $form_array)) echo $form_array['rest_short_desc_error'];?>

                About Restaurant
                <textarea name="page_discription" id="page_discription_id" cols="" rows="" style="width:440px; height:150px;"><?php echo $restInfo['page_discription']; ?></textarea>
                 <?php if(array_key_exists('page_discription_error', $form_array)) echo $form_array['page_discription_error'];?>

                Update Now

Restaurant Logo & Banners

                Restaurant logo
                <img src="<?php echo RESTAURANT_IMAGES_LOGO_PATH.$restInfo['rest_logo'];?>" border="0" width="100px" height="100px" onError="this.src='<?php echo RESTAURANT_IMAGES_LOGO_PATH;?>no-img.gif';" />

                **Dimension 100px X 100px

                <input type="file" name="rest_logo" id="rest_logo_id" value="" class="inpuTxt"/>
                 <?php if(array_key_exists('rest_logo_error', $form_array)) echo $form_array['rest_logo_error'];?>

                Restaurant Photo
                <img src="<?php echo RESTAURANT_IMAGES_LARGE_PATH.$restInfo['rest_photo'];?>" border="0" width="168px" onError="this.src='<?php echo RESTAURANT_IMAGES_THUMB168x126_PATH;?>no-img.gif';" />

                **Dimension 550px × 170px

                <input type="file" name="rest_photo" id="rest_photo_id" value="" class="inpuTxt"/>
                 <?php if(array_key_exists('rest_photo_error', $form_array)) echo $form_array['rest_photo_error'];?>

                Upload Now

Picture Gallery

				<?php
                if(is_array($restPhotoArr) && count($restPhotoArr) > 0) {
                    echo '
';
                    for($i=0; $i < count($restPhotoArr); $i++){
                        $photo_id      = $restPhotoArr[$i]['photo_id'];
                        $photo_thumb   = $restPhotoArr[$i]['photo_thumb'];
                        $photo_caption = $restPhotoArr[$i]['photo_caption'];
                        $photo_url 	   = RESTAURANT_IMAGES_THUMB168x126_PATH.$photo_thumb;

                        echo '
';
                        echo '
';
                        echo ''.$photo_caption.'';
                        echo '
Detele
';
                        echo '
';
                     }
                    echo '
';
                } else {
                    echo 'Please add new photo!';
                }
                ?>

Add a new photo

                 <?php if(array_key_exists('photo_thumb_error', $form_array)) echo $form_array['photo_thumb_error'];?>
                <input type="file" name="photo_thumb" id="photo_thumb_id" value="" class="inpuTxt"/>
                <input  type="text" name="photo_caption" id="photo_caption_id" value="" class="inpuTxt250" style="margin-top:20px; margin-right:10px;" />
                Upload

		<?php /*?>

Restaurant Info

            <?php require_once('restaurant-form-info.php'); ?>

		<?php */?>

Reviews & Ratings

                    <?php
                    if(count($reviewArr) < 1) {
                    ?>

This restaurant has not yet been reviewed

                    <?php
                    } else {
                        ?>

                        <?php
                        for($i =0; $i < count($reviewArr); $i++) {
                            $review_id 		= $reviewArr[$i]['review_id'];
                            $user_rating 	= $reviewArr[$i]['rest_rating'];
                            $review_title 	= $reviewArr[$i]['review_title'];
                            $review_txt 	= $reviewArr[$i]['review_txt'];
                            $created_on 	= date('M j, Y', $reviewArr[$i]['created_on']);
                            $user_fname 	= $reviewArr[$i]['user_fname'];
                            $user_lname 	= $reviewArr[$i]['user_lname'];
                            $user_name 		= ucwords($user_fname." ".$user_lname);
                            $country_name	= $locationObj->fun_getCountryNameById($reviewArr[$i]['user_country']);
                            $txtCreateBy 	= "Added by : ".$user_name." Date added : ".$created_on.". Country : ".$country_name;
                            $status 		= $reviewArr[$i]['status'];
                            $active 		= $reviewArr[$i]['active'];
                        ?>

                            <?php
                            for($j=0; $j < 5; $j++) {
                                if($j < $user_rating) {
                                    echo " ";
                                } else {
                                    echo " ";
                                }
                            }
                            ?>

<?php echo ucfirst($review_title); ?>

<?php echo $txtCreateBy; ?>

<?php echo $review_txt; ?>

                        	Status :<?php echo ($status==2)?"Approved [ Delete ]":"Pending Approval [ Approve now  |  Delete ]"; ?>

                        <?php
                        }
                    }
                    ?>

                    <img src="<?php echo SITE_IMAGES;?>poplefttop.png" alt="ANP" height="10" width="10" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo SITE_IMAGES;?>poplefttop.png', sizingMethod='scale');" />

                    <img src="<?php echo SITE_IMAGES;?>poprighttop1.png" alt="ANP"  height="10" width="15" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo SITE_IMAGES;?>poprighttop1.png', sizingMethod='scale');"/>

                                Are you sure?
                                <img src="<?php echo SITE_IMAGES;?>Pop-Up-Cross.gif" alt="Close" title="Close" border="0" />

                                            You will be delete the Picture & information related to this Restaurant's Food Photos Listing !

<img src="<?php echo SITE_IMAGES;?>cancel-admin.png" alt="Keep it" border="0" />

<img src="<?php echo SITE_IMAGES;?>delete-admin.gif" alt="Delete it" border="0" onmouseover="this.src='<?php echo SITE_IMAGES; ?>delete-admin.gif'" onmouseout="this.src='<?php echo SITE_IMAGES; ?>delete-admin.gif'" />

                    <img src="<?php echo SITE_IMAGES;?>popleftbtm.png" alt="ANP" />

                    <img src="<?php echo SITE_IMAGES;?>poprightbtm1.png" alt="ANP"/>

    </fieldset>
</form>
<?php
} else {
?>
<form name="frmRestaurant" id="frmRestaurant" method="post" action="admin-restaurant.php" enctype="multipart/form-data">
    <input type="hidden" name="securityKey" id="securityKey" value="<?php echo md5("ADDNEWRESTAURANT"); ?>">
    <fieldset>
    <legend>Add Restaurant</legend>

Restaurant Details

                Restaurant name
                <input type="text" name="rest_name" id="rest_name_id" value="<?php if(isset($_POST['rest_name'])){echo $_POST['rest_name'];} else {echo $restInfo['rest_name'];}?>" onkeydown="chkblnkTxtError('rest_name_id', 'rest_name_errorid');" onkeyup="chkblnkTxtError('rest_name_id', 'rest_name_errorid');" />
                 <?php if(array_key_exists('rest_name_error', $form_array)) echo $form_array['rest_name_error'];?>

                Country
                <select name="rest_country_id" id="rest_country_id_id" class="select310" onchange="chkSelectCountry();">
                    <option value="0" selected>Select ... </option>
                    <?php
				    	$locationObj->fun_getCountryOptionsList(((isset($_POST['rest_country_id']) && ($_POST['rest_country_id'] != "" || $_POST['rest_country_id'] != "0"))?$_POST['rest_country_id']:((isset($restInfo['rest_country_id']) && ($restInfo['rest_country_id'] != "" || $restInfo['rest_country_id'] != "0"))?$restInfo['rest_country_id']:223)), '');
					?>
                </select>
                <?php if(array_key_exists('rest_country_id_error', $form_array)) echo $form_array['rest_country_id_error'];?>

                State / Province
                <select name="rest_state_id" id="rest_state_id_id" class="select310" onchange="chkSelectState();">
                    <option value="0" selected>Select ... </option>
                    <?php
					   $locationObj->fun_getStateOptionsListByCountryId(((isset($_POST['rest_state_id']) && ($_POST['rest_state_id'] != "" || $_POST['rest_state_id'] != "0"))?$_POST['rest_state_id']:$restInfo['rest_state_id']), ((isset($_POST['rest_country_id']) && ($_POST['rest_country_id'] != "" || $_POST['rest_country_id'] != "0"))?$_POST['rest_country_id']:((isset($restInfo['rest_country_id']) && ($restInfo['rest_country_id'] != "" || $restInfo['rest_country_id'] != "0"))?$restInfo['rest_country_id']:223)));
					?>
                </select>

                <?php if(array_key_exists('rest_state_id_error', $form_array)) echo $form_array['rest_state_id_error'];?>

                City
                <select name="rest_city_id" id="rest_city_id_id" class="select310" >
                    <option value="0" selected>Select ... </option>
                </select>

                <?php if(array_key_exists('rest_city_id_error', $form_array)) echo $form_array['rest_city_id_error'];?>

                Street address
                <input type="text" name="rest_address1" id="rest_address1_id" value="<?php if(isset($_POST['rest_address1'])){echo $_POST['rest_address1'];}else{echo $restInfo['rest_address1'];}?>" onkeydown="chkblnkTxtError('rest_address1_id', 'rest_address1_errorid');" onkeyup="chkblnkTxtError('rest_address1_id', 'rest_address1_errorid');" />
                 <?php if(array_key_exists('rest_address1_error', $form_array)) echo $form_array['rest_address1_error'];?>

                <input type="text" name="rest_address2" id="rest_address2_id" value="<?php if(isset($_POST['rest_address2'])){echo $_POST['rest_address2'];}else{echo $restInfo['rest_address2'];}?>" />

                Zip / Postal code
                <input type="text" name="rest_zip" id="rest_zip_id" value="<?php if(isset($_POST['rest_zip'])){echo $_POST['rest_zip'];}else{echo $restInfo['rest_zip'];}?>" onkeydown="chkblnkTxtError('rest_zip_id', 'rest_zip_errorid');" onkeyup="chkblnkTxtError('rest_zip_id', 'rest_zip_errorid');" />

                <?php if(array_key_exists('rest_zip_error', $form_array)) echo $form_array['rest_zip_error'];?>

                Add Now

Welcome Message

Add Restaurant Details First!

Restaurant Logo & Banners

Add Restaurant Details First!

Picture Gallery

Add Restaurant Details First!

Restaurant Info

Add Restaurant Details First!

Reviews & Ratings

Add Restaurant Details First!

    </fieldset>
</form>
<?php
}
?>


text:
package StreamsFilesAndDirectories.Exercise;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;

public class LineNumbers {
    private static final String INPUT_PATH = "src\\StreamsFilesAndDirectories\\Exercise\\04. Java-Advanced-Files-and-Streams-Exercises-Resources\\Exercises Resources\\inputLineNumbers.txt";
    private static final String OUTPUT_PATH = "src\\StreamsFilesAndDirectories\\Exercise\\04. Java-Advanced-Files-and-Streams-Exercises-Resources\\output.txt";

    public static void main(String[] args) {
        try (BufferedReader reader = new BufferedReader(new FileReader(INPUT_PATH))) {
            PrintWriter writer = new PrintWriter(OUTPUT_PATH);

           int number = 1;
           String line = reader.readLine();

            while (line != null){
                writer.println(String.format("%d. %s", number, line));
                number++;
                line = reader.readLine();
            }

            writer.close();

        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}


text:
#ifndef H_LUCY_TEST_PLAN_TESTFIELDMISC
#define H_LUCY_TEST_PLAN_TESTFIELDMISC 1

#ifdef __cplusplus
extern "C" {
#endif

#include "testlucy_parcel.h"

/* Include the header for this class's parent.
 */

#include "Clownfish\TestHarness\TestBatch.h"

/* Define the struct layout for instances of this class.
 */

#ifdef C_TESTLUCY_TESTFIELDMISC
extern uint32_t testlucy_TestFieldMisc_IVARS_OFFSET;
typedef struct testlucy_TestFieldMiscIVARS testlucy_TestFieldMiscIVARS;
static CFISH_INLINE testlucy_TestFieldMiscIVARS*
testlucy_TestFieldMisc_IVARS(testlucy_TestFieldMisc *self) {
   char *ptr = (char*)self + testlucy_TestFieldMisc_IVARS_OFFSET;
   return (testlucy_TestFieldMiscIVARS*)ptr;
}
#ifdef TESTLUCY_USE_SHORT_NAMES
  #define TestFieldMiscIVARS testlucy_TestFieldMiscIVARS
  #define TestFieldMisc_IVARS testlucy_TestFieldMisc_IVARS
#endif

#endif /* C_TESTLUCY_TESTFIELDMISC */

/* Declare this class's inert variables.
 */

/* Declare both this class's inert functions and the C functions which
 * implement this class's dynamic methods.
 */

TESTLUCY_VISIBLE testlucy_TestFieldMisc*
testlucy_TestFieldMisc_new(void);

void
TESTLUCY_TestFieldMisc_Run_IMP(testlucy_TestFieldMisc* self, cfish_TestBatchRunner* runner);

/* Define typedefs for each dynamic method, allowing us to cast generic
 * pointers to the appropriate function pointer type more cleanly.
 */

typedef void*
(*TESTLUCY_TestFieldMisc_To_Host_t)(testlucy_TestFieldMisc* self, void* vcache);

typedef cfish_Obj*
(*TESTLUCY_TestFieldMisc_Clone_t)(testlucy_TestFieldMisc* self);

typedef bool
(*TESTLUCY_TestFieldMisc_Equals_t)(testlucy_TestFieldMisc* self, cfish_Obj* other);

typedef int32_t
(*TESTLUCY_TestFieldMisc_Compare_To_t)(testlucy_TestFieldMisc* self, cfish_Obj* other);

typedef void
(*TESTLUCY_TestFieldMisc_Destroy_t)(testlucy_TestFieldMisc* self);

typedef cfish_String*
(*TESTLUCY_TestFieldMisc_To_String_t)(testlucy_TestFieldMisc* self);

typedef void
(*TESTLUCY_TestFieldMisc_Run_t)(testlucy_TestFieldMisc* self, cfish_TestBatchRunner* runner);

/* Define type-safe wrappers for inert functions of Obj.
 */

static CFISH_INLINE cfish_Class*
testlucy_TestFieldMisc_get_class(testlucy_TestFieldMisc *self) {
    return cfish_Obj_get_class((cfish_Obj*)self);
}

static CFISH_INLINE cfish_String*
testlucy_TestFieldMisc_get_class_name(testlucy_TestFieldMisc *self) {
    return cfish_Obj_get_class_name((cfish_Obj*)self);
}

static CFISH_INLINE bool
testlucy_TestFieldMisc_is_a(testlucy_TestFieldMisc *self, cfish_Class *ancestor) {
    return cfish_Obj_is_a((cfish_Obj*)self, ancestor);
}

/* Define the inline functions which implement this class's virtual methods.
 */

extern TESTLUCY_VISIBLE uint32_t TESTLUCY_TestFieldMisc_To_Host_OFFSET;
static CFISH_INLINE void*
TESTLUCY_TestFieldMisc_To_Host(testlucy_TestFieldMisc* self, void* vcache) {
    const TESTLUCY_TestFieldMisc_To_Host_t method = (TESTLUCY_TestFieldMisc_To_Host_t)cfish_obj_method(self, TESTLUCY_TestFieldMisc_To_Host_OFFSET);
    return method(self, vcache);
}

extern TESTLUCY_VISIBLE uint32_t TESTLUCY_TestFieldMisc_Clone_OFFSET;
static CFISH_INLINE cfish_Obj*
TESTLUCY_TestFieldMisc_Clone(testlucy_TestFieldMisc* self) {
    const TESTLUCY_TestFieldMisc_Clone_t method = (TESTLUCY_TestFieldMisc_Clone_t)cfish_obj_method(self, TESTLUCY_TestFieldMisc_Clone_OFFSET);
    return method(self);
}

extern TESTLUCY_VISIBLE uint32_t TESTLUCY_TestFieldMisc_Equals_OFFSET;
static CFISH_INLINE bool
TESTLUCY_TestFieldMisc_Equals(testlucy_TestFieldMisc* self, cfish_Obj* other) {
    const TESTLUCY_TestFieldMisc_Equals_t method = (TESTLUCY_TestFieldMisc_Equals_t)cfish_obj_method(self, TESTLUCY_TestFieldMisc_Equals_OFFSET);
    return method(self, other);
}

extern TESTLUCY_VISIBLE uint32_t TESTLUCY_TestFieldMisc_Compare_To_OFFSET;
static CFISH_INLINE int32_t
TESTLUCY_TestFieldMisc_Compare_To(testlucy_TestFieldMisc* self, cfish_Obj* other) {
    const TESTLUCY_TestFieldMisc_Compare_To_t method = (TESTLUCY_TestFieldMisc_Compare_To_t)cfish_obj_method(self, TESTLUCY_TestFieldMisc_Compare_To_OFFSET);
    return method(self, other);
}

extern TESTLUCY_VISIBLE uint32_t TESTLUCY_TestFieldMisc_Destroy_OFFSET;
static CFISH_INLINE void
TESTLUCY_TestFieldMisc_Destroy(testlucy_TestFieldMisc* self) {
    const TESTLUCY_TestFieldMisc_Destroy_t method = (TESTLUCY_TestFieldMisc_Destroy_t)cfish_obj_method(self, TESTLUCY_TestFieldMisc_Destroy_OFFSET);
    method(self);
}

extern TESTLUCY_VISIBLE uint32_t TESTLUCY_TestFieldMisc_To_String_OFFSET;
static CFISH_INLINE cfish_String*
TESTLUCY_TestFieldMisc_To_String(testlucy_TestFieldMisc* self) {
    const TESTLUCY_TestFieldMisc_To_String_t method = (TESTLUCY_TestFieldMisc_To_String_t)cfish_obj_method(self, TESTLUCY_TestFieldMisc_To_String_OFFSET);
    return method(self);
}

extern TESTLUCY_VISIBLE uint32_t TESTLUCY_TestFieldMisc_Run_OFFSET;
static CFISH_INLINE void
TESTLUCY_TestFieldMisc_Run(testlucy_TestFieldMisc* self, cfish_TestBatchRunner* runner) {
    const TESTLUCY_TestFieldMisc_Run_t method = (TESTLUCY_TestFieldMisc_Run_t)cfish_obj_method(self, TESTLUCY_TestFieldMisc_Run_OFFSET);
    method(self, runner);
}

/* Declare callbacks for wrapping host overrides.
 */

#ifdef CFISH_NO_DYNAMIC_OVERRIDES
#else
#endif

/* Define "short names" for this class's symbols.
 */

#ifdef TESTLUCY_USE_SHORT_NAMES
  #define TestFieldMisc testlucy_TestFieldMisc
  #define TESTFIELDMISC TESTLUCY_TESTFIELDMISC
  #define TestFieldMisc_new testlucy_TestFieldMisc_new
  #define TestFieldMisc_get_class testlucy_TestFieldMisc_get_class
  #define TestFieldMisc_get_class_name testlucy_TestFieldMisc_get_class_name
  #define TestFieldMisc_is_a testlucy_TestFieldMisc_is_a
  #define TestFieldMisc_Run_IMP TESTLUCY_TestFieldMisc_Run_IMP
  #define TestFieldMisc_To_Host TESTLUCY_TestFieldMisc_To_Host
  #define TestFieldMisc_To_Host_t TESTLUCY_TestFieldMisc_To_Host_t
  #define TestFieldMisc_Clone TESTLUCY_TestFieldMisc_Clone
  #define TestFieldMisc_Clone_t TESTLUCY_TestFieldMisc_Clone_t
  #define TestFieldMisc_Equals TESTLUCY_TestFieldMisc_Equals
  #define TestFieldMisc_Equals_t TESTLUCY_TestFieldMisc_Equals_t
  #define TestFieldMisc_Compare_To TESTLUCY_TestFieldMisc_Compare_To
  #define TestFieldMisc_Compare_To_t TESTLUCY_TestFieldMisc_Compare_To_t
  #define TestFieldMisc_Destroy TESTLUCY_TestFieldMisc_Destroy
  #define TestFieldMisc_Destroy_t TESTLUCY_TestFieldMisc_Destroy_t
  #define TestFieldMisc_To_String TESTLUCY_TestFieldMisc_To_String
  #define TestFieldMisc_To_String_t TESTLUCY_TestFieldMisc_To_String_t
  #define TestFieldMisc_Run TESTLUCY_TestFieldMisc_Run
  #define TestFieldMisc_Run_t TESTLUCY_TestFieldMisc_Run_t
#endif /* TESTLUCY_USE_SHORT_NAMES */

#ifdef __cplusplus
}
#endif

#endif /* H_LUCY_TEST_PLAN_TESTFIELDMISC */


text:
<project xmlns="http://maven.apache.org/POM/4.0.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<artifactId>wsdl</artifactId>
	<packaging>pom</packaging>
	<name>W3C WSDL</name>
	<parent>
		<groupId>org.hisrc.w3c</groupId>
		<artifactId>w3c-schemas-project</artifactId>
		<version>1.4.1-SNAPSHOT</version>
	</parent>
	<modules>
		<module>2.0</module>
	</modules>
	<build>
		<defaultGoal>install</defaultGoal>
	</build>
</project>


text:
layout: map
title: City of Seattle - 1890
mapid: anderson_1890_pocket
link: maps/anderson_1890_pocket.jpg
filename: anderson_1890_pocket.jpg
year: 1890
---

With two inset maps of the environs of Seattle. This is a subdivision map showing the early expansion of the city. Streeter: "This map shows Seattle before the boom of the nineties, with the original subdivisions and ownerships named and blocked out in different colors." With the Union Pacific logo in the lower left (compare to the Whitney "Astoria" map). Map is folded into untitled dark brown cloth covers 16x10.

Originally on [David Rumsey](http://www.davidrumsey.com/luna/servlet/detail/RUMSEY~8~1~215661~5502493:Seattle-And-Environs,-Washington?sort=Pub_List_No_InitialSort%2CPub_Date%2CPub_List_No%2CSeries_No?&qvq=q:seattle;sort:Pub_List_No_InitialSort%2CPub_Date%2CPub_List_No%2CSeries_No;lc:RUMSEY~8~1&mi=128&trs=178#).


text:
'use strict';

import noop from 'lodash/noop';
import rest from 'lodash/rest';
import reduce from './reduce';

/**
 * Version of the compose function that is more natural to read. Each function
 * consumes the return value of the previous function. It is the equivalent of
 * {@link async.compose} with the arguments reversed.
 *
 * Each function is executed with the `this` binding of the composed function.
 *
 * @name seq
 * @static
 * @memberOf async
 * @see async.compose
 * @category Control Flow
 * @param {...Function} functions - the asynchronous functions to compose
 * @example
 *
 * // Requires lodash (or underscore), express3 and dresende's orm2.
 * // Part of an app, that fetches cats of the logged user.
 * // This example uses `seq` function to avoid overnesting and error
 * // handling clutter.
 * app.get('/cats', function(request, response) {
 *     var User = request.models.User;
 *     async.seq(
 *         _.bind(User.get, User),  // 'User.get' has signature (id, callback(err, data))
 *         function(user, fn) {
 *             user.getCats(fn);      // 'getCats' has signature (callback(err, data))
 *         }
 *     )(req.session.user_id, function (err, cats) {
 *         if (err) {
 *             console.error(err);
 *             response.json({ status: 'error', message: err.message });
 *         } else {
 *             response.json({ status: 'ok', message: 'Cats found', data: cats });
 *         }
 *     });
 * });
 */
export default function seq( /* functions... */ ) {
    var fns = arguments;
    return rest(function(args) {
        var that = this;

        var cb = args[args.length - 1];
        if (typeof cb == 'function') {
            args.pop();
        } else {
            cb = noop;
        }

        reduce(fns, args, function(newargs, fn, cb) {
                fn.apply(that, newargs.concat([rest(function(err, nextargs) {
                    cb(err, nextargs);
                })]));
            },
            function(err, results) {
                cb.apply(that, [err].concat(results));
            });
    });
}


text:
package com.lightbend.akka.sample;

import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.testkit.javadsl.TestKit;
import com.lightbend.akka.sample.Greeter.*;
import com.lightbend.akka.sample.Printer.*;

import static org.junit.Assert.assertEquals;

import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;

public class AkkaQuickstartTest {
    static ActorSystem system;

    @BeforeClass
    public static void setup() {
        system = ActorSystem.create();
    }

    @AfterClass
    public static void teardown() {
        TestKit.shutdownActorSystem(system);
        system = null;
    }

    @Test
    public void testGreeterActorSendingOfGreeting() {
        final TestKit testProbe = new TestKit(system);
        final ActorRef helloGreeter = system.actorOf(Greeter.props("Hello", testProbe.getRef()));
        helloGreeter.tell(new WhoToGreet("Akka"), ActorRef.noSender());
        helloGreeter.tell(new Greet(), ActorRef.noSender());
        Greeting greeting = testProbe.expectMsgClass(Greeting.class);
        assertEquals("Hello, Akka", greeting.message);
    }
}


text:
<!doctype html>

    <title>Code coverage report for api/data.js</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="../prettify.css" />
    <link rel="stylesheet" href="../base.css" />
    <meta name="viewport" content="width=device-width, initial-scale=1">

      All files / api data.js

        31.82%
        Statements
        7/22

        100%
        Branches
        0/0

        0%
        Functions
        0/2

        31.82%
        Lines
        7/22

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164	1x
1x
1x
1x
1x

1x

1x

const {randomHelper} = require('./utils');
const {eachDay, addHours, subDays, subWeeks, addWeeks} = require('date-fns');
const START_VALUE = 300;
const NBR_VALUES_PER_DAY = 24;
const MAX_CPT_PER_HOUR = 2;
let start;

// 1 week consumptions
const hardcoded = [
  {
    date: new Date(2017, 10, 13, 12),
    value: 300,
    serial: 0
  },{
    date: new Date(2017, 10, 13, 13),
    value: 350,
    serial: 0
  },{
    date: new Date(2017, 10, 13, 14),
    value: 400,
    serial: 0
  },{
    date: new Date(2017, 10, 13, 15),
    value: 450,
    serial: 0
  },{
    date: new Date(2017, 10, 14, 12),
    value: 510,
    serial: 0
  },{
    date: new Date(2017, 10, 14, 13),
    value: 520,
    serial: 0
  },{
    date: new Date(2017, 10, 14, 14),
    value: 560,
    serial: 0
  },{
    date: new Date(2017, 10, 14, 15),
    value: 610,
    serial: 0
  },{
    date: new Date(2017, 10, 15, 12),
    value: 630,
    serial: 0
  },{
    date: new Date(2017, 10, 15, 13),
    value: 670,
    serial: 0
  },{
    date: new Date(2017, 10, 15, 14),
    value: 700,
    serial: 0
  },{
    date: new Date(2017, 10, 15, 15),
    value: 705,
    serial: 0
  },{
    date: new Date(2017, 10, 16, 12),
    value: 710,
    serial: 0
  },{
    date: new Date(2017, 10, 16, 13),
    value: 717,
    serial: 0
  },{
    date: new Date(2017, 10, 16, 14),
    value: 800,
    serial: 0
  },{
    date: new Date(2017, 10, 16, 15),
    value: 820,
    serial: 0
  },{
    date: new Date(2017, 10, 17, 12),
    value: 850,
    serial: 0
  },{
    date: new Date(2017, 10, 17, 13),
    value: 920,
    serial: 0
  },{
    date: new Date(2017, 10, 17, 14),
    value: 970,
    serial: 0
  },{
    date: new Date(2017, 10, 17, 15),
    value: 1000,
    serial: 0
  },{
    date: new Date(2017, 10, 18, 12),
    value: 1100,
    serial: 0
  },{
    date: new Date(2017, 10, 18, 13),
    value: 1300,
    serial: 0
  },{
    date: new Date(2017, 10, 18, 14),
    value: 1350,
    serial: 0
  },{
    date: new Date(2017, 10, 18, 15),
    value: 1410,
    serial: 0
  },{
    date: new Date(2017, 10, 19, 12),
    value: 1435,
    serial: 0
  },{
    date: new Date(2017, 10, 19, 13),
    value: 1450,
    serial: 0
  },{
    date: new Date(2017, 10, 19, 14),
    value: 1480,
    serial: 0
  },{
    date: new Date(2017, 10, 19, 15),
    value: 1520,
    serial: 0
  }
];

function generateSample() {
  let dateRange;
  start = START_VALUE;
  const now = new Date();

  // 1 week before
  // https://date-fns.org/v1.29.0/docs/eachDay
  dateRange = eachDay(subWeeks(now, 1), subDays(now, 1));
  const beforeCpt = generateValues(dateRange);

  // 1 week now
  // https://date-fns.org/v1.29.0/docs/eachDay
  dateRange = eachDay(now, addWeeks(now, 1));
  const nowCpt = generateValues(dateRange);

  const consumptions = beforeCpt.concat(nowCpt);
  return consumptions;
}

function generateValues(dateRange) {
  const consumptions = [];
  for (const date of dateRange) {
    for (let i = 0; i < NBR_VALUES_PER_DAY; i++) {
      const cpt = randomHelper(0, MAX_CPT_PER_HOUR);
      consumptions.push({
        date: addHours(date, i),
        value: start + cpt,
        serial: 0
      });
      start += cpt;
    }
  }
  return consumptions;
}

module.exports = {
  generateSample,
  hardcoded
}

  Code coverage
  generated by istanbul at Thu Nov 30 2017 17:27:19 GMT+0100 (CET)


text:
import './chunk-455cdeae.js';
import './helpers.js';
import './chunk-e92e3389.js';
import './chunk-17b33cd2.js';
import './chunk-7e17a637.js';
import { r as registerComponent, u as use } from './chunk-cca88db8.js';
import './chunk-72ecb544.js';
import './chunk-60a03517.js';
import './chunk-42f463e6.js';
import './chunk-ade5b253.js';
import './chunk-53788519.js';
import './chunk-4e788733.js';
import { D as Datepicker } from './chunk-ea6777b6.js';
export { D as BDatepicker } from './chunk-ea6777b6.js';

var Plugin = {
  install: function install(Vue) {
    registerComponent(Vue, Datepicker);
  }
};
use(Plugin);

export default Plugin;


text:
package ru.r2cloud.sdrmodem;

import java.io.IOException;
import java.net.Socket;

public interface SdrModemHandler {

	void handleClient(Socket client) throws IOException;

}


text:
<?php

/*
 * return view template
 * if cant find view file...return 404.html template
 */

function _load_view($view) {
	return file_exists(APPLICATION_PATH."/view/$view") ? file_get_contents(APPLICATION_PATH."/view/$view") : file_get_contents(APPLICATION_PATH."/view/errors/404.html");
}


text:
.class public final Lcom/airbnb/lottie/model/animatable/AnimatableTextProperties$Factory;
.super Ljava/lang/Object;
.source "AnimatableTextProperties.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/airbnb/lottie/model/animatable/AnimatableTextProperties;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x19
    name = "Factory"
.end annotation

# direct methods
.method private constructor <init>()V
    .locals 0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static newInstance(Lorg/json/JSONObject;Lcom/airbnb/lottie/LottieComposition;)Lcom/airbnb/lottie/model/animatable/AnimatableTextProperties;
    .locals 11

    const/4 v10, 0x0

    if-nez p0, :cond_1

    :cond_0
    new-instance v9, Lcom/airbnb/lottie/model/animatable/AnimatableTextProperties;

    invoke-direct {v9, v10, v10, v10, v10}, Lcom/airbnb/lottie/model/animatable/AnimatableTextProperties;-><init>(Lcom/airbnb/lottie/model/animatable/AnimatableColorValue;Lcom/airbnb/lottie/model/animatable/AnimatableColorValue;Lcom/airbnb/lottie/model/animatable/AnimatableFloatValue;Lcom/airbnb/lottie/model/animatable/AnimatableFloatValue;)V

    return-object v9

    :cond_1
    const-string/jumbo v9, "a"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v9

    if-eqz v9, :cond_0

    const-string/jumbo v9, "a"

    invoke-virtual {p0, v9}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v0

    const-string/jumbo v9, "fc"

    invoke-virtual {v0, v9}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v2

    const/4 v1, 0x0

    if-nez v2, :cond_2

    :goto_0
    const-string/jumbo v9, "sc"

    invoke-virtual {v0, v9}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v4

    const/4 v3, 0x0

    if-nez v4, :cond_3

    :goto_1
    const-string/jumbo v9, "sw"

    invoke-virtual {v0, v9}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v6

    const/4 v5, 0x0

    if-nez v6, :cond_4

    :goto_2
    const-string/jumbo v9, "t"

    invoke-virtual {v0, v9}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v8

    const/4 v7, 0x0

    if-nez v8, :cond_5

    :goto_3
    new-instance v9, Lcom/airbnb/lottie/model/animatable/AnimatableTextProperties;

    invoke-direct {v9, v1, v3, v5, v7}, Lcom/airbnb/lottie/model/animatable/AnimatableTextProperties;-><init>(Lcom/airbnb/lottie/model/animatable/AnimatableColorValue;Lcom/airbnb/lottie/model/animatable/AnimatableColorValue;Lcom/airbnb/lottie/model/animatable/AnimatableFloatValue;Lcom/airbnb/lottie/model/animatable/AnimatableFloatValue;)V

    return-object v9

    :cond_2
    invoke-static {v2, p1}, Lcom/airbnb/lottie/model/animatable/AnimatableColorValue$Factory;->newInstance(Lorg/json/JSONObject;Lcom/airbnb/lottie/LottieComposition;)Lcom/airbnb/lottie/model/animatable/AnimatableColorValue;

    move-result-object v1

    goto :goto_0

    :cond_3
    invoke-static {v4, p1}, Lcom/airbnb/lottie/model/animatable/AnimatableColorValue$Factory;->newInstance(Lorg/json/JSONObject;Lcom/airbnb/lottie/LottieComposition;)Lcom/airbnb/lottie/model/animatable/AnimatableColorValue;

    move-result-object v3

    goto :goto_1

    :cond_4
    invoke-static {v6, p1}, Lcom/airbnb/lottie/model/animatable/AnimatableFloatValue$Factory;->newInstance(Lorg/json/JSONObject;Lcom/airbnb/lottie/LottieComposition;)Lcom/airbnb/lottie/model/animatable/AnimatableFloatValue;

    move-result-object v5

    goto :goto_2

    :cond_5
    invoke-static {v8, p1}, Lcom/airbnb/lottie/model/animatable/AnimatableFloatValue$Factory;->newInstance(Lorg/json/JSONObject;Lcom/airbnb/lottie/LottieComposition;)Lcom/airbnb/lottie/model/animatable/AnimatableFloatValue;

    move-result-object v7

    goto :goto_3
.end method